From 179dccc6801fc78ef0f3d9a258635afb7210b93c Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Thu, 12 Dec 2024 13:03:21 -0600 Subject: [PATCH 1/5] bindgen & core --- crates/libs/bindgen/src/types/cpp_fn.rs | 4 +-- crates/libs/bindgen/src/types/cpp_method.rs | 21 +++++++------ crates/libs/bindgen/src/types/method.rs | 15 +++++----- crates/libs/bindgen/src/types/mod.rs | 6 ++-- crates/libs/core/src/interface.rs | 6 ---- crates/libs/core/src/ref.rs | 33 ++++++++++++++++++++- 6 files changed, 57 insertions(+), 28 deletions(-) diff --git a/crates/libs/bindgen/src/types/cpp_fn.rs b/crates/libs/bindgen/src/types/cpp_fn.rs index e8bdabe11d..e9ced144b7 100644 --- a/crates/libs/bindgen/src/types/cpp_fn.rs +++ b/crates/libs/bindgen/src/types/cpp_fn.rs @@ -130,7 +130,7 @@ impl CppFn { let where_clause = method.write_where(writer, false); let return_type = signature.params[signature.params.len() - 1].0.deref(); - let map = if !return_type.is_nullable() { + let map = if !return_type.is_interface() { quote! { map(||core::mem::transmute(result__)) } } else { quote! { and_then(||windows_core::Type::from_abi(result__)) } @@ -167,7 +167,7 @@ impl CppFn { .0 .deref(); - if return_type.is_nullable() { + if return_type.is_interface() { let return_type = return_type.write_name(writer); quote! { diff --git a/crates/libs/bindgen/src/types/cpp_method.rs b/crates/libs/bindgen/src/types/cpp_method.rs index 9886526d04..c9b7564834 100644 --- a/crates/libs/bindgen/src/types/cpp_method.rs +++ b/crates/libs/bindgen/src/types/cpp_method.rs @@ -306,7 +306,7 @@ impl CppMethod { let map = if return_type.is_copyable() { quote! { map(||result__) } - } else if return_type.is_nullable() { + } else if return_type.is_interface() { quote! { and_then(||windows_core::Type::from_abi(result__)) } } else { quote! { map(||core::mem::transmute(result__)) } @@ -337,7 +337,7 @@ impl CppMethod { .0 .deref(); - if return_type.is_nullable() { + if return_type.is_interface() { let return_type = return_type.write_name(writer); quote! { @@ -743,12 +743,15 @@ fn write_produce_type(writer: &Writer, ty: &Type, param: Param) -> TokenStream { let name = to_ident(¶m.name().to_lowercase()); let kind = ty.write_default(writer); - if param.flags().contains(ParamAttributes::In) { + if !param.flags().contains(ParamAttributes::Out) && ty.is_interface() { + let type_name = ty.write_name(writer); + quote! { #name: windows_core::Ref<'_, #type_name>, } + } else if param.flags().contains(ParamAttributes::Out) && ty.deref().is_interface() { + let type_name = ty.deref().write_name(writer); + quote! { #name: windows_core::OutRef<'_, #type_name>, } + } else if param.flags().contains(ParamAttributes::In) { if ty.is_primitive() { quote! { #name: #kind, } - } else if ty.is_nullable() { - let kind = ty.write_name(writer); - quote! { #name: Option<&#kind>, } } else { quote! { #name: &#kind, } } @@ -760,9 +763,9 @@ fn write_produce_type(writer: &Writer, ty: &Type, param: Param) -> TokenStream { fn write_invoke_arg(ty: &Type, param: Param, _hint: ParamHint) -> TokenStream { let name = to_ident(¶m.name().to_lowercase()); - if param.flags().contains(ParamAttributes::In) && ty.is_nullable() { - quote! { windows_core::from_raw_borrowed(&#name) } - } else if (!ty.is_pointer() && ty.is_nullable()) + if !param.flags().contains(ParamAttributes::Out) && ty.is_interface() { + quote! { core::mem::transmute_copy(&#name) } + } else if (!ty.is_pointer() && ty.is_interface()) || (param.flags().contains(ParamAttributes::In) && !ty.is_primitive()) { quote! { core::mem::transmute(&#name) } diff --git a/crates/libs/bindgen/src/types/method.rs b/crates/libs/bindgen/src/types/method.rs index b771e0e553..f7609a8f46 100644 --- a/crates/libs/bindgen/src/types/method.rs +++ b/crates/libs/bindgen/src/types/method.rs @@ -37,10 +37,8 @@ impl Method { quote! { core::slice::from_raw_parts(core::mem::transmute_copy(&#name), #abi_size_name as usize) } } else if param.0.is_primitive() { quote! { #name } - } else if param.0.is_const_ref() { + } else if param.0.is_const_ref() || param.0.is_interface() { quote! { core::mem::transmute_copy(&#name) } - } else if param.0.is_nullable() { - quote! { windows_core::from_raw_borrowed(&#name) } } else { quote! { core::mem::transmute(&#name) } } @@ -144,9 +142,9 @@ impl Method { quote! { &[#default_type] } } else if p.0.is_primitive() { quote! { #default_type } - } else if p.0.is_nullable() { + } else if p.0.is_interface() { let type_name = p.0.write_name(writer); - quote! { Option<&#type_name> } + quote! { windows_core::Ref<'_, #type_name> } } else { quote! { &#default_type } } @@ -155,6 +153,9 @@ impl Method { } else if p.0.is_winrt_array_ref() { let kind = p.0.write_name(writer); quote! { &mut windows_core::Array<#kind> } + } else if p.0.is_interface() { + let type_name = p.0.write_name(writer); + quote! { windows_core::OutRef<'_, #type_name> } } else { quote! { &mut #default_type } }; @@ -180,7 +181,7 @@ impl Method { }; let return_type_tokens = if noexcept { - if self.signature.return_type.0.is_nullable() { + if self.signature.return_type.0.is_interface() { quote! { -> Option<#return_type_tokens> } } else if self.signature.return_type.0 == Type::Void { quote! {} @@ -431,7 +432,7 @@ impl Method { let noexcept = self.def.has_attribute("NoExceptionAttribute"); let return_type = if noexcept { - if self.signature.return_type.0.is_nullable() { + if self.signature.return_type.0.is_interface() { quote! { -> Option<#return_type> } } else if self.signature.return_type.0 == Type::Void { quote! {} diff --git a/crates/libs/bindgen/src/types/mod.rs b/crates/libs/bindgen/src/types/mod.rs index 3ca6069e72..9bcc22bce5 100644 --- a/crates/libs/bindgen/src/types/mod.rs +++ b/crates/libs/bindgen/src/types/mod.rs @@ -342,11 +342,11 @@ impl Type { Self::PtrMut(ty, pointers) => Self::PtrMut(ty.clone(), pointers - 1), Self::PSTR | Self::PCSTR => Self::U8, Self::PWSTR | Self::PCWSTR => Self::U16, - rest => panic!("{rest:?}"), + _ => self.clone(), } } - pub fn is_nullable(&self) -> bool { + pub fn is_interface(&self) -> bool { matches!( self, Self::Class(_) @@ -472,7 +472,7 @@ impl Type { if matches!(self, Self::Param(_)) { quote! { <#tokens as windows_core::Type<#tokens>>::Default } - } else if self.is_nullable() && !writer.config.sys { + } else if self.is_interface() && !writer.config.sys { quote! { Option<#tokens> } } else { tokens diff --git a/crates/libs/core/src/interface.rs b/crates/libs/core/src/interface.rs index b36ed7d5c1..610a27f8ce 100644 --- a/crates/libs/core/src/interface.rs +++ b/crates/libs/core/src/interface.rs @@ -259,12 +259,6 @@ pub unsafe trait Interface: Sized + Clone { } } -/// # Safety -#[doc(hidden)] -pub unsafe fn from_raw_borrowed(raw: &*mut c_void) -> Option<&T> { - T::from_raw_borrowed(raw) -} - /// This has the same memory representation as `IFoo`, but represents a borrowed interface pointer. /// /// This type has no `Drop` impl; it does not AddRef/Release the given interface. However, because diff --git a/crates/libs/core/src/ref.rs b/crates/libs/core/src/ref.rs index fb40e8ff3f..963d2d0625 100644 --- a/crates/libs/core/src/ref.rs +++ b/crates/libs/core/src/ref.rs @@ -8,14 +8,45 @@ use core::mem::transmute; pub struct Ref<'a, T: Type>(T::Abi, PhantomData<&'a T>); impl, Abi = *mut c_void>> Ref<'_, T> { + /// Returns `true` if the argument is null. + pub fn is_null(&self) -> bool { + self.0.is_null() + } + /// Converts the argument to a [Result<&T>] reference. pub fn ok(&self) -> Result<&T> { if self.0.is_null() { Err(Error::from_hresult(imp::E_POINTER)) } else { - unsafe { Ok(transmute::<&*mut c_void, &T>(&self.0)) } + unsafe { Ok(self.assume_init()) } + } + } + + /// Converts the argument to a `&T` reference. + /// + /// # Panics + /// + /// Panics if the argument is null. + pub fn unwrap(&self) -> &T { + if self.0.is_null() { + panic!("called `Ref::unwrap` on a null value") + } else { + unsafe { self.assume_init() } } } + + /// Converts the argument to an [Option] by cloning the reference. + pub fn cloned(&self) -> Option { + if self.0.is_null() { + None + } else { + unsafe { Some(self.assume_init().clone()) } + } + } + + unsafe fn assume_init(&self) -> &T { + transmute::<&*mut c_void, &T>(&self.0) + } } impl> core::ops::Deref for Ref<'_, T> { From a7e3d8404e0d07528b48e151beaeb0d44157785d Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Thu, 12 Dec 2024 13:04:40 -0600 Subject: [PATCH 2/5] extensions --- .../src/extensions/Foundation/Async.rs | 2 +- .../src/extensions/Foundation/AsyncReady.rs | 18 ++++++++---------- .../src/extensions/Foundation/AsyncSpawn.rs | 19 ++++++++++--------- .../Foundation/Collections/MapView.rs | 6 +++--- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/crates/libs/windows/src/extensions/Foundation/Async.rs b/crates/libs/windows/src/extensions/Foundation/Async.rs index 91b2ca3b6e..f15ba384be 100644 --- a/crates/libs/windows/src/extensions/Foundation/Async.rs +++ b/crates/libs/windows/src/extensions/Foundation/Async.rs @@ -19,7 +19,7 @@ pub trait Async: Interface { type Output: Clone; // The type of the delegate use for completion notification. - type CompletedHandler: Clone; + type CompletedHandler: Interface; // Sets the handler or callback to invoke when execution completes. This handler can only be set once. fn set_completed(&self, handler: F) -> Result<()>; diff --git a/crates/libs/windows/src/extensions/Foundation/AsyncReady.rs b/crates/libs/windows/src/extensions/Foundation/AsyncReady.rs index 1d26326cbc..182944b2a2 100644 --- a/crates/libs/windows/src/extensions/Foundation/AsyncReady.rs +++ b/crates/libs/windows/src/extensions/Foundation/AsyncReady.rs @@ -22,11 +22,9 @@ impl ReadyState { // The "Ready" implementations don't need to store the handler since the handler is invoked immediately // but still need to confirm that `SetCompleted` is called at most once. - fn invoke_completed(&self, sender: &T, handler: Option<&T::CompletedHandler>) -> Result<()> { + fn invoke_completed(&self, sender: &T, handler: Ref<'_, T::CompletedHandler>) -> Result<()> { if !self.set_completed.swap(true, Ordering::SeqCst) { - if let Some(handler) = handler { - sender.invoke_completed(handler, self.status()); - } + sender.invoke_completed(handler.ok()?, self.status()); Ok(()) } else { Err(Error::from_hresult(HRESULT(0x80000018u32 as i32))) // E_ILLEGAL_DELEGATE_ASSIGNMENT @@ -135,7 +133,7 @@ impl IAsyncInfo_Impl for ReadyOperationWithProgr } impl IAsyncAction_Impl for ReadyAction_Impl { - fn SetCompleted(&self, handler: Option<&AsyncActionCompletedHandler>) -> Result<()> { + fn SetCompleted(&self, handler: Ref<'_, AsyncActionCompletedHandler>) -> Result<()> { self.0.invoke_completed(&self.as_interface(), handler) } fn Completed(&self) -> Result { @@ -147,7 +145,7 @@ impl IAsyncAction_Impl for ReadyAction_Impl { } impl IAsyncOperation_Impl for ReadyOperation_Impl { - fn SetCompleted(&self, handler: Option<&AsyncOperationCompletedHandler>) -> Result<()> { + fn SetCompleted(&self, handler: Ref<'_, AsyncOperationCompletedHandler>) -> Result<()> { self.0.invoke_completed(&self.as_interface(), handler) } fn Completed(&self) -> Result> { @@ -159,7 +157,7 @@ impl IAsyncOperation_Impl for ReadyOperation_Impl { } impl IAsyncActionWithProgress_Impl

for ReadyActionWithProgress_Impl

{ - fn SetCompleted(&self, handler: Option<&AsyncActionWithProgressCompletedHandler

>) -> Result<()> { + fn SetCompleted(&self, handler: Ref<'_, AsyncActionWithProgressCompletedHandler

>) -> Result<()> { self.0.invoke_completed(&self.as_interface(), handler) } fn Completed(&self) -> Result> { @@ -168,7 +166,7 @@ impl IAsyncActionWithProgress_Impl

for ReadyActionWithProgres fn GetResults(&self) -> Result<()> { self.0.result.clone() } - fn SetProgress(&self, _: Option<&AsyncActionProgressHandler

>) -> Result<()> { + fn SetProgress(&self, _: Ref<'_, AsyncActionProgressHandler

>) -> Result<()> { Ok(()) } fn Progress(&self) -> Result> { @@ -177,7 +175,7 @@ impl IAsyncActionWithProgress_Impl

for ReadyActionWithProgres } impl IAsyncOperationWithProgress_Impl for ReadyOperationWithProgress_Impl { - fn SetCompleted(&self, handler: Option<&AsyncOperationWithProgressCompletedHandler>) -> Result<()> { + fn SetCompleted(&self, handler: Ref<'_, AsyncOperationWithProgressCompletedHandler>) -> Result<()> { self.0.invoke_completed(&self.as_interface(), handler) } fn Completed(&self) -> Result> { @@ -186,7 +184,7 @@ impl IAsyncOperationWithProgress_Impl for fn GetResults(&self) -> Result { self.0.result.clone() } - fn SetProgress(&self, _: Option<&AsyncOperationProgressHandler>) -> Result<()> { + fn SetProgress(&self, _: Ref<'_, AsyncOperationProgressHandler>) -> Result<()> { Ok(()) } fn Progress(&self) -> Result> { diff --git a/crates/libs/windows/src/extensions/Foundation/AsyncSpawn.rs b/crates/libs/windows/src/extensions/Foundation/AsyncSpawn.rs index ca69073100..406deb7c48 100644 --- a/crates/libs/windows/src/extensions/Foundation/AsyncSpawn.rs +++ b/crates/libs/windows/src/extensions/Foundation/AsyncSpawn.rs @@ -52,7 +52,7 @@ impl SyncState { self.0.lock().unwrap().get_results() } - fn set_completed(&self, sender: &T, handler: Option<&T::CompletedHandler>) -> Result<()> { + fn set_completed(&self, sender: &T, handler: Ref<'_, T::CompletedHandler>) -> Result<()> { let mut guard = self.0.lock().unwrap(); if guard.completed_assigned { @@ -60,12 +60,13 @@ impl SyncState { } else { guard.completed_assigned = true; let status = guard.status(); + let handler = handler.ok()?; if status == AsyncStatus::Started { - guard.completed = handler.cloned(); + guard.completed = Some(handler.clone()); } else { drop(guard); - sender.invoke_completed(handler.unwrap(), status); + sender.invoke_completed(handler, status); } Ok(()) @@ -185,7 +186,7 @@ impl IAsyncInfo_Impl for OperationWithProgress_I } impl IAsyncAction_Impl for Action_Impl { - fn SetCompleted(&self, handler: Option<&AsyncActionCompletedHandler>) -> Result<()> { + fn SetCompleted(&self, handler: Ref<'_, AsyncActionCompletedHandler>) -> Result<()> { self.0.set_completed(&self.as_interface(), handler) } fn Completed(&self) -> Result { @@ -197,7 +198,7 @@ impl IAsyncAction_Impl for Action_Impl { } impl IAsyncOperation_Impl for Operation_Impl { - fn SetCompleted(&self, handler: Option<&AsyncOperationCompletedHandler>) -> Result<()> { + fn SetCompleted(&self, handler: Ref<'_, AsyncOperationCompletedHandler>) -> Result<()> { self.0.set_completed(&self.as_interface(), handler) } fn Completed(&self) -> Result> { @@ -209,7 +210,7 @@ impl IAsyncOperation_Impl for Operation_Impl { } impl IAsyncActionWithProgress_Impl

for ActionWithProgress_Impl

{ - fn SetCompleted(&self, handler: Option<&AsyncActionWithProgressCompletedHandler

>) -> Result<()> { + fn SetCompleted(&self, handler: Ref<'_, AsyncActionWithProgressCompletedHandler

>) -> Result<()> { self.0.set_completed(&self.as_interface(), handler) } fn Completed(&self) -> Result> { @@ -218,7 +219,7 @@ impl IAsyncActionWithProgress_Impl

for ActionWithProgress_Imp fn GetResults(&self) -> Result<()> { self.0.get_results() } - fn SetProgress(&self, _: Option<&AsyncActionProgressHandler

>) -> Result<()> { + fn SetProgress(&self, _: Ref<'_, AsyncActionProgressHandler

>) -> Result<()> { Ok(()) } fn Progress(&self) -> Result> { @@ -227,7 +228,7 @@ impl IAsyncActionWithProgress_Impl

for ActionWithProgress_Imp } impl IAsyncOperationWithProgress_Impl for OperationWithProgress_Impl { - fn SetCompleted(&self, handler: Option<&AsyncOperationWithProgressCompletedHandler>) -> Result<()> { + fn SetCompleted(&self, handler: Ref<'_, AsyncOperationWithProgressCompletedHandler>) -> Result<()> { self.0.set_completed(&self.as_interface(), handler) } fn Completed(&self) -> Result> { @@ -236,7 +237,7 @@ impl IAsyncOperationWithProgress_Impl for fn GetResults(&self) -> Result { self.0.get_results() } - fn SetProgress(&self, _: Option<&AsyncOperationProgressHandler>) -> Result<()> { + fn SetProgress(&self, _: Ref<'_, AsyncOperationProgressHandler>) -> Result<()> { Ok(()) } fn Progress(&self) -> Result> { diff --git a/crates/libs/windows/src/extensions/Foundation/Collections/MapView.rs b/crates/libs/windows/src/extensions/Foundation/Collections/MapView.rs index 5553a25657..f714e8563c 100644 --- a/crates/libs/windows/src/extensions/Foundation/Collections/MapView.rs +++ b/crates/libs/windows/src/extensions/Foundation/Collections/MapView.rs @@ -42,9 +42,9 @@ where fn HasKey(&self, key: &K::Default) -> windows_core::Result { Ok(self.map.contains_key(key)) } - fn Split(&self, first: &mut Option>, second: &mut Option>) -> windows_core::Result<()> { - *first = None; - *second = None; + fn Split(&self, first: windows_core::OutRef<'_, IMapView>, second: windows_core::OutRef<'_, IMapView>) -> windows_core::Result<()> { + _ = first.write(None); + _ = second.write(None); Ok(()) } } From ed18c6fa4b27d004a8bb7b6d423b038063b0e9b6 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Thu, 12 Dec 2024 13:04:58 -0600 Subject: [PATCH 3/5] windows crate code gen --- .../ApplicationModel/Background/mod.rs | 40 +- .../Windows/ApplicationModel/Contacts/mod.rs | 4 +- .../src/Windows/ApplicationModel/Core/mod.rs | 12 +- .../DataTransfer/DragDrop/Core/mod.rs | 16 +- .../ApplicationModel/DataTransfer/mod.rs | 16 +- .../Windows/ApplicationModel/Payments/mod.rs | 8 +- .../src/Windows/ApplicationModel/mod.rs | 4 +- .../libs/windows/src/Windows/Data/Text/mod.rs | 16 +- .../windows/src/Windows/Data/Xml/Dom/mod.rs | 32 +- .../src/Windows/Devices/Gpio/Provider/mod.rs | 4 +- .../src/Windows/Devices/I2c/Provider/mod.rs | 4 +- .../windows/src/Windows/Devices/I2c/mod.rs | 4 +- .../windows/src/Windows/Devices/Midi/mod.rs | 8 +- .../src/Windows/Devices/PointOfService/mod.rs | 32 +- .../src/Windows/Devices/Sensors/mod.rs | 8 +- .../src/Windows/Devices/SmartCards/mod.rs | 8 +- .../windows/src/Windows/Devices/Sms/mod.rs | 32 +- .../src/Windows/Devices/Spi/Provider/mod.rs | 4 +- .../windows/src/Windows/Devices/Spi/mod.rs | 4 +- .../src/Windows/Foundation/Collections/mod.rs | 26 +- .../src/Windows/Foundation/Diagnostics/mod.rs | 60 +- .../windows/src/Windows/Foundation/mod.rs | 84 +- .../src/Windows/Gaming/Input/Custom/mod.rs | 12 +- .../windows/src/Windows/Gaming/Input/mod.rs | 12 +- .../Gaming/Preview/GamesEnumeration/mod.rs | 8 +- .../Globalization/NumberFormatting/mod.rs | 4 +- .../src/Windows/Graphics/Display/mod.rs | 8 +- .../src/Windows/Graphics/Imaging/mod.rs | 12 +- .../Graphics/Printing/OptionDetails/mod.rs | 4 +- .../src/Windows/Graphics/Printing/mod.rs | 8 +- .../src/Windows/Graphics/Printing3D/mod.rs | 8 +- .../src/Windows/Management/Setup/mod.rs | 8 +- .../windows/src/Windows/Media/Audio/mod.rs | 24 +- .../windows/src/Windows/Media/Capture/mod.rs | 16 +- .../windows/src/Windows/Media/Core/mod.rs | 4 +- .../windows/src/Windows/Media/Devices/mod.rs | 36 +- .../windows/src/Windows/Media/Effects/mod.rs | 24 +- .../windows/src/Windows/Media/Playback/mod.rs | 4 +- .../Windows/Media/Protection/PlayReady/mod.rs | 52 +- .../src/Windows/Media/Protection/mod.rs | 24 +- crates/libs/windows/src/Windows/Media/mod.rs | 16 +- .../Networking/BackgroundTransfer/mod.rs | 8 +- .../Windows/Networking/Connectivity/mod.rs | 8 +- .../src/Windows/Networking/Proximity/mod.rs | 32 +- .../src/Windows/Networking/Sockets/mod.rs | 16 +- .../windows/src/Windows/Networking/Vpn/mod.rs | 44 +- .../Windows/Phone/PersonalInformation/mod.rs | 4 +- .../Authentication/Web/Provider/mod.rs | 8 +- .../src/Windows/Security/Isolation/mod.rs | 16 +- .../src/Windows/Storage/AccessCache/mod.rs | 20 +- .../src/Windows/Storage/BulkAccess/mod.rs | 8 +- .../src/Windows/Storage/FileProperties/mod.rs | 8 +- .../src/Windows/Storage/Provider/mod.rs | 36 +- .../windows/src/Windows/Storage/Search/mod.rs | 36 +- .../src/Windows/Storage/Streams/mod.rs | 24 +- .../libs/windows/src/Windows/Storage/mod.rs | 52 +- .../System/Implementation/FileExplorer/mod.rs | 8 +- .../src/Windows/System/Threading/Core/mod.rs | 8 +- .../src/Windows/System/Threading/mod.rs | 24 +- .../src/Windows/UI/ApplicationSettings/mod.rs | 24 +- .../UI/Composition/Interactions/mod.rs | 24 +- .../windows/src/Windows/UI/Composition/mod.rs | 8 +- .../libs/windows/src/Windows/UI/Core/mod.rs | 136 +- .../src/Windows/UI/Input/Inking/mod.rs | 32 +- .../libs/windows/src/Windows/UI/Popups/mod.rs | 16 +- .../libs/windows/src/Windows/UI/Text/mod.rs | 68 +- .../src/Windows/UI/UIAutomation/Core/mod.rs | 4 +- .../windows/src/Windows/UI/WebUI/Core/mod.rs | 8 +- .../libs/windows/src/Windows/UI/WebUI/mod.rs | 56 +- .../src/Windows/Web/Http/Filters/mod.rs | 4 +- .../libs/windows/src/Windows/Web/Http/mod.rs | 4 +- .../src/Windows/Web/Syndication/mod.rs | 20 +- crates/libs/windows/src/Windows/Web/UI/mod.rs | 94 +- crates/libs/windows/src/Windows/Web/mod.rs | 4 +- .../Win32/AI/MachineLearning/DirectML/mod.rs | 12 +- .../Win32/AI/MachineLearning/WinML/mod.rs | 38 +- .../src/Windows/Win32/Data/HtmlHelp/mod.rs | 24 +- .../src/Windows/Win32/Data/Xml/MsXml/mod.rs | 276 ++-- .../src/Windows/Win32/Data/Xml/XmlLite/mod.rs | 36 +- .../Windows/Win32/Devices/DeviceAccess/mod.rs | 4 +- .../src/Windows/Win32/Devices/Display/mod.rs | 4 +- .../Win32/Devices/Enumeration/Pnp/mod.rs | 60 +- .../src/Windows/Win32/Devices/Fax/mod.rs | 168 +-- .../Win32/Devices/FunctionDiscovery/mod.rs | 84 +- .../Windows/Win32/Devices/Geolocation/mod.rs | 12 +- .../Win32/Devices/HumanInterfaceDevice/mod.rs | 40 +- .../Win32/Devices/ImageAcquisition/mod.rs | 114 +- .../Win32/Devices/PortableDevices/mod.rs | 184 +-- .../src/Windows/Win32/Devices/Sensors/mod.rs | 48 +- .../src/Windows/Win32/Devices/Tapi/mod.rs | 206 +-- .../Win32/Devices/WebServicesOnDevices/mod.rs | 160 +- .../windows/src/Windows/Win32/Gaming/mod.rs | 2 +- .../src/Windows/Win32/Globalization/mod.rs | 50 +- .../Graphics/CompositionSwapchain/mod.rs | 12 +- .../src/Windows/Win32/Graphics/DXCore/mod.rs | 4 +- .../Windows/Win32/Graphics/Direct2D/mod.rs | 630 ++++---- .../Win32/Graphics/Direct3D/Dxc/mod.rs | 127 +- .../Windows/Win32/Graphics/Direct3D10/mod.rs | 196 +-- .../Windows/Win32/Graphics/Direct3D11/mod.rs | 845 ++++++----- .../Win32/Graphics/Direct3D11on12/mod.rs | 12 +- .../Windows/Win32/Graphics/Direct3D12/mod.rs | 294 ++-- .../Windows/Win32/Graphics/Direct3D9/mod.rs | 104 +- .../Win32/Graphics/Direct3D9on12/mod.rs | 8 +- .../Win32/Graphics/DirectComposition/mod.rs | 376 ++--- .../Windows/Win32/Graphics/DirectDraw/mod.rs | 294 ++-- .../Win32/Graphics/DirectManipulation/mod.rs | 76 +- .../Windows/Win32/Graphics/DirectWrite/mod.rs | 381 ++--- .../src/Windows/Win32/Graphics/Dxgi/mod.rs | 78 +- .../Windows/Win32/Graphics/Imaging/D2D/mod.rs | 16 +- .../src/Windows/Win32/Graphics/Imaging/mod.rs | 180 +-- .../Windows/Win32/Graphics/Printing/mod.rs | 214 +-- .../src/Windows/Win32/Media/Audio/Apo/mod.rs | 20 +- .../Win32/Media/Audio/DirectMusic/mod.rs | 70 +- .../Win32/Media/Audio/DirectSound/mod.rs | 22 +- .../Win32/Media/Audio/Endpoints/mod.rs | 24 +- .../Windows/Win32/Media/Audio/XAudio2/mod.rs | 32 +- .../src/Windows/Win32/Media/Audio/mod.rs | 100 +- .../Windows/Win32/Media/DeviceManager/mod.rs | 138 +- .../Windows/Win32/Media/DirectShow/Tv/mod.rs | 498 +++---- .../Windows/Win32/Media/DirectShow/Xml/mod.rs | 12 +- .../src/Windows/Win32/Media/DirectShow/mod.rs | 588 ++++---- .../Windows/Win32/Media/DxMediaObjects/mod.rs | 4 +- .../Win32/Media/KernelStreaming/mod.rs | 44 +- .../Win32/Media/MediaFoundation/mod.rs | 1320 ++++++++--------- .../Windows/Win32/Media/MediaPlayer/mod.rs | 262 ++-- .../src/Windows/Win32/Media/Multimedia/mod.rs | 12 +- .../Win32/Media/PictureAcquisition/mod.rs | 60 +- .../src/Windows/Win32/Media/Speech/mod.rs | 268 ++-- .../Win32/Media/WindowsMediaFormat/mod.rs | 198 +-- .../NetworkManagement/MobileBroadband/mod.rs | 252 ++-- .../NetworkManagement/NetManagement/mod.rs | 124 +- .../NetworkDiagnosticsFramework/mod.rs | 4 +- .../NetworkPolicyServer/mod.rs | 24 +- .../Win32/NetworkManagement/WiFi/mod.rs | 22 +- .../WindowsConnectNow/mod.rs | 4 +- .../NetworkManagement/WindowsFirewall/mod.rs | 42 +- .../Win32/Networking/ActiveDirectory/mod.rs | 54 +- .../mod.rs | 70 +- .../Win32/Networking/Clustering/mod.rs | 60 +- .../Networking/NetworkListManager/mod.rs | 4 +- .../RemoteDifferentialCompression/mod.rs | 24 +- .../Windows/Win32/Networking/WinInet/mod.rs | 8 +- .../Authentication/Identity/Provider/mod.rs | 36 +- .../Win32/Security/ConfigurationSnapin/mod.rs | 4 +- .../Security/Cryptography/Certificates/mod.rs | 364 ++--- .../Win32/Security/Cryptography/mod.rs | 4 +- .../Win32/Security/EnterpriseData/mod.rs | 40 +- .../ExtensibleAuthenticationProtocol/mod.rs | 8 +- .../src/Windows/Win32/Security/Tpm/mod.rs | 16 +- .../Win32/Storage/DataDeduplication/mod.rs | 12 +- .../Storage/FileServerResourceManager/mod.rs | 44 +- .../Windows/Win32/Storage/FileSystem/mod.rs | 24 +- .../src/Windows/Win32/Storage/Imapi/mod.rs | 170 +-- .../Windows/Win32/Storage/OfflineFiles/mod.rs | 44 +- .../Win32/Storage/Packaging/Appx/mod.rs | 208 +-- .../Win32/Storage/Packaging/Opc/mod.rs | 100 +- .../Win32/Storage/VirtualDiskService/mod.rs | 22 +- .../src/Windows/Win32/Storage/Vss/mod.rs | 8 +- .../Windows/Win32/Storage/Xps/Printing/mod.rs | 4 +- .../src/Windows/Win32/Storage/Xps/mod.rs | 566 ++++--- .../Windows/Win32/System/AddressBook/mod.rs | 102 +- .../Windows/Win32/System/Antimalware/mod.rs | 8 +- .../mod.rs | 28 +- .../Win32/System/AssessmentTool/mod.rs | 8 +- .../Windows/Win32/System/ClrHosting/mod.rs | 98 +- .../Windows/Win32/System/Com/CallObj/mod.rs | 26 +- .../Windows/Win32/System/Com/Events/mod.rs | 38 +- .../Windows/Win32/System/Com/Marshal/mod.rs | 12 +- .../Win32/System/Com/StructuredStorage/mod.rs | 44 +- .../src/Windows/Win32/System/Com/UI/mod.rs | 8 +- .../Windows/Win32/System/Com/Urlmon/mod.rs | 78 +- .../src/Windows/Win32/System/Com/mod.rs | 272 ++-- .../Win32/System/ComponentServices/mod.rs | 110 +- .../src/Windows/Win32/System/Contacts/mod.rs | 12 +- .../Win32/System/DesktopSharing/mod.rs | 40 +- .../System/Diagnostics/ClrProfiling/mod.rs | 20 +- .../Diagnostics/Debug/ActiveScript/mod.rs | 404 ++--- .../Diagnostics/Debug/Extensions/mod.rs | 726 ++++----- .../Win32/System/Diagnostics/Etw/mod.rs | 20 +- .../DistributedTransactionCoordinator/mod.rs | 70 +- .../Windows/Win32/System/GroupPolicy/mod.rs | 88 +- .../Win32/System/MessageQueuing/mod.rs | 128 +- .../src/Windows/Win32/System/Mmc/mod.rs | 212 +-- .../src/Windows/Win32/System/Ole/mod.rs | 236 +-- .../Windows/Win32/System/Performance/mod.rs | 70 +- .../System/RealTimeCommunications/mod.rs | 98 +- .../Win32/System/RemoteAssistance/mod.rs | 4 +- .../Windows/Win32/System/RemoteDesktop/mod.rs | 204 +-- .../Win32/System/RemoteManagement/mod.rs | 8 +- .../src/Windows/Win32/System/Search/mod.rs | 320 ++-- .../SettingsManagementInfrastructure/mod.rs | 40 +- .../src/Windows/Win32/System/SideShow/mod.rs | 32 +- .../Windows/Win32/System/TaskScheduler/mod.rs | 58 +- .../src/Windows/Win32/System/Threading/mod.rs | 4 +- .../Windows/Win32/System/UpdateAgent/mod.rs | 100 +- .../Win32/System/WinRT/Composition/mod.rs | 24 +- .../Windows/Win32/System/WinRT/Display/mod.rs | 4 +- .../System/WinRT/Graphics/Direct2D/mod.rs | 4 +- .../System/WinRT/Graphics/Imaging/mod.rs | 8 +- .../Win32/System/WinRT/Holographic/mod.rs | 52 +- .../src/Windows/Win32/System/WinRT/ML/mod.rs | 8 +- .../Windows/Win32/System/WinRT/Media/mod.rs | 8 +- .../Win32/System/WinRT/Metadata/mod.rs | 48 +- .../src/Windows/Win32/System/WinRT/Pdf/mod.rs | 8 +- .../Win32/System/WinRT/Printing/mod.rs | 28 +- .../Windows/Win32/System/WinRT/Shell/mod.rs | 4 +- .../Windows/Win32/System/WinRT/Storage/mod.rs | 12 +- .../src/Windows/Win32/System/WinRT/mod.rs | 32 +- .../Win32/System/WindowsProgramming/mod.rs | 4 +- .../Windows/Win32/System/WindowsSync/mod.rs | 306 ++-- .../src/Windows/Win32/System/Wmi/mod.rs | 418 +++--- .../src/Windows/Win32/UI/Accessibility/mod.rs | 402 ++--- .../src/Windows/Win32/UI/Animation/mod.rs | 236 +-- .../src/Windows/Win32/UI/ColorSystem/mod.rs | 8 +- .../Windows/Win32/UI/Controls/RichEdit/mod.rs | 166 +-- .../src/Windows/Win32/UI/Controls/mod.rs | 24 +- .../src/Windows/Win32/UI/Input/Ime/mod.rs | 12 +- .../src/Windows/Win32/UI/Input/Ink/mod.rs | 24 +- .../LegacyWindowsEnvironmentFeatures/mod.rs | 24 +- .../src/Windows/Win32/UI/Ribbon/mod.rs | 44 +- .../src/Windows/Win32/UI/Shell/Common/mod.rs | 8 +- .../Win32/UI/Shell/PropertiesSystem/mod.rs | 24 +- .../windows/src/Windows/Win32/UI/Shell/mod.rs | 1300 ++++++++-------- .../src/Windows/Win32/UI/TabletPC/mod.rs | 448 +++--- .../src/Windows/Win32/UI/TextServices/mod.rs | 558 +++---- .../windows/src/Windows/Win32/UI/Wpf/mod.rs | 68 +- .../Windows/Win32/Web/InternetExplorer/mod.rs | 180 +-- 227 files changed, 10585 insertions(+), 10614 deletions(-) diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs index a6b6b25e5f..d16184dffb 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs @@ -582,7 +582,7 @@ impl windows_core::RuntimeType for BackgroundTaskCanceledEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl BackgroundTaskCanceledEventHandler { - pub fn new, BackgroundTaskCancellationReason) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, BackgroundTaskCancellationReason) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = BackgroundTaskCanceledEventHandlerBox { vtable: &BackgroundTaskCanceledEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -600,12 +600,12 @@ pub struct BackgroundTaskCanceledEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, reason: BackgroundTaskCancellationReason) -> windows_core::HRESULT, } #[repr(C)] -struct BackgroundTaskCanceledEventHandlerBox, BackgroundTaskCancellationReason) -> windows_core::Result<()> + Send + 'static> { +struct BackgroundTaskCanceledEventHandlerBox, BackgroundTaskCancellationReason) -> windows_core::Result<()> + Send + 'static> { vtable: *const BackgroundTaskCanceledEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, BackgroundTaskCancellationReason) -> windows_core::Result<()> + Send + 'static> BackgroundTaskCanceledEventHandlerBox { +impl, BackgroundTaskCancellationReason) -> windows_core::Result<()> + Send + 'static> BackgroundTaskCanceledEventHandlerBox { const VTABLE: BackgroundTaskCanceledEventHandler_Vtbl = BackgroundTaskCanceledEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -634,7 +634,7 @@ impl, BackgroundTaskCancellationReason } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, reason: BackgroundTaskCancellationReason) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), reason).into() + (this.invoke)(core::mem::transmute_copy(&sender), reason).into() } } #[repr(transparent)] @@ -694,7 +694,7 @@ impl windows_core::RuntimeType for BackgroundTaskCompletedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl BackgroundTaskCompletedEventHandler { - pub fn new, Option<&BackgroundTaskCompletedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, BackgroundTaskCompletedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = BackgroundTaskCompletedEventHandlerBox { vtable: &BackgroundTaskCompletedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -713,12 +713,12 @@ pub struct BackgroundTaskCompletedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct BackgroundTaskCompletedEventHandlerBox, Option<&BackgroundTaskCompletedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct BackgroundTaskCompletedEventHandlerBox, windows_core::Ref<'_, BackgroundTaskCompletedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const BackgroundTaskCompletedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&BackgroundTaskCompletedEventArgs>) -> windows_core::Result<()> + Send + 'static> BackgroundTaskCompletedEventHandlerBox { +impl, windows_core::Ref<'_, BackgroundTaskCompletedEventArgs>) -> windows_core::Result<()> + Send + 'static> BackgroundTaskCompletedEventHandlerBox { const VTABLE: BackgroundTaskCompletedEventHandler_Vtbl = BackgroundTaskCompletedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -747,7 +747,7 @@ impl, Option<&BackgroundTaskComplet } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&args)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&args)).into() } } #[repr(transparent)] @@ -809,7 +809,7 @@ impl windows_core::RuntimeType for BackgroundTaskProgressEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl BackgroundTaskProgressEventHandler { - pub fn new, Option<&BackgroundTaskProgressEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, BackgroundTaskProgressEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = BackgroundTaskProgressEventHandlerBox { vtable: &BackgroundTaskProgressEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -828,12 +828,12 @@ pub struct BackgroundTaskProgressEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct BackgroundTaskProgressEventHandlerBox, Option<&BackgroundTaskProgressEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct BackgroundTaskProgressEventHandlerBox, windows_core::Ref<'_, BackgroundTaskProgressEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const BackgroundTaskProgressEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&BackgroundTaskProgressEventArgs>) -> windows_core::Result<()> + Send + 'static> BackgroundTaskProgressEventHandlerBox { +impl, windows_core::Ref<'_, BackgroundTaskProgressEventArgs>) -> windows_core::Result<()> + Send + 'static> BackgroundTaskProgressEventHandlerBox { const VTABLE: BackgroundTaskProgressEventHandler_Vtbl = BackgroundTaskProgressEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -862,7 +862,7 @@ impl, Option<&BackgroundTaskProgres } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&args)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&args)).into() } } #[repr(transparent)] @@ -2224,13 +2224,13 @@ impl windows_core::RuntimeName for IBackgroundTask { const NAME: &'static str = "Windows.ApplicationModel.Background.IBackgroundTask"; } pub trait IBackgroundTask_Impl: windows_core::IUnknownImpl { - fn Run(&self, taskInstance: Option<&IBackgroundTaskInstance>) -> windows_core::Result<()>; + fn Run(&self, taskInstance: windows_core::Ref<'_, IBackgroundTaskInstance>) -> windows_core::Result<()>; } impl IBackgroundTask_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Run(this: *mut core::ffi::c_void, taskinstance: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundTask_Impl::Run(this, windows_core::from_raw_borrowed(&taskinstance)).into() + IBackgroundTask_Impl::Run(this, core::mem::transmute_copy(&taskinstance)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), Run: Run:: } } @@ -2413,7 +2413,7 @@ pub trait IBackgroundTaskInstance_Impl: windows_core::IUnknownImpl { fn Progress(&self) -> windows_core::Result; fn SetProgress(&self, value: u32) -> windows_core::Result<()>; fn TriggerDetails(&self) -> windows_core::Result; - fn Canceled(&self, cancelHandler: Option<&BackgroundTaskCanceledEventHandler>) -> windows_core::Result; + fn Canceled(&self, cancelHandler: windows_core::Ref<'_, BackgroundTaskCanceledEventHandler>) -> windows_core::Result; fn RemoveCanceled(&self, cookie: i64) -> windows_core::Result<()>; fn SuspendedCount(&self) -> windows_core::Result; fn GetDeferral(&self) -> windows_core::Result; @@ -2468,7 +2468,7 @@ impl IBackgroundTaskInstance_Vtbl { } unsafe extern "system" fn Canceled(this: *mut core::ffi::c_void, cancelhandler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBackgroundTaskInstance_Impl::Canceled(this, windows_core::from_raw_borrowed(&cancelhandler)) { + match IBackgroundTaskInstance_Impl::Canceled(this, core::mem::transmute_copy(&cancelhandler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2819,9 +2819,9 @@ impl windows_core::RuntimeName for IBackgroundTaskRegistration { pub trait IBackgroundTaskRegistration_Impl: windows_core::IUnknownImpl { fn TaskId(&self) -> windows_core::Result; fn Name(&self) -> windows_core::Result; - fn Progress(&self, handler: Option<&BackgroundTaskProgressEventHandler>) -> windows_core::Result; + fn Progress(&self, handler: windows_core::Ref<'_, BackgroundTaskProgressEventHandler>) -> windows_core::Result; fn RemoveProgress(&self, cookie: i64) -> windows_core::Result<()>; - fn Completed(&self, handler: Option<&BackgroundTaskCompletedEventHandler>) -> windows_core::Result; + fn Completed(&self, handler: windows_core::Ref<'_, BackgroundTaskCompletedEventHandler>) -> windows_core::Result; fn RemoveCompleted(&self, cookie: i64) -> windows_core::Result<()>; fn Unregister(&self, cancelTask: bool) -> windows_core::Result<()>; } @@ -2850,7 +2850,7 @@ impl IBackgroundTaskRegistration_Vtbl { } unsafe extern "system" fn Progress(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBackgroundTaskRegistration_Impl::Progress(this, windows_core::from_raw_borrowed(&handler)) { + match IBackgroundTaskRegistration_Impl::Progress(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2864,7 +2864,7 @@ impl IBackgroundTaskRegistration_Vtbl { } unsafe extern "system" fn Completed(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBackgroundTaskRegistration_Impl::Completed(this, windows_core::from_raw_borrowed(&handler)) { + match IBackgroundTaskRegistration_Impl::Completed(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/mod.rs index e01d7b57f8..1ed6056397 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/mod.rs @@ -4938,7 +4938,7 @@ impl windows_core::RuntimeName for IContactInstantMessageFieldFactory { pub trait IContactInstantMessageFieldFactory_Impl: windows_core::IUnknownImpl { fn CreateInstantMessage_Default(&self, userName: &windows_core::HSTRING) -> windows_core::Result; fn CreateInstantMessage_Category(&self, userName: &windows_core::HSTRING, category: ContactFieldCategory) -> windows_core::Result; - fn CreateInstantMessage_All(&self, userName: &windows_core::HSTRING, category: ContactFieldCategory, service: &windows_core::HSTRING, displayText: &windows_core::HSTRING, verb: Option<&super::super::Foundation::Uri>) -> windows_core::Result; + fn CreateInstantMessage_All(&self, userName: &windows_core::HSTRING, category: ContactFieldCategory, service: &windows_core::HSTRING, displayText: &windows_core::HSTRING, verb: windows_core::Ref<'_, super::super::Foundation::Uri>) -> windows_core::Result; } impl IContactInstantMessageFieldFactory_Vtbl { pub const fn new() -> Self { @@ -4966,7 +4966,7 @@ impl IContactInstantMessageFieldFactory_Vtbl { } unsafe extern "system" fn CreateInstantMessage_All(this: *mut core::ffi::c_void, username: *mut core::ffi::c_void, category: ContactFieldCategory, service: *mut core::ffi::c_void, displaytext: *mut core::ffi::c_void, verb: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IContactInstantMessageFieldFactory_Impl::CreateInstantMessage_All(this, core::mem::transmute(&username), category, core::mem::transmute(&service), core::mem::transmute(&displaytext), windows_core::from_raw_borrowed(&verb)) { + match IContactInstantMessageFieldFactory_Impl::CreateInstantMessage_All(this, core::mem::transmute(&username), category, core::mem::transmute(&service), core::mem::transmute(&displaytext), core::mem::transmute_copy(&verb)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Core/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Core/mod.rs index cb3b191cf3..5a6636b2ab 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Core/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Core/mod.rs @@ -630,14 +630,14 @@ impl windows_core::RuntimeName for ICoreApplicationUnhandledError { const NAME: &'static str = "Windows.ApplicationModel.Core.ICoreApplicationUnhandledError"; } pub trait ICoreApplicationUnhandledError_Impl: windows_core::IUnknownImpl { - fn UnhandledErrorDetected(&self, handler: Option<&super::super::Foundation::EventHandler>) -> windows_core::Result; + fn UnhandledErrorDetected(&self, handler: windows_core::Ref<'_, super::super::Foundation::EventHandler>) -> windows_core::Result; fn RemoveUnhandledErrorDetected(&self, token: i64) -> windows_core::Result<()>; } impl ICoreApplicationUnhandledError_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UnhandledErrorDetected(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreApplicationUnhandledError_Impl::UnhandledErrorDetected(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreApplicationUnhandledError_Impl::UnhandledErrorDetected(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -832,8 +832,8 @@ impl windows_core::RuntimeName for IFrameworkView { } #[cfg(feature = "UI_Core")] pub trait IFrameworkView_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, applicationView: Option<&CoreApplicationView>) -> windows_core::Result<()>; - fn SetWindow(&self, window: Option<&super::super::UI::Core::CoreWindow>) -> windows_core::Result<()>; + fn Initialize(&self, applicationView: windows_core::Ref<'_, CoreApplicationView>) -> windows_core::Result<()>; + fn SetWindow(&self, window: windows_core::Ref<'_, super::super::UI::Core::CoreWindow>) -> windows_core::Result<()>; fn Load(&self, entryPoint: &windows_core::HSTRING) -> windows_core::Result<()>; fn Run(&self) -> windows_core::Result<()>; fn Uninitialize(&self) -> windows_core::Result<()>; @@ -843,11 +843,11 @@ impl IFrameworkView_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, applicationview: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFrameworkView_Impl::Initialize(this, windows_core::from_raw_borrowed(&applicationview)).into() + IFrameworkView_Impl::Initialize(this, core::mem::transmute_copy(&applicationview)).into() } unsafe extern "system" fn SetWindow(this: *mut core::ffi::c_void, window: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFrameworkView_Impl::SetWindow(this, windows_core::from_raw_borrowed(&window)).into() + IFrameworkView_Impl::SetWindow(this, core::mem::transmute_copy(&window)).into() } unsafe extern "system" fn Load(this: *mut core::ffi::c_void, entrypoint: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/mod.rs index 354328ecb5..5238c71265 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/mod.rs @@ -481,16 +481,16 @@ impl windows_core::RuntimeName for ICoreDropOperationTarget { const NAME: &'static str = "Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDropOperationTarget"; } pub trait ICoreDropOperationTarget_Impl: windows_core::IUnknownImpl { - fn EnterAsync(&self, dragInfo: Option<&CoreDragInfo>, dragUIOverride: Option<&CoreDragUIOverride>) -> windows_core::Result>; - fn OverAsync(&self, dragInfo: Option<&CoreDragInfo>, dragUIOverride: Option<&CoreDragUIOverride>) -> windows_core::Result>; - fn LeaveAsync(&self, dragInfo: Option<&CoreDragInfo>) -> windows_core::Result; - fn DropAsync(&self, dragInfo: Option<&CoreDragInfo>) -> windows_core::Result>; + fn EnterAsync(&self, dragInfo: windows_core::Ref<'_, CoreDragInfo>, dragUIOverride: windows_core::Ref<'_, CoreDragUIOverride>) -> windows_core::Result>; + fn OverAsync(&self, dragInfo: windows_core::Ref<'_, CoreDragInfo>, dragUIOverride: windows_core::Ref<'_, CoreDragUIOverride>) -> windows_core::Result>; + fn LeaveAsync(&self, dragInfo: windows_core::Ref<'_, CoreDragInfo>) -> windows_core::Result; + fn DropAsync(&self, dragInfo: windows_core::Ref<'_, CoreDragInfo>) -> windows_core::Result>; } impl ICoreDropOperationTarget_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EnterAsync(this: *mut core::ffi::c_void, draginfo: *mut core::ffi::c_void, draguioverride: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreDropOperationTarget_Impl::EnterAsync(this, windows_core::from_raw_borrowed(&draginfo), windows_core::from_raw_borrowed(&draguioverride)) { + match ICoreDropOperationTarget_Impl::EnterAsync(this, core::mem::transmute_copy(&draginfo), core::mem::transmute_copy(&draguioverride)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -501,7 +501,7 @@ impl ICoreDropOperationTarget_Vtbl { } unsafe extern "system" fn OverAsync(this: *mut core::ffi::c_void, draginfo: *mut core::ffi::c_void, draguioverride: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreDropOperationTarget_Impl::OverAsync(this, windows_core::from_raw_borrowed(&draginfo), windows_core::from_raw_borrowed(&draguioverride)) { + match ICoreDropOperationTarget_Impl::OverAsync(this, core::mem::transmute_copy(&draginfo), core::mem::transmute_copy(&draguioverride)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -512,7 +512,7 @@ impl ICoreDropOperationTarget_Vtbl { } unsafe extern "system" fn LeaveAsync(this: *mut core::ffi::c_void, draginfo: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreDropOperationTarget_Impl::LeaveAsync(this, windows_core::from_raw_borrowed(&draginfo)) { + match ICoreDropOperationTarget_Impl::LeaveAsync(this, core::mem::transmute_copy(&draginfo)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -523,7 +523,7 @@ impl ICoreDropOperationTarget_Vtbl { } unsafe extern "system" fn DropAsync(this: *mut core::ffi::c_void, draginfo: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreDropOperationTarget_Impl::DropAsync(this, windows_core::from_raw_borrowed(&draginfo)) { + match ICoreDropOperationTarget_Impl::DropAsync(this, core::mem::transmute_copy(&draginfo)) { Ok(ok__) => { result__.write(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 debdf90932..478060ff8a 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs @@ -1158,7 +1158,7 @@ impl windows_core::RuntimeType for DataProviderHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl DataProviderHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = DataProviderHandlerBox { vtable: &DataProviderHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1176,12 +1176,12 @@ pub struct DataProviderHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, request: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct DataProviderHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct DataProviderHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const DataProviderHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> DataProviderHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> DataProviderHandlerBox { const VTABLE: DataProviderHandler_Vtbl = DataProviderHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -1210,7 +1210,7 @@ impl) -> windows_core::Result<()> + Send + } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, request: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&request)).into() + (this.invoke)(core::mem::transmute_copy(&request)).into() } } #[repr(transparent)] @@ -2272,7 +2272,7 @@ impl windows_core::RuntimeType for ShareProviderHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl ShareProviderHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = ShareProviderHandlerBox { vtable: &ShareProviderHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -2290,12 +2290,12 @@ pub struct ShareProviderHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, operation: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct ShareProviderHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct ShareProviderHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const ShareProviderHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> ShareProviderHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> ShareProviderHandlerBox { const VTABLE: ShareProviderHandler_Vtbl = ShareProviderHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -2324,7 +2324,7 @@ impl) -> windows_core::Result<()> + Sen } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, operation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&operation)).into() + (this.invoke)(core::mem::transmute_copy(&operation)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs index 649c6e87e6..aad4209c07 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs @@ -1429,7 +1429,7 @@ impl windows_core::RuntimeType for PaymentRequestChangedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl PaymentRequestChangedHandler { - pub fn new, Option<&PaymentRequestChangedArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, PaymentRequestChangedArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = PaymentRequestChangedHandlerBox { vtable: &PaymentRequestChangedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1448,12 +1448,12 @@ pub struct PaymentRequestChangedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, paymentrequest: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct PaymentRequestChangedHandlerBox, Option<&PaymentRequestChangedArgs>) -> windows_core::Result<()> + Send + 'static> { +struct PaymentRequestChangedHandlerBox, windows_core::Ref<'_, PaymentRequestChangedArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const PaymentRequestChangedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&PaymentRequestChangedArgs>) -> windows_core::Result<()> + Send + 'static> PaymentRequestChangedHandlerBox { +impl, windows_core::Ref<'_, PaymentRequestChangedArgs>) -> windows_core::Result<()> + Send + 'static> PaymentRequestChangedHandlerBox { const VTABLE: PaymentRequestChangedHandler_Vtbl = PaymentRequestChangedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -1482,7 +1482,7 @@ impl, Option<&PaymentRequestChangedArgs>) -> wi } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, paymentrequest: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&paymentrequest), windows_core::from_raw_borrowed(&args)).into() + (this.invoke)(core::mem::transmute_copy(&paymentrequest), core::mem::transmute_copy(&args)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/mod.rs index a5e480fa5d..caabc18e9e 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/mod.rs @@ -1325,13 +1325,13 @@ impl windows_core::RuntimeName for IPackageCatalogStatics2 { const NAME: &'static str = "Windows.ApplicationModel.IPackageCatalogStatics2"; } pub trait IPackageCatalogStatics2_Impl: windows_core::IUnknownImpl { - fn OpenForPackage(&self, package: Option<&Package>) -> windows_core::Result; + fn OpenForPackage(&self, package: windows_core::Ref<'_, Package>) -> windows_core::Result; } impl IPackageCatalogStatics2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OpenForPackage(this: *mut core::ffi::c_void, package: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPackageCatalogStatics2_Impl::OpenForPackage(this, windows_core::from_raw_borrowed(&package)) { + match IPackageCatalogStatics2_Impl::OpenForPackage(this, core::mem::transmute_copy(&package)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Data/Text/mod.rs b/crates/libs/windows/src/Windows/Data/Text/mod.rs index e2df145e96..10f2fba84e 100644 --- a/crates/libs/windows/src/Windows/Data/Text/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Text/mod.rs @@ -353,7 +353,7 @@ impl windows_core::RuntimeType for SelectableWordSegmentsTokenizingHandler { } #[cfg(feature = "Foundation_Collections")] impl SelectableWordSegmentsTokenizingHandler { - pub fn new>, Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>, windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = SelectableWordSegmentsTokenizingHandlerBox { vtable: &SelectableWordSegmentsTokenizingHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -374,13 +374,13 @@ pub struct SelectableWordSegmentsTokenizingHandler_Vtbl { } #[cfg(feature = "Foundation_Collections")] #[repr(C)] -struct SelectableWordSegmentsTokenizingHandlerBox>, Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static> { +struct SelectableWordSegmentsTokenizingHandlerBox>, windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static> { vtable: *const SelectableWordSegmentsTokenizingHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "Foundation_Collections")] -impl>, Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static> SelectableWordSegmentsTokenizingHandlerBox { +impl>, windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static> SelectableWordSegmentsTokenizingHandlerBox { const VTABLE: SelectableWordSegmentsTokenizingHandler_Vtbl = SelectableWordSegmentsTokenizingHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -409,7 +409,7 @@ impl windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&precedingwords), windows_core::from_raw_borrowed(&words)).into() + (this.invoke)(core::mem::transmute_copy(&precedingwords), core::mem::transmute_copy(&words)).into() } } #[repr(transparent)] @@ -1032,7 +1032,7 @@ impl windows_core::RuntimeType for WordSegmentsTokenizingHandler { } #[cfg(feature = "Foundation_Collections")] impl WordSegmentsTokenizingHandler { - pub fn new>, Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>, windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = WordSegmentsTokenizingHandlerBox { vtable: &WordSegmentsTokenizingHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1053,13 +1053,13 @@ pub struct WordSegmentsTokenizingHandler_Vtbl { } #[cfg(feature = "Foundation_Collections")] #[repr(C)] -struct WordSegmentsTokenizingHandlerBox>, Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static> { +struct WordSegmentsTokenizingHandlerBox>, windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static> { vtable: *const WordSegmentsTokenizingHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "Foundation_Collections")] -impl>, Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static> WordSegmentsTokenizingHandlerBox { +impl>, windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result<()> + Send + 'static> WordSegmentsTokenizingHandlerBox { const VTABLE: WordSegmentsTokenizingHandler_Vtbl = WordSegmentsTokenizingHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -1088,7 +1088,7 @@ impl windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&precedingwords), windows_core::from_raw_borrowed(&words)).into() + (this.invoke)(core::mem::transmute_copy(&precedingwords), core::mem::transmute_copy(&words)).into() } } #[repr(transparent)] 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 90c6ab93a8..57823e6d18 100644 --- a/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs @@ -1373,7 +1373,7 @@ impl windows_core::RuntimeName for IXmlNode { #[cfg(feature = "Foundation_Collections")] pub trait IXmlNode_Impl: IXmlNodeSelector_Impl + IXmlNodeSerializer_Impl { fn NodeValue(&self) -> windows_core::Result; - fn SetNodeValue(&self, value: Option<&windows_core::IInspectable>) -> windows_core::Result<()>; + fn SetNodeValue(&self, value: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result<()>; fn NodeType(&self) -> windows_core::Result; fn NodeName(&self) -> windows_core::Result; fn ParentNode(&self) -> windows_core::Result; @@ -1385,16 +1385,16 @@ pub trait IXmlNode_Impl: IXmlNodeSelector_Impl + IXmlNodeSerializer_Impl { fn Attributes(&self) -> windows_core::Result; fn HasChildNodes(&self) -> windows_core::Result; fn OwnerDocument(&self) -> windows_core::Result; - fn InsertBefore(&self, newChild: Option<&IXmlNode>, referenceChild: Option<&IXmlNode>) -> windows_core::Result; - fn ReplaceChild(&self, newChild: Option<&IXmlNode>, referenceChild: Option<&IXmlNode>) -> windows_core::Result; - fn RemoveChild(&self, childNode: Option<&IXmlNode>) -> windows_core::Result; - fn AppendChild(&self, newChild: Option<&IXmlNode>) -> windows_core::Result; + fn InsertBefore(&self, newChild: windows_core::Ref<'_, IXmlNode>, referenceChild: windows_core::Ref<'_, IXmlNode>) -> windows_core::Result; + fn ReplaceChild(&self, newChild: windows_core::Ref<'_, IXmlNode>, referenceChild: windows_core::Ref<'_, IXmlNode>) -> windows_core::Result; + fn RemoveChild(&self, childNode: windows_core::Ref<'_, IXmlNode>) -> windows_core::Result; + fn AppendChild(&self, newChild: windows_core::Ref<'_, IXmlNode>) -> windows_core::Result; fn CloneNode(&self, deep: bool) -> windows_core::Result; fn NamespaceUri(&self) -> windows_core::Result; fn LocalName(&self) -> windows_core::Result; fn Prefix(&self) -> windows_core::Result; fn Normalize(&self) -> windows_core::Result<()>; - fn SetPrefix(&self, value: Option<&windows_core::IInspectable>) -> windows_core::Result<()>; + fn SetPrefix(&self, value: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result<()>; } #[cfg(feature = "Foundation_Collections")] impl IXmlNode_Vtbl { @@ -1412,7 +1412,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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlNode_Impl::SetNodeValue(this, windows_core::from_raw_borrowed(&value)).into() + IXmlNode_Impl::SetNodeValue(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn NodeType(this: *mut core::ffi::c_void, result__: *mut NodeType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1535,7 +1535,7 @@ impl IXmlNode_Vtbl { } unsafe extern "system" fn InsertBefore(this: *mut core::ffi::c_void, newchild: *mut core::ffi::c_void, referencechild: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXmlNode_Impl::InsertBefore(this, windows_core::from_raw_borrowed(&newchild), windows_core::from_raw_borrowed(&referencechild)) { + match IXmlNode_Impl::InsertBefore(this, core::mem::transmute_copy(&newchild), core::mem::transmute_copy(&referencechild)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1546,7 +1546,7 @@ impl IXmlNode_Vtbl { } unsafe extern "system" fn ReplaceChild(this: *mut core::ffi::c_void, newchild: *mut core::ffi::c_void, referencechild: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXmlNode_Impl::ReplaceChild(this, windows_core::from_raw_borrowed(&newchild), windows_core::from_raw_borrowed(&referencechild)) { + match IXmlNode_Impl::ReplaceChild(this, core::mem::transmute_copy(&newchild), core::mem::transmute_copy(&referencechild)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1557,7 +1557,7 @@ impl IXmlNode_Vtbl { } unsafe extern "system" fn RemoveChild(this: *mut core::ffi::c_void, childnode: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXmlNode_Impl::RemoveChild(this, windows_core::from_raw_borrowed(&childnode)) { + match IXmlNode_Impl::RemoveChild(this, core::mem::transmute_copy(&childnode)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1568,7 +1568,7 @@ impl IXmlNode_Vtbl { } unsafe extern "system" fn AppendChild(this: *mut core::ffi::c_void, newchild: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXmlNode_Impl::AppendChild(this, windows_core::from_raw_borrowed(&newchild)) { + match IXmlNode_Impl::AppendChild(this, core::mem::transmute_copy(&newchild)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1627,7 +1627,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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlNode_Impl::SetPrefix(this, windows_core::from_raw_borrowed(&value)).into() + IXmlNode_Impl::SetPrefix(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -1757,8 +1757,8 @@ impl windows_core::RuntimeName for IXmlNodeSelector { pub trait IXmlNodeSelector_Impl: windows_core::IUnknownImpl { fn SelectSingleNode(&self, xpath: &windows_core::HSTRING) -> windows_core::Result; fn SelectNodes(&self, xpath: &windows_core::HSTRING) -> windows_core::Result; - fn SelectSingleNodeNS(&self, xpath: &windows_core::HSTRING, namespaces: Option<&windows_core::IInspectable>) -> windows_core::Result; - fn SelectNodesNS(&self, xpath: &windows_core::HSTRING, namespaces: Option<&windows_core::IInspectable>) -> windows_core::Result; + fn SelectSingleNodeNS(&self, xpath: &windows_core::HSTRING, namespaces: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result; + fn SelectNodesNS(&self, xpath: &windows_core::HSTRING, namespaces: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result; } #[cfg(feature = "Foundation_Collections")] impl IXmlNodeSelector_Vtbl { @@ -1787,7 +1787,7 @@ impl IXmlNodeSelector_Vtbl { } unsafe extern "system" fn SelectSingleNodeNS(this: *mut core::ffi::c_void, xpath: *mut core::ffi::c_void, namespaces: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXmlNodeSelector_Impl::SelectSingleNodeNS(this, core::mem::transmute(&xpath), windows_core::from_raw_borrowed(&namespaces)) { + match IXmlNodeSelector_Impl::SelectSingleNodeNS(this, core::mem::transmute(&xpath), core::mem::transmute_copy(&namespaces)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1798,7 +1798,7 @@ impl IXmlNodeSelector_Vtbl { } unsafe extern "system" fn SelectNodesNS(this: *mut core::ffi::c_void, xpath: *mut core::ffi::c_void, namespaces: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXmlNodeSelector_Impl::SelectNodesNS(this, core::mem::transmute(&xpath), windows_core::from_raw_borrowed(&namespaces)) { + match IXmlNodeSelector_Impl::SelectNodesNS(this, core::mem::transmute(&xpath), core::mem::transmute_copy(&namespaces)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Devices/Gpio/Provider/mod.rs b/crates/libs/windows/src/Windows/Devices/Gpio/Provider/mod.rs index 76e3876f89..09831ced5f 100644 --- a/crates/libs/windows/src/Windows/Devices/Gpio/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Gpio/Provider/mod.rs @@ -179,7 +179,7 @@ impl windows_core::RuntimeName for IGpioPinProvider { const NAME: &'static str = "Windows.Devices.Gpio.Provider.IGpioPinProvider"; } pub trait IGpioPinProvider_Impl: windows_core::IUnknownImpl { - fn ValueChanged(&self, handler: Option<&super::super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn ValueChanged(&self, handler: windows_core::Ref<'_, super::super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveValueChanged(&self, token: i64) -> windows_core::Result<()>; fn DebounceTimeout(&self) -> windows_core::Result; fn SetDebounceTimeout(&self, value: &super::super::super::Foundation::TimeSpan) -> windows_core::Result<()>; @@ -195,7 +195,7 @@ impl IGpioPinProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ValueChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGpioPinProvider_Impl::ValueChanged(this, windows_core::from_raw_borrowed(&handler)) { + match IGpioPinProvider_Impl::ValueChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) 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 5c702a7344..b57d90d912 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs @@ -19,13 +19,13 @@ impl windows_core::RuntimeName for II2cControllerProvider { const NAME: &'static str = "Windows.Devices.I2c.Provider.II2cControllerProvider"; } pub trait II2cControllerProvider_Impl: windows_core::IUnknownImpl { - fn GetDeviceProvider(&self, settings: Option<&ProviderI2cConnectionSettings>) -> windows_core::Result; + fn GetDeviceProvider(&self, settings: windows_core::Ref<'_, ProviderI2cConnectionSettings>) -> windows_core::Result; } impl II2cControllerProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetDeviceProvider(this: *mut core::ffi::c_void, settings: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match II2cControllerProvider_Impl::GetDeviceProvider(this, windows_core::from_raw_borrowed(&settings)) { + match II2cControllerProvider_Impl::GetDeviceProvider(this, core::mem::transmute_copy(&settings)) { Ok(ok__) => { result__.write(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 3dd5638e82..b37535c378 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/mod.rs @@ -356,7 +356,7 @@ impl windows_core::RuntimeName for II2cDeviceStatics { pub trait II2cDeviceStatics_Impl: windows_core::IUnknownImpl { fn GetDeviceSelector(&self) -> windows_core::Result; fn GetDeviceSelectorFromFriendlyName(&self, friendlyName: &windows_core::HSTRING) -> windows_core::Result; - fn FromIdAsync(&self, deviceId: &windows_core::HSTRING, settings: Option<&I2cConnectionSettings>) -> windows_core::Result>; + fn FromIdAsync(&self, deviceId: &windows_core::HSTRING, settings: windows_core::Ref<'_, I2cConnectionSettings>) -> windows_core::Result>; } impl II2cDeviceStatics_Vtbl { pub const fn new() -> Self { @@ -384,7 +384,7 @@ impl II2cDeviceStatics_Vtbl { } unsafe extern "system" fn FromIdAsync(this: *mut core::ffi::c_void, deviceid: *mut core::ffi::c_void, settings: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match II2cDeviceStatics_Impl::FromIdAsync(this, core::mem::transmute(&deviceid), windows_core::from_raw_borrowed(&settings)) { + match II2cDeviceStatics_Impl::FromIdAsync(this, core::mem::transmute(&deviceid), core::mem::transmute_copy(&settings)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Devices/Midi/mod.rs b/crates/libs/windows/src/Windows/Devices/Midi/mod.rs index 3ac21d7790..68e1def217 100644 --- a/crates/libs/windows/src/Windows/Devices/Midi/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Midi/mod.rs @@ -241,8 +241,8 @@ impl windows_core::RuntimeName for IMidiOutPort { } #[cfg(feature = "Storage_Streams")] pub trait IMidiOutPort_Impl: super::super::Foundation::IClosable_Impl { - fn SendMessage(&self, midiMessage: Option<&IMidiMessage>) -> windows_core::Result<()>; - fn SendBuffer(&self, midiData: Option<&super::super::Storage::Streams::IBuffer>) -> windows_core::Result<()>; + fn SendMessage(&self, midiMessage: windows_core::Ref<'_, IMidiMessage>) -> windows_core::Result<()>; + fn SendBuffer(&self, midiData: windows_core::Ref<'_, super::super::Storage::Streams::IBuffer>) -> windows_core::Result<()>; fn DeviceId(&self) -> windows_core::Result; } #[cfg(feature = "Storage_Streams")] @@ -250,11 +250,11 @@ impl IMidiOutPort_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SendMessage(this: *mut core::ffi::c_void, midimessage: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMidiOutPort_Impl::SendMessage(this, windows_core::from_raw_borrowed(&midimessage)).into() + IMidiOutPort_Impl::SendMessage(this, core::mem::transmute_copy(&midimessage)).into() } unsafe extern "system" fn SendBuffer(this: *mut core::ffi::c_void, mididata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMidiOutPort_Impl::SendBuffer(this, windows_core::from_raw_borrowed(&mididata)).into() + IMidiOutPort_Impl::SendBuffer(this, core::mem::transmute_copy(&mididata)).into() } unsafe extern "system" fn DeviceId(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs b/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs index cc7c77e75f..4fe7e3c4bb 100644 --- a/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs @@ -5900,18 +5900,18 @@ pub trait IReceiptOrSlipJob_Impl: IPosPrinterJob_Impl { fn SetBarcodeRotation(&self, value: PosPrinterRotation) -> windows_core::Result<()>; fn SetPrintRotation(&self, value: PosPrinterRotation, includeBitmaps: bool) -> windows_core::Result<()>; fn SetPrintArea(&self, value: &super::super::Foundation::Rect) -> windows_core::Result<()>; - fn SetBitmap(&self, bitmapNumber: u32, bitmap: Option<&super::super::Graphics::Imaging::BitmapFrame>, alignment: PosPrinterAlignment) -> windows_core::Result<()>; - fn SetBitmapCustomWidthStandardAlign(&self, bitmapNumber: u32, bitmap: Option<&super::super::Graphics::Imaging::BitmapFrame>, alignment: PosPrinterAlignment, width: u32) -> windows_core::Result<()>; - fn SetCustomAlignedBitmap(&self, bitmapNumber: u32, bitmap: Option<&super::super::Graphics::Imaging::BitmapFrame>, alignmentDistance: u32) -> windows_core::Result<()>; - fn SetBitmapCustomWidthCustomAlign(&self, bitmapNumber: u32, bitmap: Option<&super::super::Graphics::Imaging::BitmapFrame>, alignmentDistance: u32, width: u32) -> windows_core::Result<()>; + fn SetBitmap(&self, bitmapNumber: u32, bitmap: windows_core::Ref<'_, super::super::Graphics::Imaging::BitmapFrame>, alignment: PosPrinterAlignment) -> windows_core::Result<()>; + fn SetBitmapCustomWidthStandardAlign(&self, bitmapNumber: u32, bitmap: windows_core::Ref<'_, super::super::Graphics::Imaging::BitmapFrame>, alignment: PosPrinterAlignment, width: u32) -> windows_core::Result<()>; + fn SetCustomAlignedBitmap(&self, bitmapNumber: u32, bitmap: windows_core::Ref<'_, super::super::Graphics::Imaging::BitmapFrame>, alignmentDistance: u32) -> windows_core::Result<()>; + fn SetBitmapCustomWidthCustomAlign(&self, bitmapNumber: u32, bitmap: windows_core::Ref<'_, super::super::Graphics::Imaging::BitmapFrame>, alignmentDistance: u32, width: u32) -> windows_core::Result<()>; fn PrintSavedBitmap(&self, bitmapNumber: u32) -> windows_core::Result<()>; fn DrawRuledLine(&self, positionList: &windows_core::HSTRING, lineDirection: PosPrinterLineDirection, lineWidth: u32, lineStyle: PosPrinterLineStyle, lineColor: u32) -> windows_core::Result<()>; fn PrintBarcode(&self, data: &windows_core::HSTRING, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> windows_core::Result<()>; fn PrintBarcodeCustomAlign(&self, data: &windows_core::HSTRING, symbology: u32, height: u32, width: u32, textPosition: PosPrinterBarcodeTextPosition, alignmentDistance: u32) -> windows_core::Result<()>; - fn PrintBitmap(&self, bitmap: Option<&super::super::Graphics::Imaging::BitmapFrame>, alignment: PosPrinterAlignment) -> windows_core::Result<()>; - fn PrintBitmapCustomWidthStandardAlign(&self, bitmap: Option<&super::super::Graphics::Imaging::BitmapFrame>, alignment: PosPrinterAlignment, width: u32) -> windows_core::Result<()>; - fn PrintCustomAlignedBitmap(&self, bitmap: Option<&super::super::Graphics::Imaging::BitmapFrame>, alignmentDistance: u32) -> windows_core::Result<()>; - fn PrintBitmapCustomWidthCustomAlign(&self, bitmap: Option<&super::super::Graphics::Imaging::BitmapFrame>, alignmentDistance: u32, width: u32) -> windows_core::Result<()>; + fn PrintBitmap(&self, bitmap: windows_core::Ref<'_, super::super::Graphics::Imaging::BitmapFrame>, alignment: PosPrinterAlignment) -> windows_core::Result<()>; + fn PrintBitmapCustomWidthStandardAlign(&self, bitmap: windows_core::Ref<'_, super::super::Graphics::Imaging::BitmapFrame>, alignment: PosPrinterAlignment, width: u32) -> windows_core::Result<()>; + fn PrintCustomAlignedBitmap(&self, bitmap: windows_core::Ref<'_, super::super::Graphics::Imaging::BitmapFrame>, alignmentDistance: u32) -> windows_core::Result<()>; + fn PrintBitmapCustomWidthCustomAlign(&self, bitmap: windows_core::Ref<'_, super::super::Graphics::Imaging::BitmapFrame>, alignmentDistance: u32, width: u32) -> windows_core::Result<()>; } #[cfg(feature = "Graphics_Imaging")] impl IReceiptOrSlipJob_Vtbl { @@ -5930,19 +5930,19 @@ impl IReceiptOrSlipJob_Vtbl { } unsafe extern "system" fn SetBitmap(this: *mut core::ffi::c_void, bitmapnumber: u32, bitmap: *mut core::ffi::c_void, alignment: PosPrinterAlignment) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReceiptOrSlipJob_Impl::SetBitmap(this, bitmapnumber, windows_core::from_raw_borrowed(&bitmap), alignment).into() + IReceiptOrSlipJob_Impl::SetBitmap(this, bitmapnumber, core::mem::transmute_copy(&bitmap), alignment).into() } unsafe extern "system" fn SetBitmapCustomWidthStandardAlign(this: *mut core::ffi::c_void, bitmapnumber: u32, bitmap: *mut core::ffi::c_void, alignment: PosPrinterAlignment, width: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReceiptOrSlipJob_Impl::SetBitmapCustomWidthStandardAlign(this, bitmapnumber, windows_core::from_raw_borrowed(&bitmap), alignment, width).into() + IReceiptOrSlipJob_Impl::SetBitmapCustomWidthStandardAlign(this, bitmapnumber, core::mem::transmute_copy(&bitmap), alignment, width).into() } unsafe extern "system" fn SetCustomAlignedBitmap(this: *mut core::ffi::c_void, bitmapnumber: u32, bitmap: *mut core::ffi::c_void, alignmentdistance: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReceiptOrSlipJob_Impl::SetCustomAlignedBitmap(this, bitmapnumber, windows_core::from_raw_borrowed(&bitmap), alignmentdistance).into() + IReceiptOrSlipJob_Impl::SetCustomAlignedBitmap(this, bitmapnumber, core::mem::transmute_copy(&bitmap), alignmentdistance).into() } unsafe extern "system" fn SetBitmapCustomWidthCustomAlign(this: *mut core::ffi::c_void, bitmapnumber: u32, bitmap: *mut core::ffi::c_void, alignmentdistance: u32, width: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReceiptOrSlipJob_Impl::SetBitmapCustomWidthCustomAlign(this, bitmapnumber, windows_core::from_raw_borrowed(&bitmap), alignmentdistance, width).into() + IReceiptOrSlipJob_Impl::SetBitmapCustomWidthCustomAlign(this, bitmapnumber, core::mem::transmute_copy(&bitmap), alignmentdistance, width).into() } unsafe extern "system" fn PrintSavedBitmap(this: *mut core::ffi::c_void, bitmapnumber: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5962,19 +5962,19 @@ impl IReceiptOrSlipJob_Vtbl { } unsafe extern "system" fn PrintBitmap(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void, alignment: PosPrinterAlignment) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReceiptOrSlipJob_Impl::PrintBitmap(this, windows_core::from_raw_borrowed(&bitmap), alignment).into() + IReceiptOrSlipJob_Impl::PrintBitmap(this, core::mem::transmute_copy(&bitmap), alignment).into() } unsafe extern "system" fn PrintBitmapCustomWidthStandardAlign(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void, alignment: PosPrinterAlignment, width: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReceiptOrSlipJob_Impl::PrintBitmapCustomWidthStandardAlign(this, windows_core::from_raw_borrowed(&bitmap), alignment, width).into() + IReceiptOrSlipJob_Impl::PrintBitmapCustomWidthStandardAlign(this, core::mem::transmute_copy(&bitmap), alignment, width).into() } unsafe extern "system" fn PrintCustomAlignedBitmap(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void, alignmentdistance: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReceiptOrSlipJob_Impl::PrintCustomAlignedBitmap(this, windows_core::from_raw_borrowed(&bitmap), alignmentdistance).into() + IReceiptOrSlipJob_Impl::PrintCustomAlignedBitmap(this, core::mem::transmute_copy(&bitmap), alignmentdistance).into() } unsafe extern "system" fn PrintBitmapCustomWidthCustomAlign(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void, alignmentdistance: u32, width: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReceiptOrSlipJob_Impl::PrintBitmapCustomWidthCustomAlign(this, windows_core::from_raw_borrowed(&bitmap), alignmentdistance, width).into() + IReceiptOrSlipJob_Impl::PrintBitmapCustomWidthCustomAlign(this, core::mem::transmute_copy(&bitmap), alignmentdistance, width).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs b/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs index 81f9ba9ed2..a61d73a83b 100644 --- a/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Sensors/mod.rs @@ -3260,8 +3260,8 @@ impl windows_core::RuntimeName for IHumanPresenceSensorExtension { pub trait IHumanPresenceSensorExtension_Impl: windows_core::IUnknownImpl { fn Initialize(&self, deviceInterface: &windows_core::HSTRING) -> windows_core::Result<()>; fn Start(&self) -> windows_core::Result<()>; - fn ProcessReading(&self, reading: Option<&HumanPresenceSensorReading>) -> windows_core::Result; - fn ProcessReadingTimeoutExpired(&self, reading: Option<&HumanPresenceSensorReading>) -> windows_core::Result<()>; + fn ProcessReading(&self, reading: windows_core::Ref<'_, HumanPresenceSensorReading>) -> windows_core::Result; + fn ProcessReadingTimeoutExpired(&self, reading: windows_core::Ref<'_, HumanPresenceSensorReading>) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; fn Uninitialize(&self) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; @@ -3278,7 +3278,7 @@ impl IHumanPresenceSensorExtension_Vtbl { } unsafe extern "system" fn ProcessReading(this: *mut core::ffi::c_void, reading: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHumanPresenceSensorExtension_Impl::ProcessReading(this, windows_core::from_raw_borrowed(&reading)) { + match IHumanPresenceSensorExtension_Impl::ProcessReading(this, core::mem::transmute_copy(&reading)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -3289,7 +3289,7 @@ impl IHumanPresenceSensorExtension_Vtbl { } unsafe extern "system" fn ProcessReadingTimeoutExpired(this: *mut core::ffi::c_void, reading: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHumanPresenceSensorExtension_Impl::ProcessReadingTimeoutExpired(this, windows_core::from_raw_borrowed(&reading)).into() + IHumanPresenceSensorExtension_Impl::ProcessReadingTimeoutExpired(this, core::mem::transmute_copy(&reading)).into() } unsafe extern "system" fn Stop(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs b/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs index b7ef82a2b3..e241bde3b6 100644 --- a/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs @@ -2894,7 +2894,7 @@ impl windows_core::RuntimeType for SmartCardPinResetHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl SmartCardPinResetHandler { - pub fn new, Option<&SmartCardPinResetRequest>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, SmartCardPinResetRequest>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = SmartCardPinResetHandlerBox { vtable: &SmartCardPinResetHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -2913,12 +2913,12 @@ pub struct SmartCardPinResetHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, request: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct SmartCardPinResetHandlerBox, Option<&SmartCardPinResetRequest>) -> windows_core::Result<()> + Send + 'static> { +struct SmartCardPinResetHandlerBox, windows_core::Ref<'_, SmartCardPinResetRequest>) -> windows_core::Result<()> + Send + 'static> { vtable: *const SmartCardPinResetHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&SmartCardPinResetRequest>) -> windows_core::Result<()> + Send + 'static> SmartCardPinResetHandlerBox { +impl, windows_core::Ref<'_, SmartCardPinResetRequest>) -> windows_core::Result<()> + Send + 'static> SmartCardPinResetHandlerBox { const VTABLE: SmartCardPinResetHandler_Vtbl = SmartCardPinResetHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -2947,7 +2947,7 @@ impl, Option<&SmartCardPinResetRequest>) } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, request: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&request)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&request)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs index 7dd86d119e..b7dbf58e73 100644 --- a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs @@ -311,15 +311,15 @@ impl windows_core::RuntimeName for ISmsDevice { } #[cfg(feature = "deprecated")] pub trait ISmsDevice_Impl: windows_core::IUnknownImpl { - fn SendMessageAsync(&self, message: Option<&ISmsMessage>) -> windows_core::Result; - fn CalculateLength(&self, message: Option<&SmsTextMessage>) -> windows_core::Result; + fn SendMessageAsync(&self, message: windows_core::Ref<'_, ISmsMessage>) -> windows_core::Result; + fn CalculateLength(&self, message: windows_core::Ref<'_, SmsTextMessage>) -> windows_core::Result; fn AccountPhoneNumber(&self) -> windows_core::Result; fn CellularClass(&self) -> windows_core::Result; fn MessageStore(&self) -> windows_core::Result; fn DeviceStatus(&self) -> windows_core::Result; - fn SmsMessageReceived(&self, eventHandler: Option<&SmsMessageReceivedEventHandler>) -> windows_core::Result; + fn SmsMessageReceived(&self, eventHandler: windows_core::Ref<'_, SmsMessageReceivedEventHandler>) -> windows_core::Result; fn RemoveSmsMessageReceived(&self, eventCookie: i64) -> windows_core::Result<()>; - fn SmsDeviceStatusChanged(&self, eventHandler: Option<&SmsDeviceStatusChangedEventHandler>) -> windows_core::Result; + fn SmsDeviceStatusChanged(&self, eventHandler: windows_core::Ref<'_, SmsDeviceStatusChangedEventHandler>) -> windows_core::Result; fn RemoveSmsDeviceStatusChanged(&self, eventCookie: i64) -> windows_core::Result<()>; } #[cfg(feature = "deprecated")] @@ -327,7 +327,7 @@ impl ISmsDevice_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SendMessageAsync(this: *mut core::ffi::c_void, message: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISmsDevice_Impl::SendMessageAsync(this, windows_core::from_raw_borrowed(&message)) { + match ISmsDevice_Impl::SendMessageAsync(this, core::mem::transmute_copy(&message)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -338,7 +338,7 @@ impl ISmsDevice_Vtbl { } unsafe extern "system" fn CalculateLength(this: *mut core::ffi::c_void, message: *mut core::ffi::c_void, result__: *mut SmsEncodedLength) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISmsDevice_Impl::CalculateLength(this, windows_core::from_raw_borrowed(&message)) { + match ISmsDevice_Impl::CalculateLength(this, core::mem::transmute_copy(&message)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -390,7 +390,7 @@ impl ISmsDevice_Vtbl { } unsafe extern "system" fn SmsMessageReceived(this: *mut core::ffi::c_void, eventhandler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISmsDevice_Impl::SmsMessageReceived(this, windows_core::from_raw_borrowed(&eventhandler)) { + match ISmsDevice_Impl::SmsMessageReceived(this, core::mem::transmute_copy(&eventhandler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -404,7 +404,7 @@ impl ISmsDevice_Vtbl { } unsafe extern "system" fn SmsDeviceStatusChanged(this: *mut core::ffi::c_void, eventhandler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISmsDevice_Impl::SmsDeviceStatusChanged(this, windows_core::from_raw_borrowed(&eventhandler)) { + match ISmsDevice_Impl::SmsDeviceStatusChanged(this, core::mem::transmute_copy(&eventhandler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2191,7 +2191,7 @@ impl windows_core::RuntimeType for SmsDeviceStatusChangedEventHandler { } #[cfg(feature = "deprecated")] impl SmsDeviceStatusChangedEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = SmsDeviceStatusChangedEventHandlerBox { vtable: &SmsDeviceStatusChangedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -2211,13 +2211,13 @@ pub struct SmsDeviceStatusChangedEventHandler_Vtbl { } #[cfg(feature = "deprecated")] #[repr(C)] -struct SmsDeviceStatusChangedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct SmsDeviceStatusChangedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const SmsDeviceStatusChangedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "deprecated")] -impl) -> windows_core::Result<()> + Send + 'static> SmsDeviceStatusChangedEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> SmsDeviceStatusChangedEventHandlerBox { const VTABLE: SmsDeviceStatusChangedEventHandler_Vtbl = SmsDeviceStatusChangedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -2246,7 +2246,7 @@ impl) -> windows_core::Result<()> + Send + 'static> } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender)).into() + (this.invoke)(core::mem::transmute_copy(&sender)).into() } } #[repr(C)] @@ -2572,7 +2572,7 @@ impl windows_core::RuntimeType for SmsMessageReceivedEventHandler { } #[cfg(feature = "deprecated")] impl SmsMessageReceivedEventHandler { - pub fn new, Option<&SmsMessageReceivedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, SmsMessageReceivedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = SmsMessageReceivedEventHandlerBox { vtable: &SmsMessageReceivedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -2593,13 +2593,13 @@ pub struct SmsMessageReceivedEventHandler_Vtbl { } #[cfg(feature = "deprecated")] #[repr(C)] -struct SmsMessageReceivedEventHandlerBox, Option<&SmsMessageReceivedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct SmsMessageReceivedEventHandlerBox, windows_core::Ref<'_, SmsMessageReceivedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const SmsMessageReceivedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "deprecated")] -impl, Option<&SmsMessageReceivedEventArgs>) -> windows_core::Result<()> + Send + 'static> SmsMessageReceivedEventHandlerBox { +impl, windows_core::Ref<'_, SmsMessageReceivedEventArgs>) -> windows_core::Result<()> + Send + 'static> SmsMessageReceivedEventHandlerBox { const VTABLE: SmsMessageReceivedEventHandler_Vtbl = SmsMessageReceivedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -2628,7 +2628,7 @@ impl, Option<&SmsMessageReceivedEventArgs>) -> windo } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } #[repr(transparent)] 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 d8172539dd..5b13c65e29 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs @@ -46,13 +46,13 @@ impl windows_core::RuntimeName for ISpiControllerProvider { const NAME: &'static str = "Windows.Devices.Spi.Provider.ISpiControllerProvider"; } pub trait ISpiControllerProvider_Impl: windows_core::IUnknownImpl { - fn GetDeviceProvider(&self, settings: Option<&ProviderSpiConnectionSettings>) -> windows_core::Result; + fn GetDeviceProvider(&self, settings: windows_core::Ref<'_, ProviderSpiConnectionSettings>) -> windows_core::Result; } impl ISpiControllerProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetDeviceProvider(this: *mut core::ffi::c_void, settings: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpiControllerProvider_Impl::GetDeviceProvider(this, windows_core::from_raw_borrowed(&settings)) { + match ISpiControllerProvider_Impl::GetDeviceProvider(this, core::mem::transmute_copy(&settings)) { Ok(ok__) => { result__.write(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 e68d58d664..99b71adb4f 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/mod.rs @@ -123,7 +123,7 @@ pub trait ISpiDeviceStatics_Impl: windows_core::IUnknownImpl { fn GetDeviceSelector(&self) -> windows_core::Result; fn GetDeviceSelectorFromFriendlyName(&self, friendlyName: &windows_core::HSTRING) -> windows_core::Result; fn GetBusInfo(&self, busId: &windows_core::HSTRING) -> windows_core::Result; - fn FromIdAsync(&self, busId: &windows_core::HSTRING, settings: Option<&SpiConnectionSettings>) -> windows_core::Result>; + fn FromIdAsync(&self, busId: &windows_core::HSTRING, settings: windows_core::Ref<'_, SpiConnectionSettings>) -> windows_core::Result>; } impl ISpiDeviceStatics_Vtbl { pub const fn new() -> Self { @@ -162,7 +162,7 @@ impl ISpiDeviceStatics_Vtbl { } unsafe extern "system" fn FromIdAsync(this: *mut core::ffi::c_void, busid: *mut core::ffi::c_void, settings: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpiDeviceStatics_Impl::FromIdAsync(this, core::mem::transmute(&busid), windows_core::from_raw_borrowed(&settings)) { + match ISpiDeviceStatics_Impl::FromIdAsync(this, core::mem::transmute(&busid), core::mem::transmute_copy(&settings)) { Ok(ok__) => { result__.write(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 1d28921a79..7918bb6711 100644 --- a/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs @@ -691,7 +691,7 @@ where fn Lookup(&self, key: &>::Default) -> windows_core::Result; fn Size(&self) -> windows_core::Result; fn HasKey(&self, key: &>::Default) -> windows_core::Result; - fn Split(&self, first: &mut Option>, second: &mut Option>) -> windows_core::Result<()>; + fn Split(&self, first: windows_core::OutRef<'_, IMapView>, second: windows_core::OutRef<'_, IMapView>) -> windows_core::Result<()>; } impl IMapView_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { @@ -880,14 +880,14 @@ where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, { - fn MapChanged(&self, vhnd: Option<&MapChangedEventHandler>) -> windows_core::Result; + fn MapChanged(&self, vhnd: windows_core::Ref<'_, MapChangedEventHandler>) -> windows_core::Result; fn RemoveMapChanged(&self, token: i64) -> windows_core::Result<()>; } impl IObservableMap_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn MapChanged, const OFFSET: isize>(this: *mut core::ffi::c_void, vhnd: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IObservableMap_Impl::MapChanged(this, windows_core::from_raw_borrowed(&vhnd)) { + match IObservableMap_Impl::MapChanged(this, core::mem::transmute_copy(&vhnd)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1062,14 +1062,14 @@ pub trait IObservableVector_Impl: IIterable_Impl + IVector_Impl where T: windows_core::RuntimeType + 'static, { - fn VectorChanged(&self, vhnd: Option<&VectorChangedEventHandler>) -> windows_core::Result; + fn VectorChanged(&self, vhnd: windows_core::Ref<'_, VectorChangedEventHandler>) -> windows_core::Result; fn RemoveVectorChanged(&self, token: i64) -> windows_core::Result<()>; } impl IObservableVector_Vtbl { pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn VectorChanged, const OFFSET: isize>(this: *mut core::ffi::c_void, vhnd: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IObservableVector_Impl::VectorChanged(this, windows_core::from_raw_borrowed(&vhnd)) { + match IObservableVector_Impl::VectorChanged(this, core::mem::transmute_copy(&vhnd)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1696,7 +1696,7 @@ impl MapChangedEventHandler { - pub fn new>, Option<&IMapChangedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>, windows_core::Ref<'_, IMapChangedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = MapChangedEventHandlerBox { vtable: &MapChangedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1721,7 +1721,7 @@ where V: core::marker::PhantomData, } #[repr(C)] -struct MapChangedEventHandlerBox>, Option<&IMapChangedEventArgs>) -> windows_core::Result<()> + Send + 'static> +struct MapChangedEventHandlerBox>, windows_core::Ref<'_, IMapChangedEventArgs>) -> windows_core::Result<()> + Send + 'static> where K: windows_core::RuntimeType + 'static, V: windows_core::RuntimeType + 'static, @@ -1730,7 +1730,7 @@ where invoke: F, count: windows_core::imp::RefCount, } -impl>, Option<&IMapChangedEventArgs>) -> windows_core::Result<()> + Send + 'static> MapChangedEventHandlerBox { +impl>, windows_core::Ref<'_, IMapChangedEventArgs>) -> windows_core::Result<()> + Send + 'static> MapChangedEventHandlerBox { const VTABLE: MapChangedEventHandler_Vtbl = MapChangedEventHandler_Vtbl:: { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke, @@ -1764,7 +1764,7 @@ impl windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&event)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&event)).into() } } #[repr(transparent)] @@ -2098,7 +2098,7 @@ impl windows_core::RuntimeType for Vecto const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new().push_slice(b"pinterface({0c051752-9fbf-4c70-aa0c-0e4c82d9a761}").push_slice(b";").push_other(T::SIGNATURE).push_slice(b")"); } impl VectorChangedEventHandler { - pub fn new>, Option<&IVectorChangedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>, windows_core::Ref<'_, IVectorChangedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = VectorChangedEventHandlerBox { vtable: &VectorChangedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -2121,7 +2121,7 @@ where T: core::marker::PhantomData, } #[repr(C)] -struct VectorChangedEventHandlerBox>, Option<&IVectorChangedEventArgs>) -> windows_core::Result<()> + Send + 'static> +struct VectorChangedEventHandlerBox>, windows_core::Ref<'_, IVectorChangedEventArgs>) -> windows_core::Result<()> + Send + 'static> where T: windows_core::RuntimeType + 'static, { @@ -2129,7 +2129,7 @@ where invoke: F, count: windows_core::imp::RefCount, } -impl>, Option<&IVectorChangedEventArgs>) -> windows_core::Result<()> + Send + 'static> VectorChangedEventHandlerBox { +impl>, windows_core::Ref<'_, IVectorChangedEventArgs>) -> windows_core::Result<()> + Send + 'static> VectorChangedEventHandlerBox { const VTABLE: VectorChangedEventHandler_Vtbl = VectorChangedEventHandler_Vtbl:: { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke, @@ -2162,6 +2162,6 @@ impl windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&event)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&event)).into() } } diff --git a/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs b/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs index 8df0389eaf..f8f567a5a3 100644 --- a/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs @@ -435,11 +435,11 @@ impl windows_core::RuntimeName for IFileLoggingSession { #[cfg(feature = "Storage_Streams")] pub trait IFileLoggingSession_Impl: super::IClosable_Impl { fn Name(&self) -> windows_core::Result; - fn AddLoggingChannel(&self, loggingChannel: Option<&ILoggingChannel>) -> windows_core::Result<()>; - fn AddLoggingChannelWithLevel(&self, loggingChannel: Option<&ILoggingChannel>, maxLevel: LoggingLevel) -> windows_core::Result<()>; - fn RemoveLoggingChannel(&self, loggingChannel: Option<&ILoggingChannel>) -> windows_core::Result<()>; + fn AddLoggingChannel(&self, loggingChannel: windows_core::Ref<'_, ILoggingChannel>) -> windows_core::Result<()>; + fn AddLoggingChannelWithLevel(&self, loggingChannel: windows_core::Ref<'_, ILoggingChannel>, maxLevel: LoggingLevel) -> windows_core::Result<()>; + fn RemoveLoggingChannel(&self, loggingChannel: windows_core::Ref<'_, ILoggingChannel>) -> windows_core::Result<()>; fn CloseAndSaveToFileAsync(&self) -> windows_core::Result>; - fn LogFileGenerated(&self, handler: Option<&super::TypedEventHandler>) -> windows_core::Result; + fn LogFileGenerated(&self, handler: windows_core::Ref<'_, super::TypedEventHandler>) -> windows_core::Result; fn RemoveLogFileGenerated(&self, token: i64) -> windows_core::Result<()>; } #[cfg(feature = "Storage_Streams")] @@ -458,15 +458,15 @@ impl IFileLoggingSession_Vtbl { } unsafe extern "system" fn AddLoggingChannel(this: *mut core::ffi::c_void, loggingchannel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileLoggingSession_Impl::AddLoggingChannel(this, windows_core::from_raw_borrowed(&loggingchannel)).into() + IFileLoggingSession_Impl::AddLoggingChannel(this, core::mem::transmute_copy(&loggingchannel)).into() } unsafe extern "system" fn AddLoggingChannelWithLevel(this: *mut core::ffi::c_void, loggingchannel: *mut core::ffi::c_void, maxlevel: LoggingLevel) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileLoggingSession_Impl::AddLoggingChannelWithLevel(this, windows_core::from_raw_borrowed(&loggingchannel), maxlevel).into() + IFileLoggingSession_Impl::AddLoggingChannelWithLevel(this, core::mem::transmute_copy(&loggingchannel), maxlevel).into() } unsafe extern "system" fn RemoveLoggingChannel(this: *mut core::ffi::c_void, loggingchannel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileLoggingSession_Impl::RemoveLoggingChannel(this, windows_core::from_raw_borrowed(&loggingchannel)).into() + IFileLoggingSession_Impl::RemoveLoggingChannel(this, core::mem::transmute_copy(&loggingchannel)).into() } unsafe extern "system" fn CloseAndSaveToFileAsync(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -481,7 +481,7 @@ impl IFileLoggingSession_Vtbl { } unsafe extern "system" fn LogFileGenerated(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFileLoggingSession_Impl::LogFileGenerated(this, windows_core::from_raw_borrowed(&handler)) { + match IFileLoggingSession_Impl::LogFileGenerated(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -649,7 +649,7 @@ pub trait ILoggingChannel_Impl: super::IClosable_Impl { fn LogMessageWithLevel(&self, eventString: &windows_core::HSTRING, level: LoggingLevel) -> windows_core::Result<()>; fn LogValuePair(&self, value1: &windows_core::HSTRING, value2: i32) -> windows_core::Result<()>; fn LogValuePairWithLevel(&self, value1: &windows_core::HSTRING, value2: i32, level: LoggingLevel) -> windows_core::Result<()>; - fn LoggingEnabled(&self, handler: Option<&super::TypedEventHandler>) -> windows_core::Result; + fn LoggingEnabled(&self, handler: windows_core::Ref<'_, super::TypedEventHandler>) -> windows_core::Result; fn RemoveLoggingEnabled(&self, token: i64) -> windows_core::Result<()>; } impl ILoggingChannel_Vtbl { @@ -703,7 +703,7 @@ impl ILoggingChannel_Vtbl { } unsafe extern "system" fn LoggingEnabled(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ILoggingChannel_Impl::LoggingEnabled(this, windows_core::from_raw_borrowed(&handler)) { + match ILoggingChannel_Impl::LoggingEnabled(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1002,10 +1002,10 @@ impl windows_core::RuntimeName for ILoggingSession { #[cfg(feature = "Storage_Streams")] pub trait ILoggingSession_Impl: super::IClosable_Impl { fn Name(&self) -> windows_core::Result; - fn SaveToFileAsync(&self, folder: Option<&super::super::Storage::IStorageFolder>, fileName: &windows_core::HSTRING) -> windows_core::Result>; - fn AddLoggingChannel(&self, loggingChannel: Option<&ILoggingChannel>) -> windows_core::Result<()>; - fn AddLoggingChannelWithLevel(&self, loggingChannel: Option<&ILoggingChannel>, maxLevel: LoggingLevel) -> windows_core::Result<()>; - fn RemoveLoggingChannel(&self, loggingChannel: Option<&ILoggingChannel>) -> windows_core::Result<()>; + fn SaveToFileAsync(&self, folder: windows_core::Ref<'_, super::super::Storage::IStorageFolder>, fileName: &windows_core::HSTRING) -> windows_core::Result>; + fn AddLoggingChannel(&self, loggingChannel: windows_core::Ref<'_, ILoggingChannel>) -> windows_core::Result<()>; + fn AddLoggingChannelWithLevel(&self, loggingChannel: windows_core::Ref<'_, ILoggingChannel>, maxLevel: LoggingLevel) -> windows_core::Result<()>; + fn RemoveLoggingChannel(&self, loggingChannel: windows_core::Ref<'_, ILoggingChannel>) -> windows_core::Result<()>; } #[cfg(feature = "Storage_Streams")] impl ILoggingSession_Vtbl { @@ -1023,7 +1023,7 @@ impl ILoggingSession_Vtbl { } unsafe extern "system" fn SaveToFileAsync(this: *mut core::ffi::c_void, folder: *mut core::ffi::c_void, filename: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ILoggingSession_Impl::SaveToFileAsync(this, windows_core::from_raw_borrowed(&folder), core::mem::transmute(&filename)) { + match ILoggingSession_Impl::SaveToFileAsync(this, core::mem::transmute_copy(&folder), core::mem::transmute(&filename)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1034,15 +1034,15 @@ impl ILoggingSession_Vtbl { } unsafe extern "system" fn AddLoggingChannel(this: *mut core::ffi::c_void, loggingchannel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoggingSession_Impl::AddLoggingChannel(this, windows_core::from_raw_borrowed(&loggingchannel)).into() + ILoggingSession_Impl::AddLoggingChannel(this, core::mem::transmute_copy(&loggingchannel)).into() } unsafe extern "system" fn AddLoggingChannelWithLevel(this: *mut core::ffi::c_void, loggingchannel: *mut core::ffi::c_void, maxlevel: LoggingLevel) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoggingSession_Impl::AddLoggingChannelWithLevel(this, windows_core::from_raw_borrowed(&loggingchannel), maxlevel).into() + ILoggingSession_Impl::AddLoggingChannelWithLevel(this, core::mem::transmute_copy(&loggingchannel), maxlevel).into() } unsafe extern "system" fn RemoveLoggingChannel(this: *mut core::ffi::c_void, loggingchannel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoggingSession_Impl::RemoveLoggingChannel(this, windows_core::from_raw_borrowed(&loggingchannel)).into() + ILoggingSession_Impl::RemoveLoggingChannel(this, core::mem::transmute_copy(&loggingchannel)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -1178,13 +1178,13 @@ pub trait ILoggingTarget_Impl: windows_core::IUnknownImpl { fn IsEnabledWithLevel(&self, level: LoggingLevel) -> windows_core::Result; fn IsEnabledWithLevelAndKeywords(&self, level: LoggingLevel, keywords: i64) -> windows_core::Result; fn LogEvent(&self, eventName: &windows_core::HSTRING) -> windows_core::Result<()>; - fn LogEventWithFields(&self, eventName: &windows_core::HSTRING, fields: Option<&LoggingFields>) -> windows_core::Result<()>; - fn LogEventWithFieldsAndLevel(&self, eventName: &windows_core::HSTRING, fields: Option<&LoggingFields>, level: LoggingLevel) -> windows_core::Result<()>; - fn LogEventWithFieldsAndOptions(&self, eventName: &windows_core::HSTRING, fields: Option<&LoggingFields>, level: LoggingLevel, options: Option<&LoggingOptions>) -> windows_core::Result<()>; + fn LogEventWithFields(&self, eventName: &windows_core::HSTRING, fields: windows_core::Ref<'_, LoggingFields>) -> windows_core::Result<()>; + fn LogEventWithFieldsAndLevel(&self, eventName: &windows_core::HSTRING, fields: windows_core::Ref<'_, LoggingFields>, level: LoggingLevel) -> windows_core::Result<()>; + fn LogEventWithFieldsAndOptions(&self, eventName: &windows_core::HSTRING, fields: windows_core::Ref<'_, LoggingFields>, level: LoggingLevel, options: windows_core::Ref<'_, LoggingOptions>) -> windows_core::Result<()>; fn StartActivity(&self, startEventName: &windows_core::HSTRING) -> windows_core::Result; - fn StartActivityWithFields(&self, startEventName: &windows_core::HSTRING, fields: Option<&LoggingFields>) -> windows_core::Result; - fn StartActivityWithFieldsAndLevel(&self, startEventName: &windows_core::HSTRING, fields: Option<&LoggingFields>, level: LoggingLevel) -> windows_core::Result; - fn StartActivityWithFieldsAndOptions(&self, startEventName: &windows_core::HSTRING, fields: Option<&LoggingFields>, level: LoggingLevel, options: Option<&LoggingOptions>) -> windows_core::Result; + fn StartActivityWithFields(&self, startEventName: &windows_core::HSTRING, fields: windows_core::Ref<'_, LoggingFields>) -> windows_core::Result; + fn StartActivityWithFieldsAndLevel(&self, startEventName: &windows_core::HSTRING, fields: windows_core::Ref<'_, LoggingFields>, level: LoggingLevel) -> windows_core::Result; + fn StartActivityWithFieldsAndOptions(&self, startEventName: &windows_core::HSTRING, fields: windows_core::Ref<'_, LoggingFields>, level: LoggingLevel, options: windows_core::Ref<'_, LoggingOptions>) -> windows_core::Result; } impl ILoggingTarget_Vtbl { pub const fn new() -> Self { @@ -1224,15 +1224,15 @@ impl ILoggingTarget_Vtbl { } unsafe extern "system" fn LogEventWithFields(this: *mut core::ffi::c_void, eventname: *mut core::ffi::c_void, fields: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoggingTarget_Impl::LogEventWithFields(this, core::mem::transmute(&eventname), windows_core::from_raw_borrowed(&fields)).into() + ILoggingTarget_Impl::LogEventWithFields(this, core::mem::transmute(&eventname), core::mem::transmute_copy(&fields)).into() } unsafe extern "system" fn LogEventWithFieldsAndLevel(this: *mut core::ffi::c_void, eventname: *mut core::ffi::c_void, fields: *mut core::ffi::c_void, level: LoggingLevel) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoggingTarget_Impl::LogEventWithFieldsAndLevel(this, core::mem::transmute(&eventname), windows_core::from_raw_borrowed(&fields), level).into() + ILoggingTarget_Impl::LogEventWithFieldsAndLevel(this, core::mem::transmute(&eventname), core::mem::transmute_copy(&fields), level).into() } unsafe extern "system" fn LogEventWithFieldsAndOptions(this: *mut core::ffi::c_void, eventname: *mut core::ffi::c_void, fields: *mut core::ffi::c_void, level: LoggingLevel, options: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoggingTarget_Impl::LogEventWithFieldsAndOptions(this, core::mem::transmute(&eventname), windows_core::from_raw_borrowed(&fields), level, windows_core::from_raw_borrowed(&options)).into() + ILoggingTarget_Impl::LogEventWithFieldsAndOptions(this, core::mem::transmute(&eventname), core::mem::transmute_copy(&fields), level, core::mem::transmute_copy(&options)).into() } unsafe extern "system" fn StartActivity(this: *mut core::ffi::c_void, starteventname: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1247,7 +1247,7 @@ impl ILoggingTarget_Vtbl { } unsafe extern "system" fn StartActivityWithFields(this: *mut core::ffi::c_void, starteventname: *mut core::ffi::c_void, fields: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ILoggingTarget_Impl::StartActivityWithFields(this, core::mem::transmute(&starteventname), windows_core::from_raw_borrowed(&fields)) { + match ILoggingTarget_Impl::StartActivityWithFields(this, core::mem::transmute(&starteventname), core::mem::transmute_copy(&fields)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1258,7 +1258,7 @@ impl ILoggingTarget_Vtbl { } unsafe extern "system" fn StartActivityWithFieldsAndLevel(this: *mut core::ffi::c_void, starteventname: *mut core::ffi::c_void, fields: *mut core::ffi::c_void, level: LoggingLevel, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ILoggingTarget_Impl::StartActivityWithFieldsAndLevel(this, core::mem::transmute(&starteventname), windows_core::from_raw_borrowed(&fields), level) { + match ILoggingTarget_Impl::StartActivityWithFieldsAndLevel(this, core::mem::transmute(&starteventname), core::mem::transmute_copy(&fields), level) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1269,7 +1269,7 @@ impl ILoggingTarget_Vtbl { } unsafe extern "system" fn StartActivityWithFieldsAndOptions(this: *mut core::ffi::c_void, starteventname: *mut core::ffi::c_void, fields: *mut core::ffi::c_void, level: LoggingLevel, options: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ILoggingTarget_Impl::StartActivityWithFieldsAndOptions(this, core::mem::transmute(&starteventname), windows_core::from_raw_borrowed(&fields), level, windows_core::from_raw_borrowed(&options)) { + match ILoggingTarget_Impl::StartActivityWithFieldsAndOptions(this, core::mem::transmute(&starteventname), core::mem::transmute_copy(&fields), level, core::mem::transmute_copy(&options)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Foundation/mod.rs b/crates/libs/windows/src/Windows/Foundation/mod.rs index 2aa0beedfb..2666458de7 100644 --- a/crates/libs/windows/src/Windows/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/mod.rs @@ -11,7 +11,7 @@ impl windows_core::RuntimeType for AsyncActionCompletedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl AsyncActionCompletedHandler { - pub fn new, AsyncStatus) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, AsyncStatus) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = AsyncActionCompletedHandlerBox { vtable: &AsyncActionCompletedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -29,12 +29,12 @@ pub struct AsyncActionCompletedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, asyncinfo: *mut core::ffi::c_void, asyncstatus: AsyncStatus) -> windows_core::HRESULT, } #[repr(C)] -struct AsyncActionCompletedHandlerBox, AsyncStatus) -> windows_core::Result<()> + Send + 'static> { +struct AsyncActionCompletedHandlerBox, AsyncStatus) -> windows_core::Result<()> + Send + 'static> { vtable: *const AsyncActionCompletedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, AsyncStatus) -> windows_core::Result<()> + Send + 'static> AsyncActionCompletedHandlerBox { +impl, AsyncStatus) -> windows_core::Result<()> + Send + 'static> AsyncActionCompletedHandlerBox { const VTABLE: AsyncActionCompletedHandler_Vtbl = AsyncActionCompletedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -63,7 +63,7 @@ impl, AsyncStatus) -> windows_core::Result<()> + } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, asyncinfo: *mut core::ffi::c_void, asyncstatus: AsyncStatus) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&asyncinfo), asyncstatus).into() + (this.invoke)(core::mem::transmute_copy(&asyncinfo), asyncstatus).into() } } #[repr(transparent)] @@ -79,7 +79,7 @@ impl windows_core::RuntimeType f const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new().push_slice(b"pinterface({6d844858-0cff-4590-ae89-95a5a5c8b4b8}").push_slice(b";").push_other(TProgress::SIGNATURE).push_slice(b")"); } impl AsyncActionProgressHandler { - pub fn new>, &>::Default) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>, &>::Default) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = AsyncActionProgressHandlerBox { vtable: &AsyncActionProgressHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -102,7 +102,7 @@ where TProgress: core::marker::PhantomData, } #[repr(C)] -struct AsyncActionProgressHandlerBox>, &>::Default) -> windows_core::Result<()> + Send + 'static> +struct AsyncActionProgressHandlerBox>, &>::Default) -> windows_core::Result<()> + Send + 'static> where TProgress: windows_core::RuntimeType + 'static, { @@ -110,7 +110,7 @@ where invoke: F, count: windows_core::imp::RefCount, } -impl>, &>::Default) -> windows_core::Result<()> + Send + 'static> AsyncActionProgressHandlerBox { +impl>, &>::Default) -> windows_core::Result<()> + Send + 'static> AsyncActionProgressHandlerBox { const VTABLE: AsyncActionProgressHandler_Vtbl = AsyncActionProgressHandler_Vtbl:: { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke, @@ -143,7 +143,7 @@ impl) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&asyncinfo), core::mem::transmute(&progressinfo)).into() + (this.invoke)(core::mem::transmute_copy(&asyncinfo), core::mem::transmute(&progressinfo)).into() } } #[repr(transparent)] @@ -159,7 +159,7 @@ impl windows_core::RuntimeType f const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new().push_slice(b"pinterface({9c029f91-cc84-44fd-ac26-0a6c4e555281}").push_slice(b";").push_other(TProgress::SIGNATURE).push_slice(b")"); } impl AsyncActionWithProgressCompletedHandler { - pub fn new>, AsyncStatus) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>, AsyncStatus) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = AsyncActionWithProgressCompletedHandlerBox { vtable: &AsyncActionWithProgressCompletedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -181,7 +181,7 @@ where TProgress: core::marker::PhantomData, } #[repr(C)] -struct AsyncActionWithProgressCompletedHandlerBox>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> +struct AsyncActionWithProgressCompletedHandlerBox>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> where TProgress: windows_core::RuntimeType + 'static, { @@ -189,7 +189,7 @@ where invoke: F, count: windows_core::imp::RefCount, } -impl>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> AsyncActionWithProgressCompletedHandlerBox { +impl>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> AsyncActionWithProgressCompletedHandlerBox { const VTABLE: AsyncActionWithProgressCompletedHandler_Vtbl = AsyncActionWithProgressCompletedHandler_Vtbl:: { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke, @@ -222,7 +222,7 @@ impl windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&asyncinfo), asyncstatus).into() + (this.invoke)(core::mem::transmute_copy(&asyncinfo), asyncstatus).into() } } #[repr(transparent)] @@ -238,7 +238,7 @@ impl windows_core::RuntimeType for const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new().push_slice(b"pinterface({fcdcf02c-e5d8-4478-915a-4d90b74b83a5}").push_slice(b";").push_other(TResult::SIGNATURE).push_slice(b")"); } impl AsyncOperationCompletedHandler { - pub fn new>, AsyncStatus) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>, AsyncStatus) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = AsyncOperationCompletedHandlerBox { vtable: &AsyncOperationCompletedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -260,7 +260,7 @@ where TResult: core::marker::PhantomData, } #[repr(C)] -struct AsyncOperationCompletedHandlerBox>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> +struct AsyncOperationCompletedHandlerBox>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> where TResult: windows_core::RuntimeType + 'static, { @@ -268,7 +268,7 @@ where invoke: F, count: windows_core::imp::RefCount, } -impl>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> AsyncOperationCompletedHandlerBox { +impl>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> AsyncOperationCompletedHandlerBox { const VTABLE: AsyncOperationCompletedHandler_Vtbl = AsyncOperationCompletedHandler_Vtbl:: { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke, @@ -301,7 +301,7 @@ impl windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&asyncinfo), asyncstatus).into() + (this.invoke)(core::mem::transmute_copy(&asyncinfo), asyncstatus).into() } } #[repr(transparent)] @@ -318,7 +318,7 @@ impl AsyncOperationProgressHandler { - pub fn new>, &>::Default) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>, &>::Default) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = AsyncOperationProgressHandlerBox { vtable: &AsyncOperationProgressHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -343,7 +343,7 @@ where TProgress: core::marker::PhantomData, } #[repr(C)] -struct AsyncOperationProgressHandlerBox>, &>::Default) -> windows_core::Result<()> + Send + 'static> +struct AsyncOperationProgressHandlerBox>, &>::Default) -> windows_core::Result<()> + Send + 'static> where TResult: windows_core::RuntimeType + 'static, TProgress: windows_core::RuntimeType + 'static, @@ -352,7 +352,7 @@ where invoke: F, count: windows_core::imp::RefCount, } -impl>, &>::Default) -> windows_core::Result<()> + Send + 'static> AsyncOperationProgressHandlerBox { +impl>, &>::Default) -> windows_core::Result<()> + Send + 'static> AsyncOperationProgressHandlerBox { const VTABLE: AsyncOperationProgressHandler_Vtbl = AsyncOperationProgressHandler_Vtbl:: { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke, @@ -386,7 +386,7 @@ impl) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&asyncinfo), core::mem::transmute(&progressinfo)).into() + (this.invoke)(core::mem::transmute_copy(&asyncinfo), core::mem::transmute(&progressinfo)).into() } } #[repr(transparent)] @@ -403,7 +403,7 @@ impl AsyncOperationWithProgressCompletedHandler { - pub fn new>, AsyncStatus) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>, AsyncStatus) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = AsyncOperationWithProgressCompletedHandlerBox { vtable: &AsyncOperationWithProgressCompletedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -427,7 +427,7 @@ where TProgress: core::marker::PhantomData, } #[repr(C)] -struct AsyncOperationWithProgressCompletedHandlerBox>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> +struct AsyncOperationWithProgressCompletedHandlerBox>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> where TResult: windows_core::RuntimeType + 'static, TProgress: windows_core::RuntimeType + 'static, @@ -436,7 +436,7 @@ where invoke: F, count: windows_core::imp::RefCount, } -impl>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> AsyncOperationWithProgressCompletedHandlerBox { +impl>, AsyncStatus) -> windows_core::Result<()> + Send + 'static> AsyncOperationWithProgressCompletedHandlerBox { const VTABLE: AsyncOperationWithProgressCompletedHandler_Vtbl = AsyncOperationWithProgressCompletedHandler_Vtbl:: { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke, @@ -470,7 +470,7 @@ impl windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&asyncinfo), asyncstatus).into() + (this.invoke)(core::mem::transmute_copy(&asyncinfo), asyncstatus).into() } } #[repr(transparent)] @@ -609,7 +609,7 @@ impl windows_core::RuntimeType for Event const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::new().push_slice(b"pinterface({9de1c535-6ae1-11e0-84e1-18a905bcc53f}").push_slice(b";").push_other(T::SIGNATURE).push_slice(b")"); } impl EventHandler { - pub fn new, &>::Default) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, &>::Default) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = EventHandlerBox { vtable: &EventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -632,7 +632,7 @@ where T: core::marker::PhantomData, } #[repr(C)] -struct EventHandlerBox, &>::Default) -> windows_core::Result<()> + Send + 'static> +struct EventHandlerBox, &>::Default) -> windows_core::Result<()> + Send + 'static> where T: windows_core::RuntimeType + 'static, { @@ -640,7 +640,7 @@ where invoke: F, count: windows_core::imp::RefCount, } -impl, &>::Default) -> windows_core::Result<()> + Send + 'static> EventHandlerBox { +impl, &>::Default) -> windows_core::Result<()> + Send + 'static> EventHandlerBox { const VTABLE: EventHandler_Vtbl = EventHandler_Vtbl:: { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke, @@ -673,7 +673,7 @@ impl) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), core::mem::transmute(&args)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute(&args)).into() } } pub struct GuidHelper; @@ -765,7 +765,7 @@ impl windows_core::RuntimeName for IAsyncAction { const NAME: &'static str = "Windows.Foundation.IAsyncAction"; } pub trait IAsyncAction_Impl: IAsyncInfo_Impl { - fn SetCompleted(&self, handler: Option<&AsyncActionCompletedHandler>) -> windows_core::Result<()>; + fn SetCompleted(&self, handler: windows_core::Ref<'_, AsyncActionCompletedHandler>) -> windows_core::Result<()>; fn Completed(&self) -> windows_core::Result; fn GetResults(&self) -> windows_core::Result<()>; } @@ -773,7 +773,7 @@ impl IAsyncAction_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetCompleted(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncAction_Impl::SetCompleted(this, windows_core::from_raw_borrowed(&handler)).into() + IAsyncAction_Impl::SetCompleted(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn Completed(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -897,9 +897,9 @@ pub trait IAsyncActionWithProgress_Impl: IAsyncInfo_Impl where TProgress: windows_core::RuntimeType + 'static, { - fn SetProgress(&self, handler: Option<&AsyncActionProgressHandler>) -> windows_core::Result<()>; + fn SetProgress(&self, handler: windows_core::Ref<'_, AsyncActionProgressHandler>) -> windows_core::Result<()>; fn Progress(&self) -> windows_core::Result>; - fn SetCompleted(&self, handler: Option<&AsyncActionWithProgressCompletedHandler>) -> windows_core::Result<()>; + fn SetCompleted(&self, handler: windows_core::Ref<'_, AsyncActionWithProgressCompletedHandler>) -> windows_core::Result<()>; fn Completed(&self) -> windows_core::Result>; fn GetResults(&self) -> windows_core::Result<()>; } @@ -907,7 +907,7 @@ impl IAsyncActionWithProgress_Vt pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn SetProgress, const OFFSET: isize>(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncActionWithProgress_Impl::SetProgress(this, windows_core::from_raw_borrowed(&handler)).into() + IAsyncActionWithProgress_Impl::SetProgress(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn Progress, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -922,7 +922,7 @@ impl IAsyncActionWithProgress_Vt } unsafe extern "system" fn SetCompleted, const OFFSET: isize>(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncActionWithProgress_Impl::SetCompleted(this, windows_core::from_raw_borrowed(&handler)).into() + IAsyncActionWithProgress_Impl::SetCompleted(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn Completed, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1152,7 +1152,7 @@ pub trait IAsyncOperation_Impl: IAsyncInfo_Impl where TResult: windows_core::RuntimeType + 'static, { - fn SetCompleted(&self, handler: Option<&AsyncOperationCompletedHandler>) -> windows_core::Result<()>; + fn SetCompleted(&self, handler: windows_core::Ref<'_, AsyncOperationCompletedHandler>) -> windows_core::Result<()>; fn Completed(&self) -> windows_core::Result>; fn GetResults(&self) -> windows_core::Result; } @@ -1160,7 +1160,7 @@ impl IAsyncOperation_Vtbl pub const fn new, const OFFSET: isize>() -> Self { unsafe extern "system" fn SetCompleted, const OFFSET: isize>(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncOperation_Impl::SetCompleted(this, windows_core::from_raw_borrowed(&handler)).into() + IAsyncOperation_Impl::SetCompleted(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn Completed, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1301,9 +1301,9 @@ where TResult: windows_core::RuntimeType + 'static, TProgress: windows_core::RuntimeType + 'static, { - fn SetProgress(&self, handler: Option<&AsyncOperationProgressHandler>) -> windows_core::Result<()>; + fn SetProgress(&self, handler: windows_core::Ref<'_, AsyncOperationProgressHandler>) -> windows_core::Result<()>; fn Progress(&self) -> windows_core::Result>; - fn SetCompleted(&self, handler: Option<&AsyncOperationWithProgressCompletedHandler>) -> windows_core::Result<()>; + fn SetCompleted(&self, handler: windows_core::Ref<'_, AsyncOperationWithProgressCompletedHandler>) -> windows_core::Result<()>; fn Completed(&self) -> windows_core::Result>; fn GetResults(&self) -> windows_core::Result; } @@ -1311,7 +1311,7 @@ impl, const OFFSET: isize>() -> Self { unsafe extern "system" fn SetProgress, const OFFSET: isize>(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncOperationWithProgress_Impl::SetProgress(this, windows_core::from_raw_borrowed(&handler)).into() + IAsyncOperationWithProgress_Impl::SetProgress(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn Progress, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1326,7 +1326,7 @@ impl, const OFFSET: isize>(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncOperationWithProgress_Impl::SetCompleted(this, windows_core::from_raw_borrowed(&handler)).into() + IAsyncOperationWithProgress_Impl::SetCompleted(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn Completed, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1586,7 +1586,7 @@ impl windows_core::RuntimeName for IMemoryBufferReference { } pub trait IMemoryBufferReference_Impl: IClosable_Impl { fn Capacity(&self) -> windows_core::Result; - fn Closed(&self, handler: Option<&TypedEventHandler>) -> windows_core::Result; + fn Closed(&self, handler: windows_core::Ref<'_, TypedEventHandler>) -> windows_core::Result; fn RemoveClosed(&self, cookie: i64) -> windows_core::Result<()>; } impl IMemoryBufferReference_Vtbl { @@ -1603,7 +1603,7 @@ impl IMemoryBufferReference_Vtbl { } unsafe extern "system" fn Closed(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMemoryBufferReference_Impl::Closed(this, windows_core::from_raw_borrowed(&handler)) { + match IMemoryBufferReference_Impl::Closed(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) 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 4b58806d44..c352789baa 100644 --- a/crates/libs/windows/src/Windows/Gaming/Input/Custom/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Input/Custom/mod.rs @@ -321,15 +321,15 @@ impl windows_core::RuntimeName for ICustomGameControllerFactory { const NAME: &'static str = "Windows.Gaming.Input.Custom.ICustomGameControllerFactory"; } pub trait ICustomGameControllerFactory_Impl: windows_core::IUnknownImpl { - fn CreateGameController(&self, provider: Option<&IGameControllerProvider>) -> windows_core::Result; - fn OnGameControllerAdded(&self, value: Option<&super::IGameController>) -> windows_core::Result<()>; - fn OnGameControllerRemoved(&self, value: Option<&super::IGameController>) -> windows_core::Result<()>; + fn CreateGameController(&self, provider: windows_core::Ref<'_, IGameControllerProvider>) -> windows_core::Result; + fn OnGameControllerAdded(&self, value: windows_core::Ref<'_, super::IGameController>) -> windows_core::Result<()>; + fn OnGameControllerRemoved(&self, value: windows_core::Ref<'_, super::IGameController>) -> windows_core::Result<()>; } impl ICustomGameControllerFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateGameController(this: *mut core::ffi::c_void, provider: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICustomGameControllerFactory_Impl::CreateGameController(this, windows_core::from_raw_borrowed(&provider)) { + match ICustomGameControllerFactory_Impl::CreateGameController(this, core::mem::transmute_copy(&provider)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -340,11 +340,11 @@ impl ICustomGameControllerFactory_Vtbl { } unsafe extern "system" fn OnGameControllerAdded(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICustomGameControllerFactory_Impl::OnGameControllerAdded(this, windows_core::from_raw_borrowed(&value)).into() + ICustomGameControllerFactory_Impl::OnGameControllerAdded(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn OnGameControllerRemoved(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICustomGameControllerFactory_Impl::OnGameControllerRemoved(this, windows_core::from_raw_borrowed(&value)).into() + ICustomGameControllerFactory_Impl::OnGameControllerRemoved(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Gaming/Input/mod.rs b/crates/libs/windows/src/Windows/Gaming/Input/mod.rs index 8e389fa7c1..8b75e12466 100644 --- a/crates/libs/windows/src/Windows/Gaming/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Input/mod.rs @@ -1004,11 +1004,11 @@ impl windows_core::RuntimeName for IGameController { } #[cfg(feature = "System")] pub trait IGameController_Impl: windows_core::IUnknownImpl { - fn HeadsetConnected(&self, value: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn HeadsetConnected(&self, value: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveHeadsetConnected(&self, token: i64) -> windows_core::Result<()>; - fn HeadsetDisconnected(&self, value: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn HeadsetDisconnected(&self, value: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveHeadsetDisconnected(&self, token: i64) -> windows_core::Result<()>; - fn UserChanged(&self, value: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn UserChanged(&self, value: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveUserChanged(&self, token: i64) -> windows_core::Result<()>; fn Headset(&self) -> windows_core::Result; fn IsWireless(&self) -> windows_core::Result; @@ -1019,7 +1019,7 @@ impl IGameController_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HeadsetConnected(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGameController_Impl::HeadsetConnected(this, windows_core::from_raw_borrowed(&value)) { + match IGameController_Impl::HeadsetConnected(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1033,7 +1033,7 @@ impl IGameController_Vtbl { } unsafe extern "system" fn HeadsetDisconnected(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGameController_Impl::HeadsetDisconnected(this, windows_core::from_raw_borrowed(&value)) { + match IGameController_Impl::HeadsetDisconnected(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1047,7 +1047,7 @@ impl IGameController_Vtbl { } unsafe extern "system" fn UserChanged(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGameController_Impl::UserChanged(this, windows_core::from_raw_borrowed(&value)) { + match IGameController_Impl::UserChanged(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) 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 5454c6692d..6c3ff70450 100644 --- a/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs @@ -101,7 +101,7 @@ impl windows_core::RuntimeType for GameListChangedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl GameListChangedEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = GameListChangedEventHandlerBox { vtable: &GameListChangedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -119,12 +119,12 @@ pub struct GameListChangedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, game: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct GameListChangedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct GameListChangedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const GameListChangedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> GameListChangedEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> GameListChangedEventHandlerBox { const VTABLE: GameListChangedEventHandler_Vtbl = GameListChangedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -153,7 +153,7 @@ impl) -> windows_core::Result<()> + Send + 'stat } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, game: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&game)).into() + (this.invoke)(core::mem::transmute_copy(&game)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Globalization/NumberFormatting/mod.rs b/crates/libs/windows/src/Windows/Globalization/NumberFormatting/mod.rs index 4923bddbf0..483b6fcd9e 100644 --- a/crates/libs/windows/src/Windows/Globalization/NumberFormatting/mod.rs +++ b/crates/libs/windows/src/Windows/Globalization/NumberFormatting/mod.rs @@ -1252,7 +1252,7 @@ impl windows_core::RuntimeName for INumberRounderOption { } pub trait INumberRounderOption_Impl: windows_core::IUnknownImpl { fn NumberRounder(&self) -> windows_core::Result; - fn SetNumberRounder(&self, value: Option<&INumberRounder>) -> windows_core::Result<()>; + fn SetNumberRounder(&self, value: windows_core::Ref<'_, INumberRounder>) -> windows_core::Result<()>; } impl INumberRounderOption_Vtbl { pub const fn new() -> Self { @@ -1269,7 +1269,7 @@ impl INumberRounderOption_Vtbl { } unsafe extern "system" fn SetNumberRounder(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INumberRounderOption_Impl::SetNumberRounder(this, windows_core::from_raw_borrowed(&value)).into() + INumberRounderOption_Impl::SetNumberRounder(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Graphics/Display/mod.rs b/crates/libs/windows/src/Windows/Graphics/Display/mod.rs index f82795069b..2b2aa9c3f5 100644 --- a/crates/libs/windows/src/Windows/Graphics/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Display/mod.rs @@ -1010,7 +1010,7 @@ impl windows_core::RuntimeType for DisplayPropertiesEventHandler { } #[cfg(feature = "deprecated")] impl DisplayPropertiesEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = DisplayPropertiesEventHandlerBox { vtable: &DisplayPropertiesEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1030,13 +1030,13 @@ pub struct DisplayPropertiesEventHandler_Vtbl { } #[cfg(feature = "deprecated")] #[repr(C)] -struct DisplayPropertiesEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct DisplayPropertiesEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const DisplayPropertiesEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "deprecated")] -impl) -> windows_core::Result<()> + Send + 'static> DisplayPropertiesEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> DisplayPropertiesEventHandlerBox { const VTABLE: DisplayPropertiesEventHandler_Vtbl = DisplayPropertiesEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -1065,7 +1065,7 @@ impl) -> windows_core::Result<()> + } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender)).into() + (this.invoke)(core::mem::transmute_copy(&sender)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs index 1da3370c2b..7290cc4d5f 100644 --- a/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs @@ -1426,7 +1426,7 @@ pub trait IBitmapFrame_Impl: windows_core::IUnknownImpl { fn OrientedPixelWidth(&self) -> windows_core::Result; fn OrientedPixelHeight(&self) -> windows_core::Result; fn GetPixelDataAsync(&self) -> windows_core::Result>; - fn GetPixelDataTransformedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: Option<&BitmapTransform>, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> windows_core::Result>; + fn GetPixelDataTransformedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: windows_core::Ref<'_, BitmapTransform>, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> windows_core::Result>; } #[cfg(feature = "Storage_Streams")] impl IBitmapFrame_Vtbl { @@ -1546,7 +1546,7 @@ impl IBitmapFrame_Vtbl { } unsafe extern "system" fn GetPixelDataTransformedAsync(this: *mut core::ffi::c_void, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: *mut core::ffi::c_void, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBitmapFrame_Impl::GetPixelDataTransformedAsync(this, pixelformat, alphamode, windows_core::from_raw_borrowed(&transform), exiforientationmode, colormanagementmode) { + match IBitmapFrame_Impl::GetPixelDataTransformedAsync(this, pixelformat, alphamode, core::mem::transmute_copy(&transform), exiforientationmode, colormanagementmode) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1722,7 +1722,7 @@ impl windows_core::RuntimeName for IBitmapFrameWithSoftwareBitmap { pub trait IBitmapFrameWithSoftwareBitmap_Impl: IBitmapFrame_Impl { fn GetSoftwareBitmapAsync(&self) -> windows_core::Result>; fn GetSoftwareBitmapConvertedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode) -> windows_core::Result>; - fn GetSoftwareBitmapTransformedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: Option<&BitmapTransform>, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> windows_core::Result>; + fn GetSoftwareBitmapTransformedAsync(&self, pixelFormat: BitmapPixelFormat, alphaMode: BitmapAlphaMode, transform: windows_core::Ref<'_, BitmapTransform>, exifOrientationMode: ExifOrientationMode, colorManagementMode: ColorManagementMode) -> windows_core::Result>; } #[cfg(feature = "Storage_Streams")] impl IBitmapFrameWithSoftwareBitmap_Vtbl { @@ -1751,7 +1751,7 @@ impl IBitmapFrameWithSoftwareBitmap_Vtbl { } unsafe extern "system" fn GetSoftwareBitmapTransformedAsync(this: *mut core::ffi::c_void, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: *mut core::ffi::c_void, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBitmapFrameWithSoftwareBitmap_Impl::GetSoftwareBitmapTransformedAsync(this, pixelformat, alphamode, windows_core::from_raw_borrowed(&transform), exiforientationmode, colormanagementmode) { + match IBitmapFrameWithSoftwareBitmap_Impl::GetSoftwareBitmapTransformedAsync(this, pixelformat, alphamode, core::mem::transmute_copy(&transform), exiforientationmode, colormanagementmode) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1814,14 +1814,14 @@ impl windows_core::RuntimeName for IBitmapPropertiesView { } #[cfg(feature = "Foundation_Collections")] pub trait IBitmapPropertiesView_Impl: windows_core::IUnknownImpl { - fn GetPropertiesAsync(&self, propertiesToRetrieve: Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result>; + fn GetPropertiesAsync(&self, propertiesToRetrieve: windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result>; } #[cfg(feature = "Foundation_Collections")] impl IBitmapPropertiesView_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetPropertiesAsync(this: *mut core::ffi::c_void, propertiestoretrieve: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBitmapPropertiesView_Impl::GetPropertiesAsync(this, windows_core::from_raw_borrowed(&propertiestoretrieve)) { + match IBitmapPropertiesView_Impl::GetPropertiesAsync(this, core::mem::transmute_copy(&propertiestoretrieve)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/mod.rs index d2ac951e3d..3dec66dc0d 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/mod.rs @@ -592,7 +592,7 @@ pub trait IPrintOptionDetails_Impl: windows_core::IUnknownImpl { fn SetState(&self, value: PrintOptionStates) -> windows_core::Result<()>; fn State(&self) -> windows_core::Result; fn Value(&self) -> windows_core::Result; - fn TrySetValue(&self, value: Option<&windows_core::IInspectable>) -> windows_core::Result; + fn TrySetValue(&self, value: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result; } impl IPrintOptionDetails_Vtbl { pub const fn new() -> Self { @@ -659,7 +659,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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintOptionDetails_Impl::TrySetValue(this, windows_core::from_raw_borrowed(&value)) { + match IPrintOptionDetails_Impl::TrySetValue(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs index 7932812c3e..8d6cfa76a6 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs @@ -2002,7 +2002,7 @@ impl windows_core::RuntimeType for PrintTaskSourceRequestedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl PrintTaskSourceRequestedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = PrintTaskSourceRequestedHandlerBox { vtable: &PrintTaskSourceRequestedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -2020,12 +2020,12 @@ pub struct PrintTaskSourceRequestedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct PrintTaskSourceRequestedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct PrintTaskSourceRequestedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const PrintTaskSourceRequestedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> PrintTaskSourceRequestedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> PrintTaskSourceRequestedHandlerBox { const VTABLE: PrintTaskSourceRequestedHandler_Vtbl = PrintTaskSourceRequestedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -2054,7 +2054,7 @@ impl) -> windows_core::Result<()> } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&args)).into() + (this.invoke)(core::mem::transmute_copy(&args)).into() } } pub struct StandardPrintTaskOptions; diff --git a/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs index fd30e1d669..2d4f2400ed 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs @@ -885,7 +885,7 @@ impl windows_core::RuntimeType for Print3DTaskSourceRequestedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl Print3DTaskSourceRequestedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = Print3DTaskSourceRequestedHandlerBox { vtable: &Print3DTaskSourceRequestedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -903,12 +903,12 @@ pub struct Print3DTaskSourceRequestedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct Print3DTaskSourceRequestedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct Print3DTaskSourceRequestedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const Print3DTaskSourceRequestedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> Print3DTaskSourceRequestedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> Print3DTaskSourceRequestedHandlerBox { const VTABLE: Print3DTaskSourceRequestedHandler_Vtbl = Print3DTaskSourceRequestedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -937,7 +937,7 @@ impl) -> windows_core::Result<( } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&args)).into() + (this.invoke)(core::mem::transmute_copy(&args)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Management/Setup/mod.rs b/crates/libs/windows/src/Windows/Management/Setup/mod.rs index bf1dc79795..e280b6fdfb 100644 --- a/crates/libs/windows/src/Windows/Management/Setup/mod.rs +++ b/crates/libs/windows/src/Windows/Management/Setup/mod.rs @@ -166,7 +166,7 @@ impl windows_core::RuntimeType for DeploymentSessionHeartbeatRequested { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl DeploymentSessionHeartbeatRequested { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = DeploymentSessionHeartbeatRequestedBox { vtable: &DeploymentSessionHeartbeatRequestedBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -184,12 +184,12 @@ pub struct DeploymentSessionHeartbeatRequested_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, eventargs: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct DeploymentSessionHeartbeatRequestedBox) -> windows_core::Result<()> + Send + 'static> { +struct DeploymentSessionHeartbeatRequestedBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const DeploymentSessionHeartbeatRequested_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> DeploymentSessionHeartbeatRequestedBox { +impl) -> windows_core::Result<()> + Send + 'static> DeploymentSessionHeartbeatRequestedBox { const VTABLE: DeploymentSessionHeartbeatRequested_Vtbl = DeploymentSessionHeartbeatRequested_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -218,7 +218,7 @@ impl) -> windows_ } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, eventargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&eventargs)).into() + (this.invoke)(core::mem::transmute_copy(&eventargs)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Media/Audio/mod.rs b/crates/libs/windows/src/Windows/Media/Audio/mod.rs index 10eeade17b..222059f628 100644 --- a/crates/libs/windows/src/Windows/Media/Audio/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Audio/mod.rs @@ -3309,9 +3309,9 @@ impl windows_core::RuntimeName for IAudioInputNode { #[cfg(all(feature = "Foundation_Collections", feature = "Media_Effects", feature = "Media_MediaProperties"))] pub trait IAudioInputNode_Impl: IAudioNode_Impl + super::super::Foundation::IClosable_Impl { fn OutgoingConnections(&self) -> windows_core::Result>; - fn AddOutgoingConnection(&self, destination: Option<&IAudioNode>) -> windows_core::Result<()>; - fn AddOutgoingConnectionWithGain(&self, destination: Option<&IAudioNode>, gain: f64) -> windows_core::Result<()>; - fn RemoveOutgoingConnection(&self, destination: Option<&IAudioNode>) -> windows_core::Result<()>; + fn AddOutgoingConnection(&self, destination: windows_core::Ref<'_, IAudioNode>) -> windows_core::Result<()>; + fn AddOutgoingConnectionWithGain(&self, destination: windows_core::Ref<'_, IAudioNode>, gain: f64) -> windows_core::Result<()>; + fn RemoveOutgoingConnection(&self, destination: windows_core::Ref<'_, IAudioNode>) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Collections", feature = "Media_Effects", feature = "Media_MediaProperties"))] impl IAudioInputNode_Vtbl { @@ -3329,15 +3329,15 @@ impl IAudioInputNode_Vtbl { } unsafe extern "system" fn AddOutgoingConnection(this: *mut core::ffi::c_void, destination: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioInputNode_Impl::AddOutgoingConnection(this, windows_core::from_raw_borrowed(&destination)).into() + IAudioInputNode_Impl::AddOutgoingConnection(this, core::mem::transmute_copy(&destination)).into() } unsafe extern "system" fn AddOutgoingConnectionWithGain(this: *mut core::ffi::c_void, destination: *mut core::ffi::c_void, gain: f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioInputNode_Impl::AddOutgoingConnectionWithGain(this, windows_core::from_raw_borrowed(&destination), gain).into() + IAudioInputNode_Impl::AddOutgoingConnectionWithGain(this, core::mem::transmute_copy(&destination), gain).into() } unsafe extern "system" fn RemoveOutgoingConnection(this: *mut core::ffi::c_void, destination: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioInputNode_Impl::RemoveOutgoingConnection(this, windows_core::from_raw_borrowed(&destination)).into() + IAudioInputNode_Impl::RemoveOutgoingConnection(this, core::mem::transmute_copy(&destination)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -3602,8 +3602,8 @@ pub trait IAudioNode_Impl: super::super::Foundation::IClosable_Impl { fn Start(&self) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; - fn DisableEffectsByDefinition(&self, definition: Option<&super::Effects::IAudioEffectDefinition>) -> windows_core::Result<()>; - fn EnableEffectsByDefinition(&self, definition: Option<&super::Effects::IAudioEffectDefinition>) -> windows_core::Result<()>; + fn DisableEffectsByDefinition(&self, definition: windows_core::Ref<'_, super::Effects::IAudioEffectDefinition>) -> windows_core::Result<()>; + fn EnableEffectsByDefinition(&self, definition: windows_core::Ref<'_, super::Effects::IAudioEffectDefinition>) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Collections", feature = "Media_Effects", feature = "Media_MediaProperties"))] impl IAudioNode_Vtbl { @@ -3672,11 +3672,11 @@ impl IAudioNode_Vtbl { } unsafe extern "system" fn DisableEffectsByDefinition(this: *mut core::ffi::c_void, definition: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioNode_Impl::DisableEffectsByDefinition(this, windows_core::from_raw_borrowed(&definition)).into() + IAudioNode_Impl::DisableEffectsByDefinition(this, core::mem::transmute_copy(&definition)).into() } unsafe extern "system" fn EnableEffectsByDefinition(this: *mut core::ffi::c_void, definition: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioNode_Impl::EnableEffectsByDefinition(this, windows_core::from_raw_borrowed(&definition)).into() + IAudioNode_Impl::EnableEffectsByDefinition(this, core::mem::transmute_copy(&definition)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -3979,7 +3979,7 @@ impl windows_core::RuntimeName for IAudioNodeWithListener { } #[cfg(all(feature = "Foundation_Collections", feature = "Media_Effects", feature = "Media_MediaProperties"))] pub trait IAudioNodeWithListener_Impl: IAudioNode_Impl + super::super::Foundation::IClosable_Impl { - fn SetListener(&self, value: Option<&AudioNodeListener>) -> windows_core::Result<()>; + fn SetListener(&self, value: windows_core::Ref<'_, AudioNodeListener>) -> windows_core::Result<()>; fn Listener(&self) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Collections", feature = "Media_Effects", feature = "Media_MediaProperties"))] @@ -3987,7 +3987,7 @@ impl IAudioNodeWithListener_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetListener(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioNodeWithListener_Impl::SetListener(this, windows_core::from_raw_borrowed(&value)).into() + IAudioNodeWithListener_Impl::SetListener(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Listener(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Media/Capture/mod.rs b/crates/libs/windows/src/Windows/Media/Capture/mod.rs index f4ef1bb7af..f1cc977568 100644 --- a/crates/libs/windows/src/Windows/Media/Capture/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Capture/mod.rs @@ -7025,7 +7025,7 @@ impl windows_core::RuntimeType for MediaCaptureFailedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl MediaCaptureFailedEventHandler { - pub fn new, Option<&MediaCaptureFailedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, MediaCaptureFailedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = MediaCaptureFailedEventHandlerBox { vtable: &MediaCaptureFailedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -7044,12 +7044,12 @@ pub struct MediaCaptureFailedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, erroreventargs: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct MediaCaptureFailedEventHandlerBox, Option<&MediaCaptureFailedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct MediaCaptureFailedEventHandlerBox, windows_core::Ref<'_, MediaCaptureFailedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const MediaCaptureFailedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&MediaCaptureFailedEventArgs>) -> windows_core::Result<()> + Send + 'static> MediaCaptureFailedEventHandlerBox { +impl, windows_core::Ref<'_, MediaCaptureFailedEventArgs>) -> windows_core::Result<()> + Send + 'static> MediaCaptureFailedEventHandlerBox { const VTABLE: MediaCaptureFailedEventHandler_Vtbl = MediaCaptureFailedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -7078,7 +7078,7 @@ impl, Option<&MediaCaptureFailedEventArgs>) -> wi } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, erroreventargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&erroreventargs)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&erroreventargs)).into() } } #[repr(transparent)] @@ -7966,7 +7966,7 @@ impl windows_core::RuntimeType for RecordLimitationExceededEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl RecordLimitationExceededEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = RecordLimitationExceededEventHandlerBox { vtable: &RecordLimitationExceededEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -7984,12 +7984,12 @@ pub struct RecordLimitationExceededEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct RecordLimitationExceededEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct RecordLimitationExceededEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const RecordLimitationExceededEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> RecordLimitationExceededEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> RecordLimitationExceededEventHandlerBox { const VTABLE: RecordLimitationExceededEventHandler_Vtbl = RecordLimitationExceededEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -8018,7 +8018,7 @@ impl) -> windows_core::Result<()> + Send + 'stati } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender)).into() + (this.invoke)(core::mem::transmute_copy(&sender)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Media/Core/mod.rs b/crates/libs/windows/src/Windows/Media/Core/mod.rs index 859f7bd984..501bef2225 100644 --- a/crates/libs/windows/src/Windows/Media/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Core/mod.rs @@ -2784,7 +2784,7 @@ impl windows_core::RuntimeName for ISingleSelectMediaTrackList { const NAME: &'static str = "Windows.Media.Core.ISingleSelectMediaTrackList"; } pub trait ISingleSelectMediaTrackList_Impl: windows_core::IUnknownImpl { - fn SelectedIndexChanged(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn SelectedIndexChanged(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveSelectedIndexChanged(&self, token: i64) -> windows_core::Result<()>; fn SetSelectedIndex(&self, value: i32) -> windows_core::Result<()>; fn SelectedIndex(&self) -> windows_core::Result; @@ -2793,7 +2793,7 @@ impl ISingleSelectMediaTrackList_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SelectedIndexChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISingleSelectMediaTrackList_Impl::SelectedIndexChanged(this, windows_core::from_raw_borrowed(&handler)) { + match ISingleSelectMediaTrackList_Impl::SelectedIndexChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Media/Devices/mod.rs b/crates/libs/windows/src/Windows/Media/Devices/mod.rs index 9338b691da..6442b7e9a8 100644 --- a/crates/libs/windows/src/Windows/Media/Devices/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Devices/mod.rs @@ -504,7 +504,7 @@ impl windows_core::RuntimeType for CallControlEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl CallControlEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = CallControlEventHandlerBox { vtable: &CallControlEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -522,12 +522,12 @@ pub struct CallControlEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct CallControlEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct CallControlEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const CallControlEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> CallControlEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> CallControlEventHandlerBox { const VTABLE: CallControlEventHandler_Vtbl = CallControlEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -556,7 +556,7 @@ impl) -> windows_core::Result<()> + Send + 'static } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender)).into() + (this.invoke)(core::mem::transmute_copy(&sender)).into() } } #[repr(transparent)] @@ -845,7 +845,7 @@ impl windows_core::RuntimeType for DialRequestedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl DialRequestedEventHandler { - pub fn new, Option<&DialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, DialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = DialRequestedEventHandlerBox { vtable: &DialRequestedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -864,12 +864,12 @@ pub struct DialRequestedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct DialRequestedEventHandlerBox, Option<&DialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct DialRequestedEventHandlerBox, windows_core::Ref<'_, DialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const DialRequestedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&DialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> DialRequestedEventHandlerBox { +impl, windows_core::Ref<'_, DialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> DialRequestedEventHandlerBox { const VTABLE: DialRequestedEventHandler_Vtbl = DialRequestedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -898,7 +898,7 @@ impl, Option<&DialRequestedEventArgs>) -> windows_ } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } #[repr(transparent)] @@ -2497,7 +2497,7 @@ impl windows_core::RuntimeName for IMediaDeviceController { pub trait IMediaDeviceController_Impl: windows_core::IUnknownImpl { fn GetAvailableMediaStreamProperties(&self, mediaStreamType: super::Capture::MediaStreamType) -> windows_core::Result>; fn GetMediaStreamProperties(&self, mediaStreamType: super::Capture::MediaStreamType) -> windows_core::Result; - fn SetMediaStreamPropertiesAsync(&self, mediaStreamType: super::Capture::MediaStreamType, mediaEncodingProperties: Option<&super::MediaProperties::IMediaEncodingProperties>) -> windows_core::Result; + fn SetMediaStreamPropertiesAsync(&self, mediaStreamType: super::Capture::MediaStreamType, mediaEncodingProperties: windows_core::Ref<'_, super::MediaProperties::IMediaEncodingProperties>) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Collections", feature = "Media_Capture", feature = "Media_MediaProperties"))] impl IMediaDeviceController_Vtbl { @@ -2526,7 +2526,7 @@ impl IMediaDeviceController_Vtbl { } unsafe extern "system" fn SetMediaStreamPropertiesAsync(this: *mut core::ffi::c_void, mediastreamtype: super::Capture::MediaStreamType, mediaencodingproperties: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMediaDeviceController_Impl::SetMediaStreamPropertiesAsync(this, mediastreamtype, windows_core::from_raw_borrowed(&mediaencodingproperties)) { + match IMediaDeviceController_Impl::SetMediaStreamPropertiesAsync(this, mediastreamtype, core::mem::transmute_copy(&mediaencodingproperties)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -3076,7 +3076,7 @@ impl windows_core::RuntimeType for KeypadPressedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl KeypadPressedEventHandler { - pub fn new, Option<&KeypadPressedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, KeypadPressedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = KeypadPressedEventHandlerBox { vtable: &KeypadPressedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -3095,12 +3095,12 @@ pub struct KeypadPressedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct KeypadPressedEventHandlerBox, Option<&KeypadPressedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct KeypadPressedEventHandlerBox, windows_core::Ref<'_, KeypadPressedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const KeypadPressedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&KeypadPressedEventArgs>) -> windows_core::Result<()> + Send + 'static> KeypadPressedEventHandlerBox { +impl, windows_core::Ref<'_, KeypadPressedEventArgs>) -> windows_core::Result<()> + Send + 'static> KeypadPressedEventHandlerBox { const VTABLE: KeypadPressedEventHandler_Vtbl = KeypadPressedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -3129,7 +3129,7 @@ impl, Option<&KeypadPressedEventArgs>) -> windows_ } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } #[repr(transparent)] @@ -3764,7 +3764,7 @@ impl windows_core::RuntimeType for RedialRequestedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl RedialRequestedEventHandler { - pub fn new, Option<&RedialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, RedialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = RedialRequestedEventHandlerBox { vtable: &RedialRequestedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -3783,12 +3783,12 @@ pub struct RedialRequestedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct RedialRequestedEventHandlerBox, Option<&RedialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct RedialRequestedEventHandlerBox, windows_core::Ref<'_, RedialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const RedialRequestedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&RedialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> RedialRequestedEventHandlerBox { +impl, windows_core::Ref<'_, RedialRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> RedialRequestedEventHandlerBox { const VTABLE: RedialRequestedEventHandler_Vtbl = RedialRequestedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -3817,7 +3817,7 @@ impl, Option<&RedialRequestedEventArgs>) -> window } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Media/Effects/mod.rs b/crates/libs/windows/src/Windows/Media/Effects/mod.rs index 15e7e15bb5..a202a17791 100644 --- a/crates/libs/windows/src/Windows/Media/Effects/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Effects/mod.rs @@ -610,8 +610,8 @@ impl windows_core::RuntimeName for IBasicAudioEffect { pub trait IBasicAudioEffect_Impl: super::IMediaExtension_Impl { fn UseInputFrameForOutput(&self) -> windows_core::Result; fn SupportedEncodingProperties(&self) -> windows_core::Result>; - fn SetEncodingProperties(&self, encodingProperties: Option<&super::MediaProperties::AudioEncodingProperties>) -> windows_core::Result<()>; - fn ProcessFrame(&self, context: Option<&ProcessAudioFrameContext>) -> windows_core::Result<()>; + fn SetEncodingProperties(&self, encodingProperties: windows_core::Ref<'_, super::MediaProperties::AudioEncodingProperties>) -> windows_core::Result<()>; + fn ProcessFrame(&self, context: windows_core::Ref<'_, ProcessAudioFrameContext>) -> windows_core::Result<()>; fn Close(&self, reason: MediaEffectClosedReason) -> windows_core::Result<()>; fn DiscardQueuedFrames(&self) -> windows_core::Result<()>; } @@ -641,11 +641,11 @@ impl IBasicAudioEffect_Vtbl { } unsafe extern "system" fn SetEncodingProperties(this: *mut core::ffi::c_void, encodingproperties: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBasicAudioEffect_Impl::SetEncodingProperties(this, windows_core::from_raw_borrowed(&encodingproperties)).into() + IBasicAudioEffect_Impl::SetEncodingProperties(this, core::mem::transmute_copy(&encodingproperties)).into() } unsafe extern "system" fn ProcessFrame(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBasicAudioEffect_Impl::ProcessFrame(this, windows_core::from_raw_borrowed(&context)).into() + IBasicAudioEffect_Impl::ProcessFrame(this, core::mem::transmute_copy(&context)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void, reason: MediaEffectClosedReason) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -764,8 +764,8 @@ pub trait IBasicVideoEffect_Impl: super::IMediaExtension_Impl { fn SupportedMemoryTypes(&self) -> windows_core::Result; fn TimeIndependent(&self) -> windows_core::Result; fn SupportedEncodingProperties(&self) -> windows_core::Result>; - fn SetEncodingProperties(&self, encodingProperties: Option<&super::MediaProperties::VideoEncodingProperties>, device: Option<&super::super::Graphics::DirectX::Direct3D11::IDirect3DDevice>) -> windows_core::Result<()>; - fn ProcessFrame(&self, context: Option<&ProcessVideoFrameContext>) -> windows_core::Result<()>; + fn SetEncodingProperties(&self, encodingProperties: windows_core::Ref<'_, super::MediaProperties::VideoEncodingProperties>, device: windows_core::Ref<'_, super::super::Graphics::DirectX::Direct3D11::IDirect3DDevice>) -> windows_core::Result<()>; + fn ProcessFrame(&self, context: windows_core::Ref<'_, ProcessVideoFrameContext>) -> windows_core::Result<()>; fn Close(&self, reason: MediaEffectClosedReason) -> windows_core::Result<()>; fn DiscardQueuedFrames(&self) -> windows_core::Result<()>; } @@ -815,11 +815,11 @@ impl IBasicVideoEffect_Vtbl { } unsafe extern "system" fn SetEncodingProperties(this: *mut core::ffi::c_void, encodingproperties: *mut core::ffi::c_void, device: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBasicVideoEffect_Impl::SetEncodingProperties(this, windows_core::from_raw_borrowed(&encodingproperties), windows_core::from_raw_borrowed(&device)).into() + IBasicVideoEffect_Impl::SetEncodingProperties(this, core::mem::transmute_copy(&encodingproperties), core::mem::transmute_copy(&device)).into() } unsafe extern "system" fn ProcessFrame(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBasicVideoEffect_Impl::ProcessFrame(this, windows_core::from_raw_borrowed(&context)).into() + IBasicVideoEffect_Impl::ProcessFrame(this, core::mem::transmute_copy(&context)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void, reason: MediaEffectClosedReason) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -965,8 +965,8 @@ impl windows_core::RuntimeName for IVideoCompositor { #[cfg(all(feature = "Foundation_Collections", feature = "Graphics_DirectX_Direct3D11", feature = "Media_MediaProperties"))] pub trait IVideoCompositor_Impl: super::IMediaExtension_Impl { fn TimeIndependent(&self) -> windows_core::Result; - fn SetEncodingProperties(&self, backgroundProperties: Option<&super::MediaProperties::VideoEncodingProperties>, device: Option<&super::super::Graphics::DirectX::Direct3D11::IDirect3DDevice>) -> windows_core::Result<()>; - fn CompositeFrame(&self, context: Option<&CompositeVideoFrameContext>) -> windows_core::Result<()>; + fn SetEncodingProperties(&self, backgroundProperties: windows_core::Ref<'_, super::MediaProperties::VideoEncodingProperties>, device: windows_core::Ref<'_, super::super::Graphics::DirectX::Direct3D11::IDirect3DDevice>) -> windows_core::Result<()>; + fn CompositeFrame(&self, context: windows_core::Ref<'_, CompositeVideoFrameContext>) -> windows_core::Result<()>; fn Close(&self, reason: MediaEffectClosedReason) -> windows_core::Result<()>; fn DiscardQueuedFrames(&self) -> windows_core::Result<()>; } @@ -985,11 +985,11 @@ impl IVideoCompositor_Vtbl { } unsafe extern "system" fn SetEncodingProperties(this: *mut core::ffi::c_void, backgroundproperties: *mut core::ffi::c_void, device: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVideoCompositor_Impl::SetEncodingProperties(this, windows_core::from_raw_borrowed(&backgroundproperties), windows_core::from_raw_borrowed(&device)).into() + IVideoCompositor_Impl::SetEncodingProperties(this, core::mem::transmute_copy(&backgroundproperties), core::mem::transmute_copy(&device)).into() } unsafe extern "system" fn CompositeFrame(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVideoCompositor_Impl::CompositeFrame(this, windows_core::from_raw_borrowed(&context)).into() + IVideoCompositor_Impl::CompositeFrame(this, core::mem::transmute_copy(&context)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void, reason: MediaEffectClosedReason) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Media/Playback/mod.rs b/crates/libs/windows/src/Windows/Media/Playback/mod.rs index 1caf587029..32204ec1f6 100644 --- a/crates/libs/windows/src/Windows/Media/Playback/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Playback/mod.rs @@ -348,7 +348,7 @@ impl windows_core::RuntimeName for IMediaEnginePlaybackSource { #[cfg(feature = "deprecated")] pub trait IMediaEnginePlaybackSource_Impl: windows_core::IUnknownImpl { fn CurrentItem(&self) -> windows_core::Result; - fn SetPlaybackSource(&self, source: Option<&IMediaPlaybackSource>) -> windows_core::Result<()>; + fn SetPlaybackSource(&self, source: windows_core::Ref<'_, IMediaPlaybackSource>) -> windows_core::Result<()>; } #[cfg(feature = "deprecated")] impl IMediaEnginePlaybackSource_Vtbl { @@ -366,7 +366,7 @@ impl IMediaEnginePlaybackSource_Vtbl { } unsafe extern "system" fn SetPlaybackSource(this: *mut core::ffi::c_void, source: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaEnginePlaybackSource_Impl::SetPlaybackSource(this, windows_core::from_raw_borrowed(&source)).into() + IMediaEnginePlaybackSource_Impl::SetPlaybackSource(this, core::mem::transmute_copy(&source)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), 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 304e1252ce..ad9651ddab 100644 --- a/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs @@ -366,7 +366,7 @@ impl windows_core::RuntimeName for INDDownloadEngine { } #[cfg(feature = "deprecated")] pub trait INDDownloadEngine_Impl: windows_core::IUnknownImpl { - fn Open(&self, uri: Option<&super::super::super::Foundation::Uri>, sessionIDBytes: &[u8]) -> windows_core::Result<()>; + fn Open(&self, uri: windows_core::Ref<'_, super::super::super::Foundation::Uri>, sessionIDBytes: &[u8]) -> windows_core::Result<()>; fn Pause(&self) -> windows_core::Result<()>; fn Resume(&self) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; @@ -381,7 +381,7 @@ impl INDDownloadEngine_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, uri: *mut core::ffi::c_void, sessionidbytes_array_size: u32, sessionidbytes: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INDDownloadEngine_Impl::Open(this, windows_core::from_raw_borrowed(&uri), core::slice::from_raw_parts(core::mem::transmute_copy(&sessionidbytes), sessionidbytes_array_size as usize)).into() + INDDownloadEngine_Impl::Open(this, core::mem::transmute_copy(&uri), core::slice::from_raw_parts(core::mem::transmute_copy(&sessionidbytes), sessionidbytes_array_size as usize)).into() } unsafe extern "system" fn Pause(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -550,7 +550,7 @@ impl windows_core::RuntimeName for INDDownloadEngineNotifier { pub trait INDDownloadEngineNotifier_Impl: windows_core::IUnknownImpl { fn OnStreamOpened(&self) -> windows_core::Result<()>; fn OnPlayReadyObjectReceived(&self, dataBytes: &[u8]) -> windows_core::Result<()>; - fn OnContentIDReceived(&self, licenseFetchDescriptor: Option<&INDLicenseFetchDescriptor>) -> windows_core::Result<()>; + fn OnContentIDReceived(&self, licenseFetchDescriptor: windows_core::Ref<'_, INDLicenseFetchDescriptor>) -> windows_core::Result<()>; fn OnDataReceived(&self, dataBytes: &[u8], bytesReceived: u32) -> windows_core::Result<()>; fn OnEndOfStream(&self) -> windows_core::Result<()>; fn OnNetworkError(&self) -> windows_core::Result<()>; @@ -568,7 +568,7 @@ impl INDDownloadEngineNotifier_Vtbl { } unsafe extern "system" fn OnContentIDReceived(this: *mut core::ffi::c_void, licensefetchdescriptor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INDDownloadEngineNotifier_Impl::OnContentIDReceived(this, windows_core::from_raw_borrowed(&licensefetchdescriptor)).into() + INDDownloadEngineNotifier_Impl::OnContentIDReceived(this, core::mem::transmute_copy(&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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -736,7 +736,7 @@ pub trait INDLicenseFetchDescriptor_Impl: windows_core::IUnknownImpl { fn ContentIDType(&self) -> windows_core::Result; fn ContentID(&self) -> windows_core::Result>; fn LicenseFetchChallengeCustomData(&self) -> windows_core::Result; - fn SetLicenseFetchChallengeCustomData(&self, licenseFetchChallengeCustomData: Option<&INDCustomData>) -> windows_core::Result<()>; + fn SetLicenseFetchChallengeCustomData(&self, licenseFetchChallengeCustomData: windows_core::Ref<'_, INDCustomData>) -> windows_core::Result<()>; } #[cfg(feature = "deprecated")] impl INDLicenseFetchDescriptor_Vtbl { @@ -776,7 +776,7 @@ impl INDLicenseFetchDescriptor_Vtbl { } unsafe extern "system" fn SetLicenseFetchChallengeCustomData(this: *mut core::ffi::c_void, licensefetchchallengecustomdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INDLicenseFetchDescriptor_Impl::SetLicenseFetchChallengeCustomData(this, windows_core::from_raw_borrowed(&licensefetchchallengecustomdata)).into() + INDLicenseFetchDescriptor_Impl::SetLicenseFetchChallengeCustomData(this, core::mem::transmute_copy(&licensefetchchallengecustomdata)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -1341,14 +1341,14 @@ impl windows_core::RuntimeName for INDStorageFileHelper { } #[cfg(all(feature = "Foundation_Collections", feature = "Storage_Streams", feature = "deprecated"))] pub trait INDStorageFileHelper_Impl: windows_core::IUnknownImpl { - fn GetFileURLs(&self, file: Option<&super::super::super::Storage::IStorageFile>) -> windows_core::Result>; + fn GetFileURLs(&self, file: windows_core::Ref<'_, super::super::super::Storage::IStorageFile>) -> windows_core::Result>; } #[cfg(all(feature = "Foundation_Collections", feature = "Storage_Streams", feature = "deprecated"))] impl INDStorageFileHelper_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetFileURLs(this: *mut core::ffi::c_void, file: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INDStorageFileHelper_Impl::GetFileURLs(this, windows_core::from_raw_borrowed(&file)) { + match INDStorageFileHelper_Impl::GetFileURLs(this, core::mem::transmute_copy(&file)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1424,7 +1424,7 @@ impl windows_core::RuntimeName for INDStreamParser { #[cfg(all(feature = "Media_Core", feature = "deprecated"))] pub trait INDStreamParser_Impl: windows_core::IUnknownImpl { fn ParseData(&self, dataBytes: &[u8]) -> windows_core::Result<()>; - fn GetStreamInformation(&self, descriptor: Option<&super::super::Core::IMediaStreamDescriptor>, streamType: &mut NDMediaStreamType) -> windows_core::Result; + fn GetStreamInformation(&self, descriptor: windows_core::Ref<'_, super::super::Core::IMediaStreamDescriptor>, streamType: &mut NDMediaStreamType) -> windows_core::Result; fn BeginOfStream(&self) -> windows_core::Result<()>; fn EndOfStream(&self) -> windows_core::Result<()>; fn Notifier(&self) -> windows_core::Result; @@ -1438,7 +1438,7 @@ impl INDStreamParser_Vtbl { } unsafe extern "system" fn GetStreamInformation(this: *mut core::ffi::c_void, descriptor: *mut core::ffi::c_void, streamtype: *mut NDMediaStreamType, result__: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INDStreamParser_Impl::GetStreamInformation(this, windows_core::from_raw_borrowed(&descriptor), core::mem::transmute_copy(&streamtype)) { + match INDStreamParser_Impl::GetStreamInformation(this, core::mem::transmute_copy(&descriptor), core::mem::transmute_copy(&streamtype)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1553,29 +1553,29 @@ impl windows_core::RuntimeName for INDStreamParserNotifier { } #[cfg(all(feature = "Foundation_Collections", feature = "Media_Core", feature = "deprecated"))] pub trait INDStreamParserNotifier_Impl: windows_core::IUnknownImpl { - fn OnContentIDReceived(&self, licenseFetchDescriptor: Option<&INDLicenseFetchDescriptor>) -> windows_core::Result<()>; - fn OnMediaStreamDescriptorCreated(&self, audioStreamDescriptors: Option<&super::super::super::Foundation::Collections::IVector>, videoStreamDescriptors: Option<&super::super::super::Foundation::Collections::IVector>) -> windows_core::Result<()>; - fn OnSampleParsed(&self, streamID: u32, streamType: NDMediaStreamType, streamSample: Option<&super::super::Core::MediaStreamSample>, pts: i64, ccFormat: NDClosedCaptionFormat, ccDataBytes: &[u8]) -> windows_core::Result<()>; - fn OnBeginSetupDecryptor(&self, descriptor: Option<&super::super::Core::IMediaStreamDescriptor>, keyID: &windows_core::GUID, proBytes: &[u8]) -> windows_core::Result<()>; + fn OnContentIDReceived(&self, licenseFetchDescriptor: windows_core::Ref<'_, INDLicenseFetchDescriptor>) -> windows_core::Result<()>; + fn OnMediaStreamDescriptorCreated(&self, audioStreamDescriptors: windows_core::Ref<'_, super::super::super::Foundation::Collections::IVector>, videoStreamDescriptors: windows_core::Ref<'_, super::super::super::Foundation::Collections::IVector>) -> windows_core::Result<()>; + fn OnSampleParsed(&self, streamID: u32, streamType: NDMediaStreamType, streamSample: windows_core::Ref<'_, super::super::Core::MediaStreamSample>, pts: i64, ccFormat: NDClosedCaptionFormat, ccDataBytes: &[u8]) -> windows_core::Result<()>; + fn OnBeginSetupDecryptor(&self, descriptor: windows_core::Ref<'_, super::super::Core::IMediaStreamDescriptor>, keyID: &windows_core::GUID, proBytes: &[u8]) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Collections", feature = "Media_Core", feature = "deprecated"))] impl INDStreamParserNotifier_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnContentIDReceived(this: *mut core::ffi::c_void, licensefetchdescriptor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INDStreamParserNotifier_Impl::OnContentIDReceived(this, windows_core::from_raw_borrowed(&licensefetchdescriptor)).into() + INDStreamParserNotifier_Impl::OnContentIDReceived(this, core::mem::transmute_copy(&licensefetchdescriptor)).into() } unsafe extern "system" fn OnMediaStreamDescriptorCreated(this: *mut core::ffi::c_void, audiostreamdescriptors: *mut core::ffi::c_void, videostreamdescriptors: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INDStreamParserNotifier_Impl::OnMediaStreamDescriptorCreated(this, windows_core::from_raw_borrowed(&audiostreamdescriptors), windows_core::from_raw_borrowed(&videostreamdescriptors)).into() + INDStreamParserNotifier_Impl::OnMediaStreamDescriptorCreated(this, core::mem::transmute_copy(&audiostreamdescriptors), core::mem::transmute_copy(&videostreamdescriptors)).into() } unsafe extern "system" fn OnSampleParsed(this: *mut core::ffi::c_void, streamid: u32, streamtype: NDMediaStreamType, streamsample: *mut core::ffi::c_void, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes_array_size: u32, ccdatabytes: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INDStreamParserNotifier_Impl::OnSampleParsed(this, streamid, streamtype, windows_core::from_raw_borrowed(&streamsample), pts, ccformat, core::slice::from_raw_parts(core::mem::transmute_copy(&ccdatabytes), ccdatabytes_array_size as usize)).into() + INDStreamParserNotifier_Impl::OnSampleParsed(this, streamid, streamtype, core::mem::transmute_copy(&streamsample), pts, ccformat, core::slice::from_raw_parts(core::mem::transmute_copy(&ccdatabytes), ccdatabytes_array_size as usize)).into() } unsafe extern "system" fn OnBeginSetupDecryptor(this: *mut core::ffi::c_void, descriptor: *mut core::ffi::c_void, keyid: windows_core::GUID, probytes_array_size: u32, probytes: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INDStreamParserNotifier_Impl::OnBeginSetupDecryptor(this, windows_core::from_raw_borrowed(&descriptor), core::mem::transmute(&keyid), core::slice::from_raw_parts(core::mem::transmute_copy(&probytes), probytes_array_size as usize)).into() + INDStreamParserNotifier_Impl::OnBeginSetupDecryptor(this, core::mem::transmute_copy(&descriptor), core::mem::transmute(&keyid), core::slice::from_raw_parts(core::mem::transmute_copy(&probytes), probytes_array_size as usize)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -2466,7 +2466,7 @@ impl windows_core::RuntimeName for IPlayReadyLicenseAcquisitionServiceRequest { } pub trait IPlayReadyLicenseAcquisitionServiceRequest_Impl: super::IMediaProtectionServiceRequest_Impl + IPlayReadyServiceRequest_Impl { fn ContentHeader(&self) -> windows_core::Result; - fn SetContentHeader(&self, value: Option<&PlayReadyContentHeader>) -> windows_core::Result<()>; + fn SetContentHeader(&self, value: windows_core::Ref<'_, PlayReadyContentHeader>) -> windows_core::Result<()>; fn DomainServiceId(&self) -> windows_core::Result; fn SetDomainServiceId(&self, value: &windows_core::GUID) -> windows_core::Result<()>; } @@ -2485,7 +2485,7 @@ impl IPlayReadyLicenseAcquisitionServiceRequest_Vtbl { } unsafe extern "system" fn SetContentHeader(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPlayReadyLicenseAcquisitionServiceRequest_Impl::SetContentHeader(this, windows_core::from_raw_borrowed(&value)).into() + IPlayReadyLicenseAcquisitionServiceRequest_Impl::SetContentHeader(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn DomainServiceId(this: *mut core::ffi::c_void, result__: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2589,7 +2589,7 @@ impl windows_core::RuntimeName for IPlayReadyLicenseSession { } pub trait IPlayReadyLicenseSession_Impl: windows_core::IUnknownImpl { fn CreateLAServiceRequest(&self) -> windows_core::Result; - fn ConfigureMediaProtectionManager(&self, mpm: Option<&super::MediaProtectionManager>) -> windows_core::Result<()>; + fn ConfigureMediaProtectionManager(&self, mpm: windows_core::Ref<'_, super::MediaProtectionManager>) -> windows_core::Result<()>; } impl IPlayReadyLicenseSession_Vtbl { pub const fn new() -> Self { @@ -2606,7 +2606,7 @@ impl IPlayReadyLicenseSession_Vtbl { } unsafe extern "system" fn ConfigureMediaProtectionManager(this: *mut core::ffi::c_void, mpm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPlayReadyLicenseSession_Impl::ConfigureMediaProtectionManager(this, windows_core::from_raw_borrowed(&mpm)).into() + IPlayReadyLicenseSession_Impl::ConfigureMediaProtectionManager(this, core::mem::transmute_copy(&mpm)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -2663,14 +2663,14 @@ impl windows_core::RuntimeName for IPlayReadyLicenseSession2 { } #[cfg(feature = "Foundation_Collections")] pub trait IPlayReadyLicenseSession2_Impl: IPlayReadyLicenseSession_Impl { - fn CreateLicenseIterable(&self, contentHeader: Option<&PlayReadyContentHeader>, fullyEvaluated: bool) -> windows_core::Result; + fn CreateLicenseIterable(&self, contentHeader: windows_core::Ref<'_, PlayReadyContentHeader>, fullyEvaluated: bool) -> windows_core::Result; } #[cfg(feature = "Foundation_Collections")] impl IPlayReadyLicenseSession2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateLicenseIterable(this: *mut core::ffi::c_void, contentheader: *mut core::ffi::c_void, fullyevaluated: bool, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPlayReadyLicenseSession2_Impl::CreateLicenseIterable(this, windows_core::from_raw_borrowed(&contentheader), fullyevaluated) { + match IPlayReadyLicenseSession2_Impl::CreateLicenseIterable(this, core::mem::transmute_copy(&contentheader), fullyevaluated) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -3038,7 +3038,7 @@ impl windows_core::RuntimeName for IPlayReadyServiceRequest { } pub trait IPlayReadyServiceRequest_Impl: super::IMediaProtectionServiceRequest_Impl { fn Uri(&self) -> windows_core::Result; - fn SetUri(&self, value: Option<&super::super::super::Foundation::Uri>) -> windows_core::Result<()>; + fn SetUri(&self, value: windows_core::Ref<'_, super::super::super::Foundation::Uri>) -> windows_core::Result<()>; fn ResponseCustomData(&self) -> windows_core::Result; fn ChallengeCustomData(&self) -> windows_core::Result; fn SetChallengeCustomData(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; @@ -3062,7 +3062,7 @@ impl IPlayReadyServiceRequest_Vtbl { } unsafe extern "system" fn SetUri(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPlayReadyServiceRequest_Impl::SetUri(this, windows_core::from_raw_borrowed(&value)).into() + IPlayReadyServiceRequest_Impl::SetUri(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn ResponseCustomData(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Media/Protection/mod.rs b/crates/libs/windows/src/Windows/Media/Protection/mod.rs index d515cef795..2deec02347 100644 --- a/crates/libs/windows/src/Windows/Media/Protection/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Protection/mod.rs @@ -37,7 +37,7 @@ impl windows_core::RuntimeType for ComponentLoadFailedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl ComponentLoadFailedEventHandler { - pub fn new, Option<&ComponentLoadFailedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, ComponentLoadFailedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = ComponentLoadFailedEventHandlerBox { vtable: &ComponentLoadFailedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -56,12 +56,12 @@ pub struct ComponentLoadFailedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct ComponentLoadFailedEventHandlerBox, Option<&ComponentLoadFailedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct ComponentLoadFailedEventHandlerBox, windows_core::Ref<'_, ComponentLoadFailedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const ComponentLoadFailedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&ComponentLoadFailedEventArgs>) -> windows_core::Result<()> + Send + 'static> ComponentLoadFailedEventHandlerBox { +impl, windows_core::Ref<'_, ComponentLoadFailedEventArgs>) -> windows_core::Result<()> + Send + 'static> ComponentLoadFailedEventHandlerBox { const VTABLE: ComponentLoadFailedEventHandler_Vtbl = ComponentLoadFailedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -90,7 +90,7 @@ impl, Option<&ComponentLoadFailedEventA } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } pub struct ComponentRenewal; @@ -616,7 +616,7 @@ impl windows_core::RuntimeType for RebootNeededEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl RebootNeededEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = RebootNeededEventHandlerBox { vtable: &RebootNeededEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -634,12 +634,12 @@ pub struct RebootNeededEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct RebootNeededEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct RebootNeededEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const RebootNeededEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> RebootNeededEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> RebootNeededEventHandlerBox { const VTABLE: RebootNeededEventHandler_Vtbl = RebootNeededEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -668,7 +668,7 @@ impl) -> windows_core::Result<()> + Sen } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender)).into() + (this.invoke)(core::mem::transmute_copy(&sender)).into() } } #[repr(transparent)] @@ -870,7 +870,7 @@ impl windows_core::RuntimeType for ServiceRequestedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl ServiceRequestedEventHandler { - pub fn new, Option<&ServiceRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, ServiceRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = ServiceRequestedEventHandlerBox { vtable: &ServiceRequestedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -889,12 +889,12 @@ pub struct ServiceRequestedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct ServiceRequestedEventHandlerBox, Option<&ServiceRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct ServiceRequestedEventHandlerBox, windows_core::Ref<'_, ServiceRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const ServiceRequestedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&ServiceRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> ServiceRequestedEventHandlerBox { +impl, windows_core::Ref<'_, ServiceRequestedEventArgs>) -> windows_core::Result<()> + Send + 'static> ServiceRequestedEventHandlerBox { const VTABLE: ServiceRequestedEventHandler_Vtbl = ServiceRequestedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -923,6 +923,6 @@ impl, Option<&ServiceRequestedEventArgs } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } diff --git a/crates/libs/windows/src/Windows/Media/mod.rs b/crates/libs/windows/src/Windows/Media/mod.rs index 0b2a07b577..20dc1d7039 100644 --- a/crates/libs/windows/src/Windows/Media/mod.rs +++ b/crates/libs/windows/src/Windows/Media/mod.rs @@ -481,14 +481,14 @@ impl windows_core::RuntimeName for IMediaExtension { } #[cfg(feature = "Foundation_Collections")] pub trait IMediaExtension_Impl: windows_core::IUnknownImpl { - fn SetProperties(&self, configuration: Option<&super::Foundation::Collections::IPropertySet>) -> windows_core::Result<()>; + fn SetProperties(&self, configuration: windows_core::Ref<'_, super::Foundation::Collections::IPropertySet>) -> windows_core::Result<()>; } #[cfg(feature = "Foundation_Collections")] impl IMediaExtension_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetProperties(this: *mut core::ffi::c_void, configuration: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaExtension_Impl::SetProperties(this, windows_core::from_raw_borrowed(&configuration)).into() + IMediaExtension_Impl::SetProperties(this, core::mem::transmute_copy(&configuration)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), SetProperties: SetProperties:: } } @@ -649,11 +649,11 @@ impl windows_core::RuntimeName for IMediaFrame { pub trait IMediaFrame_Impl: super::Foundation::IClosable_Impl { fn Type(&self) -> windows_core::Result; fn IsReadOnly(&self) -> windows_core::Result; - fn SetRelativeTime(&self, value: Option<&super::Foundation::IReference>) -> windows_core::Result<()>; + fn SetRelativeTime(&self, value: windows_core::Ref<'_, super::Foundation::IReference>) -> windows_core::Result<()>; fn RelativeTime(&self) -> windows_core::Result>; - fn SetSystemRelativeTime(&self, value: Option<&super::Foundation::IReference>) -> windows_core::Result<()>; + fn SetSystemRelativeTime(&self, value: windows_core::Ref<'_, super::Foundation::IReference>) -> windows_core::Result<()>; fn SystemRelativeTime(&self) -> windows_core::Result>; - fn SetDuration(&self, value: Option<&super::Foundation::IReference>) -> windows_core::Result<()>; + fn SetDuration(&self, value: windows_core::Ref<'_, super::Foundation::IReference>) -> windows_core::Result<()>; fn Duration(&self) -> windows_core::Result>; fn SetIsDiscontinuous(&self, value: bool) -> windows_core::Result<()>; fn IsDiscontinuous(&self) -> windows_core::Result; @@ -685,7 +685,7 @@ impl IMediaFrame_Vtbl { } unsafe extern "system" fn SetRelativeTime(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaFrame_Impl::SetRelativeTime(this, windows_core::from_raw_borrowed(&value)).into() + IMediaFrame_Impl::SetRelativeTime(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn RelativeTime(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -700,7 +700,7 @@ impl IMediaFrame_Vtbl { } unsafe extern "system" fn SetSystemRelativeTime(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaFrame_Impl::SetSystemRelativeTime(this, windows_core::from_raw_borrowed(&value)).into() + IMediaFrame_Impl::SetSystemRelativeTime(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn SystemRelativeTime(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -715,7 +715,7 @@ impl IMediaFrame_Vtbl { } unsafe extern "system" fn SetDuration(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaFrame_Impl::SetDuration(this, windows_core::from_raw_borrowed(&value)).into() + IMediaFrame_Impl::SetDuration(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Duration(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/mod.rs b/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/mod.rs index 2f0c069a03..e1fa141e80 100644 --- a/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/mod.rs @@ -1369,9 +1369,9 @@ impl windows_core::RuntimeName for IBackgroundTransferBase { pub trait IBackgroundTransferBase_Impl: windows_core::IUnknownImpl { fn SetRequestHeader(&self, headerName: &windows_core::HSTRING, headerValue: &windows_core::HSTRING) -> windows_core::Result<()>; fn ServerCredential(&self) -> windows_core::Result; - fn SetServerCredential(&self, credential: Option<&super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; + fn SetServerCredential(&self, credential: windows_core::Ref<'_, super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; fn ProxyCredential(&self) -> windows_core::Result; - fn SetProxyCredential(&self, credential: Option<&super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; + fn SetProxyCredential(&self, credential: windows_core::Ref<'_, super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; fn Method(&self) -> windows_core::Result; fn SetMethod(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; fn Group(&self) -> windows_core::Result; @@ -1399,7 +1399,7 @@ impl IBackgroundTransferBase_Vtbl { } unsafe extern "system" fn SetServerCredential(this: *mut core::ffi::c_void, credential: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundTransferBase_Impl::SetServerCredential(this, windows_core::from_raw_borrowed(&credential)).into() + IBackgroundTransferBase_Impl::SetServerCredential(this, core::mem::transmute_copy(&credential)).into() } unsafe extern "system" fn ProxyCredential(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1414,7 +1414,7 @@ impl IBackgroundTransferBase_Vtbl { } unsafe extern "system" fn SetProxyCredential(this: *mut core::ffi::c_void, credential: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundTransferBase_Impl::SetProxyCredential(this, windows_core::from_raw_borrowed(&credential)).into() + IBackgroundTransferBase_Impl::SetProxyCredential(this, core::mem::transmute_copy(&credential)).into() } unsafe extern "system" fn Method(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs b/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs index 2d08ef545e..1fe7b1c2af 100644 --- a/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs @@ -1799,7 +1799,7 @@ impl windows_core::RuntimeType for NetworkStatusChangedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl NetworkStatusChangedEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = NetworkStatusChangedEventHandlerBox { vtable: &NetworkStatusChangedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1817,12 +1817,12 @@ pub struct NetworkStatusChangedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct NetworkStatusChangedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct NetworkStatusChangedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const NetworkStatusChangedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> NetworkStatusChangedEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> NetworkStatusChangedEventHandlerBox { const VTABLE: NetworkStatusChangedEventHandler_Vtbl = NetworkStatusChangedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -1851,7 +1851,7 @@ impl) -> windows_core::Result<()> + } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender)).into() + (this.invoke)(core::mem::transmute_copy(&sender)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs b/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs index 8bf7c694fa..ad97bdb37b 100644 --- a/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs @@ -28,7 +28,7 @@ impl windows_core::RuntimeType for DeviceArrivedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl DeviceArrivedEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = DeviceArrivedEventHandlerBox { vtable: &DeviceArrivedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -46,12 +46,12 @@ pub struct DeviceArrivedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct DeviceArrivedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct DeviceArrivedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const DeviceArrivedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> DeviceArrivedEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> DeviceArrivedEventHandlerBox { const VTABLE: DeviceArrivedEventHandler_Vtbl = DeviceArrivedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -80,7 +80,7 @@ impl) -> windows_core::Result<()> + Send + 'st } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender)).into() + (this.invoke)(core::mem::transmute_copy(&sender)).into() } } windows_core::imp::define_interface!(DeviceDepartedEventHandler, DeviceDepartedEventHandler_Vtbl, 0xefa9da69_f6e2_49c9_a49e_8e0fc58fb911); @@ -88,7 +88,7 @@ impl windows_core::RuntimeType for DeviceDepartedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl DeviceDepartedEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = DeviceDepartedEventHandlerBox { vtable: &DeviceDepartedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -106,12 +106,12 @@ pub struct DeviceDepartedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct DeviceDepartedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct DeviceDepartedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const DeviceDepartedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> DeviceDepartedEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> DeviceDepartedEventHandlerBox { const VTABLE: DeviceDepartedEventHandler_Vtbl = DeviceDepartedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -140,7 +140,7 @@ impl) -> windows_core::Result<()> + Send + 'st } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender)).into() + (this.invoke)(core::mem::transmute_copy(&sender)).into() } } windows_core::imp::define_interface!(IConnectionRequestedEventArgs, IConnectionRequestedEventArgs_Vtbl, 0xeb6891ae_4f1e_4c66_bd0d_46924a942e08); @@ -335,7 +335,7 @@ impl windows_core::RuntimeType for MessageReceivedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl MessageReceivedHandler { - pub fn new, Option<&ProximityMessage>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, ProximityMessage>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = MessageReceivedHandlerBox { vtable: &MessageReceivedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -354,12 +354,12 @@ pub struct MessageReceivedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, message: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct MessageReceivedHandlerBox, Option<&ProximityMessage>) -> windows_core::Result<()> + Send + 'static> { +struct MessageReceivedHandlerBox, windows_core::Ref<'_, ProximityMessage>) -> windows_core::Result<()> + Send + 'static> { vtable: *const MessageReceivedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&ProximityMessage>) -> windows_core::Result<()> + Send + 'static> MessageReceivedHandlerBox { +impl, windows_core::Ref<'_, ProximityMessage>) -> windows_core::Result<()> + Send + 'static> MessageReceivedHandlerBox { const VTABLE: MessageReceivedHandler_Vtbl = MessageReceivedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -388,7 +388,7 @@ impl, Option<&ProximityMessage>) -> windows_co } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, message: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&message)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&message)).into() } } windows_core::imp::define_interface!(MessageTransmittedHandler, MessageTransmittedHandler_Vtbl, 0xefaa0b4a_f6e2_4d7d_856c_78fc8efc021e); @@ -396,7 +396,7 @@ impl windows_core::RuntimeType for MessageTransmittedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl MessageTransmittedHandler { - pub fn new, i64) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, i64) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = MessageTransmittedHandlerBox { vtable: &MessageTransmittedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -414,12 +414,12 @@ pub struct MessageTransmittedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, messageid: i64) -> windows_core::HRESULT, } #[repr(C)] -struct MessageTransmittedHandlerBox, i64) -> windows_core::Result<()> + Send + 'static> { +struct MessageTransmittedHandlerBox, i64) -> windows_core::Result<()> + Send + 'static> { vtable: *const MessageTransmittedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, i64) -> windows_core::Result<()> + Send + 'static> MessageTransmittedHandlerBox { +impl, i64) -> windows_core::Result<()> + Send + 'static> MessageTransmittedHandlerBox { const VTABLE: MessageTransmittedHandler_Vtbl = MessageTransmittedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -448,7 +448,7 @@ impl, i64) -> windows_core::Result<()> + Send } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, messageid: i64) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), messageid).into() + (this.invoke)(core::mem::transmute_copy(&sender), messageid).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Networking/Sockets/mod.rs b/crates/libs/windows/src/Windows/Networking/Sockets/mod.rs index b32c4cc7f8..e5b8a07147 100644 --- a/crates/libs/windows/src/Windows/Networking/Sockets/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Sockets/mod.rs @@ -1462,9 +1462,9 @@ impl windows_core::RuntimeName for IWebSocket { #[cfg(feature = "Storage_Streams")] pub trait IWebSocket_Impl: super::super::Foundation::IClosable_Impl { fn OutputStream(&self) -> windows_core::Result; - fn ConnectAsync(&self, uri: Option<&super::super::Foundation::Uri>) -> windows_core::Result; + fn ConnectAsync(&self, uri: windows_core::Ref<'_, super::super::Foundation::Uri>) -> windows_core::Result; fn SetRequestHeader(&self, headerName: &windows_core::HSTRING, headerValue: &windows_core::HSTRING) -> windows_core::Result<()>; - fn Closed(&self, eventHandler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn Closed(&self, eventHandler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveClosed(&self, eventCookie: i64) -> windows_core::Result<()>; fn CloseWithStatus(&self, code: u16, reason: &windows_core::HSTRING) -> windows_core::Result<()>; } @@ -1484,7 +1484,7 @@ impl IWebSocket_Vtbl { } unsafe extern "system" fn ConnectAsync(this: *mut core::ffi::c_void, uri: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebSocket_Impl::ConnectAsync(this, windows_core::from_raw_borrowed(&uri)) { + match IWebSocket_Impl::ConnectAsync(this, core::mem::transmute_copy(&uri)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1499,7 +1499,7 @@ impl IWebSocket_Vtbl { } unsafe extern "system" fn Closed(this: *mut core::ffi::c_void, eventhandler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebSocket_Impl::Closed(this, windows_core::from_raw_borrowed(&eventhandler)) { + match IWebSocket_Impl::Closed(this, core::mem::transmute_copy(&eventhandler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1619,9 +1619,9 @@ pub trait IWebSocketControl_Impl: windows_core::IUnknownImpl { fn OutboundBufferSizeInBytes(&self) -> windows_core::Result; fn SetOutboundBufferSizeInBytes(&self, value: u32) -> windows_core::Result<()>; fn ServerCredential(&self) -> windows_core::Result; - fn SetServerCredential(&self, value: Option<&super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; + fn SetServerCredential(&self, value: windows_core::Ref<'_, super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; fn ProxyCredential(&self) -> windows_core::Result; - fn SetProxyCredential(&self, value: Option<&super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; + fn SetProxyCredential(&self, value: windows_core::Ref<'_, super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; fn SupportedProtocols(&self) -> windows_core::Result>; } #[cfg(all(feature = "Foundation_Collections", feature = "Security_Credentials"))] @@ -1654,7 +1654,7 @@ impl IWebSocketControl_Vtbl { } unsafe extern "system" fn SetServerCredential(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebSocketControl_Impl::SetServerCredential(this, windows_core::from_raw_borrowed(&value)).into() + IWebSocketControl_Impl::SetServerCredential(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn ProxyCredential(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1669,7 +1669,7 @@ impl IWebSocketControl_Vtbl { } unsafe extern "system" fn SetProxyCredential(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebSocketControl_Impl::SetProxyCredential(this, windows_core::from_raw_borrowed(&value)).into() + IWebSocketControl_Impl::SetProxyCredential(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn SupportedProtocols(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs b/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs index 58c970bd35..f041144957 100644 --- a/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs @@ -194,13 +194,13 @@ impl windows_core::RuntimeName for IVpnChannelStatics { const NAME: &'static str = "Windows.Networking.Vpn.IVpnChannelStatics"; } pub trait IVpnChannelStatics_Impl: windows_core::IUnknownImpl { - fn ProcessEventAsync(&self, thirdPartyPlugIn: Option<&windows_core::IInspectable>, event: Option<&windows_core::IInspectable>) -> windows_core::Result<()>; + fn ProcessEventAsync(&self, thirdPartyPlugIn: windows_core::Ref<'_, windows_core::IInspectable>, event: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result<()>; } impl IVpnChannelStatics_Vtbl { pub const fn new() -> Self { 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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVpnChannelStatics_Impl::ProcessEventAsync(this, windows_core::from_raw_borrowed(&thirdpartyplugin), windows_core::from_raw_borrowed(&event)).into() + IVpnChannelStatics_Impl::ProcessEventAsync(this, core::mem::transmute_copy(&thirdpartyplugin), core::mem::transmute_copy(&event)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), ProcessEventAsync: ProcessEventAsync:: } } @@ -755,14 +755,14 @@ impl windows_core::RuntimeName for IVpnDomainNameInfoFactory { } #[cfg(feature = "Foundation_Collections")] pub trait IVpnDomainNameInfoFactory_Impl: windows_core::IUnknownImpl { - fn CreateVpnDomainNameInfo(&self, name: &windows_core::HSTRING, nameType: VpnDomainNameType, dnsServerList: Option<&super::super::Foundation::Collections::IIterable>, proxyServerList: Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result; + fn CreateVpnDomainNameInfo(&self, name: &windows_core::HSTRING, nameType: VpnDomainNameType, dnsServerList: windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>, proxyServerList: windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result; } #[cfg(feature = "Foundation_Collections")] impl IVpnDomainNameInfoFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateVpnDomainNameInfo(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void, nametype: VpnDomainNameType, dnsserverlist: *mut core::ffi::c_void, proxyserverlist: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IVpnDomainNameInfoFactory_Impl::CreateVpnDomainNameInfo(this, core::mem::transmute(&name), nametype, windows_core::from_raw_borrowed(&dnsserverlist), windows_core::from_raw_borrowed(&proxyserverlist)) { + match IVpnDomainNameInfoFactory_Impl::CreateVpnDomainNameInfo(this, core::mem::transmute(&name), nametype, core::mem::transmute_copy(&dnsserverlist), core::mem::transmute_copy(&proxyserverlist)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -962,14 +962,14 @@ impl windows_core::RuntimeName for IVpnNamespaceInfoFactory { } #[cfg(feature = "Foundation_Collections")] pub trait IVpnNamespaceInfoFactory_Impl: windows_core::IUnknownImpl { - fn CreateVpnNamespaceInfo(&self, name: &windows_core::HSTRING, dnsServerList: Option<&super::super::Foundation::Collections::IVector>, proxyServerList: Option<&super::super::Foundation::Collections::IVector>) -> windows_core::Result; + fn CreateVpnNamespaceInfo(&self, name: &windows_core::HSTRING, dnsServerList: windows_core::Ref<'_, super::super::Foundation::Collections::IVector>, proxyServerList: windows_core::Ref<'_, super::super::Foundation::Collections::IVector>) -> windows_core::Result; } #[cfg(feature = "Foundation_Collections")] impl IVpnNamespaceInfoFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateVpnNamespaceInfo(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void, dnsserverlist: *mut core::ffi::c_void, proxyserverlist: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IVpnNamespaceInfoFactory_Impl::CreateVpnNamespaceInfo(this, core::mem::transmute(&name), windows_core::from_raw_borrowed(&dnsserverlist), windows_core::from_raw_borrowed(&proxyserverlist)) { + match IVpnNamespaceInfoFactory_Impl::CreateVpnNamespaceInfo(this, core::mem::transmute(&name), core::mem::transmute_copy(&dnsserverlist), core::mem::transmute_copy(&proxyserverlist)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1084,13 +1084,13 @@ impl windows_core::RuntimeName for IVpnPacketBufferFactory { const NAME: &'static str = "Windows.Networking.Vpn.IVpnPacketBufferFactory"; } pub trait IVpnPacketBufferFactory_Impl: windows_core::IUnknownImpl { - fn CreateVpnPacketBuffer(&self, parentBuffer: Option<&VpnPacketBuffer>, offset: u32, length: u32) -> windows_core::Result; + fn CreateVpnPacketBuffer(&self, parentBuffer: windows_core::Ref<'_, VpnPacketBuffer>, offset: u32, length: u32) -> windows_core::Result; } impl IVpnPacketBufferFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateVpnPacketBuffer(this: *mut core::ffi::c_void, parentbuffer: *mut core::ffi::c_void, offset: u32, length: u32, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IVpnPacketBufferFactory_Impl::CreateVpnPacketBuffer(this, windows_core::from_raw_borrowed(&parentbuffer), offset, length) { + match IVpnPacketBufferFactory_Impl::CreateVpnPacketBuffer(this, core::mem::transmute_copy(&parentbuffer), offset, length) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1219,34 +1219,34 @@ impl windows_core::RuntimeName for IVpnPlugIn { } #[cfg(feature = "Foundation_Collections")] pub trait IVpnPlugIn_Impl: windows_core::IUnknownImpl { - fn Connect(&self, channel: Option<&VpnChannel>) -> windows_core::Result<()>; - fn Disconnect(&self, channel: Option<&VpnChannel>) -> windows_core::Result<()>; - fn GetKeepAlivePayload(&self, channel: Option<&VpnChannel>, keepAlivePacket: &mut Option) -> windows_core::Result<()>; - fn Encapsulate(&self, channel: Option<&VpnChannel>, packets: Option<&VpnPacketBufferList>, encapulatedPackets: Option<&VpnPacketBufferList>) -> windows_core::Result<()>; - fn Decapsulate(&self, channel: Option<&VpnChannel>, encapBuffer: Option<&VpnPacketBuffer>, decapsulatedPackets: Option<&VpnPacketBufferList>, controlPacketsToSend: Option<&VpnPacketBufferList>) -> windows_core::Result<()>; + fn Connect(&self, channel: windows_core::Ref<'_, VpnChannel>) -> windows_core::Result<()>; + fn Disconnect(&self, channel: windows_core::Ref<'_, VpnChannel>) -> windows_core::Result<()>; + fn GetKeepAlivePayload(&self, channel: windows_core::Ref<'_, VpnChannel>, keepAlivePacket: windows_core::OutRef<'_, VpnPacketBuffer>) -> windows_core::Result<()>; + fn Encapsulate(&self, channel: windows_core::Ref<'_, VpnChannel>, packets: windows_core::Ref<'_, VpnPacketBufferList>, encapulatedPackets: windows_core::Ref<'_, VpnPacketBufferList>) -> windows_core::Result<()>; + fn Decapsulate(&self, channel: windows_core::Ref<'_, VpnChannel>, encapBuffer: windows_core::Ref<'_, VpnPacketBuffer>, decapsulatedPackets: windows_core::Ref<'_, VpnPacketBufferList>, controlPacketsToSend: windows_core::Ref<'_, VpnPacketBufferList>) -> windows_core::Result<()>; } #[cfg(feature = "Foundation_Collections")] impl IVpnPlugIn_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, channel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVpnPlugIn_Impl::Connect(this, windows_core::from_raw_borrowed(&channel)).into() + IVpnPlugIn_Impl::Connect(this, core::mem::transmute_copy(&channel)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void, channel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVpnPlugIn_Impl::Disconnect(this, windows_core::from_raw_borrowed(&channel)).into() + IVpnPlugIn_Impl::Disconnect(this, core::mem::transmute_copy(&channel)).into() } unsafe extern "system" fn GetKeepAlivePayload(this: *mut core::ffi::c_void, channel: *mut core::ffi::c_void, keepalivepacket: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVpnPlugIn_Impl::GetKeepAlivePayload(this, windows_core::from_raw_borrowed(&channel), core::mem::transmute_copy(&keepalivepacket)).into() + IVpnPlugIn_Impl::GetKeepAlivePayload(this, core::mem::transmute_copy(&channel), core::mem::transmute_copy(&keepalivepacket)).into() } unsafe extern "system" fn Encapsulate(this: *mut core::ffi::c_void, channel: *mut core::ffi::c_void, packets: *mut core::ffi::c_void, encapulatedpackets: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVpnPlugIn_Impl::Encapsulate(this, windows_core::from_raw_borrowed(&channel), windows_core::from_raw_borrowed(&packets), windows_core::from_raw_borrowed(&encapulatedpackets)).into() + IVpnPlugIn_Impl::Encapsulate(this, core::mem::transmute_copy(&channel), core::mem::transmute_copy(&packets), core::mem::transmute_copy(&encapulatedpackets)).into() } unsafe extern "system" fn Decapsulate(this: *mut core::ffi::c_void, channel: *mut core::ffi::c_void, encapbuffer: *mut core::ffi::c_void, decapsulatedpackets: *mut core::ffi::c_void, controlpacketstosend: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVpnPlugIn_Impl::Decapsulate(this, windows_core::from_raw_borrowed(&channel), windows_core::from_raw_borrowed(&encapbuffer), windows_core::from_raw_borrowed(&decapsulatedpackets), windows_core::from_raw_borrowed(&controlpacketstosend)).into() + IVpnPlugIn_Impl::Decapsulate(this, core::mem::transmute_copy(&channel), core::mem::transmute_copy(&encapbuffer), core::mem::transmute_copy(&decapsulatedpackets), core::mem::transmute_copy(&controlpacketstosend)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -1322,13 +1322,13 @@ impl windows_core::RuntimeName for IVpnPlugInReconnectTransport { const NAME: &'static str = "Windows.Networking.Vpn.IVpnPlugInReconnectTransport"; } pub trait IVpnPlugInReconnectTransport_Impl: windows_core::IUnknownImpl { - fn ReconnectTransport(&self, channel: Option<&VpnChannel>, context: Option<&windows_core::IInspectable>) -> windows_core::Result<()>; + fn ReconnectTransport(&self, channel: windows_core::Ref<'_, VpnChannel>, context: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result<()>; } impl IVpnPlugInReconnectTransport_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ReconnectTransport(this: *mut core::ffi::c_void, channel: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVpnPlugInReconnectTransport_Impl::ReconnectTransport(this, windows_core::from_raw_borrowed(&channel), windows_core::from_raw_borrowed(&context)).into() + IVpnPlugInReconnectTransport_Impl::ReconnectTransport(this, core::mem::transmute_copy(&channel), core::mem::transmute_copy(&context)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -1642,13 +1642,13 @@ impl windows_core::RuntimeName for IVpnRouteFactory { const NAME: &'static str = "Windows.Networking.Vpn.IVpnRouteFactory"; } pub trait IVpnRouteFactory_Impl: windows_core::IUnknownImpl { - fn CreateVpnRoute(&self, address: Option<&super::HostName>, prefixSize: u8) -> windows_core::Result; + fn CreateVpnRoute(&self, address: windows_core::Ref<'_, super::HostName>, prefixSize: u8) -> windows_core::Result; } impl IVpnRouteFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateVpnRoute(this: *mut core::ffi::c_void, address: *mut core::ffi::c_void, prefixsize: u8, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IVpnRouteFactory_Impl::CreateVpnRoute(this, windows_core::from_raw_borrowed(&address), prefixsize) { + match IVpnRouteFactory_Impl::CreateVpnRoute(this, core::mem::transmute_copy(&address), prefixsize) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Phone/PersonalInformation/mod.rs b/crates/libs/windows/src/Windows/Phone/PersonalInformation/mod.rs index 20d8c83018..e83b24f411 100644 --- a/crates/libs/windows/src/Windows/Phone/PersonalInformation/mod.rs +++ b/crates/libs/windows/src/Windows/Phone/PersonalInformation/mod.rs @@ -697,7 +697,7 @@ pub trait IContactInformation_Impl: windows_core::IUnknownImpl { fn HonorificSuffix(&self) -> windows_core::Result; fn SetHonorificSuffix(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; fn GetDisplayPictureAsync(&self) -> windows_core::Result>; - fn SetDisplayPictureAsync(&self, stream: Option<&super::super::Storage::Streams::IInputStream>) -> windows_core::Result; + fn SetDisplayPictureAsync(&self, stream: windows_core::Ref<'_, super::super::Storage::Streams::IInputStream>) -> windows_core::Result; fn DisplayPicture(&self) -> windows_core::Result; fn GetPropertiesAsync(&self) -> windows_core::Result>>; fn ToVcardAsync(&self) -> windows_core::Result>; @@ -794,7 +794,7 @@ impl IContactInformation_Vtbl { } unsafe extern "system" fn SetDisplayPictureAsync(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IContactInformation_Impl::SetDisplayPictureAsync(this, windows_core::from_raw_borrowed(&stream)) { + match IContactInformation_Impl::SetDisplayPictureAsync(this, core::mem::transmute_copy(&stream)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/mod.rs b/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/mod.rs index 69dcbb336c..1e81ff7552 100644 --- a/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/mod.rs @@ -172,7 +172,7 @@ impl windows_core::RuntimeName for IWebAccountProviderBaseReportOperation { #[cfg(feature = "Security_Authentication_Web_Core")] pub trait IWebAccountProviderBaseReportOperation_Impl: windows_core::IUnknownImpl { fn ReportCompleted(&self) -> windows_core::Result<()>; - fn ReportError(&self, value: Option<&super::Core::WebProviderError>) -> windows_core::Result<()>; + fn ReportError(&self, value: windows_core::Ref<'_, super::Core::WebProviderError>) -> windows_core::Result<()>; } #[cfg(feature = "Security_Authentication_Web_Core")] impl IWebAccountProviderBaseReportOperation_Vtbl { @@ -183,7 +183,7 @@ impl IWebAccountProviderBaseReportOperation_Vtbl { } unsafe extern "system" fn ReportError(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebAccountProviderBaseReportOperation_Impl::ReportError(this, windows_core::from_raw_borrowed(&value)).into() + IWebAccountProviderBaseReportOperation_Impl::ReportError(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -341,7 +341,7 @@ impl windows_core::RuntimeName for IWebAccountProviderSilentReportOperation { #[cfg(feature = "Security_Authentication_Web_Core")] pub trait IWebAccountProviderSilentReportOperation_Impl: IWebAccountProviderBaseReportOperation_Impl { fn ReportUserInteractionRequired(&self) -> windows_core::Result<()>; - fn ReportUserInteractionRequiredWithError(&self, value: Option<&super::Core::WebProviderError>) -> windows_core::Result<()>; + fn ReportUserInteractionRequiredWithError(&self, value: windows_core::Ref<'_, super::Core::WebProviderError>) -> windows_core::Result<()>; } #[cfg(feature = "Security_Authentication_Web_Core")] impl IWebAccountProviderSilentReportOperation_Vtbl { @@ -352,7 +352,7 @@ impl IWebAccountProviderSilentReportOperation_Vtbl { } unsafe extern "system" fn ReportUserInteractionRequiredWithError(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebAccountProviderSilentReportOperation_Impl::ReportUserInteractionRequiredWithError(this, windows_core::from_raw_borrowed(&value)).into() + IWebAccountProviderSilentReportOperation_Impl::ReportUserInteractionRequiredWithError(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Security/Isolation/mod.rs b/crates/libs/windows/src/Windows/Security/Isolation/mod.rs index 4c61947960..60c21ca6f7 100644 --- a/crates/libs/windows/src/Windows/Security/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Isolation/mod.rs @@ -6,7 +6,7 @@ impl windows_core::RuntimeType for HostMessageReceivedCallback { } #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] impl HostMessageReceivedCallback { - pub fn new>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = HostMessageReceivedCallbackBox { vtable: &HostMessageReceivedCallbackBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -26,13 +26,13 @@ pub struct HostMessageReceivedCallback_Vtbl { } #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] #[repr(C)] -struct HostMessageReceivedCallbackBox>) -> windows_core::Result<()> + Send + 'static> { +struct HostMessageReceivedCallbackBox>) -> windows_core::Result<()> + Send + 'static> { vtable: *const HostMessageReceivedCallback_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] -impl>) -> windows_core::Result<()> + Send + 'static> HostMessageReceivedCallbackBox { +impl>) -> windows_core::Result<()> + Send + 'static> HostMessageReceivedCallbackBox { const VTABLE: HostMessageReceivedCallback_Vtbl = HostMessageReceivedCallback_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -61,7 +61,7 @@ impl windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(core::mem::transmute(&receiverid), windows_core::from_raw_borrowed(&message)).into() + (this.invoke)(core::mem::transmute(&receiverid), core::mem::transmute_copy(&message)).into() } } #[cfg(feature = "deprecated")] @@ -2369,7 +2369,7 @@ impl windows_core::RuntimeType for MessageReceivedCallback { } #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] impl MessageReceivedCallback { - pub fn new>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = MessageReceivedCallbackBox { vtable: &MessageReceivedCallbackBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -2389,13 +2389,13 @@ pub struct MessageReceivedCallback_Vtbl { } #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] #[repr(C)] -struct MessageReceivedCallbackBox>) -> windows_core::Result<()> + Send + 'static> { +struct MessageReceivedCallbackBox>) -> windows_core::Result<()> + Send + 'static> { vtable: *const MessageReceivedCallback_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] -impl>) -> windows_core::Result<()> + Send + 'static> MessageReceivedCallbackBox { +impl>) -> windows_core::Result<()> + Send + 'static> MessageReceivedCallbackBox { const VTABLE: MessageReceivedCallback_Vtbl = MessageReceivedCallback_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -2424,6 +2424,6 @@ impl windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(core::mem::transmute(&receiverid), windows_core::from_raw_borrowed(&message)).into() + (this.invoke)(core::mem::transmute(&receiverid), core::mem::transmute_copy(&message)).into() } } diff --git a/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs b/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs index 4fe846430a..bd83ede0eb 100644 --- a/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs @@ -302,10 +302,10 @@ impl windows_core::RuntimeName for IStorageItemAccessList { } #[cfg(all(feature = "Foundation_Collections", feature = "Storage_Search", feature = "Storage_Streams"))] pub trait IStorageItemAccessList_Impl: windows_core::IUnknownImpl { - fn AddOverloadDefaultMetadata(&self, file: Option<&super::IStorageItem>) -> windows_core::Result; - fn Add(&self, file: Option<&super::IStorageItem>, metadata: &windows_core::HSTRING) -> windows_core::Result; - fn AddOrReplaceOverloadDefaultMetadata(&self, token: &windows_core::HSTRING, file: Option<&super::IStorageItem>) -> windows_core::Result<()>; - fn AddOrReplace(&self, token: &windows_core::HSTRING, file: Option<&super::IStorageItem>, metadata: &windows_core::HSTRING) -> windows_core::Result<()>; + fn AddOverloadDefaultMetadata(&self, file: windows_core::Ref<'_, super::IStorageItem>) -> windows_core::Result; + fn Add(&self, file: windows_core::Ref<'_, super::IStorageItem>, metadata: &windows_core::HSTRING) -> windows_core::Result; + fn AddOrReplaceOverloadDefaultMetadata(&self, token: &windows_core::HSTRING, file: windows_core::Ref<'_, super::IStorageItem>) -> windows_core::Result<()>; + fn AddOrReplace(&self, token: &windows_core::HSTRING, file: windows_core::Ref<'_, super::IStorageItem>, metadata: &windows_core::HSTRING) -> windows_core::Result<()>; fn GetItemAsync(&self, token: &windows_core::HSTRING) -> windows_core::Result>; fn GetFileAsync(&self, token: &windows_core::HSTRING) -> windows_core::Result>; fn GetFolderAsync(&self, token: &windows_core::HSTRING) -> windows_core::Result>; @@ -315,7 +315,7 @@ pub trait IStorageItemAccessList_Impl: windows_core::IUnknownImpl { fn Remove(&self, token: &windows_core::HSTRING) -> windows_core::Result<()>; fn ContainsItem(&self, token: &windows_core::HSTRING) -> windows_core::Result; fn Clear(&self) -> windows_core::Result<()>; - fn CheckAccess(&self, file: Option<&super::IStorageItem>) -> windows_core::Result; + fn CheckAccess(&self, file: windows_core::Ref<'_, super::IStorageItem>) -> windows_core::Result; fn Entries(&self) -> windows_core::Result; fn MaximumItemsAllowed(&self) -> windows_core::Result; } @@ -324,7 +324,7 @@ impl IStorageItemAccessList_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddOverloadDefaultMetadata(this: *mut core::ffi::c_void, file: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageItemAccessList_Impl::AddOverloadDefaultMetadata(this, windows_core::from_raw_borrowed(&file)) { + match IStorageItemAccessList_Impl::AddOverloadDefaultMetadata(this, core::mem::transmute_copy(&file)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -335,7 +335,7 @@ impl IStorageItemAccessList_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, file: *mut core::ffi::c_void, metadata: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageItemAccessList_Impl::Add(this, windows_core::from_raw_borrowed(&file), core::mem::transmute(&metadata)) { + match IStorageItemAccessList_Impl::Add(this, core::mem::transmute_copy(&file), core::mem::transmute(&metadata)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -346,11 +346,11 @@ impl IStorageItemAccessList_Vtbl { } unsafe extern "system" fn AddOrReplaceOverloadDefaultMetadata(this: *mut core::ffi::c_void, token: *mut core::ffi::c_void, file: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStorageItemAccessList_Impl::AddOrReplaceOverloadDefaultMetadata(this, core::mem::transmute(&token), windows_core::from_raw_borrowed(&file)).into() + IStorageItemAccessList_Impl::AddOrReplaceOverloadDefaultMetadata(this, core::mem::transmute(&token), core::mem::transmute_copy(&file)).into() } unsafe extern "system" fn AddOrReplace(this: *mut core::ffi::c_void, token: *mut core::ffi::c_void, file: *mut core::ffi::c_void, metadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStorageItemAccessList_Impl::AddOrReplace(this, core::mem::transmute(&token), windows_core::from_raw_borrowed(&file), core::mem::transmute(&metadata)).into() + IStorageItemAccessList_Impl::AddOrReplace(this, core::mem::transmute(&token), core::mem::transmute_copy(&file), core::mem::transmute(&metadata)).into() } unsafe extern "system" fn GetItemAsync(this: *mut core::ffi::c_void, token: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -438,7 +438,7 @@ impl IStorageItemAccessList_Vtbl { } unsafe extern "system" fn CheckAccess(this: *mut core::ffi::c_void, file: *mut core::ffi::c_void, result__: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageItemAccessList_Impl::CheckAccess(this, windows_core::from_raw_borrowed(&file)) { + match IStorageItemAccessList_Impl::CheckAccess(this, core::mem::transmute_copy(&file)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Storage/BulkAccess/mod.rs b/crates/libs/windows/src/Windows/Storage/BulkAccess/mod.rs index eecaff43db..750014f74a 100644 --- a/crates/libs/windows/src/Windows/Storage/BulkAccess/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/BulkAccess/mod.rs @@ -1158,9 +1158,9 @@ pub trait IStorageItemInformation_Impl: windows_core::IUnknownImpl { fn DocumentProperties(&self) -> windows_core::Result; fn BasicProperties(&self) -> windows_core::Result; fn Thumbnail(&self) -> windows_core::Result; - fn ThumbnailUpdated(&self, changedHandler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn ThumbnailUpdated(&self, changedHandler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveThumbnailUpdated(&self, eventCookie: i64) -> windows_core::Result<()>; - fn PropertiesUpdated(&self, changedHandler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PropertiesUpdated(&self, changedHandler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePropertiesUpdated(&self, eventCookie: i64) -> windows_core::Result<()>; } #[cfg(all(feature = "Storage_FileProperties", feature = "Storage_Streams"))] @@ -1234,7 +1234,7 @@ impl IStorageItemInformation_Vtbl { } unsafe extern "system" fn ThumbnailUpdated(this: *mut core::ffi::c_void, changedhandler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageItemInformation_Impl::ThumbnailUpdated(this, windows_core::from_raw_borrowed(&changedhandler)) { + match IStorageItemInformation_Impl::ThumbnailUpdated(this, core::mem::transmute_copy(&changedhandler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1248,7 +1248,7 @@ impl IStorageItemInformation_Vtbl { } unsafe extern "system" fn PropertiesUpdated(this: *mut core::ffi::c_void, changedhandler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageItemInformation_Impl::PropertiesUpdated(this, windows_core::from_raw_borrowed(&changedhandler)) { + match IStorageItemInformation_Impl::PropertiesUpdated(this, core::mem::transmute_copy(&changedhandler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Storage/FileProperties/mod.rs b/crates/libs/windows/src/Windows/Storage/FileProperties/mod.rs index 33e4b5335f..ca3c1060e3 100644 --- a/crates/libs/windows/src/Windows/Storage/FileProperties/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/FileProperties/mod.rs @@ -375,8 +375,8 @@ impl windows_core::RuntimeName for IStorageItemExtraProperties { } #[cfg(feature = "Foundation_Collections")] pub trait IStorageItemExtraProperties_Impl: windows_core::IUnknownImpl { - fn RetrievePropertiesAsync(&self, propertiesToRetrieve: Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result>>; - fn SavePropertiesAsync(&self, propertiesToSave: Option<&super::super::Foundation::Collections::IIterable>>) -> windows_core::Result; + fn RetrievePropertiesAsync(&self, propertiesToRetrieve: windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result>>; + fn SavePropertiesAsync(&self, propertiesToSave: windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>>) -> windows_core::Result; fn SavePropertiesAsyncOverloadDefault(&self) -> windows_core::Result; } #[cfg(feature = "Foundation_Collections")] @@ -384,7 +384,7 @@ impl IStorageItemExtraProperties_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RetrievePropertiesAsync(this: *mut core::ffi::c_void, propertiestoretrieve: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageItemExtraProperties_Impl::RetrievePropertiesAsync(this, windows_core::from_raw_borrowed(&propertiestoretrieve)) { + match IStorageItemExtraProperties_Impl::RetrievePropertiesAsync(this, core::mem::transmute_copy(&propertiestoretrieve)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -395,7 +395,7 @@ impl IStorageItemExtraProperties_Vtbl { } unsafe extern "system" fn SavePropertiesAsync(this: *mut core::ffi::c_void, propertiestosave: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageItemExtraProperties_Impl::SavePropertiesAsync(this, windows_core::from_raw_borrowed(&propertiestosave)) { + match IStorageItemExtraProperties_Impl::SavePropertiesAsync(this, core::mem::transmute_copy(&propertiestosave)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Storage/Provider/mod.rs b/crates/libs/windows/src/Windows/Storage/Provider/mod.rs index c80a345763..31d0466325 100644 --- a/crates/libs/windows/src/Windows/Storage/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Provider/mod.rs @@ -571,7 +571,7 @@ impl windows_core::RuntimeName for IStorageProviderKnownFolderSyncInfoSource { } pub trait IStorageProviderKnownFolderSyncInfoSource_Impl: windows_core::IUnknownImpl { fn GetKnownFolderSyncInfo(&self) -> windows_core::Result; - fn KnownFolderSyncInfoChanged(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn KnownFolderSyncInfoChanged(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveKnownFolderSyncInfoChanged(&self, token: i64) -> windows_core::Result<()>; } impl IStorageProviderKnownFolderSyncInfoSource_Vtbl { @@ -589,7 +589,7 @@ impl IStorageProviderKnownFolderSyncInfoSource_Vtbl { } unsafe extern "system" fn KnownFolderSyncInfoChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageProviderKnownFolderSyncInfoSource_Impl::KnownFolderSyncInfoChanged(this, windows_core::from_raw_borrowed(&handler)) { + match IStorageProviderKnownFolderSyncInfoSource_Impl::KnownFolderSyncInfoChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -808,16 +808,16 @@ impl windows_core::RuntimeName for IStorageProviderShareLinkSource { } #[cfg(feature = "Foundation_Collections")] pub trait IStorageProviderShareLinkSource_Impl: windows_core::IUnknownImpl { - fn CreateLinkAsync(&self, storageItemList: Option<&super::super::Foundation::Collections::IVectorView>) -> windows_core::Result>; - fn GetDefaultAccessControlStringAsync(&self, storageItemList: Option<&super::super::Foundation::Collections::IVectorView>) -> windows_core::Result>; - fn GetState(&self, storageItemList: Option<&super::super::Foundation::Collections::IVectorView>) -> windows_core::Result>; + fn CreateLinkAsync(&self, storageItemList: windows_core::Ref<'_, super::super::Foundation::Collections::IVectorView>) -> windows_core::Result>; + fn GetDefaultAccessControlStringAsync(&self, storageItemList: windows_core::Ref<'_, super::super::Foundation::Collections::IVectorView>) -> windows_core::Result>; + fn GetState(&self, storageItemList: windows_core::Ref<'_, super::super::Foundation::Collections::IVectorView>) -> windows_core::Result>; } #[cfg(feature = "Foundation_Collections")] impl IStorageProviderShareLinkSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateLinkAsync(this: *mut core::ffi::c_void, storageitemlist: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageProviderShareLinkSource_Impl::CreateLinkAsync(this, windows_core::from_raw_borrowed(&storageitemlist)) { + match IStorageProviderShareLinkSource_Impl::CreateLinkAsync(this, core::mem::transmute_copy(&storageitemlist)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -828,7 +828,7 @@ impl IStorageProviderShareLinkSource_Vtbl { } unsafe extern "system" fn GetDefaultAccessControlStringAsync(this: *mut core::ffi::c_void, storageitemlist: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageProviderShareLinkSource_Impl::GetDefaultAccessControlStringAsync(this, windows_core::from_raw_borrowed(&storageitemlist)) { + match IStorageProviderShareLinkSource_Impl::GetDefaultAccessControlStringAsync(this, core::mem::transmute_copy(&storageitemlist)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -839,7 +839,7 @@ impl IStorageProviderShareLinkSource_Vtbl { } unsafe extern "system" fn GetState(this: *mut core::ffi::c_void, storageitemlist: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageProviderShareLinkSource_Impl::GetState(this, windows_core::from_raw_borrowed(&storageitemlist)) { + match IStorageProviderShareLinkSource_Impl::GetState(this, core::mem::transmute_copy(&storageitemlist)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -938,7 +938,7 @@ impl windows_core::RuntimeName for IStorageProviderStatusUISource { } pub trait IStorageProviderStatusUISource_Impl: windows_core::IUnknownImpl { fn GetStatusUI(&self) -> windows_core::Result; - fn StatusUIChanged(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn StatusUIChanged(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveStatusUIChanged(&self, token: i64) -> windows_core::Result<()>; } impl IStorageProviderStatusUISource_Vtbl { @@ -956,7 +956,7 @@ impl IStorageProviderStatusUISource_Vtbl { } unsafe extern "system" fn StatusUIChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageProviderStatusUISource_Impl::StatusUIChanged(this, windows_core::from_raw_borrowed(&handler)) { + match IStorageProviderStatusUISource_Impl::StatusUIChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1273,18 +1273,18 @@ impl windows_core::RuntimeName for IStorageProviderUriSource { const NAME: &'static str = "Windows.Storage.Provider.IStorageProviderUriSource"; } pub trait IStorageProviderUriSource_Impl: windows_core::IUnknownImpl { - fn GetPathForContentUri(&self, contentUri: &windows_core::HSTRING, result: Option<&StorageProviderGetPathForContentUriResult>) -> windows_core::Result<()>; - fn GetContentInfoForPath(&self, path: &windows_core::HSTRING, result: Option<&StorageProviderGetContentInfoForPathResult>) -> windows_core::Result<()>; + fn GetPathForContentUri(&self, contentUri: &windows_core::HSTRING, result: windows_core::Ref<'_, StorageProviderGetPathForContentUriResult>) -> windows_core::Result<()>; + fn GetContentInfoForPath(&self, path: &windows_core::HSTRING, result: windows_core::Ref<'_, StorageProviderGetContentInfoForPathResult>) -> windows_core::Result<()>; } impl IStorageProviderUriSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetPathForContentUri(this: *mut core::ffi::c_void, contenturi: *mut core::ffi::c_void, result: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStorageProviderUriSource_Impl::GetPathForContentUri(this, core::mem::transmute(&contenturi), windows_core::from_raw_borrowed(&result)).into() + IStorageProviderUriSource_Impl::GetPathForContentUri(this, core::mem::transmute(&contenturi), core::mem::transmute_copy(&result)).into() } unsafe extern "system" fn GetContentInfoForPath(this: *mut core::ffi::c_void, path: *mut core::ffi::c_void, result: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStorageProviderUriSource_Impl::GetContentInfoForPath(this, core::mem::transmute(&path), windows_core::from_raw_borrowed(&result)).into() + IStorageProviderUriSource_Impl::GetContentInfoForPath(this, core::mem::transmute(&path), core::mem::transmute_copy(&result)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -1898,7 +1898,7 @@ impl windows_core::RuntimeType for StorageProviderKnownFolderSyncRequestedHandle const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl StorageProviderKnownFolderSyncRequestedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = StorageProviderKnownFolderSyncRequestedHandlerBox { vtable: &StorageProviderKnownFolderSyncRequestedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1916,12 +1916,12 @@ pub struct StorageProviderKnownFolderSyncRequestedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct StorageProviderKnownFolderSyncRequestedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct StorageProviderKnownFolderSyncRequestedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const StorageProviderKnownFolderSyncRequestedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> StorageProviderKnownFolderSyncRequestedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> StorageProviderKnownFolderSyncRequestedHandlerBox { const VTABLE: StorageProviderKnownFolderSyncRequestedHandler_Vtbl = StorageProviderKnownFolderSyncRequestedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -1950,7 +1950,7 @@ impl) -> windows_cor } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&args)).into() + (this.invoke)(core::mem::transmute_copy(&args)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Storage/Search/mod.rs b/crates/libs/windows/src/Windows/Storage/Search/mod.rs index e00b151fb4..873943de08 100644 --- a/crates/libs/windows/src/Windows/Storage/Search/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Search/mod.rs @@ -402,7 +402,7 @@ pub trait IIndexableContent_Impl: windows_core::IUnknownImpl { fn SetId(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; fn Properties(&self) -> windows_core::Result>; fn Stream(&self) -> windows_core::Result; - fn SetStream(&self, value: Option<&super::Streams::IRandomAccessStream>) -> windows_core::Result<()>; + fn SetStream(&self, value: windows_core::Ref<'_, super::Streams::IRandomAccessStream>) -> windows_core::Result<()>; fn StreamContentType(&self) -> windows_core::Result; fn SetStreamContentType(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; } @@ -448,7 +448,7 @@ impl IIndexableContent_Vtbl { } unsafe extern "system" fn SetStream(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IIndexableContent_Impl::SetStream(this, windows_core::from_raw_borrowed(&value)).into() + IIndexableContent_Impl::SetStream(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn StreamContentType(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -743,18 +743,18 @@ pub trait IStorageFolderQueryOperations_Impl: windows_core::IUnknownImpl { fn GetIndexedStateAsync(&self) -> windows_core::Result>; fn CreateFileQueryOverloadDefault(&self) -> windows_core::Result; fn CreateFileQuery(&self, query: CommonFileQuery) -> windows_core::Result; - fn CreateFileQueryWithOptions(&self, queryOptions: Option<&QueryOptions>) -> windows_core::Result; + fn CreateFileQueryWithOptions(&self, queryOptions: windows_core::Ref<'_, QueryOptions>) -> windows_core::Result; fn CreateFolderQueryOverloadDefault(&self) -> windows_core::Result; fn CreateFolderQuery(&self, query: CommonFolderQuery) -> windows_core::Result; - fn CreateFolderQueryWithOptions(&self, queryOptions: Option<&QueryOptions>) -> windows_core::Result; + fn CreateFolderQueryWithOptions(&self, queryOptions: windows_core::Ref<'_, QueryOptions>) -> windows_core::Result; fn CreateItemQuery(&self) -> windows_core::Result; - fn CreateItemQueryWithOptions(&self, queryOptions: Option<&QueryOptions>) -> windows_core::Result; + fn CreateItemQueryWithOptions(&self, queryOptions: windows_core::Ref<'_, QueryOptions>) -> windows_core::Result; fn GetFilesAsync(&self, query: CommonFileQuery, startIndex: u32, maxItemsToRetrieve: u32) -> windows_core::Result>>; fn GetFilesAsyncOverloadDefaultStartAndCount(&self, query: CommonFileQuery) -> windows_core::Result>>; fn GetFoldersAsync(&self, query: CommonFolderQuery, startIndex: u32, maxItemsToRetrieve: u32) -> windows_core::Result>>; fn GetFoldersAsyncOverloadDefaultStartAndCount(&self, query: CommonFolderQuery) -> windows_core::Result>>; fn GetItemsAsync(&self, startIndex: u32, maxItemsToRetrieve: u32) -> windows_core::Result>>; - fn AreQueryOptionsSupported(&self, queryOptions: Option<&QueryOptions>) -> windows_core::Result; + fn AreQueryOptionsSupported(&self, queryOptions: windows_core::Ref<'_, QueryOptions>) -> windows_core::Result; fn IsCommonFolderQuerySupported(&self, query: CommonFolderQuery) -> windows_core::Result; fn IsCommonFileQuerySupported(&self, query: CommonFileQuery) -> windows_core::Result; } @@ -796,7 +796,7 @@ impl IStorageFolderQueryOperations_Vtbl { } unsafe extern "system" fn CreateFileQueryWithOptions(this: *mut core::ffi::c_void, queryoptions: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFolderQueryOperations_Impl::CreateFileQueryWithOptions(this, windows_core::from_raw_borrowed(&queryoptions)) { + match IStorageFolderQueryOperations_Impl::CreateFileQueryWithOptions(this, core::mem::transmute_copy(&queryoptions)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -829,7 +829,7 @@ impl IStorageFolderQueryOperations_Vtbl { } unsafe extern "system" fn CreateFolderQueryWithOptions(this: *mut core::ffi::c_void, queryoptions: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFolderQueryOperations_Impl::CreateFolderQueryWithOptions(this, windows_core::from_raw_borrowed(&queryoptions)) { + match IStorageFolderQueryOperations_Impl::CreateFolderQueryWithOptions(this, core::mem::transmute_copy(&queryoptions)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -851,7 +851,7 @@ impl IStorageFolderQueryOperations_Vtbl { } unsafe extern "system" fn CreateItemQueryWithOptions(this: *mut core::ffi::c_void, queryoptions: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFolderQueryOperations_Impl::CreateItemQueryWithOptions(this, windows_core::from_raw_borrowed(&queryoptions)) { + match IStorageFolderQueryOperations_Impl::CreateItemQueryWithOptions(this, core::mem::transmute_copy(&queryoptions)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -917,7 +917,7 @@ impl IStorageFolderQueryOperations_Vtbl { } unsafe extern "system" fn AreQueryOptionsSupported(this: *mut core::ffi::c_void, queryoptions: *mut core::ffi::c_void, result__: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFolderQueryOperations_Impl::AreQueryOptionsSupported(this, windows_core::from_raw_borrowed(&queryoptions)) { + match IStorageFolderQueryOperations_Impl::AreQueryOptionsSupported(this, core::mem::transmute_copy(&queryoptions)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1137,13 +1137,13 @@ impl windows_core::RuntimeName for IStorageQueryResultBase { pub trait IStorageQueryResultBase_Impl: windows_core::IUnknownImpl { fn GetItemCountAsync(&self) -> windows_core::Result>; fn Folder(&self) -> windows_core::Result; - fn ContentsChanged(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn ContentsChanged(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveContentsChanged(&self, eventCookie: i64) -> windows_core::Result<()>; - fn OptionsChanged(&self, changedHandler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn OptionsChanged(&self, changedHandler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveOptionsChanged(&self, eventCookie: i64) -> windows_core::Result<()>; - fn FindStartIndexAsync(&self, value: Option<&windows_core::IInspectable>) -> windows_core::Result>; + fn FindStartIndexAsync(&self, value: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result>; fn GetCurrentQueryOptions(&self) -> windows_core::Result; - fn ApplyNewQueryOptions(&self, newQueryOptions: Option<&QueryOptions>) -> windows_core::Result<()>; + fn ApplyNewQueryOptions(&self, newQueryOptions: windows_core::Ref<'_, QueryOptions>) -> windows_core::Result<()>; } impl IStorageQueryResultBase_Vtbl { pub const fn new() -> Self { @@ -1171,7 +1171,7 @@ impl IStorageQueryResultBase_Vtbl { } unsafe extern "system" fn ContentsChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageQueryResultBase_Impl::ContentsChanged(this, windows_core::from_raw_borrowed(&handler)) { + match IStorageQueryResultBase_Impl::ContentsChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1185,7 +1185,7 @@ impl IStorageQueryResultBase_Vtbl { } unsafe extern "system" fn OptionsChanged(this: *mut core::ffi::c_void, changedhandler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageQueryResultBase_Impl::OptionsChanged(this, windows_core::from_raw_borrowed(&changedhandler)) { + match IStorageQueryResultBase_Impl::OptionsChanged(this, core::mem::transmute_copy(&changedhandler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1199,7 +1199,7 @@ impl IStorageQueryResultBase_Vtbl { } unsafe extern "system" fn FindStartIndexAsync(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageQueryResultBase_Impl::FindStartIndexAsync(this, windows_core::from_raw_borrowed(&value)) { + match IStorageQueryResultBase_Impl::FindStartIndexAsync(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1221,7 +1221,7 @@ impl IStorageQueryResultBase_Vtbl { } unsafe extern "system" fn ApplyNewQueryOptions(this: *mut core::ffi::c_void, newqueryoptions: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStorageQueryResultBase_Impl::ApplyNewQueryOptions(this, windows_core::from_raw_borrowed(&newqueryoptions)).into() + IStorageQueryResultBase_Impl::ApplyNewQueryOptions(this, core::mem::transmute_copy(&newqueryoptions)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Storage/Streams/mod.rs b/crates/libs/windows/src/Windows/Storage/Streams/mod.rs index 67e29a18a7..9f75b9e498 100644 --- a/crates/libs/windows/src/Windows/Storage/Streams/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Streams/mod.rs @@ -1580,8 +1580,8 @@ pub trait IDataWriter_Impl: windows_core::IUnknownImpl { fn SetByteOrder(&self, value: ByteOrder) -> windows_core::Result<()>; fn WriteByte(&self, value: u8) -> windows_core::Result<()>; fn WriteBytes(&self, value: &[u8]) -> windows_core::Result<()>; - fn WriteBuffer(&self, buffer: Option<&IBuffer>) -> windows_core::Result<()>; - fn WriteBufferRange(&self, buffer: Option<&IBuffer>, start: u32, count: u32) -> windows_core::Result<()>; + fn WriteBuffer(&self, buffer: windows_core::Ref<'_, IBuffer>) -> windows_core::Result<()>; + fn WriteBufferRange(&self, buffer: windows_core::Ref<'_, IBuffer>, start: u32, count: u32) -> windows_core::Result<()>; fn WriteBoolean(&self, value: bool) -> windows_core::Result<()>; fn WriteGuid(&self, value: &windows_core::GUID) -> windows_core::Result<()>; fn WriteInt16(&self, value: i16) -> windows_core::Result<()>; @@ -1651,11 +1651,11 @@ impl IDataWriter_Vtbl { } unsafe extern "system" fn WriteBuffer(this: *mut core::ffi::c_void, buffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataWriter_Impl::WriteBuffer(this, windows_core::from_raw_borrowed(&buffer)).into() + IDataWriter_Impl::WriteBuffer(this, core::mem::transmute_copy(&buffer)).into() } unsafe extern "system" fn WriteBufferRange(this: *mut core::ffi::c_void, buffer: *mut core::ffi::c_void, start: u32, count: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataWriter_Impl::WriteBufferRange(this, windows_core::from_raw_borrowed(&buffer), start, count).into() + IDataWriter_Impl::WriteBufferRange(this, core::mem::transmute_copy(&buffer), start, count).into() } unsafe extern "system" fn WriteBoolean(this: *mut core::ffi::c_void, value: bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1898,13 +1898,13 @@ impl windows_core::RuntimeName for IInputStream { const NAME: &'static str = "Windows.Storage.Streams.IInputStream"; } pub trait IInputStream_Impl: super::super::Foundation::IClosable_Impl { - fn ReadAsync(&self, buffer: Option<&IBuffer>, count: u32, options: InputStreamOptions) -> windows_core::Result>; + fn ReadAsync(&self, buffer: windows_core::Ref<'_, IBuffer>, count: u32, options: InputStreamOptions) -> windows_core::Result>; } impl IInputStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ReadAsync(this: *mut core::ffi::c_void, buffer: *mut core::ffi::c_void, count: u32, options: InputStreamOptions, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInputStream_Impl::ReadAsync(this, windows_core::from_raw_borrowed(&buffer), count, options) { + match IInputStream_Impl::ReadAsync(this, core::mem::transmute_copy(&buffer), count, options) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -2004,14 +2004,14 @@ impl windows_core::RuntimeName for IOutputStream { const NAME: &'static str = "Windows.Storage.Streams.IOutputStream"; } pub trait IOutputStream_Impl: super::super::Foundation::IClosable_Impl { - fn WriteAsync(&self, buffer: Option<&IBuffer>) -> windows_core::Result>; + fn WriteAsync(&self, buffer: windows_core::Ref<'_, IBuffer>) -> windows_core::Result>; fn FlushAsync(&self) -> windows_core::Result>; } impl IOutputStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn WriteAsync(this: *mut core::ffi::c_void, buffer: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOutputStream_Impl::WriteAsync(this, windows_core::from_raw_borrowed(&buffer)) { + match IOutputStream_Impl::WriteAsync(this, core::mem::transmute_copy(&buffer)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -2080,15 +2080,15 @@ impl windows_core::RuntimeName for IPropertySetSerializer { } #[cfg(feature = "Foundation_Collections")] pub trait IPropertySetSerializer_Impl: windows_core::IUnknownImpl { - fn Serialize(&self, propertySet: Option<&super::super::Foundation::Collections::IPropertySet>) -> windows_core::Result; - fn Deserialize(&self, propertySet: Option<&super::super::Foundation::Collections::IPropertySet>, buffer: Option<&IBuffer>) -> windows_core::Result<()>; + fn Serialize(&self, propertySet: windows_core::Ref<'_, super::super::Foundation::Collections::IPropertySet>) -> windows_core::Result; + fn Deserialize(&self, propertySet: windows_core::Ref<'_, super::super::Foundation::Collections::IPropertySet>, buffer: windows_core::Ref<'_, IBuffer>) -> windows_core::Result<()>; } #[cfg(feature = "Foundation_Collections")] impl IPropertySetSerializer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Serialize(this: *mut core::ffi::c_void, propertyset: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPropertySetSerializer_Impl::Serialize(this, windows_core::from_raw_borrowed(&propertyset)) { + match IPropertySetSerializer_Impl::Serialize(this, core::mem::transmute_copy(&propertyset)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -2099,7 +2099,7 @@ impl IPropertySetSerializer_Vtbl { } unsafe extern "system" fn Deserialize(this: *mut core::ffi::c_void, propertyset: *mut core::ffi::c_void, buffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertySetSerializer_Impl::Deserialize(this, windows_core::from_raw_borrowed(&propertyset), windows_core::from_raw_borrowed(&buffer)).into() + IPropertySetSerializer_Impl::Deserialize(this, core::mem::transmute_copy(&propertyset), core::mem::transmute_copy(&buffer)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Storage/mod.rs b/crates/libs/windows/src/Windows/Storage/mod.rs index b24e2e7249..2ee7de1291 100644 --- a/crates/libs/windows/src/Windows/Storage/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/mod.rs @@ -618,7 +618,7 @@ impl windows_core::RuntimeType for ApplicationDataSetVersionHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl ApplicationDataSetVersionHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = ApplicationDataSetVersionHandlerBox { vtable: &ApplicationDataSetVersionHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -636,12 +636,12 @@ pub struct ApplicationDataSetVersionHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, setversionrequest: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct ApplicationDataSetVersionHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct ApplicationDataSetVersionHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const ApplicationDataSetVersionHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> ApplicationDataSetVersionHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> ApplicationDataSetVersionHandlerBox { const VTABLE: ApplicationDataSetVersionHandler_Vtbl = ApplicationDataSetVersionHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -670,7 +670,7 @@ impl) -> windows_core::Result<()> + Send + ' } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, setversionrequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&setversionrequest)).into() + (this.invoke)(core::mem::transmute_copy(&setversionrequest)).into() } } pub struct CachedFileManager; @@ -1703,14 +1703,14 @@ pub trait IStorageFile_Impl: Streams::IInputStreamReference_Impl + Streams::IRan fn ContentType(&self) -> windows_core::Result; fn OpenAsync(&self, accessMode: FileAccessMode) -> windows_core::Result>; fn OpenTransactedWriteAsync(&self) -> windows_core::Result>; - fn CopyOverloadDefaultNameAndOptions(&self, destinationFolder: Option<&IStorageFolder>) -> windows_core::Result>; - fn CopyOverloadDefaultOptions(&self, destinationFolder: Option<&IStorageFolder>, desiredNewName: &windows_core::HSTRING) -> windows_core::Result>; - fn CopyOverload(&self, destinationFolder: Option<&IStorageFolder>, desiredNewName: &windows_core::HSTRING, option: NameCollisionOption) -> windows_core::Result>; - fn CopyAndReplaceAsync(&self, fileToReplace: Option<&IStorageFile>) -> windows_core::Result; - fn MoveOverloadDefaultNameAndOptions(&self, destinationFolder: Option<&IStorageFolder>) -> windows_core::Result; - fn MoveOverloadDefaultOptions(&self, destinationFolder: Option<&IStorageFolder>, desiredNewName: &windows_core::HSTRING) -> windows_core::Result; - fn MoveOverload(&self, destinationFolder: Option<&IStorageFolder>, desiredNewName: &windows_core::HSTRING, option: NameCollisionOption) -> windows_core::Result; - fn MoveAndReplaceAsync(&self, fileToReplace: Option<&IStorageFile>) -> windows_core::Result; + fn CopyOverloadDefaultNameAndOptions(&self, destinationFolder: windows_core::Ref<'_, IStorageFolder>) -> windows_core::Result>; + fn CopyOverloadDefaultOptions(&self, destinationFolder: windows_core::Ref<'_, IStorageFolder>, desiredNewName: &windows_core::HSTRING) -> windows_core::Result>; + fn CopyOverload(&self, destinationFolder: windows_core::Ref<'_, IStorageFolder>, desiredNewName: &windows_core::HSTRING, option: NameCollisionOption) -> windows_core::Result>; + fn CopyAndReplaceAsync(&self, fileToReplace: windows_core::Ref<'_, IStorageFile>) -> windows_core::Result; + fn MoveOverloadDefaultNameAndOptions(&self, destinationFolder: windows_core::Ref<'_, IStorageFolder>) -> windows_core::Result; + fn MoveOverloadDefaultOptions(&self, destinationFolder: windows_core::Ref<'_, IStorageFolder>, desiredNewName: &windows_core::HSTRING) -> windows_core::Result; + fn MoveOverload(&self, destinationFolder: windows_core::Ref<'_, IStorageFolder>, desiredNewName: &windows_core::HSTRING, option: NameCollisionOption) -> windows_core::Result; + fn MoveAndReplaceAsync(&self, fileToReplace: windows_core::Ref<'_, IStorageFile>) -> windows_core::Result; } #[cfg(all(feature = "Storage_FileProperties", feature = "Storage_Streams"))] impl IStorageFile_Vtbl { @@ -1761,7 +1761,7 @@ impl IStorageFile_Vtbl { } unsafe extern "system" fn CopyOverloadDefaultNameAndOptions(this: *mut core::ffi::c_void, destinationfolder: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFile_Impl::CopyOverloadDefaultNameAndOptions(this, windows_core::from_raw_borrowed(&destinationfolder)) { + match IStorageFile_Impl::CopyOverloadDefaultNameAndOptions(this, core::mem::transmute_copy(&destinationfolder)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1772,7 +1772,7 @@ impl IStorageFile_Vtbl { } unsafe extern "system" fn CopyOverloadDefaultOptions(this: *mut core::ffi::c_void, destinationfolder: *mut core::ffi::c_void, desirednewname: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFile_Impl::CopyOverloadDefaultOptions(this, windows_core::from_raw_borrowed(&destinationfolder), core::mem::transmute(&desirednewname)) { + match IStorageFile_Impl::CopyOverloadDefaultOptions(this, core::mem::transmute_copy(&destinationfolder), core::mem::transmute(&desirednewname)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1783,7 +1783,7 @@ impl IStorageFile_Vtbl { } unsafe extern "system" fn CopyOverload(this: *mut core::ffi::c_void, destinationfolder: *mut core::ffi::c_void, desirednewname: *mut core::ffi::c_void, option: NameCollisionOption, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFile_Impl::CopyOverload(this, windows_core::from_raw_borrowed(&destinationfolder), core::mem::transmute(&desirednewname), option) { + match IStorageFile_Impl::CopyOverload(this, core::mem::transmute_copy(&destinationfolder), core::mem::transmute(&desirednewname), option) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1794,7 +1794,7 @@ impl IStorageFile_Vtbl { } unsafe extern "system" fn CopyAndReplaceAsync(this: *mut core::ffi::c_void, filetoreplace: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFile_Impl::CopyAndReplaceAsync(this, windows_core::from_raw_borrowed(&filetoreplace)) { + match IStorageFile_Impl::CopyAndReplaceAsync(this, core::mem::transmute_copy(&filetoreplace)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1805,7 +1805,7 @@ impl IStorageFile_Vtbl { } unsafe extern "system" fn MoveOverloadDefaultNameAndOptions(this: *mut core::ffi::c_void, destinationfolder: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFile_Impl::MoveOverloadDefaultNameAndOptions(this, windows_core::from_raw_borrowed(&destinationfolder)) { + match IStorageFile_Impl::MoveOverloadDefaultNameAndOptions(this, core::mem::transmute_copy(&destinationfolder)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1816,7 +1816,7 @@ impl IStorageFile_Vtbl { } unsafe extern "system" fn MoveOverloadDefaultOptions(this: *mut core::ffi::c_void, destinationfolder: *mut core::ffi::c_void, desirednewname: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFile_Impl::MoveOverloadDefaultOptions(this, windows_core::from_raw_borrowed(&destinationfolder), core::mem::transmute(&desirednewname)) { + match IStorageFile_Impl::MoveOverloadDefaultOptions(this, core::mem::transmute_copy(&destinationfolder), core::mem::transmute(&desirednewname)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1827,7 +1827,7 @@ impl IStorageFile_Vtbl { } unsafe extern "system" fn MoveOverload(this: *mut core::ffi::c_void, destinationfolder: *mut core::ffi::c_void, desirednewname: *mut core::ffi::c_void, option: NameCollisionOption, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFile_Impl::MoveOverload(this, windows_core::from_raw_borrowed(&destinationfolder), core::mem::transmute(&desirednewname), option) { + match IStorageFile_Impl::MoveOverload(this, core::mem::transmute_copy(&destinationfolder), core::mem::transmute(&desirednewname), option) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1838,7 +1838,7 @@ impl IStorageFile_Vtbl { } unsafe extern "system" fn MoveAndReplaceAsync(this: *mut core::ffi::c_void, filetoreplace: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFile_Impl::MoveAndReplaceAsync(this, windows_core::from_raw_borrowed(&filetoreplace)) { + match IStorageFile_Impl::MoveAndReplaceAsync(this, core::mem::transmute_copy(&filetoreplace)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -2820,7 +2820,7 @@ impl windows_core::RuntimeName for IStorageItem2 { #[cfg(all(feature = "Storage_FileProperties", feature = "Storage_Search"))] pub trait IStorageItem2_Impl: IStorageItem_Impl { fn GetParentAsync(&self) -> windows_core::Result>; - fn IsEqual(&self, item: Option<&IStorageItem>) -> windows_core::Result; + fn IsEqual(&self, item: windows_core::Ref<'_, IStorageItem>) -> windows_core::Result; } #[cfg(all(feature = "Storage_FileProperties", feature = "Storage_Search"))] impl IStorageItem2_Vtbl { @@ -2838,7 +2838,7 @@ impl IStorageItem2_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, item: *mut core::ffi::c_void, result__: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageItem2_Impl::IsEqual(this, windows_core::from_raw_borrowed(&item)) { + match IStorageItem2_Impl::IsEqual(this, core::mem::transmute_copy(&item)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -5570,7 +5570,7 @@ impl windows_core::RuntimeType for StreamedFileDataRequestedHandler { } #[cfg(feature = "Storage_Streams")] impl StreamedFileDataRequestedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = StreamedFileDataRequestedHandlerBox { vtable: &StreamedFileDataRequestedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -5590,13 +5590,13 @@ pub struct StreamedFileDataRequestedHandler_Vtbl { } #[cfg(feature = "Storage_Streams")] #[repr(C)] -struct StreamedFileDataRequestedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct StreamedFileDataRequestedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const StreamedFileDataRequestedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "Storage_Streams")] -impl) -> windows_core::Result<()> + Send + 'static> StreamedFileDataRequestedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> StreamedFileDataRequestedHandlerBox { const VTABLE: StreamedFileDataRequestedHandler_Vtbl = StreamedFileDataRequestedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -5625,7 +5625,7 @@ impl) -> windows_core::Result<()> + Se } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&stream)).into() + (this.invoke)(core::mem::transmute_copy(&stream)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/mod.rs b/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/mod.rs index f84f410538..d2c2ec94a5 100644 --- a/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/mod.rs +++ b/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/mod.rs @@ -41,14 +41,14 @@ impl windows_core::RuntimeName for ISysStorageProviderEventSource { const NAME: &'static str = "Windows.System.Implementation.FileExplorer.ISysStorageProviderEventSource"; } pub trait ISysStorageProviderEventSource_Impl: windows_core::IUnknownImpl { - fn EventReceived(&self, handler: Option<&super::super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn EventReceived(&self, handler: windows_core::Ref<'_, super::super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveEventReceived(&self, token: i64) -> windows_core::Result<()>; } impl ISysStorageProviderEventSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EventReceived(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISysStorageProviderEventSource_Impl::EventReceived(this, windows_core::from_raw_borrowed(&handler)) { + match ISysStorageProviderEventSource_Impl::EventReceived(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -168,14 +168,14 @@ impl windows_core::RuntimeName for ISysStorageProviderHttpRequestProvider { } #[cfg(feature = "Web_Http")] pub trait ISysStorageProviderHttpRequestProvider_Impl: windows_core::IUnknownImpl { - fn SendRequestAsync(&self, request: Option<&super::super::super::Web::Http::HttpRequestMessage>) -> windows_core::Result>; + fn SendRequestAsync(&self, request: windows_core::Ref<'_, super::super::super::Web::Http::HttpRequestMessage>) -> windows_core::Result>; } #[cfg(feature = "Web_Http")] impl ISysStorageProviderHttpRequestProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SendRequestAsync(this: *mut core::ffi::c_void, request: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISysStorageProviderHttpRequestProvider_Impl::SendRequestAsync(this, windows_core::from_raw_borrowed(&request)) { + match ISysStorageProviderHttpRequestProvider_Impl::SendRequestAsync(this, core::mem::transmute_copy(&request)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); 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 aabaeec4f5..4cbfc3b086 100644 --- a/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs +++ b/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs @@ -101,7 +101,7 @@ impl windows_core::RuntimeType for SignalHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl SignalHandler { - pub fn new, bool) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, bool) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = SignalHandlerBox { vtable: &SignalHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -119,12 +119,12 @@ pub struct SignalHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, signalnotifier: *mut core::ffi::c_void, timedout: bool) -> windows_core::HRESULT, } #[repr(C)] -struct SignalHandlerBox, bool) -> windows_core::Result<()> + Send + 'static> { +struct SignalHandlerBox, bool) -> windows_core::Result<()> + Send + 'static> { vtable: *const SignalHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, bool) -> windows_core::Result<()> + Send + 'static> SignalHandlerBox { +impl, bool) -> windows_core::Result<()> + Send + 'static> SignalHandlerBox { const VTABLE: SignalHandler_Vtbl = SignalHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -153,7 +153,7 @@ impl, bool) -> windows_core::Result<()> + Send } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, signalnotifier: *mut core::ffi::c_void, timedout: bool) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&signalnotifier), timedout).into() + (this.invoke)(core::mem::transmute_copy(&signalnotifier), timedout).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/System/Threading/mod.rs b/crates/libs/windows/src/Windows/System/Threading/mod.rs index 651b36c1f2..4cd33983c6 100644 --- a/crates/libs/windows/src/Windows/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/System/Threading/mod.rs @@ -154,7 +154,7 @@ impl windows_core::RuntimeType for TimerDestroyedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl TimerDestroyedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = TimerDestroyedHandlerBox { vtable: &TimerDestroyedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -172,12 +172,12 @@ pub struct TimerDestroyedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, timer: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct TimerDestroyedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct TimerDestroyedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const TimerDestroyedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> TimerDestroyedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> TimerDestroyedHandlerBox { const VTABLE: TimerDestroyedHandler_Vtbl = TimerDestroyedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -206,7 +206,7 @@ impl) -> windows_core::Result<()> + Send + 'st } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, timer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&timer)).into() + (this.invoke)(core::mem::transmute_copy(&timer)).into() } } windows_core::imp::define_interface!(TimerElapsedHandler, TimerElapsedHandler_Vtbl, 0xfaaea667_fbeb_49cb_adb2_71184c556e43); @@ -214,7 +214,7 @@ impl windows_core::RuntimeType for TimerElapsedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl TimerElapsedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = TimerElapsedHandlerBox { vtable: &TimerElapsedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -232,12 +232,12 @@ pub struct TimerElapsedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, timer: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct TimerElapsedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct TimerElapsedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const TimerElapsedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> TimerElapsedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> TimerElapsedHandlerBox { const VTABLE: TimerElapsedHandler_Vtbl = TimerElapsedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -266,7 +266,7 @@ impl) -> windows_core::Result<()> + Send + 'st } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, timer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&timer)).into() + (this.invoke)(core::mem::transmute_copy(&timer)).into() } } windows_core::imp::define_interface!(WorkItemHandler, WorkItemHandler_Vtbl, 0x1d1a8b8b_fa66_414f_9cbd_b65fc99d17fa); @@ -274,7 +274,7 @@ impl windows_core::RuntimeType for WorkItemHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl WorkItemHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = WorkItemHandlerBox { vtable: &WorkItemHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -292,12 +292,12 @@ pub struct WorkItemHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, operation: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct WorkItemHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct WorkItemHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const WorkItemHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> WorkItemHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> WorkItemHandlerBox { const VTABLE: WorkItemHandler_Vtbl = WorkItemHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -326,7 +326,7 @@ impl) -> windows_core:: } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, operation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&operation)).into() + (this.invoke)(core::mem::transmute_copy(&operation)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs b/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs index 502d0d8e98..c5bf57fd4c 100644 --- a/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs +++ b/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs @@ -236,7 +236,7 @@ impl windows_core::RuntimeType for CredentialCommandCredentialDeletedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl CredentialCommandCredentialDeletedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = CredentialCommandCredentialDeletedHandlerBox { vtable: &CredentialCommandCredentialDeletedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -254,12 +254,12 @@ pub struct CredentialCommandCredentialDeletedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, command: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct CredentialCommandCredentialDeletedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct CredentialCommandCredentialDeletedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const CredentialCommandCredentialDeletedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> CredentialCommandCredentialDeletedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> CredentialCommandCredentialDeletedHandlerBox { const VTABLE: CredentialCommandCredentialDeletedHandler_Vtbl = CredentialCommandCredentialDeletedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -288,7 +288,7 @@ impl) -> windows_core::Result<()> + Send + ' } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, command: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&command)).into() + (this.invoke)(core::mem::transmute_copy(&command)).into() } } windows_core::imp::define_interface!(IAccountsSettingsPane, IAccountsSettingsPane_Vtbl, 0x81ea942c_4f09_4406_a538_838d9b14b7e6); @@ -915,7 +915,7 @@ impl windows_core::RuntimeType for WebAccountCommandInvokedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl WebAccountCommandInvokedHandler { - pub fn new, Option<&WebAccountInvokedArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, WebAccountInvokedArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = WebAccountCommandInvokedHandlerBox { vtable: &WebAccountCommandInvokedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -934,12 +934,12 @@ pub struct WebAccountCommandInvokedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, command: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct WebAccountCommandInvokedHandlerBox, Option<&WebAccountInvokedArgs>) -> windows_core::Result<()> + Send + 'static> { +struct WebAccountCommandInvokedHandlerBox, windows_core::Ref<'_, WebAccountInvokedArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const WebAccountCommandInvokedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&WebAccountInvokedArgs>) -> windows_core::Result<()> + Send + 'static> WebAccountCommandInvokedHandlerBox { +impl, windows_core::Ref<'_, WebAccountInvokedArgs>) -> windows_core::Result<()> + Send + 'static> WebAccountCommandInvokedHandlerBox { const VTABLE: WebAccountCommandInvokedHandler_Vtbl = WebAccountCommandInvokedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -968,7 +968,7 @@ impl, Option<&WebAccountInvokedArgs>) -> win } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, command: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&command), windows_core::from_raw_borrowed(&args)).into() + (this.invoke)(core::mem::transmute_copy(&command), core::mem::transmute_copy(&args)).into() } } #[repr(transparent)] @@ -1045,7 +1045,7 @@ impl windows_core::RuntimeType for WebAccountProviderCommandInvokedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl WebAccountProviderCommandInvokedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = WebAccountProviderCommandInvokedHandlerBox { vtable: &WebAccountProviderCommandInvokedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1063,12 +1063,12 @@ pub struct WebAccountProviderCommandInvokedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, command: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct WebAccountProviderCommandInvokedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct WebAccountProviderCommandInvokedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const WebAccountProviderCommandInvokedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> WebAccountProviderCommandInvokedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> WebAccountProviderCommandInvokedHandlerBox { const VTABLE: WebAccountProviderCommandInvokedHandler_Vtbl = WebAccountProviderCommandInvokedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -1097,6 +1097,6 @@ impl) -> windows_core::Result<()> + } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, command: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&command)).into() + (this.invoke)(core::mem::transmute_copy(&command)).into() } } diff --git a/crates/libs/windows/src/Windows/UI/Composition/Interactions/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/Interactions/mod.rs index ed99bbc56f..3989f7d899 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/Interactions/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/Interactions/mod.rs @@ -807,38 +807,38 @@ impl windows_core::RuntimeName for IInteractionTrackerOwner { const NAME: &'static str = "Windows.UI.Composition.Interactions.IInteractionTrackerOwner"; } pub trait IInteractionTrackerOwner_Impl: windows_core::IUnknownImpl { - fn CustomAnimationStateEntered(&self, sender: Option<&InteractionTracker>, args: Option<&InteractionTrackerCustomAnimationStateEnteredArgs>) -> windows_core::Result<()>; - fn IdleStateEntered(&self, sender: Option<&InteractionTracker>, args: Option<&InteractionTrackerIdleStateEnteredArgs>) -> windows_core::Result<()>; - fn InertiaStateEntered(&self, sender: Option<&InteractionTracker>, args: Option<&InteractionTrackerInertiaStateEnteredArgs>) -> windows_core::Result<()>; - fn InteractingStateEntered(&self, sender: Option<&InteractionTracker>, args: Option<&InteractionTrackerInteractingStateEnteredArgs>) -> windows_core::Result<()>; - fn RequestIgnored(&self, sender: Option<&InteractionTracker>, args: Option<&InteractionTrackerRequestIgnoredArgs>) -> windows_core::Result<()>; - fn ValuesChanged(&self, sender: Option<&InteractionTracker>, args: Option<&InteractionTrackerValuesChangedArgs>) -> windows_core::Result<()>; + fn CustomAnimationStateEntered(&self, sender: windows_core::Ref<'_, InteractionTracker>, args: windows_core::Ref<'_, InteractionTrackerCustomAnimationStateEnteredArgs>) -> windows_core::Result<()>; + fn IdleStateEntered(&self, sender: windows_core::Ref<'_, InteractionTracker>, args: windows_core::Ref<'_, InteractionTrackerIdleStateEnteredArgs>) -> windows_core::Result<()>; + fn InertiaStateEntered(&self, sender: windows_core::Ref<'_, InteractionTracker>, args: windows_core::Ref<'_, InteractionTrackerInertiaStateEnteredArgs>) -> windows_core::Result<()>; + fn InteractingStateEntered(&self, sender: windows_core::Ref<'_, InteractionTracker>, args: windows_core::Ref<'_, InteractionTrackerInteractingStateEnteredArgs>) -> windows_core::Result<()>; + fn RequestIgnored(&self, sender: windows_core::Ref<'_, InteractionTracker>, args: windows_core::Ref<'_, InteractionTrackerRequestIgnoredArgs>) -> windows_core::Result<()>; + fn ValuesChanged(&self, sender: windows_core::Ref<'_, InteractionTracker>, args: windows_core::Ref<'_, InteractionTrackerValuesChangedArgs>) -> windows_core::Result<()>; } impl IInteractionTrackerOwner_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CustomAnimationStateEntered(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInteractionTrackerOwner_Impl::CustomAnimationStateEntered(this, windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&args)).into() + IInteractionTrackerOwner_Impl::CustomAnimationStateEntered(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&args)).into() } unsafe extern "system" fn IdleStateEntered(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInteractionTrackerOwner_Impl::IdleStateEntered(this, windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&args)).into() + IInteractionTrackerOwner_Impl::IdleStateEntered(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&args)).into() } unsafe extern "system" fn InertiaStateEntered(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInteractionTrackerOwner_Impl::InertiaStateEntered(this, windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&args)).into() + IInteractionTrackerOwner_Impl::InertiaStateEntered(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&args)).into() } unsafe extern "system" fn InteractingStateEntered(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInteractionTrackerOwner_Impl::InteractingStateEntered(this, windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&args)).into() + IInteractionTrackerOwner_Impl::InteractingStateEntered(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&args)).into() } unsafe extern "system" fn RequestIgnored(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInteractionTrackerOwner_Impl::RequestIgnored(this, windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&args)).into() + IInteractionTrackerOwner_Impl::RequestIgnored(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&args)).into() } unsafe extern "system" fn ValuesChanged(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, args: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInteractionTrackerOwner_Impl::ValuesChanged(this, windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&args)).into() + IInteractionTrackerOwner_Impl::ValuesChanged(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&args)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Composition/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/mod.rs index 56a8659635..4544f17aa1 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/mod.rs @@ -14950,13 +14950,13 @@ impl windows_core::RuntimeName for IAnimationObject { const NAME: &'static str = "Windows.UI.Composition.IAnimationObject"; } pub trait IAnimationObject_Impl: windows_core::IUnknownImpl { - fn PopulatePropertyInfo(&self, propertyName: &windows_core::HSTRING, propertyInfo: Option<&AnimationPropertyInfo>) -> windows_core::Result<()>; + fn PopulatePropertyInfo(&self, propertyName: &windows_core::HSTRING, propertyInfo: windows_core::Ref<'_, AnimationPropertyInfo>) -> windows_core::Result<()>; } impl IAnimationObject_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PopulatePropertyInfo(this: *mut core::ffi::c_void, propertyname: *mut core::ffi::c_void, propertyinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAnimationObject_Impl::PopulatePropertyInfo(this, core::mem::transmute(&propertyname), windows_core::from_raw_borrowed(&propertyinfo)).into() + IAnimationObject_Impl::PopulatePropertyInfo(this, core::mem::transmute(&propertyname), core::mem::transmute_copy(&propertyinfo)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -16351,7 +16351,7 @@ impl windows_core::RuntimeName for ICompositionSupportsSystemBackdrop { } pub trait ICompositionSupportsSystemBackdrop_Impl: windows_core::IUnknownImpl { fn SystemBackdrop(&self) -> windows_core::Result; - fn SetSystemBackdrop(&self, value: Option<&CompositionBrush>) -> windows_core::Result<()>; + fn SetSystemBackdrop(&self, value: windows_core::Ref<'_, CompositionBrush>) -> windows_core::Result<()>; } impl ICompositionSupportsSystemBackdrop_Vtbl { pub const fn new() -> Self { @@ -16368,7 +16368,7 @@ impl ICompositionSupportsSystemBackdrop_Vtbl { } unsafe extern "system" fn SetSystemBackdrop(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICompositionSupportsSystemBackdrop_Impl::SetSystemBackdrop(this, windows_core::from_raw_borrowed(&value)).into() + ICompositionSupportsSystemBackdrop_Impl::SetSystemBackdrop(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Core/mod.rs b/crates/libs/windows/src/Windows/UI/Core/mod.rs index 0158158a42..448e47441c 100644 --- a/crates/libs/windows/src/Windows/UI/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Core/mod.rs @@ -2345,14 +2345,14 @@ impl windows_core::RuntimeName for ICoreAcceleratorKeys { const NAME: &'static str = "Windows.UI.Core.ICoreAcceleratorKeys"; } pub trait ICoreAcceleratorKeys_Impl: windows_core::IUnknownImpl { - fn AcceleratorKeyActivated(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn AcceleratorKeyActivated(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveAcceleratorKeyActivated(&self, cookie: i64) -> windows_core::Result<()>; } impl ICoreAcceleratorKeys_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AcceleratorKeyActivated(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreAcceleratorKeys_Impl::AcceleratorKeyActivated(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreAcceleratorKeys_Impl::AcceleratorKeyActivated(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2534,7 +2534,7 @@ pub trait ICoreInputSourceBase_Impl: windows_core::IUnknownImpl { fn Dispatcher(&self) -> windows_core::Result; fn IsInputEnabled(&self) -> windows_core::Result; fn SetIsInputEnabled(&self, value: bool) -> windows_core::Result<()>; - fn InputEnabled(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn InputEnabled(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveInputEnabled(&self, cookie: i64) -> windows_core::Result<()>; } impl ICoreInputSourceBase_Vtbl { @@ -2566,7 +2566,7 @@ impl ICoreInputSourceBase_Vtbl { } unsafe extern "system" fn InputEnabled(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreInputSourceBase_Impl::InputEnabled(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreInputSourceBase_Impl::InputEnabled(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2777,20 +2777,20 @@ pub trait ICorePointerInputSource_Impl: windows_core::IUnknownImpl { fn HasCapture(&self) -> windows_core::Result; fn PointerPosition(&self) -> windows_core::Result; fn PointerCursor(&self) -> windows_core::Result; - fn SetPointerCursor(&self, value: Option<&CoreCursor>) -> windows_core::Result<()>; - fn PointerCaptureLost(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn SetPointerCursor(&self, value: windows_core::Ref<'_, CoreCursor>) -> windows_core::Result<()>; + fn PointerCaptureLost(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerCaptureLost(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerEntered(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerEntered(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerEntered(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerExited(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerExited(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerExited(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerMoved(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerMoved(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerMoved(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerPressed(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerPressed(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerPressed(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerReleased(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerReleased(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerReleased(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerWheelChanged(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerWheelChanged(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerWheelChanged(&self, cookie: i64) -> windows_core::Result<()>; } impl ICorePointerInputSource_Vtbl { @@ -2836,11 +2836,11 @@ impl ICorePointerInputSource_Vtbl { } unsafe extern "system" fn SetPointerCursor(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICorePointerInputSource_Impl::SetPointerCursor(this, windows_core::from_raw_borrowed(&value)).into() + ICorePointerInputSource_Impl::SetPointerCursor(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn PointerCaptureLost(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerInputSource_Impl::PointerCaptureLost(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerInputSource_Impl::PointerCaptureLost(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2854,7 +2854,7 @@ impl ICorePointerInputSource_Vtbl { } unsafe extern "system" fn PointerEntered(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerInputSource_Impl::PointerEntered(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerInputSource_Impl::PointerEntered(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2868,7 +2868,7 @@ impl ICorePointerInputSource_Vtbl { } unsafe extern "system" fn PointerExited(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerInputSource_Impl::PointerExited(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerInputSource_Impl::PointerExited(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2882,7 +2882,7 @@ impl ICorePointerInputSource_Vtbl { } unsafe extern "system" fn PointerMoved(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerInputSource_Impl::PointerMoved(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerInputSource_Impl::PointerMoved(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2896,7 +2896,7 @@ impl ICorePointerInputSource_Vtbl { } unsafe extern "system" fn PointerPressed(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerInputSource_Impl::PointerPressed(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerInputSource_Impl::PointerPressed(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2910,7 +2910,7 @@ impl ICorePointerInputSource_Vtbl { } unsafe extern "system" fn PointerReleased(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerInputSource_Impl::PointerReleased(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerInputSource_Impl::PointerReleased(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2924,7 +2924,7 @@ impl ICorePointerInputSource_Vtbl { } unsafe extern "system" fn PointerWheelChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerInputSource_Impl::PointerWheelChanged(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerInputSource_Impl::PointerWheelChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3230,18 +3230,18 @@ impl windows_core::RuntimeName for ICorePointerRedirector { const NAME: &'static str = "Windows.UI.Core.ICorePointerRedirector"; } pub trait ICorePointerRedirector_Impl: windows_core::IUnknownImpl { - fn PointerRoutedAway(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerRoutedAway(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerRoutedAway(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerRoutedTo(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerRoutedTo(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerRoutedTo(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerRoutedReleased(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerRoutedReleased(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerRoutedReleased(&self, cookie: i64) -> windows_core::Result<()>; } impl ICorePointerRedirector_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PointerRoutedAway(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerRedirector_Impl::PointerRoutedAway(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerRedirector_Impl::PointerRoutedAway(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3255,7 +3255,7 @@ impl ICorePointerRedirector_Vtbl { } unsafe extern "system" fn PointerRoutedTo(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerRedirector_Impl::PointerRoutedTo(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerRedirector_Impl::PointerRoutedTo(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3269,7 +3269,7 @@ impl ICorePointerRedirector_Vtbl { } unsafe extern "system" fn PointerRoutedReleased(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorePointerRedirector_Impl::PointerRoutedReleased(this, windows_core::from_raw_borrowed(&handler)) { + match ICorePointerRedirector_Impl::PointerRoutedReleased(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3686,7 +3686,7 @@ pub trait ICoreWindow_Impl: windows_core::IUnknownImpl { fn IsInputEnabled(&self) -> windows_core::Result; fn SetIsInputEnabled(&self, value: bool) -> windows_core::Result<()>; fn PointerCursor(&self) -> windows_core::Result; - fn SetPointerCursor(&self, value: Option<&CoreCursor>) -> windows_core::Result<()>; + fn SetPointerCursor(&self, value: windows_core::Ref<'_, CoreCursor>) -> windows_core::Result<()>; fn PointerPosition(&self) -> windows_core::Result; fn Visible(&self) -> windows_core::Result; fn Activate(&self) -> windows_core::Result<()>; @@ -3695,39 +3695,39 @@ pub trait ICoreWindow_Impl: windows_core::IUnknownImpl { fn GetKeyState(&self, virtualKey: super::super::System::VirtualKey) -> windows_core::Result; fn ReleasePointerCapture(&self) -> windows_core::Result<()>; fn SetPointerCapture(&self) -> windows_core::Result<()>; - fn Activated(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn Activated(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveActivated(&self, cookie: i64) -> windows_core::Result<()>; - fn AutomationProviderRequested(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn AutomationProviderRequested(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveAutomationProviderRequested(&self, cookie: i64) -> windows_core::Result<()>; - fn CharacterReceived(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn CharacterReceived(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveCharacterReceived(&self, cookie: i64) -> windows_core::Result<()>; - fn Closed(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn Closed(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveClosed(&self, cookie: i64) -> windows_core::Result<()>; - fn InputEnabled(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn InputEnabled(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveInputEnabled(&self, cookie: i64) -> windows_core::Result<()>; - fn KeyDown(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn KeyDown(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveKeyDown(&self, cookie: i64) -> windows_core::Result<()>; - fn KeyUp(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn KeyUp(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveKeyUp(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerCaptureLost(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerCaptureLost(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerCaptureLost(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerEntered(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerEntered(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerEntered(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerExited(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerExited(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerExited(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerMoved(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerMoved(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerMoved(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerPressed(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerPressed(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerPressed(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerReleased(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerReleased(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerReleased(&self, cookie: i64) -> windows_core::Result<()>; - fn TouchHitTesting(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn TouchHitTesting(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveTouchHitTesting(&self, cookie: i64) -> windows_core::Result<()>; - fn PointerWheelChanged(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PointerWheelChanged(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePointerWheelChanged(&self, cookie: i64) -> windows_core::Result<()>; - fn SizeChanged(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn SizeChanged(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveSizeChanged(&self, cookie: i64) -> windows_core::Result<()>; - fn VisibilityChanged(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn VisibilityChanged(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveVisibilityChanged(&self, cookie: i64) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Collections", feature = "System"))] @@ -3817,7 +3817,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn SetPointerCursor(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICoreWindow_Impl::SetPointerCursor(this, windows_core::from_raw_borrowed(&value)).into() + ICoreWindow_Impl::SetPointerCursor(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn PointerPosition(this: *mut core::ffi::c_void, result__: *mut super::super::Foundation::Point) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3877,7 +3877,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn Activated(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::Activated(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::Activated(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3891,7 +3891,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn AutomationProviderRequested(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::AutomationProviderRequested(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::AutomationProviderRequested(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3905,7 +3905,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn CharacterReceived(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::CharacterReceived(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::CharacterReceived(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3919,7 +3919,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn Closed(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::Closed(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::Closed(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3933,7 +3933,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn InputEnabled(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::InputEnabled(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::InputEnabled(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3947,7 +3947,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn KeyDown(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::KeyDown(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::KeyDown(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3961,7 +3961,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn KeyUp(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::KeyUp(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::KeyUp(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3975,7 +3975,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn PointerCaptureLost(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::PointerCaptureLost(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::PointerCaptureLost(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3989,7 +3989,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn PointerEntered(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::PointerEntered(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::PointerEntered(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -4003,7 +4003,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn PointerExited(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::PointerExited(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::PointerExited(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -4017,7 +4017,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn PointerMoved(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::PointerMoved(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::PointerMoved(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -4031,7 +4031,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn PointerPressed(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::PointerPressed(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::PointerPressed(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -4045,7 +4045,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn PointerReleased(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::PointerReleased(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::PointerReleased(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -4059,7 +4059,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn TouchHitTesting(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::TouchHitTesting(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::TouchHitTesting(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -4073,7 +4073,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn PointerWheelChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::PointerWheelChanged(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::PointerWheelChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -4087,7 +4087,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn SizeChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::SizeChanged(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::SizeChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -4101,7 +4101,7 @@ impl ICoreWindow_Vtbl { } unsafe extern "system" fn VisibilityChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICoreWindow_Impl::VisibilityChanged(this, windows_core::from_raw_borrowed(&handler)) { + match ICoreWindow_Impl::VisibilityChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -4511,13 +4511,13 @@ impl windows_core::RuntimeName for IInitializeWithCoreWindow { const NAME: &'static str = "Windows.UI.Core.IInitializeWithCoreWindow"; } pub trait IInitializeWithCoreWindow_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, window: Option<&CoreWindow>) -> windows_core::Result<()>; + fn Initialize(&self, window: windows_core::Ref<'_, CoreWindow>) -> windows_core::Result<()>; } impl IInitializeWithCoreWindow_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, window: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInitializeWithCoreWindow_Impl::Initialize(this, windows_core::from_raw_borrowed(&window)).into() + IInitializeWithCoreWindow_Impl::Initialize(this, core::mem::transmute_copy(&window)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), Initialize: Initialize:: } } @@ -4656,7 +4656,7 @@ impl windows_core::RuntimeType for IdleDispatchedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl IdleDispatchedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = IdleDispatchedHandlerBox { vtable: &IdleDispatchedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -4674,12 +4674,12 @@ pub struct IdleDispatchedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct IdleDispatchedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct IdleDispatchedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const IdleDispatchedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> IdleDispatchedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> IdleDispatchedHandlerBox { const VTABLE: IdleDispatchedHandler_Vtbl = IdleDispatchedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -4708,7 +4708,7 @@ impl) -> windows_core::Result<()> + } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&e)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/UI/Input/Inking/mod.rs b/crates/libs/windows/src/Windows/UI/Input/Inking/mod.rs index 70a73a8386..33587283be 100644 --- a/crates/libs/windows/src/Windows/UI/Input/Inking/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Input/Inking/mod.rs @@ -376,13 +376,13 @@ impl windows_core::RuntimeName for IInkPresenterRulerFactory { const NAME: &'static str = "Windows.UI.Input.Inking.IInkPresenterRulerFactory"; } pub trait IInkPresenterRulerFactory_Impl: windows_core::IUnknownImpl { - fn Create(&self, inkPresenter: Option<&InkPresenter>) -> windows_core::Result; + fn Create(&self, inkPresenter: windows_core::Ref<'_, InkPresenter>) -> windows_core::Result; } impl IInkPresenterRulerFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, inkpresenter: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkPresenterRulerFactory_Impl::Create(this, windows_core::from_raw_borrowed(&inkpresenter)) { + match IInkPresenterRulerFactory_Impl::Create(this, core::mem::transmute_copy(&inkpresenter)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -648,8 +648,8 @@ impl windows_core::RuntimeName for IInkRecognizerContainer { } #[cfg(feature = "Foundation_Collections")] pub trait IInkRecognizerContainer_Impl: windows_core::IUnknownImpl { - fn SetDefaultRecognizer(&self, recognizer: Option<&InkRecognizer>) -> windows_core::Result<()>; - fn RecognizeAsync(&self, strokeCollection: Option<&InkStrokeContainer>, recognitionTarget: InkRecognitionTarget) -> windows_core::Result>>; + fn SetDefaultRecognizer(&self, recognizer: windows_core::Ref<'_, InkRecognizer>) -> windows_core::Result<()>; + fn RecognizeAsync(&self, strokeCollection: windows_core::Ref<'_, InkStrokeContainer>, recognitionTarget: InkRecognitionTarget) -> windows_core::Result>>; fn GetRecognizers(&self) -> windows_core::Result>; } #[cfg(feature = "Foundation_Collections")] @@ -657,11 +657,11 @@ impl IInkRecognizerContainer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDefaultRecognizer(this: *mut core::ffi::c_void, recognizer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRecognizerContainer_Impl::SetDefaultRecognizer(this, windows_core::from_raw_borrowed(&recognizer)).into() + IInkRecognizerContainer_Impl::SetDefaultRecognizer(this, core::mem::transmute_copy(&recognizer)).into() } unsafe extern "system" fn RecognizeAsync(this: *mut core::ffi::c_void, strokecollection: *mut core::ffi::c_void, recognitiontarget: InkRecognitionTarget, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkRecognizerContainer_Impl::RecognizeAsync(this, windows_core::from_raw_borrowed(&strokecollection), recognitiontarget) { + match IInkRecognizerContainer_Impl::RecognizeAsync(this, core::mem::transmute_copy(&strokecollection), recognitiontarget) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -930,17 +930,17 @@ impl windows_core::RuntimeName for IInkStrokeContainer { #[cfg(all(feature = "Foundation_Collections", feature = "Storage_Streams"))] pub trait IInkStrokeContainer_Impl: windows_core::IUnknownImpl { fn BoundingRect(&self) -> windows_core::Result; - fn AddStroke(&self, stroke: Option<&InkStroke>) -> windows_core::Result<()>; + fn AddStroke(&self, stroke: windows_core::Ref<'_, InkStroke>) -> windows_core::Result<()>; fn DeleteSelected(&self) -> windows_core::Result; fn MoveSelected(&self, translation: &super::super::super::Foundation::Point) -> windows_core::Result; - fn SelectWithPolyLine(&self, polyline: Option<&super::super::super::Foundation::Collections::IIterable>) -> windows_core::Result; + fn SelectWithPolyLine(&self, polyline: windows_core::Ref<'_, super::super::super::Foundation::Collections::IIterable>) -> windows_core::Result; fn SelectWithLine(&self, from: &super::super::super::Foundation::Point, to: &super::super::super::Foundation::Point) -> windows_core::Result; fn CopySelectedToClipboard(&self) -> windows_core::Result<()>; fn PasteFromClipboard(&self, position: &super::super::super::Foundation::Point) -> windows_core::Result; fn CanPasteFromClipboard(&self) -> windows_core::Result; - fn LoadAsync(&self, inputStream: Option<&super::super::super::Storage::Streams::IInputStream>) -> windows_core::Result>; - fn SaveAsync(&self, outputStream: Option<&super::super::super::Storage::Streams::IOutputStream>) -> windows_core::Result>; - fn UpdateRecognitionResults(&self, recognitionResults: Option<&super::super::super::Foundation::Collections::IVectorView>) -> windows_core::Result<()>; + fn LoadAsync(&self, inputStream: windows_core::Ref<'_, super::super::super::Storage::Streams::IInputStream>) -> windows_core::Result>; + fn SaveAsync(&self, outputStream: windows_core::Ref<'_, super::super::super::Storage::Streams::IOutputStream>) -> windows_core::Result>; + fn UpdateRecognitionResults(&self, recognitionResults: windows_core::Ref<'_, super::super::super::Foundation::Collections::IVectorView>) -> windows_core::Result<()>; fn GetStrokes(&self) -> windows_core::Result>; fn GetRecognitionResults(&self) -> windows_core::Result>; } @@ -959,7 +959,7 @@ impl IInkStrokeContainer_Vtbl { } unsafe extern "system" fn AddStroke(this: *mut core::ffi::c_void, stroke: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokeContainer_Impl::AddStroke(this, windows_core::from_raw_borrowed(&stroke)).into() + IInkStrokeContainer_Impl::AddStroke(this, core::mem::transmute_copy(&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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -983,7 +983,7 @@ impl IInkStrokeContainer_Vtbl { } unsafe extern "system" fn SelectWithPolyLine(this: *mut core::ffi::c_void, polyline: *mut core::ffi::c_void, result__: *mut super::super::super::Foundation::Rect) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkStrokeContainer_Impl::SelectWithPolyLine(this, windows_core::from_raw_borrowed(&polyline)) { + match IInkStrokeContainer_Impl::SelectWithPolyLine(this, core::mem::transmute_copy(&polyline)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1027,7 +1027,7 @@ impl IInkStrokeContainer_Vtbl { } unsafe extern "system" fn LoadAsync(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkStrokeContainer_Impl::LoadAsync(this, windows_core::from_raw_borrowed(&inputstream)) { + match IInkStrokeContainer_Impl::LoadAsync(this, core::mem::transmute_copy(&inputstream)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1038,7 +1038,7 @@ impl IInkStrokeContainer_Vtbl { } unsafe extern "system" fn SaveAsync(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkStrokeContainer_Impl::SaveAsync(this, windows_core::from_raw_borrowed(&outputstream)) { + match IInkStrokeContainer_Impl::SaveAsync(this, core::mem::transmute_copy(&outputstream)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -1049,7 +1049,7 @@ impl IInkStrokeContainer_Vtbl { } unsafe extern "system" fn UpdateRecognitionResults(this: *mut core::ffi::c_void, recognitionresults: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokeContainer_Impl::UpdateRecognitionResults(this, windows_core::from_raw_borrowed(&recognitionresults)).into() + IInkStrokeContainer_Impl::UpdateRecognitionResults(this, core::mem::transmute_copy(&recognitionresults)).into() } unsafe extern "system" fn GetStrokes(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/UI/Popups/mod.rs b/crates/libs/windows/src/Windows/UI/Popups/mod.rs index 8123b61423..25ee13b545 100644 --- a/crates/libs/windows/src/Windows/UI/Popups/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Popups/mod.rs @@ -99,9 +99,9 @@ pub trait IUICommand_Impl: windows_core::IUnknownImpl { fn Label(&self) -> windows_core::Result; fn SetLabel(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; fn Invoked(&self) -> windows_core::Result; - fn SetInvoked(&self, value: Option<&UICommandInvokedHandler>) -> windows_core::Result<()>; + fn SetInvoked(&self, value: windows_core::Ref<'_, UICommandInvokedHandler>) -> windows_core::Result<()>; fn Id(&self) -> windows_core::Result; - fn SetId(&self, value: Option<&windows_core::IInspectable>) -> windows_core::Result<()>; + fn SetId(&self, value: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result<()>; } impl IUICommand_Vtbl { pub const fn new() -> Self { @@ -133,7 +133,7 @@ impl IUICommand_Vtbl { } unsafe extern "system" fn SetInvoked(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUICommand_Impl::SetInvoked(this, windows_core::from_raw_borrowed(&value)).into() + IUICommand_Impl::SetInvoked(this, core::mem::transmute_copy(&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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -148,7 +148,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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUICommand_Impl::SetId(this, windows_core::from_raw_borrowed(&value)).into() + IUICommand_Impl::SetId(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -499,7 +499,7 @@ impl windows_core::RuntimeType for UICommandInvokedHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl UICommandInvokedHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = UICommandInvokedHandlerBox { vtable: &UICommandInvokedHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -517,12 +517,12 @@ pub struct UICommandInvokedHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, command: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct UICommandInvokedHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct UICommandInvokedHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const UICommandInvokedHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> UICommandInvokedHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> UICommandInvokedHandlerBox { const VTABLE: UICommandInvokedHandler_Vtbl = UICommandInvokedHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -551,7 +551,7 @@ impl) -> windows_core::Result<()> + Send + 'static> } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, command: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&command)).into() + (this.invoke)(core::mem::transmute_copy(&command)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/UI/Text/mod.rs b/crates/libs/windows/src/Windows/UI/Text/mod.rs index dc58c46128..3058ab3ec2 100644 --- a/crates/libs/windows/src/Windows/UI/Text/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Text/mod.rs @@ -703,9 +703,9 @@ pub trait ITextCharacterFormat_Impl: windows_core::IUnknownImpl { fn SetUnderline(&self, value: UnderlineType) -> windows_core::Result<()>; fn Weight(&self) -> windows_core::Result; fn SetWeight(&self, value: i32) -> windows_core::Result<()>; - fn SetClone(&self, value: Option<&ITextCharacterFormat>) -> windows_core::Result<()>; + fn SetClone(&self, value: windows_core::Ref<'_, ITextCharacterFormat>) -> windows_core::Result<()>; fn GetClone(&self) -> windows_core::Result; - fn IsEqual(&self, format: Option<&ITextCharacterFormat>) -> windows_core::Result; + fn IsEqual(&self, format: windows_core::Ref<'_, ITextCharacterFormat>) -> windows_core::Result; } impl ITextCharacterFormat_Vtbl { pub const fn new() -> Self { @@ -1045,7 +1045,7 @@ impl ITextCharacterFormat_Vtbl { } unsafe extern "system" fn SetClone(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextCharacterFormat_Impl::SetClone(this, windows_core::from_raw_borrowed(&value)).into() + ITextCharacterFormat_Impl::SetClone(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn GetClone(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1060,7 +1060,7 @@ impl ITextCharacterFormat_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, format: *mut core::ffi::c_void, result__: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextCharacterFormat_Impl::IsEqual(this, windows_core::from_raw_borrowed(&format)) { + match ITextCharacterFormat_Impl::IsEqual(this, core::mem::transmute_copy(&format)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -1393,11 +1393,11 @@ pub trait ITextDocument_Impl: windows_core::IUnknownImpl { fn GetRange(&self, startPosition: i32, endPosition: i32) -> windows_core::Result; fn GetRangeFromPoint(&self, point: &super::super::Foundation::Point, options: PointOptions) -> windows_core::Result; fn GetText(&self, options: TextGetOptions, value: &mut windows_core::HSTRING) -> windows_core::Result<()>; - fn LoadFromStream(&self, options: TextSetOptions, value: Option<&super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; + fn LoadFromStream(&self, options: TextSetOptions, value: windows_core::Ref<'_, super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; fn Redo(&self) -> windows_core::Result<()>; - fn SaveToStream(&self, options: TextGetOptions, value: Option<&super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; - fn SetDefaultCharacterFormat(&self, value: Option<&ITextCharacterFormat>) -> windows_core::Result<()>; - fn SetDefaultParagraphFormat(&self, value: Option<&ITextParagraphFormat>) -> windows_core::Result<()>; + fn SaveToStream(&self, options: TextGetOptions, value: windows_core::Ref<'_, super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; + fn SetDefaultCharacterFormat(&self, value: windows_core::Ref<'_, ITextCharacterFormat>) -> windows_core::Result<()>; + fn SetDefaultParagraphFormat(&self, value: windows_core::Ref<'_, ITextParagraphFormat>) -> windows_core::Result<()>; fn SetText(&self, options: TextSetOptions, value: &windows_core::HSTRING) -> windows_core::Result<()>; fn Undo(&self) -> windows_core::Result<()>; } @@ -1575,7 +1575,7 @@ impl ITextDocument_Vtbl { } unsafe extern "system" fn LoadFromStream(this: *mut core::ffi::c_void, options: TextSetOptions, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument_Impl::LoadFromStream(this, options, windows_core::from_raw_borrowed(&value)).into() + ITextDocument_Impl::LoadFromStream(this, options, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Redo(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1583,15 +1583,15 @@ impl ITextDocument_Vtbl { } unsafe extern "system" fn SaveToStream(this: *mut core::ffi::c_void, options: TextGetOptions, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument_Impl::SaveToStream(this, options, windows_core::from_raw_borrowed(&value)).into() + ITextDocument_Impl::SaveToStream(this, options, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn SetDefaultCharacterFormat(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument_Impl::SetDefaultCharacterFormat(this, windows_core::from_raw_borrowed(&value)).into() + ITextDocument_Impl::SetDefaultCharacterFormat(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn SetDefaultParagraphFormat(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument_Impl::SetDefaultParagraphFormat(this, windows_core::from_raw_borrowed(&value)).into() + ITextDocument_Impl::SetDefaultParagraphFormat(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn SetText(this: *mut core::ffi::c_void, options: TextSetOptions, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2030,8 +2030,8 @@ pub trait ITextParagraphFormat_Impl: windows_core::IUnknownImpl { fn DeleteTab(&self, position: f32) -> windows_core::Result<()>; fn GetClone(&self) -> windows_core::Result; fn GetTab(&self, index: i32, position: &mut f32, align: &mut TabAlignment, leader: &mut TabLeader) -> windows_core::Result<()>; - fn IsEqual(&self, format: Option<&ITextParagraphFormat>) -> windows_core::Result; - fn SetClone(&self, format: Option<&ITextParagraphFormat>) -> windows_core::Result<()>; + fn IsEqual(&self, format: windows_core::Ref<'_, ITextParagraphFormat>) -> windows_core::Result; + fn SetClone(&self, format: windows_core::Ref<'_, ITextParagraphFormat>) -> windows_core::Result<()>; fn SetIndents(&self, start: f32, left: f32, right: f32) -> windows_core::Result<()>; fn SetLineSpacing(&self, rule: LineSpacingRule, spacing: f32) -> windows_core::Result<()>; } @@ -2354,7 +2354,7 @@ impl ITextParagraphFormat_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, format: *mut core::ffi::c_void, result__: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextParagraphFormat_Impl::IsEqual(this, windows_core::from_raw_borrowed(&format)) { + match ITextParagraphFormat_Impl::IsEqual(this, core::mem::transmute_copy(&format)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -2364,7 +2364,7 @@ impl ITextParagraphFormat_Vtbl { } unsafe extern "system" fn SetClone(this: *mut core::ffi::c_void, format: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextParagraphFormat_Impl::SetClone(this, windows_core::from_raw_borrowed(&format)).into() + ITextParagraphFormat_Impl::SetClone(this, core::mem::transmute_copy(&format)).into() } unsafe extern "system" fn SetIndents(this: *mut core::ffi::c_void, start: f32, left: f32, right: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2811,9 +2811,9 @@ pub trait ITextRange_Impl: windows_core::IUnknownImpl { fn Character(&self) -> windows_core::Result; fn SetCharacter(&self, value: u16) -> windows_core::Result<()>; fn CharacterFormat(&self) -> windows_core::Result; - fn SetCharacterFormat(&self, value: Option<&ITextCharacterFormat>) -> windows_core::Result<()>; + fn SetCharacterFormat(&self, value: windows_core::Ref<'_, ITextCharacterFormat>) -> windows_core::Result<()>; fn FormattedText(&self) -> windows_core::Result; - fn SetFormattedText(&self, value: Option<&ITextRange>) -> windows_core::Result<()>; + fn SetFormattedText(&self, value: windows_core::Ref<'_, ITextRange>) -> windows_core::Result<()>; fn EndPosition(&self) -> windows_core::Result; fn SetEndPosition(&self, value: i32) -> windows_core::Result<()>; fn Gravity(&self) -> windows_core::Result; @@ -2822,7 +2822,7 @@ pub trait ITextRange_Impl: windows_core::IUnknownImpl { fn Link(&self) -> windows_core::Result; fn SetLink(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; fn ParagraphFormat(&self) -> windows_core::Result; - fn SetParagraphFormat(&self, value: Option<&ITextParagraphFormat>) -> windows_core::Result<()>; + fn SetParagraphFormat(&self, value: windows_core::Ref<'_, ITextParagraphFormat>) -> windows_core::Result<()>; fn StartPosition(&self) -> windows_core::Result; fn SetStartPosition(&self, value: i32) -> windows_core::Result<()>; fn StoryLength(&self) -> windows_core::Result; @@ -2843,11 +2843,11 @@ pub trait ITextRange_Impl: windows_core::IUnknownImpl { fn GetPoint(&self, horizontalAlign: HorizontalCharacterAlignment, verticalAlign: VerticalCharacterAlignment, options: PointOptions, point: &mut super::super::Foundation::Point) -> windows_core::Result<()>; fn GetRect(&self, options: PointOptions, rect: &mut super::super::Foundation::Rect, hit: &mut i32) -> windows_core::Result<()>; fn GetText(&self, options: TextGetOptions, value: &mut windows_core::HSTRING) -> windows_core::Result<()>; - fn GetTextViaStream(&self, options: TextGetOptions, value: Option<&super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; - fn InRange(&self, range: Option<&ITextRange>) -> windows_core::Result; - fn InsertImage(&self, width: i32, height: i32, ascent: i32, verticalAlign: VerticalCharacterAlignment, alternateText: &windows_core::HSTRING, value: Option<&super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; - fn InStory(&self, range: Option<&ITextRange>) -> windows_core::Result; - fn IsEqual(&self, range: Option<&ITextRange>) -> windows_core::Result; + fn GetTextViaStream(&self, options: TextGetOptions, value: windows_core::Ref<'_, super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; + fn InRange(&self, range: windows_core::Ref<'_, ITextRange>) -> windows_core::Result; + fn InsertImage(&self, width: i32, height: i32, ascent: i32, verticalAlign: VerticalCharacterAlignment, alternateText: &windows_core::HSTRING, value: windows_core::Ref<'_, super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; + fn InStory(&self, range: windows_core::Ref<'_, ITextRange>) -> windows_core::Result; + fn IsEqual(&self, range: windows_core::Ref<'_, ITextRange>) -> windows_core::Result; fn Move(&self, unit: TextRangeUnit, count: i32) -> windows_core::Result; fn MoveEnd(&self, unit: TextRangeUnit, count: i32) -> windows_core::Result; fn MoveStart(&self, unit: TextRangeUnit, count: i32) -> windows_core::Result; @@ -2858,7 +2858,7 @@ pub trait ITextRange_Impl: windows_core::IUnknownImpl { fn SetPoint(&self, point: &super::super::Foundation::Point, options: PointOptions, extend: bool) -> windows_core::Result<()>; fn SetRange(&self, startPosition: i32, endPosition: i32) -> windows_core::Result<()>; fn SetText2(&self, options: TextSetOptions, value: &windows_core::HSTRING) -> windows_core::Result<()>; - fn SetTextViaStream(&self, options: TextSetOptions, value: Option<&super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; + fn SetTextViaStream(&self, options: TextSetOptions, value: windows_core::Ref<'_, super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result<()>; fn StartOf(&self, unit: TextRangeUnit, extend: bool) -> windows_core::Result; } #[cfg(feature = "Storage_Streams")] @@ -2891,7 +2891,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn SetCharacterFormat(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange_Impl::SetCharacterFormat(this, windows_core::from_raw_borrowed(&value)).into() + ITextRange_Impl::SetCharacterFormat(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn FormattedText(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2906,7 +2906,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn SetFormattedText(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange_Impl::SetFormattedText(this, windows_core::from_raw_borrowed(&value)).into() + ITextRange_Impl::SetFormattedText(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn EndPosition(this: *mut core::ffi::c_void, result__: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2974,7 +2974,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn SetParagraphFormat(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange_Impl::SetParagraphFormat(this, windows_core::from_raw_borrowed(&value)).into() + ITextRange_Impl::SetParagraphFormat(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn StartPosition(this: *mut core::ffi::c_void, result__: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3120,11 +3120,11 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn GetTextViaStream(this: *mut core::ffi::c_void, options: TextGetOptions, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange_Impl::GetTextViaStream(this, options, windows_core::from_raw_borrowed(&value)).into() + ITextRange_Impl::GetTextViaStream(this, options, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn InRange(this: *mut core::ffi::c_void, range: *mut core::ffi::c_void, result__: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRange_Impl::InRange(this, windows_core::from_raw_borrowed(&range)) { + match ITextRange_Impl::InRange(this, core::mem::transmute_copy(&range)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3134,11 +3134,11 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn InsertImage(this: *mut core::ffi::c_void, width: i32, height: i32, ascent: i32, verticalalign: VerticalCharacterAlignment, alternatetext: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange_Impl::InsertImage(this, width, height, ascent, verticalalign, core::mem::transmute(&alternatetext), windows_core::from_raw_borrowed(&value)).into() + ITextRange_Impl::InsertImage(this, width, height, ascent, verticalalign, core::mem::transmute(&alternatetext), core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn InStory(this: *mut core::ffi::c_void, range: *mut core::ffi::c_void, result__: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRange_Impl::InStory(this, windows_core::from_raw_borrowed(&range)) { + match ITextRange_Impl::InStory(this, core::mem::transmute_copy(&range)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3148,7 +3148,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, range: *mut core::ffi::c_void, result__: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRange_Impl::IsEqual(this, windows_core::from_raw_borrowed(&range)) { + match ITextRange_Impl::IsEqual(this, core::mem::transmute_copy(&range)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -3216,7 +3216,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn SetTextViaStream(this: *mut core::ffi::c_void, options: TextSetOptions, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange_Impl::SetTextViaStream(this, options, windows_core::from_raw_borrowed(&value)).into() + ITextRange_Impl::SetTextViaStream(this, options, core::mem::transmute_copy(&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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); 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 c5704a60c2..611be0688a 100644 --- a/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs @@ -336,14 +336,14 @@ impl windows_core::RuntimeName for ICoreAutomationRemoteOperationExtensionProvid const NAME: &'static str = "Windows.UI.UIAutomation.Core.ICoreAutomationRemoteOperationExtensionProvider"; } pub trait ICoreAutomationRemoteOperationExtensionProvider_Impl: windows_core::IUnknownImpl { - fn CallExtension(&self, extensionId: &windows_core::GUID, context: Option<&CoreAutomationRemoteOperationContext>, operandIds: &[AutomationRemoteOperationOperandId]) -> windows_core::Result<()>; + fn CallExtension(&self, extensionId: &windows_core::GUID, context: windows_core::Ref<'_, CoreAutomationRemoteOperationContext>, operandIds: &[AutomationRemoteOperationOperandId]) -> windows_core::Result<()>; fn IsExtensionSupported(&self, extensionId: &windows_core::GUID) -> windows_core::Result; } impl ICoreAutomationRemoteOperationExtensionProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CallExtension(this: *mut core::ffi::c_void, extensionid: windows_core::GUID, context: *mut core::ffi::c_void, operandids_array_size: u32, operandids: *const AutomationRemoteOperationOperandId) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICoreAutomationRemoteOperationExtensionProvider_Impl::CallExtension(this, core::mem::transmute(&extensionid), windows_core::from_raw_borrowed(&context), core::slice::from_raw_parts(core::mem::transmute_copy(&operandids), operandids_array_size as usize)).into() + ICoreAutomationRemoteOperationExtensionProvider_Impl::CallExtension(this, core::mem::transmute(&extensionid), core::mem::transmute_copy(&context), core::slice::from_raw_parts(core::mem::transmute_copy(&operandids), operandids_array_size as usize)).into() } unsafe extern "system" fn IsExtensionSupported(this: *mut core::ffi::c_void, extensionid: windows_core::GUID, result__: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); 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 f88c73556e..dedb2d328a 100644 --- a/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs @@ -291,7 +291,7 @@ impl windows_core::RuntimeType for SizeChangedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl SizeChangedEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = SizeChangedEventHandlerBox { vtable: &SizeChangedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -309,12 +309,12 @@ pub struct SizeChangedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, eventargs: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct SizeChangedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct SizeChangedEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const SizeChangedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> SizeChangedEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> SizeChangedEventHandlerBox { const VTABLE: SizeChangedEventHandler_Vtbl = SizeChangedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -343,7 +343,7 @@ impl) -> windows_core::Res } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, eventargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&eventargs)).into() + (this.invoke)(core::mem::transmute_copy(&eventargs)).into() } } #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/UI/WebUI/mod.rs b/crates/libs/windows/src/Windows/UI/WebUI/mod.rs index 87ef263966..16e7a8f53c 100644 --- a/crates/libs/windows/src/Windows/UI/WebUI/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WebUI/mod.rs @@ -28,7 +28,7 @@ impl windows_core::RuntimeType for ActivatedEventHandler { } #[cfg(feature = "ApplicationModel_Activation")] impl ActivatedEventHandler { - pub fn new, Option<&super::super::ApplicationModel::Activation::IActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, super::super::ApplicationModel::Activation::IActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = ActivatedEventHandlerBox { vtable: &ActivatedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -49,13 +49,13 @@ pub struct ActivatedEventHandler_Vtbl { } #[cfg(feature = "ApplicationModel_Activation")] #[repr(C)] -struct ActivatedEventHandlerBox, Option<&super::super::ApplicationModel::Activation::IActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct ActivatedEventHandlerBox, windows_core::Ref<'_, super::super::ApplicationModel::Activation::IActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const ActivatedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "ApplicationModel_Activation")] -impl, Option<&super::super::ApplicationModel::Activation::IActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static> ActivatedEventHandlerBox { +impl, windows_core::Ref<'_, super::super::ApplicationModel::Activation::IActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static> ActivatedEventHandlerBox { const VTABLE: ActivatedEventHandler_Vtbl = ActivatedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -84,7 +84,7 @@ impl, Option<&super::super::Applica } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, eventargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&eventargs)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&eventargs)).into() } } #[repr(transparent)] @@ -152,7 +152,7 @@ impl windows_core::RuntimeType for BackgroundActivatedEventHandler { } #[cfg(feature = "ApplicationModel_Activation")] impl BackgroundActivatedEventHandler { - pub fn new, Option<&super::super::ApplicationModel::Activation::IBackgroundActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, super::super::ApplicationModel::Activation::IBackgroundActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = BackgroundActivatedEventHandlerBox { vtable: &BackgroundActivatedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -173,13 +173,13 @@ pub struct BackgroundActivatedEventHandler_Vtbl { } #[cfg(feature = "ApplicationModel_Activation")] #[repr(C)] -struct BackgroundActivatedEventHandlerBox, Option<&super::super::ApplicationModel::Activation::IBackgroundActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct BackgroundActivatedEventHandlerBox, windows_core::Ref<'_, super::super::ApplicationModel::Activation::IBackgroundActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const BackgroundActivatedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "ApplicationModel_Activation")] -impl, Option<&super::super::ApplicationModel::Activation::IBackgroundActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static> BackgroundActivatedEventHandlerBox { +impl, windows_core::Ref<'_, super::super::ApplicationModel::Activation::IBackgroundActivatedEventArgs>) -> windows_core::Result<()> + Send + 'static> BackgroundActivatedEventHandlerBox { const VTABLE: BackgroundActivatedEventHandler_Vtbl = BackgroundActivatedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -208,7 +208,7 @@ impl, Option<&super::super::Applica } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, eventargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&eventargs)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&eventargs)).into() } } #[cfg(feature = "ApplicationModel")] @@ -252,7 +252,7 @@ impl windows_core::RuntimeType for EnteredBackgroundEventHandler { } #[cfg(feature = "ApplicationModel")] impl EnteredBackgroundEventHandler { - pub fn new, Option<&super::super::ApplicationModel::IEnteredBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, super::super::ApplicationModel::IEnteredBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = EnteredBackgroundEventHandlerBox { vtable: &EnteredBackgroundEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -273,13 +273,13 @@ pub struct EnteredBackgroundEventHandler_Vtbl { } #[cfg(feature = "ApplicationModel")] #[repr(C)] -struct EnteredBackgroundEventHandlerBox, Option<&super::super::ApplicationModel::IEnteredBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct EnteredBackgroundEventHandlerBox, windows_core::Ref<'_, super::super::ApplicationModel::IEnteredBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const EnteredBackgroundEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "ApplicationModel")] -impl, Option<&super::super::ApplicationModel::IEnteredBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static> EnteredBackgroundEventHandlerBox { +impl, windows_core::Ref<'_, super::super::ApplicationModel::IEnteredBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static> EnteredBackgroundEventHandlerBox { const VTABLE: EnteredBackgroundEventHandler_Vtbl = EnteredBackgroundEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -308,7 +308,7 @@ impl, Option<&super::super::Applica } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } #[cfg(feature = "Graphics_Printing")] @@ -838,7 +838,7 @@ impl windows_core::RuntimeType for LeavingBackgroundEventHandler { } #[cfg(feature = "ApplicationModel")] impl LeavingBackgroundEventHandler { - pub fn new, Option<&super::super::ApplicationModel::ILeavingBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, super::super::ApplicationModel::ILeavingBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = LeavingBackgroundEventHandlerBox { vtable: &LeavingBackgroundEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -859,13 +859,13 @@ pub struct LeavingBackgroundEventHandler_Vtbl { } #[cfg(feature = "ApplicationModel")] #[repr(C)] -struct LeavingBackgroundEventHandlerBox, Option<&super::super::ApplicationModel::ILeavingBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct LeavingBackgroundEventHandlerBox, windows_core::Ref<'_, super::super::ApplicationModel::ILeavingBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const LeavingBackgroundEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "ApplicationModel")] -impl, Option<&super::super::ApplicationModel::ILeavingBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static> LeavingBackgroundEventHandlerBox { +impl, windows_core::Ref<'_, super::super::ApplicationModel::ILeavingBackgroundEventArgs>) -> windows_core::Result<()> + Send + 'static> LeavingBackgroundEventHandlerBox { const VTABLE: LeavingBackgroundEventHandler_Vtbl = LeavingBackgroundEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -894,7 +894,7 @@ impl, Option<&super::super::Applica } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } windows_core::imp::define_interface!(NavigatedEventHandler, NavigatedEventHandler_Vtbl, 0x7af46fe6_40ca_4e49_a7d6_dbdb330cd1a3); @@ -902,7 +902,7 @@ impl windows_core::RuntimeType for NavigatedEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl NavigatedEventHandler { - pub fn new, Option<&IWebUINavigatedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, IWebUINavigatedEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = NavigatedEventHandlerBox { vtable: &NavigatedEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -921,12 +921,12 @@ pub struct NavigatedEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct NavigatedEventHandlerBox, Option<&IWebUINavigatedEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct NavigatedEventHandlerBox, windows_core::Ref<'_, IWebUINavigatedEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const NavigatedEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl, Option<&IWebUINavigatedEventArgs>) -> windows_core::Result<()> + Send + 'static> NavigatedEventHandlerBox { +impl, windows_core::Ref<'_, IWebUINavigatedEventArgs>) -> windows_core::Result<()> + Send + 'static> NavigatedEventHandlerBox { const VTABLE: NavigatedEventHandler_Vtbl = NavigatedEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -955,7 +955,7 @@ impl, Option<&IWebUINavigatedEventA } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } #[repr(transparent)] @@ -1024,7 +1024,7 @@ impl windows_core::RuntimeType for ResumingEventHandler { const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::for_interface::(); } impl ResumingEventHandler { - pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = ResumingEventHandlerBox { vtable: &ResumingEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1042,12 +1042,12 @@ pub struct ResumingEventHandler_Vtbl { Invoke: unsafe extern "system" fn(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT, } #[repr(C)] -struct ResumingEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { +struct ResumingEventHandlerBox) -> windows_core::Result<()> + Send + 'static> { vtable: *const ResumingEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } -impl) -> windows_core::Result<()> + Send + 'static> ResumingEventHandlerBox { +impl) -> windows_core::Result<()> + Send + 'static> ResumingEventHandlerBox { const VTABLE: ResumingEventHandler_Vtbl = ResumingEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -1076,7 +1076,7 @@ impl) -> windows_core::Result<()> + } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender)).into() + (this.invoke)(core::mem::transmute_copy(&sender)).into() } } #[cfg(feature = "ApplicationModel")] @@ -1143,7 +1143,7 @@ impl windows_core::RuntimeType for SuspendingEventHandler { } #[cfg(feature = "ApplicationModel")] impl SuspendingEventHandler { - pub fn new, Option<&super::super::ApplicationModel::ISuspendingEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { + pub fn new, windows_core::Ref<'_, super::super::ApplicationModel::ISuspendingEventArgs>) -> windows_core::Result<()> + Send + 'static>(invoke: F) -> Self { let com = SuspendingEventHandlerBox { vtable: &SuspendingEventHandlerBox::::VTABLE, count: windows_core::imp::RefCount::new(1), invoke }; unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } @@ -1164,13 +1164,13 @@ pub struct SuspendingEventHandler_Vtbl { } #[cfg(feature = "ApplicationModel")] #[repr(C)] -struct SuspendingEventHandlerBox, Option<&super::super::ApplicationModel::ISuspendingEventArgs>) -> windows_core::Result<()> + Send + 'static> { +struct SuspendingEventHandlerBox, windows_core::Ref<'_, super::super::ApplicationModel::ISuspendingEventArgs>) -> windows_core::Result<()> + Send + 'static> { vtable: *const SuspendingEventHandler_Vtbl, invoke: F, count: windows_core::imp::RefCount, } #[cfg(feature = "ApplicationModel")] -impl, Option<&super::super::ApplicationModel::ISuspendingEventArgs>) -> windows_core::Result<()> + Send + 'static> SuspendingEventHandlerBox { +impl, windows_core::Ref<'_, super::super::ApplicationModel::ISuspendingEventArgs>) -> windows_core::Result<()> + Send + 'static> SuspendingEventHandlerBox { const VTABLE: SuspendingEventHandler_Vtbl = SuspendingEventHandler_Vtbl { base__: windows_core::IUnknown_Vtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = this as *mut *mut core::ffi::c_void as *mut Self; @@ -1199,7 +1199,7 @@ impl, Option<&super::super::Applica } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, e: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); - (this.invoke)(windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&e)).into() + (this.invoke)(core::mem::transmute_copy(&sender), core::mem::transmute_copy(&e)).into() } } #[cfg(feature = "ApplicationModel")] diff --git a/crates/libs/windows/src/Windows/Web/Http/Filters/mod.rs b/crates/libs/windows/src/Windows/Web/Http/Filters/mod.rs index 4c43913dee..b37d6cd4db 100644 --- a/crates/libs/windows/src/Windows/Web/Http/Filters/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/Filters/mod.rs @@ -515,13 +515,13 @@ impl windows_core::RuntimeName for IHttpFilter { const NAME: &'static str = "Windows.Web.Http.Filters.IHttpFilter"; } pub trait IHttpFilter_Impl: super::super::super::Foundation::IClosable_Impl { - fn SendRequestAsync(&self, request: Option<&super::HttpRequestMessage>) -> windows_core::Result>; + fn SendRequestAsync(&self, request: windows_core::Ref<'_, super::HttpRequestMessage>) -> windows_core::Result>; } impl IHttpFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SendRequestAsync(this: *mut core::ffi::c_void, request: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHttpFilter_Impl::SendRequestAsync(this, windows_core::from_raw_borrowed(&request)) { + match IHttpFilter_Impl::SendRequestAsync(this, core::mem::transmute_copy(&request)) { Ok(ok__) => { result__.write(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 722fdd4b2b..58d7eddd5a 100644 --- a/crates/libs/windows/src/Windows/Web/Http/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/mod.rs @@ -2228,7 +2228,7 @@ pub trait IHttpContent_Impl: super::super::Foundation::IClosable_Impl { fn ReadAsInputStreamAsync(&self) -> windows_core::Result>; fn ReadAsStringAsync(&self) -> windows_core::Result>; fn TryComputeLength(&self, length: &mut u64) -> windows_core::Result; - fn WriteToStreamAsync(&self, outputStream: Option<&super::super::Storage::Streams::IOutputStream>) -> windows_core::Result>; + fn WriteToStreamAsync(&self, outputStream: windows_core::Ref<'_, super::super::Storage::Streams::IOutputStream>) -> windows_core::Result>; } #[cfg(all(feature = "Foundation_Collections", feature = "Storage_Streams", feature = "Web_Http_Headers"))] impl IHttpContent_Vtbl { @@ -2300,7 +2300,7 @@ impl IHttpContent_Vtbl { } unsafe extern "system" fn WriteToStreamAsync(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHttpContent_Impl::WriteToStreamAsync(this, windows_core::from_raw_borrowed(&outputstream)) { + match IHttpContent_Impl::WriteToStreamAsync(this, core::mem::transmute_copy(&outputstream)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Web/Syndication/mod.rs b/crates/libs/windows/src/Windows/Web/Syndication/mod.rs index cd99138d50..abcd366fe0 100644 --- a/crates/libs/windows/src/Windows/Web/Syndication/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Syndication/mod.rs @@ -138,9 +138,9 @@ impl windows_core::RuntimeName for ISyndicationClient { #[cfg(feature = "Security_Credentials")] pub trait ISyndicationClient_Impl: windows_core::IUnknownImpl { fn ServerCredential(&self) -> windows_core::Result; - fn SetServerCredential(&self, value: Option<&super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; + fn SetServerCredential(&self, value: windows_core::Ref<'_, super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; fn ProxyCredential(&self) -> windows_core::Result; - fn SetProxyCredential(&self, value: Option<&super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; + fn SetProxyCredential(&self, value: windows_core::Ref<'_, super::super::Security::Credentials::PasswordCredential>) -> windows_core::Result<()>; fn MaxResponseBufferSize(&self) -> windows_core::Result; fn SetMaxResponseBufferSize(&self, value: u32) -> windows_core::Result<()>; fn Timeout(&self) -> windows_core::Result; @@ -148,7 +148,7 @@ pub trait ISyndicationClient_Impl: windows_core::IUnknownImpl { fn BypassCacheOnRetrieve(&self) -> windows_core::Result; fn SetBypassCacheOnRetrieve(&self, value: bool) -> windows_core::Result<()>; fn SetRequestHeader(&self, name: &windows_core::HSTRING, value: &windows_core::HSTRING) -> windows_core::Result<()>; - fn RetrieveFeedAsync(&self, uri: Option<&super::super::Foundation::Uri>) -> windows_core::Result>; + fn RetrieveFeedAsync(&self, uri: windows_core::Ref<'_, super::super::Foundation::Uri>) -> windows_core::Result>; } #[cfg(feature = "Security_Credentials")] impl ISyndicationClient_Vtbl { @@ -166,7 +166,7 @@ impl ISyndicationClient_Vtbl { } unsafe extern "system" fn SetServerCredential(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyndicationClient_Impl::SetServerCredential(this, windows_core::from_raw_borrowed(&value)).into() + ISyndicationClient_Impl::SetServerCredential(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn ProxyCredential(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -181,7 +181,7 @@ impl ISyndicationClient_Vtbl { } unsafe extern "system" fn SetProxyCredential(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyndicationClient_Impl::SetProxyCredential(this, windows_core::from_raw_borrowed(&value)).into() + ISyndicationClient_Impl::SetProxyCredential(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn MaxResponseBufferSize(this: *mut core::ffi::c_void, result__: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -231,7 +231,7 @@ impl ISyndicationClient_Vtbl { } unsafe extern "system" fn RetrieveFeedAsync(this: *mut core::ffi::c_void, uri: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyndicationClient_Impl::RetrieveFeedAsync(this, windows_core::from_raw_borrowed(&uri)) { + match ISyndicationClient_Impl::RetrieveFeedAsync(this, core::mem::transmute_copy(&uri)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -609,7 +609,7 @@ pub trait ISyndicationNode_Impl: windows_core::IUnknownImpl { fn Language(&self) -> windows_core::Result; fn SetLanguage(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; fn BaseUri(&self) -> windows_core::Result; - fn SetBaseUri(&self, value: Option<&super::super::Foundation::Uri>) -> windows_core::Result<()>; + fn SetBaseUri(&self, value: windows_core::Ref<'_, super::super::Foundation::Uri>) -> windows_core::Result<()>; fn AttributeExtensions(&self) -> windows_core::Result>; fn ElementExtensions(&self) -> windows_core::Result>; fn GetXmlDocument(&self, format: SyndicationFormat) -> windows_core::Result; @@ -690,7 +690,7 @@ impl ISyndicationNode_Vtbl { } unsafe extern "system" fn SetBaseUri(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyndicationNode_Impl::SetBaseUri(this, windows_core::from_raw_borrowed(&value)).into() + ISyndicationNode_Impl::SetBaseUri(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn AttributeExtensions(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -944,7 +944,7 @@ pub trait ISyndicationText_Impl: ISyndicationNode_Impl { fn Type(&self) -> windows_core::Result; fn SetType(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; fn Xml(&self) -> windows_core::Result; - fn SetXml(&self, value: Option<&super::super::Data::Xml::Dom::XmlDocument>) -> windows_core::Result<()>; + fn SetXml(&self, value: windows_core::Ref<'_, super::super::Data::Xml::Dom::XmlDocument>) -> windows_core::Result<()>; } #[cfg(all(feature = "Data_Xml_Dom", feature = "Foundation_Collections"))] impl ISyndicationText_Vtbl { @@ -992,7 +992,7 @@ impl ISyndicationText_Vtbl { } unsafe extern "system" fn SetXml(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyndicationText_Impl::SetXml(this, windows_core::from_raw_borrowed(&value)).into() + ISyndicationText_Impl::SetXml(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Web/UI/mod.rs b/crates/libs/windows/src/Windows/Web/UI/mod.rs index b162965018..4818ea53d6 100644 --- a/crates/libs/windows/src/Windows/Web/UI/mod.rs +++ b/crates/libs/windows/src/Windows/Web/UI/mod.rs @@ -406,7 +406,7 @@ impl windows_core::RuntimeName for IWebViewControl { #[cfg(all(feature = "ApplicationModel_DataTransfer", feature = "Foundation_Collections", feature = "Storage_Streams", feature = "UI", feature = "Web_Http"))] pub trait IWebViewControl_Impl: windows_core::IUnknownImpl { fn Source(&self) -> windows_core::Result; - fn SetSource(&self, source: Option<&super::super::Foundation::Uri>) -> windows_core::Result<()>; + fn SetSource(&self, source: windows_core::Ref<'_, super::super::Foundation::Uri>) -> windows_core::Result<()>; fn DocumentTitle(&self) -> windows_core::Result; fn CanGoBack(&self) -> windows_core::Result; fn CanGoForward(&self) -> windows_core::Result; @@ -419,48 +419,48 @@ pub trait IWebViewControl_Impl: windows_core::IUnknownImpl { fn GoBack(&self) -> windows_core::Result<()>; fn Refresh(&self) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; - fn Navigate(&self, source: Option<&super::super::Foundation::Uri>) -> windows_core::Result<()>; + fn Navigate(&self, source: windows_core::Ref<'_, super::super::Foundation::Uri>) -> windows_core::Result<()>; fn NavigateToString(&self, text: &windows_core::HSTRING) -> windows_core::Result<()>; - fn NavigateToLocalStreamUri(&self, source: Option<&super::super::Foundation::Uri>, streamResolver: Option<&super::IUriToStreamResolver>) -> windows_core::Result<()>; - fn NavigateWithHttpRequestMessage(&self, requestMessage: Option<&super::Http::HttpRequestMessage>) -> windows_core::Result<()>; - fn InvokeScriptAsync(&self, scriptName: &windows_core::HSTRING, arguments: Option<&super::super::Foundation::Collections::IIterable>) -> windows_core::Result>; - fn CapturePreviewToStreamAsync(&self, stream: Option<&super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result; + fn NavigateToLocalStreamUri(&self, source: windows_core::Ref<'_, super::super::Foundation::Uri>, streamResolver: windows_core::Ref<'_, super::IUriToStreamResolver>) -> windows_core::Result<()>; + fn NavigateWithHttpRequestMessage(&self, requestMessage: windows_core::Ref<'_, super::Http::HttpRequestMessage>) -> windows_core::Result<()>; + fn InvokeScriptAsync(&self, scriptName: &windows_core::HSTRING, arguments: windows_core::Ref<'_, super::super::Foundation::Collections::IIterable>) -> windows_core::Result>; + fn CapturePreviewToStreamAsync(&self, stream: windows_core::Ref<'_, super::super::Storage::Streams::IRandomAccessStream>) -> windows_core::Result; fn CaptureSelectedContentToDataPackageAsync(&self) -> windows_core::Result>; fn BuildLocalStreamUri(&self, contentIdentifier: &windows_core::HSTRING, relativePath: &windows_core::HSTRING) -> windows_core::Result; - fn GetDeferredPermissionRequestById(&self, id: u32, result: &mut Option) -> windows_core::Result<()>; - fn NavigationStarting(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn GetDeferredPermissionRequestById(&self, id: u32, result: windows_core::OutRef<'_, WebViewControlDeferredPermissionRequest>) -> windows_core::Result<()>; + fn NavigationStarting(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveNavigationStarting(&self, token: i64) -> windows_core::Result<()>; - fn ContentLoading(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn ContentLoading(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveContentLoading(&self, token: i64) -> windows_core::Result<()>; - fn DOMContentLoaded(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn DOMContentLoaded(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveDOMContentLoaded(&self, token: i64) -> windows_core::Result<()>; - fn NavigationCompleted(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn NavigationCompleted(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveNavigationCompleted(&self, token: i64) -> windows_core::Result<()>; - fn FrameNavigationStarting(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn FrameNavigationStarting(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveFrameNavigationStarting(&self, token: i64) -> windows_core::Result<()>; - fn FrameContentLoading(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn FrameContentLoading(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveFrameContentLoading(&self, token: i64) -> windows_core::Result<()>; - fn FrameDOMContentLoaded(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn FrameDOMContentLoaded(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveFrameDOMContentLoaded(&self, token: i64) -> windows_core::Result<()>; - fn FrameNavigationCompleted(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn FrameNavigationCompleted(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveFrameNavigationCompleted(&self, token: i64) -> windows_core::Result<()>; - fn ScriptNotify(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn ScriptNotify(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveScriptNotify(&self, token: i64) -> windows_core::Result<()>; - fn LongRunningScriptDetected(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn LongRunningScriptDetected(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveLongRunningScriptDetected(&self, token: i64) -> windows_core::Result<()>; - fn UnsafeContentWarningDisplaying(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn UnsafeContentWarningDisplaying(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveUnsafeContentWarningDisplaying(&self, token: i64) -> windows_core::Result<()>; - fn UnviewableContentIdentified(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn UnviewableContentIdentified(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveUnviewableContentIdentified(&self, token: i64) -> windows_core::Result<()>; - fn PermissionRequested(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn PermissionRequested(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemovePermissionRequested(&self, token: i64) -> windows_core::Result<()>; - fn UnsupportedUriSchemeIdentified(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn UnsupportedUriSchemeIdentified(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveUnsupportedUriSchemeIdentified(&self, token: i64) -> windows_core::Result<()>; - fn NewWindowRequested(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn NewWindowRequested(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveNewWindowRequested(&self, token: i64) -> windows_core::Result<()>; - fn ContainsFullScreenElementChanged(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn ContainsFullScreenElementChanged(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveContainsFullScreenElementChanged(&self, token: i64) -> windows_core::Result<()>; - fn WebResourceRequested(&self, handler: Option<&super::super::Foundation::TypedEventHandler>) -> windows_core::Result; + fn WebResourceRequested(&self, handler: windows_core::Ref<'_, super::super::Foundation::TypedEventHandler>) -> windows_core::Result; fn RemoveWebResourceRequested(&self, token: i64) -> windows_core::Result<()>; } #[cfg(all(feature = "ApplicationModel_DataTransfer", feature = "Foundation_Collections", feature = "Storage_Streams", feature = "UI", feature = "Web_Http"))] @@ -479,7 +479,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn SetSource(this: *mut core::ffi::c_void, source: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebViewControl_Impl::SetSource(this, windows_core::from_raw_borrowed(&source)).into() + IWebViewControl_Impl::SetSource(this, core::mem::transmute_copy(&source)).into() } unsafe extern "system" fn DocumentTitle(this: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -576,7 +576,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn Navigate(this: *mut core::ffi::c_void, source: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebViewControl_Impl::Navigate(this, windows_core::from_raw_borrowed(&source)).into() + IWebViewControl_Impl::Navigate(this, core::mem::transmute_copy(&source)).into() } unsafe extern "system" fn NavigateToString(this: *mut core::ffi::c_void, text: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -584,15 +584,15 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn NavigateToLocalStreamUri(this: *mut core::ffi::c_void, source: *mut core::ffi::c_void, streamresolver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebViewControl_Impl::NavigateToLocalStreamUri(this, windows_core::from_raw_borrowed(&source), windows_core::from_raw_borrowed(&streamresolver)).into() + IWebViewControl_Impl::NavigateToLocalStreamUri(this, core::mem::transmute_copy(&source), core::mem::transmute_copy(&streamresolver)).into() } unsafe extern "system" fn NavigateWithHttpRequestMessage(this: *mut core::ffi::c_void, requestmessage: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebViewControl_Impl::NavigateWithHttpRequestMessage(this, windows_core::from_raw_borrowed(&requestmessage)).into() + IWebViewControl_Impl::NavigateWithHttpRequestMessage(this, core::mem::transmute_copy(&requestmessage)).into() } unsafe extern "system" fn InvokeScriptAsync(this: *mut core::ffi::c_void, scriptname: *mut core::ffi::c_void, arguments: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::InvokeScriptAsync(this, core::mem::transmute(&scriptname), windows_core::from_raw_borrowed(&arguments)) { + match IWebViewControl_Impl::InvokeScriptAsync(this, core::mem::transmute(&scriptname), core::mem::transmute_copy(&arguments)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -603,7 +603,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn CapturePreviewToStreamAsync(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::CapturePreviewToStreamAsync(this, windows_core::from_raw_borrowed(&stream)) { + match IWebViewControl_Impl::CapturePreviewToStreamAsync(this, core::mem::transmute_copy(&stream)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); @@ -640,7 +640,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn NavigationStarting(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::NavigationStarting(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::NavigationStarting(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -654,7 +654,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn ContentLoading(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::ContentLoading(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::ContentLoading(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -668,7 +668,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn DOMContentLoaded(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::DOMContentLoaded(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::DOMContentLoaded(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -682,7 +682,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn NavigationCompleted(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::NavigationCompleted(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::NavigationCompleted(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -696,7 +696,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn FrameNavigationStarting(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::FrameNavigationStarting(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::FrameNavigationStarting(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -710,7 +710,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn FrameContentLoading(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::FrameContentLoading(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::FrameContentLoading(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -724,7 +724,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn FrameDOMContentLoaded(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::FrameDOMContentLoaded(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::FrameDOMContentLoaded(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -738,7 +738,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn FrameNavigationCompleted(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::FrameNavigationCompleted(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::FrameNavigationCompleted(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -752,7 +752,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn ScriptNotify(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::ScriptNotify(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::ScriptNotify(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -766,7 +766,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn LongRunningScriptDetected(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::LongRunningScriptDetected(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::LongRunningScriptDetected(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -780,7 +780,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn UnsafeContentWarningDisplaying(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::UnsafeContentWarningDisplaying(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::UnsafeContentWarningDisplaying(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -794,7 +794,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn UnviewableContentIdentified(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::UnviewableContentIdentified(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::UnviewableContentIdentified(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -808,7 +808,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn PermissionRequested(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::PermissionRequested(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::PermissionRequested(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -822,7 +822,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn UnsupportedUriSchemeIdentified(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::UnsupportedUriSchemeIdentified(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::UnsupportedUriSchemeIdentified(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -836,7 +836,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn NewWindowRequested(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::NewWindowRequested(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::NewWindowRequested(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -850,7 +850,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn ContainsFullScreenElementChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::ContainsFullScreenElementChanged(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::ContainsFullScreenElementChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) @@ -864,7 +864,7 @@ impl IWebViewControl_Vtbl { } unsafe extern "system" fn WebResourceRequested(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, result__: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWebViewControl_Impl::WebResourceRequested(this, windows_core::from_raw_borrowed(&handler)) { + match IWebViewControl_Impl::WebResourceRequested(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Web/mod.rs b/crates/libs/windows/src/Windows/Web/mod.rs index 54f1473c19..8ce32c4444 100644 --- a/crates/libs/windows/src/Windows/Web/mod.rs +++ b/crates/libs/windows/src/Windows/Web/mod.rs @@ -30,14 +30,14 @@ impl windows_core::RuntimeName for IUriToStreamResolver { } #[cfg(feature = "Storage_Streams")] pub trait IUriToStreamResolver_Impl: windows_core::IUnknownImpl { - fn UriToStreamAsync(&self, uri: Option<&super::Foundation::Uri>) -> windows_core::Result>; + fn UriToStreamAsync(&self, uri: windows_core::Ref<'_, super::Foundation::Uri>) -> windows_core::Result>; } #[cfg(feature = "Storage_Streams")] impl IUriToStreamResolver_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UriToStreamAsync(this: *mut core::ffi::c_void, uri: *mut core::ffi::c_void, result__: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUriToStreamResolver_Impl::UriToStreamAsync(this, windows_core::from_raw_borrowed(&uri)) { + match IUriToStreamResolver_Impl::UriToStreamAsync(this, core::mem::transmute_copy(&uri)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs index 81e6f818ff..f77610b6a1 100644 --- a/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs @@ -2851,14 +2851,14 @@ pub struct IDMLCommandRecorder_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait IDMLCommandRecorder_Impl: IDMLDeviceChild_Impl { - fn RecordDispatch(&self, commandlist: Option<&super::super::super::Graphics::Direct3D12::ID3D12CommandList>, dispatchable: Option<&IDMLDispatchable>, bindings: Option<&IDMLBindingTable>); + fn RecordDispatch(&self, commandlist: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12CommandList>, dispatchable: windows_core::Ref<'_, IDMLDispatchable>, bindings: windows_core::Ref<'_, IDMLBindingTable>); } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl IDMLCommandRecorder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RecordDispatch(this: *mut core::ffi::c_void, commandlist: *mut core::ffi::c_void, dispatchable: *mut core::ffi::c_void, bindings: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDMLCommandRecorder_Impl::RecordDispatch(this, windows_core::from_raw_borrowed(&commandlist), windows_core::from_raw_borrowed(&dispatchable), windows_core::from_raw_borrowed(&bindings)) + IDMLCommandRecorder_Impl::RecordDispatch(this, core::mem::transmute_copy(&commandlist), core::mem::transmute_copy(&dispatchable), core::mem::transmute_copy(&bindings)) } Self { base__: IDMLDeviceChild_Vtbl::new::(), RecordDispatch: RecordDispatch:: } } @@ -3003,7 +3003,7 @@ pub struct IDMLDevice_Vtbl { pub trait IDMLDevice_Impl: IDMLObject_Impl { fn CheckFeatureSupport(&self, feature: DML_FEATURE, featurequerydatasize: u32, featurequerydata: *const core::ffi::c_void, featuresupportdatasize: u32, featuresupportdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateOperator(&self, desc: *const DML_OPERATOR_DESC, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CompileOperator(&self, op: Option<&IDMLOperator>, flags: DML_EXECUTION_FLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CompileOperator(&self, op: windows_core::Ref<'_, IDMLOperator>, flags: DML_EXECUTION_FLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateOperatorInitializer(&self, operatorcount: u32, operators: *const Option, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateCommandRecorder(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateBindingTable(&self, desc: *const DML_BINDING_TABLE_DESC, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; @@ -3025,7 +3025,7 @@ impl IDMLDevice_Vtbl { } unsafe extern "system" fn CompileOperator(this: *mut core::ffi::c_void, op: *mut core::ffi::c_void, flags: DML_EXECUTION_FLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDMLDevice_Impl::CompileOperator(this, windows_core::from_raw_borrowed(&op), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IDMLDevice_Impl::CompileOperator(this, core::mem::transmute_copy(&op), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn CreateOperatorInitializer(this: *mut core::ffi::c_void, operatorcount: u32, operators: *const *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3222,7 +3222,7 @@ pub struct IDMLObject_Vtbl { pub trait IDMLObject_Impl: windows_core::IUnknownImpl { fn GetPrivateData(&self, guid: *const windows_core::GUID, datasize: *mut u32, data: *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, data: *const core::ffi::c_void) -> windows_core::Result<()>; - fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, data: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, data: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetName(&self, name: &windows_core::PCWSTR) -> windows_core::Result<()>; } impl IDMLObject_Vtbl { @@ -3237,7 +3237,7 @@ impl IDMLObject_Vtbl { } unsafe extern "system" fn SetPrivateDataInterface(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, data: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDMLObject_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), windows_core::from_raw_borrowed(&data)).into() + IDMLObject_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&data)).into() } unsafe extern "system" fn SetName(this: *mut core::ffi::c_void, name: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/WinML/mod.rs b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/WinML/mod.rs index 0fdf22f74d..13b9b140e0 100644 --- a/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/WinML/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/WinML/mod.rs @@ -113,13 +113,13 @@ pub struct IMLOperatorKernel_Vtbl { pub Compute: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMLOperatorKernel_Impl: windows_core::IUnknownImpl { - fn Compute(&self, context: Option<&IMLOperatorKernelContext>) -> windows_core::Result<()>; + fn Compute(&self, context: windows_core::Ref<'_, IMLOperatorKernelContext>) -> windows_core::Result<()>; } impl IMLOperatorKernel_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Compute(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLOperatorKernel_Impl::Compute(this, windows_core::from_raw_borrowed(&context)).into() + IMLOperatorKernel_Impl::Compute(this, core::mem::transmute_copy(&context)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Compute: Compute:: } } @@ -167,7 +167,7 @@ pub trait IMLOperatorKernelContext_Impl: windows_core::IUnknownImpl { fn GetOutputTensor(&self, outputindex: u32, dimensioncount: u32, dimensionsizes: *const u32) -> windows_core::Result; fn GetOutputTensor2(&self, outputindex: u32) -> windows_core::Result; fn AllocateTemporaryData(&self, size: usize) -> windows_core::Result; - fn GetExecutionInterface(&self, executionobject: *mut Option); + fn GetExecutionInterface(&self, executionobject: windows_core::OutRef<'_, windows_core::IUnknown>); } impl IMLOperatorKernelContext_Vtbl { pub const fn new() -> Self { @@ -293,7 +293,7 @@ pub trait IMLOperatorKernelCreationContext_Impl: IMLOperatorAttributes_Impl { fn GetOutputEdgeDescription(&self, outputindex: u32) -> windows_core::Result; fn HasTensorShapeDescription(&self) -> bool; fn GetTensorShapeDescription(&self) -> windows_core::Result; - fn GetExecutionInterface(&self, executionobject: *mut Option); + fn GetExecutionInterface(&self, executionobject: windows_core::OutRef<'_, windows_core::IUnknown>); } impl IMLOperatorKernelCreationContext_Vtbl { pub const fn new() -> Self { @@ -386,13 +386,13 @@ pub struct IMLOperatorKernelFactory_Vtbl { pub CreateKernel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMLOperatorKernelFactory_Impl: windows_core::IUnknownImpl { - fn CreateKernel(&self, context: Option<&IMLOperatorKernelCreationContext>) -> windows_core::Result; + fn CreateKernel(&self, context: windows_core::Ref<'_, IMLOperatorKernelCreationContext>) -> windows_core::Result; } impl IMLOperatorKernelFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateKernel(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, kernel: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMLOperatorKernelFactory_Impl::CreateKernel(this, windows_core::from_raw_borrowed(&context)) { + match IMLOperatorKernelFactory_Impl::CreateKernel(this, core::mem::transmute_copy(&context)) { Ok(ok__) => { kernel.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -432,18 +432,18 @@ pub struct IMLOperatorRegistry_Vtbl { pub RegisterOperatorKernel: unsafe extern "system" fn(*mut core::ffi::c_void, *const MLOperatorKernelDescription, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMLOperatorRegistry_Impl: windows_core::IUnknownImpl { - fn RegisterOperatorSetSchema(&self, operatorsetid: *const MLOperatorSetId, baselineversion: i32, schema: *const *const MLOperatorSchemaDescription, schemacount: u32, typeinferrer: Option<&IMLOperatorTypeInferrer>, shapeinferrer: Option<&IMLOperatorShapeInferrer>) -> windows_core::Result<()>; - fn RegisterOperatorKernel(&self, operatorkernel: *const MLOperatorKernelDescription, operatorkernelfactory: Option<&IMLOperatorKernelFactory>, shapeinferrer: Option<&IMLOperatorShapeInferrer>) -> windows_core::Result<()>; + fn RegisterOperatorSetSchema(&self, operatorsetid: *const MLOperatorSetId, baselineversion: i32, schema: *const *const MLOperatorSchemaDescription, schemacount: u32, typeinferrer: windows_core::Ref<'_, IMLOperatorTypeInferrer>, shapeinferrer: windows_core::Ref<'_, IMLOperatorShapeInferrer>) -> windows_core::Result<()>; + fn RegisterOperatorKernel(&self, operatorkernel: *const MLOperatorKernelDescription, operatorkernelfactory: windows_core::Ref<'_, IMLOperatorKernelFactory>, shapeinferrer: windows_core::Ref<'_, IMLOperatorShapeInferrer>) -> windows_core::Result<()>; } impl IMLOperatorRegistry_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterOperatorSetSchema(this: *mut core::ffi::c_void, operatorsetid: *const MLOperatorSetId, baselineversion: i32, schema: *const *const MLOperatorSchemaDescription, schemacount: u32, typeinferrer: *mut core::ffi::c_void, shapeinferrer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLOperatorRegistry_Impl::RegisterOperatorSetSchema(this, core::mem::transmute_copy(&operatorsetid), core::mem::transmute_copy(&baselineversion), core::mem::transmute_copy(&schema), core::mem::transmute_copy(&schemacount), windows_core::from_raw_borrowed(&typeinferrer), windows_core::from_raw_borrowed(&shapeinferrer)).into() + IMLOperatorRegistry_Impl::RegisterOperatorSetSchema(this, core::mem::transmute_copy(&operatorsetid), core::mem::transmute_copy(&baselineversion), core::mem::transmute_copy(&schema), core::mem::transmute_copy(&schemacount), core::mem::transmute_copy(&typeinferrer), core::mem::transmute_copy(&shapeinferrer)).into() } unsafe extern "system" fn RegisterOperatorKernel(this: *mut core::ffi::c_void, operatorkernel: *const MLOperatorKernelDescription, operatorkernelfactory: *mut core::ffi::c_void, shapeinferrer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLOperatorRegistry_Impl::RegisterOperatorKernel(this, core::mem::transmute_copy(&operatorkernel), windows_core::from_raw_borrowed(&operatorkernelfactory), windows_core::from_raw_borrowed(&shapeinferrer)).into() + IMLOperatorRegistry_Impl::RegisterOperatorKernel(this, core::mem::transmute_copy(&operatorkernel), core::mem::transmute_copy(&operatorkernelfactory), core::mem::transmute_copy(&shapeinferrer)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -593,13 +593,13 @@ pub struct IMLOperatorShapeInferrer_Vtbl { pub InferOutputShapes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMLOperatorShapeInferrer_Impl: windows_core::IUnknownImpl { - fn InferOutputShapes(&self, context: Option<&IMLOperatorShapeInferenceContext>) -> windows_core::Result<()>; + fn InferOutputShapes(&self, context: windows_core::Ref<'_, IMLOperatorShapeInferenceContext>) -> windows_core::Result<()>; } impl IMLOperatorShapeInferrer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InferOutputShapes(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLOperatorShapeInferrer_Impl::InferOutputShapes(this, windows_core::from_raw_borrowed(&context)).into() + IMLOperatorShapeInferrer_Impl::InferOutputShapes(this, core::mem::transmute_copy(&context)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), InferOutputShapes: InferOutputShapes:: } } @@ -653,7 +653,7 @@ pub trait IMLOperatorTensor_Impl: windows_core::IUnknownImpl { fn IsCpuData(&self) -> bool; fn IsDataInterface(&self) -> bool; fn GetData(&self) -> *mut core::ffi::c_void; - fn GetDataInterface(&self, datainterface: *mut Option); + fn GetDataInterface(&self, datainterface: windows_core::OutRef<'_, windows_core::IUnknown>); } impl IMLOperatorTensor_Vtbl { pub const fn new() -> Self { @@ -896,13 +896,13 @@ pub struct IMLOperatorTypeInferrer_Vtbl { pub InferOutputTypes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMLOperatorTypeInferrer_Impl: windows_core::IUnknownImpl { - fn InferOutputTypes(&self, context: Option<&IMLOperatorTypeInferenceContext>) -> windows_core::Result<()>; + fn InferOutputTypes(&self, context: windows_core::Ref<'_, IMLOperatorTypeInferenceContext>) -> windows_core::Result<()>; } impl IMLOperatorTypeInferrer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InferOutputTypes(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLOperatorTypeInferrer_Impl::InferOutputTypes(this, windows_core::from_raw_borrowed(&context)).into() + IMLOperatorTypeInferrer_Impl::InferOutputTypes(this, core::mem::transmute_copy(&context)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), InferOutputTypes: InferOutputTypes:: } } @@ -1103,8 +1103,8 @@ pub struct IWinMLRuntime_Vtbl { #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait IWinMLRuntime_Impl: windows_core::IUnknownImpl { fn LoadModel(&self, path: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateEvaluationContext(&self, device: Option<&super::super::super::Graphics::Direct3D12::ID3D12Device>) -> windows_core::Result; - fn EvaluateModel(&self, pcontext: Option<&IWinMLEvaluationContext>) -> windows_core::Result<()>; + fn CreateEvaluationContext(&self, device: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Device>) -> windows_core::Result; + fn EvaluateModel(&self, pcontext: windows_core::Ref<'_, IWinMLEvaluationContext>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl IWinMLRuntime_Vtbl { @@ -1121,7 +1121,7 @@ impl IWinMLRuntime_Vtbl { } unsafe extern "system" fn CreateEvaluationContext(this: *mut core::ffi::c_void, device: *mut core::ffi::c_void, ppcontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWinMLRuntime_Impl::CreateEvaluationContext(this, windows_core::from_raw_borrowed(&device)) { + match IWinMLRuntime_Impl::CreateEvaluationContext(this, core::mem::transmute_copy(&device)) { Ok(ok__) => { ppcontext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1131,7 +1131,7 @@ impl IWinMLRuntime_Vtbl { } unsafe extern "system" fn EvaluateModel(this: *mut core::ffi::c_void, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWinMLRuntime_Impl::EvaluateModel(this, windows_core::from_raw_borrowed(&pcontext)).into() + IWinMLRuntime_Impl::EvaluateModel(this, core::mem::transmute_copy(&pcontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs index ae37ef41c4..2a2681606b 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/HtmlHelp/mod.rs @@ -686,7 +686,7 @@ pub trait IITPropList_Impl: super::super::System::Com::IPersistStreamInit_Impl { fn SaveData(&self, lpvheader: *mut core::ffi::c_void, dwhdrsize: u32, lpvdata: *mut core::ffi::c_void, dwbufsize: u32) -> windows_core::Result<()>; fn GetHeaderSize(&self, dwhdrsize: *mut u32) -> windows_core::Result<()>; fn GetDataSize(&self, lpvheader: *mut core::ffi::c_void, dwhdrsize: u32, dwdatasize: *mut u32) -> windows_core::Result<()>; - fn SaveDataToStream(&self, lpvheader: *mut core::ffi::c_void, dwhdrsize: u32, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SaveDataToStream(&self, lpvheader: *mut core::ffi::c_void, dwhdrsize: u32, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn LoadFromMem(&self, lpvdata: *mut core::ffi::c_void, dwbufsize: u32) -> windows_core::Result<()>; fn SaveToMem(&self, lpvdata: *mut core::ffi::c_void, dwbufsize: u32) -> windows_core::Result<()>; } @@ -755,7 +755,7 @@ impl IITPropList_Vtbl { } unsafe extern "system" fn SaveDataToStream(this: *mut core::ffi::c_void, lpvheader: *mut core::ffi::c_void, dwhdrsize: u32, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IITPropList_Impl::SaveDataToStream(this, core::mem::transmute_copy(&lpvheader), core::mem::transmute_copy(&dwhdrsize), windows_core::from_raw_borrowed(&pstream)).into() + IITPropList_Impl::SaveDataToStream(this, core::mem::transmute_copy(&lpvheader), core::mem::transmute_copy(&dwhdrsize), core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn LoadFromMem(this: *mut core::ffi::c_void, lpvdata: *mut core::ffi::c_void, dwbufsize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -946,8 +946,8 @@ pub trait IITResultSet_Impl: windows_core::IUnknownImpl { fn Set2(&self, lrowindex: i32, lcolumnindex: i32, lpwstr: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Set3(&self, lrowindex: i32, lcolumnindex: i32, dwdata: usize) -> windows_core::Result<()>; fn Set4(&self, lrowindex: i32, lpvhdr: *mut core::ffi::c_void, lpvdata: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn Copy(&self, prscopy: Option<&IITResultSet>) -> windows_core::Result<()>; - fn AppendRows(&self, pressrc: Option<&IITResultSet>, lrowsrcfirst: i32, csrcrows: i32, lrowfirstdest: *mut i32) -> windows_core::Result<()>; + fn Copy(&self, prscopy: windows_core::Ref<'_, IITResultSet>) -> windows_core::Result<()>; + fn AppendRows(&self, pressrc: windows_core::Ref<'_, IITResultSet>, lrowsrcfirst: i32, csrcrows: i32, lrowfirstdest: *mut i32) -> windows_core::Result<()>; fn Get(&self, lrowindex: i32, lcolumnindex: i32, prop: *mut CProperty) -> windows_core::Result<()>; fn GetKeyProp(&self, keypropid: *mut u32) -> windows_core::Result<()>; fn GetColumnPriority(&self, lcolumnindex: i32, columnpriority: *mut PRIORITY) -> windows_core::Result<()>; @@ -1017,11 +1017,11 @@ impl IITResultSet_Vtbl { } unsafe extern "system" fn Copy(this: *mut core::ffi::c_void, prscopy: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IITResultSet_Impl::Copy(this, windows_core::from_raw_borrowed(&prscopy)).into() + IITResultSet_Impl::Copy(this, core::mem::transmute_copy(&prscopy)).into() } unsafe extern "system" fn AppendRows(this: *mut core::ffi::c_void, pressrc: *mut core::ffi::c_void, lrowsrcfirst: i32, csrcrows: i32, lrowfirstdest: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IITResultSet_Impl::AppendRows(this, windows_core::from_raw_borrowed(&pressrc), core::mem::transmute_copy(&lrowsrcfirst), core::mem::transmute_copy(&csrcrows), core::mem::transmute_copy(&lrowfirstdest)).into() + IITResultSet_Impl::AppendRows(this, core::mem::transmute_copy(&pressrc), core::mem::transmute_copy(&lrowsrcfirst), core::mem::transmute_copy(&csrcrows), core::mem::transmute_copy(&lrowfirstdest)).into() } unsafe extern "system" fn Get(this: *mut core::ffi::c_void, lrowindex: i32, lcolumnindex: i32, prop: *mut CProperty) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1212,7 +1212,7 @@ pub trait IStemmerConfig_Impl: windows_core::IUnknownImpl { fn GetLocaleInfo(&self, pdwcodepageid: *mut u32, plcid: *mut u32) -> windows_core::Result<()>; fn SetControlInfo(&self, grfstemflags: u32, dwreserved: u32) -> windows_core::Result<()>; fn GetControlInfo(&self, pgrfstemflags: *mut u32, pdwreserved: *mut u32) -> windows_core::Result<()>; - fn LoadExternalStemmerData(&self, pstream: Option<&super::super::System::Com::IStream>, dwextdatatype: u32) -> windows_core::Result<()>; + fn LoadExternalStemmerData(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, dwextdatatype: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IStemmerConfig_Vtbl { @@ -1235,7 +1235,7 @@ impl IStemmerConfig_Vtbl { } unsafe extern "system" fn LoadExternalStemmerData(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, dwextdatatype: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStemmerConfig_Impl::LoadExternalStemmerData(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&dwextdatatype)).into() + IStemmerConfig_Impl::LoadExternalStemmerData(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&dwextdatatype)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1328,8 +1328,8 @@ pub trait IWordBreakerConfig_Impl: windows_core::IUnknownImpl { fn GetBreakWordType(&self, pdwbreakwordtype: *mut u32) -> windows_core::Result<()>; fn SetControlInfo(&self, grfbreakflags: u32, dwreserved: u32) -> windows_core::Result<()>; fn GetControlInfo(&self, pgrfbreakflags: *mut u32, pdwreserved: *mut u32) -> windows_core::Result<()>; - fn LoadExternalBreakerData(&self, pstream: Option<&super::super::System::Com::IStream>, dwextdatatype: u32) -> windows_core::Result<()>; - fn SetWordStemmer(&self, rclsid: *const windows_core::GUID, pstemmer: Option<&super::super::System::Search::IStemmer>) -> windows_core::Result<()>; + fn LoadExternalBreakerData(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, dwextdatatype: u32) -> windows_core::Result<()>; + fn SetWordStemmer(&self, rclsid: *const windows_core::GUID, pstemmer: windows_core::Ref<'_, super::super::System::Search::IStemmer>) -> windows_core::Result<()>; fn GetWordStemmer(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Search"))] @@ -1361,11 +1361,11 @@ impl IWordBreakerConfig_Vtbl { } unsafe extern "system" fn LoadExternalBreakerData(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, dwextdatatype: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWordBreakerConfig_Impl::LoadExternalBreakerData(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&dwextdatatype)).into() + IWordBreakerConfig_Impl::LoadExternalBreakerData(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&dwextdatatype)).into() } unsafe extern "system" fn SetWordStemmer(this: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, pstemmer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWordBreakerConfig_Impl::SetWordStemmer(this, core::mem::transmute_copy(&rclsid), windows_core::from_raw_borrowed(&pstemmer)).into() + IWordBreakerConfig_Impl::SetWordStemmer(this, core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&pstemmer)).into() } unsafe extern "system" fn GetWordStemmer(this: *mut core::ffi::c_void, ppstemmer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs index de9fb5d676..7bd2674b52 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/Xml/MsXml/mod.rs @@ -786,12 +786,12 @@ pub trait IMXNamespaceManager_Impl: windows_core::IUnknownImpl { fn getAllowOverride(&self) -> windows_core::Result; fn reset(&self) -> windows_core::Result<()>; fn pushContext(&self) -> windows_core::Result<()>; - fn pushNodeContext(&self, contextnode: Option<&IXMLDOMNode>, fdeep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn pushNodeContext(&self, contextnode: windows_core::Ref<'_, IXMLDOMNode>, fdeep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn popContext(&self) -> windows_core::Result<()>; fn declarePrefix(&self, prefix: &windows_core::PCWSTR, namespaceuri: &windows_core::PCWSTR) -> windows_core::Result<()>; fn getDeclaredPrefix(&self, nindex: i32, pwchprefix: windows_core::PWSTR, pcchprefix: *mut i32) -> windows_core::Result<()>; fn getPrefix(&self, pwsznamespaceuri: &windows_core::PCWSTR, nindex: i32, pwchprefix: windows_core::PWSTR, pcchprefix: *mut i32) -> windows_core::Result<()>; - fn getURI(&self, pwchprefix: &windows_core::PCWSTR, pcontextnode: Option<&IXMLDOMNode>, pwchuri: windows_core::PWSTR, pcchuri: *mut i32) -> windows_core::Result<()>; + fn getURI(&self, pwchprefix: &windows_core::PCWSTR, pcontextnode: windows_core::Ref<'_, IXMLDOMNode>, pwchuri: windows_core::PWSTR, pcchuri: *mut i32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IMXNamespaceManager_Vtbl { @@ -820,7 +820,7 @@ impl IMXNamespaceManager_Vtbl { } unsafe extern "system" fn pushNodeContext(this: *mut core::ffi::c_void, contextnode: *mut core::ffi::c_void, fdeep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMXNamespaceManager_Impl::pushNodeContext(this, windows_core::from_raw_borrowed(&contextnode), core::mem::transmute_copy(&fdeep)).into() + IMXNamespaceManager_Impl::pushNodeContext(this, core::mem::transmute_copy(&contextnode), core::mem::transmute_copy(&fdeep)).into() } unsafe extern "system" fn popContext(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -840,7 +840,7 @@ impl IMXNamespaceManager_Vtbl { } unsafe extern "system" fn getURI(this: *mut core::ffi::c_void, pwchprefix: windows_core::PCWSTR, pcontextnode: *mut core::ffi::c_void, pwchuri: windows_core::PWSTR, pcchuri: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMXNamespaceManager_Impl::getURI(this, core::mem::transmute(&pwchprefix), windows_core::from_raw_borrowed(&pcontextnode), core::mem::transmute_copy(&pwchuri), core::mem::transmute_copy(&pcchuri)).into() + IMXNamespaceManager_Impl::getURI(this, core::mem::transmute(&pwchprefix), core::mem::transmute_copy(&pcontextnode), core::mem::transmute_copy(&pwchuri), core::mem::transmute_copy(&pcchuri)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1041,14 +1041,14 @@ pub struct IMXSchemaDeclHandler_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMXSchemaDeclHandler_Impl: super::super::super::System::Com::IDispatch_Impl { - fn schemaElementDecl(&self, oschemaelement: Option<&ISchemaElement>) -> windows_core::Result<()>; + fn schemaElementDecl(&self, oschemaelement: windows_core::Ref<'_, ISchemaElement>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMXSchemaDeclHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn schemaElementDecl(this: *mut core::ffi::c_void, oschemaelement: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMXSchemaDeclHandler_Impl::schemaElementDecl(this, windows_core::from_raw_borrowed(&oschemaelement)).into() + IMXSchemaDeclHandler_Impl::schemaElementDecl(this, core::mem::transmute_copy(&oschemaelement)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), schemaElementDecl: schemaElementDecl:: } } @@ -1427,13 +1427,13 @@ pub trait IMXXMLFilter_Impl: super::super::super::System::Com::IDispatch_Impl { fn getProperty(&self, strname: &windows_core::BSTR) -> windows_core::Result; fn putProperty(&self, strname: &windows_core::BSTR, varvalue: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn entityResolver(&self) -> windows_core::Result; - fn putref_entityResolver(&self, oresolver: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn putref_entityResolver(&self, oresolver: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn contentHandler(&self) -> windows_core::Result; - fn putref_contentHandler(&self, ohandler: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn putref_contentHandler(&self, ohandler: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn dtdHandler(&self) -> windows_core::Result; - fn putref_dtdHandler(&self, ohandler: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn putref_dtdHandler(&self, ohandler: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn errorHandler(&self) -> windows_core::Result; - fn putref_errorHandler(&self, ohandler: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn putref_errorHandler(&self, ohandler: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMXXMLFilter_Vtbl { @@ -1478,7 +1478,7 @@ impl IMXXMLFilter_Vtbl { } unsafe extern "system" fn putref_entityResolver(this: *mut core::ffi::c_void, oresolver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMXXMLFilter_Impl::putref_entityResolver(this, windows_core::from_raw_borrowed(&oresolver)).into() + IMXXMLFilter_Impl::putref_entityResolver(this, core::mem::transmute_copy(&oresolver)).into() } unsafe extern "system" fn contentHandler(this: *mut core::ffi::c_void, ohandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1492,7 +1492,7 @@ impl IMXXMLFilter_Vtbl { } unsafe extern "system" fn putref_contentHandler(this: *mut core::ffi::c_void, ohandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMXXMLFilter_Impl::putref_contentHandler(this, windows_core::from_raw_borrowed(&ohandler)).into() + IMXXMLFilter_Impl::putref_contentHandler(this, core::mem::transmute_copy(&ohandler)).into() } unsafe extern "system" fn dtdHandler(this: *mut core::ffi::c_void, ohandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1506,7 +1506,7 @@ impl IMXXMLFilter_Vtbl { } unsafe extern "system" fn putref_dtdHandler(this: *mut core::ffi::c_void, ohandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMXXMLFilter_Impl::putref_dtdHandler(this, windows_core::from_raw_borrowed(&ohandler)).into() + IMXXMLFilter_Impl::putref_dtdHandler(this, core::mem::transmute_copy(&ohandler)).into() } unsafe extern "system" fn errorHandler(this: *mut core::ffi::c_void, ohandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1520,7 +1520,7 @@ impl IMXXMLFilter_Vtbl { } unsafe extern "system" fn putref_errorHandler(this: *mut core::ffi::c_void, ohandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMXXMLFilter_Impl::putref_errorHandler(this, windows_core::from_raw_borrowed(&ohandler)).into() + IMXXMLFilter_Impl::putref_errorHandler(this, core::mem::transmute_copy(&ohandler)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -1824,12 +1824,12 @@ pub struct ISAXContentHandler_Vtbl { pub skippedEntity: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, i32) -> windows_core::HRESULT, } pub trait ISAXContentHandler_Impl: windows_core::IUnknownImpl { - fn putDocumentLocator(&self, plocator: Option<&ISAXLocator>) -> windows_core::Result<()>; + fn putDocumentLocator(&self, plocator: windows_core::Ref<'_, ISAXLocator>) -> windows_core::Result<()>; fn startDocument(&self) -> windows_core::Result<()>; fn endDocument(&self) -> windows_core::Result<()>; fn startPrefixMapping(&self, pwchprefix: &windows_core::PCWSTR, cchprefix: i32, pwchuri: &windows_core::PCWSTR, cchuri: i32) -> windows_core::Result<()>; fn endPrefixMapping(&self, pwchprefix: &windows_core::PCWSTR, cchprefix: i32) -> windows_core::Result<()>; - fn startElement(&self, pwchnamespaceuri: &windows_core::PCWSTR, cchnamespaceuri: i32, pwchlocalname: &windows_core::PCWSTR, cchlocalname: i32, pwchqname: &windows_core::PCWSTR, cchqname: i32, pattributes: Option<&ISAXAttributes>) -> windows_core::Result<()>; + fn startElement(&self, pwchnamespaceuri: &windows_core::PCWSTR, cchnamespaceuri: i32, pwchlocalname: &windows_core::PCWSTR, cchlocalname: i32, pwchqname: &windows_core::PCWSTR, cchqname: i32, pattributes: windows_core::Ref<'_, ISAXAttributes>) -> windows_core::Result<()>; fn endElement(&self, pwchnamespaceuri: &windows_core::PCWSTR, cchnamespaceuri: i32, pwchlocalname: &windows_core::PCWSTR, cchlocalname: i32, pwchqname: &windows_core::PCWSTR, cchqname: i32) -> windows_core::Result<()>; fn characters(&self, pwchchars: &windows_core::PCWSTR, cchchars: i32) -> windows_core::Result<()>; fn ignorableWhitespace(&self, pwchchars: &windows_core::PCWSTR, cchchars: i32) -> windows_core::Result<()>; @@ -1840,7 +1840,7 @@ impl ISAXContentHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn putDocumentLocator(this: *mut core::ffi::c_void, plocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXContentHandler_Impl::putDocumentLocator(this, windows_core::from_raw_borrowed(&plocator)).into() + ISAXContentHandler_Impl::putDocumentLocator(this, core::mem::transmute_copy(&plocator)).into() } unsafe extern "system" fn startDocument(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1860,7 +1860,7 @@ impl ISAXContentHandler_Vtbl { } unsafe extern "system" fn startElement(this: *mut core::ffi::c_void, pwchnamespaceuri: windows_core::PCWSTR, cchnamespaceuri: i32, pwchlocalname: windows_core::PCWSTR, cchlocalname: i32, pwchqname: windows_core::PCWSTR, cchqname: i32, pattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXContentHandler_Impl::startElement(this, core::mem::transmute(&pwchnamespaceuri), core::mem::transmute_copy(&cchnamespaceuri), core::mem::transmute(&pwchlocalname), core::mem::transmute_copy(&cchlocalname), core::mem::transmute(&pwchqname), core::mem::transmute_copy(&cchqname), windows_core::from_raw_borrowed(&pattributes)).into() + ISAXContentHandler_Impl::startElement(this, core::mem::transmute(&pwchnamespaceuri), core::mem::transmute_copy(&cchnamespaceuri), core::mem::transmute(&pwchlocalname), core::mem::transmute_copy(&cchlocalname), core::mem::transmute(&pwchqname), core::mem::transmute_copy(&cchqname), core::mem::transmute_copy(&pattributes)).into() } unsafe extern "system" fn endElement(this: *mut core::ffi::c_void, pwchnamespaceuri: windows_core::PCWSTR, cchnamespaceuri: i32, pwchlocalname: windows_core::PCWSTR, cchlocalname: i32, pwchqname: windows_core::PCWSTR, cchqname: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2114,23 +2114,23 @@ pub struct ISAXErrorHandler_Vtbl { pub ignorableWarning: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR, windows_core::HRESULT) -> windows_core::HRESULT, } pub trait ISAXErrorHandler_Impl: windows_core::IUnknownImpl { - fn error(&self, plocator: Option<&ISAXLocator>, pwcherrormessage: &windows_core::PCWSTR, hrerrorcode: windows_core::HRESULT) -> windows_core::Result<()>; - fn fatalError(&self, plocator: Option<&ISAXLocator>, pwcherrormessage: &windows_core::PCWSTR, hrerrorcode: windows_core::HRESULT) -> windows_core::Result<()>; - fn ignorableWarning(&self, plocator: Option<&ISAXLocator>, pwcherrormessage: &windows_core::PCWSTR, hrerrorcode: windows_core::HRESULT) -> windows_core::Result<()>; + fn error(&self, plocator: windows_core::Ref<'_, ISAXLocator>, pwcherrormessage: &windows_core::PCWSTR, hrerrorcode: windows_core::HRESULT) -> windows_core::Result<()>; + fn fatalError(&self, plocator: windows_core::Ref<'_, ISAXLocator>, pwcherrormessage: &windows_core::PCWSTR, hrerrorcode: windows_core::HRESULT) -> windows_core::Result<()>; + fn ignorableWarning(&self, plocator: windows_core::Ref<'_, ISAXLocator>, pwcherrormessage: &windows_core::PCWSTR, hrerrorcode: windows_core::HRESULT) -> windows_core::Result<()>; } impl ISAXErrorHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn error(this: *mut core::ffi::c_void, plocator: *mut core::ffi::c_void, pwcherrormessage: windows_core::PCWSTR, hrerrorcode: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXErrorHandler_Impl::error(this, windows_core::from_raw_borrowed(&plocator), core::mem::transmute(&pwcherrormessage), core::mem::transmute_copy(&hrerrorcode)).into() + ISAXErrorHandler_Impl::error(this, core::mem::transmute_copy(&plocator), core::mem::transmute(&pwcherrormessage), core::mem::transmute_copy(&hrerrorcode)).into() } unsafe extern "system" fn fatalError(this: *mut core::ffi::c_void, plocator: *mut core::ffi::c_void, pwcherrormessage: windows_core::PCWSTR, hrerrorcode: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXErrorHandler_Impl::fatalError(this, windows_core::from_raw_borrowed(&plocator), core::mem::transmute(&pwcherrormessage), core::mem::transmute_copy(&hrerrorcode)).into() + ISAXErrorHandler_Impl::fatalError(this, core::mem::transmute_copy(&plocator), core::mem::transmute(&pwcherrormessage), core::mem::transmute_copy(&hrerrorcode)).into() } unsafe extern "system" fn ignorableWarning(this: *mut core::ffi::c_void, plocator: *mut core::ffi::c_void, pwcherrormessage: windows_core::PCWSTR, hrerrorcode: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXErrorHandler_Impl::ignorableWarning(this, windows_core::from_raw_borrowed(&plocator), core::mem::transmute(&pwcherrormessage), core::mem::transmute_copy(&hrerrorcode)).into() + ISAXErrorHandler_Impl::ignorableWarning(this, core::mem::transmute_copy(&plocator), core::mem::transmute(&pwcherrormessage), core::mem::transmute_copy(&hrerrorcode)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2367,7 +2367,7 @@ pub struct ISAXXMLFilter_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISAXXMLFilter_Impl: ISAXXMLReader_Impl { fn getParent(&self) -> windows_core::Result; - fn putParent(&self, preader: Option<&ISAXXMLReader>) -> windows_core::Result<()>; + fn putParent(&self, preader: windows_core::Ref<'_, ISAXXMLReader>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISAXXMLFilter_Vtbl { @@ -2384,7 +2384,7 @@ impl ISAXXMLFilter_Vtbl { } unsafe extern "system" fn putParent(this: *mut core::ffi::c_void, preader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXXMLFilter_Impl::putParent(this, windows_core::from_raw_borrowed(&preader)).into() + ISAXXMLFilter_Impl::putParent(this, core::mem::transmute_copy(&preader)).into() } Self { base__: ISAXXMLReader_Vtbl::new::(), getParent: getParent::, putParent: putParent:: } } @@ -2534,13 +2534,13 @@ pub trait ISAXXMLReader_Impl: windows_core::IUnknownImpl { fn getProperty(&self, pwchname: &windows_core::PCWSTR) -> windows_core::Result; fn putProperty(&self, pwchname: &windows_core::PCWSTR, varvalue: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn getEntityResolver(&self) -> windows_core::Result; - fn putEntityResolver(&self, presolver: Option<&ISAXEntityResolver>) -> windows_core::Result<()>; + fn putEntityResolver(&self, presolver: windows_core::Ref<'_, ISAXEntityResolver>) -> windows_core::Result<()>; fn getContentHandler(&self) -> windows_core::Result; - fn putContentHandler(&self, phandler: Option<&ISAXContentHandler>) -> windows_core::Result<()>; + fn putContentHandler(&self, phandler: windows_core::Ref<'_, ISAXContentHandler>) -> windows_core::Result<()>; fn getDTDHandler(&self) -> windows_core::Result; - fn putDTDHandler(&self, phandler: Option<&ISAXDTDHandler>) -> windows_core::Result<()>; + fn putDTDHandler(&self, phandler: windows_core::Ref<'_, ISAXDTDHandler>) -> windows_core::Result<()>; fn getErrorHandler(&self) -> windows_core::Result; - fn putErrorHandler(&self, phandler: Option<&ISAXErrorHandler>) -> windows_core::Result<()>; + fn putErrorHandler(&self, phandler: windows_core::Ref<'_, ISAXErrorHandler>) -> windows_core::Result<()>; fn getBaseURL(&self) -> windows_core::Result<*mut u16>; fn putBaseURL(&self, pwchbaseurl: &windows_core::PCWSTR) -> windows_core::Result<()>; fn getSecureBaseURL(&self) -> windows_core::Result<*mut u16>; @@ -2591,7 +2591,7 @@ impl ISAXXMLReader_Vtbl { } unsafe extern "system" fn putEntityResolver(this: *mut core::ffi::c_void, presolver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXXMLReader_Impl::putEntityResolver(this, windows_core::from_raw_borrowed(&presolver)).into() + ISAXXMLReader_Impl::putEntityResolver(this, core::mem::transmute_copy(&presolver)).into() } unsafe extern "system" fn getContentHandler(this: *mut core::ffi::c_void, pphandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2605,7 +2605,7 @@ impl ISAXXMLReader_Vtbl { } unsafe extern "system" fn putContentHandler(this: *mut core::ffi::c_void, phandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXXMLReader_Impl::putContentHandler(this, windows_core::from_raw_borrowed(&phandler)).into() + ISAXXMLReader_Impl::putContentHandler(this, core::mem::transmute_copy(&phandler)).into() } unsafe extern "system" fn getDTDHandler(this: *mut core::ffi::c_void, pphandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2619,7 +2619,7 @@ impl ISAXXMLReader_Vtbl { } unsafe extern "system" fn putDTDHandler(this: *mut core::ffi::c_void, phandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXXMLReader_Impl::putDTDHandler(this, windows_core::from_raw_borrowed(&phandler)).into() + ISAXXMLReader_Impl::putDTDHandler(this, core::mem::transmute_copy(&phandler)).into() } unsafe extern "system" fn getErrorHandler(this: *mut core::ffi::c_void, pphandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2633,7 +2633,7 @@ impl ISAXXMLReader_Vtbl { } unsafe extern "system" fn putErrorHandler(this: *mut core::ffi::c_void, phandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISAXXMLReader_Impl::putErrorHandler(this, windows_core::from_raw_borrowed(&phandler)).into() + ISAXXMLReader_Impl::putErrorHandler(this, core::mem::transmute_copy(&phandler)).into() } unsafe extern "system" fn getBaseURL(this: *mut core::ffi::c_void, ppwchbaseurl: *mut *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3668,7 +3668,7 @@ pub trait ISchemaItem_Impl: super::super::super::System::Com::IDispatch_Impl { fn id(&self) -> windows_core::Result; fn itemType(&self) -> windows_core::Result; fn unhandledAttributes(&self) -> windows_core::Result; - fn writeAnnotation(&self, annotationsink: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn writeAnnotation(&self, annotationsink: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISchemaItem_Vtbl { @@ -3735,7 +3735,7 @@ impl ISchemaItem_Vtbl { } unsafe extern "system" fn writeAnnotation(this: *mut core::ffi::c_void, annotationsink: *mut core::ffi::c_void, iswritten: *mut super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISchemaItem_Impl::writeAnnotation(this, windows_core::from_raw_borrowed(&annotationsink)) { + match ISchemaItem_Impl::writeAnnotation(this, core::mem::transmute_copy(&annotationsink)) { Ok(ok__) => { iswritten.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4749,13 +4749,13 @@ pub trait IVBMXNamespaceManager_Impl: super::super::super::System::Com::IDispatc fn allowOverride(&self) -> windows_core::Result; fn reset(&self) -> windows_core::Result<()>; fn pushContext(&self) -> windows_core::Result<()>; - fn pushNodeContext(&self, contextnode: Option<&IXMLDOMNode>, fdeep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn pushNodeContext(&self, contextnode: windows_core::Ref<'_, IXMLDOMNode>, fdeep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn popContext(&self) -> windows_core::Result<()>; fn declarePrefix(&self, prefix: &windows_core::BSTR, namespaceuri: &windows_core::BSTR) -> windows_core::Result<()>; fn getDeclaredPrefixes(&self) -> windows_core::Result; fn getPrefixes(&self, namespaceuri: &windows_core::BSTR) -> windows_core::Result; fn getURI(&self, prefix: &windows_core::BSTR) -> windows_core::Result; - fn getURIFromNode(&self, strprefix: &windows_core::BSTR, contextnode: Option<&IXMLDOMNode>) -> windows_core::Result; + fn getURIFromNode(&self, strprefix: &windows_core::BSTR, contextnode: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IVBMXNamespaceManager_Vtbl { @@ -4784,7 +4784,7 @@ impl IVBMXNamespaceManager_Vtbl { } unsafe extern "system" fn pushNodeContext(this: *mut core::ffi::c_void, contextnode: *mut core::ffi::c_void, fdeep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBMXNamespaceManager_Impl::pushNodeContext(this, windows_core::from_raw_borrowed(&contextnode), core::mem::transmute_copy(&fdeep)).into() + IVBMXNamespaceManager_Impl::pushNodeContext(this, core::mem::transmute_copy(&contextnode), core::mem::transmute_copy(&fdeep)).into() } unsafe extern "system" fn popContext(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4826,7 +4826,7 @@ impl IVBMXNamespaceManager_Vtbl { } unsafe extern "system" fn getURIFromNode(this: *mut core::ffi::c_void, strprefix: *mut core::ffi::c_void, contextnode: *mut core::ffi::c_void, uri: *mut super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IVBMXNamespaceManager_Impl::getURIFromNode(this, core::mem::transmute(&strprefix), windows_core::from_raw_borrowed(&contextnode)) { + match IVBMXNamespaceManager_Impl::getURIFromNode(this, core::mem::transmute(&strprefix), core::mem::transmute_copy(&contextnode)) { Ok(ok__) => { uri.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5165,12 +5165,12 @@ pub struct IVBSAXContentHandler_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IVBSAXContentHandler_Impl: super::super::super::System::Com::IDispatch_Impl { - fn putref_documentLocator(&self, olocator: Option<&IVBSAXLocator>) -> windows_core::Result<()>; + fn putref_documentLocator(&self, olocator: windows_core::Ref<'_, IVBSAXLocator>) -> windows_core::Result<()>; fn startDocument(&self) -> windows_core::Result<()>; fn endDocument(&self) -> windows_core::Result<()>; fn startPrefixMapping(&self, strprefix: *mut windows_core::BSTR, struri: *mut windows_core::BSTR) -> windows_core::Result<()>; fn endPrefixMapping(&self, strprefix: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn startElement(&self, strnamespaceuri: *mut windows_core::BSTR, strlocalname: *mut windows_core::BSTR, strqname: *mut windows_core::BSTR, oattributes: Option<&IVBSAXAttributes>) -> windows_core::Result<()>; + fn startElement(&self, strnamespaceuri: *mut windows_core::BSTR, strlocalname: *mut windows_core::BSTR, strqname: *mut windows_core::BSTR, oattributes: windows_core::Ref<'_, IVBSAXAttributes>) -> windows_core::Result<()>; fn endElement(&self, strnamespaceuri: *mut windows_core::BSTR, strlocalname: *mut windows_core::BSTR, strqname: *mut windows_core::BSTR) -> windows_core::Result<()>; fn characters(&self, strchars: *mut windows_core::BSTR) -> windows_core::Result<()>; fn ignorableWhitespace(&self, strchars: *mut windows_core::BSTR) -> windows_core::Result<()>; @@ -5182,7 +5182,7 @@ impl IVBSAXContentHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn putref_documentLocator(this: *mut core::ffi::c_void, olocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXContentHandler_Impl::putref_documentLocator(this, windows_core::from_raw_borrowed(&olocator)).into() + IVBSAXContentHandler_Impl::putref_documentLocator(this, core::mem::transmute_copy(&olocator)).into() } unsafe extern "system" fn startDocument(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5202,7 +5202,7 @@ impl IVBSAXContentHandler_Vtbl { } unsafe extern "system" fn startElement(this: *mut core::ffi::c_void, strnamespaceuri: *mut *mut core::ffi::c_void, strlocalname: *mut *mut core::ffi::c_void, strqname: *mut *mut core::ffi::c_void, oattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXContentHandler_Impl::startElement(this, core::mem::transmute_copy(&strnamespaceuri), core::mem::transmute_copy(&strlocalname), core::mem::transmute_copy(&strqname), windows_core::from_raw_borrowed(&oattributes)).into() + IVBSAXContentHandler_Impl::startElement(this, core::mem::transmute_copy(&strnamespaceuri), core::mem::transmute_copy(&strlocalname), core::mem::transmute_copy(&strqname), core::mem::transmute_copy(&oattributes)).into() } unsafe extern "system" fn endElement(this: *mut core::ffi::c_void, strnamespaceuri: *mut *mut core::ffi::c_void, strlocalname: *mut *mut core::ffi::c_void, strqname: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5470,24 +5470,24 @@ pub struct IVBSAXErrorHandler_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IVBSAXErrorHandler_Impl: super::super::super::System::Com::IDispatch_Impl { - fn error(&self, olocator: Option<&IVBSAXLocator>, strerrormessage: *mut windows_core::BSTR, nerrorcode: i32) -> windows_core::Result<()>; - fn fatalError(&self, olocator: Option<&IVBSAXLocator>, strerrormessage: *mut windows_core::BSTR, nerrorcode: i32) -> windows_core::Result<()>; - fn ignorableWarning(&self, olocator: Option<&IVBSAXLocator>, strerrormessage: *mut windows_core::BSTR, nerrorcode: i32) -> windows_core::Result<()>; + fn error(&self, olocator: windows_core::Ref<'_, IVBSAXLocator>, strerrormessage: *mut windows_core::BSTR, nerrorcode: i32) -> windows_core::Result<()>; + fn fatalError(&self, olocator: windows_core::Ref<'_, IVBSAXLocator>, strerrormessage: *mut windows_core::BSTR, nerrorcode: i32) -> windows_core::Result<()>; + fn ignorableWarning(&self, olocator: windows_core::Ref<'_, IVBSAXLocator>, strerrormessage: *mut windows_core::BSTR, nerrorcode: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IVBSAXErrorHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn error(this: *mut core::ffi::c_void, olocator: *mut core::ffi::c_void, strerrormessage: *mut *mut core::ffi::c_void, nerrorcode: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXErrorHandler_Impl::error(this, windows_core::from_raw_borrowed(&olocator), core::mem::transmute_copy(&strerrormessage), core::mem::transmute_copy(&nerrorcode)).into() + IVBSAXErrorHandler_Impl::error(this, core::mem::transmute_copy(&olocator), core::mem::transmute_copy(&strerrormessage), core::mem::transmute_copy(&nerrorcode)).into() } unsafe extern "system" fn fatalError(this: *mut core::ffi::c_void, olocator: *mut core::ffi::c_void, strerrormessage: *mut *mut core::ffi::c_void, nerrorcode: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXErrorHandler_Impl::fatalError(this, windows_core::from_raw_borrowed(&olocator), core::mem::transmute_copy(&strerrormessage), core::mem::transmute_copy(&nerrorcode)).into() + IVBSAXErrorHandler_Impl::fatalError(this, core::mem::transmute_copy(&olocator), core::mem::transmute_copy(&strerrormessage), core::mem::transmute_copy(&nerrorcode)).into() } unsafe extern "system" fn ignorableWarning(this: *mut core::ffi::c_void, olocator: *mut core::ffi::c_void, strerrormessage: *mut *mut core::ffi::c_void, nerrorcode: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXErrorHandler_Impl::ignorableWarning(this, windows_core::from_raw_borrowed(&olocator), core::mem::transmute_copy(&strerrormessage), core::mem::transmute_copy(&nerrorcode)).into() + IVBSAXErrorHandler_Impl::ignorableWarning(this, core::mem::transmute_copy(&olocator), core::mem::transmute_copy(&strerrormessage), core::mem::transmute_copy(&nerrorcode)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -5744,7 +5744,7 @@ pub struct IVBSAXXMLFilter_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IVBSAXXMLFilter_Impl: super::super::super::System::Com::IDispatch_Impl { fn parent(&self) -> windows_core::Result; - fn putref_parent(&self, oreader: Option<&IVBSAXXMLReader>) -> windows_core::Result<()>; + fn putref_parent(&self, oreader: windows_core::Ref<'_, IVBSAXXMLReader>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IVBSAXXMLFilter_Vtbl { @@ -5761,7 +5761,7 @@ impl IVBSAXXMLFilter_Vtbl { } unsafe extern "system" fn putref_parent(this: *mut core::ffi::c_void, oreader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXXMLFilter_Impl::putref_parent(this, windows_core::from_raw_borrowed(&oreader)).into() + IVBSAXXMLFilter_Impl::putref_parent(this, core::mem::transmute_copy(&oreader)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -5905,13 +5905,13 @@ pub trait IVBSAXXMLReader_Impl: super::super::super::System::Com::IDispatch_Impl fn getProperty(&self, strname: &windows_core::BSTR) -> windows_core::Result; fn putProperty(&self, strname: &windows_core::BSTR, varvalue: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn entityResolver(&self) -> windows_core::Result; - fn putref_entityResolver(&self, oresolver: Option<&IVBSAXEntityResolver>) -> windows_core::Result<()>; + fn putref_entityResolver(&self, oresolver: windows_core::Ref<'_, IVBSAXEntityResolver>) -> windows_core::Result<()>; fn contentHandler(&self) -> windows_core::Result; - fn putref_contentHandler(&self, ohandler: Option<&IVBSAXContentHandler>) -> windows_core::Result<()>; + fn putref_contentHandler(&self, ohandler: windows_core::Ref<'_, IVBSAXContentHandler>) -> windows_core::Result<()>; fn dtdHandler(&self) -> windows_core::Result; - fn putref_dtdHandler(&self, ohandler: Option<&IVBSAXDTDHandler>) -> windows_core::Result<()>; + fn putref_dtdHandler(&self, ohandler: windows_core::Ref<'_, IVBSAXDTDHandler>) -> windows_core::Result<()>; fn errorHandler(&self) -> windows_core::Result; - fn putref_errorHandler(&self, ohandler: Option<&IVBSAXErrorHandler>) -> windows_core::Result<()>; + fn putref_errorHandler(&self, ohandler: windows_core::Ref<'_, IVBSAXErrorHandler>) -> windows_core::Result<()>; fn baseURL(&self) -> windows_core::Result; fn SetbaseURL(&self, strbaseurl: &windows_core::BSTR) -> windows_core::Result<()>; fn secureBaseURL(&self) -> windows_core::Result; @@ -5962,7 +5962,7 @@ impl IVBSAXXMLReader_Vtbl { } unsafe extern "system" fn putref_entityResolver(this: *mut core::ffi::c_void, oresolver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXXMLReader_Impl::putref_entityResolver(this, windows_core::from_raw_borrowed(&oresolver)).into() + IVBSAXXMLReader_Impl::putref_entityResolver(this, core::mem::transmute_copy(&oresolver)).into() } unsafe extern "system" fn contentHandler(this: *mut core::ffi::c_void, ohandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5976,7 +5976,7 @@ impl IVBSAXXMLReader_Vtbl { } unsafe extern "system" fn putref_contentHandler(this: *mut core::ffi::c_void, ohandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXXMLReader_Impl::putref_contentHandler(this, windows_core::from_raw_borrowed(&ohandler)).into() + IVBSAXXMLReader_Impl::putref_contentHandler(this, core::mem::transmute_copy(&ohandler)).into() } unsafe extern "system" fn dtdHandler(this: *mut core::ffi::c_void, ohandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5990,7 +5990,7 @@ impl IVBSAXXMLReader_Vtbl { } unsafe extern "system" fn putref_dtdHandler(this: *mut core::ffi::c_void, ohandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXXMLReader_Impl::putref_dtdHandler(this, windows_core::from_raw_borrowed(&ohandler)).into() + IVBSAXXMLReader_Impl::putref_dtdHandler(this, core::mem::transmute_copy(&ohandler)).into() } unsafe extern "system" fn errorHandler(this: *mut core::ffi::c_void, ohandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6004,7 +6004,7 @@ impl IVBSAXXMLReader_Vtbl { } unsafe extern "system" fn putref_errorHandler(this: *mut core::ffi::c_void, ohandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVBSAXXMLReader_Impl::putref_errorHandler(this, windows_core::from_raw_borrowed(&ohandler)).into() + IVBSAXXMLReader_Impl::putref_errorHandler(this, core::mem::transmute_copy(&ohandler)).into() } unsafe extern "system" fn baseURL(this: *mut core::ffi::c_void, strbaseurl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6626,7 +6626,7 @@ pub trait IXMLDOMDocument_Impl: IXMLDOMNode_Impl { fn doctype(&self) -> windows_core::Result; fn implementation(&self) -> windows_core::Result; fn documentElement(&self) -> windows_core::Result; - fn putref_documentElement(&self, domelement: Option<&IXMLDOMElement>) -> windows_core::Result<()>; + fn putref_documentElement(&self, domelement: windows_core::Ref<'_, IXMLDOMElement>) -> windows_core::Result<()>; fn createElement(&self, tagname: &windows_core::BSTR) -> windows_core::Result; fn createDocumentFragment(&self) -> windows_core::Result; fn createTextNode(&self, data: &windows_core::BSTR) -> windows_core::Result; @@ -6692,7 +6692,7 @@ impl IXMLDOMDocument_Vtbl { } unsafe extern "system" fn putref_documentElement(this: *mut core::ffi::c_void, domelement: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLDOMDocument_Impl::putref_documentElement(this, windows_core::from_raw_borrowed(&domelement)).into() + IXMLDOMDocument_Impl::putref_documentElement(this, core::mem::transmute_copy(&domelement)).into() } unsafe extern "system" fn createElement(this: *mut core::ffi::c_void, tagname: *mut core::ffi::c_void, element: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7149,15 +7149,15 @@ pub struct IXMLDOMDocument3_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IXMLDOMDocument3_Impl: IXMLDOMDocument2_Impl { - fn validateNode(&self, node: Option<&IXMLDOMNode>) -> windows_core::Result; - fn importNode(&self, node: Option<&IXMLDOMNode>, deep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; + fn validateNode(&self, node: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; + fn importNode(&self, node: windows_core::Ref<'_, IXMLDOMNode>, deep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IXMLDOMDocument3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn validateNode(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void, errorobj: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMDocument3_Impl::validateNode(this, windows_core::from_raw_borrowed(&node)) { + match IXMLDOMDocument3_Impl::validateNode(this, core::mem::transmute_copy(&node)) { Ok(ok__) => { errorobj.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7167,7 +7167,7 @@ impl IXMLDOMDocument3_Vtbl { } unsafe extern "system" fn importNode(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void, deep: super::super::super::Foundation::VARIANT_BOOL, clone: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMDocument3_Impl::importNode(this, windows_core::from_raw_borrowed(&node), core::mem::transmute_copy(&deep)) { + match IXMLDOMDocument3_Impl::importNode(this, core::mem::transmute_copy(&node), core::mem::transmute_copy(&deep)) { Ok(ok__) => { clone.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7384,8 +7384,8 @@ pub trait IXMLDOMElement_Impl: IXMLDOMNode_Impl { fn setAttribute(&self, name: &windows_core::BSTR, value: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn removeAttribute(&self, name: &windows_core::BSTR) -> windows_core::Result<()>; fn getAttributeNode(&self, name: &windows_core::BSTR) -> windows_core::Result; - fn setAttributeNode(&self, domattribute: Option<&IXMLDOMAttribute>) -> windows_core::Result; - fn removeAttributeNode(&self, domattribute: Option<&IXMLDOMAttribute>) -> windows_core::Result; + fn setAttributeNode(&self, domattribute: windows_core::Ref<'_, IXMLDOMAttribute>) -> windows_core::Result; + fn removeAttributeNode(&self, domattribute: windows_core::Ref<'_, IXMLDOMAttribute>) -> windows_core::Result; fn getElementsByTagName(&self, tagname: &windows_core::BSTR) -> windows_core::Result; fn normalize(&self) -> windows_core::Result<()>; } @@ -7432,7 +7432,7 @@ impl IXMLDOMElement_Vtbl { } unsafe extern "system" fn setAttributeNode(this: *mut core::ffi::c_void, domattribute: *mut core::ffi::c_void, attributenode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMElement_Impl::setAttributeNode(this, windows_core::from_raw_borrowed(&domattribute)) { + match IXMLDOMElement_Impl::setAttributeNode(this, core::mem::transmute_copy(&domattribute)) { Ok(ok__) => { attributenode.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7442,7 +7442,7 @@ impl IXMLDOMElement_Vtbl { } unsafe extern "system" fn removeAttributeNode(this: *mut core::ffi::c_void, domattribute: *mut core::ffi::c_void, attributenode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMElement_Impl::removeAttributeNode(this, windows_core::from_raw_borrowed(&domattribute)) { + match IXMLDOMElement_Impl::removeAttributeNode(this, core::mem::transmute_copy(&domattribute)) { Ok(ok__) => { attributenode.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7729,7 +7729,7 @@ pub struct IXMLDOMNamedNodeMap_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IXMLDOMNamedNodeMap_Impl: super::super::super::System::Com::IDispatch_Impl { fn getNamedItem(&self, name: &windows_core::BSTR) -> windows_core::Result; - fn setNamedItem(&self, newitem: Option<&IXMLDOMNode>) -> windows_core::Result; + fn setNamedItem(&self, newitem: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; fn removeNamedItem(&self, name: &windows_core::BSTR) -> windows_core::Result; fn get_item(&self, index: i32) -> windows_core::Result; fn length(&self) -> windows_core::Result; @@ -7754,7 +7754,7 @@ impl IXMLDOMNamedNodeMap_Vtbl { } unsafe extern "system" fn setNamedItem(this: *mut core::ffi::c_void, newitem: *mut core::ffi::c_void, nameitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMNamedNodeMap_Impl::setNamedItem(this, windows_core::from_raw_borrowed(&newitem)) { + match IXMLDOMNamedNodeMap_Impl::setNamedItem(this, core::mem::transmute_copy(&newitem)) { Ok(ok__) => { nameitem.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8110,10 +8110,10 @@ pub trait IXMLDOMNode_Impl: super::super::super::System::Com::IDispatch_Impl { fn previousSibling(&self) -> windows_core::Result; fn nextSibling(&self) -> windows_core::Result; fn attributes(&self) -> windows_core::Result; - fn insertBefore(&self, newchild: Option<&IXMLDOMNode>, refchild: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn replaceChild(&self, newchild: Option<&IXMLDOMNode>, oldchild: Option<&IXMLDOMNode>) -> windows_core::Result; - fn removeChild(&self, childnode: Option<&IXMLDOMNode>) -> windows_core::Result; - fn appendChild(&self, newchild: Option<&IXMLDOMNode>) -> windows_core::Result; + fn insertBefore(&self, newchild: windows_core::Ref<'_, IXMLDOMNode>, refchild: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; + fn replaceChild(&self, newchild: windows_core::Ref<'_, IXMLDOMNode>, oldchild: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; + fn removeChild(&self, childnode: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; + fn appendChild(&self, newchild: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; fn hasChildNodes(&self) -> windows_core::Result; fn ownerDocument(&self) -> windows_core::Result; fn cloneNode(&self, deep: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; @@ -8127,14 +8127,14 @@ pub trait IXMLDOMNode_Impl: super::super::super::System::Com::IDispatch_Impl { fn dataType(&self) -> windows_core::Result; fn SetdataType(&self, datatypename: &windows_core::BSTR) -> windows_core::Result<()>; fn xml(&self) -> windows_core::Result; - fn transformNode(&self, stylesheet: Option<&IXMLDOMNode>) -> windows_core::Result; + fn transformNode(&self, stylesheet: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; fn selectNodes(&self, querystring: &windows_core::BSTR) -> windows_core::Result; fn selectSingleNode(&self, querystring: &windows_core::BSTR) -> windows_core::Result; fn parsed(&self) -> windows_core::Result; fn namespaceURI(&self) -> windows_core::Result; fn prefix(&self) -> windows_core::Result; fn baseName(&self) -> windows_core::Result; - fn transformNodeToObject(&self, stylesheet: Option<&IXMLDOMNode>, outputobject: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; + fn transformNodeToObject(&self, stylesheet: windows_core::Ref<'_, IXMLDOMNode>, outputobject: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IXMLDOMNode_Vtbl { @@ -8245,7 +8245,7 @@ impl IXMLDOMNode_Vtbl { } unsafe extern "system" fn insertBefore(this: *mut core::ffi::c_void, newchild: *mut core::ffi::c_void, refchild: super::super::super::System::Variant::VARIANT, outnewchild: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMNode_Impl::insertBefore(this, windows_core::from_raw_borrowed(&newchild), core::mem::transmute(&refchild)) { + match IXMLDOMNode_Impl::insertBefore(this, core::mem::transmute_copy(&newchild), core::mem::transmute(&refchild)) { Ok(ok__) => { outnewchild.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8255,7 +8255,7 @@ impl IXMLDOMNode_Vtbl { } unsafe extern "system" fn replaceChild(this: *mut core::ffi::c_void, newchild: *mut core::ffi::c_void, oldchild: *mut core::ffi::c_void, outoldchild: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMNode_Impl::replaceChild(this, windows_core::from_raw_borrowed(&newchild), windows_core::from_raw_borrowed(&oldchild)) { + match IXMLDOMNode_Impl::replaceChild(this, core::mem::transmute_copy(&newchild), core::mem::transmute_copy(&oldchild)) { Ok(ok__) => { outoldchild.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8265,7 +8265,7 @@ impl IXMLDOMNode_Vtbl { } unsafe extern "system" fn removeChild(this: *mut core::ffi::c_void, childnode: *mut core::ffi::c_void, oldchild: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMNode_Impl::removeChild(this, windows_core::from_raw_borrowed(&childnode)) { + match IXMLDOMNode_Impl::removeChild(this, core::mem::transmute_copy(&childnode)) { Ok(ok__) => { oldchild.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8275,7 +8275,7 @@ impl IXMLDOMNode_Vtbl { } unsafe extern "system" fn appendChild(this: *mut core::ffi::c_void, newchild: *mut core::ffi::c_void, outnewchild: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMNode_Impl::appendChild(this, windows_core::from_raw_borrowed(&newchild)) { + match IXMLDOMNode_Impl::appendChild(this, core::mem::transmute_copy(&newchild)) { Ok(ok__) => { outnewchild.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8397,7 +8397,7 @@ impl IXMLDOMNode_Vtbl { } unsafe extern "system" fn transformNode(this: *mut core::ffi::c_void, stylesheet: *mut core::ffi::c_void, xmlstring: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMNode_Impl::transformNode(this, windows_core::from_raw_borrowed(&stylesheet)) { + match IXMLDOMNode_Impl::transformNode(this, core::mem::transmute_copy(&stylesheet)) { Ok(ok__) => { xmlstring.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8467,7 +8467,7 @@ impl IXMLDOMNode_Vtbl { } unsafe extern "system" fn transformNodeToObject(this: *mut core::ffi::c_void, stylesheet: *mut core::ffi::c_void, outputobject: super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLDOMNode_Impl::transformNodeToObject(this, windows_core::from_raw_borrowed(&stylesheet), core::mem::transmute(&outputobject)).into() + IXMLDOMNode_Impl::transformNodeToObject(this, core::mem::transmute_copy(&stylesheet), core::mem::transmute(&outputobject)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -9215,7 +9215,7 @@ pub trait IXMLDOMSchemaCollection_Impl: super::super::super::System::Com::IDispa fn remove(&self, namespaceuri: &windows_core::BSTR) -> windows_core::Result<()>; fn length(&self) -> windows_core::Result; fn get_namespaceURI(&self, index: i32) -> windows_core::Result; - fn addCollection(&self, othercollection: Option<&IXMLDOMSchemaCollection>) -> windows_core::Result<()>; + fn addCollection(&self, othercollection: windows_core::Ref<'_, IXMLDOMSchemaCollection>) -> windows_core::Result<()>; fn _newEnum(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -9261,7 +9261,7 @@ impl IXMLDOMSchemaCollection_Vtbl { } unsafe extern "system" fn addCollection(this: *mut core::ffi::c_void, othercollection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLDOMSchemaCollection_Impl::addCollection(this, windows_core::from_raw_borrowed(&othercollection)).into() + IXMLDOMSchemaCollection_Impl::addCollection(this, core::mem::transmute_copy(&othercollection)).into() } unsafe extern "system" fn _newEnum(this: *mut core::ffi::c_void, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9341,7 +9341,7 @@ pub trait IXMLDOMSchemaCollection2_Impl: IXMLDOMSchemaCollection_Impl { fn SetvalidateOnLoad(&self, validateonload: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn validateOnLoad(&self) -> windows_core::Result; fn getSchema(&self, namespaceuri: &windows_core::BSTR) -> windows_core::Result; - fn getDeclaration(&self, node: Option<&IXMLDOMNode>) -> windows_core::Result; + fn getDeclaration(&self, node: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IXMLDOMSchemaCollection2_Vtbl { @@ -9376,7 +9376,7 @@ impl IXMLDOMSchemaCollection2_Vtbl { } unsafe extern "system" fn getDeclaration(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void, item: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMSchemaCollection2_Impl::getDeclaration(this, windows_core::from_raw_borrowed(&node)) { + match IXMLDOMSchemaCollection2_Impl::getDeclaration(this, core::mem::transmute_copy(&node)) { Ok(ok__) => { item.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9488,9 +9488,9 @@ pub trait IXMLDOMSelection_Impl: IXMLDOMNodeList_Impl { fn expr(&self) -> windows_core::Result; fn Setexpr(&self, expression: &windows_core::BSTR) -> windows_core::Result<()>; fn context(&self) -> windows_core::Result; - fn putref_context(&self, pnode: Option<&IXMLDOMNode>) -> windows_core::Result<()>; + fn putref_context(&self, pnode: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result<()>; fn peekNode(&self) -> windows_core::Result; - fn matches(&self, pnode: Option<&IXMLDOMNode>) -> windows_core::Result; + fn matches(&self, pnode: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; fn removeNext(&self) -> windows_core::Result; fn removeAll(&self) -> windows_core::Result<()>; fn clone(&self) -> windows_core::Result; @@ -9526,7 +9526,7 @@ impl IXMLDOMSelection_Vtbl { } unsafe extern "system" fn putref_context(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLDOMSelection_Impl::putref_context(this, windows_core::from_raw_borrowed(&pnode)).into() + IXMLDOMSelection_Impl::putref_context(this, core::mem::transmute_copy(&pnode)).into() } unsafe extern "system" fn peekNode(this: *mut core::ffi::c_void, ppnode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9540,7 +9540,7 @@ impl IXMLDOMSelection_Vtbl { } unsafe extern "system" fn matches(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, ppnode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXMLDOMSelection_Impl::matches(this, windows_core::from_raw_borrowed(&pnode)) { + match IXMLDOMSelection_Impl::matches(this, core::mem::transmute_copy(&pnode)) { Ok(ok__) => { ppnode.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9704,7 +9704,7 @@ pub struct IXMLDSOControl_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IXMLDSOControl_Impl: super::super::super::System::Com::IDispatch_Impl { fn XMLDocument(&self) -> windows_core::Result; - fn SetXMLDocument(&self, ppdoc: Option<&IXMLDOMDocument>) -> windows_core::Result<()>; + fn SetXMLDocument(&self, ppdoc: windows_core::Ref<'_, IXMLDOMDocument>) -> windows_core::Result<()>; fn JavaDSOCompatible(&self) -> windows_core::Result; fn SetJavaDSOCompatible(&self, fjavadsocompatible: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn readyState(&self) -> windows_core::Result; @@ -9724,7 +9724,7 @@ impl IXMLDSOControl_Vtbl { } unsafe extern "system" fn SetXMLDocument(this: *mut core::ffi::c_void, ppdoc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLDSOControl_Impl::SetXMLDocument(this, windows_core::from_raw_borrowed(&ppdoc)).into() + IXMLDSOControl_Impl::SetXMLDocument(this, core::mem::transmute_copy(&ppdoc)).into() } unsafe extern "system" fn JavaDSOCompatible(this: *mut core::ffi::c_void, fjavadsocompatible: *mut super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10417,8 +10417,8 @@ pub trait IXMLElement_Impl: super::super::super::System::Com::IDispatch_Impl { fn r#type(&self) -> windows_core::Result; fn text(&self) -> windows_core::Result; fn Settext(&self, p: &windows_core::BSTR) -> windows_core::Result<()>; - fn addChild(&self, pchildelem: Option<&IXMLElement>, lindex: i32, lreserved: i32) -> windows_core::Result<()>; - fn removeChild(&self, pchildelem: Option<&IXMLElement>) -> windows_core::Result<()>; + fn addChild(&self, pchildelem: windows_core::Ref<'_, IXMLElement>, lindex: i32, lreserved: i32) -> windows_core::Result<()>; + fn removeChild(&self, pchildelem: windows_core::Ref<'_, IXMLElement>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IXMLElement_Vtbl { @@ -10501,11 +10501,11 @@ impl IXMLElement_Vtbl { } unsafe extern "system" fn addChild(this: *mut core::ffi::c_void, pchildelem: *mut core::ffi::c_void, lindex: i32, lreserved: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLElement_Impl::addChild(this, windows_core::from_raw_borrowed(&pchildelem), core::mem::transmute_copy(&lindex), core::mem::transmute_copy(&lreserved)).into() + IXMLElement_Impl::addChild(this, core::mem::transmute_copy(&pchildelem), core::mem::transmute_copy(&lindex), core::mem::transmute_copy(&lreserved)).into() } unsafe extern "system" fn removeChild(this: *mut core::ffi::c_void, pchildelem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLElement_Impl::removeChild(this, windows_core::from_raw_borrowed(&pchildelem)).into() + IXMLElement_Impl::removeChild(this, core::mem::transmute_copy(&pchildelem)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -10633,8 +10633,8 @@ pub trait IXMLElement2_Impl: super::super::super::System::Com::IDispatch_Impl { fn r#type(&self) -> windows_core::Result; fn text(&self) -> windows_core::Result; fn Settext(&self, p: &windows_core::BSTR) -> windows_core::Result<()>; - fn addChild(&self, pchildelem: Option<&IXMLElement2>, lindex: i32, lreserved: i32) -> windows_core::Result<()>; - fn removeChild(&self, pchildelem: Option<&IXMLElement2>) -> windows_core::Result<()>; + fn addChild(&self, pchildelem: windows_core::Ref<'_, IXMLElement2>, lindex: i32, lreserved: i32) -> windows_core::Result<()>; + fn removeChild(&self, pchildelem: windows_core::Ref<'_, IXMLElement2>) -> windows_core::Result<()>; fn attributes(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -10718,11 +10718,11 @@ impl IXMLElement2_Vtbl { } unsafe extern "system" fn addChild(this: *mut core::ffi::c_void, pchildelem: *mut core::ffi::c_void, lindex: i32, lreserved: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLElement2_Impl::addChild(this, windows_core::from_raw_borrowed(&pchildelem), core::mem::transmute_copy(&lindex), core::mem::transmute_copy(&lreserved)).into() + IXMLElement2_Impl::addChild(this, core::mem::transmute_copy(&pchildelem), core::mem::transmute_copy(&lindex), core::mem::transmute_copy(&lreserved)).into() } unsafe extern "system" fn removeChild(this: *mut core::ffi::c_void, pchildelem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLElement2_Impl::removeChild(this, windows_core::from_raw_borrowed(&pchildelem)).into() + IXMLElement2_Impl::removeChild(this, core::mem::transmute_copy(&pchildelem)).into() } unsafe extern "system" fn attributes(this: *mut core::ffi::c_void, pp: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11003,7 +11003,7 @@ pub trait IXMLHTTPRequest_Impl: super::super::super::System::Com::IDispatch_Impl fn responseBody(&self) -> windows_core::Result; fn responseStream(&self) -> windows_core::Result; fn readyState(&self) -> windows_core::Result; - fn Setonreadystatechange(&self, preadystatesink: Option<&super::super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn Setonreadystatechange(&self, preadystatesink: windows_core::Ref<'_, super::super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IXMLHTTPRequest_Vtbl { @@ -11116,7 +11116,7 @@ impl IXMLHTTPRequest_Vtbl { } unsafe extern "system" fn Setonreadystatechange(this: *mut core::ffi::c_void, preadystatesink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest_Impl::Setonreadystatechange(this, windows_core::from_raw_borrowed(&preadystatesink)).into() + IXMLHTTPRequest_Impl::Setonreadystatechange(this, core::mem::transmute_copy(&preadystatesink)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -11229,11 +11229,11 @@ pub struct IXMLHTTPRequest2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IXMLHTTPRequest2_Impl: windows_core::IUnknownImpl { - fn Open(&self, pwszmethod: &windows_core::PCWSTR, pwszurl: &windows_core::PCWSTR, pstatuscallback: Option<&IXMLHTTPRequest2Callback>, pwszusername: &windows_core::PCWSTR, pwszpassword: &windows_core::PCWSTR, pwszproxyusername: &windows_core::PCWSTR, pwszproxypassword: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn Send(&self, pbody: Option<&super::super::super::System::Com::ISequentialStream>, cbbody: u64) -> windows_core::Result<()>; + fn Open(&self, pwszmethod: &windows_core::PCWSTR, pwszurl: &windows_core::PCWSTR, pstatuscallback: windows_core::Ref<'_, IXMLHTTPRequest2Callback>, pwszusername: &windows_core::PCWSTR, pwszpassword: &windows_core::PCWSTR, pwszproxyusername: &windows_core::PCWSTR, pwszproxypassword: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn Send(&self, pbody: windows_core::Ref<'_, super::super::super::System::Com::ISequentialStream>, cbbody: u64) -> windows_core::Result<()>; fn Abort(&self) -> windows_core::Result<()>; fn SetCookie(&self, pcookie: *const XHR_COOKIE) -> windows_core::Result; - fn SetCustomResponseStream(&self, psequentialstream: Option<&super::super::super::System::Com::ISequentialStream>) -> windows_core::Result<()>; + fn SetCustomResponseStream(&self, psequentialstream: windows_core::Ref<'_, super::super::super::System::Com::ISequentialStream>) -> windows_core::Result<()>; fn SetProperty(&self, eproperty: XHR_PROPERTY, ullvalue: u64) -> windows_core::Result<()>; fn SetRequestHeader(&self, pwszheader: &windows_core::PCWSTR, pwszvalue: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetAllResponseHeaders(&self) -> windows_core::Result<*mut u16>; @@ -11245,11 +11245,11 @@ impl IXMLHTTPRequest2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, pwszmethod: windows_core::PCWSTR, pwszurl: windows_core::PCWSTR, pstatuscallback: *mut core::ffi::c_void, pwszusername: windows_core::PCWSTR, pwszpassword: windows_core::PCWSTR, pwszproxyusername: windows_core::PCWSTR, pwszproxypassword: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest2_Impl::Open(this, core::mem::transmute(&pwszmethod), core::mem::transmute(&pwszurl), windows_core::from_raw_borrowed(&pstatuscallback), core::mem::transmute(&pwszusername), core::mem::transmute(&pwszpassword), core::mem::transmute(&pwszproxyusername), core::mem::transmute(&pwszproxypassword)).into() + IXMLHTTPRequest2_Impl::Open(this, core::mem::transmute(&pwszmethod), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&pstatuscallback), core::mem::transmute(&pwszusername), core::mem::transmute(&pwszpassword), core::mem::transmute(&pwszproxyusername), core::mem::transmute(&pwszproxypassword)).into() } unsafe extern "system" fn Send(this: *mut core::ffi::c_void, pbody: *mut core::ffi::c_void, cbbody: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest2_Impl::Send(this, windows_core::from_raw_borrowed(&pbody), core::mem::transmute_copy(&cbbody)).into() + IXMLHTTPRequest2_Impl::Send(this, core::mem::transmute_copy(&pbody), core::mem::transmute_copy(&cbbody)).into() } unsafe extern "system" fn Abort(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11267,7 +11267,7 @@ impl IXMLHTTPRequest2_Vtbl { } unsafe extern "system" fn SetCustomResponseStream(this: *mut core::ffi::c_void, psequentialstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest2_Impl::SetCustomResponseStream(this, windows_core::from_raw_borrowed(&psequentialstream)).into() + IXMLHTTPRequest2_Impl::SetCustomResponseStream(this, core::mem::transmute_copy(&psequentialstream)).into() } unsafe extern "system" fn SetProperty(this: *mut core::ffi::c_void, eproperty: XHR_PROPERTY, ullvalue: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11378,34 +11378,34 @@ pub struct IXMLHTTPRequest2Callback_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IXMLHTTPRequest2Callback_Impl: windows_core::IUnknownImpl { - fn OnRedirect(&self, pxhr: Option<&IXMLHTTPRequest2>, pwszredirecturl: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn OnHeadersAvailable(&self, pxhr: Option<&IXMLHTTPRequest2>, dwstatus: u32, pwszstatus: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn OnDataAvailable(&self, pxhr: Option<&IXMLHTTPRequest2>, presponsestream: Option<&super::super::super::System::Com::ISequentialStream>) -> windows_core::Result<()>; - fn OnResponseReceived(&self, pxhr: Option<&IXMLHTTPRequest2>, presponsestream: Option<&super::super::super::System::Com::ISequentialStream>) -> windows_core::Result<()>; - fn OnError(&self, pxhr: Option<&IXMLHTTPRequest2>, hrerror: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnRedirect(&self, pxhr: windows_core::Ref<'_, IXMLHTTPRequest2>, pwszredirecturl: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn OnHeadersAvailable(&self, pxhr: windows_core::Ref<'_, IXMLHTTPRequest2>, dwstatus: u32, pwszstatus: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn OnDataAvailable(&self, pxhr: windows_core::Ref<'_, IXMLHTTPRequest2>, presponsestream: windows_core::Ref<'_, super::super::super::System::Com::ISequentialStream>) -> windows_core::Result<()>; + fn OnResponseReceived(&self, pxhr: windows_core::Ref<'_, IXMLHTTPRequest2>, presponsestream: windows_core::Ref<'_, super::super::super::System::Com::ISequentialStream>) -> windows_core::Result<()>; + fn OnError(&self, pxhr: windows_core::Ref<'_, IXMLHTTPRequest2>, hrerror: windows_core::HRESULT) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IXMLHTTPRequest2Callback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnRedirect(this: *mut core::ffi::c_void, pxhr: *mut core::ffi::c_void, pwszredirecturl: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest2Callback_Impl::OnRedirect(this, windows_core::from_raw_borrowed(&pxhr), core::mem::transmute(&pwszredirecturl)).into() + IXMLHTTPRequest2Callback_Impl::OnRedirect(this, core::mem::transmute_copy(&pxhr), core::mem::transmute(&pwszredirecturl)).into() } unsafe extern "system" fn OnHeadersAvailable(this: *mut core::ffi::c_void, pxhr: *mut core::ffi::c_void, dwstatus: u32, pwszstatus: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest2Callback_Impl::OnHeadersAvailable(this, windows_core::from_raw_borrowed(&pxhr), core::mem::transmute_copy(&dwstatus), core::mem::transmute(&pwszstatus)).into() + IXMLHTTPRequest2Callback_Impl::OnHeadersAvailable(this, core::mem::transmute_copy(&pxhr), core::mem::transmute_copy(&dwstatus), core::mem::transmute(&pwszstatus)).into() } unsafe extern "system" fn OnDataAvailable(this: *mut core::ffi::c_void, pxhr: *mut core::ffi::c_void, presponsestream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest2Callback_Impl::OnDataAvailable(this, windows_core::from_raw_borrowed(&pxhr), windows_core::from_raw_borrowed(&presponsestream)).into() + IXMLHTTPRequest2Callback_Impl::OnDataAvailable(this, core::mem::transmute_copy(&pxhr), core::mem::transmute_copy(&presponsestream)).into() } unsafe extern "system" fn OnResponseReceived(this: *mut core::ffi::c_void, pxhr: *mut core::ffi::c_void, presponsestream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest2Callback_Impl::OnResponseReceived(this, windows_core::from_raw_borrowed(&pxhr), windows_core::from_raw_borrowed(&presponsestream)).into() + IXMLHTTPRequest2Callback_Impl::OnResponseReceived(this, core::mem::transmute_copy(&pxhr), core::mem::transmute_copy(&presponsestream)).into() } unsafe extern "system" fn OnError(this: *mut core::ffi::c_void, pxhr: *mut core::ffi::c_void, hrerror: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest2Callback_Impl::OnError(this, windows_core::from_raw_borrowed(&pxhr), core::mem::transmute_copy(&hrerror)).into() + IXMLHTTPRequest2Callback_Impl::OnError(this, core::mem::transmute_copy(&pxhr), core::mem::transmute_copy(&hrerror)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -11492,19 +11492,19 @@ pub struct IXMLHTTPRequest3Callback_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IXMLHTTPRequest3Callback_Impl: IXMLHTTPRequest2Callback_Impl { - fn OnServerCertificateReceived(&self, pxhr: Option<&IXMLHTTPRequest3>, dwcertificateerrors: u32, cservercertificatechain: u32, rgservercertificatechain: *const XHR_CERT) -> windows_core::Result<()>; - fn OnClientCertificateRequested(&self, pxhr: Option<&IXMLHTTPRequest3>, cissuerlist: u32, rgpwszissuerlist: *const *const u16) -> windows_core::Result<()>; + fn OnServerCertificateReceived(&self, pxhr: windows_core::Ref<'_, IXMLHTTPRequest3>, dwcertificateerrors: u32, cservercertificatechain: u32, rgservercertificatechain: *const XHR_CERT) -> windows_core::Result<()>; + fn OnClientCertificateRequested(&self, pxhr: windows_core::Ref<'_, IXMLHTTPRequest3>, cissuerlist: u32, rgpwszissuerlist: *const *const u16) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IXMLHTTPRequest3Callback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnServerCertificateReceived(this: *mut core::ffi::c_void, pxhr: *mut core::ffi::c_void, dwcertificateerrors: u32, cservercertificatechain: u32, rgservercertificatechain: *const XHR_CERT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest3Callback_Impl::OnServerCertificateReceived(this, windows_core::from_raw_borrowed(&pxhr), core::mem::transmute_copy(&dwcertificateerrors), core::mem::transmute_copy(&cservercertificatechain), core::mem::transmute_copy(&rgservercertificatechain)).into() + IXMLHTTPRequest3Callback_Impl::OnServerCertificateReceived(this, core::mem::transmute_copy(&pxhr), core::mem::transmute_copy(&dwcertificateerrors), core::mem::transmute_copy(&cservercertificatechain), core::mem::transmute_copy(&rgservercertificatechain)).into() } unsafe extern "system" fn OnClientCertificateRequested(this: *mut core::ffi::c_void, pxhr: *mut core::ffi::c_void, cissuerlist: u32, rgpwszissuerlist: *const *const u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLHTTPRequest3Callback_Impl::OnClientCertificateRequested(this, windows_core::from_raw_borrowed(&pxhr), core::mem::transmute_copy(&cissuerlist), core::mem::transmute_copy(&rgpwszissuerlist)).into() + IXMLHTTPRequest3Callback_Impl::OnClientCertificateRequested(this, core::mem::transmute_copy(&pxhr), core::mem::transmute_copy(&cissuerlist), core::mem::transmute_copy(&rgpwszissuerlist)).into() } Self { base__: IXMLHTTPRequest2Callback_Vtbl::new::(), @@ -11638,7 +11638,7 @@ pub trait IXSLProcessor_Impl: super::super::super::System::Com::IDispatch_Impl { fn reset(&self) -> windows_core::Result<()>; fn readyState(&self) -> windows_core::Result; fn addParameter(&self, basename: &windows_core::BSTR, parameter: &super::super::super::System::Variant::VARIANT, namespaceuri: &windows_core::BSTR) -> windows_core::Result<()>; - fn addObject(&self, obj: Option<&super::super::super::System::Com::IDispatch>, namespaceuri: &windows_core::BSTR) -> windows_core::Result<()>; + fn addObject(&self, obj: windows_core::Ref<'_, super::super::super::System::Com::IDispatch>, namespaceuri: &windows_core::BSTR) -> windows_core::Result<()>; fn stylesheet(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -11736,7 +11736,7 @@ impl IXSLProcessor_Vtbl { } unsafe extern "system" fn addObject(this: *mut core::ffi::c_void, obj: *mut core::ffi::c_void, namespaceuri: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXSLProcessor_Impl::addObject(this, windows_core::from_raw_borrowed(&obj), core::mem::transmute(&namespaceuri)).into() + IXSLProcessor_Impl::addObject(this, core::mem::transmute_copy(&obj), core::mem::transmute(&namespaceuri)).into() } unsafe extern "system" fn stylesheet(this: *mut core::ffi::c_void, stylesheet: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11810,7 +11810,7 @@ pub struct IXSLTemplate_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IXSLTemplate_Impl: super::super::super::System::Com::IDispatch_Impl { - fn putref_stylesheet(&self, stylesheet: Option<&IXMLDOMNode>) -> windows_core::Result<()>; + fn putref_stylesheet(&self, stylesheet: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result<()>; fn stylesheet(&self) -> windows_core::Result; fn createProcessor(&self) -> windows_core::Result; } @@ -11819,7 +11819,7 @@ impl IXSLTemplate_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn putref_stylesheet(this: *mut core::ffi::c_void, stylesheet: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXSLTemplate_Impl::putref_stylesheet(this, windows_core::from_raw_borrowed(&stylesheet)).into() + IXSLTemplate_Impl::putref_stylesheet(this, core::mem::transmute_copy(&stylesheet)).into() } unsafe extern "system" fn stylesheet(this: *mut core::ffi::c_void, stylesheet: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11943,11 +11943,11 @@ pub struct IXTLRuntime_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IXTLRuntime_Impl: IXMLDOMNode_Impl { - fn uniqueID(&self, pnode: Option<&IXMLDOMNode>) -> windows_core::Result; - fn depth(&self, pnode: Option<&IXMLDOMNode>) -> windows_core::Result; - fn childNumber(&self, pnode: Option<&IXMLDOMNode>) -> windows_core::Result; - fn ancestorChildNumber(&self, bstrnodename: &windows_core::BSTR, pnode: Option<&IXMLDOMNode>) -> windows_core::Result; - fn absoluteChildNumber(&self, pnode: Option<&IXMLDOMNode>) -> windows_core::Result; + fn uniqueID(&self, pnode: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; + fn depth(&self, pnode: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; + fn childNumber(&self, pnode: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; + fn ancestorChildNumber(&self, bstrnodename: &windows_core::BSTR, pnode: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; + fn absoluteChildNumber(&self, pnode: windows_core::Ref<'_, IXMLDOMNode>) -> windows_core::Result; fn formatIndex(&self, lindex: i32, bstrformat: &windows_core::BSTR) -> windows_core::Result; fn formatNumber(&self, dblnumber: f64, bstrformat: &windows_core::BSTR) -> windows_core::Result; fn formatDate(&self, vardate: &super::super::super::System::Variant::VARIANT, bstrformat: &windows_core::BSTR, vardestlocale: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; @@ -11958,7 +11958,7 @@ impl IXTLRuntime_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn uniqueID(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, pid: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXTLRuntime_Impl::uniqueID(this, windows_core::from_raw_borrowed(&pnode)) { + match IXTLRuntime_Impl::uniqueID(this, core::mem::transmute_copy(&pnode)) { Ok(ok__) => { pid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11968,7 +11968,7 @@ impl IXTLRuntime_Vtbl { } unsafe extern "system" fn depth(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, pdepth: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXTLRuntime_Impl::depth(this, windows_core::from_raw_borrowed(&pnode)) { + match IXTLRuntime_Impl::depth(this, core::mem::transmute_copy(&pnode)) { Ok(ok__) => { pdepth.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11978,7 +11978,7 @@ impl IXTLRuntime_Vtbl { } unsafe extern "system" fn childNumber(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, pnumber: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXTLRuntime_Impl::childNumber(this, windows_core::from_raw_borrowed(&pnode)) { + match IXTLRuntime_Impl::childNumber(this, core::mem::transmute_copy(&pnode)) { Ok(ok__) => { pnumber.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11988,7 +11988,7 @@ impl IXTLRuntime_Vtbl { } unsafe extern "system" fn ancestorChildNumber(this: *mut core::ffi::c_void, bstrnodename: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, pnumber: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXTLRuntime_Impl::ancestorChildNumber(this, core::mem::transmute(&bstrnodename), windows_core::from_raw_borrowed(&pnode)) { + match IXTLRuntime_Impl::ancestorChildNumber(this, core::mem::transmute(&bstrnodename), core::mem::transmute_copy(&pnode)) { Ok(ok__) => { pnumber.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11998,7 +11998,7 @@ impl IXTLRuntime_Vtbl { } unsafe extern "system" fn absoluteChildNumber(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, pnumber: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXTLRuntime_Impl::absoluteChildNumber(this, windows_core::from_raw_borrowed(&pnode)) { + match IXTLRuntime_Impl::absoluteChildNumber(this, core::mem::transmute_copy(&pnode)) { Ok(ok__) => { pnumber.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs index a01cf7eaf0..e37d5e9e2b 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs @@ -183,7 +183,7 @@ pub struct IXmlReader_Vtbl { pub IsEOF: unsafe extern "system" fn(*mut core::ffi::c_void) -> super::super::super::Foundation::BOOL, } pub trait IXmlReader_Impl: windows_core::IUnknownImpl { - fn SetInput(&self, pinput: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetInput(&self, pinput: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetProperty(&self, nproperty: u32) -> windows_core::Result; fn SetProperty(&self, nproperty: u32, pvalue: isize) -> windows_core::Result<()>; fn Read(&self, pnodetype: *mut XmlNodeType) -> windows_core::HRESULT; @@ -211,7 +211,7 @@ impl IXmlReader_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetInput(this: *mut core::ffi::c_void, pinput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlReader_Impl::SetInput(this, windows_core::from_raw_borrowed(&pinput)).into() + IXmlReader_Impl::SetInput(this, core::mem::transmute_copy(&pinput)).into() } unsafe extern "system" fn GetProperty(this: *mut core::ffi::c_void, nproperty: u32, ppvalue: *mut isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -602,10 +602,10 @@ pub struct IXmlWriter_Vtbl { pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IXmlWriter_Impl: windows_core::IUnknownImpl { - fn SetOutput(&self, poutput: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetOutput(&self, poutput: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetProperty(&self, nproperty: u32) -> windows_core::Result; fn SetProperty(&self, nproperty: u32, pvalue: isize) -> windows_core::Result<()>; - fn WriteAttributes(&self, preader: Option<&IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn WriteAttributes(&self, preader: windows_core::Ref<'_, IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn WriteAttributeString(&self, pwszprefix: &windows_core::PCWSTR, pwszlocalname: &windows_core::PCWSTR, pwsznamespaceuri: &windows_core::PCWSTR, pwszvalue: &windows_core::PCWSTR) -> windows_core::Result<()>; fn WriteCData(&self, pwsztext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn WriteCharEntity(&self, wch: u16) -> windows_core::Result<()>; @@ -619,8 +619,8 @@ pub trait IXmlWriter_Impl: windows_core::IUnknownImpl { fn WriteFullEndElement(&self) -> windows_core::Result<()>; fn WriteName(&self, pwszname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn WriteNmToken(&self, pwsznmtoken: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn WriteNode(&self, preader: Option<&IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn WriteNodeShallow(&self, preader: Option<&IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn WriteNode(&self, preader: windows_core::Ref<'_, IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn WriteNodeShallow(&self, preader: windows_core::Ref<'_, IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn WriteProcessingInstruction(&self, pwszname: &windows_core::PCWSTR, pwsztext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn WriteQualifiedName(&self, pwszlocalname: &windows_core::PCWSTR, pwsznamespaceuri: &windows_core::PCWSTR) -> windows_core::Result<()>; fn WriteRaw(&self, pwszdata: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -636,7 +636,7 @@ impl IXmlWriter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOutput(this: *mut core::ffi::c_void, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlWriter_Impl::SetOutput(this, windows_core::from_raw_borrowed(&poutput)).into() + IXmlWriter_Impl::SetOutput(this, core::mem::transmute_copy(&poutput)).into() } unsafe extern "system" fn GetProperty(this: *mut core::ffi::c_void, nproperty: u32, ppvalue: *mut isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -654,7 +654,7 @@ impl IXmlWriter_Vtbl { } unsafe extern "system" fn WriteAttributes(this: *mut core::ffi::c_void, preader: *mut core::ffi::c_void, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlWriter_Impl::WriteAttributes(this, windows_core::from_raw_borrowed(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() + IXmlWriter_Impl::WriteAttributes(this, core::mem::transmute_copy(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() } unsafe extern "system" fn WriteAttributeString(this: *mut core::ffi::c_void, pwszprefix: windows_core::PCWSTR, pwszlocalname: windows_core::PCWSTR, pwsznamespaceuri: windows_core::PCWSTR, pwszvalue: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -710,11 +710,11 @@ impl IXmlWriter_Vtbl { } unsafe extern "system" fn WriteNode(this: *mut core::ffi::c_void, preader: *mut core::ffi::c_void, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlWriter_Impl::WriteNode(this, windows_core::from_raw_borrowed(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() + IXmlWriter_Impl::WriteNode(this, core::mem::transmute_copy(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() } unsafe extern "system" fn WriteNodeShallow(this: *mut core::ffi::c_void, preader: *mut core::ffi::c_void, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlWriter_Impl::WriteNodeShallow(this, windows_core::from_raw_borrowed(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() + IXmlWriter_Impl::WriteNodeShallow(this, core::mem::transmute_copy(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() } unsafe extern "system" fn WriteProcessingInstruction(this: *mut core::ffi::c_void, pwszname: windows_core::PCWSTR, pwsztext: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -965,10 +965,10 @@ pub struct IXmlWriterLite_Vtbl { pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IXmlWriterLite_Impl: windows_core::IUnknownImpl { - fn SetOutput(&self, poutput: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetOutput(&self, poutput: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetProperty(&self, nproperty: u32) -> windows_core::Result; fn SetProperty(&self, nproperty: u32, pvalue: isize) -> windows_core::Result<()>; - fn WriteAttributes(&self, preader: Option<&IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn WriteAttributes(&self, preader: windows_core::Ref<'_, IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn WriteAttributeString(&self, pwszqname: &windows_core::PCWSTR, cwszqname: u32, pwszvalue: &windows_core::PCWSTR, cwszvalue: u32) -> windows_core::Result<()>; fn WriteCData(&self, pwsztext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn WriteCharEntity(&self, wch: u16) -> windows_core::Result<()>; @@ -982,8 +982,8 @@ pub trait IXmlWriterLite_Impl: windows_core::IUnknownImpl { fn WriteFullEndElement(&self, pwszqname: &windows_core::PCWSTR, cwszqname: u32) -> windows_core::Result<()>; fn WriteName(&self, pwszname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn WriteNmToken(&self, pwsznmtoken: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn WriteNode(&self, preader: Option<&IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn WriteNodeShallow(&self, preader: Option<&IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn WriteNode(&self, preader: windows_core::Ref<'_, IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn WriteNodeShallow(&self, preader: windows_core::Ref<'_, IXmlReader>, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn WriteProcessingInstruction(&self, pwszname: &windows_core::PCWSTR, pwsztext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn WriteRaw(&self, pwszdata: &windows_core::PCWSTR) -> windows_core::Result<()>; fn WriteRawChars(&self, pwch: &windows_core::PCWSTR, cwch: u32) -> windows_core::Result<()>; @@ -998,7 +998,7 @@ impl IXmlWriterLite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOutput(this: *mut core::ffi::c_void, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlWriterLite_Impl::SetOutput(this, windows_core::from_raw_borrowed(&poutput)).into() + IXmlWriterLite_Impl::SetOutput(this, core::mem::transmute_copy(&poutput)).into() } unsafe extern "system" fn GetProperty(this: *mut core::ffi::c_void, nproperty: u32, ppvalue: *mut isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1016,7 +1016,7 @@ impl IXmlWriterLite_Vtbl { } unsafe extern "system" fn WriteAttributes(this: *mut core::ffi::c_void, preader: *mut core::ffi::c_void, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlWriterLite_Impl::WriteAttributes(this, windows_core::from_raw_borrowed(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() + IXmlWriterLite_Impl::WriteAttributes(this, core::mem::transmute_copy(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() } unsafe extern "system" fn WriteAttributeString(this: *mut core::ffi::c_void, pwszqname: windows_core::PCWSTR, cwszqname: u32, pwszvalue: windows_core::PCWSTR, cwszvalue: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1072,11 +1072,11 @@ impl IXmlWriterLite_Vtbl { } unsafe extern "system" fn WriteNode(this: *mut core::ffi::c_void, preader: *mut core::ffi::c_void, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlWriterLite_Impl::WriteNode(this, windows_core::from_raw_borrowed(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() + IXmlWriterLite_Impl::WriteNode(this, core::mem::transmute_copy(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() } unsafe extern "system" fn WriteNodeShallow(this: *mut core::ffi::c_void, preader: *mut core::ffi::c_void, fwritedefaultattributes: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXmlWriterLite_Impl::WriteNodeShallow(this, windows_core::from_raw_borrowed(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() + IXmlWriterLite_Impl::WriteNodeShallow(this, core::mem::transmute_copy(&preader), core::mem::transmute_copy(&fwritedefaultattributes)).into() } unsafe extern "system" fn WriteProcessingInstruction(this: *mut core::ffi::c_void, pwszname: windows_core::PCWSTR, pwsztext: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs index d659fa203e..2918817ce7 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs @@ -152,7 +152,7 @@ pub struct IDeviceIoControl_Vtbl { } pub trait IDeviceIoControl_Impl: windows_core::IUnknownImpl { fn DeviceIoControlSync(&self, iocontrolcode: u32, inputbuffer: *const u8, inputbuffersize: u32, outputbuffer: *mut u8, outputbuffersize: u32, bytesreturned: *mut u32) -> windows_core::Result<()>; - fn DeviceIoControlAsync(&self, iocontrolcode: u32, inputbuffer: *const u8, inputbuffersize: u32, outputbuffer: *mut u8, outputbuffersize: u32, requestcompletioncallback: Option<&IDeviceRequestCompletionCallback>, cancelcontext: *mut usize) -> windows_core::Result<()>; + fn DeviceIoControlAsync(&self, iocontrolcode: u32, inputbuffer: *const u8, inputbuffersize: u32, outputbuffer: *mut u8, outputbuffersize: u32, requestcompletioncallback: windows_core::Ref<'_, IDeviceRequestCompletionCallback>, cancelcontext: *mut usize) -> windows_core::Result<()>; fn CancelOperation(&self, cancelcontext: usize) -> windows_core::Result<()>; } impl IDeviceIoControl_Vtbl { @@ -163,7 +163,7 @@ impl IDeviceIoControl_Vtbl { } unsafe extern "system" fn DeviceIoControlAsync(this: *mut core::ffi::c_void, iocontrolcode: u32, inputbuffer: *const u8, inputbuffersize: u32, outputbuffer: *mut u8, outputbuffersize: u32, requestcompletioncallback: *mut core::ffi::c_void, cancelcontext: *mut usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDeviceIoControl_Impl::DeviceIoControlAsync(this, core::mem::transmute_copy(&iocontrolcode), core::mem::transmute_copy(&inputbuffer), core::mem::transmute_copy(&inputbuffersize), core::mem::transmute_copy(&outputbuffer), core::mem::transmute_copy(&outputbuffersize), windows_core::from_raw_borrowed(&requestcompletioncallback), core::mem::transmute_copy(&cancelcontext)).into() + IDeviceIoControl_Impl::DeviceIoControlAsync(this, core::mem::transmute_copy(&iocontrolcode), core::mem::transmute_copy(&inputbuffer), core::mem::transmute_copy(&inputbuffersize), core::mem::transmute_copy(&outputbuffer), core::mem::transmute_copy(&outputbuffersize), core::mem::transmute_copy(&requestcompletioncallback), core::mem::transmute_copy(&cancelcontext)).into() } unsafe extern "system" fn CancelOperation(this: *mut core::ffi::c_void, cancelcontext: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs index 8790bdcfc0..26a379e24f 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs @@ -3371,7 +3371,7 @@ pub trait IViewHelper_Impl: windows_core::IUnknownImpl { fn GetActiveTopology(&self, wszadaptorname: &windows_core::PCWSTR, ulsourceid: u32, pulcount: *mut u32, pultargetid: *mut u32) -> windows_core::Result<()>; fn SetActiveTopology(&self, wszadaptorname: &windows_core::PCWSTR, ulsourceid: u32, ulcount: u32, pultargetid: *const u32) -> windows_core::Result<()>; fn Commit(&self) -> windows_core::Result<()>; - fn SetConfiguration(&self, pistream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn SetConfiguration(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn GetProceedOnNewConfiguration(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -3395,7 +3395,7 @@ impl IViewHelper_Vtbl { } unsafe extern "system" fn SetConfiguration(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, pulstatus: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IViewHelper_Impl::SetConfiguration(this, windows_core::from_raw_borrowed(&pistream)) { + match IViewHelper_Impl::SetConfiguration(this, core::mem::transmute_copy(&pistream)) { Ok(ok__) => { pulstatus.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs index 69b7dbab4d..29e3729e73 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs @@ -227,7 +227,7 @@ pub struct IUPnPDescriptionDocument_Vtbl { pub trait IUPnPDescriptionDocument_Impl: super::super::super::System::Com::IDispatch_Impl { fn ReadyState(&self) -> windows_core::Result; fn Load(&self, bstrurl: &windows_core::BSTR) -> windows_core::Result<()>; - fn LoadAsync(&self, bstrurl: &windows_core::BSTR, punkcallback: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn LoadAsync(&self, bstrurl: &windows_core::BSTR, punkcallback: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn LoadResult(&self) -> windows_core::Result; fn Abort(&self) -> windows_core::Result<()>; fn RootDevice(&self) -> windows_core::Result; @@ -252,7 +252,7 @@ impl IUPnPDescriptionDocument_Vtbl { } unsafe extern "system" fn LoadAsync(this: *mut core::ffi::c_void, bstrurl: *mut core::ffi::c_void, punkcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUPnPDescriptionDocument_Impl::LoadAsync(this, core::mem::transmute(&bstrurl), windows_core::from_raw_borrowed(&punkcallback)).into() + IUPnPDescriptionDocument_Impl::LoadAsync(this, core::mem::transmute(&bstrurl), core::mem::transmute_copy(&punkcallback)).into() } unsafe extern "system" fn LoadResult(this: *mut core::ffi::c_void, phrerror: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -899,7 +899,7 @@ pub struct IUPnPDeviceFinder_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUPnPDeviceFinder_Impl: super::super::super::System::Com::IDispatch_Impl { fn FindByType(&self, bstrtypeuri: &windows_core::BSTR, dwflags: u32) -> windows_core::Result; - fn CreateAsyncFind(&self, bstrtypeuri: &windows_core::BSTR, dwflags: u32, punkdevicefindercallback: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateAsyncFind(&self, bstrtypeuri: &windows_core::BSTR, dwflags: u32, punkdevicefindercallback: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn StartAsyncFind(&self, lfinddata: i32) -> windows_core::Result<()>; fn CancelAsyncFind(&self, lfinddata: i32) -> windows_core::Result<()>; fn FindByUDN(&self, bstrudn: &windows_core::BSTR) -> windows_core::Result; @@ -919,7 +919,7 @@ impl IUPnPDeviceFinder_Vtbl { } unsafe extern "system" fn CreateAsyncFind(this: *mut core::ffi::c_void, bstrtypeuri: *mut core::ffi::c_void, dwflags: u32, punkdevicefindercallback: *mut core::ffi::c_void, plfinddata: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUPnPDeviceFinder_Impl::CreateAsyncFind(this, core::mem::transmute(&bstrtypeuri), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&punkdevicefindercallback)) { + match IUPnPDeviceFinder_Impl::CreateAsyncFind(this, core::mem::transmute(&bstrtypeuri), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&punkdevicefindercallback)) { Ok(ok__) => { plfinddata.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -981,14 +981,14 @@ pub struct IUPnPDeviceFinderAddCallbackWithInterface_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IUPnPDeviceFinderAddCallbackWithInterface_Impl: windows_core::IUnknownImpl { - fn DeviceAddedWithInterface(&self, lfinddata: i32, pdevice: Option<&IUPnPDevice>, pguidinterface: *const windows_core::GUID) -> windows_core::Result<()>; + fn DeviceAddedWithInterface(&self, lfinddata: i32, pdevice: windows_core::Ref<'_, IUPnPDevice>, pguidinterface: *const windows_core::GUID) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IUPnPDeviceFinderAddCallbackWithInterface_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DeviceAddedWithInterface(this: *mut core::ffi::c_void, lfinddata: i32, pdevice: *mut core::ffi::c_void, pguidinterface: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUPnPDeviceFinderAddCallbackWithInterface_Impl::DeviceAddedWithInterface(this, core::mem::transmute_copy(&lfinddata), windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&pguidinterface)).into() + IUPnPDeviceFinderAddCallbackWithInterface_Impl::DeviceAddedWithInterface(this, core::mem::transmute_copy(&lfinddata), core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&pguidinterface)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), DeviceAddedWithInterface: DeviceAddedWithInterface:: } } @@ -1027,7 +1027,7 @@ pub struct IUPnPDeviceFinderCallback_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IUPnPDeviceFinderCallback_Impl: windows_core::IUnknownImpl { - fn DeviceAdded(&self, lfinddata: i32, pdevice: Option<&IUPnPDevice>) -> windows_core::Result<()>; + fn DeviceAdded(&self, lfinddata: i32, pdevice: windows_core::Ref<'_, IUPnPDevice>) -> windows_core::Result<()>; fn DeviceRemoved(&self, lfinddata: i32, bstrudn: &windows_core::BSTR) -> windows_core::Result<()>; fn SearchComplete(&self, lfinddata: i32) -> windows_core::Result<()>; } @@ -1036,7 +1036,7 @@ impl IUPnPDeviceFinderCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DeviceAdded(this: *mut core::ffi::c_void, lfinddata: i32, pdevice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUPnPDeviceFinderCallback_Impl::DeviceAdded(this, core::mem::transmute_copy(&lfinddata), windows_core::from_raw_borrowed(&pdevice)).into() + IUPnPDeviceFinderCallback_Impl::DeviceAdded(this, core::mem::transmute_copy(&lfinddata), core::mem::transmute_copy(&pdevice)).into() } unsafe extern "system" fn DeviceRemoved(this: *mut core::ffi::c_void, lfinddata: i32, bstrudn: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1253,18 +1253,18 @@ pub struct IUPnPEventSource_Vtbl { pub Unadvise: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUPnPEventSource_Impl: windows_core::IUnknownImpl { - fn Advise(&self, pessubscriber: Option<&IUPnPEventSink>) -> windows_core::Result<()>; - fn Unadvise(&self, pessubscriber: Option<&IUPnPEventSink>) -> windows_core::Result<()>; + fn Advise(&self, pessubscriber: windows_core::Ref<'_, IUPnPEventSink>) -> windows_core::Result<()>; + fn Unadvise(&self, pessubscriber: windows_core::Ref<'_, IUPnPEventSink>) -> windows_core::Result<()>; } impl IUPnPEventSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pessubscriber: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUPnPEventSource_Impl::Advise(this, windows_core::from_raw_borrowed(&pessubscriber)).into() + IUPnPEventSource_Impl::Advise(this, core::mem::transmute_copy(&pessubscriber)).into() } unsafe extern "system" fn Unadvise(this: *mut core::ffi::c_void, pessubscriber: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUPnPEventSource_Impl::Unadvise(this, windows_core::from_raw_borrowed(&pessubscriber)).into() + IUPnPEventSource_Impl::Unadvise(this, core::mem::transmute_copy(&pessubscriber)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Advise: Advise::, Unadvise: Unadvise:: } } @@ -1341,7 +1341,7 @@ pub struct IUPnPRegistrar_Vtbl { } pub trait IUPnPRegistrar_Impl: windows_core::IUnknownImpl { fn RegisterDevice(&self, bstrxmldesc: &windows_core::BSTR, bstrprogiddevicecontrolclass: &windows_core::BSTR, bstrinitstring: &windows_core::BSTR, bstrcontainerid: &windows_core::BSTR, bstrresourcepath: &windows_core::BSTR, nlifetime: i32) -> windows_core::Result; - fn RegisterRunningDevice(&self, bstrxmldesc: &windows_core::BSTR, punkdevicecontrol: Option<&windows_core::IUnknown>, bstrinitstring: &windows_core::BSTR, bstrresourcepath: &windows_core::BSTR, nlifetime: i32) -> windows_core::Result; + fn RegisterRunningDevice(&self, bstrxmldesc: &windows_core::BSTR, punkdevicecontrol: windows_core::Ref<'_, windows_core::IUnknown>, bstrinitstring: &windows_core::BSTR, bstrresourcepath: &windows_core::BSTR, nlifetime: i32) -> windows_core::Result; fn RegisterDeviceProvider(&self, bstrprovidername: &windows_core::BSTR, bstrprogidproviderclass: &windows_core::BSTR, bstrinitstring: &windows_core::BSTR, bstrcontainerid: &windows_core::BSTR) -> windows_core::Result<()>; fn GetUniqueDeviceName(&self, bstrdeviceidentifier: &windows_core::BSTR, bstrtemplateudn: &windows_core::BSTR) -> windows_core::Result; fn UnregisterDevice(&self, bstrdeviceidentifier: &windows_core::BSTR, fpermanent: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -1361,7 +1361,7 @@ impl IUPnPRegistrar_Vtbl { } unsafe extern "system" fn RegisterRunningDevice(this: *mut core::ffi::c_void, bstrxmldesc: *mut core::ffi::c_void, punkdevicecontrol: *mut core::ffi::c_void, bstrinitstring: *mut core::ffi::c_void, bstrresourcepath: *mut core::ffi::c_void, nlifetime: i32, pbstrdeviceidentifier: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUPnPRegistrar_Impl::RegisterRunningDevice(this, core::mem::transmute(&bstrxmldesc), windows_core::from_raw_borrowed(&punkdevicecontrol), core::mem::transmute(&bstrinitstring), core::mem::transmute(&bstrresourcepath), core::mem::transmute_copy(&nlifetime)) { + match IUPnPRegistrar_Impl::RegisterRunningDevice(this, core::mem::transmute(&bstrxmldesc), core::mem::transmute_copy(&punkdevicecontrol), core::mem::transmute(&bstrinitstring), core::mem::transmute(&bstrresourcepath), core::mem::transmute_copy(&nlifetime)) { Ok(ok__) => { pbstrdeviceidentifier.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1499,7 +1499,7 @@ pub struct IUPnPReregistrar_Vtbl { } pub trait IUPnPReregistrar_Impl: windows_core::IUnknownImpl { fn ReregisterDevice(&self, bstrdeviceidentifier: &windows_core::BSTR, bstrxmldesc: &windows_core::BSTR, bstrprogiddevicecontrolclass: &windows_core::BSTR, bstrinitstring: &windows_core::BSTR, bstrcontainerid: &windows_core::BSTR, bstrresourcepath: &windows_core::BSTR, nlifetime: i32) -> windows_core::Result<()>; - fn ReregisterRunningDevice(&self, bstrdeviceidentifier: &windows_core::BSTR, bstrxmldesc: &windows_core::BSTR, punkdevicecontrol: Option<&windows_core::IUnknown>, bstrinitstring: &windows_core::BSTR, bstrresourcepath: &windows_core::BSTR, nlifetime: i32) -> windows_core::Result<()>; + fn ReregisterRunningDevice(&self, bstrdeviceidentifier: &windows_core::BSTR, bstrxmldesc: &windows_core::BSTR, punkdevicecontrol: windows_core::Ref<'_, windows_core::IUnknown>, bstrinitstring: &windows_core::BSTR, bstrresourcepath: &windows_core::BSTR, nlifetime: i32) -> windows_core::Result<()>; } impl IUPnPReregistrar_Vtbl { pub const fn new() -> Self { @@ -1509,7 +1509,7 @@ impl IUPnPReregistrar_Vtbl { } unsafe extern "system" fn ReregisterRunningDevice(this: *mut core::ffi::c_void, bstrdeviceidentifier: *mut core::ffi::c_void, bstrxmldesc: *mut core::ffi::c_void, punkdevicecontrol: *mut core::ffi::c_void, bstrinitstring: *mut core::ffi::c_void, bstrresourcepath: *mut core::ffi::c_void, nlifetime: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUPnPReregistrar_Impl::ReregisterRunningDevice(this, core::mem::transmute(&bstrdeviceidentifier), core::mem::transmute(&bstrxmldesc), windows_core::from_raw_borrowed(&punkdevicecontrol), core::mem::transmute(&bstrinitstring), core::mem::transmute(&bstrresourcepath), core::mem::transmute_copy(&nlifetime)).into() + IUPnPReregistrar_Impl::ReregisterRunningDevice(this, core::mem::transmute(&bstrdeviceidentifier), core::mem::transmute(&bstrxmldesc), core::mem::transmute_copy(&punkdevicecontrol), core::mem::transmute(&bstrinitstring), core::mem::transmute(&bstrresourcepath), core::mem::transmute_copy(&nlifetime)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1586,7 +1586,7 @@ pub trait IUPnPService_Impl: super::super::super::System::Com::IDispatch_Impl { fn QueryStateVariable(&self, bstrvariablename: &windows_core::BSTR) -> windows_core::Result; fn InvokeAction(&self, bstractionname: &windows_core::BSTR, vinactionargs: &super::super::super::System::Variant::VARIANT, pvoutactionargs: *mut super::super::super::System::Variant::VARIANT) -> windows_core::Result; fn ServiceTypeIdentifier(&self) -> windows_core::Result; - fn AddCallback(&self, punkcallback: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddCallback(&self, punkcallback: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Id(&self) -> windows_core::Result; fn LastTransportStatus(&self) -> windows_core::Result; } @@ -1625,7 +1625,7 @@ impl IUPnPService_Vtbl { } unsafe extern "system" fn AddCallback(this: *mut core::ffi::c_void, punkcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUPnPService_Impl::AddCallback(this, windows_core::from_raw_borrowed(&punkcallback)).into() + IUPnPService_Impl::AddCallback(this, core::mem::transmute_copy(&punkcallback)).into() } unsafe extern "system" fn Id(this: *mut core::ffi::c_void, pbstrid: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1739,13 +1739,13 @@ pub struct IUPnPServiceAsync_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUPnPServiceAsync_Impl: windows_core::IUnknownImpl { - fn BeginInvokeAction(&self, bstractionname: &windows_core::BSTR, vinactionargs: &super::super::super::System::Variant::VARIANT, pasyncresult: Option<&IUPnPAsyncResult>) -> windows_core::Result; + fn BeginInvokeAction(&self, bstractionname: &windows_core::BSTR, vinactionargs: &super::super::super::System::Variant::VARIANT, pasyncresult: windows_core::Ref<'_, IUPnPAsyncResult>) -> windows_core::Result; fn EndInvokeAction(&self, ullrequestid: u64, pvoutactionargs: *mut super::super::super::System::Variant::VARIANT, pvretval: *mut super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; - fn BeginQueryStateVariable(&self, bstrvariablename: &windows_core::BSTR, pasyncresult: Option<&IUPnPAsyncResult>) -> windows_core::Result; + fn BeginQueryStateVariable(&self, bstrvariablename: &windows_core::BSTR, pasyncresult: windows_core::Ref<'_, IUPnPAsyncResult>) -> windows_core::Result; fn EndQueryStateVariable(&self, ullrequestid: u64, pvalue: *mut super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; - fn BeginSubscribeToEvents(&self, punkcallback: Option<&windows_core::IUnknown>, pasyncresult: Option<&IUPnPAsyncResult>) -> windows_core::Result; + fn BeginSubscribeToEvents(&self, punkcallback: windows_core::Ref<'_, windows_core::IUnknown>, pasyncresult: windows_core::Ref<'_, IUPnPAsyncResult>) -> windows_core::Result; fn EndSubscribeToEvents(&self, ullrequestid: u64) -> windows_core::Result<()>; - fn BeginSCPDDownload(&self, pasyncresult: Option<&IUPnPAsyncResult>) -> windows_core::Result; + fn BeginSCPDDownload(&self, pasyncresult: windows_core::Ref<'_, IUPnPAsyncResult>) -> windows_core::Result; fn EndSCPDDownload(&self, ullrequestid: u64) -> windows_core::Result; fn CancelAsyncOperation(&self, ullrequestid: u64) -> windows_core::Result<()>; } @@ -1754,7 +1754,7 @@ impl IUPnPServiceAsync_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginInvokeAction(this: *mut core::ffi::c_void, bstractionname: *mut core::ffi::c_void, vinactionargs: super::super::super::System::Variant::VARIANT, pasyncresult: *mut core::ffi::c_void, pullrequestid: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUPnPServiceAsync_Impl::BeginInvokeAction(this, core::mem::transmute(&bstractionname), core::mem::transmute(&vinactionargs), windows_core::from_raw_borrowed(&pasyncresult)) { + match IUPnPServiceAsync_Impl::BeginInvokeAction(this, core::mem::transmute(&bstractionname), core::mem::transmute(&vinactionargs), core::mem::transmute_copy(&pasyncresult)) { Ok(ok__) => { pullrequestid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1768,7 +1768,7 @@ impl IUPnPServiceAsync_Vtbl { } unsafe extern "system" fn BeginQueryStateVariable(this: *mut core::ffi::c_void, bstrvariablename: *mut core::ffi::c_void, pasyncresult: *mut core::ffi::c_void, pullrequestid: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUPnPServiceAsync_Impl::BeginQueryStateVariable(this, core::mem::transmute(&bstrvariablename), windows_core::from_raw_borrowed(&pasyncresult)) { + match IUPnPServiceAsync_Impl::BeginQueryStateVariable(this, core::mem::transmute(&bstrvariablename), core::mem::transmute_copy(&pasyncresult)) { Ok(ok__) => { pullrequestid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1782,7 +1782,7 @@ impl IUPnPServiceAsync_Vtbl { } unsafe extern "system" fn BeginSubscribeToEvents(this: *mut core::ffi::c_void, punkcallback: *mut core::ffi::c_void, pasyncresult: *mut core::ffi::c_void, pullrequestid: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUPnPServiceAsync_Impl::BeginSubscribeToEvents(this, windows_core::from_raw_borrowed(&punkcallback), windows_core::from_raw_borrowed(&pasyncresult)) { + match IUPnPServiceAsync_Impl::BeginSubscribeToEvents(this, core::mem::transmute_copy(&punkcallback), core::mem::transmute_copy(&pasyncresult)) { Ok(ok__) => { pullrequestid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1796,7 +1796,7 @@ impl IUPnPServiceAsync_Vtbl { } unsafe extern "system" fn BeginSCPDDownload(this: *mut core::ffi::c_void, pasyncresult: *mut core::ffi::c_void, pullrequestid: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUPnPServiceAsync_Impl::BeginSCPDDownload(this, windows_core::from_raw_borrowed(&pasyncresult)) { + match IUPnPServiceAsync_Impl::BeginSCPDDownload(this, core::mem::transmute_copy(&pasyncresult)) { Ok(ok__) => { pullrequestid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1870,19 +1870,19 @@ pub struct IUPnPServiceCallback_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUPnPServiceCallback_Impl: windows_core::IUnknownImpl { - fn StateVariableChanged(&self, pus: Option<&IUPnPService>, pcwszstatevarname: &windows_core::PCWSTR, vavalue: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; - fn ServiceInstanceDied(&self, pus: Option<&IUPnPService>) -> windows_core::Result<()>; + fn StateVariableChanged(&self, pus: windows_core::Ref<'_, IUPnPService>, pcwszstatevarname: &windows_core::PCWSTR, vavalue: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; + fn ServiceInstanceDied(&self, pus: windows_core::Ref<'_, IUPnPService>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUPnPServiceCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StateVariableChanged(this: *mut core::ffi::c_void, pus: *mut core::ffi::c_void, pcwszstatevarname: windows_core::PCWSTR, vavalue: super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUPnPServiceCallback_Impl::StateVariableChanged(this, windows_core::from_raw_borrowed(&pus), core::mem::transmute(&pcwszstatevarname), core::mem::transmute(&vavalue)).into() + IUPnPServiceCallback_Impl::StateVariableChanged(this, core::mem::transmute_copy(&pus), core::mem::transmute(&pcwszstatevarname), core::mem::transmute(&vavalue)).into() } unsafe extern "system" fn ServiceInstanceDied(this: *mut core::ffi::c_void, pus: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUPnPServiceCallback_Impl::ServiceInstanceDied(this, windows_core::from_raw_borrowed(&pus)).into() + IUPnPServiceCallback_Impl::ServiceInstanceDied(this, core::mem::transmute_copy(&pus)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs index 93050e016e..38d56e9411 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs @@ -1721,64 +1721,64 @@ pub struct IFaxAccountNotify_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IFaxAccountNotify_Impl: super::super::System::Com::IDispatch_Impl { - fn OnIncomingJobAdded(&self, pfaxaccount: Option<&IFaxAccount>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnIncomingJobRemoved(&self, pfaxaccount: Option<&IFaxAccount>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnIncomingJobChanged(&self, pfaxaccount: Option<&IFaxAccount>, bstrjobid: &windows_core::BSTR, pjobstatus: Option<&IFaxJobStatus>) -> windows_core::Result<()>; - fn OnOutgoingJobAdded(&self, pfaxaccount: Option<&IFaxAccount>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnOutgoingJobRemoved(&self, pfaxaccount: Option<&IFaxAccount>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnOutgoingJobChanged(&self, pfaxaccount: Option<&IFaxAccount>, bstrjobid: &windows_core::BSTR, pjobstatus: Option<&IFaxJobStatus>) -> windows_core::Result<()>; - fn OnIncomingMessageAdded(&self, pfaxaccount: Option<&IFaxAccount>, bstrmessageid: &windows_core::BSTR, faddedtoreceivefolder: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn OnIncomingMessageRemoved(&self, pfaxaccount: Option<&IFaxAccount>, bstrmessageid: &windows_core::BSTR, fremovedfromreceivefolder: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn OnOutgoingMessageAdded(&self, pfaxaccount: Option<&IFaxAccount>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnOutgoingMessageRemoved(&self, pfaxaccount: Option<&IFaxAccount>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnServerShutDown(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; + fn OnIncomingJobAdded(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnIncomingJobRemoved(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnIncomingJobChanged(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrjobid: &windows_core::BSTR, pjobstatus: windows_core::Ref<'_, IFaxJobStatus>) -> windows_core::Result<()>; + fn OnOutgoingJobAdded(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnOutgoingJobRemoved(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnOutgoingJobChanged(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrjobid: &windows_core::BSTR, pjobstatus: windows_core::Ref<'_, IFaxJobStatus>) -> windows_core::Result<()>; + fn OnIncomingMessageAdded(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrmessageid: &windows_core::BSTR, faddedtoreceivefolder: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn OnIncomingMessageRemoved(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrmessageid: &windows_core::BSTR, fremovedfromreceivefolder: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn OnOutgoingMessageAdded(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnOutgoingMessageRemoved(&self, pfaxaccount: windows_core::Ref<'_, IFaxAccount>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnServerShutDown(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFaxAccountNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnIncomingJobAdded(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnIncomingJobAdded(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrjobid)).into() + IFaxAccountNotify_Impl::OnIncomingJobAdded(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrjobid)).into() } unsafe extern "system" fn OnIncomingJobRemoved(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnIncomingJobRemoved(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrjobid)).into() + IFaxAccountNotify_Impl::OnIncomingJobRemoved(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrjobid)).into() } unsafe extern "system" fn OnIncomingJobChanged(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void, pjobstatus: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnIncomingJobChanged(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrjobid), windows_core::from_raw_borrowed(&pjobstatus)).into() + IFaxAccountNotify_Impl::OnIncomingJobChanged(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrjobid), core::mem::transmute_copy(&pjobstatus)).into() } unsafe extern "system" fn OnOutgoingJobAdded(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnOutgoingJobAdded(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrjobid)).into() + IFaxAccountNotify_Impl::OnOutgoingJobAdded(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrjobid)).into() } unsafe extern "system" fn OnOutgoingJobRemoved(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnOutgoingJobRemoved(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrjobid)).into() + IFaxAccountNotify_Impl::OnOutgoingJobRemoved(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrjobid)).into() } unsafe extern "system" fn OnOutgoingJobChanged(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void, pjobstatus: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnOutgoingJobChanged(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrjobid), windows_core::from_raw_borrowed(&pjobstatus)).into() + IFaxAccountNotify_Impl::OnOutgoingJobChanged(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrjobid), core::mem::transmute_copy(&pjobstatus)).into() } unsafe extern "system" fn OnIncomingMessageAdded(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrmessageid: *mut core::ffi::c_void, faddedtoreceivefolder: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnIncomingMessageAdded(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrmessageid), core::mem::transmute_copy(&faddedtoreceivefolder)).into() + IFaxAccountNotify_Impl::OnIncomingMessageAdded(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrmessageid), core::mem::transmute_copy(&faddedtoreceivefolder)).into() } unsafe extern "system" fn OnIncomingMessageRemoved(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrmessageid: *mut core::ffi::c_void, fremovedfromreceivefolder: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnIncomingMessageRemoved(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrmessageid), core::mem::transmute_copy(&fremovedfromreceivefolder)).into() + IFaxAccountNotify_Impl::OnIncomingMessageRemoved(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrmessageid), core::mem::transmute_copy(&fremovedfromreceivefolder)).into() } unsafe extern "system" fn OnOutgoingMessageAdded(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrmessageid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnOutgoingMessageAdded(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrmessageid)).into() + IFaxAccountNotify_Impl::OnOutgoingMessageAdded(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrmessageid)).into() } unsafe extern "system" fn OnOutgoingMessageRemoved(this: *mut core::ffi::c_void, pfaxaccount: *mut core::ffi::c_void, bstrmessageid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnOutgoingMessageRemoved(this, windows_core::from_raw_borrowed(&pfaxaccount), core::mem::transmute(&bstrmessageid)).into() + IFaxAccountNotify_Impl::OnOutgoingMessageRemoved(this, core::mem::transmute_copy(&pfaxaccount), core::mem::transmute(&bstrmessageid)).into() } unsafe extern "system" fn OnServerShutDown(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxAccountNotify_Impl::OnServerShutDown(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxAccountNotify_Impl::OnServerShutDown(this, core::mem::transmute_copy(&pfaxserver)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -4207,9 +4207,9 @@ pub trait IFaxDocument_Impl: super::super::System::Com::IDispatch_Impl { fn Priority(&self) -> windows_core::Result; fn SetPriority(&self, priority: FAX_PRIORITY_TYPE_ENUM) -> windows_core::Result<()>; fn TapiConnection(&self) -> windows_core::Result; - fn putref_TapiConnection(&self, ptapiconnection: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn putref_TapiConnection(&self, ptapiconnection: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn Submit(&self, bstrfaxservername: &windows_core::BSTR) -> windows_core::Result; - fn ConnectedSubmit(&self, pfaxserver: Option<&IFaxServer>) -> windows_core::Result; + fn ConnectedSubmit(&self, pfaxserver: windows_core::Ref<'_, IFaxServer>) -> windows_core::Result; fn AttachFaxToReceipt(&self) -> windows_core::Result; fn SetAttachFaxToReceipt(&self, battachfax: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } @@ -4430,7 +4430,7 @@ impl IFaxDocument_Vtbl { } unsafe extern "system" fn putref_TapiConnection(this: *mut core::ffi::c_void, ptapiconnection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxDocument_Impl::putref_TapiConnection(this, windows_core::from_raw_borrowed(&ptapiconnection)).into() + IFaxDocument_Impl::putref_TapiConnection(this, core::mem::transmute_copy(&ptapiconnection)).into() } unsafe extern "system" fn Submit(this: *mut core::ffi::c_void, bstrfaxservername: *mut core::ffi::c_void, pvfaxoutgoingjobids: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4444,7 +4444,7 @@ impl IFaxDocument_Vtbl { } unsafe extern "system" fn ConnectedSubmit(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, pvfaxoutgoingjobids: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFaxDocument_Impl::ConnectedSubmit(this, windows_core::from_raw_borrowed(&pfaxserver)) { + match IFaxDocument_Impl::ConnectedSubmit(this, core::mem::transmute_copy(&pfaxserver)) { Ok(ok__) => { pvfaxoutgoingjobids.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4576,7 +4576,7 @@ pub trait IFaxDocument2_Impl: IFaxDocument_Impl { fn Bodies(&self) -> windows_core::Result; fn SetBodies(&self, vbodies: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn Submit2(&self, bstrfaxservername: &windows_core::BSTR, pvfaxoutgoingjobids: *mut super::super::System::Variant::VARIANT, plerrorbodyfile: *mut i32) -> windows_core::Result<()>; - fn ConnectedSubmit2(&self, pfaxserver: Option<&IFaxServer>, pvfaxoutgoingjobids: *mut super::super::System::Variant::VARIANT, plerrorbodyfile: *mut i32) -> windows_core::Result<()>; + fn ConnectedSubmit2(&self, pfaxserver: windows_core::Ref<'_, IFaxServer>, pvfaxoutgoingjobids: *mut super::super::System::Variant::VARIANT, plerrorbodyfile: *mut i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFaxDocument2_Vtbl { @@ -4611,7 +4611,7 @@ impl IFaxDocument2_Vtbl { } unsafe extern "system" fn ConnectedSubmit2(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, pvfaxoutgoingjobids: *mut super::super::System::Variant::VARIANT, plerrorbodyfile: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxDocument2_Impl::ConnectedSubmit2(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute_copy(&pvfaxoutgoingjobids), core::mem::transmute_copy(&plerrorbodyfile)).into() + IFaxDocument2_Impl::ConnectedSubmit2(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute_copy(&pvfaxoutgoingjobids), core::mem::transmute_copy(&plerrorbodyfile)).into() } Self { base__: IFaxDocument_Vtbl::new::(), @@ -11893,139 +11893,139 @@ pub struct IFaxServerNotify2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IFaxServerNotify2_Impl: super::super::System::Com::IDispatch_Impl { - fn OnIncomingJobAdded(&self, pfaxserver: Option<&IFaxServer2>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnIncomingJobRemoved(&self, pfaxserver: Option<&IFaxServer2>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnIncomingJobChanged(&self, pfaxserver: Option<&IFaxServer2>, bstrjobid: &windows_core::BSTR, pjobstatus: Option<&IFaxJobStatus>) -> windows_core::Result<()>; - fn OnOutgoingJobAdded(&self, pfaxserver: Option<&IFaxServer2>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnOutgoingJobRemoved(&self, pfaxserver: Option<&IFaxServer2>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnOutgoingJobChanged(&self, pfaxserver: Option<&IFaxServer2>, bstrjobid: &windows_core::BSTR, pjobstatus: Option<&IFaxJobStatus>) -> windows_core::Result<()>; - fn OnIncomingMessageAdded(&self, pfaxserver: Option<&IFaxServer2>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnIncomingMessageRemoved(&self, pfaxserver: Option<&IFaxServer2>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnOutgoingMessageAdded(&self, pfaxserver: Option<&IFaxServer2>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnOutgoingMessageRemoved(&self, pfaxserver: Option<&IFaxServer2>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnReceiptOptionsChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnActivityLoggingConfigChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnSecurityConfigChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnEventLoggingConfigChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnOutgoingQueueConfigChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnOutgoingArchiveConfigChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnIncomingArchiveConfigChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnDevicesConfigChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnOutboundRoutingGroupsConfigChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnOutboundRoutingRulesConfigChange(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnServerActivityChange(&self, pfaxserver: Option<&IFaxServer2>, lincomingmessages: i32, lroutingmessages: i32, loutgoingmessages: i32, lqueuedmessages: i32) -> windows_core::Result<()>; - fn OnQueuesStatusChange(&self, pfaxserver: Option<&IFaxServer2>, boutgoingqueueblocked: super::super::Foundation::VARIANT_BOOL, boutgoingqueuepaused: super::super::Foundation::VARIANT_BOOL, bincomingqueueblocked: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn OnNewCall(&self, pfaxserver: Option<&IFaxServer2>, lcallid: i32, ldeviceid: i32, bstrcallerid: &windows_core::BSTR) -> windows_core::Result<()>; - fn OnServerShutDown(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; - fn OnDeviceStatusChange(&self, pfaxserver: Option<&IFaxServer2>, ldeviceid: i32, bpoweredoff: super::super::Foundation::VARIANT_BOOL, bsending: super::super::Foundation::VARIANT_BOOL, breceiving: super::super::Foundation::VARIANT_BOOL, bringing: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn OnGeneralServerConfigChanged(&self, pfaxserver: Option<&IFaxServer2>) -> windows_core::Result<()>; + fn OnIncomingJobAdded(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnIncomingJobRemoved(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnIncomingJobChanged(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrjobid: &windows_core::BSTR, pjobstatus: windows_core::Ref<'_, IFaxJobStatus>) -> windows_core::Result<()>; + fn OnOutgoingJobAdded(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnOutgoingJobRemoved(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrjobid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnOutgoingJobChanged(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrjobid: &windows_core::BSTR, pjobstatus: windows_core::Ref<'_, IFaxJobStatus>) -> windows_core::Result<()>; + fn OnIncomingMessageAdded(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnIncomingMessageRemoved(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnOutgoingMessageAdded(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnOutgoingMessageRemoved(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, bstrmessageid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnReceiptOptionsChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnActivityLoggingConfigChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnSecurityConfigChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnEventLoggingConfigChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnOutgoingQueueConfigChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnOutgoingArchiveConfigChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnIncomingArchiveConfigChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnDevicesConfigChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnOutboundRoutingGroupsConfigChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnOutboundRoutingRulesConfigChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnServerActivityChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, lincomingmessages: i32, lroutingmessages: i32, loutgoingmessages: i32, lqueuedmessages: i32) -> windows_core::Result<()>; + fn OnQueuesStatusChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, boutgoingqueueblocked: super::super::Foundation::VARIANT_BOOL, boutgoingqueuepaused: super::super::Foundation::VARIANT_BOOL, bincomingqueueblocked: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn OnNewCall(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, lcallid: i32, ldeviceid: i32, bstrcallerid: &windows_core::BSTR) -> windows_core::Result<()>; + fn OnServerShutDown(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; + fn OnDeviceStatusChange(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>, ldeviceid: i32, bpoweredoff: super::super::Foundation::VARIANT_BOOL, bsending: super::super::Foundation::VARIANT_BOOL, breceiving: super::super::Foundation::VARIANT_BOOL, bringing: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn OnGeneralServerConfigChanged(&self, pfaxserver: windows_core::Ref<'_, IFaxServer2>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFaxServerNotify2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnIncomingJobAdded(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnIncomingJobAdded(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrjobid)).into() + IFaxServerNotify2_Impl::OnIncomingJobAdded(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrjobid)).into() } unsafe extern "system" fn OnIncomingJobRemoved(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnIncomingJobRemoved(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrjobid)).into() + IFaxServerNotify2_Impl::OnIncomingJobRemoved(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrjobid)).into() } unsafe extern "system" fn OnIncomingJobChanged(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void, pjobstatus: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnIncomingJobChanged(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrjobid), windows_core::from_raw_borrowed(&pjobstatus)).into() + IFaxServerNotify2_Impl::OnIncomingJobChanged(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrjobid), core::mem::transmute_copy(&pjobstatus)).into() } unsafe extern "system" fn OnOutgoingJobAdded(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnOutgoingJobAdded(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrjobid)).into() + IFaxServerNotify2_Impl::OnOutgoingJobAdded(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrjobid)).into() } unsafe extern "system" fn OnOutgoingJobRemoved(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnOutgoingJobRemoved(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrjobid)).into() + IFaxServerNotify2_Impl::OnOutgoingJobRemoved(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrjobid)).into() } unsafe extern "system" fn OnOutgoingJobChanged(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrjobid: *mut core::ffi::c_void, pjobstatus: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnOutgoingJobChanged(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrjobid), windows_core::from_raw_borrowed(&pjobstatus)).into() + IFaxServerNotify2_Impl::OnOutgoingJobChanged(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrjobid), core::mem::transmute_copy(&pjobstatus)).into() } unsafe extern "system" fn OnIncomingMessageAdded(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrmessageid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnIncomingMessageAdded(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrmessageid)).into() + IFaxServerNotify2_Impl::OnIncomingMessageAdded(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrmessageid)).into() } unsafe extern "system" fn OnIncomingMessageRemoved(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrmessageid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnIncomingMessageRemoved(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrmessageid)).into() + IFaxServerNotify2_Impl::OnIncomingMessageRemoved(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrmessageid)).into() } unsafe extern "system" fn OnOutgoingMessageAdded(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrmessageid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnOutgoingMessageAdded(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrmessageid)).into() + IFaxServerNotify2_Impl::OnOutgoingMessageAdded(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrmessageid)).into() } unsafe extern "system" fn OnOutgoingMessageRemoved(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, bstrmessageid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnOutgoingMessageRemoved(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute(&bstrmessageid)).into() + IFaxServerNotify2_Impl::OnOutgoingMessageRemoved(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute(&bstrmessageid)).into() } unsafe extern "system" fn OnReceiptOptionsChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnReceiptOptionsChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnReceiptOptionsChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnActivityLoggingConfigChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnActivityLoggingConfigChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnActivityLoggingConfigChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnSecurityConfigChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnSecurityConfigChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnSecurityConfigChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnEventLoggingConfigChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnEventLoggingConfigChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnEventLoggingConfigChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnOutgoingQueueConfigChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnOutgoingQueueConfigChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnOutgoingQueueConfigChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnOutgoingArchiveConfigChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnOutgoingArchiveConfigChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnOutgoingArchiveConfigChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnIncomingArchiveConfigChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnIncomingArchiveConfigChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnIncomingArchiveConfigChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnDevicesConfigChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnDevicesConfigChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnDevicesConfigChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnOutboundRoutingGroupsConfigChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnOutboundRoutingGroupsConfigChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnOutboundRoutingGroupsConfigChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnOutboundRoutingRulesConfigChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnOutboundRoutingRulesConfigChange(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnOutboundRoutingRulesConfigChange(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnServerActivityChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, lincomingmessages: i32, lroutingmessages: i32, loutgoingmessages: i32, lqueuedmessages: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnServerActivityChange(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute_copy(&lincomingmessages), core::mem::transmute_copy(&lroutingmessages), core::mem::transmute_copy(&loutgoingmessages), core::mem::transmute_copy(&lqueuedmessages)).into() + IFaxServerNotify2_Impl::OnServerActivityChange(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute_copy(&lincomingmessages), core::mem::transmute_copy(&lroutingmessages), core::mem::transmute_copy(&loutgoingmessages), core::mem::transmute_copy(&lqueuedmessages)).into() } unsafe extern "system" fn OnQueuesStatusChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, boutgoingqueueblocked: super::super::Foundation::VARIANT_BOOL, boutgoingqueuepaused: super::super::Foundation::VARIANT_BOOL, bincomingqueueblocked: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnQueuesStatusChange(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute_copy(&boutgoingqueueblocked), core::mem::transmute_copy(&boutgoingqueuepaused), core::mem::transmute_copy(&bincomingqueueblocked)).into() + IFaxServerNotify2_Impl::OnQueuesStatusChange(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute_copy(&boutgoingqueueblocked), core::mem::transmute_copy(&boutgoingqueuepaused), core::mem::transmute_copy(&bincomingqueueblocked)).into() } unsafe extern "system" fn OnNewCall(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, lcallid: i32, ldeviceid: i32, bstrcallerid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnNewCall(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute_copy(&lcallid), core::mem::transmute_copy(&ldeviceid), core::mem::transmute(&bstrcallerid)).into() + IFaxServerNotify2_Impl::OnNewCall(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute_copy(&lcallid), core::mem::transmute_copy(&ldeviceid), core::mem::transmute(&bstrcallerid)).into() } unsafe extern "system" fn OnServerShutDown(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnServerShutDown(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnServerShutDown(this, core::mem::transmute_copy(&pfaxserver)).into() } unsafe extern "system" fn OnDeviceStatusChange(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void, ldeviceid: i32, bpoweredoff: super::super::Foundation::VARIANT_BOOL, bsending: super::super::Foundation::VARIANT_BOOL, breceiving: super::super::Foundation::VARIANT_BOOL, bringing: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnDeviceStatusChange(this, windows_core::from_raw_borrowed(&pfaxserver), core::mem::transmute_copy(&ldeviceid), core::mem::transmute_copy(&bpoweredoff), core::mem::transmute_copy(&bsending), core::mem::transmute_copy(&breceiving), core::mem::transmute_copy(&bringing)).into() + IFaxServerNotify2_Impl::OnDeviceStatusChange(this, core::mem::transmute_copy(&pfaxserver), core::mem::transmute_copy(&ldeviceid), core::mem::transmute_copy(&bpoweredoff), core::mem::transmute_copy(&bsending), core::mem::transmute_copy(&breceiving), core::mem::transmute_copy(&bringing)).into() } unsafe extern "system" fn OnGeneralServerConfigChanged(this: *mut core::ffi::c_void, pfaxserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFaxServerNotify2_Impl::OnGeneralServerConfigChanged(this, windows_core::from_raw_borrowed(&pfaxserver)).into() + IFaxServerNotify2_Impl::OnGeneralServerConfigChanged(this, core::mem::transmute_copy(&pfaxserver)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -12540,7 +12540,7 @@ pub struct IStiUSD_Vtbl { } #[cfg(all(feature = "Win32_System_IO", feature = "Win32_System_Registry"))] pub trait IStiUSD_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pheldcb: Option<&IStiDeviceControl>, dwstiversion: u32, hparameterskey: super::super::System::Registry::HKEY) -> windows_core::Result<()>; + fn Initialize(&self, pheldcb: windows_core::Ref<'_, IStiDeviceControl>, dwstiversion: u32, hparameterskey: super::super::System::Registry::HKEY) -> windows_core::Result<()>; fn GetCapabilities(&self) -> windows_core::Result; fn GetStatus(&self, pdevstatus: *mut STI_DEVICE_STATUS) -> windows_core::Result<()>; fn DeviceReset(&self) -> windows_core::Result<()>; @@ -12562,7 +12562,7 @@ impl IStiUSD_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pheldcb: *mut core::ffi::c_void, dwstiversion: u32, hparameterskey: super::super::System::Registry::HKEY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStiUSD_Impl::Initialize(this, windows_core::from_raw_borrowed(&pheldcb), core::mem::transmute_copy(&dwstiversion), core::mem::transmute_copy(&hparameterskey)).into() + IStiUSD_Impl::Initialize(this, core::mem::transmute_copy(&pheldcb), core::mem::transmute_copy(&dwstiversion), core::mem::transmute_copy(&hparameterskey)).into() } unsafe extern "system" fn GetCapabilities(this: *mut core::ffi::c_void, pdevcaps: *mut STI_USD_CAPS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12773,7 +12773,7 @@ pub trait IStillImageW_Impl: windows_core::IUnknownImpl { fn Initialize(&self, hinst: super::super::Foundation::HINSTANCE, dwversion: u32) -> windows_core::Result<()>; fn GetDeviceList(&self, dwtype: u32, dwflags: u32, pdwitemsreturned: *mut u32, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetDeviceInfo(&self, pwszdevicename: &windows_core::PCWSTR, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateDevice(&self, pwszdevicename: &windows_core::PCWSTR, dwmode: u32, pdevice: *mut Option, punkouter: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateDevice(&self, pwszdevicename: &windows_core::PCWSTR, dwmode: u32, pdevice: windows_core::OutRef<'_, IStiDevice>, punkouter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetDeviceValue(&self, pwszdevicename: &windows_core::PCWSTR, pvaluename: &windows_core::PCWSTR, ptype: *mut u32, pdata: *mut u8, cbdata: *mut u32) -> windows_core::Result<()>; fn SetDeviceValue(&self, pwszdevicename: &windows_core::PCWSTR, pvaluename: &windows_core::PCWSTR, r#type: u32, pdata: *const u8, cbdata: u32) -> windows_core::Result<()>; fn GetSTILaunchInformation(&self, pwszdevicename: windows_core::PWSTR, pdweventcode: *mut u32, pwszeventname: windows_core::PWSTR) -> windows_core::Result<()>; @@ -12802,7 +12802,7 @@ impl IStillImageW_Vtbl { } unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, pwszdevicename: windows_core::PCWSTR, dwmode: u32, pdevice: *mut *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStillImageW_Impl::CreateDevice(this, core::mem::transmute(&pwszdevicename), core::mem::transmute_copy(&dwmode), core::mem::transmute_copy(&pdevice), windows_core::from_raw_borrowed(&punkouter)).into() + IStillImageW_Impl::CreateDevice(this, core::mem::transmute(&pwszdevicename), core::mem::transmute_copy(&dwmode), core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&punkouter)).into() } unsafe extern "system" fn GetDeviceValue(this: *mut core::ffi::c_void, pwszdevicename: windows_core::PCWSTR, pvaluename: windows_core::PCWSTR, ptype: *mut u32, pdata: *mut u8, cbdata: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs index 92d7d83fdb..27bd6ecb2d 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/FunctionDiscovery/mod.rs @@ -152,8 +152,8 @@ pub struct IFunctionDiscovery_Vtbl { pub trait IFunctionDiscovery_Impl: windows_core::IUnknownImpl { fn GetInstanceCollection(&self, pszcategory: &windows_core::PCWSTR, pszsubcategory: &windows_core::PCWSTR, fincludeallsubcategories: super::super::Foundation::BOOL) -> windows_core::Result; fn GetInstance(&self, pszfunctioninstanceidentity: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateInstanceCollectionQuery(&self, pszcategory: &windows_core::PCWSTR, pszsubcategory: &windows_core::PCWSTR, fincludeallsubcategories: super::super::Foundation::BOOL, pifunctiondiscoverynotification: Option<&IFunctionDiscoveryNotification>, pfdqcquerycontext: *mut u64) -> windows_core::Result; - fn CreateInstanceQuery(&self, pszfunctioninstanceidentity: &windows_core::PCWSTR, pifunctiondiscoverynotification: Option<&IFunctionDiscoveryNotification>, pfdqcquerycontext: *mut u64) -> windows_core::Result; + fn CreateInstanceCollectionQuery(&self, pszcategory: &windows_core::PCWSTR, pszsubcategory: &windows_core::PCWSTR, fincludeallsubcategories: super::super::Foundation::BOOL, pifunctiondiscoverynotification: windows_core::Ref<'_, IFunctionDiscoveryNotification>, pfdqcquerycontext: *mut u64) -> windows_core::Result; + fn CreateInstanceQuery(&self, pszfunctioninstanceidentity: &windows_core::PCWSTR, pifunctiondiscoverynotification: windows_core::Ref<'_, IFunctionDiscoveryNotification>, pfdqcquerycontext: *mut u64) -> windows_core::Result; fn AddInstance(&self, enumsystemvisibility: SystemVisibilityFlags, pszcategory: &windows_core::PCWSTR, pszsubcategory: &windows_core::PCWSTR, pszcategoryidentity: &windows_core::PCWSTR) -> windows_core::Result; fn RemoveInstance(&self, enumsystemvisibility: SystemVisibilityFlags, pszcategory: &windows_core::PCWSTR, pszsubcategory: &windows_core::PCWSTR, pszcategoryidentity: &windows_core::PCWSTR) -> windows_core::Result<()>; } @@ -182,7 +182,7 @@ impl IFunctionDiscovery_Vtbl { } unsafe extern "system" fn CreateInstanceCollectionQuery(this: *mut core::ffi::c_void, pszcategory: windows_core::PCWSTR, pszsubcategory: windows_core::PCWSTR, fincludeallsubcategories: super::super::Foundation::BOOL, pifunctiondiscoverynotification: *mut core::ffi::c_void, pfdqcquerycontext: *mut u64, ppifunctioninstancecollectionquery: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFunctionDiscovery_Impl::CreateInstanceCollectionQuery(this, core::mem::transmute(&pszcategory), core::mem::transmute(&pszsubcategory), core::mem::transmute_copy(&fincludeallsubcategories), windows_core::from_raw_borrowed(&pifunctiondiscoverynotification), core::mem::transmute_copy(&pfdqcquerycontext)) { + match IFunctionDiscovery_Impl::CreateInstanceCollectionQuery(this, core::mem::transmute(&pszcategory), core::mem::transmute(&pszsubcategory), core::mem::transmute_copy(&fincludeallsubcategories), core::mem::transmute_copy(&pifunctiondiscoverynotification), core::mem::transmute_copy(&pfdqcquerycontext)) { Ok(ok__) => { ppifunctioninstancecollectionquery.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -192,7 +192,7 @@ impl IFunctionDiscovery_Vtbl { } unsafe extern "system" fn CreateInstanceQuery(this: *mut core::ffi::c_void, pszfunctioninstanceidentity: windows_core::PCWSTR, pifunctiondiscoverynotification: *mut core::ffi::c_void, pfdqcquerycontext: *mut u64, ppifunctioninstancequery: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFunctionDiscovery_Impl::CreateInstanceQuery(this, core::mem::transmute(&pszfunctioninstanceidentity), windows_core::from_raw_borrowed(&pifunctiondiscoverynotification), core::mem::transmute_copy(&pfdqcquerycontext)) { + match IFunctionDiscovery_Impl::CreateInstanceQuery(this, core::mem::transmute(&pszfunctioninstanceidentity), core::mem::transmute_copy(&pifunctiondiscoverynotification), core::mem::transmute_copy(&pfdqcquerycontext)) { Ok(ok__) => { ppifunctioninstancequery.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -265,7 +265,7 @@ pub struct IFunctionDiscoveryNotification_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IFunctionDiscoveryNotification_Impl: windows_core::IUnknownImpl { - fn OnUpdate(&self, enumqueryupdateaction: QueryUpdateAction, fdqcquerycontext: u64, pifunctioninstance: Option<&IFunctionInstance>) -> windows_core::Result<()>; + fn OnUpdate(&self, enumqueryupdateaction: QueryUpdateAction, fdqcquerycontext: u64, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>) -> windows_core::Result<()>; fn OnError(&self, hr: windows_core::HRESULT, fdqcquerycontext: u64, pszprovider: &windows_core::PCWSTR) -> windows_core::Result<()>; fn OnEvent(&self, dweventid: u32, fdqcquerycontext: u64, pszprovider: &windows_core::PCWSTR) -> windows_core::Result<()>; } @@ -274,7 +274,7 @@ impl IFunctionDiscoveryNotification_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnUpdate(this: *mut core::ffi::c_void, enumqueryupdateaction: QueryUpdateAction, fdqcquerycontext: u64, pifunctioninstance: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFunctionDiscoveryNotification_Impl::OnUpdate(this, core::mem::transmute_copy(&enumqueryupdateaction), core::mem::transmute_copy(&fdqcquerycontext), windows_core::from_raw_borrowed(&pifunctioninstance)).into() + IFunctionDiscoveryNotification_Impl::OnUpdate(this, core::mem::transmute_copy(&enumqueryupdateaction), core::mem::transmute_copy(&fdqcquerycontext), core::mem::transmute_copy(&pifunctioninstance)).into() } unsafe extern "system" fn OnError(this: *mut core::ffi::c_void, hr: windows_core::HRESULT, fdqcquerycontext: u64, pszprovider: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -385,21 +385,21 @@ pub struct IFunctionDiscoveryProvider_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_PropertiesSystem"))] pub trait IFunctionDiscoveryProvider_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pifunctiondiscoveryproviderfactory: Option<&IFunctionDiscoveryProviderFactory>, pifunctiondiscoverynotification: Option<&IFunctionDiscoveryNotification>, lciduserdefault: u32) -> windows_core::Result; - fn Query(&self, pifunctiondiscoveryproviderquery: Option<&IFunctionDiscoveryProviderQuery>) -> windows_core::Result; + fn Initialize(&self, pifunctiondiscoveryproviderfactory: windows_core::Ref<'_, IFunctionDiscoveryProviderFactory>, pifunctiondiscoverynotification: windows_core::Ref<'_, IFunctionDiscoveryNotification>, lciduserdefault: u32) -> windows_core::Result; + fn Query(&self, pifunctiondiscoveryproviderquery: windows_core::Ref<'_, IFunctionDiscoveryProviderQuery>) -> windows_core::Result; fn EndQuery(&self) -> windows_core::Result<()>; - fn InstancePropertyStoreValidateAccess(&self, pifunctioninstance: Option<&IFunctionInstance>, iproviderinstancecontext: isize, dwstgaccess: u32) -> windows_core::Result<()>; - fn InstancePropertyStoreOpen(&self, pifunctioninstance: Option<&IFunctionInstance>, iproviderinstancecontext: isize, dwstgaccess: u32) -> windows_core::Result; - fn InstancePropertyStoreFlush(&self, pifunctioninstance: Option<&IFunctionInstance>, iproviderinstancecontext: isize) -> windows_core::Result<()>; - fn InstanceQueryService(&self, pifunctioninstance: Option<&IFunctionInstance>, iproviderinstancecontext: isize, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID) -> windows_core::Result; - fn InstanceReleased(&self, pifunctioninstance: Option<&IFunctionInstance>, iproviderinstancecontext: isize) -> windows_core::Result<()>; + fn InstancePropertyStoreValidateAccess(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, iproviderinstancecontext: isize, dwstgaccess: u32) -> windows_core::Result<()>; + fn InstancePropertyStoreOpen(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, iproviderinstancecontext: isize, dwstgaccess: u32) -> windows_core::Result; + fn InstancePropertyStoreFlush(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, iproviderinstancecontext: isize) -> windows_core::Result<()>; + fn InstanceQueryService(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, iproviderinstancecontext: isize, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID) -> windows_core::Result; + fn InstanceReleased(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, iproviderinstancecontext: isize) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_PropertiesSystem"))] impl IFunctionDiscoveryProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pifunctiondiscoveryproviderfactory: *mut core::ffi::c_void, pifunctiondiscoverynotification: *mut core::ffi::c_void, lciduserdefault: u32, pdwstgaccesscapabilities: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFunctionDiscoveryProvider_Impl::Initialize(this, windows_core::from_raw_borrowed(&pifunctiondiscoveryproviderfactory), windows_core::from_raw_borrowed(&pifunctiondiscoverynotification), core::mem::transmute_copy(&lciduserdefault)) { + match IFunctionDiscoveryProvider_Impl::Initialize(this, core::mem::transmute_copy(&pifunctiondiscoveryproviderfactory), core::mem::transmute_copy(&pifunctiondiscoverynotification), core::mem::transmute_copy(&lciduserdefault)) { Ok(ok__) => { pdwstgaccesscapabilities.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -409,7 +409,7 @@ impl IFunctionDiscoveryProvider_Vtbl { } unsafe extern "system" fn Query(this: *mut core::ffi::c_void, pifunctiondiscoveryproviderquery: *mut core::ffi::c_void, ppifunctioninstancecollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFunctionDiscoveryProvider_Impl::Query(this, windows_core::from_raw_borrowed(&pifunctiondiscoveryproviderquery)) { + match IFunctionDiscoveryProvider_Impl::Query(this, core::mem::transmute_copy(&pifunctiondiscoveryproviderquery)) { Ok(ok__) => { ppifunctioninstancecollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -423,11 +423,11 @@ impl IFunctionDiscoveryProvider_Vtbl { } unsafe extern "system" fn InstancePropertyStoreValidateAccess(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, iproviderinstancecontext: isize, dwstgaccess: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFunctionDiscoveryProvider_Impl::InstancePropertyStoreValidateAccess(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&dwstgaccess)).into() + IFunctionDiscoveryProvider_Impl::InstancePropertyStoreValidateAccess(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&dwstgaccess)).into() } unsafe extern "system" fn InstancePropertyStoreOpen(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, iproviderinstancecontext: isize, dwstgaccess: u32, ppipropertystore: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFunctionDiscoveryProvider_Impl::InstancePropertyStoreOpen(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&dwstgaccess)) { + match IFunctionDiscoveryProvider_Impl::InstancePropertyStoreOpen(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&dwstgaccess)) { Ok(ok__) => { ppipropertystore.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -437,11 +437,11 @@ impl IFunctionDiscoveryProvider_Vtbl { } unsafe extern "system" fn InstancePropertyStoreFlush(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, iproviderinstancecontext: isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFunctionDiscoveryProvider_Impl::InstancePropertyStoreFlush(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext)).into() + IFunctionDiscoveryProvider_Impl::InstancePropertyStoreFlush(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext)).into() } unsafe extern "system" fn InstanceQueryService(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, iproviderinstancecontext: isize, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppiunknown: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFunctionDiscoveryProvider_Impl::InstanceQueryService(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&guidservice), core::mem::transmute_copy(&riid)) { + match IFunctionDiscoveryProvider_Impl::InstanceQueryService(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&guidservice), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppiunknown.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -451,7 +451,7 @@ impl IFunctionDiscoveryProvider_Vtbl { } unsafe extern "system" fn InstanceReleased(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, iproviderinstancecontext: isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFunctionDiscoveryProvider_Impl::InstanceReleased(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext)).into() + IFunctionDiscoveryProvider_Impl::InstanceReleased(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -511,7 +511,7 @@ pub struct IFunctionDiscoveryProviderFactory_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_PropertiesSystem"))] pub trait IFunctionDiscoveryProviderFactory_Impl: windows_core::IUnknownImpl { fn CreatePropertyStore(&self) -> windows_core::Result; - fn CreateInstance(&self, pszsubcategory: &windows_core::PCWSTR, pszproviderinstanceidentity: &windows_core::PCWSTR, iproviderinstancecontext: isize, pipropertystore: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pifunctiondiscoveryprovider: Option<&IFunctionDiscoveryProvider>) -> windows_core::Result; + fn CreateInstance(&self, pszsubcategory: &windows_core::PCWSTR, pszproviderinstanceidentity: &windows_core::PCWSTR, iproviderinstancecontext: isize, pipropertystore: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pifunctiondiscoveryprovider: windows_core::Ref<'_, IFunctionDiscoveryProvider>) -> windows_core::Result; fn CreateFunctionInstanceCollection(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_PropertiesSystem"))] @@ -529,7 +529,7 @@ impl IFunctionDiscoveryProviderFactory_Vtbl { } unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, pszsubcategory: windows_core::PCWSTR, pszproviderinstanceidentity: windows_core::PCWSTR, iproviderinstancecontext: isize, pipropertystore: *mut core::ffi::c_void, pifunctiondiscoveryprovider: *mut core::ffi::c_void, ppifunctioninstance: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFunctionDiscoveryProviderFactory_Impl::CreateInstance(this, core::mem::transmute(&pszsubcategory), core::mem::transmute(&pszproviderinstanceidentity), core::mem::transmute_copy(&iproviderinstancecontext), windows_core::from_raw_borrowed(&pipropertystore), windows_core::from_raw_borrowed(&pifunctiondiscoveryprovider)) { + match IFunctionDiscoveryProviderFactory_Impl::CreateInstance(this, core::mem::transmute(&pszsubcategory), core::mem::transmute(&pszproviderinstanceidentity), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&pipropertystore), core::mem::transmute_copy(&pifunctiondiscoveryprovider)) { Ok(ok__) => { ppifunctioninstance.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -658,14 +658,14 @@ pub struct IFunctionDiscoveryServiceProvider_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IFunctionDiscoveryServiceProvider_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pifunctioninstance: Option<&IFunctionInstance>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn Initialize(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IFunctionDiscoveryServiceProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFunctionDiscoveryServiceProvider_Impl::Initialize(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IFunctionDiscoveryServiceProvider_Impl::Initialize(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -842,7 +842,7 @@ pub trait IFunctionInstanceCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn Get(&self, pszinstanceidentity: &windows_core::PCWSTR, pdwindex: *mut u32) -> windows_core::Result; fn Item(&self, dwindex: u32) -> windows_core::Result; - fn Add(&self, pifunctioninstance: Option<&IFunctionInstance>) -> windows_core::Result<()>; + fn Add(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>) -> windows_core::Result<()>; fn Remove(&self, dwindex: u32) -> windows_core::Result; fn Delete(&self, dwindex: u32) -> windows_core::Result<()>; fn DeleteAll(&self) -> windows_core::Result<()>; @@ -882,7 +882,7 @@ impl IFunctionInstanceCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFunctionInstanceCollection_Impl::Add(this, windows_core::from_raw_borrowed(&pifunctioninstance)).into() + IFunctionInstanceCollection_Impl::Add(this, core::mem::transmute_copy(&pifunctioninstance)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, dwindex: u32, ppifunctioninstance: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1123,23 +1123,23 @@ pub struct IPNPXDeviceAssociation_Vtbl { pub Delete: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPNPXDeviceAssociation_Impl: windows_core::IUnknownImpl { - fn Associate(&self, pszsubcategory: &windows_core::PCWSTR, pifunctiondiscoverynotification: Option<&IFunctionDiscoveryNotification>) -> windows_core::Result<()>; - fn Unassociate(&self, pszsubcategory: &windows_core::PCWSTR, pifunctiondiscoverynotification: Option<&IFunctionDiscoveryNotification>) -> windows_core::Result<()>; - fn Delete(&self, pszsubcategory: &windows_core::PCWSTR, pifunctiondiscoverynotification: Option<&IFunctionDiscoveryNotification>) -> windows_core::Result<()>; + fn Associate(&self, pszsubcategory: &windows_core::PCWSTR, pifunctiondiscoverynotification: windows_core::Ref<'_, IFunctionDiscoveryNotification>) -> windows_core::Result<()>; + fn Unassociate(&self, pszsubcategory: &windows_core::PCWSTR, pifunctiondiscoverynotification: windows_core::Ref<'_, IFunctionDiscoveryNotification>) -> windows_core::Result<()>; + fn Delete(&self, pszsubcategory: &windows_core::PCWSTR, pifunctiondiscoverynotification: windows_core::Ref<'_, IFunctionDiscoveryNotification>) -> windows_core::Result<()>; } impl IPNPXDeviceAssociation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Associate(this: *mut core::ffi::c_void, pszsubcategory: windows_core::PCWSTR, pifunctiondiscoverynotification: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPNPXDeviceAssociation_Impl::Associate(this, core::mem::transmute(&pszsubcategory), windows_core::from_raw_borrowed(&pifunctiondiscoverynotification)).into() + IPNPXDeviceAssociation_Impl::Associate(this, core::mem::transmute(&pszsubcategory), core::mem::transmute_copy(&pifunctiondiscoverynotification)).into() } unsafe extern "system" fn Unassociate(this: *mut core::ffi::c_void, pszsubcategory: windows_core::PCWSTR, pifunctiondiscoverynotification: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPNPXDeviceAssociation_Impl::Unassociate(this, core::mem::transmute(&pszsubcategory), windows_core::from_raw_borrowed(&pifunctiondiscoverynotification)).into() + IPNPXDeviceAssociation_Impl::Unassociate(this, core::mem::transmute(&pszsubcategory), core::mem::transmute_copy(&pifunctiondiscoverynotification)).into() } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, pszsubcategory: windows_core::PCWSTR, pifunctiondiscoverynotification: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPNPXDeviceAssociation_Impl::Delete(this, core::mem::transmute(&pszsubcategory), windows_core::from_raw_borrowed(&pifunctiondiscoverynotification)).into() + IPNPXDeviceAssociation_Impl::Delete(this, core::mem::transmute(&pszsubcategory), core::mem::transmute_copy(&pifunctiondiscoverynotification)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1220,7 +1220,7 @@ pub trait IPropertyStoreCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn Get(&self, pszinstanceidentity: &windows_core::PCWSTR, pdwindex: *mut u32) -> windows_core::Result; fn Item(&self, dwindex: u32) -> windows_core::Result; - fn Add(&self, pipropertystore: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn Add(&self, pipropertystore: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; fn Remove(&self, dwindex: u32) -> windows_core::Result; fn Delete(&self, dwindex: u32) -> windows_core::Result<()>; fn DeleteAll(&self) -> windows_core::Result<()>; @@ -1260,7 +1260,7 @@ impl IPropertyStoreCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pipropertystore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertyStoreCollection_Impl::Add(this, windows_core::from_raw_borrowed(&pipropertystore)).into() + IPropertyStoreCollection_Impl::Add(this, core::mem::transmute_copy(&pipropertystore)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, dwindex: u32, pipropertystore: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1353,17 +1353,17 @@ pub struct IProviderProperties_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IProviderProperties_Impl: windows_core::IUnknownImpl { - fn GetCount(&self, pifunctioninstance: Option<&IFunctionInstance>, iproviderinstancecontext: isize) -> windows_core::Result; - fn GetAt(&self, pifunctioninstance: Option<&IFunctionInstance>, iproviderinstancecontext: isize, dwindex: u32, pkey: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()>; - fn GetValue(&self, pifunctioninstance: Option<&IFunctionInstance>, iproviderinstancecontext: isize, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; - fn SetValue(&self, pifunctioninstance: Option<&IFunctionInstance>, iproviderinstancecontext: isize, key: *const super::super::Foundation::PROPERTYKEY, ppropvar: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; + fn GetCount(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, iproviderinstancecontext: isize) -> windows_core::Result; + fn GetAt(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, iproviderinstancecontext: isize, dwindex: u32, pkey: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()>; + fn GetValue(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, iproviderinstancecontext: isize, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; + fn SetValue(&self, pifunctioninstance: windows_core::Ref<'_, IFunctionInstance>, iproviderinstancecontext: isize, key: *const super::super::Foundation::PROPERTYKEY, ppropvar: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IProviderProperties_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetCount(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, iproviderinstancecontext: isize, pdwcount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IProviderProperties_Impl::GetCount(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext)) { + match IProviderProperties_Impl::GetCount(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext)) { Ok(ok__) => { pdwcount.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1373,11 +1373,11 @@ impl IProviderProperties_Vtbl { } unsafe extern "system" fn GetAt(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, iproviderinstancecontext: isize, dwindex: u32, pkey: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProviderProperties_Impl::GetAt(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&dwindex), core::mem::transmute_copy(&pkey)).into() + IProviderProperties_Impl::GetAt(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&dwindex), core::mem::transmute_copy(&pkey)).into() } unsafe extern "system" fn GetValue(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, iproviderinstancecontext: isize, key: *const super::super::Foundation::PROPERTYKEY, ppropvar: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IProviderProperties_Impl::GetValue(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&key)) { + match IProviderProperties_Impl::GetValue(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&key)) { Ok(ok__) => { ppropvar.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1387,7 +1387,7 @@ impl IProviderProperties_Vtbl { } unsafe extern "system" fn SetValue(this: *mut core::ffi::c_void, pifunctioninstance: *mut core::ffi::c_void, iproviderinstancecontext: isize, key: *const super::super::Foundation::PROPERTYKEY, ppropvar: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProviderProperties_Impl::SetValue(this, windows_core::from_raw_borrowed(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&key), core::mem::transmute_copy(&ppropvar)).into() + IProviderProperties_Impl::SetValue(this, core::mem::transmute_copy(&pifunctioninstance), core::mem::transmute_copy(&iproviderinstancecontext), core::mem::transmute_copy(&key), core::mem::transmute_copy(&ppropvar)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs index 64f8464e42..e0f73dc7e8 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs @@ -1238,14 +1238,14 @@ pub struct IDefaultLocation_Vtbl { pub GetReport: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDefaultLocation_Impl: windows_core::IUnknownImpl { - fn SetReport(&self, reporttype: *const windows_core::GUID, plocationreport: Option<&ILocationReport>) -> windows_core::Result<()>; + fn SetReport(&self, reporttype: *const windows_core::GUID, plocationreport: windows_core::Ref<'_, ILocationReport>) -> windows_core::Result<()>; fn GetReport(&self, reporttype: *const windows_core::GUID) -> windows_core::Result; } impl IDefaultLocation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetReport(this: *mut core::ffi::c_void, reporttype: *const windows_core::GUID, plocationreport: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDefaultLocation_Impl::SetReport(this, core::mem::transmute_copy(&reporttype), windows_core::from_raw_borrowed(&plocationreport)).into() + IDefaultLocation_Impl::SetReport(this, core::mem::transmute_copy(&reporttype), core::mem::transmute_copy(&plocationreport)).into() } unsafe extern "system" fn GetReport(this: *mut core::ffi::c_void, reporttype: *const windows_core::GUID, pplocationreport: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1801,7 +1801,7 @@ pub struct ILocation_Vtbl { } #[cfg(feature = "Win32_Devices_Sensors")] pub trait ILocation_Impl: windows_core::IUnknownImpl { - fn RegisterForReport(&self, pevents: Option<&ILocationEvents>, reporttype: *const windows_core::GUID, dwrequestedreportinterval: u32) -> windows_core::Result<()>; + fn RegisterForReport(&self, pevents: windows_core::Ref<'_, ILocationEvents>, reporttype: *const windows_core::GUID, dwrequestedreportinterval: u32) -> windows_core::Result<()>; fn UnregisterForReport(&self, reporttype: *const windows_core::GUID) -> windows_core::Result<()>; fn GetReport(&self, reporttype: *const windows_core::GUID) -> windows_core::Result; fn GetReportStatus(&self, reporttype: *const windows_core::GUID) -> windows_core::Result; @@ -1816,7 +1816,7 @@ impl ILocation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterForReport(this: *mut core::ffi::c_void, pevents: *mut core::ffi::c_void, reporttype: *const windows_core::GUID, dwrequestedreportinterval: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILocation_Impl::RegisterForReport(this, windows_core::from_raw_borrowed(&pevents), core::mem::transmute_copy(&reporttype), core::mem::transmute_copy(&dwrequestedreportinterval)).into() + ILocation_Impl::RegisterForReport(this, core::mem::transmute_copy(&pevents), core::mem::transmute_copy(&reporttype), core::mem::transmute_copy(&dwrequestedreportinterval)).into() } unsafe extern "system" fn UnregisterForReport(this: *mut core::ffi::c_void, reporttype: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1913,14 +1913,14 @@ pub struct ILocationEvents_Vtbl { pub OnStatusChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, LOCATION_REPORT_STATUS) -> windows_core::HRESULT, } pub trait ILocationEvents_Impl: windows_core::IUnknownImpl { - fn OnLocationChanged(&self, reporttype: *const windows_core::GUID, plocationreport: Option<&ILocationReport>) -> windows_core::Result<()>; + fn OnLocationChanged(&self, reporttype: *const windows_core::GUID, plocationreport: windows_core::Ref<'_, ILocationReport>) -> windows_core::Result<()>; fn OnStatusChanged(&self, reporttype: *const windows_core::GUID, newstatus: LOCATION_REPORT_STATUS) -> windows_core::Result<()>; } impl ILocationEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnLocationChanged(this: *mut core::ffi::c_void, reporttype: *const windows_core::GUID, plocationreport: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILocationEvents_Impl::OnLocationChanged(this, core::mem::transmute_copy(&reporttype), windows_core::from_raw_borrowed(&plocationreport)).into() + ILocationEvents_Impl::OnLocationChanged(this, core::mem::transmute_copy(&reporttype), core::mem::transmute_copy(&plocationreport)).into() } unsafe extern "system" fn OnStatusChanged(this: *mut core::ffi::c_void, reporttype: *const windows_core::GUID, newstatus: LOCATION_REPORT_STATUS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs index 6953256806..685ee5d019 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs @@ -4082,13 +4082,13 @@ pub struct IDirectInput7A_Vtbl { pub CreateDeviceEx: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectInput7A_Impl: IDirectInput2A_Impl { - fn CreateDeviceEx(&self, param0: *const windows_core::GUID, param1: *const windows_core::GUID, param2: *mut *mut core::ffi::c_void, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateDeviceEx(&self, param0: *const windows_core::GUID, param1: *const windows_core::GUID, param2: *mut *mut core::ffi::c_void, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IDirectInput7A_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDeviceEx(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *const windows_core::GUID, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInput7A_Impl::CreateDeviceEx(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectInput7A_Impl::CreateDeviceEx(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } Self { base__: IDirectInput2A_Vtbl::new::(), CreateDeviceEx: CreateDeviceEx:: } } @@ -4119,13 +4119,13 @@ pub struct IDirectInput7W_Vtbl { pub CreateDeviceEx: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectInput7W_Impl: IDirectInput2W_Impl { - fn CreateDeviceEx(&self, param0: *const windows_core::GUID, param1: *const windows_core::GUID, param2: *mut *mut core::ffi::c_void, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateDeviceEx(&self, param0: *const windows_core::GUID, param1: *const windows_core::GUID, param2: *mut *mut core::ffi::c_void, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IDirectInput7W_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDeviceEx(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *const windows_core::GUID, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInput7W_Impl::CreateDeviceEx(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectInput7W_Impl::CreateDeviceEx(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } Self { base__: IDirectInput2W_Vtbl::new::(), CreateDeviceEx: CreateDeviceEx:: } } @@ -4184,7 +4184,7 @@ pub struct IDirectInput8A_Vtbl { pub ConfigureDevices: unsafe extern "system" fn(*mut core::ffi::c_void, LPDICONFIGUREDEVICESCALLBACK, *mut DICONFIGUREDEVICESPARAMSA, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectInput8A_Impl: windows_core::IUnknownImpl { - fn CreateDevice(&self, param0: *const windows_core::GUID, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateDevice(&self, param0: *const windows_core::GUID, param1: windows_core::OutRef<'_, IDirectInputDevice8A>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumDevices(&self, param0: u32, param1: LPDIENUMDEVICESCALLBACKA, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()>; fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()>; fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()>; @@ -4197,7 +4197,7 @@ impl IDirectInput8A_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInput8A_Impl::CreateDevice(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectInput8A_Impl::CreateDevice(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn EnumDevices(this: *mut core::ffi::c_void, param0: u32, param1: LPDIENUMDEVICESCALLBACKA, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4294,7 +4294,7 @@ pub struct IDirectInput8W_Vtbl { pub ConfigureDevices: unsafe extern "system" fn(*mut core::ffi::c_void, LPDICONFIGUREDEVICESCALLBACK, *mut DICONFIGUREDEVICESPARAMSW, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectInput8W_Impl: windows_core::IUnknownImpl { - fn CreateDevice(&self, param0: *const windows_core::GUID, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateDevice(&self, param0: *const windows_core::GUID, param1: windows_core::OutRef<'_, IDirectInputDevice8W>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumDevices(&self, param0: u32, param1: LPDIENUMDEVICESCALLBACKW, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()>; fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()>; fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()>; @@ -4307,7 +4307,7 @@ impl IDirectInput8W_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInput8W_Impl::CreateDevice(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectInput8W_Impl::CreateDevice(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn EnumDevices(this: *mut core::ffi::c_void, param0: u32, param1: LPDIENUMDEVICESCALLBACKW, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4386,7 +4386,7 @@ pub struct IDirectInputA_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HINSTANCE, u32) -> windows_core::HRESULT, } pub trait IDirectInputA_Impl: windows_core::IUnknownImpl { - fn CreateDevice(&self, param0: *const windows_core::GUID, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateDevice(&self, param0: *const windows_core::GUID, param1: windows_core::OutRef<'_, IDirectInputDeviceA>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumDevices(&self, param0: u32, param1: LPDIENUMDEVICESCALLBACKA, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()>; fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()>; fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()>; @@ -4396,7 +4396,7 @@ impl IDirectInputA_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInputA_Impl::CreateDevice(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectInputA_Impl::CreateDevice(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn EnumDevices(this: *mut core::ffi::c_void, param0: u32, param1: LPDIENUMDEVICESCALLBACKA, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4482,7 +4482,7 @@ pub struct IDirectInputDevice2A_Vtbl { pub SendDeviceData: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DIDEVICEOBJECTDATA, *mut u32, u32) -> windows_core::HRESULT, } pub trait IDirectInputDevice2A_Impl: IDirectInputDeviceA_Impl { - fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut Option, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: windows_core::OutRef<'_, IDirectInputEffect>, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumEffects(&self, param0: LPDIENUMEFFECTSCALLBACKA, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()>; fn GetEffectInfo(&self, param0: *mut DIEFFECTINFOA, param1: *const windows_core::GUID) -> windows_core::Result<()>; fn GetForceFeedbackState(&self, param0: *mut u32) -> windows_core::Result<()>; @@ -4496,7 +4496,7 @@ impl IDirectInputDevice2A_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateEffect(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInputDevice2A_Impl::CreateEffect(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectInputDevice2A_Impl::CreateEffect(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn EnumEffects(this: *mut core::ffi::c_void, param0: LPDIENUMEFFECTSCALLBACKA, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4602,7 +4602,7 @@ pub struct IDirectInputDevice2W_Vtbl { pub SendDeviceData: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DIDEVICEOBJECTDATA, *mut u32, u32) -> windows_core::HRESULT, } pub trait IDirectInputDevice2W_Impl: IDirectInputDeviceW_Impl { - fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut Option, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: windows_core::OutRef<'_, IDirectInputEffect>, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumEffects(&self, param0: LPDIENUMEFFECTSCALLBACKW, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()>; fn GetEffectInfo(&self, param0: *mut DIEFFECTINFOW, param1: *const windows_core::GUID) -> windows_core::Result<()>; fn GetForceFeedbackState(&self, param0: *mut u32) -> windows_core::Result<()>; @@ -4616,7 +4616,7 @@ impl IDirectInputDevice2W_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateEffect(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInputDevice2W_Impl::CreateEffect(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectInputDevice2W_Impl::CreateEffect(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn EnumEffects(this: *mut core::ffi::c_void, param0: LPDIENUMEFFECTSCALLBACKW, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4929,7 +4929,7 @@ pub trait IDirectInputDevice8A_Impl: windows_core::IUnknownImpl { fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEA) -> windows_core::Result<()>; fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()>; fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()>; - fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut Option, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: windows_core::OutRef<'_, IDirectInputEffect>, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumEffects(&self, param0: LPDIENUMEFFECTSCALLBACKA, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()>; fn GetEffectInfo(&self, param0: *mut DIEFFECTINFOA, param1: *const windows_core::GUID) -> windows_core::Result<()>; fn GetForceFeedbackState(&self, param0: *mut u32) -> windows_core::Result<()>; @@ -5008,7 +5008,7 @@ impl IDirectInputDevice8A_Vtbl { } unsafe extern "system" fn CreateEffect(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInputDevice8A_Impl::CreateEffect(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectInputDevice8A_Impl::CreateEffect(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn EnumEffects(this: *mut core::ffi::c_void, param0: LPDIENUMEFFECTSCALLBACKA, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5255,7 +5255,7 @@ pub trait IDirectInputDevice8W_Impl: windows_core::IUnknownImpl { fn GetDeviceInfo(&self, param0: *mut DIDEVICEINSTANCEW) -> windows_core::Result<()>; fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()>; fn Initialize(&self, param0: super::super::Foundation::HINSTANCE, param1: u32, param2: *const windows_core::GUID) -> windows_core::Result<()>; - fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut Option, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateEffect(&self, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: windows_core::OutRef<'_, IDirectInputEffect>, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumEffects(&self, param0: LPDIENUMEFFECTSCALLBACKW, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::Result<()>; fn GetEffectInfo(&self, param0: *mut DIEFFECTINFOW, param1: *const windows_core::GUID) -> windows_core::Result<()>; fn GetForceFeedbackState(&self, param0: *mut u32) -> windows_core::Result<()>; @@ -5334,7 +5334,7 @@ impl IDirectInputDevice8W_Vtbl { } unsafe extern "system" fn CreateEffect(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *mut DIEFFECT, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInputDevice8W_Impl::CreateEffect(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectInputDevice8W_Impl::CreateEffect(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn EnumEffects(this: *mut core::ffi::c_void, param0: LPDIENUMEFFECTSCALLBACKW, param1: *mut core::ffi::c_void, param2: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6461,7 +6461,7 @@ pub struct IDirectInputW_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HINSTANCE, u32) -> windows_core::HRESULT, } pub trait IDirectInputW_Impl: windows_core::IUnknownImpl { - fn CreateDevice(&self, param0: *const windows_core::GUID, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateDevice(&self, param0: *const windows_core::GUID, param1: windows_core::OutRef<'_, IDirectInputDeviceW>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumDevices(&self, param0: u32, param1: LPDIENUMDEVICESCALLBACKW, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::Result<()>; fn GetDeviceStatus(&self, param0: *const windows_core::GUID) -> windows_core::Result<()>; fn RunControlPanel(&self, param0: super::super::Foundation::HWND, param1: u32) -> windows_core::Result<()>; @@ -6471,7 +6471,7 @@ impl IDirectInputW_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectInputW_Impl::CreateDevice(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectInputW_Impl::CreateDevice(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn EnumDevices(this: *mut core::ffi::c_void, param0: u32, param1: LPDIENUMDEVICESCALLBACKW, param2: *mut core::ffi::c_void, param3: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs index c709789576..ab50316695 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs @@ -266,7 +266,7 @@ pub struct IEnumWIA_DEV_INFO_Vtbl { pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IEnumWIA_DEV_INFO_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IWiaPropertyStorage>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -436,7 +436,7 @@ pub struct IEnumWiaItem_Vtbl { pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IEnumWiaItem_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppiwiaitem: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppiwiaitem: windows_core::OutRef<'_, IWiaItem>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -521,7 +521,7 @@ pub struct IEnumWiaItem2_Vtbl { pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IEnumWiaItem2_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppiwiaitem2: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppiwiaitem2: windows_core::OutRef<'_, IWiaItem2>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -610,7 +610,7 @@ pub struct IWiaAppErrorHandler_Vtbl { } pub trait IWiaAppErrorHandler_Impl: windows_core::IUnknownImpl { fn GetWindow(&self) -> windows_core::Result; - fn ReportStatus(&self, lflags: i32, pwiaitem2: Option<&IWiaItem2>, hrstatus: windows_core::HRESULT, lpercentcomplete: i32) -> windows_core::Result<()>; + fn ReportStatus(&self, lflags: i32, pwiaitem2: windows_core::Ref<'_, IWiaItem2>, hrstatus: windows_core::HRESULT, lpercentcomplete: i32) -> windows_core::Result<()>; } impl IWiaAppErrorHandler_Vtbl { pub const fn new() -> Self { @@ -626,7 +626,7 @@ impl IWiaAppErrorHandler_Vtbl { } unsafe extern "system" fn ReportStatus(this: *mut core::ffi::c_void, lflags: i32, pwiaitem2: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT, lpercentcomplete: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaAppErrorHandler_Impl::ReportStatus(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pwiaitem2), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&lpercentcomplete)).into() + IWiaAppErrorHandler_Impl::ReportStatus(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pwiaitem2), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&lpercentcomplete)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -708,8 +708,8 @@ pub struct IWiaDataTransfer_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] pub trait IWiaDataTransfer_Impl: windows_core::IUnknownImpl { - fn idtGetData(&self, pmedium: *mut super::super::System::Com::STGMEDIUM, piwiadatacallback: Option<&IWiaDataCallback>) -> windows_core::Result<()>; - fn idtGetBandedData(&self, pwiadatatransinfo: *mut WIA_DATA_TRANSFER_INFO, piwiadatacallback: Option<&IWiaDataCallback>) -> windows_core::Result<()>; + fn idtGetData(&self, pmedium: *mut super::super::System::Com::STGMEDIUM, piwiadatacallback: windows_core::Ref<'_, IWiaDataCallback>) -> windows_core::Result<()>; + fn idtGetBandedData(&self, pwiadatatransinfo: *mut WIA_DATA_TRANSFER_INFO, piwiadatacallback: windows_core::Ref<'_, IWiaDataCallback>) -> windows_core::Result<()>; fn idtQueryGetData(&self, pfe: *const WIA_FORMAT_INFO) -> windows_core::Result<()>; fn idtEnumWIA_FORMAT_INFO(&self) -> windows_core::Result; fn idtGetExtendedTransferInfo(&self, pextendedtransferinfo: *mut WIA_EXTENDED_TRANSFER_INFO) -> windows_core::Result<()>; @@ -719,11 +719,11 @@ impl IWiaDataTransfer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn idtGetData(this: *mut core::ffi::c_void, pmedium: *mut super::super::System::Com::STGMEDIUM, piwiadatacallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaDataTransfer_Impl::idtGetData(this, core::mem::transmute_copy(&pmedium), windows_core::from_raw_borrowed(&piwiadatacallback)).into() + IWiaDataTransfer_Impl::idtGetData(this, core::mem::transmute_copy(&pmedium), core::mem::transmute_copy(&piwiadatacallback)).into() } unsafe extern "system" fn idtGetBandedData(this: *mut core::ffi::c_void, pwiadatatransinfo: *mut WIA_DATA_TRANSFER_INFO, piwiadatacallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaDataTransfer_Impl::idtGetBandedData(this, core::mem::transmute_copy(&pwiadatatransinfo), windows_core::from_raw_borrowed(&piwiadatacallback)).into() + IWiaDataTransfer_Impl::idtGetBandedData(this, core::mem::transmute_copy(&pwiadatatransinfo), core::mem::transmute_copy(&piwiadatacallback)).into() } unsafe extern "system" fn idtQueryGetData(this: *mut core::ffi::c_void, pfe: *const WIA_FORMAT_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -814,11 +814,11 @@ pub struct IWiaDevMgr_Vtbl { pub trait IWiaDevMgr_Impl: windows_core::IUnknownImpl { fn EnumDeviceInfo(&self, lflag: i32) -> windows_core::Result; fn CreateDevice(&self, bstrdeviceid: &windows_core::BSTR) -> windows_core::Result; - fn SelectDeviceDlg(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR, ppitemroot: *mut Option) -> windows_core::Result<()>; + fn SelectDeviceDlg(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR, ppitemroot: windows_core::OutRef<'_, IWiaItem>) -> windows_core::Result<()>; fn SelectDeviceDlgID(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn GetImageDlg(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, lintent: i32, pitemroot: Option<&IWiaItem>, bstrfilename: &windows_core::BSTR, pguidformat: *mut windows_core::GUID) -> windows_core::Result<()>; + fn GetImageDlg(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, lintent: i32, pitemroot: windows_core::Ref<'_, IWiaItem>, bstrfilename: &windows_core::BSTR, pguidformat: *mut windows_core::GUID) -> windows_core::Result<()>; fn RegisterEventCallbackProgram(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, bstrcommandline: &windows_core::BSTR, bstrname: &windows_core::BSTR, bstrdescription: &windows_core::BSTR, bstricon: &windows_core::BSTR) -> windows_core::Result<()>; - fn RegisterEventCallbackInterface(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, piwiaeventcallback: Option<&IWiaEventCallback>) -> windows_core::Result; + fn RegisterEventCallbackInterface(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, piwiaeventcallback: windows_core::Ref<'_, IWiaEventCallback>) -> windows_core::Result; fn RegisterEventCallbackCLSID(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, pclsid: *const windows_core::GUID, bstrname: &windows_core::BSTR, bstrdescription: &windows_core::BSTR, bstricon: &windows_core::BSTR) -> windows_core::Result<()>; fn AddDeviceDlg(&self, hwndparent: super::super::Foundation::HWND, lflags: i32) -> windows_core::Result<()>; } @@ -854,7 +854,7 @@ impl IWiaDevMgr_Vtbl { } unsafe extern "system" fn GetImageDlg(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, lintent: i32, pitemroot: *mut core::ffi::c_void, bstrfilename: *mut core::ffi::c_void, pguidformat: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaDevMgr_Impl::GetImageDlg(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&ldevicetype), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&lintent), windows_core::from_raw_borrowed(&pitemroot), core::mem::transmute(&bstrfilename), core::mem::transmute_copy(&pguidformat)).into() + IWiaDevMgr_Impl::GetImageDlg(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&ldevicetype), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&lintent), core::mem::transmute_copy(&pitemroot), core::mem::transmute(&bstrfilename), core::mem::transmute_copy(&pguidformat)).into() } unsafe extern "system" fn RegisterEventCallbackProgram(this: *mut core::ffi::c_void, lflags: i32, bstrdeviceid: *mut core::ffi::c_void, peventguid: *const windows_core::GUID, bstrcommandline: *mut core::ffi::c_void, bstrname: *mut core::ffi::c_void, bstrdescription: *mut core::ffi::c_void, bstricon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -862,7 +862,7 @@ impl IWiaDevMgr_Vtbl { } unsafe extern "system" fn RegisterEventCallbackInterface(this: *mut core::ffi::c_void, lflags: i32, bstrdeviceid: *mut core::ffi::c_void, peventguid: *const windows_core::GUID, piwiaeventcallback: *mut core::ffi::c_void, peventobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWiaDevMgr_Impl::RegisterEventCallbackInterface(this, core::mem::transmute_copy(&lflags), core::mem::transmute(&bstrdeviceid), core::mem::transmute_copy(&peventguid), windows_core::from_raw_borrowed(&piwiaeventcallback)) { + match IWiaDevMgr_Impl::RegisterEventCallbackInterface(this, core::mem::transmute_copy(&lflags), core::mem::transmute(&bstrdeviceid), core::mem::transmute_copy(&peventguid), core::mem::transmute_copy(&piwiaeventcallback)) { Ok(ok__) => { peventobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -945,12 +945,12 @@ pub struct IWiaDevMgr2_Vtbl { pub trait IWiaDevMgr2_Impl: windows_core::IUnknownImpl { fn EnumDeviceInfo(&self, lflags: i32) -> windows_core::Result; fn CreateDevice(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR) -> windows_core::Result; - fn SelectDeviceDlg(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR, ppitemroot: *mut Option) -> windows_core::Result<()>; + fn SelectDeviceDlg(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR, ppitemroot: windows_core::OutRef<'_, IWiaItem2>) -> windows_core::Result<()>; fn SelectDeviceDlgID(&self, hwndparent: super::super::Foundation::HWND, ldevicetype: i32, lflags: i32, pbstrdeviceid: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn RegisterEventCallbackInterface(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, piwiaeventcallback: Option<&IWiaEventCallback>) -> windows_core::Result; + fn RegisterEventCallbackInterface(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, piwiaeventcallback: windows_core::Ref<'_, IWiaEventCallback>) -> windows_core::Result; fn RegisterEventCallbackProgram(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, bstrfullappname: &windows_core::BSTR, bstrcommandlinearg: &windows_core::BSTR, bstrname: &windows_core::BSTR, bstrdescription: &windows_core::BSTR, bstricon: &windows_core::BSTR) -> windows_core::Result<()>; fn RegisterEventCallbackCLSID(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, peventguid: *const windows_core::GUID, pclsid: *const windows_core::GUID, bstrname: &windows_core::BSTR, bstrdescription: &windows_core::BSTR, bstricon: &windows_core::BSTR) -> windows_core::Result<()>; - fn GetImageDlg(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, hwndparent: super::super::Foundation::HWND, bstrfoldername: &windows_core::BSTR, bstrfilename: &windows_core::BSTR, plnumfiles: *mut i32, ppbstrfilepaths: *mut *mut windows_core::BSTR, ppitem: *mut Option) -> windows_core::Result<()>; + fn GetImageDlg(&self, lflags: i32, bstrdeviceid: &windows_core::BSTR, hwndparent: super::super::Foundation::HWND, bstrfoldername: &windows_core::BSTR, bstrfilename: &windows_core::BSTR, plnumfiles: *mut i32, ppbstrfilepaths: *mut *mut windows_core::BSTR, ppitem: windows_core::OutRef<'_, IWiaItem2>) -> windows_core::Result<()>; } impl IWiaDevMgr2_Vtbl { pub const fn new() -> Self { @@ -984,7 +984,7 @@ impl IWiaDevMgr2_Vtbl { } unsafe extern "system" fn RegisterEventCallbackInterface(this: *mut core::ffi::c_void, lflags: i32, bstrdeviceid: *mut core::ffi::c_void, peventguid: *const windows_core::GUID, piwiaeventcallback: *mut core::ffi::c_void, peventobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWiaDevMgr2_Impl::RegisterEventCallbackInterface(this, core::mem::transmute_copy(&lflags), core::mem::transmute(&bstrdeviceid), core::mem::transmute_copy(&peventguid), windows_core::from_raw_borrowed(&piwiaeventcallback)) { + match IWiaDevMgr2_Impl::RegisterEventCallbackInterface(this, core::mem::transmute_copy(&lflags), core::mem::transmute(&bstrdeviceid), core::mem::transmute_copy(&peventguid), core::mem::transmute_copy(&piwiaeventcallback)) { Ok(ok__) => { peventobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1099,7 +1099,7 @@ pub trait IWiaDrvItem_Impl: windows_core::IUnknownImpl { fn GetDeviceSpecContext(&self) -> windows_core::Result<*mut u8>; fn GetFullItemName(&self) -> windows_core::Result; fn GetItemName(&self) -> windows_core::Result; - fn AddItemToFolder(&self, __midl__iwiadrvitem0004: Option<&IWiaDrvItem>) -> windows_core::Result<()>; + fn AddItemToFolder(&self, __midl__iwiadrvitem0004: windows_core::Ref<'_, IWiaDrvItem>) -> windows_core::Result<()>; fn UnlinkItemTree(&self, __midl__iwiadrvitem0005: i32) -> windows_core::Result<()>; fn RemoveItemFromFolder(&self, __midl__iwiadrvitem0006: i32) -> windows_core::Result<()>; fn FindItemByName(&self, __midl__iwiadrvitem0007: i32, __midl__iwiadrvitem0008: &windows_core::BSTR) -> windows_core::Result; @@ -1153,7 +1153,7 @@ impl IWiaDrvItem_Vtbl { } unsafe extern "system" fn AddItemToFolder(this: *mut core::ffi::c_void, __midl__iwiadrvitem0004: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaDrvItem_Impl::AddItemToFolder(this, windows_core::from_raw_borrowed(&__midl__iwiadrvitem0004)).into() + IWiaDrvItem_Impl::AddItemToFolder(this, core::mem::transmute_copy(&__midl__iwiadrvitem0004)).into() } unsafe extern "system" fn UnlinkItemTree(this: *mut core::ffi::c_void, __midl__iwiadrvitem0005: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1269,18 +1269,18 @@ pub struct IWiaErrorHandler_Vtbl { pub GetStatusDescription: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut core::ffi::c_void, windows_core::HRESULT, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWiaErrorHandler_Impl: windows_core::IUnknownImpl { - fn ReportStatus(&self, lflags: i32, hwndparent: super::super::Foundation::HWND, pwiaitem2: Option<&IWiaItem2>, hrstatus: windows_core::HRESULT, lpercentcomplete: i32) -> windows_core::Result<()>; - fn GetStatusDescription(&self, lflags: i32, pwiaitem2: Option<&IWiaItem2>, hrstatus: windows_core::HRESULT) -> windows_core::Result; + fn ReportStatus(&self, lflags: i32, hwndparent: super::super::Foundation::HWND, pwiaitem2: windows_core::Ref<'_, IWiaItem2>, hrstatus: windows_core::HRESULT, lpercentcomplete: i32) -> windows_core::Result<()>; + fn GetStatusDescription(&self, lflags: i32, pwiaitem2: windows_core::Ref<'_, IWiaItem2>, hrstatus: windows_core::HRESULT) -> windows_core::Result; } impl IWiaErrorHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ReportStatus(this: *mut core::ffi::c_void, lflags: i32, hwndparent: super::super::Foundation::HWND, pwiaitem2: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT, lpercentcomplete: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaErrorHandler_Impl::ReportStatus(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&hwndparent), windows_core::from_raw_borrowed(&pwiaitem2), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&lpercentcomplete)).into() + IWiaErrorHandler_Impl::ReportStatus(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&pwiaitem2), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&lpercentcomplete)).into() } unsafe extern "system" fn GetStatusDescription(this: *mut core::ffi::c_void, lflags: i32, pwiaitem2: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT, pbstrdescription: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWiaErrorHandler_Impl::GetStatusDescription(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pwiaitem2), core::mem::transmute_copy(&hrstatus)) { + match IWiaErrorHandler_Impl::GetStatusDescription(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pwiaitem2), core::mem::transmute_copy(&hrstatus)) { Ok(ok__) => { pbstrdescription.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1371,29 +1371,29 @@ pub struct IWiaImageFilter_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWiaImageFilter_Impl: windows_core::IUnknownImpl { - fn InitializeFilter(&self, pwiaitem2: Option<&IWiaItem2>, pwiatransfercallback: Option<&IWiaTransferCallback>) -> windows_core::Result<()>; - fn SetNewCallback(&self, pwiatransfercallback: Option<&IWiaTransferCallback>) -> windows_core::Result<()>; - fn FilterPreviewImage(&self, lflags: i32, pwiachilditem2: Option<&IWiaItem2>, inputimageextents: &super::super::Foundation::RECT, pinputstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn ApplyProperties(&self, pwiapropertystorage: Option<&IWiaPropertyStorage>) -> windows_core::Result<()>; + fn InitializeFilter(&self, pwiaitem2: windows_core::Ref<'_, IWiaItem2>, pwiatransfercallback: windows_core::Ref<'_, IWiaTransferCallback>) -> windows_core::Result<()>; + fn SetNewCallback(&self, pwiatransfercallback: windows_core::Ref<'_, IWiaTransferCallback>) -> windows_core::Result<()>; + fn FilterPreviewImage(&self, lflags: i32, pwiachilditem2: windows_core::Ref<'_, IWiaItem2>, inputimageextents: &super::super::Foundation::RECT, pinputstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn ApplyProperties(&self, pwiapropertystorage: windows_core::Ref<'_, IWiaPropertyStorage>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IWiaImageFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFilter(this: *mut core::ffi::c_void, pwiaitem2: *mut core::ffi::c_void, pwiatransfercallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaImageFilter_Impl::InitializeFilter(this, windows_core::from_raw_borrowed(&pwiaitem2), windows_core::from_raw_borrowed(&pwiatransfercallback)).into() + IWiaImageFilter_Impl::InitializeFilter(this, core::mem::transmute_copy(&pwiaitem2), core::mem::transmute_copy(&pwiatransfercallback)).into() } unsafe extern "system" fn SetNewCallback(this: *mut core::ffi::c_void, pwiatransfercallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaImageFilter_Impl::SetNewCallback(this, windows_core::from_raw_borrowed(&pwiatransfercallback)).into() + IWiaImageFilter_Impl::SetNewCallback(this, core::mem::transmute_copy(&pwiatransfercallback)).into() } unsafe extern "system" fn FilterPreviewImage(this: *mut core::ffi::c_void, lflags: i32, pwiachilditem2: *mut core::ffi::c_void, inputimageextents: super::super::Foundation::RECT, pinputstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaImageFilter_Impl::FilterPreviewImage(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pwiachilditem2), core::mem::transmute(&inputimageextents), windows_core::from_raw_borrowed(&pinputstream)).into() + IWiaImageFilter_Impl::FilterPreviewImage(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pwiachilditem2), core::mem::transmute(&inputimageextents), core::mem::transmute_copy(&pinputstream)).into() } unsafe extern "system" fn ApplyProperties(this: *mut core::ffi::c_void, pwiapropertystorage: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaImageFilter_Impl::ApplyProperties(this, windows_core::from_raw_borrowed(&pwiapropertystorage)).into() + IWiaImageFilter_Impl::ApplyProperties(this, core::mem::transmute_copy(&pwiapropertystorage)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1496,7 +1496,7 @@ pub trait IWiaItem_Impl: windows_core::IUnknownImpl { fn EnumRegisterEventInfo(&self, lflags: i32, peventguid: *const windows_core::GUID) -> windows_core::Result; fn FindItemByName(&self, lflags: i32, bstrfullitemname: &windows_core::BSTR) -> windows_core::Result; fn DeviceDlg(&self, hwndparent: super::super::Foundation::HWND, lflags: i32, lintent: i32, plitemcount: *mut i32, ppiwiaitem: *mut *mut Option) -> windows_core::Result<()>; - fn DeviceCommand(&self, lflags: i32, pcmdguid: *const windows_core::GUID, piwiaitem: *mut Option) -> windows_core::Result<()>; + fn DeviceCommand(&self, lflags: i32, pcmdguid: *const windows_core::GUID, piwiaitem: windows_core::OutRef<'_, IWiaItem>) -> windows_core::Result<()>; fn GetRootItem(&self) -> windows_core::Result; fn EnumDeviceCapabilities(&self, lflags: i32) -> windows_core::Result; fn DumpItemData(&self) -> windows_core::Result; @@ -1739,8 +1739,8 @@ pub trait IWiaItem2_Impl: windows_core::IUnknownImpl { fn FindItemByName(&self, lflags: i32, bstrfullitemname: &windows_core::BSTR) -> windows_core::Result; fn GetItemCategory(&self) -> windows_core::Result; fn GetItemType(&self) -> windows_core::Result; - fn DeviceDlg(&self, lflags: i32, hwndparent: super::super::Foundation::HWND, bstrfoldername: &windows_core::BSTR, bstrfilename: &windows_core::BSTR, plnumfiles: *mut i32, ppbstrfilepaths: *mut *mut windows_core::BSTR, ppitem: *mut Option) -> windows_core::Result<()>; - fn DeviceCommand(&self, lflags: i32, pcmdguid: *const windows_core::GUID, ppiwiaitem2: *mut Option) -> windows_core::Result<()>; + fn DeviceDlg(&self, lflags: i32, hwndparent: super::super::Foundation::HWND, bstrfoldername: &windows_core::BSTR, bstrfilename: &windows_core::BSTR, plnumfiles: *mut i32, ppbstrfilepaths: *mut *mut windows_core::BSTR, ppitem: windows_core::OutRef<'_, IWiaItem2>) -> windows_core::Result<()>; + fn DeviceCommand(&self, lflags: i32, pcmdguid: *const windows_core::GUID, ppiwiaitem2: windows_core::OutRef<'_, IWiaItem2>) -> windows_core::Result<()>; fn EnumDeviceCapabilities(&self, lflags: i32) -> windows_core::Result; fn CheckExtension(&self, lflags: i32, bstrname: &windows_core::BSTR, riidextensioninterface: *const windows_core::GUID, pbextensionexists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetExtension(&self, lflags: i32, bstrname: &windows_core::BSTR, riidextensioninterface: *const windows_core::GUID, ppout: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; @@ -2179,7 +2179,7 @@ pub struct IWiaMiniDrv_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait IWiaMiniDrv_Impl: windows_core::IUnknownImpl { - fn drvInitializeWia(&self, __midl__iwiaminidrv0000: *const u8, __midl__iwiaminidrv0001: i32, __midl__iwiaminidrv0002: &windows_core::BSTR, __midl__iwiaminidrv0003: &windows_core::BSTR, __midl__iwiaminidrv0004: Option<&windows_core::IUnknown>, __midl__iwiaminidrv0005: Option<&windows_core::IUnknown>, __midl__iwiaminidrv0006: *mut Option, __midl__iwiaminidrv0007: *mut Option, __midl__iwiaminidrv0008: *mut i32) -> windows_core::Result<()>; + fn drvInitializeWia(&self, __midl__iwiaminidrv0000: *const u8, __midl__iwiaminidrv0001: i32, __midl__iwiaminidrv0002: &windows_core::BSTR, __midl__iwiaminidrv0003: &windows_core::BSTR, __midl__iwiaminidrv0004: windows_core::Ref<'_, windows_core::IUnknown>, __midl__iwiaminidrv0005: windows_core::Ref<'_, windows_core::IUnknown>, __midl__iwiaminidrv0006: windows_core::OutRef<'_, IWiaDrvItem>, __midl__iwiaminidrv0007: windows_core::OutRef<'_, windows_core::IUnknown>, __midl__iwiaminidrv0008: *mut i32) -> windows_core::Result<()>; fn drvAcquireItemData(&self, __midl__iwiaminidrv0009: *const u8, __midl__iwiaminidrv0010: i32, __midl__iwiaminidrv0011: *mut MINIDRV_TRANSFER_CONTEXT, __midl__iwiaminidrv0012: *mut i32) -> windows_core::Result<()>; fn drvInitItemProperties(&self, __midl__iwiaminidrv0013: *const u8, __midl__iwiaminidrv0014: i32) -> windows_core::Result; fn drvValidateItemProperties(&self, __midl__iwiaminidrv0016: *const u8, __midl__iwiaminidrv0017: i32, __midl__iwiaminidrv0018: u32, __midl__iwiaminidrv0019: *const super::super::System::Com::StructuredStorage::PROPSPEC) -> windows_core::Result; @@ -2189,7 +2189,7 @@ pub trait IWiaMiniDrv_Impl: windows_core::IUnknownImpl { fn drvUnLockWiaDevice(&self, __midl__iwiaminidrv0033: *const u8, __midl__iwiaminidrv0034: i32) -> windows_core::Result; fn drvAnalyzeItem(&self, __midl__iwiaminidrv0036: *const u8, __midl__iwiaminidrv0037: i32, __midl__iwiaminidrv0038: *const i32) -> windows_core::Result<()>; fn drvGetDeviceErrorStr(&self, __midl__iwiaminidrv0039: i32, __midl__iwiaminidrv0040: i32, __midl__iwiaminidrv0041: *mut windows_core::PWSTR, __midl__iwiaminidrv0042: *mut i32) -> windows_core::Result<()>; - fn drvDeviceCommand(&self, __midl__iwiaminidrv0043: *const u8, __midl__iwiaminidrv0044: i32, __midl__iwiaminidrv0045: *const windows_core::GUID, __midl__iwiaminidrv0046: *mut Option, __midl__iwiaminidrv0047: *mut i32) -> windows_core::Result<()>; + fn drvDeviceCommand(&self, __midl__iwiaminidrv0043: *const u8, __midl__iwiaminidrv0044: i32, __midl__iwiaminidrv0045: *const windows_core::GUID, __midl__iwiaminidrv0046: windows_core::OutRef<'_, IWiaDrvItem>, __midl__iwiaminidrv0047: *mut i32) -> windows_core::Result<()>; fn drvGetCapabilities(&self, __midl__iwiaminidrv0048: *const u8, __midl__iwiaminidrv0049: i32, __midl__iwiaminidrv0050: *mut i32, __midl__iwiaminidrv0051: *mut *mut WIA_DEV_CAP_DRV, __midl__iwiaminidrv0052: *mut i32) -> windows_core::Result<()>; fn drvDeleteItem(&self, __midl__iwiaminidrv0053: *const u8, __midl__iwiaminidrv0054: i32) -> windows_core::Result; fn drvFreeDrvItemContext(&self, __midl__iwiaminidrv0056: i32, __midl__iwiaminidrv0057: *const u8) -> windows_core::Result; @@ -2202,19 +2202,7 @@ impl IWiaMiniDrv_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn drvInitializeWia(this: *mut core::ffi::c_void, __midl__iwiaminidrv0000: *const u8, __midl__iwiaminidrv0001: i32, __midl__iwiaminidrv0002: *mut core::ffi::c_void, __midl__iwiaminidrv0003: *mut core::ffi::c_void, __midl__iwiaminidrv0004: *mut core::ffi::c_void, __midl__iwiaminidrv0005: *mut core::ffi::c_void, __midl__iwiaminidrv0006: *mut *mut core::ffi::c_void, __midl__iwiaminidrv0007: *mut *mut core::ffi::c_void, __midl__iwiaminidrv0008: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaMiniDrv_Impl::drvInitializeWia( - this, - core::mem::transmute_copy(&__midl__iwiaminidrv0000), - core::mem::transmute_copy(&__midl__iwiaminidrv0001), - core::mem::transmute(&__midl__iwiaminidrv0002), - core::mem::transmute(&__midl__iwiaminidrv0003), - windows_core::from_raw_borrowed(&__midl__iwiaminidrv0004), - windows_core::from_raw_borrowed(&__midl__iwiaminidrv0005), - core::mem::transmute_copy(&__midl__iwiaminidrv0006), - core::mem::transmute_copy(&__midl__iwiaminidrv0007), - core::mem::transmute_copy(&__midl__iwiaminidrv0008), - ) - .into() + IWiaMiniDrv_Impl::drvInitializeWia(this, core::mem::transmute_copy(&__midl__iwiaminidrv0000), core::mem::transmute_copy(&__midl__iwiaminidrv0001), core::mem::transmute(&__midl__iwiaminidrv0002), core::mem::transmute(&__midl__iwiaminidrv0003), core::mem::transmute_copy(&__midl__iwiaminidrv0004), core::mem::transmute_copy(&__midl__iwiaminidrv0005), core::mem::transmute_copy(&__midl__iwiaminidrv0006), core::mem::transmute_copy(&__midl__iwiaminidrv0007), core::mem::transmute_copy(&__midl__iwiaminidrv0008)).into() } unsafe extern "system" fn drvAcquireItemData(this: *mut core::ffi::c_void, __midl__iwiaminidrv0009: *const u8, __midl__iwiaminidrv0010: i32, __midl__iwiaminidrv0011: *mut MINIDRV_TRANSFER_CONTEXT, __midl__iwiaminidrv0012: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2499,8 +2487,8 @@ pub struct IWiaPreview_Vtbl { pub Clear: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWiaPreview_Impl: windows_core::IUnknownImpl { - fn GetNewPreview(&self, lflags: i32, pwiaitem2: Option<&IWiaItem2>, pwiatransfercallback: Option<&IWiaTransferCallback>) -> windows_core::Result<()>; - fn UpdatePreview(&self, lflags: i32, pchildwiaitem2: Option<&IWiaItem2>, pwiatransfercallback: Option<&IWiaTransferCallback>) -> windows_core::Result<()>; + fn GetNewPreview(&self, lflags: i32, pwiaitem2: windows_core::Ref<'_, IWiaItem2>, pwiatransfercallback: windows_core::Ref<'_, IWiaTransferCallback>) -> windows_core::Result<()>; + fn UpdatePreview(&self, lflags: i32, pchildwiaitem2: windows_core::Ref<'_, IWiaItem2>, pwiatransfercallback: windows_core::Ref<'_, IWiaTransferCallback>) -> windows_core::Result<()>; fn DetectRegions(&self, lflags: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } @@ -2508,11 +2496,11 @@ impl IWiaPreview_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetNewPreview(this: *mut core::ffi::c_void, lflags: i32, pwiaitem2: *mut core::ffi::c_void, pwiatransfercallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaPreview_Impl::GetNewPreview(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pwiaitem2), windows_core::from_raw_borrowed(&pwiatransfercallback)).into() + IWiaPreview_Impl::GetNewPreview(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pwiaitem2), core::mem::transmute_copy(&pwiatransfercallback)).into() } unsafe extern "system" fn UpdatePreview(this: *mut core::ffi::c_void, lflags: i32, pchildwiaitem2: *mut core::ffi::c_void, pwiatransfercallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaPreview_Impl::UpdatePreview(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pchildwiaitem2), windows_core::from_raw_borrowed(&pwiatransfercallback)).into() + IWiaPreview_Impl::UpdatePreview(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pchildwiaitem2), core::mem::transmute_copy(&pwiatransfercallback)).into() } unsafe extern "system" fn DetectRegions(this: *mut core::ffi::c_void, lflags: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2662,8 +2650,8 @@ pub trait IWiaPropertyStorage_Impl: windows_core::IUnknownImpl { fn Stat(&self, pstatpsstg: *mut super::super::System::Com::StructuredStorage::STATPROPSETSTG) -> windows_core::Result<()>; fn GetPropertyAttributes(&self, cpspec: u32, rgpspec: *const super::super::System::Com::StructuredStorage::PROPSPEC, rgflags: *mut u32, rgpropvar: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn GetCount(&self) -> windows_core::Result; - fn GetPropertyStream(&self, pcompatibilityid: *mut windows_core::GUID, ppistream: *mut Option) -> windows_core::Result<()>; - fn SetPropertyStream(&self, pcompatibilityid: *mut windows_core::GUID, pistream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn GetPropertyStream(&self, pcompatibilityid: *mut windows_core::GUID, ppistream: windows_core::OutRef<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SetPropertyStream(&self, pcompatibilityid: *mut windows_core::GUID, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IWiaPropertyStorage_Vtbl { @@ -2754,7 +2742,7 @@ impl IWiaPropertyStorage_Vtbl { } unsafe extern "system" fn SetPropertyStream(this: *mut core::ffi::c_void, pcompatibilityid: *mut windows_core::GUID, pistream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaPropertyStorage_Impl::SetPropertyStream(this, core::mem::transmute_copy(&pcompatibilityid), windows_core::from_raw_borrowed(&pistream)).into() + IWiaPropertyStorage_Impl::SetPropertyStream(this, core::mem::transmute_copy(&pcompatibilityid), core::mem::transmute_copy(&pistream)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2804,14 +2792,14 @@ pub struct IWiaSegmentationFilter_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWiaSegmentationFilter_Impl: windows_core::IUnknownImpl { - fn DetectRegions(&self, lflags: i32, pinputstream: Option<&super::super::System::Com::IStream>, pwiaitem2: Option<&IWiaItem2>) -> windows_core::Result<()>; + fn DetectRegions(&self, lflags: i32, pinputstream: windows_core::Ref<'_, super::super::System::Com::IStream>, pwiaitem2: windows_core::Ref<'_, IWiaItem2>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IWiaSegmentationFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DetectRegions(this: *mut core::ffi::c_void, lflags: i32, pinputstream: *mut core::ffi::c_void, pwiaitem2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaSegmentationFilter_Impl::DetectRegions(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pinputstream), windows_core::from_raw_borrowed(&pwiaitem2)).into() + IWiaSegmentationFilter_Impl::DetectRegions(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pinputstream), core::mem::transmute_copy(&pwiaitem2)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), DetectRegions: DetectRegions:: } } @@ -2859,8 +2847,8 @@ pub struct IWiaTransfer_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWiaTransfer_Impl: windows_core::IUnknownImpl { - fn Download(&self, lflags: i32, piwiatransfercallback: Option<&IWiaTransferCallback>) -> windows_core::Result<()>; - fn Upload(&self, lflags: i32, psource: Option<&super::super::System::Com::IStream>, piwiatransfercallback: Option<&IWiaTransferCallback>) -> windows_core::Result<()>; + fn Download(&self, lflags: i32, piwiatransfercallback: windows_core::Ref<'_, IWiaTransferCallback>) -> windows_core::Result<()>; + fn Upload(&self, lflags: i32, psource: windows_core::Ref<'_, super::super::System::Com::IStream>, piwiatransfercallback: windows_core::Ref<'_, IWiaTransferCallback>) -> windows_core::Result<()>; fn Cancel(&self) -> windows_core::Result<()>; fn EnumWIA_FORMAT_INFO(&self) -> windows_core::Result; } @@ -2869,11 +2857,11 @@ impl IWiaTransfer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Download(this: *mut core::ffi::c_void, lflags: i32, piwiatransfercallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaTransfer_Impl::Download(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&piwiatransfercallback)).into() + IWiaTransfer_Impl::Download(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&piwiatransfercallback)).into() } unsafe extern "system" fn Upload(this: *mut core::ffi::c_void, lflags: i32, psource: *mut core::ffi::c_void, piwiatransfercallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWiaTransfer_Impl::Upload(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&psource), windows_core::from_raw_borrowed(&piwiatransfercallback)).into() + IWiaTransfer_Impl::Upload(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&psource), core::mem::transmute_copy(&piwiatransfercallback)).into() } unsafe extern "system" fn Cancel(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs index 9dfa845c65..bd2d5a8358 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs @@ -146,7 +146,7 @@ pub struct IEnumPortableDeviceConnectors_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumPortableDeviceConnectors_Impl: windows_core::IUnknownImpl { - fn Next(&self, crequested: u32, pconnectors: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, crequested: u32, pconnectors: windows_core::OutRef<'_, IPortableDeviceConnector>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cconnectors: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -338,7 +338,7 @@ pub struct IMediaRadioManagerNotifySink_Vtbl { pub OnInstanceRadioChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, DEVICE_RADIO_STATE) -> windows_core::HRESULT, } pub trait IMediaRadioManagerNotifySink_Impl: windows_core::IUnknownImpl { - fn OnInstanceAdd(&self, pradioinstance: Option<&IRadioInstance>) -> windows_core::Result<()>; + fn OnInstanceAdd(&self, pradioinstance: windows_core::Ref<'_, IRadioInstance>) -> windows_core::Result<()>; fn OnInstanceRemove(&self, bstrradioinstanceid: &windows_core::BSTR) -> windows_core::Result<()>; fn OnInstanceRadioChange(&self, bstrradioinstanceid: &windows_core::BSTR, radiostate: DEVICE_RADIO_STATE) -> windows_core::Result<()>; } @@ -346,7 +346,7 @@ impl IMediaRadioManagerNotifySink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnInstanceAdd(this: *mut core::ffi::c_void, pradioinstance: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaRadioManagerNotifySink_Impl::OnInstanceAdd(this, windows_core::from_raw_borrowed(&pradioinstance)).into() + IMediaRadioManagerNotifySink_Impl::OnInstanceAdd(this, core::mem::transmute_copy(&pradioinstance)).into() } unsafe extern "system" fn OnInstanceRemove(this: *mut core::ffi::c_void, bstrradioinstanceid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -434,13 +434,13 @@ pub struct IPortableDevice_Vtbl { pub GetPnPDeviceID: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, } pub trait IPortableDevice_Impl: windows_core::IUnknownImpl { - fn Open(&self, pszpnpdeviceid: &windows_core::PCWSTR, pclientinfo: Option<&IPortableDeviceValues>) -> windows_core::Result<()>; - fn SendCommand(&self, dwflags: u32, pparameters: Option<&IPortableDeviceValues>) -> windows_core::Result; + fn Open(&self, pszpnpdeviceid: &windows_core::PCWSTR, pclientinfo: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result<()>; + fn SendCommand(&self, dwflags: u32, pparameters: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result; fn Content(&self) -> windows_core::Result; fn Capabilities(&self) -> windows_core::Result; fn Cancel(&self) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; - fn Advise(&self, dwflags: u32, pcallback: Option<&IPortableDeviceEventCallback>, pparameters: Option<&IPortableDeviceValues>) -> windows_core::Result; + fn Advise(&self, dwflags: u32, pcallback: windows_core::Ref<'_, IPortableDeviceEventCallback>, pparameters: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result; fn Unadvise(&self, pszcookie: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetPnPDeviceID(&self) -> windows_core::Result; } @@ -448,11 +448,11 @@ impl IPortableDevice_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, pszpnpdeviceid: windows_core::PCWSTR, pclientinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDevice_Impl::Open(this, core::mem::transmute(&pszpnpdeviceid), windows_core::from_raw_borrowed(&pclientinfo)).into() + IPortableDevice_Impl::Open(this, core::mem::transmute(&pszpnpdeviceid), core::mem::transmute_copy(&pclientinfo)).into() } unsafe extern "system" fn SendCommand(this: *mut core::ffi::c_void, dwflags: u32, pparameters: *mut core::ffi::c_void, ppresults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDevice_Impl::SendCommand(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pparameters)) { + match IPortableDevice_Impl::SendCommand(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pparameters)) { Ok(ok__) => { ppresults.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -490,7 +490,7 @@ impl IPortableDevice_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, dwflags: u32, pcallback: *mut core::ffi::c_void, pparameters: *mut core::ffi::c_void, ppszcookie: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDevice_Impl::Advise(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pparameters)) { + match IPortableDevice_Impl::Advise(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pparameters)) { Ok(ok__) => { ppszcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -783,9 +783,9 @@ pub struct IPortableDeviceConnector_Vtbl { } #[cfg(feature = "Win32_Devices_Properties")] pub trait IPortableDeviceConnector_Impl: windows_core::IUnknownImpl { - fn Connect(&self, pcallback: Option<&IConnectionRequestCallback>) -> windows_core::Result<()>; - fn Disconnect(&self, pcallback: Option<&IConnectionRequestCallback>) -> windows_core::Result<()>; - fn Cancel(&self, pcallback: Option<&IConnectionRequestCallback>) -> windows_core::Result<()>; + fn Connect(&self, pcallback: windows_core::Ref<'_, IConnectionRequestCallback>) -> windows_core::Result<()>; + fn Disconnect(&self, pcallback: windows_core::Ref<'_, IConnectionRequestCallback>) -> windows_core::Result<()>; + fn Cancel(&self, pcallback: windows_core::Ref<'_, IConnectionRequestCallback>) -> windows_core::Result<()>; fn GetProperty(&self, ppropertykey: *const super::super::Foundation::DEVPROPKEY, ppropertytype: *mut super::Properties::DEVPROPTYPE, ppdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>; fn SetProperty(&self, ppropertykey: *const super::super::Foundation::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, pdata: *const u8, cbdata: u32) -> windows_core::Result<()>; fn GetPnPID(&self) -> windows_core::Result; @@ -795,15 +795,15 @@ impl IPortableDeviceConnector_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceConnector_Impl::Connect(this, windows_core::from_raw_borrowed(&pcallback)).into() + IPortableDeviceConnector_Impl::Connect(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceConnector_Impl::Disconnect(this, windows_core::from_raw_borrowed(&pcallback)).into() + IPortableDeviceConnector_Impl::Disconnect(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn Cancel(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceConnector_Impl::Cancel(this, windows_core::from_raw_borrowed(&pcallback)).into() + IPortableDeviceConnector_Impl::Cancel(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn GetProperty(this: *mut core::ffi::c_void, ppropertykey: *const super::super::Foundation::DEVPROPKEY, ppropertytype: *mut super::Properties::DEVPROPTYPE, ppdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -921,23 +921,23 @@ pub struct IPortableDeviceContent_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IPortableDeviceContent_Impl: windows_core::IUnknownImpl { - fn EnumObjects(&self, dwflags: u32, pszparentobjectid: &windows_core::PCWSTR, pfilter: Option<&IPortableDeviceValues>) -> windows_core::Result; + fn EnumObjects(&self, dwflags: u32, pszparentobjectid: &windows_core::PCWSTR, pfilter: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result; fn Properties(&self) -> windows_core::Result; fn Transfer(&self) -> windows_core::Result; - fn CreateObjectWithPropertiesOnly(&self, pvalues: Option<&IPortableDeviceValues>, ppszobjectid: *mut windows_core::PWSTR) -> windows_core::Result<()>; - fn CreateObjectWithPropertiesAndData(&self, pvalues: Option<&IPortableDeviceValues>, ppdata: *mut Option, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut windows_core::PWSTR) -> windows_core::Result<()>; - fn Delete(&self, dwoptions: u32, pobjectids: Option<&IPortableDevicePropVariantCollection>, ppresults: *mut Option) -> windows_core::Result<()>; - fn GetObjectIDsFromPersistentUniqueIDs(&self, ppersistentuniqueids: Option<&IPortableDevicePropVariantCollection>) -> windows_core::Result; + fn CreateObjectWithPropertiesOnly(&self, pvalues: windows_core::Ref<'_, IPortableDeviceValues>, ppszobjectid: *mut windows_core::PWSTR) -> windows_core::Result<()>; + fn CreateObjectWithPropertiesAndData(&self, pvalues: windows_core::Ref<'_, IPortableDeviceValues>, ppdata: windows_core::OutRef<'_, super::super::System::Com::IStream>, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut windows_core::PWSTR) -> windows_core::Result<()>; + fn Delete(&self, dwoptions: u32, pobjectids: windows_core::Ref<'_, IPortableDevicePropVariantCollection>, ppresults: windows_core::OutRef<'_, IPortableDevicePropVariantCollection>) -> windows_core::Result<()>; + fn GetObjectIDsFromPersistentUniqueIDs(&self, ppersistentuniqueids: windows_core::Ref<'_, IPortableDevicePropVariantCollection>) -> windows_core::Result; fn Cancel(&self) -> windows_core::Result<()>; - fn Move(&self, pobjectids: Option<&IPortableDevicePropVariantCollection>, pszdestinationfolderobjectid: &windows_core::PCWSTR, ppresults: *mut Option) -> windows_core::Result<()>; - fn Copy(&self, pobjectids: Option<&IPortableDevicePropVariantCollection>, pszdestinationfolderobjectid: &windows_core::PCWSTR, ppresults: *mut Option) -> windows_core::Result<()>; + fn Move(&self, pobjectids: windows_core::Ref<'_, IPortableDevicePropVariantCollection>, pszdestinationfolderobjectid: &windows_core::PCWSTR, ppresults: windows_core::OutRef<'_, IPortableDevicePropVariantCollection>) -> windows_core::Result<()>; + fn Copy(&self, pobjectids: windows_core::Ref<'_, IPortableDevicePropVariantCollection>, pszdestinationfolderobjectid: &windows_core::PCWSTR, ppresults: windows_core::OutRef<'_, IPortableDevicePropVariantCollection>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IPortableDeviceContent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EnumObjects(this: *mut core::ffi::c_void, dwflags: u32, pszparentobjectid: windows_core::PCWSTR, pfilter: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDeviceContent_Impl::EnumObjects(this, core::mem::transmute_copy(&dwflags), core::mem::transmute(&pszparentobjectid), windows_core::from_raw_borrowed(&pfilter)) { + match IPortableDeviceContent_Impl::EnumObjects(this, core::mem::transmute_copy(&dwflags), core::mem::transmute(&pszparentobjectid), core::mem::transmute_copy(&pfilter)) { Ok(ok__) => { ppenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -967,19 +967,19 @@ impl IPortableDeviceContent_Vtbl { } unsafe extern "system" fn CreateObjectWithPropertiesOnly(this: *mut core::ffi::c_void, pvalues: *mut core::ffi::c_void, ppszobjectid: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceContent_Impl::CreateObjectWithPropertiesOnly(this, windows_core::from_raw_borrowed(&pvalues), core::mem::transmute_copy(&ppszobjectid)).into() + IPortableDeviceContent_Impl::CreateObjectWithPropertiesOnly(this, core::mem::transmute_copy(&pvalues), core::mem::transmute_copy(&ppszobjectid)).into() } unsafe extern "system" fn CreateObjectWithPropertiesAndData(this: *mut core::ffi::c_void, pvalues: *mut core::ffi::c_void, ppdata: *mut *mut core::ffi::c_void, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceContent_Impl::CreateObjectWithPropertiesAndData(this, windows_core::from_raw_borrowed(&pvalues), core::mem::transmute_copy(&ppdata), core::mem::transmute_copy(&pdwoptimalwritebuffersize), core::mem::transmute_copy(&ppszcookie)).into() + IPortableDeviceContent_Impl::CreateObjectWithPropertiesAndData(this, core::mem::transmute_copy(&pvalues), core::mem::transmute_copy(&ppdata), core::mem::transmute_copy(&pdwoptimalwritebuffersize), core::mem::transmute_copy(&ppszcookie)).into() } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, dwoptions: u32, pobjectids: *mut core::ffi::c_void, ppresults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceContent_Impl::Delete(this, core::mem::transmute_copy(&dwoptions), windows_core::from_raw_borrowed(&pobjectids), core::mem::transmute_copy(&ppresults)).into() + IPortableDeviceContent_Impl::Delete(this, core::mem::transmute_copy(&dwoptions), core::mem::transmute_copy(&pobjectids), core::mem::transmute_copy(&ppresults)).into() } unsafe extern "system" fn GetObjectIDsFromPersistentUniqueIDs(this: *mut core::ffi::c_void, ppersistentuniqueids: *mut core::ffi::c_void, ppobjectids: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDeviceContent_Impl::GetObjectIDsFromPersistentUniqueIDs(this, windows_core::from_raw_borrowed(&ppersistentuniqueids)) { + match IPortableDeviceContent_Impl::GetObjectIDsFromPersistentUniqueIDs(this, core::mem::transmute_copy(&ppersistentuniqueids)) { Ok(ok__) => { ppobjectids.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -993,11 +993,11 @@ impl IPortableDeviceContent_Vtbl { } unsafe extern "system" fn Move(this: *mut core::ffi::c_void, pobjectids: *mut core::ffi::c_void, pszdestinationfolderobjectid: windows_core::PCWSTR, ppresults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceContent_Impl::Move(this, windows_core::from_raw_borrowed(&pobjectids), core::mem::transmute(&pszdestinationfolderobjectid), core::mem::transmute_copy(&ppresults)).into() + IPortableDeviceContent_Impl::Move(this, core::mem::transmute_copy(&pobjectids), core::mem::transmute(&pszdestinationfolderobjectid), core::mem::transmute_copy(&ppresults)).into() } unsafe extern "system" fn Copy(this: *mut core::ffi::c_void, pobjectids: *mut core::ffi::c_void, pszdestinationfolderobjectid: windows_core::PCWSTR, ppresults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceContent_Impl::Copy(this, windows_core::from_raw_borrowed(&pobjectids), core::mem::transmute(&pszdestinationfolderobjectid), core::mem::transmute_copy(&ppresults)).into() + IPortableDeviceContent_Impl::Copy(this, core::mem::transmute_copy(&pobjectids), core::mem::transmute(&pszdestinationfolderobjectid), core::mem::transmute_copy(&ppresults)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1047,14 +1047,14 @@ pub struct IPortableDeviceContent2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IPortableDeviceContent2_Impl: IPortableDeviceContent_Impl { - fn UpdateObjectWithPropertiesAndData(&self, pszobjectid: &windows_core::PCWSTR, pproperties: Option<&IPortableDeviceValues>, ppdata: *mut Option, pdwoptimalwritebuffersize: *mut u32) -> windows_core::Result<()>; + fn UpdateObjectWithPropertiesAndData(&self, pszobjectid: &windows_core::PCWSTR, pproperties: windows_core::Ref<'_, IPortableDeviceValues>, ppdata: windows_core::OutRef<'_, super::super::System::Com::IStream>, pdwoptimalwritebuffersize: *mut u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IPortableDeviceContent2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UpdateObjectWithPropertiesAndData(this: *mut core::ffi::c_void, pszobjectid: windows_core::PCWSTR, pproperties: *mut core::ffi::c_void, ppdata: *mut *mut core::ffi::c_void, pdwoptimalwritebuffersize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceContent2_Impl::UpdateObjectWithPropertiesAndData(this, core::mem::transmute(&pszobjectid), windows_core::from_raw_borrowed(&pproperties), core::mem::transmute_copy(&ppdata), core::mem::transmute_copy(&pdwoptimalwritebuffersize)).into() + IPortableDeviceContent2_Impl::UpdateObjectWithPropertiesAndData(this, core::mem::transmute(&pszobjectid), core::mem::transmute_copy(&pproperties), core::mem::transmute_copy(&ppdata), core::mem::transmute_copy(&pdwoptimalwritebuffersize)).into() } Self { base__: IPortableDeviceContent_Vtbl::new::(), @@ -1190,13 +1190,13 @@ pub struct IPortableDeviceEventCallback_Vtbl { pub OnEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPortableDeviceEventCallback_Impl: windows_core::IUnknownImpl { - fn OnEvent(&self, peventparameters: Option<&IPortableDeviceValues>) -> windows_core::Result<()>; + fn OnEvent(&self, peventparameters: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result<()>; } impl IPortableDeviceEventCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnEvent(this: *mut core::ffi::c_void, peventparameters: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceEventCallback_Impl::OnEvent(this, windows_core::from_raw_borrowed(&peventparameters)).into() + IPortableDeviceEventCallback_Impl::OnEvent(this, core::mem::transmute_copy(&peventparameters)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnEvent: OnEvent:: } } @@ -1546,9 +1546,9 @@ pub struct IPortableDeviceProperties_Vtbl { pub trait IPortableDeviceProperties_Impl: windows_core::IUnknownImpl { fn GetSupportedProperties(&self, pszobjectid: &windows_core::PCWSTR) -> windows_core::Result; fn GetPropertyAttributes(&self, pszobjectid: &windows_core::PCWSTR, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; - fn GetValues(&self, pszobjectid: &windows_core::PCWSTR, pkeys: Option<&IPortableDeviceKeyCollection>) -> windows_core::Result; - fn SetValues(&self, pszobjectid: &windows_core::PCWSTR, pvalues: Option<&IPortableDeviceValues>) -> windows_core::Result; - fn Delete(&self, pszobjectid: &windows_core::PCWSTR, pkeys: Option<&IPortableDeviceKeyCollection>) -> windows_core::Result<()>; + fn GetValues(&self, pszobjectid: &windows_core::PCWSTR, pkeys: windows_core::Ref<'_, IPortableDeviceKeyCollection>) -> windows_core::Result; + fn SetValues(&self, pszobjectid: &windows_core::PCWSTR, pvalues: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result; + fn Delete(&self, pszobjectid: &windows_core::PCWSTR, pkeys: windows_core::Ref<'_, IPortableDeviceKeyCollection>) -> windows_core::Result<()>; fn Cancel(&self) -> windows_core::Result<()>; } impl IPortableDeviceProperties_Vtbl { @@ -1575,7 +1575,7 @@ impl IPortableDeviceProperties_Vtbl { } unsafe extern "system" fn GetValues(this: *mut core::ffi::c_void, pszobjectid: windows_core::PCWSTR, pkeys: *mut core::ffi::c_void, ppvalues: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDeviceProperties_Impl::GetValues(this, core::mem::transmute(&pszobjectid), windows_core::from_raw_borrowed(&pkeys)) { + match IPortableDeviceProperties_Impl::GetValues(this, core::mem::transmute(&pszobjectid), core::mem::transmute_copy(&pkeys)) { Ok(ok__) => { ppvalues.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1585,7 +1585,7 @@ impl IPortableDeviceProperties_Vtbl { } unsafe extern "system" fn SetValues(this: *mut core::ffi::c_void, pszobjectid: windows_core::PCWSTR, pvalues: *mut core::ffi::c_void, ppresults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDeviceProperties_Impl::SetValues(this, core::mem::transmute(&pszobjectid), windows_core::from_raw_borrowed(&pvalues)) { + match IPortableDeviceProperties_Impl::SetValues(this, core::mem::transmute(&pszobjectid), core::mem::transmute_copy(&pvalues)) { Ok(ok__) => { ppresults.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1595,7 +1595,7 @@ impl IPortableDeviceProperties_Vtbl { } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, pszobjectid: windows_core::PCWSTR, pkeys: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceProperties_Impl::Delete(this, core::mem::transmute(&pszobjectid), windows_core::from_raw_borrowed(&pkeys)).into() + IPortableDeviceProperties_Impl::Delete(this, core::mem::transmute(&pszobjectid), core::mem::transmute_copy(&pkeys)).into() } unsafe extern "system" fn Cancel(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1662,9 +1662,9 @@ pub struct IPortableDevicePropertiesBulk_Vtbl { pub Cancel: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait IPortableDevicePropertiesBulk_Impl: windows_core::IUnknownImpl { - fn QueueGetValuesByObjectList(&self, pobjectids: Option<&IPortableDevicePropVariantCollection>, pkeys: Option<&IPortableDeviceKeyCollection>, pcallback: Option<&IPortableDevicePropertiesBulkCallback>) -> windows_core::Result; - fn QueueGetValuesByObjectFormat(&self, pguidobjectformat: *const windows_core::GUID, pszparentobjectid: &windows_core::PCWSTR, dwdepth: u32, pkeys: Option<&IPortableDeviceKeyCollection>, pcallback: Option<&IPortableDevicePropertiesBulkCallback>) -> windows_core::Result; - fn QueueSetValuesByObjectList(&self, pobjectvalues: Option<&IPortableDeviceValuesCollection>, pcallback: Option<&IPortableDevicePropertiesBulkCallback>) -> windows_core::Result; + fn QueueGetValuesByObjectList(&self, pobjectids: windows_core::Ref<'_, IPortableDevicePropVariantCollection>, pkeys: windows_core::Ref<'_, IPortableDeviceKeyCollection>, pcallback: windows_core::Ref<'_, IPortableDevicePropertiesBulkCallback>) -> windows_core::Result; + fn QueueGetValuesByObjectFormat(&self, pguidobjectformat: *const windows_core::GUID, pszparentobjectid: &windows_core::PCWSTR, dwdepth: u32, pkeys: windows_core::Ref<'_, IPortableDeviceKeyCollection>, pcallback: windows_core::Ref<'_, IPortableDevicePropertiesBulkCallback>) -> windows_core::Result; + fn QueueSetValuesByObjectList(&self, pobjectvalues: windows_core::Ref<'_, IPortableDeviceValuesCollection>, pcallback: windows_core::Ref<'_, IPortableDevicePropertiesBulkCallback>) -> windows_core::Result; fn Start(&self, pcontext: *const windows_core::GUID) -> windows_core::Result<()>; fn Cancel(&self, pcontext: *const windows_core::GUID) -> windows_core::Result<()>; } @@ -1672,7 +1672,7 @@ impl IPortableDevicePropertiesBulk_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueueGetValuesByObjectList(this: *mut core::ffi::c_void, pobjectids: *mut core::ffi::c_void, pkeys: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pcontext: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDevicePropertiesBulk_Impl::QueueGetValuesByObjectList(this, windows_core::from_raw_borrowed(&pobjectids), windows_core::from_raw_borrowed(&pkeys), windows_core::from_raw_borrowed(&pcallback)) { + match IPortableDevicePropertiesBulk_Impl::QueueGetValuesByObjectList(this, core::mem::transmute_copy(&pobjectids), core::mem::transmute_copy(&pkeys), core::mem::transmute_copy(&pcallback)) { Ok(ok__) => { pcontext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1682,7 +1682,7 @@ impl IPortableDevicePropertiesBulk_Vtbl { } unsafe extern "system" fn QueueGetValuesByObjectFormat(this: *mut core::ffi::c_void, pguidobjectformat: *const windows_core::GUID, pszparentobjectid: windows_core::PCWSTR, dwdepth: u32, pkeys: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pcontext: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDevicePropertiesBulk_Impl::QueueGetValuesByObjectFormat(this, core::mem::transmute_copy(&pguidobjectformat), core::mem::transmute(&pszparentobjectid), core::mem::transmute_copy(&dwdepth), windows_core::from_raw_borrowed(&pkeys), windows_core::from_raw_borrowed(&pcallback)) { + match IPortableDevicePropertiesBulk_Impl::QueueGetValuesByObjectFormat(this, core::mem::transmute_copy(&pguidobjectformat), core::mem::transmute(&pszparentobjectid), core::mem::transmute_copy(&dwdepth), core::mem::transmute_copy(&pkeys), core::mem::transmute_copy(&pcallback)) { Ok(ok__) => { pcontext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1692,7 +1692,7 @@ impl IPortableDevicePropertiesBulk_Vtbl { } unsafe extern "system" fn QueueSetValuesByObjectList(this: *mut core::ffi::c_void, pobjectvalues: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pcontext: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDevicePropertiesBulk_Impl::QueueSetValuesByObjectList(this, windows_core::from_raw_borrowed(&pobjectvalues), windows_core::from_raw_borrowed(&pcallback)) { + match IPortableDevicePropertiesBulk_Impl::QueueSetValuesByObjectList(this, core::mem::transmute_copy(&pobjectvalues), core::mem::transmute_copy(&pcallback)) { Ok(ok__) => { pcontext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1747,7 +1747,7 @@ pub struct IPortableDevicePropertiesBulkCallback_Vtbl { } pub trait IPortableDevicePropertiesBulkCallback_Impl: windows_core::IUnknownImpl { fn OnStart(&self, pcontext: *const windows_core::GUID) -> windows_core::Result<()>; - fn OnProgress(&self, pcontext: *const windows_core::GUID, presults: Option<&IPortableDeviceValuesCollection>) -> windows_core::Result<()>; + fn OnProgress(&self, pcontext: *const windows_core::GUID, presults: windows_core::Ref<'_, IPortableDeviceValuesCollection>) -> windows_core::Result<()>; fn OnEnd(&self, pcontext: *const windows_core::GUID, hrstatus: windows_core::HRESULT) -> windows_core::Result<()>; } impl IPortableDevicePropertiesBulkCallback_Vtbl { @@ -1758,7 +1758,7 @@ impl IPortableDevicePropertiesBulkCallback_Vtbl { } unsafe extern "system" fn OnProgress(this: *mut core::ffi::c_void, pcontext: *const windows_core::GUID, presults: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDevicePropertiesBulkCallback_Impl::OnProgress(this, core::mem::transmute_copy(&pcontext), windows_core::from_raw_borrowed(&presults)).into() + IPortableDevicePropertiesBulkCallback_Impl::OnProgress(this, core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&presults)).into() } unsafe extern "system" fn OnEnd(this: *mut core::ffi::c_void, pcontext: *const windows_core::GUID, hrstatus: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1838,10 +1838,10 @@ pub struct IPortableDeviceResources_Vtbl { pub trait IPortableDeviceResources_Impl: windows_core::IUnknownImpl { fn GetSupportedResources(&self, pszobjectid: &windows_core::PCWSTR) -> windows_core::Result; fn GetResourceAttributes(&self, pszobjectid: &windows_core::PCWSTR, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; - fn GetStream(&self, pszobjectid: &windows_core::PCWSTR, key: *const super::super::Foundation::PROPERTYKEY, dwmode: u32, pdwoptimalbuffersize: *mut u32, ppstream: *mut Option) -> windows_core::Result<()>; - fn Delete(&self, pszobjectid: &windows_core::PCWSTR, pkeys: Option<&IPortableDeviceKeyCollection>) -> windows_core::Result<()>; + fn GetStream(&self, pszobjectid: &windows_core::PCWSTR, key: *const super::super::Foundation::PROPERTYKEY, dwmode: u32, pdwoptimalbuffersize: *mut u32, ppstream: windows_core::OutRef<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Delete(&self, pszobjectid: &windows_core::PCWSTR, pkeys: windows_core::Ref<'_, IPortableDeviceKeyCollection>) -> windows_core::Result<()>; fn Cancel(&self) -> windows_core::Result<()>; - fn CreateResource(&self, presourceattributes: Option<&IPortableDeviceValues>, ppdata: *mut Option, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut windows_core::PWSTR) -> windows_core::Result<()>; + fn CreateResource(&self, presourceattributes: windows_core::Ref<'_, IPortableDeviceValues>, ppdata: windows_core::OutRef<'_, super::super::System::Com::IStream>, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut windows_core::PWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IPortableDeviceResources_Vtbl { @@ -1872,7 +1872,7 @@ impl IPortableDeviceResources_Vtbl { } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, pszobjectid: windows_core::PCWSTR, pkeys: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceResources_Impl::Delete(this, core::mem::transmute(&pszobjectid), windows_core::from_raw_borrowed(&pkeys)).into() + IPortableDeviceResources_Impl::Delete(this, core::mem::transmute(&pszobjectid), core::mem::transmute_copy(&pkeys)).into() } unsafe extern "system" fn Cancel(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1880,7 +1880,7 @@ impl IPortableDeviceResources_Vtbl { } unsafe extern "system" fn CreateResource(this: *mut core::ffi::c_void, presourceattributes: *mut core::ffi::c_void, ppdata: *mut *mut core::ffi::c_void, pdwoptimalwritebuffersize: *mut u32, ppszcookie: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceResources_Impl::CreateResource(this, windows_core::from_raw_borrowed(&presourceattributes), core::mem::transmute_copy(&ppdata), core::mem::transmute_copy(&pdwoptimalwritebuffersize), core::mem::transmute_copy(&ppszcookie)).into() + IPortableDeviceResources_Impl::CreateResource(this, core::mem::transmute_copy(&presourceattributes), core::mem::transmute_copy(&ppdata), core::mem::transmute_copy(&pdwoptimalwritebuffersize), core::mem::transmute_copy(&ppszcookie)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1972,7 +1972,7 @@ pub struct IPortableDeviceService_Vtbl { pub SendCommand: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPortableDeviceService_Impl: windows_core::IUnknownImpl { - fn Open(&self, pszpnpserviceid: &windows_core::PCWSTR, pclientinfo: Option<&IPortableDeviceValues>) -> windows_core::Result<()>; + fn Open(&self, pszpnpserviceid: &windows_core::PCWSTR, pclientinfo: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result<()>; fn Capabilities(&self) -> windows_core::Result; fn Content(&self) -> windows_core::Result; fn Methods(&self) -> windows_core::Result; @@ -1980,15 +1980,15 @@ pub trait IPortableDeviceService_Impl: windows_core::IUnknownImpl { fn Close(&self) -> windows_core::Result<()>; fn GetServiceObjectID(&self) -> windows_core::Result; fn GetPnPServiceID(&self) -> windows_core::Result; - fn Advise(&self, dwflags: u32, pcallback: Option<&IPortableDeviceEventCallback>, pparameters: Option<&IPortableDeviceValues>) -> windows_core::Result; + fn Advise(&self, dwflags: u32, pcallback: windows_core::Ref<'_, IPortableDeviceEventCallback>, pparameters: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result; fn Unadvise(&self, pszcookie: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SendCommand(&self, dwflags: u32, pparameters: Option<&IPortableDeviceValues>) -> windows_core::Result; + fn SendCommand(&self, dwflags: u32, pparameters: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result; } impl IPortableDeviceService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, pszpnpserviceid: windows_core::PCWSTR, pclientinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceService_Impl::Open(this, core::mem::transmute(&pszpnpserviceid), windows_core::from_raw_borrowed(&pclientinfo)).into() + IPortableDeviceService_Impl::Open(this, core::mem::transmute(&pszpnpserviceid), core::mem::transmute_copy(&pclientinfo)).into() } unsafe extern "system" fn Capabilities(this: *mut core::ffi::c_void, ppcapabilities: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2050,7 +2050,7 @@ impl IPortableDeviceService_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, dwflags: u32, pcallback: *mut core::ffi::c_void, pparameters: *mut core::ffi::c_void, ppszcookie: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDeviceService_Impl::Advise(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pparameters)) { + match IPortableDeviceService_Impl::Advise(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pparameters)) { Ok(ok__) => { ppszcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2064,7 +2064,7 @@ impl IPortableDeviceService_Vtbl { } unsafe extern "system" fn SendCommand(this: *mut core::ffi::c_void, dwflags: u32, pparameters: *mut core::ffi::c_void, ppresults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPortableDeviceService_Impl::SendCommand(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pparameters)) { + match IPortableDeviceService_Impl::SendCommand(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pparameters)) { Ok(ok__) => { ppresults.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2114,14 +2114,14 @@ pub struct IPortableDeviceServiceActivation_Vtbl { pub CancelOpenAsync: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPortableDeviceServiceActivation_Impl: windows_core::IUnknownImpl { - fn OpenAsync(&self, pszpnpserviceid: &windows_core::PCWSTR, pclientinfo: Option<&IPortableDeviceValues>, pcallback: Option<&IPortableDeviceServiceOpenCallback>) -> windows_core::Result<()>; + fn OpenAsync(&self, pszpnpserviceid: &windows_core::PCWSTR, pclientinfo: windows_core::Ref<'_, IPortableDeviceValues>, pcallback: windows_core::Ref<'_, IPortableDeviceServiceOpenCallback>) -> windows_core::Result<()>; fn CancelOpenAsync(&self) -> windows_core::Result<()>; } impl IPortableDeviceServiceActivation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OpenAsync(this: *mut core::ffi::c_void, pszpnpserviceid: windows_core::PCWSTR, pclientinfo: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceServiceActivation_Impl::OpenAsync(this, core::mem::transmute(&pszpnpserviceid), windows_core::from_raw_borrowed(&pclientinfo), windows_core::from_raw_borrowed(&pcallback)).into() + IPortableDeviceServiceActivation_Impl::OpenAsync(this, core::mem::transmute(&pszpnpserviceid), core::mem::transmute_copy(&pclientinfo), core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn CancelOpenAsync(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2494,13 +2494,13 @@ pub struct IPortableDeviceServiceMethodCallback_Vtbl { pub OnComplete: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPortableDeviceServiceMethodCallback_Impl: windows_core::IUnknownImpl { - fn OnComplete(&self, hrstatus: windows_core::HRESULT, presults: Option<&IPortableDeviceValues>) -> windows_core::Result<()>; + fn OnComplete(&self, hrstatus: windows_core::HRESULT, presults: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result<()>; } impl IPortableDeviceServiceMethodCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnComplete(this: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT, presults: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceServiceMethodCallback_Impl::OnComplete(this, core::mem::transmute_copy(&hrstatus), windows_core::from_raw_borrowed(&presults)).into() + IPortableDeviceServiceMethodCallback_Impl::OnComplete(this, core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&presults)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnComplete: OnComplete:: } } @@ -2540,23 +2540,23 @@ pub struct IPortableDeviceServiceMethods_Vtbl { pub Cancel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPortableDeviceServiceMethods_Impl: windows_core::IUnknownImpl { - fn Invoke(&self, method: *const windows_core::GUID, pparameters: Option<&IPortableDeviceValues>, ppresults: *mut Option) -> windows_core::Result<()>; - fn InvokeAsync(&self, method: *const windows_core::GUID, pparameters: Option<&IPortableDeviceValues>, pcallback: Option<&IPortableDeviceServiceMethodCallback>) -> windows_core::Result<()>; - fn Cancel(&self, pcallback: Option<&IPortableDeviceServiceMethodCallback>) -> windows_core::Result<()>; + fn Invoke(&self, method: *const windows_core::GUID, pparameters: windows_core::Ref<'_, IPortableDeviceValues>, ppresults: windows_core::OutRef<'_, IPortableDeviceValues>) -> windows_core::Result<()>; + fn InvokeAsync(&self, method: *const windows_core::GUID, pparameters: windows_core::Ref<'_, IPortableDeviceValues>, pcallback: windows_core::Ref<'_, IPortableDeviceServiceMethodCallback>) -> windows_core::Result<()>; + fn Cancel(&self, pcallback: windows_core::Ref<'_, IPortableDeviceServiceMethodCallback>) -> windows_core::Result<()>; } impl IPortableDeviceServiceMethods_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, method: *const windows_core::GUID, pparameters: *mut core::ffi::c_void, ppresults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceServiceMethods_Impl::Invoke(this, core::mem::transmute_copy(&method), windows_core::from_raw_borrowed(&pparameters), core::mem::transmute_copy(&ppresults)).into() + IPortableDeviceServiceMethods_Impl::Invoke(this, core::mem::transmute_copy(&method), core::mem::transmute_copy(&pparameters), core::mem::transmute_copy(&ppresults)).into() } unsafe extern "system" fn InvokeAsync(this: *mut core::ffi::c_void, method: *const windows_core::GUID, pparameters: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceServiceMethods_Impl::InvokeAsync(this, core::mem::transmute_copy(&method), windows_core::from_raw_borrowed(&pparameters), windows_core::from_raw_borrowed(&pcallback)).into() + IPortableDeviceServiceMethods_Impl::InvokeAsync(this, core::mem::transmute_copy(&method), core::mem::transmute_copy(&pparameters), core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn Cancel(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceServiceMethods_Impl::Cancel(this, windows_core::from_raw_borrowed(&pcallback)).into() + IPortableDeviceServiceMethods_Impl::Cancel(this, core::mem::transmute_copy(&pcallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2886,23 +2886,23 @@ pub trait IPortableDeviceValues_Impl: windows_core::IUnknownImpl { fn GetKeyValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *mut super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()>; fn SetBoolValue(&self, key: *const super::super::Foundation::PROPERTYKEY, value: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetBoolValue(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; - fn SetIUnknownValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetIUnknownValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetIUnknownValue(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; fn SetGuidValue(&self, key: *const super::super::Foundation::PROPERTYKEY, value: *const windows_core::GUID) -> windows_core::Result<()>; fn GetGuidValue(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; fn SetBufferValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *const u8, cbvalue: u32) -> windows_core::Result<()>; fn GetBufferValue(&self, key: *const super::super::Foundation::PROPERTYKEY, ppvalue: *mut *mut u8, pcbvalue: *mut u32) -> windows_core::Result<()>; - fn SetIPortableDeviceValuesValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: Option<&IPortableDeviceValues>) -> windows_core::Result<()>; + fn SetIPortableDeviceValuesValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result<()>; fn GetIPortableDeviceValuesValue(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; - fn SetIPortableDevicePropVariantCollectionValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: Option<&IPortableDevicePropVariantCollection>) -> windows_core::Result<()>; + fn SetIPortableDevicePropVariantCollectionValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: windows_core::Ref<'_, IPortableDevicePropVariantCollection>) -> windows_core::Result<()>; fn GetIPortableDevicePropVariantCollectionValue(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; - fn SetIPortableDeviceKeyCollectionValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: Option<&IPortableDeviceKeyCollection>) -> windows_core::Result<()>; + fn SetIPortableDeviceKeyCollectionValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: windows_core::Ref<'_, IPortableDeviceKeyCollection>) -> windows_core::Result<()>; fn GetIPortableDeviceKeyCollectionValue(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; - fn SetIPortableDeviceValuesCollectionValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: Option<&IPortableDeviceValuesCollection>) -> windows_core::Result<()>; + fn SetIPortableDeviceValuesCollectionValue(&self, key: *const super::super::Foundation::PROPERTYKEY, pvalue: windows_core::Ref<'_, IPortableDeviceValuesCollection>) -> windows_core::Result<()>; fn GetIPortableDeviceValuesCollectionValue(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; fn RemoveValue(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()>; - fn CopyValuesFromPropertyStore(&self, pstore: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; - fn CopyValuesToPropertyStore(&self, pstore: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn CopyValuesFromPropertyStore(&self, pstore: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn CopyValuesToPropertyStore(&self, pstore: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] @@ -3052,7 +3052,7 @@ impl IPortableDeviceValues_Vtbl { } unsafe extern "system" fn SetIUnknownValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceValues_Impl::SetIUnknownValue(this, core::mem::transmute_copy(&key), windows_core::from_raw_borrowed(&pvalue)).into() + IPortableDeviceValues_Impl::SetIUnknownValue(this, core::mem::transmute_copy(&key), core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn GetIUnknownValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3088,7 +3088,7 @@ impl IPortableDeviceValues_Vtbl { } unsafe extern "system" fn SetIPortableDeviceValuesValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceValues_Impl::SetIPortableDeviceValuesValue(this, core::mem::transmute_copy(&key), windows_core::from_raw_borrowed(&pvalue)).into() + IPortableDeviceValues_Impl::SetIPortableDeviceValuesValue(this, core::mem::transmute_copy(&key), core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn GetIPortableDeviceValuesValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3102,7 +3102,7 @@ impl IPortableDeviceValues_Vtbl { } unsafe extern "system" fn SetIPortableDevicePropVariantCollectionValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceValues_Impl::SetIPortableDevicePropVariantCollectionValue(this, core::mem::transmute_copy(&key), windows_core::from_raw_borrowed(&pvalue)).into() + IPortableDeviceValues_Impl::SetIPortableDevicePropVariantCollectionValue(this, core::mem::transmute_copy(&key), core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn GetIPortableDevicePropVariantCollectionValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3116,7 +3116,7 @@ impl IPortableDeviceValues_Vtbl { } unsafe extern "system" fn SetIPortableDeviceKeyCollectionValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceValues_Impl::SetIPortableDeviceKeyCollectionValue(this, core::mem::transmute_copy(&key), windows_core::from_raw_borrowed(&pvalue)).into() + IPortableDeviceValues_Impl::SetIPortableDeviceKeyCollectionValue(this, core::mem::transmute_copy(&key), core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn GetIPortableDeviceKeyCollectionValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3130,7 +3130,7 @@ impl IPortableDeviceValues_Vtbl { } unsafe extern "system" fn SetIPortableDeviceValuesCollectionValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceValues_Impl::SetIPortableDeviceValuesCollectionValue(this, core::mem::transmute_copy(&key), windows_core::from_raw_borrowed(&pvalue)).into() + IPortableDeviceValues_Impl::SetIPortableDeviceValuesCollectionValue(this, core::mem::transmute_copy(&key), core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn GetIPortableDeviceValuesCollectionValue(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3148,11 +3148,11 @@ impl IPortableDeviceValues_Vtbl { } unsafe extern "system" fn CopyValuesFromPropertyStore(this: *mut core::ffi::c_void, pstore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceValues_Impl::CopyValuesFromPropertyStore(this, windows_core::from_raw_borrowed(&pstore)).into() + IPortableDeviceValues_Impl::CopyValuesFromPropertyStore(this, core::mem::transmute_copy(&pstore)).into() } unsafe extern "system" fn CopyValuesToPropertyStore(this: *mut core::ffi::c_void, pstore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceValues_Impl::CopyValuesToPropertyStore(this, windows_core::from_raw_borrowed(&pstore)).into() + IPortableDeviceValues_Impl::CopyValuesToPropertyStore(this, core::mem::transmute_copy(&pstore)).into() } unsafe extern "system" fn Clear(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3243,7 +3243,7 @@ pub struct IPortableDeviceValuesCollection_Vtbl { pub trait IPortableDeviceValuesCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self, pcelems: *const u32) -> windows_core::Result<()>; fn GetAt(&self, dwindex: u32) -> windows_core::Result; - fn Add(&self, pvalues: Option<&IPortableDeviceValues>) -> windows_core::Result<()>; + fn Add(&self, pvalues: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn RemoveAt(&self, dwindex: u32) -> windows_core::Result<()>; } @@ -3265,7 +3265,7 @@ impl IPortableDeviceValuesCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pvalues: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceValuesCollection_Impl::Add(this, windows_core::from_raw_borrowed(&pvalues)).into() + IPortableDeviceValuesCollection_Impl::Add(this, core::mem::transmute_copy(&pvalues)).into() } unsafe extern "system" fn Clear(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3324,7 +3324,7 @@ pub struct IPortableDeviceWebControl_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPortableDeviceWebControl_Impl: super::super::System::Com::IDispatch_Impl { fn GetDeviceFromId(&self, deviceid: &windows_core::BSTR) -> windows_core::Result; - fn GetDeviceFromIdAsync(&self, deviceid: &windows_core::BSTR, pcompletionhandler: Option<&super::super::System::Com::IDispatch>, perrorhandler: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn GetDeviceFromIdAsync(&self, deviceid: &windows_core::BSTR, pcompletionhandler: windows_core::Ref<'_, super::super::System::Com::IDispatch>, perrorhandler: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IPortableDeviceWebControl_Vtbl { @@ -3341,7 +3341,7 @@ impl IPortableDeviceWebControl_Vtbl { } unsafe extern "system" fn GetDeviceFromIdAsync(this: *mut core::ffi::c_void, deviceid: *mut core::ffi::c_void, pcompletionhandler: *mut core::ffi::c_void, perrorhandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPortableDeviceWebControl_Impl::GetDeviceFromIdAsync(this, core::mem::transmute(&deviceid), windows_core::from_raw_borrowed(&pcompletionhandler), windows_core::from_raw_borrowed(&perrorhandler)).into() + IPortableDeviceWebControl_Impl::GetDeviceFromIdAsync(this, core::mem::transmute(&deviceid), core::mem::transmute_copy(&pcompletionhandler), core::mem::transmute_copy(&perrorhandler)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -3562,9 +3562,9 @@ pub struct IWpdSerializer_Vtbl { } pub trait IWpdSerializer_Impl: windows_core::IUnknownImpl { fn GetIPortableDeviceValuesFromBuffer(&self, pbuffer: *const u8, dwinputbufferlength: u32) -> windows_core::Result; - fn WriteIPortableDeviceValuesToBuffer(&self, dwoutputbufferlength: u32, presults: Option<&IPortableDeviceValues>, pbuffer: *mut u8, pdwbyteswritten: *mut u32) -> windows_core::Result<()>; - fn GetBufferFromIPortableDeviceValues(&self, psource: Option<&IPortableDeviceValues>, ppbuffer: *mut *mut u8, pdwbuffersize: *mut u32) -> windows_core::Result<()>; - fn GetSerializedSize(&self, psource: Option<&IPortableDeviceValues>) -> windows_core::Result; + fn WriteIPortableDeviceValuesToBuffer(&self, dwoutputbufferlength: u32, presults: windows_core::Ref<'_, IPortableDeviceValues>, pbuffer: *mut u8, pdwbyteswritten: *mut u32) -> windows_core::Result<()>; + fn GetBufferFromIPortableDeviceValues(&self, psource: windows_core::Ref<'_, IPortableDeviceValues>, ppbuffer: *mut *mut u8, pdwbuffersize: *mut u32) -> windows_core::Result<()>; + fn GetSerializedSize(&self, psource: windows_core::Ref<'_, IPortableDeviceValues>) -> windows_core::Result; } impl IWpdSerializer_Vtbl { pub const fn new() -> Self { @@ -3580,15 +3580,15 @@ impl IWpdSerializer_Vtbl { } unsafe extern "system" fn WriteIPortableDeviceValuesToBuffer(this: *mut core::ffi::c_void, dwoutputbufferlength: u32, presults: *mut core::ffi::c_void, pbuffer: *mut u8, pdwbyteswritten: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWpdSerializer_Impl::WriteIPortableDeviceValuesToBuffer(this, core::mem::transmute_copy(&dwoutputbufferlength), windows_core::from_raw_borrowed(&presults), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&pdwbyteswritten)).into() + IWpdSerializer_Impl::WriteIPortableDeviceValuesToBuffer(this, core::mem::transmute_copy(&dwoutputbufferlength), core::mem::transmute_copy(&presults), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&pdwbyteswritten)).into() } unsafe extern "system" fn GetBufferFromIPortableDeviceValues(this: *mut core::ffi::c_void, psource: *mut core::ffi::c_void, ppbuffer: *mut *mut u8, pdwbuffersize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWpdSerializer_Impl::GetBufferFromIPortableDeviceValues(this, windows_core::from_raw_borrowed(&psource), core::mem::transmute_copy(&ppbuffer), core::mem::transmute_copy(&pdwbuffersize)).into() + IWpdSerializer_Impl::GetBufferFromIPortableDeviceValues(this, core::mem::transmute_copy(&psource), core::mem::transmute_copy(&ppbuffer), core::mem::transmute_copy(&pdwbuffersize)).into() } unsafe extern "system" fn GetSerializedSize(this: *mut core::ffi::c_void, psource: *mut core::ffi::c_void, pdwsize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWpdSerializer_Impl::GetSerializedSize(this, windows_core::from_raw_borrowed(&psource)) { + match IWpdSerializer_Impl::GetSerializedSize(this, core::mem::transmute_copy(&psource)) { Ok(ok__) => { pdwsize.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs index a824ebba40..db55c5669f 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs @@ -471,16 +471,16 @@ pub trait ISensor_Impl: windows_core::IUnknownImpl { fn GetType(&self) -> windows_core::Result; fn GetFriendlyName(&self) -> windows_core::Result; fn GetProperty(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; - fn GetProperties(&self, pkeys: Option<&super::PortableDevices::IPortableDeviceKeyCollection>) -> windows_core::Result; + fn GetProperties(&self, pkeys: windows_core::Ref<'_, super::PortableDevices::IPortableDeviceKeyCollection>) -> windows_core::Result; fn GetSupportedDataFields(&self) -> windows_core::Result; - fn SetProperties(&self, pproperties: Option<&super::PortableDevices::IPortableDeviceValues>) -> windows_core::Result; + fn SetProperties(&self, pproperties: windows_core::Ref<'_, super::PortableDevices::IPortableDeviceValues>) -> windows_core::Result; fn SupportsDataField(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; fn GetState(&self) -> windows_core::Result; fn GetData(&self) -> windows_core::Result; fn SupportsEvent(&self, eventguid: *const windows_core::GUID) -> windows_core::Result; fn GetEventInterest(&self, ppvalues: *mut *mut windows_core::GUID, pcount: *mut u32) -> windows_core::Result<()>; fn SetEventInterest(&self, pvalues: *const windows_core::GUID, count: u32) -> windows_core::Result<()>; - fn SetEventSink(&self, pevents: Option<&ISensorEvents>) -> windows_core::Result<()>; + fn SetEventSink(&self, pevents: windows_core::Ref<'_, ISensorEvents>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Devices_PortableDevices", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl ISensor_Vtbl { @@ -537,7 +537,7 @@ impl ISensor_Vtbl { } unsafe extern "system" fn GetProperties(this: *mut core::ffi::c_void, pkeys: *mut core::ffi::c_void, ppproperties: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISensor_Impl::GetProperties(this, windows_core::from_raw_borrowed(&pkeys)) { + match ISensor_Impl::GetProperties(this, core::mem::transmute_copy(&pkeys)) { Ok(ok__) => { ppproperties.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -557,7 +557,7 @@ impl ISensor_Vtbl { } unsafe extern "system" fn SetProperties(this: *mut core::ffi::c_void, pproperties: *mut core::ffi::c_void, ppresults: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISensor_Impl::SetProperties(this, windows_core::from_raw_borrowed(&pproperties)) { + match ISensor_Impl::SetProperties(this, core::mem::transmute_copy(&pproperties)) { Ok(ok__) => { ppresults.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -615,7 +615,7 @@ impl ISensor_Vtbl { } unsafe extern "system" fn SetEventSink(this: *mut core::ffi::c_void, pevents: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISensor_Impl::SetEventSink(this, windows_core::from_raw_borrowed(&pevents)).into() + ISensor_Impl::SetEventSink(this, core::mem::transmute_copy(&pevents)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -685,8 +685,8 @@ pub struct ISensorCollection_Vtbl { pub trait ISensorCollection_Impl: windows_core::IUnknownImpl { fn GetAt(&self, ulindex: u32) -> windows_core::Result; fn GetCount(&self) -> windows_core::Result; - fn Add(&self, psensor: Option<&ISensor>) -> windows_core::Result<()>; - fn Remove(&self, psensor: Option<&ISensor>) -> windows_core::Result<()>; + fn Add(&self, psensor: windows_core::Ref<'_, ISensor>) -> windows_core::Result<()>; + fn Remove(&self, psensor: windows_core::Ref<'_, ISensor>) -> windows_core::Result<()>; fn RemoveByID(&self, sensorid: *const windows_core::GUID) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } @@ -714,11 +714,11 @@ impl ISensorCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, psensor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISensorCollection_Impl::Add(this, windows_core::from_raw_borrowed(&psensor)).into() + ISensorCollection_Impl::Add(this, core::mem::transmute_copy(&psensor)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, psensor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISensorCollection_Impl::Remove(this, windows_core::from_raw_borrowed(&psensor)).into() + ISensorCollection_Impl::Remove(this, core::mem::transmute_copy(&psensor)).into() } unsafe extern "system" fn RemoveByID(this: *mut core::ffi::c_void, sensorid: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -781,7 +781,7 @@ pub struct ISensorDataReport_Vtbl { pub trait ISensorDataReport_Impl: windows_core::IUnknownImpl { fn GetTimestamp(&self) -> windows_core::Result; fn GetSensorValue(&self, pkey: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; - fn GetSensorValues(&self, pkeys: Option<&super::PortableDevices::IPortableDeviceKeyCollection>) -> windows_core::Result; + fn GetSensorValues(&self, pkeys: windows_core::Ref<'_, super::PortableDevices::IPortableDeviceKeyCollection>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Devices_PortableDevices", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl ISensorDataReport_Vtbl { @@ -808,7 +808,7 @@ impl ISensorDataReport_Vtbl { } unsafe extern "system" fn GetSensorValues(this: *mut core::ffi::c_void, pkeys: *mut core::ffi::c_void, ppvalues: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISensorDataReport_Impl::GetSensorValues(this, windows_core::from_raw_borrowed(&pkeys)) { + match ISensorDataReport_Impl::GetSensorValues(this, core::mem::transmute_copy(&pkeys)) { Ok(ok__) => { ppvalues.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -870,9 +870,9 @@ pub struct ISensorEvents_Vtbl { } #[cfg(feature = "Win32_Devices_PortableDevices")] pub trait ISensorEvents_Impl: windows_core::IUnknownImpl { - fn OnStateChanged(&self, psensor: Option<&ISensor>, state: SensorState) -> windows_core::Result<()>; - fn OnDataUpdated(&self, psensor: Option<&ISensor>, pnewdata: Option<&ISensorDataReport>) -> windows_core::Result<()>; - fn OnEvent(&self, psensor: Option<&ISensor>, eventid: *const windows_core::GUID, peventdata: Option<&super::PortableDevices::IPortableDeviceValues>) -> windows_core::Result<()>; + fn OnStateChanged(&self, psensor: windows_core::Ref<'_, ISensor>, state: SensorState) -> windows_core::Result<()>; + fn OnDataUpdated(&self, psensor: windows_core::Ref<'_, ISensor>, pnewdata: windows_core::Ref<'_, ISensorDataReport>) -> windows_core::Result<()>; + fn OnEvent(&self, psensor: windows_core::Ref<'_, ISensor>, eventid: *const windows_core::GUID, peventdata: windows_core::Ref<'_, super::PortableDevices::IPortableDeviceValues>) -> windows_core::Result<()>; fn OnLeave(&self, id: *const windows_core::GUID) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Devices_PortableDevices")] @@ -880,15 +880,15 @@ impl ISensorEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnStateChanged(this: *mut core::ffi::c_void, psensor: *mut core::ffi::c_void, state: SensorState) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISensorEvents_Impl::OnStateChanged(this, windows_core::from_raw_borrowed(&psensor), core::mem::transmute_copy(&state)).into() + ISensorEvents_Impl::OnStateChanged(this, core::mem::transmute_copy(&psensor), core::mem::transmute_copy(&state)).into() } unsafe extern "system" fn OnDataUpdated(this: *mut core::ffi::c_void, psensor: *mut core::ffi::c_void, pnewdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISensorEvents_Impl::OnDataUpdated(this, windows_core::from_raw_borrowed(&psensor), windows_core::from_raw_borrowed(&pnewdata)).into() + ISensorEvents_Impl::OnDataUpdated(this, core::mem::transmute_copy(&psensor), core::mem::transmute_copy(&pnewdata)).into() } unsafe extern "system" fn OnEvent(this: *mut core::ffi::c_void, psensor: *mut core::ffi::c_void, eventid: *const windows_core::GUID, peventdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISensorEvents_Impl::OnEvent(this, windows_core::from_raw_borrowed(&psensor), core::mem::transmute_copy(&eventid), windows_core::from_raw_borrowed(&peventdata)).into() + ISensorEvents_Impl::OnEvent(this, core::mem::transmute_copy(&psensor), core::mem::transmute_copy(&eventid), core::mem::transmute_copy(&peventdata)).into() } unsafe extern "system" fn OnLeave(this: *mut core::ffi::c_void, id: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -949,8 +949,8 @@ pub trait ISensorManager_Impl: windows_core::IUnknownImpl { fn GetSensorsByCategory(&self, sensorcategory: *const windows_core::GUID) -> windows_core::Result; fn GetSensorsByType(&self, sensortype: *const windows_core::GUID) -> windows_core::Result; fn GetSensorByID(&self, sensorid: *const windows_core::GUID) -> windows_core::Result; - fn SetEventSink(&self, pevents: Option<&ISensorManagerEvents>) -> windows_core::Result<()>; - fn RequestPermissions(&self, hparent: super::super::Foundation::HWND, psensors: Option<&ISensorCollection>, fmodal: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetEventSink(&self, pevents: windows_core::Ref<'_, ISensorManagerEvents>) -> windows_core::Result<()>; + fn RequestPermissions(&self, hparent: super::super::Foundation::HWND, psensors: windows_core::Ref<'_, ISensorCollection>, fmodal: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl ISensorManager_Vtbl { pub const fn new() -> Self { @@ -986,11 +986,11 @@ impl ISensorManager_Vtbl { } unsafe extern "system" fn SetEventSink(this: *mut core::ffi::c_void, pevents: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISensorManager_Impl::SetEventSink(this, windows_core::from_raw_borrowed(&pevents)).into() + ISensorManager_Impl::SetEventSink(this, core::mem::transmute_copy(&pevents)).into() } unsafe extern "system" fn RequestPermissions(this: *mut core::ffi::c_void, hparent: super::super::Foundation::HWND, psensors: *mut core::ffi::c_void, fmodal: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISensorManager_Impl::RequestPermissions(this, core::mem::transmute_copy(&hparent), windows_core::from_raw_borrowed(&psensors), core::mem::transmute_copy(&fmodal)).into() + ISensorManager_Impl::RequestPermissions(this, core::mem::transmute_copy(&hparent), core::mem::transmute_copy(&psensors), core::mem::transmute_copy(&fmodal)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1022,13 +1022,13 @@ pub struct ISensorManagerEvents_Vtbl { pub OnSensorEnter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, SensorState) -> windows_core::HRESULT, } pub trait ISensorManagerEvents_Impl: windows_core::IUnknownImpl { - fn OnSensorEnter(&self, psensor: Option<&ISensor>, state: SensorState) -> windows_core::Result<()>; + fn OnSensorEnter(&self, psensor: windows_core::Ref<'_, ISensor>, state: SensorState) -> windows_core::Result<()>; } impl ISensorManagerEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSensorEnter(this: *mut core::ffi::c_void, psensor: *mut core::ffi::c_void, state: SensorState) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISensorManagerEvents_Impl::OnSensorEnter(this, windows_core::from_raw_borrowed(&psensor), core::mem::transmute_copy(&state)).into() + ISensorManagerEvents_Impl::OnSensorEnter(this, core::mem::transmute_copy(&psensor), core::mem::transmute_copy(&state)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnSensorEnter: OnSensorEnter:: } } diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs index f0cf7f3fb4..f1a473e3c4 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs @@ -2146,7 +2146,7 @@ pub struct IEnumACDGroup_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumACDGroup_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITACDGroup>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2221,7 +2221,7 @@ pub struct IEnumAddress_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumAddress_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITAddress>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2296,7 +2296,7 @@ pub struct IEnumAgent_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumAgent_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITAgent>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2371,7 +2371,7 @@ pub struct IEnumAgentHandler_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumAgentHandler_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITAgentHandler>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2446,7 +2446,7 @@ pub struct IEnumAgentSession_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumAgentSession_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITAgentSession>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2589,7 +2589,7 @@ pub struct IEnumCall_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumCall_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITCallInfo>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2664,7 +2664,7 @@ pub struct IEnumCallHub_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumCallHub_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITCallHub>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2739,7 +2739,7 @@ pub struct IEnumCallingCard_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumCallingCard_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITCallingCard>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2882,7 +2882,7 @@ pub struct IEnumDirectory_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumDirectory_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITDirectory>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2957,7 +2957,7 @@ pub struct IEnumDirectoryObject_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumDirectoryObject_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, pval: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, pval: windows_core::OutRef<'_, ITDirectoryObject>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3032,7 +3032,7 @@ pub struct IEnumLocation_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumLocation_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITLocationInfo>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3107,7 +3107,7 @@ pub struct IEnumMcastScope_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumMcastScope_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppscopes: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppscopes: windows_core::OutRef<'_, IMcastScope>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3182,7 +3182,7 @@ pub struct IEnumPhone_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumPhone_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITPhone>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3257,7 +3257,7 @@ pub struct IEnumPluggableSuperclassInfo_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumPluggableSuperclassInfo_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITPluggableTerminalSuperclassInfo>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3332,7 +3332,7 @@ pub struct IEnumPluggableTerminalClassInfo_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumPluggableTerminalClassInfo_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITPluggableTerminalClassInfo>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3407,7 +3407,7 @@ pub struct IEnumQueue_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumQueue_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITQueue>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3482,7 +3482,7 @@ pub struct IEnumStream_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumStream_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITStream>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3557,7 +3557,7 @@ pub struct IEnumSubStream_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumSubStream_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITSubStream>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3632,7 +3632,7 @@ pub struct IEnumTerminal_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumTerminal_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, ITTerminal>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3822,9 +3822,9 @@ pub struct IMcastAddressAllocation_Vtbl { pub trait IMcastAddressAllocation_Impl: super::super::System::Com::IDispatch_Impl { fn Scopes(&self) -> windows_core::Result; fn EnumerateScopes(&self) -> windows_core::Result; - fn RequestAddress(&self, pscope: Option<&IMcastScope>, leasestarttime: f64, leasestoptime: f64, numaddresses: i32) -> windows_core::Result; - fn RenewAddress(&self, lreserved: i32, prenewrequest: Option<&IMcastLeaseInfo>) -> windows_core::Result; - fn ReleaseAddress(&self, preleaserequest: Option<&IMcastLeaseInfo>) -> windows_core::Result<()>; + fn RequestAddress(&self, pscope: windows_core::Ref<'_, IMcastScope>, leasestarttime: f64, leasestoptime: f64, numaddresses: i32) -> windows_core::Result; + fn RenewAddress(&self, lreserved: i32, prenewrequest: windows_core::Ref<'_, IMcastLeaseInfo>) -> windows_core::Result; + fn ReleaseAddress(&self, preleaserequest: windows_core::Ref<'_, IMcastLeaseInfo>) -> windows_core::Result<()>; fn CreateLeaseInfo(&self, leasestarttime: f64, leasestoptime: f64, dwnumaddresses: u32, ppaddresses: *const windows_core::PCWSTR, prequestid: &windows_core::PCWSTR, pserveraddress: &windows_core::PCWSTR) -> windows_core::Result; fn CreateLeaseInfoFromVariant(&self, leasestarttime: f64, leasestoptime: f64, vaddresses: &super::super::System::Variant::VARIANT, prequestid: &windows_core::BSTR, pserveraddress: &windows_core::BSTR) -> windows_core::Result; } @@ -3853,7 +3853,7 @@ impl IMcastAddressAllocation_Vtbl { } unsafe extern "system" fn RequestAddress(this: *mut core::ffi::c_void, pscope: *mut core::ffi::c_void, leasestarttime: f64, leasestoptime: f64, numaddresses: i32, ppleaseresponse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMcastAddressAllocation_Impl::RequestAddress(this, windows_core::from_raw_borrowed(&pscope), core::mem::transmute_copy(&leasestarttime), core::mem::transmute_copy(&leasestoptime), core::mem::transmute_copy(&numaddresses)) { + match IMcastAddressAllocation_Impl::RequestAddress(this, core::mem::transmute_copy(&pscope), core::mem::transmute_copy(&leasestarttime), core::mem::transmute_copy(&leasestoptime), core::mem::transmute_copy(&numaddresses)) { Ok(ok__) => { ppleaseresponse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3863,7 +3863,7 @@ impl IMcastAddressAllocation_Vtbl { } unsafe extern "system" fn RenewAddress(this: *mut core::ffi::c_void, lreserved: i32, prenewrequest: *mut core::ffi::c_void, pprenewresponse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMcastAddressAllocation_Impl::RenewAddress(this, core::mem::transmute_copy(&lreserved), windows_core::from_raw_borrowed(&prenewrequest)) { + match IMcastAddressAllocation_Impl::RenewAddress(this, core::mem::transmute_copy(&lreserved), core::mem::transmute_copy(&prenewrequest)) { Ok(ok__) => { pprenewresponse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3873,7 +3873,7 @@ impl IMcastAddressAllocation_Vtbl { } unsafe extern "system" fn ReleaseAddress(this: *mut core::ffi::c_void, preleaserequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMcastAddressAllocation_Impl::ReleaseAddress(this, windows_core::from_raw_borrowed(&preleaserequest)).into() + IMcastAddressAllocation_Impl::ReleaseAddress(this, core::mem::transmute_copy(&preleaserequest)).into() } unsafe extern "system" fn CreateLeaseInfo(this: *mut core::ffi::c_void, leasestarttime: f64, leasestoptime: f64, dwnumaddresses: u32, ppaddresses: *const windows_core::PCWSTR, prequestid: windows_core::PCWSTR, pserveraddress: windows_core::PCWSTR, ppreleaserequest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4639,7 +4639,7 @@ pub trait ITAddress_Impl: super::super::System::Com::IDispatch_Impl { fn EnumerateCalls(&self) -> windows_core::Result; fn DialableAddress(&self) -> windows_core::Result; fn CreateForwardInfoObject(&self) -> windows_core::Result; - fn Forward(&self, pforwardinfo: Option<&ITForwardInformation>, pcall: Option<&ITBasicCallControl>) -> windows_core::Result<()>; + fn Forward(&self, pforwardinfo: windows_core::Ref<'_, ITForwardInformation>, pcall: windows_core::Ref<'_, ITBasicCallControl>) -> windows_core::Result<()>; fn CurrentForwardInfo(&self) -> windows_core::Result; fn SetMessageWaiting(&self, fmessagewaiting: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn MessageWaiting(&self) -> windows_core::Result; @@ -4741,7 +4741,7 @@ impl ITAddress_Vtbl { } unsafe extern "system" fn Forward(this: *mut core::ffi::c_void, pforwardinfo: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITAddress_Impl::Forward(this, windows_core::from_raw_borrowed(&pforwardinfo), windows_core::from_raw_borrowed(&pcall)).into() + ITAddress_Impl::Forward(this, core::mem::transmute_copy(&pforwardinfo), core::mem::transmute_copy(&pcall)).into() } unsafe extern "system" fn CurrentForwardInfo(this: *mut core::ffi::c_void, ppforwardinfo: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4897,13 +4897,13 @@ pub struct ITAddress2_Vtbl { pub trait ITAddress2_Impl: ITAddress_Impl { fn Phones(&self) -> windows_core::Result; fn EnumeratePhones(&self) -> windows_core::Result; - fn GetPhoneFromTerminal(&self, pterminal: Option<&ITTerminal>) -> windows_core::Result; + fn GetPhoneFromTerminal(&self, pterminal: windows_core::Ref<'_, ITTerminal>) -> windows_core::Result; fn PreferredPhones(&self) -> windows_core::Result; fn EnumeratePreferredPhones(&self) -> windows_core::Result; fn get_EventFilter(&self, tapievent: TAPI_EVENT, lsubevent: i32) -> windows_core::Result; fn put_EventFilter(&self, tapievent: TAPI_EVENT, lsubevent: i32, benable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn DeviceSpecific(&self, pcall: Option<&ITCallInfo>, pparams: *const u8, dwsize: u32) -> windows_core::Result<()>; - fn DeviceSpecificVariant(&self, pcall: Option<&ITCallInfo>, vardevspecificbytearray: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; + fn DeviceSpecific(&self, pcall: windows_core::Ref<'_, ITCallInfo>, pparams: *const u8, dwsize: u32) -> windows_core::Result<()>; + fn DeviceSpecificVariant(&self, pcall: windows_core::Ref<'_, ITCallInfo>, vardevspecificbytearray: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn NegotiateExtVersion(&self, llowversion: i32, lhighversion: i32) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -4931,7 +4931,7 @@ impl ITAddress2_Vtbl { } unsafe extern "system" fn GetPhoneFromTerminal(this: *mut core::ffi::c_void, pterminal: *mut core::ffi::c_void, ppphone: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITAddress2_Impl::GetPhoneFromTerminal(this, windows_core::from_raw_borrowed(&pterminal)) { + match ITAddress2_Impl::GetPhoneFromTerminal(this, core::mem::transmute_copy(&pterminal)) { Ok(ok__) => { ppphone.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4975,11 +4975,11 @@ impl ITAddress2_Vtbl { } unsafe extern "system" fn DeviceSpecific(this: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void, pparams: *const u8, dwsize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITAddress2_Impl::DeviceSpecific(this, windows_core::from_raw_borrowed(&pcall), core::mem::transmute_copy(&pparams), core::mem::transmute_copy(&dwsize)).into() + ITAddress2_Impl::DeviceSpecific(this, core::mem::transmute_copy(&pcall), core::mem::transmute_copy(&pparams), core::mem::transmute_copy(&dwsize)).into() } unsafe extern "system" fn DeviceSpecificVariant(this: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void, vardevspecificbytearray: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITAddress2_Impl::DeviceSpecificVariant(this, windows_core::from_raw_borrowed(&pcall), core::mem::transmute(&vardevspecificbytearray)).into() + ITAddress2_Impl::DeviceSpecificVariant(this, core::mem::transmute_copy(&pcall), core::mem::transmute(&vardevspecificbytearray)).into() } unsafe extern "system" fn NegotiateExtVersion(this: *mut core::ffi::c_void, llowversion: i32, lhighversion: i32, plextversion: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5779,8 +5779,8 @@ pub struct ITAgent_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITAgent_Impl: super::super::System::Com::IDispatch_Impl { fn EnumerateAgentSessions(&self) -> windows_core::Result; - fn CreateSession(&self, pacdgroup: Option<&ITACDGroup>, paddress: Option<&ITAddress>) -> windows_core::Result; - fn CreateSessionWithPIN(&self, pacdgroup: Option<&ITACDGroup>, paddress: Option<&ITAddress>, ppin: &windows_core::BSTR) -> windows_core::Result; + fn CreateSession(&self, pacdgroup: windows_core::Ref<'_, ITACDGroup>, paddress: windows_core::Ref<'_, ITAddress>) -> windows_core::Result; + fn CreateSessionWithPIN(&self, pacdgroup: windows_core::Ref<'_, ITACDGroup>, paddress: windows_core::Ref<'_, ITAddress>, ppin: &windows_core::BSTR) -> windows_core::Result; fn ID(&self) -> windows_core::Result; fn User(&self) -> windows_core::Result; fn SetState(&self, agentstate: AGENT_STATE) -> windows_core::Result<()>; @@ -5811,7 +5811,7 @@ impl ITAgent_Vtbl { } unsafe extern "system" fn CreateSession(this: *mut core::ffi::c_void, pacdgroup: *mut core::ffi::c_void, paddress: *mut core::ffi::c_void, ppagentsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITAgent_Impl::CreateSession(this, windows_core::from_raw_borrowed(&pacdgroup), windows_core::from_raw_borrowed(&paddress)) { + match ITAgent_Impl::CreateSession(this, core::mem::transmute_copy(&pacdgroup), core::mem::transmute_copy(&paddress)) { Ok(ok__) => { ppagentsession.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5821,7 +5821,7 @@ impl ITAgent_Vtbl { } unsafe extern "system" fn CreateSessionWithPIN(this: *mut core::ffi::c_void, pacdgroup: *mut core::ffi::c_void, paddress: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, ppagentsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITAgent_Impl::CreateSessionWithPIN(this, windows_core::from_raw_borrowed(&pacdgroup), windows_core::from_raw_borrowed(&paddress), core::mem::transmute(&ppin)) { + match ITAgent_Impl::CreateSessionWithPIN(this, core::mem::transmute_copy(&pacdgroup), core::mem::transmute_copy(&paddress), core::mem::transmute(&ppin)) { Ok(ok__) => { ppagentsession.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6985,8 +6985,8 @@ pub trait ITAutomatedPhoneControl_Impl: super::super::System::Com::IDispatch_Imp fn AutoVolumeControlRepeatDelay(&self) -> windows_core::Result; fn SetAutoVolumeControlRepeatPeriod(&self, lperiod: i32) -> windows_core::Result<()>; fn AutoVolumeControlRepeatPeriod(&self) -> windows_core::Result; - fn SelectCall(&self, pcall: Option<&ITCallInfo>, fselectdefaultterminals: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn UnselectCall(&self, pcall: Option<&ITCallInfo>) -> windows_core::Result<()>; + fn SelectCall(&self, pcall: windows_core::Ref<'_, ITCallInfo>, fselectdefaultterminals: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn UnselectCall(&self, pcall: windows_core::Ref<'_, ITCallInfo>) -> windows_core::Result<()>; fn EnumerateSelectedCalls(&self) -> windows_core::Result; fn SelectedCalls(&self) -> windows_core::Result; } @@ -7185,11 +7185,11 @@ impl ITAutomatedPhoneControl_Vtbl { } unsafe extern "system" fn SelectCall(this: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void, fselectdefaultterminals: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITAutomatedPhoneControl_Impl::SelectCall(this, windows_core::from_raw_borrowed(&pcall), core::mem::transmute_copy(&fselectdefaultterminals)).into() + ITAutomatedPhoneControl_Impl::SelectCall(this, core::mem::transmute_copy(&pcall), core::mem::transmute_copy(&fselectdefaultterminals)).into() } unsafe extern "system" fn UnselectCall(this: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITAutomatedPhoneControl_Impl::UnselectCall(this, windows_core::from_raw_borrowed(&pcall)).into() + ITAutomatedPhoneControl_Impl::UnselectCall(this, core::mem::transmute_copy(&pcall)).into() } unsafe extern "system" fn EnumerateSelectedCalls(this: *mut core::ffi::c_void, ppcallenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7451,10 +7451,10 @@ pub trait ITBasicCallControl_Impl: super::super::System::Com::IDispatch_Impl { fn Hold(&self, fhold: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn HandoffDirect(&self, papplicationname: &windows_core::BSTR) -> windows_core::Result<()>; fn HandoffIndirect(&self, lmediatype: i32) -> windows_core::Result<()>; - fn Conference(&self, pcall: Option<&ITBasicCallControl>, fsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn Transfer(&self, pcall: Option<&ITBasicCallControl>, fsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn Conference(&self, pcall: windows_core::Ref<'_, ITBasicCallControl>, fsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn Transfer(&self, pcall: windows_core::Ref<'_, ITBasicCallControl>, fsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn BlindTransfer(&self, pdestaddress: &windows_core::BSTR) -> windows_core::Result<()>; - fn SwapHold(&self, pcall: Option<&ITBasicCallControl>) -> windows_core::Result<()>; + fn SwapHold(&self, pcall: windows_core::Ref<'_, ITBasicCallControl>) -> windows_core::Result<()>; fn ParkDirect(&self, pparkaddress: &windows_core::BSTR) -> windows_core::Result<()>; fn ParkIndirect(&self) -> windows_core::Result; fn Unpark(&self) -> windows_core::Result<()>; @@ -7493,11 +7493,11 @@ impl ITBasicCallControl_Vtbl { } unsafe extern "system" fn Conference(this: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void, fsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITBasicCallControl_Impl::Conference(this, windows_core::from_raw_borrowed(&pcall), core::mem::transmute_copy(&fsync)).into() + ITBasicCallControl_Impl::Conference(this, core::mem::transmute_copy(&pcall), core::mem::transmute_copy(&fsync)).into() } unsafe extern "system" fn Transfer(this: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void, fsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITBasicCallControl_Impl::Transfer(this, windows_core::from_raw_borrowed(&pcall), core::mem::transmute_copy(&fsync)).into() + ITBasicCallControl_Impl::Transfer(this, core::mem::transmute_copy(&pcall), core::mem::transmute_copy(&fsync)).into() } unsafe extern "system" fn BlindTransfer(this: *mut core::ffi::c_void, pdestaddress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7505,7 +7505,7 @@ impl ITBasicCallControl_Vtbl { } unsafe extern "system" fn SwapHold(this: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITBasicCallControl_Impl::SwapHold(this, windows_core::from_raw_borrowed(&pcall)).into() + ITBasicCallControl_Impl::SwapHold(this, core::mem::transmute_copy(&pcall)).into() } unsafe extern "system" fn ParkDirect(this: *mut core::ffi::c_void, pparkaddress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7614,8 +7614,8 @@ pub struct ITBasicCallControl2_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITBasicCallControl2_Impl: ITBasicCallControl_Impl { fn RequestTerminal(&self, bstrterminalclassguid: &windows_core::BSTR, lmediatype: i32, direction: TERMINAL_DIRECTION) -> windows_core::Result; - fn SelectTerminalOnCall(&self, pterminal: Option<&ITTerminal>) -> windows_core::Result<()>; - fn UnselectTerminalOnCall(&self, pterminal: Option<&ITTerminal>) -> windows_core::Result<()>; + fn SelectTerminalOnCall(&self, pterminal: windows_core::Ref<'_, ITTerminal>) -> windows_core::Result<()>; + fn UnselectTerminalOnCall(&self, pterminal: windows_core::Ref<'_, ITTerminal>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITBasicCallControl2_Vtbl { @@ -7632,11 +7632,11 @@ impl ITBasicCallControl2_Vtbl { } unsafe extern "system" fn SelectTerminalOnCall(this: *mut core::ffi::c_void, pterminal: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITBasicCallControl2_Impl::SelectTerminalOnCall(this, windows_core::from_raw_borrowed(&pterminal)).into() + ITBasicCallControl2_Impl::SelectTerminalOnCall(this, core::mem::transmute_copy(&pterminal)).into() } unsafe extern "system" fn UnselectTerminalOnCall(this: *mut core::ffi::c_void, pterminal: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITBasicCallControl2_Impl::UnselectTerminalOnCall(this, windows_core::from_raw_borrowed(&pterminal)).into() + ITBasicCallControl2_Impl::UnselectTerminalOnCall(this, core::mem::transmute_copy(&pterminal)).into() } Self { base__: ITBasicCallControl_Vtbl::new::(), @@ -9558,10 +9558,10 @@ pub trait ITDirectory_Impl: super::super::System::Com::IDispatch_Impl { fn EnableAutoRefresh(&self, fenable: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn Connect(&self, fsecure: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn Bind(&self, pdomainname: &windows_core::BSTR, pusername: &windows_core::BSTR, ppassword: &windows_core::BSTR, lflags: i32) -> windows_core::Result<()>; - fn AddDirectoryObject(&self, pdirectoryobject: Option<&ITDirectoryObject>) -> windows_core::Result<()>; - fn ModifyDirectoryObject(&self, pdirectoryobject: Option<&ITDirectoryObject>) -> windows_core::Result<()>; - fn RefreshDirectoryObject(&self, pdirectoryobject: Option<&ITDirectoryObject>) -> windows_core::Result<()>; - fn DeleteDirectoryObject(&self, pdirectoryobject: Option<&ITDirectoryObject>) -> windows_core::Result<()>; + fn AddDirectoryObject(&self, pdirectoryobject: windows_core::Ref<'_, ITDirectoryObject>) -> windows_core::Result<()>; + fn ModifyDirectoryObject(&self, pdirectoryobject: windows_core::Ref<'_, ITDirectoryObject>) -> windows_core::Result<()>; + fn RefreshDirectoryObject(&self, pdirectoryobject: windows_core::Ref<'_, ITDirectoryObject>) -> windows_core::Result<()>; + fn DeleteDirectoryObject(&self, pdirectoryobject: windows_core::Ref<'_, ITDirectoryObject>) -> windows_core::Result<()>; fn get_DirectoryObjects(&self, directoryobjecttype: DIRECTORY_OBJECT_TYPE, pname: &windows_core::BSTR) -> windows_core::Result; fn EnumerateDirectoryObjects(&self, directoryobjecttype: DIRECTORY_OBJECT_TYPE, pname: &windows_core::BSTR) -> windows_core::Result; } @@ -9626,19 +9626,19 @@ impl ITDirectory_Vtbl { } unsafe extern "system" fn AddDirectoryObject(this: *mut core::ffi::c_void, pdirectoryobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITDirectory_Impl::AddDirectoryObject(this, windows_core::from_raw_borrowed(&pdirectoryobject)).into() + ITDirectory_Impl::AddDirectoryObject(this, core::mem::transmute_copy(&pdirectoryobject)).into() } unsafe extern "system" fn ModifyDirectoryObject(this: *mut core::ffi::c_void, pdirectoryobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITDirectory_Impl::ModifyDirectoryObject(this, windows_core::from_raw_borrowed(&pdirectoryobject)).into() + ITDirectory_Impl::ModifyDirectoryObject(this, core::mem::transmute_copy(&pdirectoryobject)).into() } unsafe extern "system" fn RefreshDirectoryObject(this: *mut core::ffi::c_void, pdirectoryobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITDirectory_Impl::RefreshDirectoryObject(this, windows_core::from_raw_borrowed(&pdirectoryobject)).into() + ITDirectory_Impl::RefreshDirectoryObject(this, core::mem::transmute_copy(&pdirectoryobject)).into() } unsafe extern "system" fn DeleteDirectoryObject(this: *mut core::ffi::c_void, pdirectoryobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITDirectory_Impl::DeleteDirectoryObject(this, windows_core::from_raw_borrowed(&pdirectoryobject)).into() + ITDirectory_Impl::DeleteDirectoryObject(this, core::mem::transmute_copy(&pdirectoryobject)).into() } unsafe extern "system" fn get_DirectoryObjects(this: *mut core::ffi::c_void, directoryobjecttype: DIRECTORY_OBJECT_TYPE, pname: *mut core::ffi::c_void, pvariant: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9751,7 +9751,7 @@ pub trait ITDirectoryObject_Impl: super::super::System::Com::IDispatch_Impl { fn get_DialableAddrs(&self, dwaddresstype: i32) -> windows_core::Result; fn EnumerateDialableAddrs(&self, dwaddresstype: u32) -> windows_core::Result; fn SecurityDescriptor(&self) -> windows_core::Result; - fn SetSecurityDescriptor(&self, psecdes: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetSecurityDescriptor(&self, psecdes: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITDirectoryObject_Vtbl { @@ -9812,7 +9812,7 @@ impl ITDirectoryObject_Vtbl { } unsafe extern "system" fn SetSecurityDescriptor(this: *mut core::ffi::c_void, psecdes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITDirectoryObject_Impl::SetSecurityDescriptor(this, windows_core::from_raw_borrowed(&psecdes)).into() + ITDirectoryObject_Impl::SetSecurityDescriptor(this, core::mem::transmute_copy(&psecdes)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -10163,14 +10163,14 @@ pub struct ITDispatchMapper_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITDispatchMapper_Impl: super::super::System::Com::IDispatch_Impl { - fn QueryDispatchInterface(&self, piid: &windows_core::BSTR, pinterfacetomap: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result; + fn QueryDispatchInterface(&self, piid: &windows_core::BSTR, pinterfacetomap: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITDispatchMapper_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryDispatchInterface(this: *mut core::ffi::c_void, piid: *mut core::ffi::c_void, pinterfacetomap: *mut core::ffi::c_void, ppreturnedinterface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITDispatchMapper_Impl::QueryDispatchInterface(this, core::mem::transmute(&piid), windows_core::from_raw_borrowed(&pinterfacetomap)) { + match ITDispatchMapper_Impl::QueryDispatchInterface(this, core::mem::transmute(&piid), core::mem::transmute_copy(&pinterfacetomap)) { Ok(ok__) => { ppreturnedinterface.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10387,7 +10387,7 @@ pub trait ITFileTrack_Impl: super::super::System::Com::IDispatch_Impl { fn SetFormat(&self, pmt: *const super::super::Media::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; fn ControllingTerminal(&self) -> windows_core::Result; fn AudioFormatForScripting(&self) -> windows_core::Result; - fn SetAudioFormatForScripting(&self, paudioformat: Option<&ITScriptableAudioFormat>) -> windows_core::Result<()>; + fn SetAudioFormatForScripting(&self, paudioformat: windows_core::Ref<'_, ITScriptableAudioFormat>) -> windows_core::Result<()>; fn EmptyAudioFormatForScripting(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -10429,7 +10429,7 @@ impl ITFileTrack_Vtbl { } unsafe extern "system" fn SetAudioFormatForScripting(this: *mut core::ffi::c_void, paudioformat: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITFileTrack_Impl::SetAudioFormatForScripting(this, windows_core::from_raw_borrowed(&paudioformat)).into() + ITFileTrack_Impl::SetAudioFormatForScripting(this, core::mem::transmute_copy(&paudioformat)).into() } unsafe extern "system" fn EmptyAudioFormatForScripting(this: *mut core::ffi::c_void, ppaudioformat: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10994,10 +10994,10 @@ pub trait ITLegacyCallMediaControl2_Impl: ITLegacyCallMediaControl_Impl { fn GenerateDigits2(&self, pdigits: &windows_core::BSTR, digitmode: i32, lduration: i32) -> windows_core::Result<()>; fn GatherDigits(&self, digitmode: i32, lnumdigits: i32, pterminationdigits: &windows_core::BSTR, lfirstdigittimeout: i32, linterdigittimeout: i32) -> windows_core::Result<()>; fn DetectTones(&self, ptonelist: *const TAPI_DETECTTONE, lnumtones: i32) -> windows_core::Result<()>; - fn DetectTonesByCollection(&self, pdetecttonecollection: Option<&ITCollection2>) -> windows_core::Result<()>; + fn DetectTonesByCollection(&self, pdetecttonecollection: windows_core::Ref<'_, ITCollection2>) -> windows_core::Result<()>; fn GenerateTone(&self, tonemode: TAPI_TONEMODE, lduration: i32) -> windows_core::Result<()>; fn GenerateCustomTones(&self, ptonelist: *const TAPI_CUSTOMTONE, lnumtones: i32, lduration: i32) -> windows_core::Result<()>; - fn GenerateCustomTonesByCollection(&self, pcustomtonecollection: Option<&ITCollection2>, lduration: i32) -> windows_core::Result<()>; + fn GenerateCustomTonesByCollection(&self, pcustomtonecollection: windows_core::Ref<'_, ITCollection2>, lduration: i32) -> windows_core::Result<()>; fn CreateDetectToneObject(&self) -> windows_core::Result; fn CreateCustomToneObject(&self) -> windows_core::Result; fn GetIDAsVariant(&self, bstrdeviceclass: &windows_core::BSTR) -> windows_core::Result; @@ -11019,7 +11019,7 @@ impl ITLegacyCallMediaControl2_Vtbl { } unsafe extern "system" fn DetectTonesByCollection(this: *mut core::ffi::c_void, pdetecttonecollection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITLegacyCallMediaControl2_Impl::DetectTonesByCollection(this, windows_core::from_raw_borrowed(&pdetecttonecollection)).into() + ITLegacyCallMediaControl2_Impl::DetectTonesByCollection(this, core::mem::transmute_copy(&pdetecttonecollection)).into() } unsafe extern "system" fn GenerateTone(this: *mut core::ffi::c_void, tonemode: TAPI_TONEMODE, lduration: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11031,7 +11031,7 @@ impl ITLegacyCallMediaControl2_Vtbl { } unsafe extern "system" fn GenerateCustomTonesByCollection(this: *mut core::ffi::c_void, pcustomtonecollection: *mut core::ffi::c_void, lduration: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITLegacyCallMediaControl2_Impl::GenerateCustomTonesByCollection(this, windows_core::from_raw_borrowed(&pcustomtonecollection), core::mem::transmute_copy(&lduration)).into() + ITLegacyCallMediaControl2_Impl::GenerateCustomTonesByCollection(this, core::mem::transmute_copy(&pcustomtonecollection), core::mem::transmute_copy(&lduration)).into() } unsafe extern "system" fn CreateDetectToneObject(this: *mut core::ffi::c_void, ppdetecttone: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11399,9 +11399,9 @@ pub struct ITMSPAddress_Vtbl { pub trait ITMSPAddress_Impl: windows_core::IUnknownImpl { fn Initialize(&self, hevent: *const i32) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; - fn CreateMSPCall(&self, hcall: *const i32, dwreserved: u32, dwmediatype: u32, pouterunknown: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn ShutdownMSPCall(&self, pstreamcontrol: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn ReceiveTSPData(&self, pmspcall: Option<&windows_core::IUnknown>, pbuffer: *const u8, dwsize: u32) -> windows_core::Result<()>; + fn CreateMSPCall(&self, hcall: *const i32, dwreserved: u32, dwmediatype: u32, pouterunknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn ShutdownMSPCall(&self, pstreamcontrol: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn ReceiveTSPData(&self, pmspcall: windows_core::Ref<'_, windows_core::IUnknown>, pbuffer: *const u8, dwsize: u32) -> windows_core::Result<()>; fn GetEvent(&self, pdwsize: *mut u32, peventbuffer: *mut u8) -> windows_core::Result<()>; } impl ITMSPAddress_Vtbl { @@ -11416,7 +11416,7 @@ impl ITMSPAddress_Vtbl { } unsafe extern "system" fn CreateMSPCall(this: *mut core::ffi::c_void, hcall: *const i32, dwreserved: u32, dwmediatype: u32, pouterunknown: *mut core::ffi::c_void, ppstreamcontrol: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITMSPAddress_Impl::CreateMSPCall(this, core::mem::transmute_copy(&hcall), core::mem::transmute_copy(&dwreserved), core::mem::transmute_copy(&dwmediatype), windows_core::from_raw_borrowed(&pouterunknown)) { + match ITMSPAddress_Impl::CreateMSPCall(this, core::mem::transmute_copy(&hcall), core::mem::transmute_copy(&dwreserved), core::mem::transmute_copy(&dwmediatype), core::mem::transmute_copy(&pouterunknown)) { Ok(ok__) => { ppstreamcontrol.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11426,11 +11426,11 @@ impl ITMSPAddress_Vtbl { } unsafe extern "system" fn ShutdownMSPCall(this: *mut core::ffi::c_void, pstreamcontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITMSPAddress_Impl::ShutdownMSPCall(this, windows_core::from_raw_borrowed(&pstreamcontrol)).into() + ITMSPAddress_Impl::ShutdownMSPCall(this, core::mem::transmute_copy(&pstreamcontrol)).into() } unsafe extern "system" fn ReceiveTSPData(this: *mut core::ffi::c_void, pmspcall: *mut core::ffi::c_void, pbuffer: *const u8, dwsize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITMSPAddress_Impl::ReceiveTSPData(this, windows_core::from_raw_borrowed(&pmspcall), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&dwsize)).into() + ITMSPAddress_Impl::ReceiveTSPData(this, core::mem::transmute_copy(&pmspcall), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&dwsize)).into() } unsafe extern "system" fn GetEvent(this: *mut core::ffi::c_void, pdwsize: *mut u32, peventbuffer: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11796,7 +11796,7 @@ pub trait ITMultiTrackTerminal_Impl: super::super::System::Com::IDispatch_Impl { fn CreateTrackTerminal(&self, mediatype: i32, terminaldirection: TERMINAL_DIRECTION) -> windows_core::Result; fn MediaTypesInUse(&self) -> windows_core::Result; fn DirectionsInUse(&self) -> windows_core::Result; - fn RemoveTrackTerminal(&self, ptrackterminaltoremove: Option<&ITTerminal>) -> windows_core::Result<()>; + fn RemoveTrackTerminal(&self, ptrackterminaltoremove: windows_core::Ref<'_, ITTerminal>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITMultiTrackTerminal_Vtbl { @@ -11853,7 +11853,7 @@ impl ITMultiTrackTerminal_Vtbl { } unsafe extern "system" fn RemoveTrackTerminal(this: *mut core::ffi::c_void, ptrackterminaltoremove: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITMultiTrackTerminal_Impl::RemoveTrackTerminal(this, windows_core::from_raw_borrowed(&ptrackterminaltoremove)).into() + ITMultiTrackTerminal_Impl::RemoveTrackTerminal(this, core::mem::transmute_copy(&ptrackterminaltoremove)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -12076,8 +12076,8 @@ pub trait ITPhone_Impl: super::super::System::Com::IDispatch_Impl { fn EnumerateAddresses(&self) -> windows_core::Result; fn get_PhoneCapsLong(&self, pclcap: PHONECAPS_LONG) -> windows_core::Result; fn get_PhoneCapsString(&self, pcscap: PHONECAPS_STRING) -> windows_core::Result; - fn get_Terminals(&self, paddress: Option<&ITAddress>) -> windows_core::Result; - fn EnumerateTerminals(&self, paddress: Option<&ITAddress>) -> windows_core::Result; + fn get_Terminals(&self, paddress: windows_core::Ref<'_, ITAddress>) -> windows_core::Result; + fn EnumerateTerminals(&self, paddress: windows_core::Ref<'_, ITAddress>) -> windows_core::Result; fn get_ButtonMode(&self, lbuttonid: i32) -> windows_core::Result; fn put_ButtonMode(&self, lbuttonid: i32, buttonmode: PHONE_BUTTON_MODE) -> windows_core::Result<()>; fn get_ButtonFunction(&self, lbuttonid: i32) -> windows_core::Result; @@ -12157,7 +12157,7 @@ impl ITPhone_Vtbl { } unsafe extern "system" fn get_Terminals(this: *mut core::ffi::c_void, paddress: *mut core::ffi::c_void, pterminals: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITPhone_Impl::get_Terminals(this, windows_core::from_raw_borrowed(&paddress)) { + match ITPhone_Impl::get_Terminals(this, core::mem::transmute_copy(&paddress)) { Ok(ok__) => { pterminals.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12167,7 +12167,7 @@ impl ITPhone_Vtbl { } unsafe extern "system" fn EnumerateTerminals(this: *mut core::ffi::c_void, paddress: *mut core::ffi::c_void, ppenumterminal: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITPhone_Impl::EnumerateTerminals(this, windows_core::from_raw_borrowed(&paddress)) { + match ITPhone_Impl::EnumerateTerminals(this, core::mem::transmute_copy(&paddress)) { Ok(ok__) => { ppenumterminal.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12902,14 +12902,14 @@ pub struct ITPluggableTerminalEventSinkRegistration_Vtbl { pub UnregisterSink: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITPluggableTerminalEventSinkRegistration_Impl: windows_core::IUnknownImpl { - fn RegisterSink(&self, peventsink: Option<&ITPluggableTerminalEventSink>) -> windows_core::Result<()>; + fn RegisterSink(&self, peventsink: windows_core::Ref<'_, ITPluggableTerminalEventSink>) -> windows_core::Result<()>; fn UnregisterSink(&self) -> windows_core::Result<()>; } impl ITPluggableTerminalEventSinkRegistration_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterSink(this: *mut core::ffi::c_void, peventsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITPluggableTerminalEventSinkRegistration_Impl::RegisterSink(this, windows_core::from_raw_borrowed(&peventsink)).into() + ITPluggableTerminalEventSinkRegistration_Impl::RegisterSink(this, core::mem::transmute_copy(&peventsink)).into() } unsafe extern "system" fn UnregisterSink(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14108,8 +14108,8 @@ pub trait ITStream_Impl: super::super::System::Com::IDispatch_Impl { fn StartStream(&self) -> windows_core::Result<()>; fn PauseStream(&self) -> windows_core::Result<()>; fn StopStream(&self) -> windows_core::Result<()>; - fn SelectTerminal(&self, pterminal: Option<&ITTerminal>) -> windows_core::Result<()>; - fn UnselectTerminal(&self, pterminal: Option<&ITTerminal>) -> windows_core::Result<()>; + fn SelectTerminal(&self, pterminal: windows_core::Ref<'_, ITTerminal>) -> windows_core::Result<()>; + fn UnselectTerminal(&self, pterminal: windows_core::Ref<'_, ITTerminal>) -> windows_core::Result<()>; fn EnumerateTerminals(&self) -> windows_core::Result; fn Terminals(&self) -> windows_core::Result; } @@ -14160,11 +14160,11 @@ impl ITStream_Vtbl { } unsafe extern "system" fn SelectTerminal(this: *mut core::ffi::c_void, pterminal: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITStream_Impl::SelectTerminal(this, windows_core::from_raw_borrowed(&pterminal)).into() + ITStream_Impl::SelectTerminal(this, core::mem::transmute_copy(&pterminal)).into() } unsafe extern "system" fn UnselectTerminal(this: *mut core::ffi::c_void, pterminal: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITStream_Impl::UnselectTerminal(this, windows_core::from_raw_borrowed(&pterminal)).into() + ITStream_Impl::UnselectTerminal(this, core::mem::transmute_copy(&pterminal)).into() } unsafe extern "system" fn EnumerateTerminals(this: *mut core::ffi::c_void, ppenumterminal: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14254,7 +14254,7 @@ pub struct ITStreamControl_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITStreamControl_Impl: super::super::System::Com::IDispatch_Impl { fn CreateStream(&self, lmediatype: i32, td: TERMINAL_DIRECTION) -> windows_core::Result; - fn RemoveStream(&self, pstream: Option<&ITStream>) -> windows_core::Result<()>; + fn RemoveStream(&self, pstream: windows_core::Ref<'_, ITStream>) -> windows_core::Result<()>; fn EnumerateStreams(&self) -> windows_core::Result; fn Streams(&self) -> windows_core::Result; } @@ -14273,7 +14273,7 @@ impl ITStreamControl_Vtbl { } unsafe extern "system" fn RemoveStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITStreamControl_Impl::RemoveStream(this, windows_core::from_raw_borrowed(&pstream)).into() + ITStreamControl_Impl::RemoveStream(this, core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn EnumerateStreams(this: *mut core::ffi::c_void, ppenumstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14378,8 +14378,8 @@ pub trait ITSubStream_Impl: super::super::System::Com::IDispatch_Impl { fn StartSubStream(&self) -> windows_core::Result<()>; fn PauseSubStream(&self) -> windows_core::Result<()>; fn StopSubStream(&self) -> windows_core::Result<()>; - fn SelectTerminal(&self, pterminal: Option<&ITTerminal>) -> windows_core::Result<()>; - fn UnselectTerminal(&self, pterminal: Option<&ITTerminal>) -> windows_core::Result<()>; + fn SelectTerminal(&self, pterminal: windows_core::Ref<'_, ITTerminal>) -> windows_core::Result<()>; + fn UnselectTerminal(&self, pterminal: windows_core::Ref<'_, ITTerminal>) -> windows_core::Result<()>; fn EnumerateTerminals(&self) -> windows_core::Result; fn Terminals(&self) -> windows_core::Result; fn Stream(&self) -> windows_core::Result; @@ -14401,11 +14401,11 @@ impl ITSubStream_Vtbl { } unsafe extern "system" fn SelectTerminal(this: *mut core::ffi::c_void, pterminal: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITSubStream_Impl::SelectTerminal(this, windows_core::from_raw_borrowed(&pterminal)).into() + ITSubStream_Impl::SelectTerminal(this, core::mem::transmute_copy(&pterminal)).into() } unsafe extern "system" fn UnselectTerminal(this: *mut core::ffi::c_void, pterminal: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITSubStream_Impl::UnselectTerminal(this, windows_core::from_raw_borrowed(&pterminal)).into() + ITSubStream_Impl::UnselectTerminal(this, core::mem::transmute_copy(&pterminal)).into() } unsafe extern "system" fn EnumerateTerminals(this: *mut core::ffi::c_void, ppenumterminal: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14503,7 +14503,7 @@ pub struct ITSubStreamControl_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITSubStreamControl_Impl: super::super::System::Com::IDispatch_Impl { fn CreateSubStream(&self) -> windows_core::Result; - fn RemoveSubStream(&self, psubstream: Option<&ITSubStream>) -> windows_core::Result<()>; + fn RemoveSubStream(&self, psubstream: windows_core::Ref<'_, ITSubStream>) -> windows_core::Result<()>; fn EnumerateSubStreams(&self) -> windows_core::Result; fn SubStreams(&self) -> windows_core::Result; } @@ -14522,7 +14522,7 @@ impl ITSubStreamControl_Vtbl { } unsafe extern "system" fn RemoveSubStream(this: *mut core::ffi::c_void, psubstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITSubStreamControl_Impl::RemoveSubStream(this, windows_core::from_raw_borrowed(&psubstream)).into() + ITSubStreamControl_Impl::RemoveSubStream(this, core::mem::transmute_copy(&psubstream)).into() } unsafe extern "system" fn EnumerateSubStreams(this: *mut core::ffi::c_void, ppenumsubstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14678,7 +14678,7 @@ pub trait ITTAPI_Impl: super::super::System::Com::IDispatch_Impl { fn Shutdown(&self) -> windows_core::Result<()>; fn Addresses(&self) -> windows_core::Result; fn EnumerateAddresses(&self) -> windows_core::Result; - fn RegisterCallNotifications(&self, paddress: Option<&ITAddress>, fmonitor: super::super::Foundation::VARIANT_BOOL, fowner: super::super::Foundation::VARIANT_BOOL, lmediatypes: i32, lcallbackinstance: i32) -> windows_core::Result; + fn RegisterCallNotifications(&self, paddress: windows_core::Ref<'_, ITAddress>, fmonitor: super::super::Foundation::VARIANT_BOOL, fowner: super::super::Foundation::VARIANT_BOOL, lmediatypes: i32, lcallbackinstance: i32) -> windows_core::Result; fn UnregisterNotifications(&self, lregister: i32) -> windows_core::Result<()>; fn CallHubs(&self) -> windows_core::Result; fn EnumerateCallHubs(&self) -> windows_core::Result; @@ -14724,7 +14724,7 @@ impl ITTAPI_Vtbl { } unsafe extern "system" fn RegisterCallNotifications(this: *mut core::ffi::c_void, paddress: *mut core::ffi::c_void, fmonitor: super::super::Foundation::VARIANT_BOOL, fowner: super::super::Foundation::VARIANT_BOOL, lmediatypes: i32, lcallbackinstance: i32, plregister: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITTAPI_Impl::RegisterCallNotifications(this, windows_core::from_raw_borrowed(&paddress), core::mem::transmute_copy(&fmonitor), core::mem::transmute_copy(&fowner), core::mem::transmute_copy(&lmediatypes), core::mem::transmute_copy(&lcallbackinstance)) { + match ITTAPI_Impl::RegisterCallNotifications(this, core::mem::transmute_copy(&paddress), core::mem::transmute_copy(&fmonitor), core::mem::transmute_copy(&fowner), core::mem::transmute_copy(&lmediatypes), core::mem::transmute_copy(&lcallbackinstance)) { Ok(ok__) => { plregister.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15045,14 +15045,14 @@ pub struct ITTAPIEventNotification_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITTAPIEventNotification_Impl: windows_core::IUnknownImpl { - fn Event(&self, tapievent: TAPI_EVENT, pevent: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn Event(&self, tapievent: TAPI_EVENT, pevent: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ITTAPIEventNotification_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Event(this: *mut core::ffi::c_void, tapievent: TAPI_EVENT, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITTAPIEventNotification_Impl::Event(this, core::mem::transmute_copy(&tapievent), windows_core::from_raw_borrowed(&pevent)).into() + ITTAPIEventNotification_Impl::Event(this, core::mem::transmute_copy(&tapievent), core::mem::transmute_copy(&pevent)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Event: Event:: } } @@ -15954,9 +15954,9 @@ pub trait ITnef_Impl: windows_core::IUnknownImpl { fn AddProps(&self, ulflags: u32, ulelemid: u32, lpvdata: *mut core::ffi::c_void, lpproplist: *mut super::super::System::AddressBook::SPropTagArray) -> windows_core::Result<()>; fn ExtractProps(&self, ulflags: u32, lpproplist: *mut super::super::System::AddressBook::SPropTagArray, lpproblems: *mut *mut STnefProblemArray) -> windows_core::Result<()>; fn Finish(&self, ulflags: u32, lpkey: *mut u16, lpproblems: *mut *mut STnefProblemArray) -> windows_core::Result<()>; - fn OpenTaggedBody(&self, lpmessage: Option<&super::super::System::AddressBook::IMessage>, ulflags: u32) -> windows_core::Result; + fn OpenTaggedBody(&self, lpmessage: windows_core::Ref<'_, super::super::System::AddressBook::IMessage>, ulflags: u32) -> windows_core::Result; fn SetProps(&self, ulflags: u32, ulelemid: u32, cvalues: u32, lpprops: *mut super::super::System::AddressBook::SPropValue) -> windows_core::Result<()>; - fn EncodeRecips(&self, ulflags: u32, lprecipienttable: Option<&super::super::System::AddressBook::IMAPITable>) -> windows_core::Result<()>; + fn EncodeRecips(&self, ulflags: u32, lprecipienttable: windows_core::Ref<'_, super::super::System::AddressBook::IMAPITable>) -> windows_core::Result<()>; fn FinishComponent(&self, ulflags: u32, ulcomponentid: u32, lpcustomproplist: *mut super::super::System::AddressBook::SPropTagArray, lpcustomprops: *mut super::super::System::AddressBook::SPropValue, lpproplist: *mut super::super::System::AddressBook::SPropTagArray, lpproblems: *mut *mut STnefProblemArray) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_AddressBook", feature = "Win32_System_Com"))] @@ -15976,7 +15976,7 @@ impl ITnef_Vtbl { } unsafe extern "system" fn OpenTaggedBody(this: *mut core::ffi::c_void, lpmessage: *mut core::ffi::c_void, ulflags: u32, lppstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITnef_Impl::OpenTaggedBody(this, windows_core::from_raw_borrowed(&lpmessage), core::mem::transmute_copy(&ulflags)) { + match ITnef_Impl::OpenTaggedBody(this, core::mem::transmute_copy(&lpmessage), core::mem::transmute_copy(&ulflags)) { Ok(ok__) => { lppstream.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15990,7 +15990,7 @@ impl ITnef_Vtbl { } unsafe extern "system" fn EncodeRecips(this: *mut core::ffi::c_void, ulflags: u32, lprecipienttable: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITnef_Impl::EncodeRecips(this, core::mem::transmute_copy(&ulflags), windows_core::from_raw_borrowed(&lprecipienttable)).into() + ITnef_Impl::EncodeRecips(this, core::mem::transmute_copy(&ulflags), core::mem::transmute_copy(&lprecipienttable)).into() } unsafe extern "system" fn FinishComponent(this: *mut core::ffi::c_void, ulflags: u32, ulcomponentid: u32, lpcustomproplist: *mut super::super::System::AddressBook::SPropTagArray, lpcustomprops: *mut super::super::System::AddressBook::SPropValue, lpproplist: *mut super::super::System::AddressBook::SPropTagArray, lpproblems: *mut *mut STnefProblemArray) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs index d99bdeb00c..e1c03af312 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs @@ -303,13 +303,13 @@ pub struct IWSDAsyncCallback_Vtbl { pub AsyncOperationComplete: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWSDAsyncCallback_Impl: windows_core::IUnknownImpl { - fn AsyncOperationComplete(&self, pasyncresult: Option<&IWSDAsyncResult>, pasyncstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AsyncOperationComplete(&self, pasyncresult: windows_core::Ref<'_, IWSDAsyncResult>, pasyncstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IWSDAsyncCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AsyncOperationComplete(this: *mut core::ffi::c_void, pasyncresult: *mut core::ffi::c_void, pasyncstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDAsyncCallback_Impl::AsyncOperationComplete(this, windows_core::from_raw_borrowed(&pasyncresult), windows_core::from_raw_borrowed(&pasyncstate)).into() + IWSDAsyncCallback_Impl::AsyncOperationComplete(this, core::mem::transmute_copy(&pasyncresult), core::mem::transmute_copy(&pasyncstate)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), AsyncOperationComplete: AsyncOperationComplete:: } } @@ -361,7 +361,7 @@ pub struct IWSDAsyncResult_Vtbl { pub GetEndpointProxy: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWSDAsyncResult_Impl: windows_core::IUnknownImpl { - fn SetCallback(&self, pcallback: Option<&IWSDAsyncCallback>, pasyncstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetCallback(&self, pcallback: windows_core::Ref<'_, IWSDAsyncCallback>, pasyncstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetWaitHandle(&self, hwaithandle: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn HasCompleted(&self) -> windows_core::Result<()>; fn GetAsyncState(&self) -> windows_core::Result; @@ -373,7 +373,7 @@ impl IWSDAsyncResult_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetCallback(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pasyncstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDAsyncResult_Impl::SetCallback(this, windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pasyncstate)).into() + IWSDAsyncResult_Impl::SetCallback(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pasyncstate)).into() } unsafe extern "system" fn SetWaitHandle(this: *mut core::ffi::c_void, hwaithandle: super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -528,15 +528,15 @@ pub struct IWSDDeviceHost_Vtbl { pub SignalEvent: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *const core::ffi::c_void, *const WSD_OPERATION) -> windows_core::HRESULT, } pub trait IWSDDeviceHost_Impl: windows_core::IUnknownImpl { - fn Init(&self, pszlocalid: &windows_core::PCWSTR, pcontext: Option<&IWSDXMLContext>, pphostaddresses: *const Option, dwhostaddresscount: u32) -> windows_core::Result<()>; - fn Start(&self, ullinstanceid: u64, pscopelist: *const WSD_URI_LIST, pnotificationsink: Option<&IWSDDeviceHostNotify>) -> windows_core::Result<()>; + fn Init(&self, pszlocalid: &windows_core::PCWSTR, pcontext: windows_core::Ref<'_, IWSDXMLContext>, pphostaddresses: *const Option, dwhostaddresscount: u32) -> windows_core::Result<()>; + fn Start(&self, ullinstanceid: u64, pscopelist: *const WSD_URI_LIST, pnotificationsink: windows_core::Ref<'_, IWSDDeviceHostNotify>) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; fn Terminate(&self) -> windows_core::Result<()>; fn RegisterPortType(&self, pporttype: *const WSD_PORT_TYPE) -> windows_core::Result<()>; fn SetMetadata(&self, pthismodelmetadata: *const WSD_THIS_MODEL_METADATA, pthisdevicemetadata: *const WSD_THIS_DEVICE_METADATA, phostmetadata: *const WSD_HOST_METADATA, pcustommetadata: *const WSD_METADATA_SECTION_LIST) -> windows_core::Result<()>; - fn RegisterService(&self, pszserviceid: &windows_core::PCWSTR, pservice: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn RegisterService(&self, pszserviceid: &windows_core::PCWSTR, pservice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RetireService(&self, pszserviceid: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn AddDynamicService(&self, pszserviceid: &windows_core::PCWSTR, pszendpointaddress: &windows_core::PCWSTR, pporttype: *const WSD_PORT_TYPE, pportname: *const WSDXML_NAME, pany: *const WSDXML_ELEMENT, pservice: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddDynamicService(&self, pszserviceid: &windows_core::PCWSTR, pszendpointaddress: &windows_core::PCWSTR, pporttype: *const WSD_PORT_TYPE, pportname: *const WSDXML_NAME, pany: *const WSDXML_ELEMENT, pservice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RemoveDynamicService(&self, pszserviceid: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetServiceDiscoverable(&self, pszserviceid: &windows_core::PCWSTR, fdiscoverable: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SignalEvent(&self, pszserviceid: &windows_core::PCWSTR, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION) -> windows_core::Result<()>; @@ -545,11 +545,11 @@ impl IWSDDeviceHost_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, pszlocalid: windows_core::PCWSTR, pcontext: *mut core::ffi::c_void, pphostaddresses: *const *mut core::ffi::c_void, dwhostaddresscount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDDeviceHost_Impl::Init(this, core::mem::transmute(&pszlocalid), windows_core::from_raw_borrowed(&pcontext), core::mem::transmute_copy(&pphostaddresses), core::mem::transmute_copy(&dwhostaddresscount)).into() + IWSDDeviceHost_Impl::Init(this, core::mem::transmute(&pszlocalid), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pphostaddresses), core::mem::transmute_copy(&dwhostaddresscount)).into() } unsafe extern "system" fn Start(this: *mut core::ffi::c_void, ullinstanceid: u64, pscopelist: *const WSD_URI_LIST, pnotificationsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDDeviceHost_Impl::Start(this, core::mem::transmute_copy(&ullinstanceid), core::mem::transmute_copy(&pscopelist), windows_core::from_raw_borrowed(&pnotificationsink)).into() + IWSDDeviceHost_Impl::Start(this, core::mem::transmute_copy(&ullinstanceid), core::mem::transmute_copy(&pscopelist), core::mem::transmute_copy(&pnotificationsink)).into() } unsafe extern "system" fn Stop(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -569,7 +569,7 @@ impl IWSDDeviceHost_Vtbl { } unsafe extern "system" fn RegisterService(this: *mut core::ffi::c_void, pszserviceid: windows_core::PCWSTR, pservice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDDeviceHost_Impl::RegisterService(this, core::mem::transmute(&pszserviceid), windows_core::from_raw_borrowed(&pservice)).into() + IWSDDeviceHost_Impl::RegisterService(this, core::mem::transmute(&pszserviceid), core::mem::transmute_copy(&pservice)).into() } unsafe extern "system" fn RetireService(this: *mut core::ffi::c_void, pszserviceid: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -577,7 +577,7 @@ impl IWSDDeviceHost_Vtbl { } unsafe extern "system" fn AddDynamicService(this: *mut core::ffi::c_void, pszserviceid: windows_core::PCWSTR, pszendpointaddress: windows_core::PCWSTR, pporttype: *const WSD_PORT_TYPE, pportname: *const WSDXML_NAME, pany: *const WSDXML_ELEMENT, pservice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDDeviceHost_Impl::AddDynamicService(this, core::mem::transmute(&pszserviceid), core::mem::transmute(&pszendpointaddress), core::mem::transmute_copy(&pporttype), core::mem::transmute_copy(&pportname), core::mem::transmute_copy(&pany), windows_core::from_raw_borrowed(&pservice)).into() + IWSDDeviceHost_Impl::AddDynamicService(this, core::mem::transmute(&pszserviceid), core::mem::transmute(&pszendpointaddress), core::mem::transmute_copy(&pporttype), core::mem::transmute_copy(&pportname), core::mem::transmute_copy(&pany), core::mem::transmute_copy(&pservice)).into() } unsafe extern "system" fn RemoveDynamicService(this: *mut core::ffi::c_void, pszserviceid: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -720,9 +720,9 @@ pub struct IWSDDeviceProxy_Vtbl { pub GetEndpointProxy: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWSDDeviceProxy_Impl: windows_core::IUnknownImpl { - fn Init(&self, pszdeviceid: &windows_core::PCWSTR, pdeviceaddress: Option<&IWSDAddress>, pszlocalid: &windows_core::PCWSTR, pcontext: Option<&IWSDXMLContext>, psponsor: Option<&IWSDDeviceProxy>) -> windows_core::Result<()>; + fn Init(&self, pszdeviceid: &windows_core::PCWSTR, pdeviceaddress: windows_core::Ref<'_, IWSDAddress>, pszlocalid: &windows_core::PCWSTR, pcontext: windows_core::Ref<'_, IWSDXMLContext>, psponsor: windows_core::Ref<'_, IWSDDeviceProxy>) -> windows_core::Result<()>; fn BeginGetMetadata(&self) -> windows_core::Result; - fn EndGetMetadata(&self, presult: Option<&IWSDAsyncResult>) -> windows_core::Result<()>; + fn EndGetMetadata(&self, presult: windows_core::Ref<'_, IWSDAsyncResult>) -> windows_core::Result<()>; fn GetHostMetadata(&self) -> windows_core::Result<*mut WSD_HOST_METADATA>; fn GetThisModelMetadata(&self) -> windows_core::Result<*mut WSD_THIS_MODEL_METADATA>; fn GetThisDeviceMetadata(&self) -> windows_core::Result<*mut WSD_THIS_DEVICE_METADATA>; @@ -735,7 +735,7 @@ impl IWSDDeviceProxy_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, pszdeviceid: windows_core::PCWSTR, pdeviceaddress: *mut core::ffi::c_void, pszlocalid: windows_core::PCWSTR, pcontext: *mut core::ffi::c_void, psponsor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDDeviceProxy_Impl::Init(this, core::mem::transmute(&pszdeviceid), windows_core::from_raw_borrowed(&pdeviceaddress), core::mem::transmute(&pszlocalid), windows_core::from_raw_borrowed(&pcontext), windows_core::from_raw_borrowed(&psponsor)).into() + IWSDDeviceProxy_Impl::Init(this, core::mem::transmute(&pszdeviceid), core::mem::transmute_copy(&pdeviceaddress), core::mem::transmute(&pszlocalid), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&psponsor)).into() } unsafe extern "system" fn BeginGetMetadata(this: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -749,7 +749,7 @@ impl IWSDDeviceProxy_Vtbl { } unsafe extern "system" fn EndGetMetadata(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDDeviceProxy_Impl::EndGetMetadata(this, windows_core::from_raw_borrowed(&presult)).into() + IWSDDeviceProxy_Impl::EndGetMetadata(this, core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn GetHostMetadata(this: *mut core::ffi::c_void, pphostmetadata: *mut *mut WSD_HOST_METADATA) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -889,8 +889,8 @@ pub struct IWSDEndpointProxy_Vtbl { pub trait IWSDEndpointProxy_Impl: windows_core::IUnknownImpl { fn SendOneWayRequest(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION) -> windows_core::Result<()>; fn SendTwoWayRequest(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, presponsecontext: *const WSD_SYNCHRONOUS_RESPONSE_CONTEXT) -> windows_core::Result<()>; - fn SendTwoWayRequestAsync(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, pasyncstate: Option<&windows_core::IUnknown>, pcallback: Option<&IWSDAsyncCallback>) -> windows_core::Result; - fn AbortAsyncOperation(&self, pasyncresult: Option<&IWSDAsyncResult>) -> windows_core::Result<()>; + fn SendTwoWayRequestAsync(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, pasyncstate: windows_core::Ref<'_, windows_core::IUnknown>, pcallback: windows_core::Ref<'_, IWSDAsyncCallback>) -> windows_core::Result; + fn AbortAsyncOperation(&self, pasyncresult: windows_core::Ref<'_, IWSDAsyncResult>) -> windows_core::Result<()>; fn ProcessFault(&self, pfault: *const WSD_SOAP_FAULT) -> windows_core::Result<()>; fn GetErrorInfo(&self) -> windows_core::Result; fn GetFaultInfo(&self) -> windows_core::Result<*mut WSD_SOAP_FAULT>; @@ -907,7 +907,7 @@ impl IWSDEndpointProxy_Vtbl { } unsafe extern "system" fn SendTwoWayRequestAsync(this: *mut core::ffi::c_void, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, pasyncstate: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, presult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWSDEndpointProxy_Impl::SendTwoWayRequestAsync(this, core::mem::transmute_copy(&pbody), core::mem::transmute_copy(&poperation), windows_core::from_raw_borrowed(&pasyncstate), windows_core::from_raw_borrowed(&pcallback)) { + match IWSDEndpointProxy_Impl::SendTwoWayRequestAsync(this, core::mem::transmute_copy(&pbody), core::mem::transmute_copy(&poperation), core::mem::transmute_copy(&pasyncstate), core::mem::transmute_copy(&pcallback)) { Ok(ok__) => { presult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -917,7 +917,7 @@ impl IWSDEndpointProxy_Vtbl { } unsafe extern "system" fn AbortAsyncOperation(this: *mut core::ffi::c_void, pasyncresult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDEndpointProxy_Impl::AbortAsyncOperation(this, windows_core::from_raw_borrowed(&pasyncresult)).into() + IWSDEndpointProxy_Impl::AbortAsyncOperation(this, core::mem::transmute_copy(&pasyncresult)).into() } unsafe extern "system" fn ProcessFault(this: *mut core::ffi::c_void, pfault: *const WSD_SOAP_FAULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1224,7 +1224,7 @@ pub trait IWSDHttpMessageParameters_Impl: IWSDMessageParameters_Impl { fn GetOutboundHttpHeaders(&self) -> windows_core::Result; fn SetID(&self, pszid: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetID(&self) -> windows_core::Result; - fn SetContext(&self, pcontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetContext(&self, pcontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetContext(&self) -> windows_core::Result; fn Clear(&self) -> windows_core::Result<()>; } @@ -1274,7 +1274,7 @@ impl IWSDHttpMessageParameters_Vtbl { } unsafe extern "system" fn SetContext(this: *mut core::ffi::c_void, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDHttpMessageParameters_Impl::SetContext(this, windows_core::from_raw_borrowed(&pcontext)).into() + IWSDHttpMessageParameters_Impl::SetContext(this, core::mem::transmute_copy(&pcontext)).into() } unsafe extern "system" fn GetContext(this: *mut core::ffi::c_void, ppcontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1390,9 +1390,9 @@ pub struct IWSDMessageParameters_Vtbl { } pub trait IWSDMessageParameters_Impl: windows_core::IUnknownImpl { fn GetLocalAddress(&self) -> windows_core::Result; - fn SetLocalAddress(&self, paddress: Option<&IWSDAddress>) -> windows_core::Result<()>; + fn SetLocalAddress(&self, paddress: windows_core::Ref<'_, IWSDAddress>) -> windows_core::Result<()>; fn GetRemoteAddress(&self) -> windows_core::Result; - fn SetRemoteAddress(&self, paddress: Option<&IWSDAddress>) -> windows_core::Result<()>; + fn SetRemoteAddress(&self, paddress: windows_core::Ref<'_, IWSDAddress>) -> windows_core::Result<()>; fn GetLowerParameters(&self) -> windows_core::Result; } impl IWSDMessageParameters_Vtbl { @@ -1409,7 +1409,7 @@ impl IWSDMessageParameters_Vtbl { } unsafe extern "system" fn SetLocalAddress(this: *mut core::ffi::c_void, paddress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDMessageParameters_Impl::SetLocalAddress(this, windows_core::from_raw_borrowed(&paddress)).into() + IWSDMessageParameters_Impl::SetLocalAddress(this, core::mem::transmute_copy(&paddress)).into() } unsafe extern "system" fn GetRemoteAddress(this: *mut core::ffi::c_void, ppaddress: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1423,7 +1423,7 @@ impl IWSDMessageParameters_Vtbl { } unsafe extern "system" fn SetRemoteAddress(this: *mut core::ffi::c_void, paddress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDMessageParameters_Impl::SetRemoteAddress(this, windows_core::from_raw_borrowed(&paddress)).into() + IWSDMessageParameters_Impl::SetRemoteAddress(this, core::mem::transmute_copy(&paddress)).into() } unsafe extern "system" fn GetLowerParameters(this: *mut core::ffi::c_void, pptxparams: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1692,18 +1692,18 @@ pub struct IWSDServiceMessaging_Vtbl { pub FaultRequest: unsafe extern "system" fn(*mut core::ffi::c_void, *const WSD_SOAP_HEADER, *mut core::ffi::c_void, *const WSD_SOAP_FAULT) -> windows_core::HRESULT, } pub trait IWSDServiceMessaging_Impl: windows_core::IUnknownImpl { - fn SendResponse(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, pmessageparameters: Option<&IWSDMessageParameters>) -> windows_core::Result<()>; - fn FaultRequest(&self, prequestheader: *const WSD_SOAP_HEADER, pmessageparameters: Option<&IWSDMessageParameters>, pfault: *const WSD_SOAP_FAULT) -> windows_core::Result<()>; + fn SendResponse(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, pmessageparameters: windows_core::Ref<'_, IWSDMessageParameters>) -> windows_core::Result<()>; + fn FaultRequest(&self, prequestheader: *const WSD_SOAP_HEADER, pmessageparameters: windows_core::Ref<'_, IWSDMessageParameters>, pfault: *const WSD_SOAP_FAULT) -> windows_core::Result<()>; } impl IWSDServiceMessaging_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SendResponse(this: *mut core::ffi::c_void, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, pmessageparameters: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDServiceMessaging_Impl::SendResponse(this, core::mem::transmute_copy(&pbody), core::mem::transmute_copy(&poperation), windows_core::from_raw_borrowed(&pmessageparameters)).into() + IWSDServiceMessaging_Impl::SendResponse(this, core::mem::transmute_copy(&pbody), core::mem::transmute_copy(&poperation), core::mem::transmute_copy(&pmessageparameters)).into() } unsafe extern "system" fn FaultRequest(this: *mut core::ffi::c_void, prequestheader: *const WSD_SOAP_HEADER, pmessageparameters: *mut core::ffi::c_void, pfault: *const WSD_SOAP_FAULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDServiceMessaging_Impl::FaultRequest(this, core::mem::transmute_copy(&prequestheader), windows_core::from_raw_borrowed(&pmessageparameters), core::mem::transmute_copy(&pfault)).into() + IWSDServiceMessaging_Impl::FaultRequest(this, core::mem::transmute_copy(&prequestheader), core::mem::transmute_copy(&pmessageparameters), core::mem::transmute_copy(&pfault)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1773,11 +1773,11 @@ pub struct IWSDServiceProxy_Vtbl { } pub trait IWSDServiceProxy_Impl: IWSDMetadataExchange_Impl { fn BeginGetMetadata(&self) -> windows_core::Result; - fn EndGetMetadata(&self, presult: Option<&IWSDAsyncResult>) -> windows_core::Result<*mut WSD_METADATA_SECTION_LIST>; + fn EndGetMetadata(&self, presult: windows_core::Ref<'_, IWSDAsyncResult>) -> windows_core::Result<*mut WSD_METADATA_SECTION_LIST>; fn GetServiceMetadata(&self) -> windows_core::Result<*mut WSD_SERVICE_METADATA>; - fn SubscribeToOperation(&self, poperation: *const WSD_OPERATION, punknown: Option<&windows_core::IUnknown>, pany: *const WSDXML_ELEMENT, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; + fn SubscribeToOperation(&self, poperation: *const WSD_OPERATION, punknown: windows_core::Ref<'_, windows_core::IUnknown>, pany: *const WSDXML_ELEMENT, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; fn UnsubscribeToOperation(&self, poperation: *const WSD_OPERATION) -> windows_core::Result<()>; - fn SetEventingStatusCallback(&self, pstatus: Option<&IWSDEventingStatus>) -> windows_core::Result<()>; + fn SetEventingStatusCallback(&self, pstatus: windows_core::Ref<'_, IWSDEventingStatus>) -> windows_core::Result<()>; fn GetEndpointProxy(&self) -> windows_core::Result; } impl IWSDServiceProxy_Vtbl { @@ -1794,7 +1794,7 @@ impl IWSDServiceProxy_Vtbl { } unsafe extern "system" fn EndGetMetadata(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppmetadata: *mut *mut WSD_METADATA_SECTION_LIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWSDServiceProxy_Impl::EndGetMetadata(this, windows_core::from_raw_borrowed(&presult)) { + match IWSDServiceProxy_Impl::EndGetMetadata(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { ppmetadata.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1814,7 +1814,7 @@ impl IWSDServiceProxy_Vtbl { } unsafe extern "system" fn SubscribeToOperation(this: *mut core::ffi::c_void, poperation: *const WSD_OPERATION, punknown: *mut core::ffi::c_void, pany: *const WSDXML_ELEMENT, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDServiceProxy_Impl::SubscribeToOperation(this, core::mem::transmute_copy(&poperation), windows_core::from_raw_borrowed(&punknown), core::mem::transmute_copy(&pany), core::mem::transmute_copy(&ppany)).into() + IWSDServiceProxy_Impl::SubscribeToOperation(this, core::mem::transmute_copy(&poperation), core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&pany), core::mem::transmute_copy(&ppany)).into() } unsafe extern "system" fn UnsubscribeToOperation(this: *mut core::ffi::c_void, poperation: *const WSD_OPERATION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1822,7 +1822,7 @@ impl IWSDServiceProxy_Vtbl { } unsafe extern "system" fn SetEventingStatusCallback(this: *mut core::ffi::c_void, pstatus: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDServiceProxy_Impl::SetEventingStatusCallback(this, windows_core::from_raw_borrowed(&pstatus)).into() + IWSDServiceProxy_Impl::SetEventingStatusCallback(this, core::mem::transmute_copy(&pstatus)).into() } unsafe extern "system" fn GetEndpointProxy(this: *mut core::ffi::c_void, ppproxy: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1949,28 +1949,28 @@ pub struct IWSDServiceProxyEventing_Vtbl { pub EndGetStatusForMultipleOperations: unsafe extern "system" fn(*mut core::ffi::c_void, *const WSD_OPERATION, u32, *mut core::ffi::c_void, *mut *mut WSD_EVENTING_EXPIRES, *mut *mut WSDXML_ELEMENT) -> windows_core::HRESULT, } pub trait IWSDServiceProxyEventing_Impl: IWSDServiceProxy_Impl { - fn SubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, punknown: Option<&windows_core::IUnknown>, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; - fn BeginSubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, punknown: Option<&windows_core::IUnknown>, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, pasyncstate: Option<&windows_core::IUnknown>, pasynccallback: Option<&IWSDAsyncCallback>) -> windows_core::Result; - fn EndSubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: Option<&IWSDAsyncResult>, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; + fn SubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, punknown: windows_core::Ref<'_, windows_core::IUnknown>, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; + fn BeginSubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, punknown: windows_core::Ref<'_, windows_core::IUnknown>, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, pasyncstate: windows_core::Ref<'_, windows_core::IUnknown>, pasynccallback: windows_core::Ref<'_, IWSDAsyncCallback>) -> windows_core::Result; + fn EndSubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: windows_core::Ref<'_, IWSDAsyncResult>, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; fn UnsubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT) -> windows_core::Result<()>; - fn BeginUnsubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT, pasyncstate: Option<&windows_core::IUnknown>, pasynccallback: Option<&IWSDAsyncCallback>) -> windows_core::Result; - fn EndUnsubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: Option<&IWSDAsyncResult>) -> windows_core::Result<()>; + fn BeginUnsubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT, pasyncstate: windows_core::Ref<'_, windows_core::IUnknown>, pasynccallback: windows_core::Ref<'_, IWSDAsyncCallback>) -> windows_core::Result; + fn EndUnsubscribeToMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: windows_core::Ref<'_, IWSDAsyncResult>) -> windows_core::Result<()>; fn RenewMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; - fn BeginRenewMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, pasyncstate: Option<&windows_core::IUnknown>, pasynccallback: Option<&IWSDAsyncCallback>) -> windows_core::Result; - fn EndRenewMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: Option<&IWSDAsyncResult>, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; + fn BeginRenewMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, pasyncstate: windows_core::Ref<'_, windows_core::IUnknown>, pasynccallback: windows_core::Ref<'_, IWSDAsyncCallback>) -> windows_core::Result; + fn EndRenewMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: windows_core::Ref<'_, IWSDAsyncResult>, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; fn GetStatusForMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; - fn BeginGetStatusForMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT, pasyncstate: Option<&windows_core::IUnknown>, pasynccallback: Option<&IWSDAsyncCallback>) -> windows_core::Result; - fn EndGetStatusForMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: Option<&IWSDAsyncResult>, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; + fn BeginGetStatusForMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT, pasyncstate: windows_core::Ref<'_, windows_core::IUnknown>, pasynccallback: windows_core::Ref<'_, IWSDAsyncCallback>) -> windows_core::Result; + fn EndGetStatusForMultipleOperations(&self, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: windows_core::Ref<'_, IWSDAsyncResult>, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::Result<()>; } impl IWSDServiceProxyEventing_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SubscribeToMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, punknown: *mut core::ffi::c_void, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDServiceProxyEventing_Impl::SubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), windows_core::from_raw_borrowed(&punknown), core::mem::transmute_copy(&pexpires), core::mem::transmute_copy(&pany), core::mem::transmute_copy(&ppexpires), core::mem::transmute_copy(&ppany)).into() + IWSDServiceProxyEventing_Impl::SubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&pexpires), core::mem::transmute_copy(&pany), core::mem::transmute_copy(&ppexpires), core::mem::transmute_copy(&ppany)).into() } unsafe extern "system" fn BeginSubscribeToMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, punknown: *mut core::ffi::c_void, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, pasyncstate: *mut core::ffi::c_void, pasynccallback: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWSDServiceProxyEventing_Impl::BeginSubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), windows_core::from_raw_borrowed(&punknown), core::mem::transmute_copy(&pexpires), core::mem::transmute_copy(&pany), windows_core::from_raw_borrowed(&pasyncstate), windows_core::from_raw_borrowed(&pasynccallback)) { + match IWSDServiceProxyEventing_Impl::BeginSubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&pexpires), core::mem::transmute_copy(&pany), core::mem::transmute_copy(&pasyncstate), core::mem::transmute_copy(&pasynccallback)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1980,7 +1980,7 @@ impl IWSDServiceProxyEventing_Vtbl { } unsafe extern "system" fn EndSubscribeToMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: *mut core::ffi::c_void, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDServiceProxyEventing_Impl::EndSubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), windows_core::from_raw_borrowed(&presult), core::mem::transmute_copy(&ppexpires), core::mem::transmute_copy(&ppany)).into() + IWSDServiceProxyEventing_Impl::EndSubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&presult), core::mem::transmute_copy(&ppexpires), core::mem::transmute_copy(&ppany)).into() } unsafe extern "system" fn UnsubscribeToMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1988,7 +1988,7 @@ impl IWSDServiceProxyEventing_Vtbl { } unsafe extern "system" fn BeginUnsubscribeToMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT, pasyncstate: *mut core::ffi::c_void, pasynccallback: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWSDServiceProxyEventing_Impl::BeginUnsubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&pany), windows_core::from_raw_borrowed(&pasyncstate), windows_core::from_raw_borrowed(&pasynccallback)) { + match IWSDServiceProxyEventing_Impl::BeginUnsubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&pany), core::mem::transmute_copy(&pasyncstate), core::mem::transmute_copy(&pasynccallback)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1998,7 +1998,7 @@ impl IWSDServiceProxyEventing_Vtbl { } unsafe extern "system" fn EndUnsubscribeToMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDServiceProxyEventing_Impl::EndUnsubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), windows_core::from_raw_borrowed(&presult)).into() + IWSDServiceProxyEventing_Impl::EndUnsubscribeToMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn RenewMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2006,7 +2006,7 @@ impl IWSDServiceProxyEventing_Vtbl { } unsafe extern "system" fn BeginRenewMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, pexpires: *const WSD_EVENTING_EXPIRES, pany: *const WSDXML_ELEMENT, pasyncstate: *mut core::ffi::c_void, pasynccallback: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWSDServiceProxyEventing_Impl::BeginRenewMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&pexpires), core::mem::transmute_copy(&pany), windows_core::from_raw_borrowed(&pasyncstate), windows_core::from_raw_borrowed(&pasynccallback)) { + match IWSDServiceProxyEventing_Impl::BeginRenewMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&pexpires), core::mem::transmute_copy(&pany), core::mem::transmute_copy(&pasyncstate), core::mem::transmute_copy(&pasynccallback)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2016,7 +2016,7 @@ impl IWSDServiceProxyEventing_Vtbl { } unsafe extern "system" fn EndRenewMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: *mut core::ffi::c_void, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDServiceProxyEventing_Impl::EndRenewMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), windows_core::from_raw_borrowed(&presult), core::mem::transmute_copy(&ppexpires), core::mem::transmute_copy(&ppany)).into() + IWSDServiceProxyEventing_Impl::EndRenewMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&presult), core::mem::transmute_copy(&ppexpires), core::mem::transmute_copy(&ppany)).into() } unsafe extern "system" fn GetStatusForMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2024,7 +2024,7 @@ impl IWSDServiceProxyEventing_Vtbl { } unsafe extern "system" fn BeginGetStatusForMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, pany: *const WSDXML_ELEMENT, pasyncstate: *mut core::ffi::c_void, pasynccallback: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWSDServiceProxyEventing_Impl::BeginGetStatusForMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&pany), windows_core::from_raw_borrowed(&pasyncstate), windows_core::from_raw_borrowed(&pasynccallback)) { + match IWSDServiceProxyEventing_Impl::BeginGetStatusForMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&pany), core::mem::transmute_copy(&pasyncstate), core::mem::transmute_copy(&pasynccallback)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2034,7 +2034,7 @@ impl IWSDServiceProxyEventing_Vtbl { } unsafe extern "system" fn EndGetStatusForMultipleOperations(this: *mut core::ffi::c_void, poperations: *const WSD_OPERATION, dwoperationcount: u32, presult: *mut core::ffi::c_void, ppexpires: *mut *mut WSD_EVENTING_EXPIRES, ppany: *mut *mut WSDXML_ELEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDServiceProxyEventing_Impl::EndGetStatusForMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), windows_core::from_raw_borrowed(&presult), core::mem::transmute_copy(&ppexpires), core::mem::transmute_copy(&ppany)).into() + IWSDServiceProxyEventing_Impl::EndGetStatusForMultipleOperations(this, core::mem::transmute_copy(&poperations), core::mem::transmute_copy(&dwoperationcount), core::mem::transmute_copy(&presult), core::mem::transmute_copy(&ppexpires), core::mem::transmute_copy(&ppany)).into() } Self { base__: IWSDServiceProxy_Vtbl::new::(), @@ -2773,7 +2773,7 @@ pub struct IWSDiscoveryProvider_Vtbl { } pub trait IWSDiscoveryProvider_Impl: windows_core::IUnknownImpl { fn SetAddressFamily(&self, dwaddressfamily: u32) -> windows_core::Result<()>; - fn Attach(&self, psink: Option<&IWSDiscoveryProviderNotify>) -> windows_core::Result<()>; + fn Attach(&self, psink: windows_core::Ref<'_, IWSDiscoveryProviderNotify>) -> windows_core::Result<()>; fn Detach(&self) -> windows_core::Result<()>; fn SearchById(&self, pszid: &windows_core::PCWSTR, psztag: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SearchByAddress(&self, pszaddress: &windows_core::PCWSTR, psztag: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -2788,7 +2788,7 @@ impl IWSDiscoveryProvider_Vtbl { } unsafe extern "system" fn Attach(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryProvider_Impl::Attach(this, windows_core::from_raw_borrowed(&psink)).into() + IWSDiscoveryProvider_Impl::Attach(this, core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn Detach(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2869,8 +2869,8 @@ pub struct IWSDiscoveryProviderNotify_Vtbl { pub SearchComplete: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT, } pub trait IWSDiscoveryProviderNotify_Impl: windows_core::IUnknownImpl { - fn Add(&self, pservice: Option<&IWSDiscoveredService>) -> windows_core::Result<()>; - fn Remove(&self, pservice: Option<&IWSDiscoveredService>) -> windows_core::Result<()>; + fn Add(&self, pservice: windows_core::Ref<'_, IWSDiscoveredService>) -> windows_core::Result<()>; + fn Remove(&self, pservice: windows_core::Ref<'_, IWSDiscoveredService>) -> windows_core::Result<()>; fn SearchFailed(&self, hr: windows_core::HRESULT, psztag: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SearchComplete(&self, psztag: &windows_core::PCWSTR) -> windows_core::Result<()>; } @@ -2878,11 +2878,11 @@ impl IWSDiscoveryProviderNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pservice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryProviderNotify_Impl::Add(this, windows_core::from_raw_borrowed(&pservice)).into() + IWSDiscoveryProviderNotify_Impl::Add(this, core::mem::transmute_copy(&pservice)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, pservice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryProviderNotify_Impl::Remove(this, windows_core::from_raw_borrowed(&pservice)).into() + IWSDiscoveryProviderNotify_Impl::Remove(this, core::mem::transmute_copy(&pservice)).into() } unsafe extern "system" fn SearchFailed(this: *mut core::ffi::c_void, hr: windows_core::HRESULT, psztag: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3064,17 +3064,17 @@ pub struct IWSDiscoveryPublisher_Vtbl { } pub trait IWSDiscoveryPublisher_Impl: windows_core::IUnknownImpl { fn SetAddressFamily(&self, dwaddressfamily: u32) -> windows_core::Result<()>; - fn RegisterNotificationSink(&self, psink: Option<&IWSDiscoveryPublisherNotify>) -> windows_core::Result<()>; - fn UnRegisterNotificationSink(&self, psink: Option<&IWSDiscoveryPublisherNotify>) -> windows_core::Result<()>; + fn RegisterNotificationSink(&self, psink: windows_core::Ref<'_, IWSDiscoveryPublisherNotify>) -> windows_core::Result<()>; + fn UnRegisterNotificationSink(&self, psink: windows_core::Ref<'_, IWSDiscoveryPublisherNotify>) -> windows_core::Result<()>; fn Publish(&self, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST) -> windows_core::Result<()>; fn UnPublish(&self, pszid: &windows_core::PCWSTR, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, pany: *const WSDXML_ELEMENT) -> windows_core::Result<()>; - fn MatchProbe(&self, pprobemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: Option<&IWSDMessageParameters>, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST) -> windows_core::Result<()>; - fn MatchResolve(&self, presolvemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: Option<&IWSDMessageParameters>, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST) -> windows_core::Result<()>; + fn MatchProbe(&self, pprobemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: windows_core::Ref<'_, IWSDMessageParameters>, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST) -> windows_core::Result<()>; + fn MatchResolve(&self, presolvemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: windows_core::Ref<'_, IWSDMessageParameters>, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST) -> windows_core::Result<()>; fn PublishEx(&self, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST, pheaderany: *const WSDXML_ELEMENT, preferenceparameterany: *const WSDXML_ELEMENT, ppolicyany: *const WSDXML_ELEMENT, pendpointreferenceany: *const WSDXML_ELEMENT, pany: *const WSDXML_ELEMENT) -> windows_core::Result<()>; - fn MatchProbeEx(&self, pprobemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: Option<&IWSDMessageParameters>, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST, pheaderany: *const WSDXML_ELEMENT, preferenceparameterany: *const WSDXML_ELEMENT, ppolicyany: *const WSDXML_ELEMENT, pendpointreferenceany: *const WSDXML_ELEMENT, pany: *const WSDXML_ELEMENT) -> windows_core::Result<()>; - fn MatchResolveEx(&self, presolvemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: Option<&IWSDMessageParameters>, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST, pheaderany: *const WSDXML_ELEMENT, preferenceparameterany: *const WSDXML_ELEMENT, ppolicyany: *const WSDXML_ELEMENT, pendpointreferenceany: *const WSDXML_ELEMENT, pany: *const WSDXML_ELEMENT) -> windows_core::Result<()>; - fn RegisterScopeMatchingRule(&self, pscopematchingrule: Option<&IWSDScopeMatchingRule>) -> windows_core::Result<()>; - fn UnRegisterScopeMatchingRule(&self, pscopematchingrule: Option<&IWSDScopeMatchingRule>) -> windows_core::Result<()>; + fn MatchProbeEx(&self, pprobemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: windows_core::Ref<'_, IWSDMessageParameters>, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST, pheaderany: *const WSDXML_ELEMENT, preferenceparameterany: *const WSDXML_ELEMENT, ppolicyany: *const WSDXML_ELEMENT, pendpointreferenceany: *const WSDXML_ELEMENT, pany: *const WSDXML_ELEMENT) -> windows_core::Result<()>; + fn MatchResolveEx(&self, presolvemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: windows_core::Ref<'_, IWSDMessageParameters>, pszid: &windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: &windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST, pheaderany: *const WSDXML_ELEMENT, preferenceparameterany: *const WSDXML_ELEMENT, ppolicyany: *const WSDXML_ELEMENT, pendpointreferenceany: *const WSDXML_ELEMENT, pany: *const WSDXML_ELEMENT) -> windows_core::Result<()>; + fn RegisterScopeMatchingRule(&self, pscopematchingrule: windows_core::Ref<'_, IWSDScopeMatchingRule>) -> windows_core::Result<()>; + fn UnRegisterScopeMatchingRule(&self, pscopematchingrule: windows_core::Ref<'_, IWSDScopeMatchingRule>) -> windows_core::Result<()>; fn GetXMLContext(&self) -> windows_core::Result; } impl IWSDiscoveryPublisher_Vtbl { @@ -3085,11 +3085,11 @@ impl IWSDiscoveryPublisher_Vtbl { } unsafe extern "system" fn RegisterNotificationSink(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryPublisher_Impl::RegisterNotificationSink(this, windows_core::from_raw_borrowed(&psink)).into() + IWSDiscoveryPublisher_Impl::RegisterNotificationSink(this, core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn UnRegisterNotificationSink(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryPublisher_Impl::UnRegisterNotificationSink(this, windows_core::from_raw_borrowed(&psink)).into() + IWSDiscoveryPublisher_Impl::UnRegisterNotificationSink(this, core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn Publish(this: *mut core::ffi::c_void, pszid: windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3101,11 +3101,11 @@ impl IWSDiscoveryPublisher_Vtbl { } unsafe extern "system" fn MatchProbe(this: *mut core::ffi::c_void, pprobemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: *mut core::ffi::c_void, pszid: windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryPublisher_Impl::MatchProbe(this, core::mem::transmute_copy(&pprobemessage), windows_core::from_raw_borrowed(&pmessageparameters), core::mem::transmute(&pszid), core::mem::transmute_copy(&ullmetadataversion), core::mem::transmute_copy(&ullinstanceid), core::mem::transmute_copy(&ullmessagenumber), core::mem::transmute(&pszsessionid), core::mem::transmute_copy(&ptypeslist), core::mem::transmute_copy(&pscopeslist), core::mem::transmute_copy(&pxaddrslist)).into() + IWSDiscoveryPublisher_Impl::MatchProbe(this, core::mem::transmute_copy(&pprobemessage), core::mem::transmute_copy(&pmessageparameters), core::mem::transmute(&pszid), core::mem::transmute_copy(&ullmetadataversion), core::mem::transmute_copy(&ullinstanceid), core::mem::transmute_copy(&ullmessagenumber), core::mem::transmute(&pszsessionid), core::mem::transmute_copy(&ptypeslist), core::mem::transmute_copy(&pscopeslist), core::mem::transmute_copy(&pxaddrslist)).into() } unsafe extern "system" fn MatchResolve(this: *mut core::ffi::c_void, presolvemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: *mut core::ffi::c_void, pszid: windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryPublisher_Impl::MatchResolve(this, core::mem::transmute_copy(&presolvemessage), windows_core::from_raw_borrowed(&pmessageparameters), core::mem::transmute(&pszid), core::mem::transmute_copy(&ullmetadataversion), core::mem::transmute_copy(&ullinstanceid), core::mem::transmute_copy(&ullmessagenumber), core::mem::transmute(&pszsessionid), core::mem::transmute_copy(&ptypeslist), core::mem::transmute_copy(&pscopeslist), core::mem::transmute_copy(&pxaddrslist)).into() + IWSDiscoveryPublisher_Impl::MatchResolve(this, core::mem::transmute_copy(&presolvemessage), core::mem::transmute_copy(&pmessageparameters), core::mem::transmute(&pszid), core::mem::transmute_copy(&ullmetadataversion), core::mem::transmute_copy(&ullinstanceid), core::mem::transmute_copy(&ullmessagenumber), core::mem::transmute(&pszsessionid), core::mem::transmute_copy(&ptypeslist), core::mem::transmute_copy(&pscopeslist), core::mem::transmute_copy(&pxaddrslist)).into() } unsafe extern "system" fn PublishEx(this: *mut core::ffi::c_void, pszid: windows_core::PCWSTR, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: windows_core::PCWSTR, ptypeslist: *const WSD_NAME_LIST, pscopeslist: *const WSD_URI_LIST, pxaddrslist: *const WSD_URI_LIST, pheaderany: *const WSDXML_ELEMENT, preferenceparameterany: *const WSDXML_ELEMENT, ppolicyany: *const WSDXML_ELEMENT, pendpointreferenceany: *const WSDXML_ELEMENT, pany: *const WSDXML_ELEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3132,7 +3132,7 @@ impl IWSDiscoveryPublisher_Vtbl { IWSDiscoveryPublisher_Impl::MatchProbeEx( this, core::mem::transmute_copy(&pprobemessage), - windows_core::from_raw_borrowed(&pmessageparameters), + core::mem::transmute_copy(&pmessageparameters), core::mem::transmute(&pszid), core::mem::transmute_copy(&ullmetadataversion), core::mem::transmute_copy(&ullinstanceid), @@ -3154,7 +3154,7 @@ impl IWSDiscoveryPublisher_Vtbl { IWSDiscoveryPublisher_Impl::MatchResolveEx( this, core::mem::transmute_copy(&presolvemessage), - windows_core::from_raw_borrowed(&pmessageparameters), + core::mem::transmute_copy(&pmessageparameters), core::mem::transmute(&pszid), core::mem::transmute_copy(&ullmetadataversion), core::mem::transmute_copy(&ullinstanceid), @@ -3173,11 +3173,11 @@ impl IWSDiscoveryPublisher_Vtbl { } unsafe extern "system" fn RegisterScopeMatchingRule(this: *mut core::ffi::c_void, pscopematchingrule: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryPublisher_Impl::RegisterScopeMatchingRule(this, windows_core::from_raw_borrowed(&pscopematchingrule)).into() + IWSDiscoveryPublisher_Impl::RegisterScopeMatchingRule(this, core::mem::transmute_copy(&pscopematchingrule)).into() } unsafe extern "system" fn UnRegisterScopeMatchingRule(this: *mut core::ffi::c_void, pscopematchingrule: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryPublisher_Impl::UnRegisterScopeMatchingRule(this, windows_core::from_raw_borrowed(&pscopematchingrule)).into() + IWSDiscoveryPublisher_Impl::UnRegisterScopeMatchingRule(this, core::mem::transmute_copy(&pscopematchingrule)).into() } unsafe extern "system" fn GetXMLContext(this: *mut core::ffi::c_void, ppcontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3234,18 +3234,18 @@ pub struct IWSDiscoveryPublisherNotify_Vtbl { pub ResolveHandler: unsafe extern "system" fn(*mut core::ffi::c_void, *const WSD_SOAP_MESSAGE, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWSDiscoveryPublisherNotify_Impl: windows_core::IUnknownImpl { - fn ProbeHandler(&self, psoap: *const WSD_SOAP_MESSAGE, pmessageparameters: Option<&IWSDMessageParameters>) -> windows_core::Result<()>; - fn ResolveHandler(&self, psoap: *const WSD_SOAP_MESSAGE, pmessageparameters: Option<&IWSDMessageParameters>) -> windows_core::Result<()>; + fn ProbeHandler(&self, psoap: *const WSD_SOAP_MESSAGE, pmessageparameters: windows_core::Ref<'_, IWSDMessageParameters>) -> windows_core::Result<()>; + fn ResolveHandler(&self, psoap: *const WSD_SOAP_MESSAGE, pmessageparameters: windows_core::Ref<'_, IWSDMessageParameters>) -> windows_core::Result<()>; } impl IWSDiscoveryPublisherNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ProbeHandler(this: *mut core::ffi::c_void, psoap: *const WSD_SOAP_MESSAGE, pmessageparameters: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryPublisherNotify_Impl::ProbeHandler(this, core::mem::transmute_copy(&psoap), windows_core::from_raw_borrowed(&pmessageparameters)).into() + IWSDiscoveryPublisherNotify_Impl::ProbeHandler(this, core::mem::transmute_copy(&psoap), core::mem::transmute_copy(&pmessageparameters)).into() } unsafe extern "system" fn ResolveHandler(this: *mut core::ffi::c_void, psoap: *const WSD_SOAP_MESSAGE, pmessageparameters: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWSDiscoveryPublisherNotify_Impl::ResolveHandler(this, core::mem::transmute_copy(&psoap), windows_core::from_raw_borrowed(&pmessageparameters)).into() + IWSDiscoveryPublisherNotify_Impl::ResolveHandler(this, core::mem::transmute_copy(&psoap), core::mem::transmute_copy(&pmessageparameters)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs index cd6385a177..0ea104f2ae 100644 --- a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs @@ -593,7 +593,7 @@ pub struct IGameStatisticsMgr_Vtbl { pub RemoveGameStatistics: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT, } pub trait IGameStatisticsMgr_Impl: windows_core::IUnknownImpl { - fn GetGameStatistics(&self, gdfbinarypath: &windows_core::PCWSTR, opentype: GAMESTATS_OPEN_TYPE, popenresult: *mut GAMESTATS_OPEN_RESULT, ppistats: *mut Option) -> windows_core::Result<()>; + fn GetGameStatistics(&self, gdfbinarypath: &windows_core::PCWSTR, opentype: GAMESTATS_OPEN_TYPE, popenresult: *mut GAMESTATS_OPEN_RESULT, ppistats: windows_core::OutRef<'_, IGameStatistics>) -> windows_core::Result<()>; fn RemoveGameStatistics(&self, gdfbinarypath: &windows_core::PCWSTR) -> windows_core::Result<()>; } impl IGameStatisticsMgr_Vtbl { diff --git a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs index 1c2e9aa9ba..c7ccea0e24 100644 --- a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs @@ -7872,7 +7872,7 @@ pub struct IEnumSpellingError_Vtbl { pub Next: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumSpellingError_Impl: windows_core::IUnknownImpl { - fn Next(&self, value: *mut Option) -> windows_core::HRESULT; + fn Next(&self, value: windows_core::OutRef<'_, ISpellingError>) -> windows_core::HRESULT; } impl IEnumSpellingError_Vtbl { pub const fn new() -> Self { @@ -8316,7 +8316,7 @@ pub struct IMLangLineBreakConsole_Vtbl { pub BreakLineA: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, windows_core::PCSTR, i32, i32, *mut i32, *mut i32) -> windows_core::HRESULT, } pub trait IMLangLineBreakConsole_Impl: windows_core::IUnknownImpl { - fn BreakLineML(&self, psrcmlstr: Option<&IMLangString>, lsrcpos: i32, lsrclen: i32, cmincolumns: i32, cmaxcolumns: i32, pllinelen: *mut i32, plskiplen: *mut i32) -> windows_core::Result<()>; + fn BreakLineML(&self, psrcmlstr: windows_core::Ref<'_, IMLangString>, lsrcpos: i32, lsrclen: i32, cmincolumns: i32, cmaxcolumns: i32, pllinelen: *mut i32, plskiplen: *mut i32) -> windows_core::Result<()>; fn BreakLineW(&self, locale: u32, pszsrc: &windows_core::PCWSTR, cchsrc: i32, cmaxcolumns: i32, pcchline: *mut i32, pcchskip: *mut i32) -> windows_core::Result<()>; fn BreakLineA(&self, locale: u32, ucodepage: u32, pszsrc: &windows_core::PCSTR, cchsrc: i32, cmaxcolumns: i32, pcchline: *mut i32, pcchskip: *mut i32) -> windows_core::Result<()>; } @@ -8324,7 +8324,7 @@ impl IMLangLineBreakConsole_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BreakLineML(this: *mut core::ffi::c_void, psrcmlstr: *mut core::ffi::c_void, lsrcpos: i32, lsrclen: i32, cmincolumns: i32, cmaxcolumns: i32, pllinelen: *mut i32, plskiplen: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLangLineBreakConsole_Impl::BreakLineML(this, windows_core::from_raw_borrowed(&psrcmlstr), core::mem::transmute_copy(&lsrcpos), core::mem::transmute_copy(&lsrclen), core::mem::transmute_copy(&cmincolumns), core::mem::transmute_copy(&cmaxcolumns), core::mem::transmute_copy(&pllinelen), core::mem::transmute_copy(&plskiplen)).into() + IMLangLineBreakConsole_Impl::BreakLineML(this, core::mem::transmute_copy(&psrcmlstr), core::mem::transmute_copy(&lsrcpos), core::mem::transmute_copy(&lsrclen), core::mem::transmute_copy(&cmincolumns), core::mem::transmute_copy(&cmaxcolumns), core::mem::transmute_copy(&pllinelen), core::mem::transmute_copy(&plskiplen)).into() } unsafe extern "system" fn BreakLineW(this: *mut core::ffi::c_void, locale: u32, pszsrc: windows_core::PCWSTR, cchsrc: i32, cmaxcolumns: i32, pcchline: *mut i32, pcchskip: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8379,8 +8379,8 @@ pub struct IMLangString_Vtbl { pub trait IMLangString_Impl: windows_core::IUnknownImpl { fn Sync(&self, fnoaccess: super::Foundation::BOOL) -> windows_core::Result<()>; fn GetLength(&self, pllen: *mut i32) -> windows_core::Result<()>; - fn SetMLStr(&self, ldestpos: i32, ldestlen: i32, psrcmlstr: Option<&windows_core::IUnknown>, lsrcpos: i32, lsrclen: i32) -> windows_core::Result<()>; - fn GetMLStr(&self, lsrcpos: i32, lsrclen: i32, punkouter: Option<&windows_core::IUnknown>, dwclscontext: u32, piid: *const windows_core::GUID, ppdestmlstr: *mut Option, pldestpos: *mut i32, pldestlen: *mut i32) -> windows_core::Result<()>; + fn SetMLStr(&self, ldestpos: i32, ldestlen: i32, psrcmlstr: windows_core::Ref<'_, windows_core::IUnknown>, lsrcpos: i32, lsrclen: i32) -> windows_core::Result<()>; + fn GetMLStr(&self, lsrcpos: i32, lsrclen: i32, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, dwclscontext: u32, piid: *const windows_core::GUID, ppdestmlstr: windows_core::OutRef<'_, windows_core::IUnknown>, pldestpos: *mut i32, pldestlen: *mut i32) -> windows_core::Result<()>; } impl IMLangString_Vtbl { pub const fn new() -> Self { @@ -8394,11 +8394,11 @@ impl IMLangString_Vtbl { } unsafe extern "system" fn SetMLStr(this: *mut core::ffi::c_void, ldestpos: i32, ldestlen: i32, psrcmlstr: *mut core::ffi::c_void, lsrcpos: i32, lsrclen: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLangString_Impl::SetMLStr(this, core::mem::transmute_copy(&ldestpos), core::mem::transmute_copy(&ldestlen), windows_core::from_raw_borrowed(&psrcmlstr), core::mem::transmute_copy(&lsrcpos), core::mem::transmute_copy(&lsrclen)).into() + IMLangString_Impl::SetMLStr(this, core::mem::transmute_copy(&ldestpos), core::mem::transmute_copy(&ldestlen), core::mem::transmute_copy(&psrcmlstr), core::mem::transmute_copy(&lsrcpos), core::mem::transmute_copy(&lsrclen)).into() } unsafe extern "system" fn GetMLStr(this: *mut core::ffi::c_void, lsrcpos: i32, lsrclen: i32, punkouter: *mut core::ffi::c_void, dwclscontext: u32, piid: *const windows_core::GUID, ppdestmlstr: *mut *mut core::ffi::c_void, pldestpos: *mut i32, pldestlen: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLangString_Impl::GetMLStr(this, core::mem::transmute_copy(&lsrcpos), core::mem::transmute_copy(&lsrclen), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&piid), core::mem::transmute_copy(&ppdestmlstr), core::mem::transmute_copy(&pldestpos), core::mem::transmute_copy(&pldestlen)).into() + IMLangString_Impl::GetMLStr(this, core::mem::transmute_copy(&lsrcpos), core::mem::transmute_copy(&lsrclen), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&piid), core::mem::transmute_copy(&ppdestmlstr), core::mem::transmute_copy(&pldestpos), core::mem::transmute_copy(&pldestlen)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -8464,9 +8464,9 @@ pub struct IMLangStringAStr_Vtbl { } pub trait IMLangStringAStr_Impl: IMLangString_Impl { fn SetAStr(&self, ldestpos: i32, ldestlen: i32, ucodepage: u32, pszsrc: &windows_core::PCSTR, cchsrc: i32, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; - fn SetStrBufA(&self, ldestpos: i32, ldestlen: i32, ucodepage: u32, psrcbuf: Option<&IMLangStringBufA>, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; + fn SetStrBufA(&self, ldestpos: i32, ldestlen: i32, ucodepage: u32, psrcbuf: windows_core::Ref<'_, IMLangStringBufA>, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; fn GetAStr(&self, lsrcpos: i32, lsrclen: i32, ucodepagein: u32, pucodepageout: *const u32, pszdest: windows_core::PSTR, cchdest: i32, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; - fn GetStrBufA(&self, lsrcpos: i32, lsrcmaxlen: i32, pudestcodepage: *mut u32, ppdestbuf: *mut Option, pldestlen: *mut i32) -> windows_core::Result<()>; + fn GetStrBufA(&self, lsrcpos: i32, lsrcmaxlen: i32, pudestcodepage: *mut u32, ppdestbuf: windows_core::OutRef<'_, IMLangStringBufA>, pldestlen: *mut i32) -> windows_core::Result<()>; fn LockAStr(&self, lsrcpos: i32, lsrclen: i32, lflags: i32, ucodepagein: u32, cchrequest: i32, pucodepageout: *mut u32, ppszdest: *mut windows_core::PSTR, pcchdest: *mut i32, pldestlen: *mut i32) -> windows_core::Result<()>; fn UnlockAStr(&self, pszsrc: &windows_core::PCSTR, cchsrc: i32, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; fn SetLocale(&self, ldestpos: i32, ldestlen: i32, locale: u32) -> windows_core::Result<()>; @@ -8480,7 +8480,7 @@ impl IMLangStringAStr_Vtbl { } unsafe extern "system" fn SetStrBufA(this: *mut core::ffi::c_void, ldestpos: i32, ldestlen: i32, ucodepage: u32, psrcbuf: *mut core::ffi::c_void, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLangStringAStr_Impl::SetStrBufA(this, core::mem::transmute_copy(&ldestpos), core::mem::transmute_copy(&ldestlen), core::mem::transmute_copy(&ucodepage), windows_core::from_raw_borrowed(&psrcbuf), core::mem::transmute_copy(&pcchactual), core::mem::transmute_copy(&plactuallen)).into() + IMLangStringAStr_Impl::SetStrBufA(this, core::mem::transmute_copy(&ldestpos), core::mem::transmute_copy(&ldestlen), core::mem::transmute_copy(&ucodepage), core::mem::transmute_copy(&psrcbuf), core::mem::transmute_copy(&pcchactual), core::mem::transmute_copy(&plactuallen)).into() } unsafe extern "system" fn GetAStr(this: *mut core::ffi::c_void, lsrcpos: i32, lsrclen: i32, ucodepagein: u32, pucodepageout: *const u32, pszdest: windows_core::PSTR, cchdest: i32, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8722,9 +8722,9 @@ pub struct IMLangStringWStr_Vtbl { } pub trait IMLangStringWStr_Impl: IMLangString_Impl { fn SetWStr(&self, ldestpos: i32, ldestlen: i32, pszsrc: &windows_core::PCWSTR, cchsrc: i32, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; - fn SetStrBufW(&self, ldestpos: i32, ldestlen: i32, psrcbuf: Option<&IMLangStringBufW>, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; + fn SetStrBufW(&self, ldestpos: i32, ldestlen: i32, psrcbuf: windows_core::Ref<'_, IMLangStringBufW>, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; fn GetWStr(&self, lsrcpos: i32, lsrclen: i32, pszdest: windows_core::PWSTR, cchdest: i32, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; - fn GetStrBufW(&self, lsrcpos: i32, lsrcmaxlen: i32, ppdestbuf: *mut Option, pldestlen: *mut i32) -> windows_core::Result<()>; + fn GetStrBufW(&self, lsrcpos: i32, lsrcmaxlen: i32, ppdestbuf: windows_core::OutRef<'_, IMLangStringBufW>, pldestlen: *mut i32) -> windows_core::Result<()>; fn LockWStr(&self, lsrcpos: i32, lsrclen: i32, lflags: i32, cchrequest: i32, ppszdest: *mut windows_core::PWSTR, pcchdest: *mut i32, pldestlen: *mut i32) -> windows_core::Result<()>; fn UnlockWStr(&self, pszsrc: &windows_core::PCWSTR, cchsrc: i32, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::Result<()>; fn SetLocale(&self, ldestpos: i32, ldestlen: i32, locale: u32) -> windows_core::Result<()>; @@ -8738,7 +8738,7 @@ impl IMLangStringWStr_Vtbl { } unsafe extern "system" fn SetStrBufW(this: *mut core::ffi::c_void, ldestpos: i32, ldestlen: i32, psrcbuf: *mut core::ffi::c_void, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMLangStringWStr_Impl::SetStrBufW(this, core::mem::transmute_copy(&ldestpos), core::mem::transmute_copy(&ldestlen), windows_core::from_raw_borrowed(&psrcbuf), core::mem::transmute_copy(&pcchactual), core::mem::transmute_copy(&plactuallen)).into() + IMLangStringWStr_Impl::SetStrBufW(this, core::mem::transmute_copy(&ldestpos), core::mem::transmute_copy(&ldestlen), core::mem::transmute_copy(&psrcbuf), core::mem::transmute_copy(&pcchactual), core::mem::transmute_copy(&plactuallen)).into() } unsafe extern "system" fn GetWStr(this: *mut core::ffi::c_void, lsrcpos: i32, lsrclen: i32, pszdest: windows_core::PWSTR, cchdest: i32, pcchactual: *mut i32, plactuallen: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9174,10 +9174,10 @@ pub trait IMultiLanguage2_Impl: windows_core::IUnknownImpl { fn EnumRfc1766(&self, langid: u16) -> windows_core::Result; fn GetRfc1766Info(&self, locale: u32, langid: u16, prfc1766info: *mut RFC1766INFO) -> windows_core::Result<()>; fn CreateConvertCharset(&self, uisrccodepage: u32, uidstcodepage: u32, dwproperty: u32) -> windows_core::Result; - fn ConvertStringInIStream(&self, pdwmode: *mut u32, dwflag: u32, lpfallback: &windows_core::PCWSTR, dwsrcencoding: u32, dwdstencoding: u32, pstmin: Option<&super::System::Com::IStream>, pstmout: Option<&super::System::Com::IStream>) -> windows_core::Result<()>; + fn ConvertStringInIStream(&self, pdwmode: *mut u32, dwflag: u32, lpfallback: &windows_core::PCWSTR, dwsrcencoding: u32, dwdstencoding: u32, pstmin: windows_core::Ref<'_, super::System::Com::IStream>, pstmout: windows_core::Ref<'_, super::System::Com::IStream>) -> windows_core::Result<()>; fn ConvertStringToUnicodeEx(&self, pdwmode: *mut u32, dwencoding: u32, psrcstr: &windows_core::PCSTR, pcsrcsize: *mut u32, pdststr: windows_core::PWSTR, pcdstsize: *mut u32, dwflag: u32, lpfallback: &windows_core::PCWSTR) -> windows_core::Result<()>; fn ConvertStringFromUnicodeEx(&self, pdwmode: *mut u32, dwencoding: u32, psrcstr: &windows_core::PCWSTR, pcsrcsize: *mut u32, pdststr: windows_core::PSTR, pcdstsize: *mut u32, dwflag: u32, lpfallback: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn DetectCodepageInIStream(&self, dwflag: u32, dwprefwincodepage: u32, pstmin: Option<&super::System::Com::IStream>, lpencoding: *mut DetectEncodingInfo, pnscores: *mut i32) -> windows_core::Result<()>; + fn DetectCodepageInIStream(&self, dwflag: u32, dwprefwincodepage: u32, pstmin: windows_core::Ref<'_, super::System::Com::IStream>, lpencoding: *mut DetectEncodingInfo, pnscores: *mut i32) -> windows_core::Result<()>; fn DetectInputCodepage(&self, dwflag: u32, dwprefwincodepage: u32, psrcstr: &windows_core::PCSTR, pcsrcsize: *mut i32, lpencoding: *mut DetectEncodingInfo, pnscores: *mut i32) -> windows_core::Result<()>; fn ValidateCodePage(&self, uicodepage: u32, hwnd: super::Foundation::HWND) -> windows_core::Result<()>; fn GetCodePageDescription(&self, uicodepage: u32, lcid: u32, lpwidecharstr: windows_core::PWSTR, cchwidechar: i32) -> windows_core::Result<()>; @@ -9288,7 +9288,7 @@ impl IMultiLanguage2_Vtbl { } unsafe extern "system" fn ConvertStringInIStream(this: *mut core::ffi::c_void, pdwmode: *mut u32, dwflag: u32, lpfallback: windows_core::PCWSTR, dwsrcencoding: u32, dwdstencoding: u32, pstmin: *mut core::ffi::c_void, pstmout: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMultiLanguage2_Impl::ConvertStringInIStream(this, core::mem::transmute_copy(&pdwmode), core::mem::transmute_copy(&dwflag), core::mem::transmute(&lpfallback), core::mem::transmute_copy(&dwsrcencoding), core::mem::transmute_copy(&dwdstencoding), windows_core::from_raw_borrowed(&pstmin), windows_core::from_raw_borrowed(&pstmout)).into() + IMultiLanguage2_Impl::ConvertStringInIStream(this, core::mem::transmute_copy(&pdwmode), core::mem::transmute_copy(&dwflag), core::mem::transmute(&lpfallback), core::mem::transmute_copy(&dwsrcencoding), core::mem::transmute_copy(&dwdstencoding), core::mem::transmute_copy(&pstmin), core::mem::transmute_copy(&pstmout)).into() } unsafe extern "system" fn ConvertStringToUnicodeEx(this: *mut core::ffi::c_void, pdwmode: *mut u32, dwencoding: u32, psrcstr: windows_core::PCSTR, pcsrcsize: *mut u32, pdststr: windows_core::PWSTR, pcdstsize: *mut u32, dwflag: u32, lpfallback: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9300,7 +9300,7 @@ impl IMultiLanguage2_Vtbl { } unsafe extern "system" fn DetectCodepageInIStream(this: *mut core::ffi::c_void, dwflag: u32, dwprefwincodepage: u32, pstmin: *mut core::ffi::c_void, lpencoding: *mut DetectEncodingInfo, pnscores: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMultiLanguage2_Impl::DetectCodepageInIStream(this, core::mem::transmute_copy(&dwflag), core::mem::transmute_copy(&dwprefwincodepage), windows_core::from_raw_borrowed(&pstmin), core::mem::transmute_copy(&lpencoding), core::mem::transmute_copy(&pnscores)).into() + IMultiLanguage2_Impl::DetectCodepageInIStream(this, core::mem::transmute_copy(&dwflag), core::mem::transmute_copy(&dwprefwincodepage), core::mem::transmute_copy(&pstmin), core::mem::transmute_copy(&lpencoding), core::mem::transmute_copy(&pnscores)).into() } unsafe extern "system" fn DetectInputCodepage(this: *mut core::ffi::c_void, dwflag: u32, dwprefwincodepage: u32, psrcstr: windows_core::PCSTR, pcsrcsize: *mut i32, lpencoding: *mut DetectEncodingInfo, pnscores: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9419,7 +9419,7 @@ pub struct IMultiLanguage3_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IMultiLanguage3_Impl: IMultiLanguage2_Impl { fn DetectOutboundCodePage(&self, dwflags: u32, lpwidecharstr: &windows_core::PCWSTR, cchwidechar: u32, puipreferredcodepages: *const u32, npreferredcodepages: u32, puidetectedcodepages: *mut u32, pndetectedcodepages: *mut u32, lpspecialchar: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn DetectOutboundCodePageInIStream(&self, dwflags: u32, pstrin: Option<&super::System::Com::IStream>, puipreferredcodepages: *const u32, npreferredcodepages: u32, puidetectedcodepages: *mut u32, pndetectedcodepages: *mut u32, lpspecialchar: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn DetectOutboundCodePageInIStream(&self, dwflags: u32, pstrin: windows_core::Ref<'_, super::System::Com::IStream>, puipreferredcodepages: *const u32, npreferredcodepages: u32, puidetectedcodepages: *mut u32, pndetectedcodepages: *mut u32, lpspecialchar: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IMultiLanguage3_Vtbl { @@ -9430,7 +9430,7 @@ impl IMultiLanguage3_Vtbl { } unsafe extern "system" fn DetectOutboundCodePageInIStream(this: *mut core::ffi::c_void, dwflags: u32, pstrin: *mut core::ffi::c_void, puipreferredcodepages: *const u32, npreferredcodepages: u32, puidetectedcodepages: *mut u32, pndetectedcodepages: *mut u32, lpspecialchar: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMultiLanguage3_Impl::DetectOutboundCodePageInIStream(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pstrin), core::mem::transmute_copy(&puipreferredcodepages), core::mem::transmute_copy(&npreferredcodepages), core::mem::transmute_copy(&puidetectedcodepages), core::mem::transmute_copy(&pndetectedcodepages), core::mem::transmute(&lpspecialchar)).into() + IMultiLanguage3_Impl::DetectOutboundCodePageInIStream(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pstrin), core::mem::transmute_copy(&puipreferredcodepages), core::mem::transmute_copy(&npreferredcodepages), core::mem::transmute_copy(&puidetectedcodepages), core::mem::transmute_copy(&pndetectedcodepages), core::mem::transmute(&lpspecialchar)).into() } Self { base__: IMultiLanguage2_Vtbl::new::(), @@ -9691,7 +9691,7 @@ pub trait ISpellCheckProvider_Impl: windows_core::IUnknownImpl { fn Id(&self) -> windows_core::Result; fn LocalizedName(&self) -> windows_core::Result; fn GetOptionDescription(&self, optionid: &windows_core::PCWSTR) -> windows_core::Result; - fn InitializeWordlist(&self, wordlisttype: WORDLIST_TYPE, words: Option<&super::System::Com::IEnumString>) -> windows_core::Result<()>; + fn InitializeWordlist(&self, wordlisttype: WORDLIST_TYPE, words: windows_core::Ref<'_, super::System::Com::IEnumString>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ISpellCheckProvider_Vtbl { @@ -9782,7 +9782,7 @@ impl ISpellCheckProvider_Vtbl { } unsafe extern "system" fn InitializeWordlist(this: *mut core::ffi::c_void, wordlisttype: WORDLIST_TYPE, words: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpellCheckProvider_Impl::InitializeWordlist(this, core::mem::transmute_copy(&wordlisttype), windows_core::from_raw_borrowed(&words)).into() + ISpellCheckProvider_Impl::InitializeWordlist(this, core::mem::transmute_copy(&wordlisttype), core::mem::transmute_copy(&words)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10011,7 +10011,7 @@ pub trait ISpellChecker_Impl: windows_core::IUnknownImpl { fn OptionIds(&self) -> windows_core::Result; fn Id(&self) -> windows_core::Result; fn LocalizedName(&self) -> windows_core::Result; - fn add_SpellCheckerChanged(&self, handler: Option<&ISpellCheckerChangedEventHandler>) -> windows_core::Result; + fn add_SpellCheckerChanged(&self, handler: windows_core::Ref<'_, ISpellCheckerChangedEventHandler>) -> windows_core::Result; fn remove_SpellCheckerChanged(&self, eventcookie: u32) -> windows_core::Result<()>; fn GetOptionDescription(&self, optionid: &windows_core::PCWSTR) -> windows_core::Result; fn ComprehensiveCheck(&self, text: &windows_core::PCWSTR) -> windows_core::Result; @@ -10103,7 +10103,7 @@ impl ISpellChecker_Vtbl { } unsafe extern "system" fn add_SpellCheckerChanged(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, eventcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpellChecker_Impl::add_SpellCheckerChanged(this, windows_core::from_raw_borrowed(&handler)) { + match ISpellChecker_Impl::add_SpellCheckerChanged(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { eventcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10215,13 +10215,13 @@ pub struct ISpellCheckerChangedEventHandler_Vtbl { pub Invoke: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISpellCheckerChangedEventHandler_Impl: windows_core::IUnknownImpl { - fn Invoke(&self, sender: Option<&ISpellChecker>) -> windows_core::Result<()>; + fn Invoke(&self, sender: windows_core::Ref<'_, ISpellChecker>) -> windows_core::Result<()>; } impl ISpellCheckerChangedEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpellCheckerChangedEventHandler_Impl::Invoke(this, windows_core::from_raw_borrowed(&sender)).into() + ISpellCheckerChangedEventHandler_Impl::Invoke(this, core::mem::transmute_copy(&sender)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Invoke: Invoke:: } } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs index bec54dc9a6..15e8337430 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/CompositionSwapchain/mod.rs @@ -482,7 +482,7 @@ pub struct IPresentationManager_Vtbl { pub GetNextPresentStatistics: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPresentationManager_Impl: windows_core::IUnknownImpl { - fn AddBufferFromResource(&self, resource: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn AddBufferFromResource(&self, resource: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn CreatePresentationSurface(&self, compositionsurfacehandle: super::super::Foundation::HANDLE) -> windows_core::Result; fn GetNextPresentId(&self) -> u64; fn SetTargetTime(&self, targettime: &SystemInterruptTime) -> windows_core::Result<()>; @@ -500,7 +500,7 @@ impl IPresentationManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddBufferFromResource(this: *mut core::ffi::c_void, resource: *mut core::ffi::c_void, presentationbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPresentationManager_Impl::AddBufferFromResource(this, windows_core::from_raw_borrowed(&resource)) { + match IPresentationManager_Impl::AddBufferFromResource(this, core::mem::transmute_copy(&resource)) { Ok(ok__) => { presentationbuffer.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -664,12 +664,12 @@ pub struct IPresentationSurface_Vtbl { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait IPresentationSurface_Impl: IPresentationContent_Impl { - fn SetBuffer(&self, presentationbuffer: Option<&IPresentationBuffer>) -> windows_core::Result<()>; + fn SetBuffer(&self, presentationbuffer: windows_core::Ref<'_, IPresentationBuffer>) -> windows_core::Result<()>; fn SetColorSpace(&self, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE) -> windows_core::Result<()>; fn SetAlphaMode(&self, alphamode: super::Dxgi::Common::DXGI_ALPHA_MODE) -> windows_core::Result<()>; fn SetSourceRect(&self, sourcerect: *const super::super::Foundation::RECT) -> windows_core::Result<()>; fn SetTransform(&self, transform: *const PresentationTransform) -> windows_core::Result<()>; - fn RestrictToOutput(&self, output: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn RestrictToOutput(&self, output: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetDisableReadback(&self, value: u8) -> windows_core::Result<()>; fn SetLetterboxingMargins(&self, leftletterboxsize: f32, topletterboxsize: f32, rightletterboxsize: f32, bottomletterboxsize: f32) -> windows_core::Result<()>; } @@ -678,7 +678,7 @@ impl IPresentationSurface_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetBuffer(this: *mut core::ffi::c_void, presentationbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPresentationSurface_Impl::SetBuffer(this, windows_core::from_raw_borrowed(&presentationbuffer)).into() + IPresentationSurface_Impl::SetBuffer(this, core::mem::transmute_copy(&presentationbuffer)).into() } unsafe extern "system" fn SetColorSpace(this: *mut core::ffi::c_void, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -698,7 +698,7 @@ impl IPresentationSurface_Vtbl { } unsafe extern "system" fn RestrictToOutput(this: *mut core::ffi::c_void, output: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPresentationSurface_Impl::RestrictToOutput(this, windows_core::from_raw_borrowed(&output)).into() + IPresentationSurface_Impl::RestrictToOutput(this, core::mem::transmute_copy(&output)).into() } unsafe extern "system" fn SetDisableReadback(this: *mut core::ffi::c_void, value: u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs index 0f5eaabe7a..eaddf793b9 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs @@ -268,7 +268,7 @@ pub trait IDXCoreAdapterFactory_Impl: windows_core::IUnknownImpl { fn CreateAdapterList(&self, numattributes: u32, filterattributes: *const windows_core::GUID, riid: *const windows_core::GUID, ppvadapterlist: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetAdapterByLuid(&self, adapterluid: *const super::super::Foundation::LUID, riid: *const windows_core::GUID, ppvadapter: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn IsNotificationTypeSupported(&self, notificationtype: DXCoreNotificationType) -> bool; - fn RegisterEventNotification(&self, dxcoreobject: Option<&windows_core::IUnknown>, notificationtype: DXCoreNotificationType, callbackfunction: PFN_DXCORE_NOTIFICATION_CALLBACK, callbackcontext: *const core::ffi::c_void) -> windows_core::Result; + fn RegisterEventNotification(&self, dxcoreobject: windows_core::Ref<'_, windows_core::IUnknown>, notificationtype: DXCoreNotificationType, callbackfunction: PFN_DXCORE_NOTIFICATION_CALLBACK, callbackcontext: *const core::ffi::c_void) -> windows_core::Result; fn UnregisterEventNotification(&self, eventcookie: u32) -> windows_core::Result<()>; } impl IDXCoreAdapterFactory_Vtbl { @@ -287,7 +287,7 @@ impl IDXCoreAdapterFactory_Vtbl { } unsafe extern "system" fn RegisterEventNotification(this: *mut core::ffi::c_void, dxcoreobject: *mut core::ffi::c_void, notificationtype: DXCoreNotificationType, callbackfunction: PFN_DXCORE_NOTIFICATION_CALLBACK, callbackcontext: *const core::ffi::c_void, eventcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXCoreAdapterFactory_Impl::RegisterEventNotification(this, windows_core::from_raw_borrowed(&dxcoreobject), core::mem::transmute_copy(¬ificationtype), core::mem::transmute_copy(&callbackfunction), core::mem::transmute_copy(&callbackcontext)) { + match IDXCoreAdapterFactory_Impl::RegisterEventNotification(this, core::mem::transmute_copy(&dxcoreobject), core::mem::transmute_copy(¬ificationtype), core::mem::transmute_copy(&callbackfunction), core::mem::transmute_copy(&callbackcontext)) { Ok(ok__) => { eventcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs index 9411516529..432c55fac8 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs @@ -2677,8 +2677,8 @@ pub trait ID2D1Bitmap_Impl: ID2D1Image_Impl { fn GetPixelSize(&self) -> Common::D2D_SIZE_U; fn GetPixelFormat(&self) -> Common::D2D1_PIXEL_FORMAT; fn GetDpi(&self, dpix: *mut f32, dpiy: *mut f32); - fn CopyFromBitmap(&self, destpoint: *const Common::D2D_POINT_2U, bitmap: Option<&ID2D1Bitmap>, srcrect: *const Common::D2D_RECT_U) -> windows_core::Result<()>; - fn CopyFromRenderTarget(&self, destpoint: *const Common::D2D_POINT_2U, rendertarget: Option<&ID2D1RenderTarget>, srcrect: *const Common::D2D_RECT_U) -> windows_core::Result<()>; + fn CopyFromBitmap(&self, destpoint: *const Common::D2D_POINT_2U, bitmap: windows_core::Ref<'_, ID2D1Bitmap>, srcrect: *const Common::D2D_RECT_U) -> windows_core::Result<()>; + fn CopyFromRenderTarget(&self, destpoint: *const Common::D2D_POINT_2U, rendertarget: windows_core::Ref<'_, ID2D1RenderTarget>, srcrect: *const Common::D2D_RECT_U) -> windows_core::Result<()>; fn CopyFromMemory(&self, dstrect: *const Common::D2D_RECT_U, srcdata: *const core::ffi::c_void, pitch: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] @@ -2702,11 +2702,11 @@ impl ID2D1Bitmap_Vtbl { } unsafe extern "system" fn CopyFromBitmap(this: *mut core::ffi::c_void, destpoint: *const Common::D2D_POINT_2U, bitmap: *mut core::ffi::c_void, srcrect: *const Common::D2D_RECT_U) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Bitmap_Impl::CopyFromBitmap(this, core::mem::transmute_copy(&destpoint), windows_core::from_raw_borrowed(&bitmap), core::mem::transmute_copy(&srcrect)).into() + ID2D1Bitmap_Impl::CopyFromBitmap(this, core::mem::transmute_copy(&destpoint), core::mem::transmute_copy(&bitmap), core::mem::transmute_copy(&srcrect)).into() } unsafe extern "system" fn CopyFromRenderTarget(this: *mut core::ffi::c_void, destpoint: *const Common::D2D_POINT_2U, rendertarget: *mut core::ffi::c_void, srcrect: *const Common::D2D_RECT_U) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Bitmap_Impl::CopyFromRenderTarget(this, core::mem::transmute_copy(&destpoint), windows_core::from_raw_borrowed(&rendertarget), core::mem::transmute_copy(&srcrect)).into() + ID2D1Bitmap_Impl::CopyFromRenderTarget(this, core::mem::transmute_copy(&destpoint), core::mem::transmute_copy(&rendertarget), core::mem::transmute_copy(&srcrect)).into() } unsafe extern "system" fn CopyFromMemory(this: *mut core::ffi::c_void, dstrect: *const Common::D2D_RECT_U, srcdata: *const core::ffi::c_void, pitch: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2777,7 +2777,7 @@ pub struct ID2D1Bitmap1_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID2D1Bitmap1_Impl: ID2D1Bitmap_Impl { - fn GetColorContext(&self, colorcontext: *mut Option); + fn GetColorContext(&self, colorcontext: windows_core::OutRef<'_, ID2D1ColorContext>); fn GetOptions(&self) -> D2D1_BITMAP_OPTIONS; fn GetSurface(&self) -> windows_core::Result; fn Map(&self, options: D2D1_MAP_OPTIONS) -> windows_core::Result; @@ -2893,11 +2893,11 @@ pub trait ID2D1BitmapBrush_Impl: ID2D1Brush_Impl { fn SetExtendModeX(&self, extendmodex: D2D1_EXTEND_MODE); fn SetExtendModeY(&self, extendmodey: D2D1_EXTEND_MODE); fn SetInterpolationMode(&self, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE); - fn SetBitmap(&self, bitmap: Option<&ID2D1Bitmap>); + fn SetBitmap(&self, bitmap: windows_core::Ref<'_, ID2D1Bitmap>); fn GetExtendModeX(&self) -> D2D1_EXTEND_MODE; fn GetExtendModeY(&self) -> D2D1_EXTEND_MODE; fn GetInterpolationMode(&self) -> D2D1_BITMAP_INTERPOLATION_MODE; - fn GetBitmap(&self, bitmap: *mut Option); + fn GetBitmap(&self, bitmap: windows_core::OutRef<'_, ID2D1Bitmap>); } #[cfg(feature = "Foundation_Numerics")] impl ID2D1BitmapBrush_Vtbl { @@ -2916,7 +2916,7 @@ impl ID2D1BitmapBrush_Vtbl { } unsafe extern "system" fn SetBitmap(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1BitmapBrush_Impl::SetBitmap(this, windows_core::from_raw_borrowed(&bitmap)) + ID2D1BitmapBrush_Impl::SetBitmap(this, core::mem::transmute_copy(&bitmap)) } unsafe extern "system" fn GetExtendModeX(this: *mut core::ffi::c_void) -> D2D1_EXTEND_MODE { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3466,14 +3466,14 @@ pub struct ID2D1CommandList_Vtbl { pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ID2D1CommandList_Impl: ID2D1Image_Impl { - fn Stream(&self, sink: Option<&ID2D1CommandSink>) -> windows_core::Result<()>; + fn Stream(&self, sink: windows_core::Ref<'_, ID2D1CommandSink>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } impl ID2D1CommandList_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Stream(this: *mut core::ffi::c_void, sink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandList_Impl::Stream(this, windows_core::from_raw_borrowed(&sink)).into() + ID2D1CommandList_Impl::Stream(this, core::mem::transmute_copy(&sink)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3702,24 +3702,24 @@ pub trait ID2D1CommandSink_Impl: windows_core::IUnknownImpl { fn SetAntialiasMode(&self, antialiasmode: D2D1_ANTIALIAS_MODE) -> windows_core::Result<()>; fn SetTags(&self, tag1: u64, tag2: u64) -> windows_core::Result<()>; fn SetTextAntialiasMode(&self, textantialiasmode: D2D1_TEXT_ANTIALIAS_MODE) -> windows_core::Result<()>; - fn SetTextRenderingParams(&self, textrenderingparams: Option<&super::DirectWrite::IDWriteRenderingParams>) -> windows_core::Result<()>; + fn SetTextRenderingParams(&self, textrenderingparams: windows_core::Ref<'_, super::DirectWrite::IDWriteRenderingParams>) -> windows_core::Result<()>; fn SetTransform(&self, transform: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::Result<()>; fn SetPrimitiveBlend(&self, primitiveblend: D2D1_PRIMITIVE_BLEND) -> windows_core::Result<()>; fn SetUnitMode(&self, unitmode: D2D1_UNIT_MODE) -> windows_core::Result<()>; fn Clear(&self, color: *const Common::D2D1_COLOR_F) -> windows_core::Result<()>; - fn DrawGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: *const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION, foregroundbrush: Option<&ID2D1Brush>, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) -> windows_core::Result<()>; - fn DrawLine(&self, point0: &Common::D2D_POINT_2F, point1: &Common::D2D_POINT_2F, brush: Option<&ID2D1Brush>, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>) -> windows_core::Result<()>; - fn DrawGeometry(&self, geometry: Option<&ID2D1Geometry>, brush: Option<&ID2D1Brush>, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>) -> windows_core::Result<()>; - fn DrawRectangle(&self, rect: *const Common::D2D_RECT_F, brush: Option<&ID2D1Brush>, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>) -> windows_core::Result<()>; - fn DrawBitmap(&self, bitmap: Option<&ID2D1Bitmap>, destinationrectangle: *const Common::D2D_RECT_F, opacity: f32, interpolationmode: D2D1_INTERPOLATION_MODE, sourcerectangle: *const Common::D2D_RECT_F, perspectivetransform: *const Common::D2D_MATRIX_4X4_F) -> windows_core::Result<()>; - fn DrawImage(&self, image: Option<&ID2D1Image>, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE, compositemode: Common::D2D1_COMPOSITE_MODE) -> windows_core::Result<()>; - fn DrawGdiMetafile(&self, gdimetafile: Option<&ID2D1GdiMetafile>, targetoffset: *const Common::D2D_POINT_2F) -> windows_core::Result<()>; - fn FillMesh(&self, mesh: Option<&ID2D1Mesh>, brush: Option<&ID2D1Brush>) -> windows_core::Result<()>; - fn FillOpacityMask(&self, opacitymask: Option<&ID2D1Bitmap>, brush: Option<&ID2D1Brush>, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F) -> windows_core::Result<()>; - fn FillGeometry(&self, geometry: Option<&ID2D1Geometry>, brush: Option<&ID2D1Brush>, opacitybrush: Option<&ID2D1Brush>) -> windows_core::Result<()>; - fn FillRectangle(&self, rect: *const Common::D2D_RECT_F, brush: Option<&ID2D1Brush>) -> windows_core::Result<()>; + fn DrawGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: *const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION, foregroundbrush: windows_core::Ref<'_, ID2D1Brush>, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) -> windows_core::Result<()>; + fn DrawLine(&self, point0: &Common::D2D_POINT_2F, point1: &Common::D2D_POINT_2F, brush: windows_core::Ref<'_, ID2D1Brush>, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>) -> windows_core::Result<()>; + fn DrawGeometry(&self, geometry: windows_core::Ref<'_, ID2D1Geometry>, brush: windows_core::Ref<'_, ID2D1Brush>, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>) -> windows_core::Result<()>; + fn DrawRectangle(&self, rect: *const Common::D2D_RECT_F, brush: windows_core::Ref<'_, ID2D1Brush>, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>) -> windows_core::Result<()>; + fn DrawBitmap(&self, bitmap: windows_core::Ref<'_, ID2D1Bitmap>, destinationrectangle: *const Common::D2D_RECT_F, opacity: f32, interpolationmode: D2D1_INTERPOLATION_MODE, sourcerectangle: *const Common::D2D_RECT_F, perspectivetransform: *const Common::D2D_MATRIX_4X4_F) -> windows_core::Result<()>; + fn DrawImage(&self, image: windows_core::Ref<'_, ID2D1Image>, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE, compositemode: Common::D2D1_COMPOSITE_MODE) -> windows_core::Result<()>; + fn DrawGdiMetafile(&self, gdimetafile: windows_core::Ref<'_, ID2D1GdiMetafile>, targetoffset: *const Common::D2D_POINT_2F) -> windows_core::Result<()>; + fn FillMesh(&self, mesh: windows_core::Ref<'_, ID2D1Mesh>, brush: windows_core::Ref<'_, ID2D1Brush>) -> windows_core::Result<()>; + fn FillOpacityMask(&self, opacitymask: windows_core::Ref<'_, ID2D1Bitmap>, brush: windows_core::Ref<'_, ID2D1Brush>, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F) -> windows_core::Result<()>; + fn FillGeometry(&self, geometry: windows_core::Ref<'_, ID2D1Geometry>, brush: windows_core::Ref<'_, ID2D1Brush>, opacitybrush: windows_core::Ref<'_, ID2D1Brush>) -> windows_core::Result<()>; + fn FillRectangle(&self, rect: *const Common::D2D_RECT_F, brush: windows_core::Ref<'_, ID2D1Brush>) -> windows_core::Result<()>; fn PushAxisAlignedClip(&self, cliprect: *const Common::D2D_RECT_F, antialiasmode: D2D1_ANTIALIAS_MODE) -> windows_core::Result<()>; - fn PushLayer(&self, layerparameters1: *const D2D1_LAYER_PARAMETERS1, layer: Option<&ID2D1Layer>) -> windows_core::Result<()>; + fn PushLayer(&self, layerparameters1: *const D2D1_LAYER_PARAMETERS1, layer: windows_core::Ref<'_, ID2D1Layer>) -> windows_core::Result<()>; fn PopAxisAlignedClip(&self) -> windows_core::Result<()>; fn PopLayer(&self) -> windows_core::Result<()>; } @@ -3748,7 +3748,7 @@ impl ID2D1CommandSink_Vtbl { } unsafe extern "system" fn SetTextRenderingParams(this: *mut core::ffi::c_void, textrenderingparams: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::SetTextRenderingParams(this, windows_core::from_raw_borrowed(&textrenderingparams)).into() + ID2D1CommandSink_Impl::SetTextRenderingParams(this, core::mem::transmute_copy(&textrenderingparams)).into() } unsafe extern "system" fn SetTransform(this: *mut core::ffi::c_void, transform: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3768,47 +3768,47 @@ impl ID2D1CommandSink_Vtbl { } unsafe extern "system" fn DrawGlyphRun(this: *mut core::ffi::c_void, baselineorigin: Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: *const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION, foregroundbrush: *mut core::ffi::c_void, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::DrawGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), windows_core::from_raw_borrowed(&foregroundbrush), core::mem::transmute_copy(&measuringmode)).into() + ID2D1CommandSink_Impl::DrawGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), core::mem::transmute_copy(&foregroundbrush), core::mem::transmute_copy(&measuringmode)).into() } unsafe extern "system" fn DrawLine(this: *mut core::ffi::c_void, point0: Common::D2D_POINT_2F, point1: Common::D2D_POINT_2F, brush: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::DrawLine(this, core::mem::transmute(&point0), core::mem::transmute(&point1), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle)).into() + ID2D1CommandSink_Impl::DrawLine(this, core::mem::transmute(&point0), core::mem::transmute(&point1), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle)).into() } unsafe extern "system" fn DrawGeometry(this: *mut core::ffi::c_void, geometry: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::DrawGeometry(this, windows_core::from_raw_borrowed(&geometry), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle)).into() + ID2D1CommandSink_Impl::DrawGeometry(this, core::mem::transmute_copy(&geometry), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle)).into() } unsafe extern "system" fn DrawRectangle(this: *mut core::ffi::c_void, rect: *const Common::D2D_RECT_F, brush: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::DrawRectangle(this, core::mem::transmute_copy(&rect), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle)).into() + ID2D1CommandSink_Impl::DrawRectangle(this, core::mem::transmute_copy(&rect), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle)).into() } unsafe extern "system" fn DrawBitmap(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void, destinationrectangle: *const Common::D2D_RECT_F, opacity: f32, interpolationmode: D2D1_INTERPOLATION_MODE, sourcerectangle: *const Common::D2D_RECT_F, perspectivetransform: *const Common::D2D_MATRIX_4X4_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::DrawBitmap(this, windows_core::from_raw_borrowed(&bitmap), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&opacity), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&sourcerectangle), core::mem::transmute_copy(&perspectivetransform)).into() + ID2D1CommandSink_Impl::DrawBitmap(this, core::mem::transmute_copy(&bitmap), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&opacity), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&sourcerectangle), core::mem::transmute_copy(&perspectivetransform)).into() } unsafe extern "system" fn DrawImage(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE, compositemode: Common::D2D1_COMPOSITE_MODE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::DrawImage(this, windows_core::from_raw_borrowed(&image), core::mem::transmute_copy(&targetoffset), core::mem::transmute_copy(&imagerectangle), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&compositemode)).into() + ID2D1CommandSink_Impl::DrawImage(this, core::mem::transmute_copy(&image), core::mem::transmute_copy(&targetoffset), core::mem::transmute_copy(&imagerectangle), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&compositemode)).into() } unsafe extern "system" fn DrawGdiMetafile(this: *mut core::ffi::c_void, gdimetafile: *mut core::ffi::c_void, targetoffset: *const Common::D2D_POINT_2F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::DrawGdiMetafile(this, windows_core::from_raw_borrowed(&gdimetafile), core::mem::transmute_copy(&targetoffset)).into() + ID2D1CommandSink_Impl::DrawGdiMetafile(this, core::mem::transmute_copy(&gdimetafile), core::mem::transmute_copy(&targetoffset)).into() } unsafe extern "system" fn FillMesh(this: *mut core::ffi::c_void, mesh: *mut core::ffi::c_void, brush: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::FillMesh(this, windows_core::from_raw_borrowed(&mesh), windows_core::from_raw_borrowed(&brush)).into() + ID2D1CommandSink_Impl::FillMesh(this, core::mem::transmute_copy(&mesh), core::mem::transmute_copy(&brush)).into() } unsafe extern "system" fn FillOpacityMask(this: *mut core::ffi::c_void, opacitymask: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::FillOpacityMask(this, windows_core::from_raw_borrowed(&opacitymask), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)).into() + ID2D1CommandSink_Impl::FillOpacityMask(this, core::mem::transmute_copy(&opacitymask), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)).into() } unsafe extern "system" fn FillGeometry(this: *mut core::ffi::c_void, geometry: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, opacitybrush: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::FillGeometry(this, windows_core::from_raw_borrowed(&geometry), windows_core::from_raw_borrowed(&brush), windows_core::from_raw_borrowed(&opacitybrush)).into() + ID2D1CommandSink_Impl::FillGeometry(this, core::mem::transmute_copy(&geometry), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&opacitybrush)).into() } unsafe extern "system" fn FillRectangle(this: *mut core::ffi::c_void, rect: *const Common::D2D_RECT_F, brush: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::FillRectangle(this, core::mem::transmute_copy(&rect), windows_core::from_raw_borrowed(&brush)).into() + ID2D1CommandSink_Impl::FillRectangle(this, core::mem::transmute_copy(&rect), core::mem::transmute_copy(&brush)).into() } unsafe extern "system" fn PushAxisAlignedClip(this: *mut core::ffi::c_void, cliprect: *const Common::D2D_RECT_F, antialiasmode: D2D1_ANTIALIAS_MODE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3816,7 +3816,7 @@ impl ID2D1CommandSink_Vtbl { } unsafe extern "system" fn PushLayer(this: *mut core::ffi::c_void, layerparameters1: *const D2D1_LAYER_PARAMETERS1, layer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink_Impl::PushLayer(this, core::mem::transmute_copy(&layerparameters1), windows_core::from_raw_borrowed(&layer)).into() + ID2D1CommandSink_Impl::PushLayer(this, core::mem::transmute_copy(&layerparameters1), core::mem::transmute_copy(&layer)).into() } unsafe extern "system" fn PopAxisAlignedClip(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3949,24 +3949,24 @@ pub struct ID2D1CommandSink2_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] pub trait ID2D1CommandSink2_Impl: ID2D1CommandSink1_Impl { - fn DrawInk(&self, ink: Option<&ID2D1Ink>, brush: Option<&ID2D1Brush>, inkstyle: Option<&ID2D1InkStyle>) -> windows_core::Result<()>; - fn DrawGradientMesh(&self, gradientmesh: Option<&ID2D1GradientMesh>) -> windows_core::Result<()>; - fn DrawGdiMetafile(&self, gdimetafile: Option<&ID2D1GdiMetafile>, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F) -> windows_core::Result<()>; + fn DrawInk(&self, ink: windows_core::Ref<'_, ID2D1Ink>, brush: windows_core::Ref<'_, ID2D1Brush>, inkstyle: windows_core::Ref<'_, ID2D1InkStyle>) -> windows_core::Result<()>; + fn DrawGradientMesh(&self, gradientmesh: windows_core::Ref<'_, ID2D1GradientMesh>) -> windows_core::Result<()>; + fn DrawGdiMetafile(&self, gdimetafile: windows_core::Ref<'_, ID2D1GdiMetafile>, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] impl ID2D1CommandSink2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DrawInk(this: *mut core::ffi::c_void, ink: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, inkstyle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink2_Impl::DrawInk(this, windows_core::from_raw_borrowed(&ink), windows_core::from_raw_borrowed(&brush), windows_core::from_raw_borrowed(&inkstyle)).into() + ID2D1CommandSink2_Impl::DrawInk(this, core::mem::transmute_copy(&ink), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&inkstyle)).into() } unsafe extern "system" fn DrawGradientMesh(this: *mut core::ffi::c_void, gradientmesh: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink2_Impl::DrawGradientMesh(this, windows_core::from_raw_borrowed(&gradientmesh)).into() + ID2D1CommandSink2_Impl::DrawGradientMesh(this, core::mem::transmute_copy(&gradientmesh)).into() } unsafe extern "system" fn DrawGdiMetafile(this: *mut core::ffi::c_void, gdimetafile: *mut core::ffi::c_void, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink2_Impl::DrawGdiMetafile(this, windows_core::from_raw_borrowed(&gdimetafile), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)).into() + ID2D1CommandSink2_Impl::DrawGdiMetafile(this, core::mem::transmute_copy(&gdimetafile), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)).into() } Self { base__: ID2D1CommandSink1_Vtbl::new::(), @@ -4009,14 +4009,14 @@ pub struct ID2D1CommandSink3_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] pub trait ID2D1CommandSink3_Impl: ID2D1CommandSink2_Impl { - fn DrawSpriteBatch(&self, spritebatch: Option<&ID2D1SpriteBatch>, startindex: u32, spritecount: u32, bitmap: Option<&ID2D1Bitmap>, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, spriteoptions: D2D1_SPRITE_OPTIONS) -> windows_core::Result<()>; + fn DrawSpriteBatch(&self, spritebatch: windows_core::Ref<'_, ID2D1SpriteBatch>, startindex: u32, spritecount: u32, bitmap: windows_core::Ref<'_, ID2D1Bitmap>, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, spriteoptions: D2D1_SPRITE_OPTIONS) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] impl ID2D1CommandSink3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DrawSpriteBatch(this: *mut core::ffi::c_void, spritebatch: *mut core::ffi::c_void, startindex: u32, spritecount: u32, bitmap: *mut core::ffi::c_void, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, spriteoptions: D2D1_SPRITE_OPTIONS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink3_Impl::DrawSpriteBatch(this, windows_core::from_raw_borrowed(&spritebatch), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&spritecount), windows_core::from_raw_borrowed(&bitmap), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&spriteoptions)).into() + ID2D1CommandSink3_Impl::DrawSpriteBatch(this, core::mem::transmute_copy(&spritebatch), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&spritecount), core::mem::transmute_copy(&bitmap), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&spriteoptions)).into() } Self { base__: ID2D1CommandSink2_Vtbl::new::(), DrawSpriteBatch: DrawSpriteBatch:: } } @@ -4098,14 +4098,14 @@ pub struct ID2D1CommandSink5_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] pub trait ID2D1CommandSink5_Impl: ID2D1CommandSink4_Impl { - fn BlendImage(&self, image: Option<&ID2D1Image>, blendmode: Common::D2D1_BLEND_MODE, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE) -> windows_core::Result<()>; + fn BlendImage(&self, image: windows_core::Ref<'_, ID2D1Image>, blendmode: Common::D2D1_BLEND_MODE, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] impl ID2D1CommandSink5_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BlendImage(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void, blendmode: Common::D2D1_BLEND_MODE, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1CommandSink5_Impl::BlendImage(this, windows_core::from_raw_borrowed(&image), core::mem::transmute_copy(&blendmode), core::mem::transmute_copy(&targetoffset), core::mem::transmute_copy(&imagerectangle), core::mem::transmute_copy(&interpolationmode)).into() + ID2D1CommandSink5_Impl::BlendImage(this, core::mem::transmute_copy(&image), core::mem::transmute_copy(&blendmode), core::mem::transmute_copy(&targetoffset), core::mem::transmute_copy(&imagerectangle), core::mem::transmute_copy(&interpolationmode)).into() } Self { base__: ID2D1CommandSink4_Vtbl::new::(), BlendImage: BlendImage:: } } @@ -4151,7 +4151,7 @@ pub struct ID2D1ComputeInfo_Vtbl { pub trait ID2D1ComputeInfo_Impl: ID2D1RenderInfo_Impl { fn SetComputeShaderConstantBuffer(&self, buffer: *const u8, buffercount: u32) -> windows_core::Result<()>; fn SetComputeShader(&self, shaderid: *const windows_core::GUID) -> windows_core::Result<()>; - fn SetResourceTexture(&self, textureindex: u32, resourcetexture: Option<&ID2D1ResourceTexture>) -> windows_core::Result<()>; + fn SetResourceTexture(&self, textureindex: u32, resourcetexture: windows_core::Ref<'_, ID2D1ResourceTexture>) -> windows_core::Result<()>; } impl ID2D1ComputeInfo_Vtbl { pub const fn new() -> Self { @@ -4165,7 +4165,7 @@ impl ID2D1ComputeInfo_Vtbl { } unsafe extern "system" fn SetResourceTexture(this: *mut core::ffi::c_void, textureindex: u32, resourcetexture: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1ComputeInfo_Impl::SetResourceTexture(this, core::mem::transmute_copy(&textureindex), windows_core::from_raw_borrowed(&resourcetexture)).into() + ID2D1ComputeInfo_Impl::SetResourceTexture(this, core::mem::transmute_copy(&textureindex), core::mem::transmute_copy(&resourcetexture)).into() } Self { base__: ID2D1RenderInfo_Vtbl::new::(), @@ -4207,14 +4207,14 @@ pub struct ID2D1ComputeTransform_Vtbl { pub CalculateThreadgroups: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::super::Foundation::RECT, *mut u32, *mut u32, *mut u32) -> windows_core::HRESULT, } pub trait ID2D1ComputeTransform_Impl: ID2D1Transform_Impl { - fn SetComputeInfo(&self, computeinfo: Option<&ID2D1ComputeInfo>) -> windows_core::Result<()>; + fn SetComputeInfo(&self, computeinfo: windows_core::Ref<'_, ID2D1ComputeInfo>) -> windows_core::Result<()>; fn CalculateThreadgroups(&self, outputrect: *const super::super::Foundation::RECT, dimensionx: *mut u32, dimensiony: *mut u32, dimensionz: *mut u32) -> windows_core::Result<()>; } impl ID2D1ComputeTransform_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetComputeInfo(this: *mut core::ffi::c_void, computeinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1ComputeTransform_Impl::SetComputeInfo(this, windows_core::from_raw_borrowed(&computeinfo)).into() + ID2D1ComputeTransform_Impl::SetComputeInfo(this, core::mem::transmute_copy(&computeinfo)).into() } unsafe extern "system" fn CalculateThreadgroups(this: *mut core::ffi::c_void, outputrect: *const super::super::Foundation::RECT, dimensionx: *mut u32, dimensiony: *mut u32, dimensionz: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4374,7 +4374,7 @@ pub struct ID2D1Device_Vtbl { #[cfg(all(feature = "Win32_Graphics_Imaging", feature = "Win32_Storage_Xps_Printing"))] pub trait ID2D1Device_Impl: ID2D1Resource_Impl { fn CreateDeviceContext(&self, options: D2D1_DEVICE_CONTEXT_OPTIONS) -> windows_core::Result; - fn CreatePrintControl(&self, wicfactory: Option<&super::Imaging::IWICImagingFactory>, documenttarget: Option<&super::super::Storage::Xps::Printing::IPrintDocumentPackageTarget>, printcontrolproperties: *const D2D1_PRINT_CONTROL_PROPERTIES) -> windows_core::Result; + fn CreatePrintControl(&self, wicfactory: windows_core::Ref<'_, super::Imaging::IWICImagingFactory>, documenttarget: windows_core::Ref<'_, super::super::Storage::Xps::Printing::IPrintDocumentPackageTarget>, printcontrolproperties: *const D2D1_PRINT_CONTROL_PROPERTIES) -> windows_core::Result; fn SetMaximumTextureMemory(&self, maximuminbytes: u64); fn GetMaximumTextureMemory(&self) -> u64; fn ClearResources(&self, millisecondssinceuse: u32); @@ -4394,7 +4394,7 @@ impl ID2D1Device_Vtbl { } unsafe extern "system" fn CreatePrintControl(this: *mut core::ffi::c_void, wicfactory: *mut core::ffi::c_void, documenttarget: *mut core::ffi::c_void, printcontrolproperties: *const D2D1_PRINT_CONTROL_PROPERTIES, printcontrol: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Device_Impl::CreatePrintControl(this, windows_core::from_raw_borrowed(&wicfactory), windows_core::from_raw_borrowed(&documenttarget), core::mem::transmute_copy(&printcontrolproperties)) { + match ID2D1Device_Impl::CreatePrintControl(this, core::mem::transmute_copy(&wicfactory), core::mem::transmute_copy(&documenttarget), core::mem::transmute_copy(&printcontrolproperties)) { Ok(ok__) => { printcontrol.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4542,7 +4542,7 @@ pub struct ID2D1Device2_Vtbl { #[cfg(all(feature = "Win32_Graphics_Dxgi", feature = "Win32_Graphics_Imaging", feature = "Win32_Storage_Xps_Printing"))] pub trait ID2D1Device2_Impl: ID2D1Device1_Impl { fn CreateDeviceContext(&self, options: D2D1_DEVICE_CONTEXT_OPTIONS) -> windows_core::Result; - fn FlushDeviceContexts(&self, bitmap: Option<&ID2D1Bitmap>); + fn FlushDeviceContexts(&self, bitmap: windows_core::Ref<'_, ID2D1Bitmap>); fn GetDxgiDevice(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Dxgi", feature = "Win32_Graphics_Imaging", feature = "Win32_Storage_Xps_Printing"))] @@ -4560,7 +4560,7 @@ impl ID2D1Device2_Vtbl { } unsafe extern "system" fn FlushDeviceContexts(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Device2_Impl::FlushDeviceContexts(this, windows_core::from_raw_borrowed(&bitmap)) + ID2D1Device2_Impl::FlushDeviceContexts(this, core::mem::transmute_copy(&bitmap)) } unsafe extern "system" fn GetDxgiDevice(this: *mut core::ffi::c_void, dxgidevice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5176,40 +5176,40 @@ pub struct ID2D1DeviceContext_Vtbl { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] pub trait ID2D1DeviceContext_Impl: ID2D1RenderTarget_Impl { fn CreateBitmap(&self, size: &Common::D2D_SIZE_U, sourcedata: *const core::ffi::c_void, pitch: u32, bitmapproperties: *const D2D1_BITMAP_PROPERTIES1) -> windows_core::Result; - fn CreateBitmapFromWicBitmap(&self, wicbitmapsource: Option<&super::Imaging::IWICBitmapSource>, bitmapproperties: *const D2D1_BITMAP_PROPERTIES1) -> windows_core::Result; + fn CreateBitmapFromWicBitmap(&self, wicbitmapsource: windows_core::Ref<'_, super::Imaging::IWICBitmapSource>, bitmapproperties: *const D2D1_BITMAP_PROPERTIES1) -> windows_core::Result; fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: *const u8, profilesize: u32) -> windows_core::Result; fn CreateColorContextFromFilename(&self, filename: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateColorContextFromWicColorContext(&self, wiccolorcontext: Option<&super::Imaging::IWICColorContext>) -> windows_core::Result; - fn CreateBitmapFromDxgiSurface(&self, surface: Option<&super::Dxgi::IDXGISurface>, bitmapproperties: *const D2D1_BITMAP_PROPERTIES1) -> windows_core::Result; + fn CreateColorContextFromWicColorContext(&self, wiccolorcontext: windows_core::Ref<'_, super::Imaging::IWICColorContext>) -> windows_core::Result; + fn CreateBitmapFromDxgiSurface(&self, surface: windows_core::Ref<'_, super::Dxgi::IDXGISurface>, bitmapproperties: *const D2D1_BITMAP_PROPERTIES1) -> windows_core::Result; fn CreateEffect(&self, effectid: *const windows_core::GUID) -> windows_core::Result; fn CreateGradientStopCollection(&self, straightalphagradientstops: *const Common::D2D1_GRADIENT_STOP, straightalphagradientstopscount: u32, preinterpolationspace: D2D1_COLOR_SPACE, postinterpolationspace: D2D1_COLOR_SPACE, bufferprecision: D2D1_BUFFER_PRECISION, extendmode: D2D1_EXTEND_MODE, colorinterpolationmode: D2D1_COLOR_INTERPOLATION_MODE) -> windows_core::Result; - fn CreateImageBrush(&self, image: Option<&ID2D1Image>, imagebrushproperties: *const D2D1_IMAGE_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES) -> windows_core::Result; - fn CreateBitmapBrush(&self, bitmap: Option<&ID2D1Bitmap>, bitmapbrushproperties: *const D2D1_BITMAP_BRUSH_PROPERTIES1, brushproperties: *const D2D1_BRUSH_PROPERTIES) -> windows_core::Result; + fn CreateImageBrush(&self, image: windows_core::Ref<'_, ID2D1Image>, imagebrushproperties: *const D2D1_IMAGE_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES) -> windows_core::Result; + fn CreateBitmapBrush(&self, bitmap: windows_core::Ref<'_, ID2D1Bitmap>, bitmapbrushproperties: *const D2D1_BITMAP_BRUSH_PROPERTIES1, brushproperties: *const D2D1_BRUSH_PROPERTIES) -> windows_core::Result; fn CreateCommandList(&self) -> windows_core::Result; fn IsDxgiFormatSupported(&self, format: super::Dxgi::Common::DXGI_FORMAT) -> super::super::Foundation::BOOL; fn IsBufferPrecisionSupported(&self, bufferprecision: D2D1_BUFFER_PRECISION) -> super::super::Foundation::BOOL; - fn GetImageLocalBounds(&self, image: Option<&ID2D1Image>) -> windows_core::Result; - fn GetImageWorldBounds(&self, image: Option<&ID2D1Image>) -> windows_core::Result; + fn GetImageLocalBounds(&self, image: windows_core::Ref<'_, ID2D1Image>) -> windows_core::Result; + fn GetImageWorldBounds(&self, image: windows_core::Ref<'_, ID2D1Image>) -> windows_core::Result; fn GetGlyphRunWorldBounds(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) -> windows_core::Result; - fn GetDevice(&self, device: *mut Option); - fn SetTarget(&self, image: Option<&ID2D1Image>); - fn GetTarget(&self, image: *mut Option); + fn GetDevice(&self, device: windows_core::OutRef<'_, ID2D1Device>); + fn SetTarget(&self, image: windows_core::Ref<'_, ID2D1Image>); + fn GetTarget(&self, image: windows_core::OutRef<'_, ID2D1Image>); fn SetRenderingControls(&self, renderingcontrols: *const D2D1_RENDERING_CONTROLS); fn GetRenderingControls(&self, renderingcontrols: *mut D2D1_RENDERING_CONTROLS); fn SetPrimitiveBlend(&self, primitiveblend: D2D1_PRIMITIVE_BLEND); fn GetPrimitiveBlend(&self) -> D2D1_PRIMITIVE_BLEND; fn SetUnitMode(&self, unitmode: D2D1_UNIT_MODE); fn GetUnitMode(&self) -> D2D1_UNIT_MODE; - fn DrawGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: *const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION, foregroundbrush: Option<&ID2D1Brush>, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); - fn DrawImage(&self, image: Option<&ID2D1Image>, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE, compositemode: Common::D2D1_COMPOSITE_MODE); - fn DrawGdiMetafile(&self, gdimetafile: Option<&ID2D1GdiMetafile>, targetoffset: *const Common::D2D_POINT_2F); - fn DrawBitmap(&self, bitmap: Option<&ID2D1Bitmap>, destinationrectangle: *const Common::D2D_RECT_F, opacity: f32, interpolationmode: D2D1_INTERPOLATION_MODE, sourcerectangle: *const Common::D2D_RECT_F, perspectivetransform: *const Common::D2D_MATRIX_4X4_F); - fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS1, layer: Option<&ID2D1Layer>); - fn InvalidateEffectInputRectangle(&self, effect: Option<&ID2D1Effect>, input: u32, inputrectangle: *const Common::D2D_RECT_F) -> windows_core::Result<()>; - fn GetEffectInvalidRectangleCount(&self, effect: Option<&ID2D1Effect>) -> windows_core::Result; - fn GetEffectInvalidRectangles(&self, effect: Option<&ID2D1Effect>, rectangles: *mut Common::D2D_RECT_F, rectanglescount: u32) -> windows_core::Result<()>; - fn GetEffectRequiredInputRectangles(&self, rendereffect: Option<&ID2D1Effect>, renderimagerectangle: *const Common::D2D_RECT_F, inputdescriptions: *const D2D1_EFFECT_INPUT_DESCRIPTION, requiredinputrects: *mut Common::D2D_RECT_F, inputcount: u32) -> windows_core::Result<()>; - fn FillOpacityMask(&self, opacitymask: Option<&ID2D1Bitmap>, brush: Option<&ID2D1Brush>, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F); + fn DrawGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: *const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION, foregroundbrush: windows_core::Ref<'_, ID2D1Brush>, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); + fn DrawImage(&self, image: windows_core::Ref<'_, ID2D1Image>, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE, compositemode: Common::D2D1_COMPOSITE_MODE); + fn DrawGdiMetafile(&self, gdimetafile: windows_core::Ref<'_, ID2D1GdiMetafile>, targetoffset: *const Common::D2D_POINT_2F); + fn DrawBitmap(&self, bitmap: windows_core::Ref<'_, ID2D1Bitmap>, destinationrectangle: *const Common::D2D_RECT_F, opacity: f32, interpolationmode: D2D1_INTERPOLATION_MODE, sourcerectangle: *const Common::D2D_RECT_F, perspectivetransform: *const Common::D2D_MATRIX_4X4_F); + fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS1, layer: windows_core::Ref<'_, ID2D1Layer>); + fn InvalidateEffectInputRectangle(&self, effect: windows_core::Ref<'_, ID2D1Effect>, input: u32, inputrectangle: *const Common::D2D_RECT_F) -> windows_core::Result<()>; + fn GetEffectInvalidRectangleCount(&self, effect: windows_core::Ref<'_, ID2D1Effect>) -> windows_core::Result; + fn GetEffectInvalidRectangles(&self, effect: windows_core::Ref<'_, ID2D1Effect>, rectangles: *mut Common::D2D_RECT_F, rectanglescount: u32) -> windows_core::Result<()>; + fn GetEffectRequiredInputRectangles(&self, rendereffect: windows_core::Ref<'_, ID2D1Effect>, renderimagerectangle: *const Common::D2D_RECT_F, inputdescriptions: *const D2D1_EFFECT_INPUT_DESCRIPTION, requiredinputrects: *mut Common::D2D_RECT_F, inputcount: u32) -> windows_core::Result<()>; + fn FillOpacityMask(&self, opacitymask: windows_core::Ref<'_, ID2D1Bitmap>, brush: windows_core::Ref<'_, ID2D1Brush>, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] impl ID2D1DeviceContext_Vtbl { @@ -5226,7 +5226,7 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn CreateBitmapFromWicBitmap(this: *mut core::ffi::c_void, wicbitmapsource: *mut core::ffi::c_void, bitmapproperties: *const D2D1_BITMAP_PROPERTIES1, bitmap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext_Impl::CreateBitmapFromWicBitmap(this, windows_core::from_raw_borrowed(&wicbitmapsource), core::mem::transmute_copy(&bitmapproperties)) { + match ID2D1DeviceContext_Impl::CreateBitmapFromWicBitmap(this, core::mem::transmute_copy(&wicbitmapsource), core::mem::transmute_copy(&bitmapproperties)) { Ok(ok__) => { bitmap.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5256,7 +5256,7 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn CreateColorContextFromWicColorContext(this: *mut core::ffi::c_void, wiccolorcontext: *mut core::ffi::c_void, colorcontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext_Impl::CreateColorContextFromWicColorContext(this, windows_core::from_raw_borrowed(&wiccolorcontext)) { + match ID2D1DeviceContext_Impl::CreateColorContextFromWicColorContext(this, core::mem::transmute_copy(&wiccolorcontext)) { Ok(ok__) => { colorcontext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5266,7 +5266,7 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn CreateBitmapFromDxgiSurface(this: *mut core::ffi::c_void, surface: *mut core::ffi::c_void, bitmapproperties: *const D2D1_BITMAP_PROPERTIES1, bitmap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext_Impl::CreateBitmapFromDxgiSurface(this, windows_core::from_raw_borrowed(&surface), core::mem::transmute_copy(&bitmapproperties)) { + match ID2D1DeviceContext_Impl::CreateBitmapFromDxgiSurface(this, core::mem::transmute_copy(&surface), core::mem::transmute_copy(&bitmapproperties)) { Ok(ok__) => { bitmap.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5296,7 +5296,7 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn CreateImageBrush(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void, imagebrushproperties: *const D2D1_IMAGE_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES, imagebrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext_Impl::CreateImageBrush(this, windows_core::from_raw_borrowed(&image), core::mem::transmute_copy(&imagebrushproperties), core::mem::transmute_copy(&brushproperties)) { + match ID2D1DeviceContext_Impl::CreateImageBrush(this, core::mem::transmute_copy(&image), core::mem::transmute_copy(&imagebrushproperties), core::mem::transmute_copy(&brushproperties)) { Ok(ok__) => { imagebrush.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5306,7 +5306,7 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn CreateBitmapBrush(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void, bitmapbrushproperties: *const D2D1_BITMAP_BRUSH_PROPERTIES1, brushproperties: *const D2D1_BRUSH_PROPERTIES, bitmapbrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext_Impl::CreateBitmapBrush(this, windows_core::from_raw_borrowed(&bitmap), core::mem::transmute_copy(&bitmapbrushproperties), core::mem::transmute_copy(&brushproperties)) { + match ID2D1DeviceContext_Impl::CreateBitmapBrush(this, core::mem::transmute_copy(&bitmap), core::mem::transmute_copy(&bitmapbrushproperties), core::mem::transmute_copy(&brushproperties)) { Ok(ok__) => { bitmapbrush.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5334,7 +5334,7 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn GetImageLocalBounds(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void, localbounds: *mut Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext_Impl::GetImageLocalBounds(this, windows_core::from_raw_borrowed(&image)) { + match ID2D1DeviceContext_Impl::GetImageLocalBounds(this, core::mem::transmute_copy(&image)) { Ok(ok__) => { localbounds.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5344,7 +5344,7 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn GetImageWorldBounds(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void, worldbounds: *mut Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext_Impl::GetImageWorldBounds(this, windows_core::from_raw_borrowed(&image)) { + match ID2D1DeviceContext_Impl::GetImageWorldBounds(this, core::mem::transmute_copy(&image)) { Ok(ok__) => { worldbounds.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5368,7 +5368,7 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn SetTarget(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::SetTarget(this, windows_core::from_raw_borrowed(&image)) + ID2D1DeviceContext_Impl::SetTarget(this, core::mem::transmute_copy(&image)) } unsafe extern "system" fn GetTarget(this: *mut core::ffi::c_void, image: *mut *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5400,31 +5400,31 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn DrawGlyphRun(this: *mut core::ffi::c_void, baselineorigin: Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: *const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION, foregroundbrush: *mut core::ffi::c_void, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::DrawGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), windows_core::from_raw_borrowed(&foregroundbrush), core::mem::transmute_copy(&measuringmode)) + ID2D1DeviceContext_Impl::DrawGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), core::mem::transmute_copy(&foregroundbrush), core::mem::transmute_copy(&measuringmode)) } unsafe extern "system" fn DrawImage(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE, compositemode: Common::D2D1_COMPOSITE_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::DrawImage(this, windows_core::from_raw_borrowed(&image), core::mem::transmute_copy(&targetoffset), core::mem::transmute_copy(&imagerectangle), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&compositemode)) + ID2D1DeviceContext_Impl::DrawImage(this, core::mem::transmute_copy(&image), core::mem::transmute_copy(&targetoffset), core::mem::transmute_copy(&imagerectangle), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&compositemode)) } unsafe extern "system" fn DrawGdiMetafile(this: *mut core::ffi::c_void, gdimetafile: *mut core::ffi::c_void, targetoffset: *const Common::D2D_POINT_2F) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::DrawGdiMetafile(this, windows_core::from_raw_borrowed(&gdimetafile), core::mem::transmute_copy(&targetoffset)) + ID2D1DeviceContext_Impl::DrawGdiMetafile(this, core::mem::transmute_copy(&gdimetafile), core::mem::transmute_copy(&targetoffset)) } unsafe extern "system" fn DrawBitmap(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void, destinationrectangle: *const Common::D2D_RECT_F, opacity: f32, interpolationmode: D2D1_INTERPOLATION_MODE, sourcerectangle: *const Common::D2D_RECT_F, perspectivetransform: *const Common::D2D_MATRIX_4X4_F) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::DrawBitmap(this, windows_core::from_raw_borrowed(&bitmap), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&opacity), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&sourcerectangle), core::mem::transmute_copy(&perspectivetransform)) + ID2D1DeviceContext_Impl::DrawBitmap(this, core::mem::transmute_copy(&bitmap), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&opacity), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&sourcerectangle), core::mem::transmute_copy(&perspectivetransform)) } unsafe extern "system" fn PushLayer(this: *mut core::ffi::c_void, layerparameters: *const D2D1_LAYER_PARAMETERS1, layer: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::PushLayer(this, core::mem::transmute_copy(&layerparameters), windows_core::from_raw_borrowed(&layer)) + ID2D1DeviceContext_Impl::PushLayer(this, core::mem::transmute_copy(&layerparameters), core::mem::transmute_copy(&layer)) } unsafe extern "system" fn InvalidateEffectInputRectangle(this: *mut core::ffi::c_void, effect: *mut core::ffi::c_void, input: u32, inputrectangle: *const Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::InvalidateEffectInputRectangle(this, windows_core::from_raw_borrowed(&effect), core::mem::transmute_copy(&input), core::mem::transmute_copy(&inputrectangle)).into() + ID2D1DeviceContext_Impl::InvalidateEffectInputRectangle(this, core::mem::transmute_copy(&effect), core::mem::transmute_copy(&input), core::mem::transmute_copy(&inputrectangle)).into() } unsafe extern "system" fn GetEffectInvalidRectangleCount(this: *mut core::ffi::c_void, effect: *mut core::ffi::c_void, rectanglecount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext_Impl::GetEffectInvalidRectangleCount(this, windows_core::from_raw_borrowed(&effect)) { + match ID2D1DeviceContext_Impl::GetEffectInvalidRectangleCount(this, core::mem::transmute_copy(&effect)) { Ok(ok__) => { rectanglecount.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5434,15 +5434,15 @@ impl ID2D1DeviceContext_Vtbl { } unsafe extern "system" fn GetEffectInvalidRectangles(this: *mut core::ffi::c_void, effect: *mut core::ffi::c_void, rectangles: *mut Common::D2D_RECT_F, rectanglescount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::GetEffectInvalidRectangles(this, windows_core::from_raw_borrowed(&effect), core::mem::transmute_copy(&rectangles), core::mem::transmute_copy(&rectanglescount)).into() + ID2D1DeviceContext_Impl::GetEffectInvalidRectangles(this, core::mem::transmute_copy(&effect), core::mem::transmute_copy(&rectangles), core::mem::transmute_copy(&rectanglescount)).into() } unsafe extern "system" fn GetEffectRequiredInputRectangles(this: *mut core::ffi::c_void, rendereffect: *mut core::ffi::c_void, renderimagerectangle: *const Common::D2D_RECT_F, inputdescriptions: *const D2D1_EFFECT_INPUT_DESCRIPTION, requiredinputrects: *mut Common::D2D_RECT_F, inputcount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::GetEffectRequiredInputRectangles(this, windows_core::from_raw_borrowed(&rendereffect), core::mem::transmute_copy(&renderimagerectangle), core::mem::transmute_copy(&inputdescriptions), core::mem::transmute_copy(&requiredinputrects), core::mem::transmute_copy(&inputcount)).into() + ID2D1DeviceContext_Impl::GetEffectRequiredInputRectangles(this, core::mem::transmute_copy(&rendereffect), core::mem::transmute_copy(&renderimagerectangle), core::mem::transmute_copy(&inputdescriptions), core::mem::transmute_copy(&requiredinputrects), core::mem::transmute_copy(&inputcount)).into() } unsafe extern "system" fn FillOpacityMask(this: *mut core::ffi::c_void, opacitymask: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext_Impl::FillOpacityMask(this, windows_core::from_raw_borrowed(&opacitymask), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)) + ID2D1DeviceContext_Impl::FillOpacityMask(this, core::mem::transmute_copy(&opacitymask), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)) } Self { base__: ID2D1RenderTarget_Vtbl::new::(), @@ -5534,16 +5534,16 @@ pub struct ID2D1DeviceContext1_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] pub trait ID2D1DeviceContext1_Impl: ID2D1DeviceContext_Impl { - fn CreateFilledGeometryRealization(&self, geometry: Option<&ID2D1Geometry>, flatteningtolerance: f32) -> windows_core::Result; - fn CreateStrokedGeometryRealization(&self, geometry: Option<&ID2D1Geometry>, flatteningtolerance: f32, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>) -> windows_core::Result; - fn DrawGeometryRealization(&self, geometryrealization: Option<&ID2D1GeometryRealization>, brush: Option<&ID2D1Brush>); + fn CreateFilledGeometryRealization(&self, geometry: windows_core::Ref<'_, ID2D1Geometry>, flatteningtolerance: f32) -> windows_core::Result; + fn CreateStrokedGeometryRealization(&self, geometry: windows_core::Ref<'_, ID2D1Geometry>, flatteningtolerance: f32, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>) -> windows_core::Result; + fn DrawGeometryRealization(&self, geometryrealization: windows_core::Ref<'_, ID2D1GeometryRealization>, brush: windows_core::Ref<'_, ID2D1Brush>); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] impl ID2D1DeviceContext1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFilledGeometryRealization(this: *mut core::ffi::c_void, geometry: *mut core::ffi::c_void, flatteningtolerance: f32, geometryrealization: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext1_Impl::CreateFilledGeometryRealization(this, windows_core::from_raw_borrowed(&geometry), core::mem::transmute_copy(&flatteningtolerance)) { + match ID2D1DeviceContext1_Impl::CreateFilledGeometryRealization(this, core::mem::transmute_copy(&geometry), core::mem::transmute_copy(&flatteningtolerance)) { Ok(ok__) => { geometryrealization.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5553,7 +5553,7 @@ impl ID2D1DeviceContext1_Vtbl { } unsafe extern "system" fn CreateStrokedGeometryRealization(this: *mut core::ffi::c_void, geometry: *mut core::ffi::c_void, flatteningtolerance: f32, strokewidth: f32, strokestyle: *mut core::ffi::c_void, geometryrealization: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext1_Impl::CreateStrokedGeometryRealization(this, windows_core::from_raw_borrowed(&geometry), core::mem::transmute_copy(&flatteningtolerance), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle)) { + match ID2D1DeviceContext1_Impl::CreateStrokedGeometryRealization(this, core::mem::transmute_copy(&geometry), core::mem::transmute_copy(&flatteningtolerance), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle)) { Ok(ok__) => { geometryrealization.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5563,7 +5563,7 @@ impl ID2D1DeviceContext1_Vtbl { } unsafe extern "system" fn DrawGeometryRealization(this: *mut core::ffi::c_void, geometryrealization: *mut core::ffi::c_void, brush: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext1_Impl::DrawGeometryRealization(this, windows_core::from_raw_borrowed(&geometryrealization), windows_core::from_raw_borrowed(&brush)) + ID2D1DeviceContext1_Impl::DrawGeometryRealization(this, core::mem::transmute_copy(&geometryrealization), core::mem::transmute_copy(&brush)) } Self { base__: ID2D1DeviceContext_Vtbl::new::(), @@ -5697,14 +5697,14 @@ pub trait ID2D1DeviceContext2_Impl: ID2D1DeviceContext1_Impl { fn CreateInk(&self, startpoint: *const D2D1_INK_POINT) -> windows_core::Result; fn CreateInkStyle(&self, inkstyleproperties: *const D2D1_INK_STYLE_PROPERTIES) -> windows_core::Result; fn CreateGradientMesh(&self, patches: *const D2D1_GRADIENT_MESH_PATCH, patchescount: u32) -> windows_core::Result; - fn CreateImageSourceFromWic(&self, wicbitmapsource: Option<&super::Imaging::IWICBitmapSource>, loadingoptions: D2D1_IMAGE_SOURCE_LOADING_OPTIONS, alphamode: Common::D2D1_ALPHA_MODE) -> windows_core::Result; + fn CreateImageSourceFromWic(&self, wicbitmapsource: windows_core::Ref<'_, super::Imaging::IWICBitmapSource>, loadingoptions: D2D1_IMAGE_SOURCE_LOADING_OPTIONS, alphamode: Common::D2D1_ALPHA_MODE) -> windows_core::Result; fn CreateLookupTable3D(&self, precision: D2D1_BUFFER_PRECISION, extents: *const u32, data: *const u8, datacount: u32, strides: *const u32) -> windows_core::Result; fn CreateImageSourceFromDxgi(&self, surfaces: *const Option, surfacecount: u32, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, options: D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS) -> windows_core::Result; - fn GetGradientMeshWorldBounds(&self, gradientmesh: Option<&ID2D1GradientMesh>) -> windows_core::Result; - fn DrawInk(&self, ink: Option<&ID2D1Ink>, brush: Option<&ID2D1Brush>, inkstyle: Option<&ID2D1InkStyle>); - fn DrawGradientMesh(&self, gradientmesh: Option<&ID2D1GradientMesh>); - fn DrawGdiMetafile(&self, gdimetafile: Option<&ID2D1GdiMetafile>, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F); - fn CreateTransformedImageSource(&self, imagesource: Option<&ID2D1ImageSource>, properties: *const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES) -> windows_core::Result; + fn GetGradientMeshWorldBounds(&self, gradientmesh: windows_core::Ref<'_, ID2D1GradientMesh>) -> windows_core::Result; + fn DrawInk(&self, ink: windows_core::Ref<'_, ID2D1Ink>, brush: windows_core::Ref<'_, ID2D1Brush>, inkstyle: windows_core::Ref<'_, ID2D1InkStyle>); + fn DrawGradientMesh(&self, gradientmesh: windows_core::Ref<'_, ID2D1GradientMesh>); + fn DrawGdiMetafile(&self, gdimetafile: windows_core::Ref<'_, ID2D1GdiMetafile>, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F); + fn CreateTransformedImageSource(&self, imagesource: windows_core::Ref<'_, ID2D1ImageSource>, properties: *const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] impl ID2D1DeviceContext2_Vtbl { @@ -5741,7 +5741,7 @@ impl ID2D1DeviceContext2_Vtbl { } unsafe extern "system" fn CreateImageSourceFromWic(this: *mut core::ffi::c_void, wicbitmapsource: *mut core::ffi::c_void, loadingoptions: D2D1_IMAGE_SOURCE_LOADING_OPTIONS, alphamode: Common::D2D1_ALPHA_MODE, imagesource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext2_Impl::CreateImageSourceFromWic(this, windows_core::from_raw_borrowed(&wicbitmapsource), core::mem::transmute_copy(&loadingoptions), core::mem::transmute_copy(&alphamode)) { + match ID2D1DeviceContext2_Impl::CreateImageSourceFromWic(this, core::mem::transmute_copy(&wicbitmapsource), core::mem::transmute_copy(&loadingoptions), core::mem::transmute_copy(&alphamode)) { Ok(ok__) => { imagesource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5771,7 +5771,7 @@ impl ID2D1DeviceContext2_Vtbl { } unsafe extern "system" fn GetGradientMeshWorldBounds(this: *mut core::ffi::c_void, gradientmesh: *mut core::ffi::c_void, pbounds: *mut Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext2_Impl::GetGradientMeshWorldBounds(this, windows_core::from_raw_borrowed(&gradientmesh)) { + match ID2D1DeviceContext2_Impl::GetGradientMeshWorldBounds(this, core::mem::transmute_copy(&gradientmesh)) { Ok(ok__) => { pbounds.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5781,19 +5781,19 @@ impl ID2D1DeviceContext2_Vtbl { } unsafe extern "system" fn DrawInk(this: *mut core::ffi::c_void, ink: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, inkstyle: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext2_Impl::DrawInk(this, windows_core::from_raw_borrowed(&ink), windows_core::from_raw_borrowed(&brush), windows_core::from_raw_borrowed(&inkstyle)) + ID2D1DeviceContext2_Impl::DrawInk(this, core::mem::transmute_copy(&ink), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&inkstyle)) } unsafe extern "system" fn DrawGradientMesh(this: *mut core::ffi::c_void, gradientmesh: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext2_Impl::DrawGradientMesh(this, windows_core::from_raw_borrowed(&gradientmesh)) + ID2D1DeviceContext2_Impl::DrawGradientMesh(this, core::mem::transmute_copy(&gradientmesh)) } unsafe extern "system" fn DrawGdiMetafile(this: *mut core::ffi::c_void, gdimetafile: *mut core::ffi::c_void, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext2_Impl::DrawGdiMetafile(this, windows_core::from_raw_borrowed(&gdimetafile), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)) + ID2D1DeviceContext2_Impl::DrawGdiMetafile(this, core::mem::transmute_copy(&gdimetafile), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)) } unsafe extern "system" fn CreateTransformedImageSource(this: *mut core::ffi::c_void, imagesource: *mut core::ffi::c_void, properties: *const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES, transformedimagesource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext2_Impl::CreateTransformedImageSource(this, windows_core::from_raw_borrowed(&imagesource), core::mem::transmute_copy(&properties)) { + match ID2D1DeviceContext2_Impl::CreateTransformedImageSource(this, core::mem::transmute_copy(&imagesource), core::mem::transmute_copy(&properties)) { Ok(ok__) => { transformedimagesource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5856,7 +5856,7 @@ pub struct ID2D1DeviceContext3_Vtbl { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] pub trait ID2D1DeviceContext3_Impl: ID2D1DeviceContext2_Impl { fn CreateSpriteBatch(&self) -> windows_core::Result; - fn DrawSpriteBatch(&self, spritebatch: Option<&ID2D1SpriteBatch>, startindex: u32, spritecount: u32, bitmap: Option<&ID2D1Bitmap>, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, spriteoptions: D2D1_SPRITE_OPTIONS); + fn DrawSpriteBatch(&self, spritebatch: windows_core::Ref<'_, ID2D1SpriteBatch>, startindex: u32, spritecount: u32, bitmap: windows_core::Ref<'_, ID2D1Bitmap>, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, spriteoptions: D2D1_SPRITE_OPTIONS); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] impl ID2D1DeviceContext3_Vtbl { @@ -5873,7 +5873,7 @@ impl ID2D1DeviceContext3_Vtbl { } unsafe extern "system" fn DrawSpriteBatch(this: *mut core::ffi::c_void, spritebatch: *mut core::ffi::c_void, startindex: u32, spritecount: u32, bitmap: *mut core::ffi::c_void, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, spriteoptions: D2D1_SPRITE_OPTIONS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext3_Impl::DrawSpriteBatch(this, windows_core::from_raw_borrowed(&spritebatch), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&spritecount), windows_core::from_raw_borrowed(&bitmap), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&spriteoptions)) + ID2D1DeviceContext3_Impl::DrawSpriteBatch(this, core::mem::transmute_copy(&spritebatch), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&spritecount), core::mem::transmute_copy(&bitmap), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&spriteoptions)) } Self { base__: ID2D1DeviceContext2_Vtbl::new::(), @@ -5983,12 +5983,12 @@ pub struct ID2D1DeviceContext4_Vtbl { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] pub trait ID2D1DeviceContext4_Impl: ID2D1DeviceContext3_Impl { fn CreateSvgGlyphStyle(&self) -> windows_core::Result; - fn DrawText(&self, string: &windows_core::PCWSTR, stringlength: u32, textformat: Option<&super::DirectWrite::IDWriteTextFormat>, layoutrect: *const Common::D2D_RECT_F, defaultfillbrush: Option<&ID2D1Brush>, svgglyphstyle: Option<&ID2D1SvgGlyphStyle>, colorpaletteindex: u32, options: D2D1_DRAW_TEXT_OPTIONS, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); - fn DrawTextLayout(&self, origin: &Common::D2D_POINT_2F, textlayout: Option<&super::DirectWrite::IDWriteTextLayout>, defaultfillbrush: Option<&ID2D1Brush>, svgglyphstyle: Option<&ID2D1SvgGlyphStyle>, colorpaletteindex: u32, options: D2D1_DRAW_TEXT_OPTIONS); + fn DrawText(&self, string: &windows_core::PCWSTR, stringlength: u32, textformat: windows_core::Ref<'_, super::DirectWrite::IDWriteTextFormat>, layoutrect: *const Common::D2D_RECT_F, defaultfillbrush: windows_core::Ref<'_, ID2D1Brush>, svgglyphstyle: windows_core::Ref<'_, ID2D1SvgGlyphStyle>, colorpaletteindex: u32, options: D2D1_DRAW_TEXT_OPTIONS, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); + fn DrawTextLayout(&self, origin: &Common::D2D_POINT_2F, textlayout: windows_core::Ref<'_, super::DirectWrite::IDWriteTextLayout>, defaultfillbrush: windows_core::Ref<'_, ID2D1Brush>, svgglyphstyle: windows_core::Ref<'_, ID2D1SvgGlyphStyle>, colorpaletteindex: u32, options: D2D1_DRAW_TEXT_OPTIONS); fn DrawColorBitmapGlyphRun(&self, glyphimageformat: super::DirectWrite::DWRITE_GLYPH_IMAGE_FORMATS, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE, bitmapsnapoption: D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION); - fn DrawSvgGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, defaultfillbrush: Option<&ID2D1Brush>, svgglyphstyle: Option<&ID2D1SvgGlyphStyle>, colorpaletteindex: u32, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); - fn GetColorBitmapGlyphImage(&self, glyphimageformat: super::DirectWrite::DWRITE_GLYPH_IMAGE_FORMATS, glyphorigin: &Common::D2D_POINT_2F, fontface: Option<&super::DirectWrite::IDWriteFontFace>, fontemsize: f32, glyphindex: u16, issideways: super::super::Foundation::BOOL, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, dpix: f32, dpiy: f32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut Option) -> windows_core::Result<()>; - fn GetSvgGlyphImage(&self, glyphorigin: &Common::D2D_POINT_2F, fontface: Option<&super::DirectWrite::IDWriteFontFace>, fontemsize: f32, glyphindex: u16, issideways: super::super::Foundation::BOOL, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, defaultfillbrush: Option<&ID2D1Brush>, svgglyphstyle: Option<&ID2D1SvgGlyphStyle>, colorpaletteindex: u32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut Option) -> windows_core::Result<()>; + fn DrawSvgGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, defaultfillbrush: windows_core::Ref<'_, ID2D1Brush>, svgglyphstyle: windows_core::Ref<'_, ID2D1SvgGlyphStyle>, colorpaletteindex: u32, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); + fn GetColorBitmapGlyphImage(&self, glyphimageformat: super::DirectWrite::DWRITE_GLYPH_IMAGE_FORMATS, glyphorigin: &Common::D2D_POINT_2F, fontface: windows_core::Ref<'_, super::DirectWrite::IDWriteFontFace>, fontemsize: f32, glyphindex: u16, issideways: super::super::Foundation::BOOL, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, dpix: f32, dpiy: f32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: windows_core::OutRef<'_, ID2D1Image>) -> windows_core::Result<()>; + fn GetSvgGlyphImage(&self, glyphorigin: &Common::D2D_POINT_2F, fontface: windows_core::Ref<'_, super::DirectWrite::IDWriteFontFace>, fontemsize: f32, glyphindex: u16, issideways: super::super::Foundation::BOOL, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, defaultfillbrush: windows_core::Ref<'_, ID2D1Brush>, svgglyphstyle: windows_core::Ref<'_, ID2D1SvgGlyphStyle>, colorpaletteindex: u32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: windows_core::OutRef<'_, ID2D1CommandList>) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] impl ID2D1DeviceContext4_Vtbl { @@ -6005,11 +6005,11 @@ impl ID2D1DeviceContext4_Vtbl { } unsafe extern "system" fn DrawText(this: *mut core::ffi::c_void, string: windows_core::PCWSTR, stringlength: u32, textformat: *mut core::ffi::c_void, layoutrect: *const Common::D2D_RECT_F, defaultfillbrush: *mut core::ffi::c_void, svgglyphstyle: *mut core::ffi::c_void, colorpaletteindex: u32, options: D2D1_DRAW_TEXT_OPTIONS, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext4_Impl::DrawText(this, core::mem::transmute(&string), core::mem::transmute_copy(&stringlength), windows_core::from_raw_borrowed(&textformat), core::mem::transmute_copy(&layoutrect), windows_core::from_raw_borrowed(&defaultfillbrush), windows_core::from_raw_borrowed(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&options), core::mem::transmute_copy(&measuringmode)) + ID2D1DeviceContext4_Impl::DrawText(this, core::mem::transmute(&string), core::mem::transmute_copy(&stringlength), core::mem::transmute_copy(&textformat), core::mem::transmute_copy(&layoutrect), core::mem::transmute_copy(&defaultfillbrush), core::mem::transmute_copy(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&options), core::mem::transmute_copy(&measuringmode)) } unsafe extern "system" fn DrawTextLayout(this: *mut core::ffi::c_void, origin: Common::D2D_POINT_2F, textlayout: *mut core::ffi::c_void, defaultfillbrush: *mut core::ffi::c_void, svgglyphstyle: *mut core::ffi::c_void, colorpaletteindex: u32, options: D2D1_DRAW_TEXT_OPTIONS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext4_Impl::DrawTextLayout(this, core::mem::transmute(&origin), windows_core::from_raw_borrowed(&textlayout), windows_core::from_raw_borrowed(&defaultfillbrush), windows_core::from_raw_borrowed(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&options)) + ID2D1DeviceContext4_Impl::DrawTextLayout(this, core::mem::transmute(&origin), core::mem::transmute_copy(&textlayout), core::mem::transmute_copy(&defaultfillbrush), core::mem::transmute_copy(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&options)) } unsafe extern "system" fn DrawColorBitmapGlyphRun(this: *mut core::ffi::c_void, glyphimageformat: super::DirectWrite::DWRITE_GLYPH_IMAGE_FORMATS, baselineorigin: Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE, bitmapsnapoption: D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6017,15 +6017,15 @@ impl ID2D1DeviceContext4_Vtbl { } unsafe extern "system" fn DrawSvgGlyphRun(this: *mut core::ffi::c_void, baselineorigin: Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, defaultfillbrush: *mut core::ffi::c_void, svgglyphstyle: *mut core::ffi::c_void, colorpaletteindex: u32, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext4_Impl::DrawSvgGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), windows_core::from_raw_borrowed(&defaultfillbrush), windows_core::from_raw_borrowed(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&measuringmode)) + ID2D1DeviceContext4_Impl::DrawSvgGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&defaultfillbrush), core::mem::transmute_copy(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&measuringmode)) } unsafe extern "system" fn GetColorBitmapGlyphImage(this: *mut core::ffi::c_void, glyphimageformat: super::DirectWrite::DWRITE_GLYPH_IMAGE_FORMATS, glyphorigin: Common::D2D_POINT_2F, fontface: *mut core::ffi::c_void, fontemsize: f32, glyphindex: u16, issideways: super::super::Foundation::BOOL, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, dpix: f32, dpiy: f32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext4_Impl::GetColorBitmapGlyphImage(this, core::mem::transmute_copy(&glyphimageformat), core::mem::transmute(&glyphorigin), windows_core::from_raw_borrowed(&fontface), core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&glyphindex), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy), core::mem::transmute_copy(&glyphtransform), core::mem::transmute_copy(&glyphimage)).into() + ID2D1DeviceContext4_Impl::GetColorBitmapGlyphImage(this, core::mem::transmute_copy(&glyphimageformat), core::mem::transmute(&glyphorigin), core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&glyphindex), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy), core::mem::transmute_copy(&glyphtransform), core::mem::transmute_copy(&glyphimage)).into() } unsafe extern "system" fn GetSvgGlyphImage(this: *mut core::ffi::c_void, glyphorigin: Common::D2D_POINT_2F, fontface: *mut core::ffi::c_void, fontemsize: f32, glyphindex: u16, issideways: super::super::Foundation::BOOL, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, defaultfillbrush: *mut core::ffi::c_void, svgglyphstyle: *mut core::ffi::c_void, colorpaletteindex: u32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext4_Impl::GetSvgGlyphImage(this, core::mem::transmute(&glyphorigin), windows_core::from_raw_borrowed(&fontface), core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&glyphindex), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&worldtransform), windows_core::from_raw_borrowed(&defaultfillbrush), windows_core::from_raw_borrowed(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&glyphtransform), core::mem::transmute_copy(&glyphimage)).into() + ID2D1DeviceContext4_Impl::GetSvgGlyphImage(this, core::mem::transmute(&glyphorigin), core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&glyphindex), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&defaultfillbrush), core::mem::transmute_copy(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&glyphtransform), core::mem::transmute_copy(&glyphimage)).into() } Self { base__: ID2D1DeviceContext3_Vtbl::new::(), @@ -6101,8 +6101,8 @@ pub struct ID2D1DeviceContext5_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1DeviceContext5_Impl: ID2D1DeviceContext4_Impl { - fn CreateSvgDocument(&self, inputxmlstream: Option<&super::super::System::Com::IStream>, viewportsize: &Common::D2D_SIZE_F) -> windows_core::Result; - fn DrawSvgDocument(&self, svgdocument: Option<&ID2D1SvgDocument>); + fn CreateSvgDocument(&self, inputxmlstream: windows_core::Ref<'_, super::super::System::Com::IStream>, viewportsize: &Common::D2D_SIZE_F) -> windows_core::Result; + fn DrawSvgDocument(&self, svgdocument: windows_core::Ref<'_, ID2D1SvgDocument>); fn CreateColorContextFromDxgiColorSpace(&self, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE) -> windows_core::Result; fn CreateColorContextFromSimpleColorProfile(&self, simpleprofile: *const D2D1_SIMPLE_COLOR_PROFILE) -> windows_core::Result; } @@ -6111,7 +6111,7 @@ impl ID2D1DeviceContext5_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateSvgDocument(this: *mut core::ffi::c_void, inputxmlstream: *mut core::ffi::c_void, viewportsize: Common::D2D_SIZE_F, svgdocument: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1DeviceContext5_Impl::CreateSvgDocument(this, windows_core::from_raw_borrowed(&inputxmlstream), core::mem::transmute(&viewportsize)) { + match ID2D1DeviceContext5_Impl::CreateSvgDocument(this, core::mem::transmute_copy(&inputxmlstream), core::mem::transmute(&viewportsize)) { Ok(ok__) => { svgdocument.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6121,7 +6121,7 @@ impl ID2D1DeviceContext5_Vtbl { } unsafe extern "system" fn DrawSvgDocument(this: *mut core::ffi::c_void, svgdocument: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext5_Impl::DrawSvgDocument(this, windows_core::from_raw_borrowed(&svgdocument)) + ID2D1DeviceContext5_Impl::DrawSvgDocument(this, core::mem::transmute_copy(&svgdocument)) } unsafe extern "system" fn CreateColorContextFromDxgiColorSpace(this: *mut core::ffi::c_void, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, colorcontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6188,14 +6188,14 @@ pub struct ID2D1DeviceContext6_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1DeviceContext6_Impl: ID2D1DeviceContext5_Impl { - fn BlendImage(&self, image: Option<&ID2D1Image>, blendmode: Common::D2D1_BLEND_MODE, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE); + fn BlendImage(&self, image: windows_core::Ref<'_, ID2D1Image>, blendmode: Common::D2D1_BLEND_MODE, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] impl ID2D1DeviceContext6_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BlendImage(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void, blendmode: Common::D2D1_BLEND_MODE, targetoffset: *const Common::D2D_POINT_2F, imagerectangle: *const Common::D2D_RECT_F, interpolationmode: D2D1_INTERPOLATION_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext6_Impl::BlendImage(this, windows_core::from_raw_borrowed(&image), core::mem::transmute_copy(&blendmode), core::mem::transmute_copy(&targetoffset), core::mem::transmute_copy(&imagerectangle), core::mem::transmute_copy(&interpolationmode)) + ID2D1DeviceContext6_Impl::BlendImage(this, core::mem::transmute_copy(&image), core::mem::transmute_copy(&blendmode), core::mem::transmute_copy(&targetoffset), core::mem::transmute_copy(&imagerectangle), core::mem::transmute_copy(&interpolationmode)) } Self { base__: ID2D1DeviceContext5_Vtbl::new::(), BlendImage: BlendImage:: } } @@ -6257,8 +6257,8 @@ pub struct ID2D1DeviceContext7_Vtbl { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1DeviceContext7_Impl: ID2D1DeviceContext6_Impl { fn GetPaintFeatureLevel(&self) -> super::DirectWrite::DWRITE_PAINT_FEATURE_LEVEL; - fn DrawPaintGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, defaultfillbrush: Option<&ID2D1Brush>, colorpaletteindex: u32, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); - fn DrawGlyphRunWithColorSupport(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: *const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION, foregroundbrush: Option<&ID2D1Brush>, svgglyphstyle: Option<&ID2D1SvgGlyphStyle>, colorpaletteindex: u32, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE, bitmapsnapoption: D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION); + fn DrawPaintGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, defaultfillbrush: windows_core::Ref<'_, ID2D1Brush>, colorpaletteindex: u32, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); + fn DrawGlyphRunWithColorSupport(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: *const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION, foregroundbrush: windows_core::Ref<'_, ID2D1Brush>, svgglyphstyle: windows_core::Ref<'_, ID2D1SvgGlyphStyle>, colorpaletteindex: u32, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE, bitmapsnapoption: D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] impl ID2D1DeviceContext7_Vtbl { @@ -6269,11 +6269,11 @@ impl ID2D1DeviceContext7_Vtbl { } unsafe extern "system" fn DrawPaintGlyphRun(this: *mut core::ffi::c_void, baselineorigin: Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, defaultfillbrush: *mut core::ffi::c_void, colorpaletteindex: u32, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext7_Impl::DrawPaintGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), windows_core::from_raw_borrowed(&defaultfillbrush), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&measuringmode)) + ID2D1DeviceContext7_Impl::DrawPaintGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&defaultfillbrush), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&measuringmode)) } unsafe extern "system" fn DrawGlyphRunWithColorSupport(this: *mut core::ffi::c_void, baselineorigin: Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: *const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION, foregroundbrush: *mut core::ffi::c_void, svgglyphstyle: *mut core::ffi::c_void, colorpaletteindex: u32, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE, bitmapsnapoption: D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DeviceContext7_Impl::DrawGlyphRunWithColorSupport(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), windows_core::from_raw_borrowed(&foregroundbrush), windows_core::from_raw_borrowed(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&bitmapsnapoption)) + ID2D1DeviceContext7_Impl::DrawGlyphRunWithColorSupport(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), core::mem::transmute_copy(&foregroundbrush), core::mem::transmute_copy(&svgglyphstyle), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&bitmapsnapoption)) } Self { base__: ID2D1DeviceContext6_Vtbl::new::(), @@ -6334,10 +6334,10 @@ pub struct ID2D1DrawInfo_Vtbl { } pub trait ID2D1DrawInfo_Impl: ID2D1RenderInfo_Impl { fn SetPixelShaderConstantBuffer(&self, buffer: *const u8, buffercount: u32) -> windows_core::Result<()>; - fn SetResourceTexture(&self, textureindex: u32, resourcetexture: Option<&ID2D1ResourceTexture>) -> windows_core::Result<()>; + fn SetResourceTexture(&self, textureindex: u32, resourcetexture: windows_core::Ref<'_, ID2D1ResourceTexture>) -> windows_core::Result<()>; fn SetVertexShaderConstantBuffer(&self, buffer: *const u8, buffercount: u32) -> windows_core::Result<()>; fn SetPixelShader(&self, shaderid: *const windows_core::GUID, pixeloptions: D2D1_PIXEL_OPTIONS) -> windows_core::Result<()>; - fn SetVertexProcessing(&self, vertexbuffer: Option<&ID2D1VertexBuffer>, vertexoptions: D2D1_VERTEX_OPTIONS, blenddescription: *const D2D1_BLEND_DESCRIPTION, vertexrange: *const D2D1_VERTEX_RANGE, vertexshader: *const windows_core::GUID) -> windows_core::Result<()>; + fn SetVertexProcessing(&self, vertexbuffer: windows_core::Ref<'_, ID2D1VertexBuffer>, vertexoptions: D2D1_VERTEX_OPTIONS, blenddescription: *const D2D1_BLEND_DESCRIPTION, vertexrange: *const D2D1_VERTEX_RANGE, vertexshader: *const windows_core::GUID) -> windows_core::Result<()>; } impl ID2D1DrawInfo_Vtbl { pub const fn new() -> Self { @@ -6347,7 +6347,7 @@ impl ID2D1DrawInfo_Vtbl { } unsafe extern "system" fn SetResourceTexture(this: *mut core::ffi::c_void, textureindex: u32, resourcetexture: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DrawInfo_Impl::SetResourceTexture(this, core::mem::transmute_copy(&textureindex), windows_core::from_raw_borrowed(&resourcetexture)).into() + ID2D1DrawInfo_Impl::SetResourceTexture(this, core::mem::transmute_copy(&textureindex), core::mem::transmute_copy(&resourcetexture)).into() } unsafe extern "system" fn SetVertexShaderConstantBuffer(this: *mut core::ffi::c_void, buffer: *const u8, buffercount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6359,7 +6359,7 @@ impl ID2D1DrawInfo_Vtbl { } unsafe extern "system" fn SetVertexProcessing(this: *mut core::ffi::c_void, vertexbuffer: *mut core::ffi::c_void, vertexoptions: D2D1_VERTEX_OPTIONS, blenddescription: *const D2D1_BLEND_DESCRIPTION, vertexrange: *const D2D1_VERTEX_RANGE, vertexshader: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DrawInfo_Impl::SetVertexProcessing(this, windows_core::from_raw_borrowed(&vertexbuffer), core::mem::transmute_copy(&vertexoptions), core::mem::transmute_copy(&blenddescription), core::mem::transmute_copy(&vertexrange), core::mem::transmute_copy(&vertexshader)).into() + ID2D1DrawInfo_Impl::SetVertexProcessing(this, core::mem::transmute_copy(&vertexbuffer), core::mem::transmute_copy(&vertexoptions), core::mem::transmute_copy(&blenddescription), core::mem::transmute_copy(&vertexrange), core::mem::transmute_copy(&vertexshader)).into() } Self { base__: ID2D1RenderInfo_Vtbl::new::(), @@ -6399,13 +6399,13 @@ pub struct ID2D1DrawTransform_Vtbl { pub SetDrawInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ID2D1DrawTransform_Impl: ID2D1Transform_Impl { - fn SetDrawInfo(&self, drawinfo: Option<&ID2D1DrawInfo>) -> windows_core::Result<()>; + fn SetDrawInfo(&self, drawinfo: windows_core::Ref<'_, ID2D1DrawInfo>) -> windows_core::Result<()>; } impl ID2D1DrawTransform_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDrawInfo(this: *mut core::ffi::c_void, drawinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DrawTransform_Impl::SetDrawInfo(this, windows_core::from_raw_borrowed(&drawinfo)).into() + ID2D1DrawTransform_Impl::SetDrawInfo(this, core::mem::transmute_copy(&drawinfo)).into() } Self { base__: ID2D1Transform_Vtbl::new::(), SetDrawInfo: SetDrawInfo:: } } @@ -6471,8 +6471,8 @@ pub struct ID2D1DrawingStateBlock_Vtbl { pub trait ID2D1DrawingStateBlock_Impl: ID2D1Resource_Impl { fn GetDescription(&self, statedescription: *mut D2D1_DRAWING_STATE_DESCRIPTION); fn SetDescription(&self, statedescription: *const D2D1_DRAWING_STATE_DESCRIPTION); - fn SetTextRenderingParams(&self, textrenderingparams: Option<&super::DirectWrite::IDWriteRenderingParams>); - fn GetTextRenderingParams(&self, textrenderingparams: *mut Option); + fn SetTextRenderingParams(&self, textrenderingparams: windows_core::Ref<'_, super::DirectWrite::IDWriteRenderingParams>); + fn GetTextRenderingParams(&self, textrenderingparams: windows_core::OutRef<'_, super::DirectWrite::IDWriteRenderingParams>); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_DirectWrite"))] impl ID2D1DrawingStateBlock_Vtbl { @@ -6487,7 +6487,7 @@ impl ID2D1DrawingStateBlock_Vtbl { } unsafe extern "system" fn SetTextRenderingParams(this: *mut core::ffi::c_void, textrenderingparams: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1DrawingStateBlock_Impl::SetTextRenderingParams(this, windows_core::from_raw_borrowed(&textrenderingparams)) + ID2D1DrawingStateBlock_Impl::SetTextRenderingParams(this, core::mem::transmute_copy(&textrenderingparams)) } unsafe extern "system" fn GetTextRenderingParams(this: *mut core::ffi::c_void, textrenderingparams: *mut *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6615,17 +6615,17 @@ pub struct ID2D1Effect_Vtbl { pub GetOutput: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void), } pub trait ID2D1Effect_Impl: ID2D1Properties_Impl { - fn SetInput(&self, index: u32, input: Option<&ID2D1Image>, invalidate: super::super::Foundation::BOOL); + fn SetInput(&self, index: u32, input: windows_core::Ref<'_, ID2D1Image>, invalidate: super::super::Foundation::BOOL); fn SetInputCount(&self, inputcount: u32) -> windows_core::Result<()>; - fn GetInput(&self, index: u32, input: *mut Option); + fn GetInput(&self, index: u32, input: windows_core::OutRef<'_, ID2D1Image>); fn GetInputCount(&self) -> u32; - fn GetOutput(&self, outputimage: *mut Option); + fn GetOutput(&self, outputimage: windows_core::OutRef<'_, ID2D1Image>); } impl ID2D1Effect_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetInput(this: *mut core::ffi::c_void, index: u32, input: *mut core::ffi::c_void, invalidate: super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Effect_Impl::SetInput(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&input), core::mem::transmute_copy(&invalidate)) + ID2D1Effect_Impl::SetInput(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&input), core::mem::transmute_copy(&invalidate)) } unsafe extern "system" fn SetInputCount(this: *mut core::ffi::c_void, inputcount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6791,7 +6791,7 @@ pub trait ID2D1EffectContext_Impl: windows_core::IUnknownImpl { fn GetDpi(&self, dpix: *mut f32, dpiy: *mut f32); fn CreateEffect(&self, effectid: *const windows_core::GUID) -> windows_core::Result; fn GetMaximumSupportedFeatureLevel(&self, featurelevels: *const super::Direct3D::D3D_FEATURE_LEVEL, featurelevelscount: u32) -> windows_core::Result; - fn CreateTransformNodeFromEffect(&self, effect: Option<&ID2D1Effect>) -> windows_core::Result; + fn CreateTransformNodeFromEffect(&self, effect: windows_core::Ref<'_, ID2D1Effect>) -> windows_core::Result; fn CreateBlendTransform(&self, numinputs: u32, blenddescription: *const D2D1_BLEND_DESCRIPTION) -> windows_core::Result; fn CreateBorderTransform(&self, extendmodex: D2D1_EXTEND_MODE, extendmodey: D2D1_EXTEND_MODE) -> windows_core::Result; fn CreateOffsetTransform(&self, offset: &super::super::Foundation::POINT) -> windows_core::Result; @@ -6806,7 +6806,7 @@ pub trait ID2D1EffectContext_Impl: windows_core::IUnknownImpl { fn FindVertexBuffer(&self, resourceid: *const windows_core::GUID) -> windows_core::Result; fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: *const u8, profilesize: u32) -> windows_core::Result; fn CreateColorContextFromFilename(&self, filename: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateColorContextFromWicColorContext(&self, wiccolorcontext: Option<&super::Imaging::IWICColorContext>) -> windows_core::Result; + fn CreateColorContextFromWicColorContext(&self, wiccolorcontext: windows_core::Ref<'_, super::Imaging::IWICColorContext>) -> windows_core::Result; fn CheckFeatureSupport(&self, feature: D2D1_FEATURE, featuresupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()>; fn IsBufferPrecisionSupported(&self, bufferprecision: D2D1_BUFFER_PRECISION) -> super::super::Foundation::BOOL; } @@ -6839,7 +6839,7 @@ impl ID2D1EffectContext_Vtbl { } unsafe extern "system" fn CreateTransformNodeFromEffect(this: *mut core::ffi::c_void, effect: *mut core::ffi::c_void, transformnode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1EffectContext_Impl::CreateTransformNodeFromEffect(this, windows_core::from_raw_borrowed(&effect)) { + match ID2D1EffectContext_Impl::CreateTransformNodeFromEffect(this, core::mem::transmute_copy(&effect)) { Ok(ok__) => { transformnode.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6965,7 +6965,7 @@ impl ID2D1EffectContext_Vtbl { } unsafe extern "system" fn CreateColorContextFromWicColorContext(this: *mut core::ffi::c_void, wiccolorcontext: *mut core::ffi::c_void, colorcontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1EffectContext_Impl::CreateColorContextFromWicColorContext(this, windows_core::from_raw_borrowed(&wiccolorcontext)) { + match ID2D1EffectContext_Impl::CreateColorContextFromWicColorContext(this, core::mem::transmute_copy(&wiccolorcontext)) { Ok(ok__) => { colorcontext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7168,15 +7168,15 @@ pub struct ID2D1EffectImpl_Vtbl { pub SetGraph: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ID2D1EffectImpl_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, effectcontext: Option<&ID2D1EffectContext>, transformgraph: Option<&ID2D1TransformGraph>) -> windows_core::Result<()>; + fn Initialize(&self, effectcontext: windows_core::Ref<'_, ID2D1EffectContext>, transformgraph: windows_core::Ref<'_, ID2D1TransformGraph>) -> windows_core::Result<()>; fn PrepareForRender(&self, changetype: D2D1_CHANGE_TYPE) -> windows_core::Result<()>; - fn SetGraph(&self, transformgraph: Option<&ID2D1TransformGraph>) -> windows_core::Result<()>; + fn SetGraph(&self, transformgraph: windows_core::Ref<'_, ID2D1TransformGraph>) -> windows_core::Result<()>; } impl ID2D1EffectImpl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, effectcontext: *mut core::ffi::c_void, transformgraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1EffectImpl_Impl::Initialize(this, windows_core::from_raw_borrowed(&effectcontext), windows_core::from_raw_borrowed(&transformgraph)).into() + ID2D1EffectImpl_Impl::Initialize(this, core::mem::transmute_copy(&effectcontext), core::mem::transmute_copy(&transformgraph)).into() } unsafe extern "system" fn PrepareForRender(this: *mut core::ffi::c_void, changetype: D2D1_CHANGE_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7184,7 +7184,7 @@ impl ID2D1EffectImpl_Vtbl { } unsafe extern "system" fn SetGraph(this: *mut core::ffi::c_void, transformgraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1EffectImpl_Impl::SetGraph(this, windows_core::from_raw_borrowed(&transformgraph)).into() + ID2D1EffectImpl_Impl::SetGraph(this, core::mem::transmute_copy(&transformgraph)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7383,13 +7383,13 @@ pub trait ID2D1Factory_Impl: windows_core::IUnknownImpl { fn CreateRoundedRectangleGeometry(&self, roundedrectangle: *const D2D1_ROUNDED_RECT) -> windows_core::Result; fn CreateEllipseGeometry(&self, ellipse: *const D2D1_ELLIPSE) -> windows_core::Result; fn CreateGeometryGroup(&self, fillmode: Common::D2D1_FILL_MODE, geometries: *const Option, geometriescount: u32) -> windows_core::Result; - fn CreateTransformedGeometry(&self, sourcegeometry: Option<&ID2D1Geometry>, transform: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::Result; + fn CreateTransformedGeometry(&self, sourcegeometry: windows_core::Ref<'_, ID2D1Geometry>, transform: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::Result; fn CreatePathGeometry(&self) -> windows_core::Result; fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES, dashes: *const f32, dashescount: u32) -> windows_core::Result; - fn CreateDrawingStateBlock(&self, drawingstatedescription: *const D2D1_DRAWING_STATE_DESCRIPTION, textrenderingparams: Option<&super::DirectWrite::IDWriteRenderingParams>) -> windows_core::Result; - fn CreateWicBitmapRenderTarget(&self, target: Option<&super::Imaging::IWICBitmap>, rendertargetproperties: *const D2D1_RENDER_TARGET_PROPERTIES) -> windows_core::Result; + fn CreateDrawingStateBlock(&self, drawingstatedescription: *const D2D1_DRAWING_STATE_DESCRIPTION, textrenderingparams: windows_core::Ref<'_, super::DirectWrite::IDWriteRenderingParams>) -> windows_core::Result; + fn CreateWicBitmapRenderTarget(&self, target: windows_core::Ref<'_, super::Imaging::IWICBitmap>, rendertargetproperties: *const D2D1_RENDER_TARGET_PROPERTIES) -> windows_core::Result; fn CreateHwndRenderTarget(&self, rendertargetproperties: *const D2D1_RENDER_TARGET_PROPERTIES, hwndrendertargetproperties: *const D2D1_HWND_RENDER_TARGET_PROPERTIES) -> windows_core::Result; - fn CreateDxgiSurfaceRenderTarget(&self, dxgisurface: Option<&super::Dxgi::IDXGISurface>, rendertargetproperties: *const D2D1_RENDER_TARGET_PROPERTIES) -> windows_core::Result; + fn CreateDxgiSurfaceRenderTarget(&self, dxgisurface: windows_core::Ref<'_, super::Dxgi::IDXGISurface>, rendertargetproperties: *const D2D1_RENDER_TARGET_PROPERTIES) -> windows_core::Result; fn CreateDCRenderTarget(&self, rendertargetproperties: *const D2D1_RENDER_TARGET_PROPERTIES) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] @@ -7445,7 +7445,7 @@ impl ID2D1Factory_Vtbl { } unsafe extern "system" fn CreateTransformedGeometry(this: *mut core::ffi::c_void, sourcegeometry: *mut core::ffi::c_void, transform: *const super::super::super::Foundation::Numerics::Matrix3x2, transformedgeometry: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory_Impl::CreateTransformedGeometry(this, windows_core::from_raw_borrowed(&sourcegeometry), core::mem::transmute_copy(&transform)) { + match ID2D1Factory_Impl::CreateTransformedGeometry(this, core::mem::transmute_copy(&sourcegeometry), core::mem::transmute_copy(&transform)) { Ok(ok__) => { transformedgeometry.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7475,7 +7475,7 @@ impl ID2D1Factory_Vtbl { } unsafe extern "system" fn CreateDrawingStateBlock(this: *mut core::ffi::c_void, drawingstatedescription: *const D2D1_DRAWING_STATE_DESCRIPTION, textrenderingparams: *mut core::ffi::c_void, drawingstateblock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory_Impl::CreateDrawingStateBlock(this, core::mem::transmute_copy(&drawingstatedescription), windows_core::from_raw_borrowed(&textrenderingparams)) { + match ID2D1Factory_Impl::CreateDrawingStateBlock(this, core::mem::transmute_copy(&drawingstatedescription), core::mem::transmute_copy(&textrenderingparams)) { Ok(ok__) => { drawingstateblock.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7485,7 +7485,7 @@ impl ID2D1Factory_Vtbl { } unsafe extern "system" fn CreateWicBitmapRenderTarget(this: *mut core::ffi::c_void, target: *mut core::ffi::c_void, rendertargetproperties: *const D2D1_RENDER_TARGET_PROPERTIES, rendertarget: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory_Impl::CreateWicBitmapRenderTarget(this, windows_core::from_raw_borrowed(&target), core::mem::transmute_copy(&rendertargetproperties)) { + match ID2D1Factory_Impl::CreateWicBitmapRenderTarget(this, core::mem::transmute_copy(&target), core::mem::transmute_copy(&rendertargetproperties)) { Ok(ok__) => { rendertarget.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7505,7 +7505,7 @@ impl ID2D1Factory_Vtbl { } unsafe extern "system" fn CreateDxgiSurfaceRenderTarget(this: *mut core::ffi::c_void, dxgisurface: *mut core::ffi::c_void, rendertargetproperties: *const D2D1_RENDER_TARGET_PROPERTIES, rendertarget: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory_Impl::CreateDxgiSurfaceRenderTarget(this, windows_core::from_raw_borrowed(&dxgisurface), core::mem::transmute_copy(&rendertargetproperties)) { + match ID2D1Factory_Impl::CreateDxgiSurfaceRenderTarget(this, core::mem::transmute_copy(&dxgisurface), core::mem::transmute_copy(&rendertargetproperties)) { Ok(ok__) => { rendertarget.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7644,12 +7644,12 @@ pub struct ID2D1Factory1_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1Factory1_Impl: ID2D1Factory_Impl { - fn CreateDevice(&self, dxgidevice: Option<&super::Dxgi::IDXGIDevice>) -> windows_core::Result; + fn CreateDevice(&self, dxgidevice: windows_core::Ref<'_, super::Dxgi::IDXGIDevice>) -> windows_core::Result; fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES1, dashes: *const f32, dashescount: u32) -> windows_core::Result; fn CreatePathGeometry(&self) -> windows_core::Result; - fn CreateDrawingStateBlock(&self, drawingstatedescription: *const D2D1_DRAWING_STATE_DESCRIPTION1, textrenderingparams: Option<&super::DirectWrite::IDWriteRenderingParams>) -> windows_core::Result; - fn CreateGdiMetafile(&self, metafilestream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; - fn RegisterEffectFromStream(&self, classid: *const windows_core::GUID, propertyxml: Option<&super::super::System::Com::IStream>, bindings: *const D2D1_PROPERTY_BINDING, bindingscount: u32, effectfactory: PD2D1_EFFECT_FACTORY) -> windows_core::Result<()>; + fn CreateDrawingStateBlock(&self, drawingstatedescription: *const D2D1_DRAWING_STATE_DESCRIPTION1, textrenderingparams: windows_core::Ref<'_, super::DirectWrite::IDWriteRenderingParams>) -> windows_core::Result; + fn CreateGdiMetafile(&self, metafilestream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; + fn RegisterEffectFromStream(&self, classid: *const windows_core::GUID, propertyxml: windows_core::Ref<'_, super::super::System::Com::IStream>, bindings: *const D2D1_PROPERTY_BINDING, bindingscount: u32, effectfactory: PD2D1_EFFECT_FACTORY) -> windows_core::Result<()>; fn RegisterEffectFromString(&self, classid: *const windows_core::GUID, propertyxml: &windows_core::PCWSTR, bindings: *const D2D1_PROPERTY_BINDING, bindingscount: u32, effectfactory: PD2D1_EFFECT_FACTORY) -> windows_core::Result<()>; fn UnregisterEffect(&self, classid: *const windows_core::GUID) -> windows_core::Result<()>; fn GetRegisteredEffects(&self, effects: *mut windows_core::GUID, effectscount: u32, effectsreturned: *mut u32, effectsregistered: *mut u32) -> windows_core::Result<()>; @@ -7660,7 +7660,7 @@ impl ID2D1Factory1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, dxgidevice: *mut core::ffi::c_void, d2ddevice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory1_Impl::CreateDevice(this, windows_core::from_raw_borrowed(&dxgidevice)) { + match ID2D1Factory1_Impl::CreateDevice(this, core::mem::transmute_copy(&dxgidevice)) { Ok(ok__) => { d2ddevice.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7690,7 +7690,7 @@ impl ID2D1Factory1_Vtbl { } unsafe extern "system" fn CreateDrawingStateBlock(this: *mut core::ffi::c_void, drawingstatedescription: *const D2D1_DRAWING_STATE_DESCRIPTION1, textrenderingparams: *mut core::ffi::c_void, drawingstateblock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory1_Impl::CreateDrawingStateBlock(this, core::mem::transmute_copy(&drawingstatedescription), windows_core::from_raw_borrowed(&textrenderingparams)) { + match ID2D1Factory1_Impl::CreateDrawingStateBlock(this, core::mem::transmute_copy(&drawingstatedescription), core::mem::transmute_copy(&textrenderingparams)) { Ok(ok__) => { drawingstateblock.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7700,7 +7700,7 @@ impl ID2D1Factory1_Vtbl { } unsafe extern "system" fn CreateGdiMetafile(this: *mut core::ffi::c_void, metafilestream: *mut core::ffi::c_void, metafile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory1_Impl::CreateGdiMetafile(this, windows_core::from_raw_borrowed(&metafilestream)) { + match ID2D1Factory1_Impl::CreateGdiMetafile(this, core::mem::transmute_copy(&metafilestream)) { Ok(ok__) => { metafile.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7710,7 +7710,7 @@ impl ID2D1Factory1_Vtbl { } unsafe extern "system" fn RegisterEffectFromStream(this: *mut core::ffi::c_void, classid: *const windows_core::GUID, propertyxml: *mut core::ffi::c_void, bindings: *const D2D1_PROPERTY_BINDING, bindingscount: u32, effectfactory: PD2D1_EFFECT_FACTORY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Factory1_Impl::RegisterEffectFromStream(this, core::mem::transmute_copy(&classid), windows_core::from_raw_borrowed(&propertyxml), core::mem::transmute_copy(&bindings), core::mem::transmute_copy(&bindingscount), core::mem::transmute_copy(&effectfactory)).into() + ID2D1Factory1_Impl::RegisterEffectFromStream(this, core::mem::transmute_copy(&classid), core::mem::transmute_copy(&propertyxml), core::mem::transmute_copy(&bindings), core::mem::transmute_copy(&bindingscount), core::mem::transmute_copy(&effectfactory)).into() } unsafe extern "system" fn RegisterEffectFromString(this: *mut core::ffi::c_void, classid: *const windows_core::GUID, propertyxml: windows_core::PCWSTR, bindings: *const D2D1_PROPERTY_BINDING, bindingscount: u32, effectfactory: PD2D1_EFFECT_FACTORY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7786,14 +7786,14 @@ pub struct ID2D1Factory2_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1Factory2_Impl: ID2D1Factory1_Impl { - fn CreateDevice(&self, dxgidevice: Option<&super::Dxgi::IDXGIDevice>) -> windows_core::Result; + fn CreateDevice(&self, dxgidevice: windows_core::Ref<'_, super::Dxgi::IDXGIDevice>) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] impl ID2D1Factory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, dxgidevice: *mut core::ffi::c_void, d2ddevice1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory2_Impl::CreateDevice(this, windows_core::from_raw_borrowed(&dxgidevice)) { + match ID2D1Factory2_Impl::CreateDevice(this, core::mem::transmute_copy(&dxgidevice)) { Ok(ok__) => { d2ddevice1.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7841,14 +7841,14 @@ pub struct ID2D1Factory3_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1Factory3_Impl: ID2D1Factory2_Impl { - fn CreateDevice(&self, dxgidevice: Option<&super::Dxgi::IDXGIDevice>) -> windows_core::Result; + fn CreateDevice(&self, dxgidevice: windows_core::Ref<'_, super::Dxgi::IDXGIDevice>) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] impl ID2D1Factory3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, dxgidevice: *mut core::ffi::c_void, d2ddevice2: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory3_Impl::CreateDevice(this, windows_core::from_raw_borrowed(&dxgidevice)) { + match ID2D1Factory3_Impl::CreateDevice(this, core::mem::transmute_copy(&dxgidevice)) { Ok(ok__) => { d2ddevice2.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7896,14 +7896,14 @@ pub struct ID2D1Factory4_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1Factory4_Impl: ID2D1Factory3_Impl { - fn CreateDevice(&self, dxgidevice: Option<&super::Dxgi::IDXGIDevice>) -> windows_core::Result; + fn CreateDevice(&self, dxgidevice: windows_core::Ref<'_, super::Dxgi::IDXGIDevice>) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] impl ID2D1Factory4_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, dxgidevice: *mut core::ffi::c_void, d2ddevice3: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory4_Impl::CreateDevice(this, windows_core::from_raw_borrowed(&dxgidevice)) { + match ID2D1Factory4_Impl::CreateDevice(this, core::mem::transmute_copy(&dxgidevice)) { Ok(ok__) => { d2ddevice3.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7951,14 +7951,14 @@ pub struct ID2D1Factory5_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1Factory5_Impl: ID2D1Factory4_Impl { - fn CreateDevice(&self, dxgidevice: Option<&super::Dxgi::IDXGIDevice>) -> windows_core::Result; + fn CreateDevice(&self, dxgidevice: windows_core::Ref<'_, super::Dxgi::IDXGIDevice>) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] impl ID2D1Factory5_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, dxgidevice: *mut core::ffi::c_void, d2ddevice4: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory5_Impl::CreateDevice(this, windows_core::from_raw_borrowed(&dxgidevice)) { + match ID2D1Factory5_Impl::CreateDevice(this, core::mem::transmute_copy(&dxgidevice)) { Ok(ok__) => { d2ddevice4.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8006,14 +8006,14 @@ pub struct ID2D1Factory6_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1Factory6_Impl: ID2D1Factory5_Impl { - fn CreateDevice(&self, dxgidevice: Option<&super::Dxgi::IDXGIDevice>) -> windows_core::Result; + fn CreateDevice(&self, dxgidevice: windows_core::Ref<'_, super::Dxgi::IDXGIDevice>) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] impl ID2D1Factory6_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, dxgidevice: *mut core::ffi::c_void, d2ddevice5: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory6_Impl::CreateDevice(this, windows_core::from_raw_borrowed(&dxgidevice)) { + match ID2D1Factory6_Impl::CreateDevice(this, core::mem::transmute_copy(&dxgidevice)) { Ok(ok__) => { d2ddevice5.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8061,14 +8061,14 @@ pub struct ID2D1Factory7_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1Factory7_Impl: ID2D1Factory6_Impl { - fn CreateDevice(&self, dxgidevice: Option<&super::Dxgi::IDXGIDevice>) -> windows_core::Result; + fn CreateDevice(&self, dxgidevice: windows_core::Ref<'_, super::Dxgi::IDXGIDevice>) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] impl ID2D1Factory7_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, dxgidevice: *mut core::ffi::c_void, d2ddevice6: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory7_Impl::CreateDevice(this, windows_core::from_raw_borrowed(&dxgidevice)) { + match ID2D1Factory7_Impl::CreateDevice(this, core::mem::transmute_copy(&dxgidevice)) { Ok(ok__) => { d2ddevice6.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8116,14 +8116,14 @@ pub struct ID2D1Factory8_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] pub trait ID2D1Factory8_Impl: ID2D1Factory7_Impl { - fn CreateDevice(&self, dxgidevice: Option<&super::Dxgi::IDXGIDevice>) -> windows_core::Result; + fn CreateDevice(&self, dxgidevice: windows_core::Ref<'_, super::Dxgi::IDXGIDevice>) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging", feature = "Win32_System_Com"))] impl ID2D1Factory8_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, dxgidevice: *mut core::ffi::c_void, d2ddevice6: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Factory8_Impl::CreateDevice(this, windows_core::from_raw_borrowed(&dxgidevice)) { + match ID2D1Factory8_Impl::CreateDevice(this, core::mem::transmute_copy(&dxgidevice)) { Ok(ok__) => { d2ddevice6.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8230,7 +8230,7 @@ pub struct ID2D1GdiMetafile_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub trait ID2D1GdiMetafile_Impl: ID2D1Resource_Impl { - fn Stream(&self, sink: Option<&ID2D1GdiMetafileSink>) -> windows_core::Result<()>; + fn Stream(&self, sink: windows_core::Ref<'_, ID2D1GdiMetafileSink>) -> windows_core::Result<()>; fn GetBounds(&self) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -8238,7 +8238,7 @@ impl ID2D1GdiMetafile_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Stream(this: *mut core::ffi::c_void, sink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1GdiMetafile_Impl::Stream(this, windows_core::from_raw_borrowed(&sink)).into() + ID2D1GdiMetafile_Impl::Stream(this, core::mem::transmute_copy(&sink)).into() } unsafe extern "system" fn GetBounds(this: *mut core::ffi::c_void, bounds: *mut Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8547,18 +8547,18 @@ pub struct ID2D1Geometry_Vtbl { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub trait ID2D1Geometry_Impl: ID2D1Resource_Impl { fn GetBounds(&self, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::Result; - fn GetWidenedBounds(&self, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32) -> windows_core::Result; - fn StrokeContainsPoint(&self, point: &Common::D2D_POINT_2F, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32) -> windows_core::Result; + fn GetWidenedBounds(&self, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32) -> windows_core::Result; + fn StrokeContainsPoint(&self, point: &Common::D2D_POINT_2F, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32) -> windows_core::Result; fn FillContainsPoint(&self, point: &Common::D2D_POINT_2F, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32) -> windows_core::Result; - fn CompareWithGeometry(&self, inputgeometry: Option<&ID2D1Geometry>, inputgeometrytransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32) -> windows_core::Result; - fn Simplify(&self, simplificationoption: D2D1_GEOMETRY_SIMPLIFICATION_OPTION, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: Option<&Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; - fn Tessellate(&self, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, tessellationsink: Option<&ID2D1TessellationSink>) -> windows_core::Result<()>; - fn CombineWithGeometry(&self, inputgeometry: Option<&ID2D1Geometry>, combinemode: D2D1_COMBINE_MODE, inputgeometrytransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: Option<&Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; - fn Outline(&self, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: Option<&Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; + fn CompareWithGeometry(&self, inputgeometry: windows_core::Ref<'_, ID2D1Geometry>, inputgeometrytransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32) -> windows_core::Result; + fn Simplify(&self, simplificationoption: D2D1_GEOMETRY_SIMPLIFICATION_OPTION, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: windows_core::Ref<'_, Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; + fn Tessellate(&self, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, tessellationsink: windows_core::Ref<'_, ID2D1TessellationSink>) -> windows_core::Result<()>; + fn CombineWithGeometry(&self, inputgeometry: windows_core::Ref<'_, ID2D1Geometry>, combinemode: D2D1_COMBINE_MODE, inputgeometrytransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: windows_core::Ref<'_, Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; + fn Outline(&self, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: windows_core::Ref<'_, Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; fn ComputeArea(&self, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32) -> windows_core::Result; fn ComputeLength(&self, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32) -> windows_core::Result; fn ComputePointAtLength(&self, length: f32, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, point: *mut Common::D2D_POINT_2F, unittangentvector: *mut Common::D2D_POINT_2F) -> windows_core::Result<()>; - fn Widen(&self, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: Option<&Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; + fn Widen(&self, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: windows_core::Ref<'_, Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] impl ID2D1Geometry_Vtbl { @@ -8575,7 +8575,7 @@ impl ID2D1Geometry_Vtbl { } unsafe extern "system" fn GetWidenedBounds(this: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, bounds: *mut Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Geometry_Impl::GetWidenedBounds(this, core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance)) { + match ID2D1Geometry_Impl::GetWidenedBounds(this, core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance)) { Ok(ok__) => { bounds.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8585,7 +8585,7 @@ impl ID2D1Geometry_Vtbl { } unsafe extern "system" fn StrokeContainsPoint(this: *mut core::ffi::c_void, point: Common::D2D_POINT_2F, strokewidth: f32, strokestyle: *mut core::ffi::c_void, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, contains: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Geometry_Impl::StrokeContainsPoint(this, core::mem::transmute(&point), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance)) { + match ID2D1Geometry_Impl::StrokeContainsPoint(this, core::mem::transmute(&point), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance)) { Ok(ok__) => { contains.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8605,7 +8605,7 @@ impl ID2D1Geometry_Vtbl { } unsafe extern "system" fn CompareWithGeometry(this: *mut core::ffi::c_void, inputgeometry: *mut core::ffi::c_void, inputgeometrytransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, relation: *mut D2D1_GEOMETRY_RELATION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Geometry_Impl::CompareWithGeometry(this, windows_core::from_raw_borrowed(&inputgeometry), core::mem::transmute_copy(&inputgeometrytransform), core::mem::transmute_copy(&flatteningtolerance)) { + match ID2D1Geometry_Impl::CompareWithGeometry(this, core::mem::transmute_copy(&inputgeometry), core::mem::transmute_copy(&inputgeometrytransform), core::mem::transmute_copy(&flatteningtolerance)) { Ok(ok__) => { relation.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8615,19 +8615,19 @@ impl ID2D1Geometry_Vtbl { } unsafe extern "system" fn Simplify(this: *mut core::ffi::c_void, simplificationoption: D2D1_GEOMETRY_SIMPLIFICATION_OPTION, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Geometry_Impl::Simplify(this, core::mem::transmute_copy(&simplificationoption), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), windows_core::from_raw_borrowed(&geometrysink)).into() + ID2D1Geometry_Impl::Simplify(this, core::mem::transmute_copy(&simplificationoption), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), core::mem::transmute_copy(&geometrysink)).into() } unsafe extern "system" fn Tessellate(this: *mut core::ffi::c_void, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, tessellationsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Geometry_Impl::Tessellate(this, core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), windows_core::from_raw_borrowed(&tessellationsink)).into() + ID2D1Geometry_Impl::Tessellate(this, core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), core::mem::transmute_copy(&tessellationsink)).into() } unsafe extern "system" fn CombineWithGeometry(this: *mut core::ffi::c_void, inputgeometry: *mut core::ffi::c_void, combinemode: D2D1_COMBINE_MODE, inputgeometrytransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Geometry_Impl::CombineWithGeometry(this, windows_core::from_raw_borrowed(&inputgeometry), core::mem::transmute_copy(&combinemode), core::mem::transmute_copy(&inputgeometrytransform), core::mem::transmute_copy(&flatteningtolerance), windows_core::from_raw_borrowed(&geometrysink)).into() + ID2D1Geometry_Impl::CombineWithGeometry(this, core::mem::transmute_copy(&inputgeometry), core::mem::transmute_copy(&combinemode), core::mem::transmute_copy(&inputgeometrytransform), core::mem::transmute_copy(&flatteningtolerance), core::mem::transmute_copy(&geometrysink)).into() } unsafe extern "system" fn Outline(this: *mut core::ffi::c_void, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Geometry_Impl::Outline(this, core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), windows_core::from_raw_borrowed(&geometrysink)).into() + ID2D1Geometry_Impl::Outline(this, core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), core::mem::transmute_copy(&geometrysink)).into() } unsafe extern "system" fn ComputeArea(this: *mut core::ffi::c_void, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, area: *mut f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8655,7 +8655,7 @@ impl ID2D1Geometry_Vtbl { } unsafe extern "system" fn Widen(this: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Geometry_Impl::Widen(this, core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), windows_core::from_raw_borrowed(&geometrysink)).into() + ID2D1Geometry_Impl::Widen(this, core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), core::mem::transmute_copy(&geometrysink)).into() } Self { base__: ID2D1Resource_Vtbl::new::(), @@ -8718,7 +8718,7 @@ pub struct ID2D1GeometryGroup_Vtbl { pub trait ID2D1GeometryGroup_Impl: ID2D1Geometry_Impl { fn GetFillMode(&self) -> Common::D2D1_FILL_MODE; fn GetSourceGeometryCount(&self) -> u32; - fn GetSourceGeometries(&self, geometries: *mut Option, geometriescount: u32); + fn GetSourceGeometries(&self, geometries: windows_core::OutRef<'_, ID2D1Geometry>, geometriescount: u32); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] impl ID2D1GeometryGroup_Vtbl { @@ -9272,12 +9272,12 @@ pub struct ID2D1ImageBrush_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub trait ID2D1ImageBrush_Impl: ID2D1Brush_Impl { - fn SetImage(&self, image: Option<&ID2D1Image>); + fn SetImage(&self, image: windows_core::Ref<'_, ID2D1Image>); fn SetExtendModeX(&self, extendmodex: D2D1_EXTEND_MODE); fn SetExtendModeY(&self, extendmodey: D2D1_EXTEND_MODE); fn SetInterpolationMode(&self, interpolationmode: D2D1_INTERPOLATION_MODE); fn SetSourceRectangle(&self, sourcerectangle: *const Common::D2D_RECT_F); - fn GetImage(&self, image: *mut Option); + fn GetImage(&self, image: windows_core::OutRef<'_, ID2D1Image>); fn GetExtendModeX(&self) -> D2D1_EXTEND_MODE; fn GetExtendModeY(&self) -> D2D1_EXTEND_MODE; fn GetInterpolationMode(&self) -> D2D1_INTERPOLATION_MODE; @@ -9288,7 +9288,7 @@ impl ID2D1ImageBrush_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetImage(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1ImageBrush_Impl::SetImage(this, windows_core::from_raw_borrowed(&image)) + ID2D1ImageBrush_Impl::SetImage(this, core::mem::transmute_copy(&image)) } unsafe extern "system" fn SetExtendModeX(this: *mut core::ffi::c_void, extendmodex: D2D1_EXTEND_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9450,7 +9450,7 @@ pub struct ID2D1ImageSourceFromWic_Vtbl { pub trait ID2D1ImageSourceFromWic_Impl: ID2D1ImageSource_Impl { fn EnsureCached(&self, rectangletofill: *const Common::D2D_RECT_U) -> windows_core::Result<()>; fn TrimCache(&self, rectangletopreserve: *const Common::D2D_RECT_U) -> windows_core::Result<()>; - fn GetSource(&self, wicbitmapsource: *mut Option); + fn GetSource(&self, wicbitmapsource: windows_core::OutRef<'_, super::Imaging::IWICBitmapSource>); } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Imaging"))] impl ID2D1ImageSourceFromWic_Vtbl { @@ -9566,8 +9566,8 @@ pub trait ID2D1Ink_Impl: ID2D1Resource_Impl { fn SetSegmentAtEnd(&self, segment: *const D2D1_INK_BEZIER_SEGMENT) -> windows_core::Result<()>; fn GetSegmentCount(&self) -> u32; fn GetSegments(&self, startsegment: u32, segments: *mut D2D1_INK_BEZIER_SEGMENT, segmentscount: u32) -> windows_core::Result<()>; - fn StreamAsGeometry(&self, inkstyle: Option<&ID2D1InkStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: Option<&Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; - fn GetBounds(&self, inkstyle: Option<&ID2D1InkStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::Result; + fn StreamAsGeometry(&self, inkstyle: windows_core::Ref<'_, ID2D1InkStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: windows_core::Ref<'_, Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; + fn GetBounds(&self, inkstyle: windows_core::Ref<'_, ID2D1InkStyle>, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::Result; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] impl ID2D1Ink_Vtbl { @@ -9606,11 +9606,11 @@ impl ID2D1Ink_Vtbl { } unsafe extern "system" fn StreamAsGeometry(this: *mut core::ffi::c_void, inkstyle: *mut core::ffi::c_void, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, flatteningtolerance: f32, geometrysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1Ink_Impl::StreamAsGeometry(this, windows_core::from_raw_borrowed(&inkstyle), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), windows_core::from_raw_borrowed(&geometrysink)).into() + ID2D1Ink_Impl::StreamAsGeometry(this, core::mem::transmute_copy(&inkstyle), core::mem::transmute_copy(&worldtransform), core::mem::transmute_copy(&flatteningtolerance), core::mem::transmute_copy(&geometrysink)).into() } unsafe extern "system" fn GetBounds(this: *mut core::ffi::c_void, inkstyle: *mut core::ffi::c_void, worldtransform: *const super::super::super::Foundation::Numerics::Matrix3x2, bounds: *mut Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1Ink_Impl::GetBounds(this, windows_core::from_raw_borrowed(&inkstyle), core::mem::transmute_copy(&worldtransform)) { + match ID2D1Ink_Impl::GetBounds(this, core::mem::transmute_copy(&inkstyle), core::mem::transmute_copy(&worldtransform)) { Ok(ok__) => { bounds.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9833,7 +9833,7 @@ pub trait ID2D1LinearGradientBrush_Impl: ID2D1Brush_Impl { fn SetEndPoint(&self, endpoint: &Common::D2D_POINT_2F); fn GetStartPoint(&self) -> Common::D2D_POINT_2F; fn GetEndPoint(&self) -> Common::D2D_POINT_2F; - fn GetGradientStopCollection(&self, gradientstopcollection: *mut Option); + fn GetGradientStopCollection(&self, gradientstopcollection: windows_core::OutRef<'_, ID2D1GradientStopCollection>); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] impl ID2D1LinearGradientBrush_Vtbl { @@ -10091,7 +10091,7 @@ pub struct ID2D1PathGeometry_Vtbl { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub trait ID2D1PathGeometry_Impl: ID2D1Geometry_Impl { fn Open(&self) -> windows_core::Result; - fn Stream(&self, geometrysink: Option<&ID2D1GeometrySink>) -> windows_core::Result<()>; + fn Stream(&self, geometrysink: windows_core::Ref<'_, ID2D1GeometrySink>) -> windows_core::Result<()>; fn GetSegmentCount(&self) -> windows_core::Result; fn GetFigureCount(&self) -> windows_core::Result; } @@ -10110,7 +10110,7 @@ impl ID2D1PathGeometry_Vtbl { } unsafe extern "system" fn Stream(this: *mut core::ffi::c_void, geometrysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1PathGeometry_Impl::Stream(this, windows_core::from_raw_borrowed(&geometrysink)).into() + ID2D1PathGeometry_Impl::Stream(this, core::mem::transmute_copy(&geometrysink)).into() } unsafe extern "system" fn GetSegmentCount(this: *mut core::ffi::c_void, count: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10221,7 +10221,7 @@ pub struct ID2D1PrintControl_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_System_Com"))] pub trait ID2D1PrintControl_Impl: windows_core::IUnknownImpl { - fn AddPage(&self, commandlist: Option<&ID2D1CommandList>, pagesize: &Common::D2D_SIZE_F, pageprintticketstream: Option<&super::super::System::Com::IStream>, tag1: *mut u64, tag2: *mut u64) -> windows_core::Result<()>; + fn AddPage(&self, commandlist: windows_core::Ref<'_, ID2D1CommandList>, pagesize: &Common::D2D_SIZE_F, pageprintticketstream: windows_core::Ref<'_, super::super::System::Com::IStream>, tag1: *mut u64, tag2: *mut u64) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_System_Com"))] @@ -10229,7 +10229,7 @@ impl ID2D1PrintControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddPage(this: *mut core::ffi::c_void, commandlist: *mut core::ffi::c_void, pagesize: Common::D2D_SIZE_F, pageprintticketstream: *mut core::ffi::c_void, tag1: *mut u64, tag2: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1PrintControl_Impl::AddPage(this, windows_core::from_raw_borrowed(&commandlist), core::mem::transmute(&pagesize), windows_core::from_raw_borrowed(&pageprintticketstream), core::mem::transmute_copy(&tag1), core::mem::transmute_copy(&tag2)).into() + ID2D1PrintControl_Impl::AddPage(this, core::mem::transmute_copy(&commandlist), core::mem::transmute(&pagesize), core::mem::transmute_copy(&pageprintticketstream), core::mem::transmute_copy(&tag1), core::mem::transmute_copy(&tag2)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10478,7 +10478,7 @@ pub trait ID2D1RadialGradientBrush_Impl: ID2D1Brush_Impl { fn GetGradientOriginOffset(&self) -> Common::D2D_POINT_2F; fn GetRadiusX(&self) -> f32; fn GetRadiusY(&self) -> f32; - fn GetGradientStopCollection(&self, gradientstopcollection: *mut Option); + fn GetGradientStopCollection(&self, gradientstopcollection: windows_core::OutRef<'_, ID2D1GradientStopCollection>); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] impl ID2D1RadialGradientBrush_Vtbl { @@ -11112,46 +11112,46 @@ pub struct ID2D1RenderTarget_Vtbl { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] pub trait ID2D1RenderTarget_Impl: ID2D1Resource_Impl { fn CreateBitmap(&self, size: &Common::D2D_SIZE_U, srcdata: *const core::ffi::c_void, pitch: u32, bitmapproperties: *const D2D1_BITMAP_PROPERTIES) -> windows_core::Result; - fn CreateBitmapFromWicBitmap(&self, wicbitmapsource: Option<&super::Imaging::IWICBitmapSource>, bitmapproperties: *const D2D1_BITMAP_PROPERTIES) -> windows_core::Result; - fn CreateSharedBitmap(&self, riid: *const windows_core::GUID, data: *mut core::ffi::c_void, bitmapproperties: *const D2D1_BITMAP_PROPERTIES, bitmap: *mut Option) -> windows_core::Result<()>; - fn CreateBitmapBrush(&self, bitmap: Option<&ID2D1Bitmap>, bitmapbrushproperties: *const D2D1_BITMAP_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES) -> windows_core::Result; + fn CreateBitmapFromWicBitmap(&self, wicbitmapsource: windows_core::Ref<'_, super::Imaging::IWICBitmapSource>, bitmapproperties: *const D2D1_BITMAP_PROPERTIES) -> windows_core::Result; + fn CreateSharedBitmap(&self, riid: *const windows_core::GUID, data: *mut core::ffi::c_void, bitmapproperties: *const D2D1_BITMAP_PROPERTIES, bitmap: windows_core::OutRef<'_, ID2D1Bitmap>) -> windows_core::Result<()>; + fn CreateBitmapBrush(&self, bitmap: windows_core::Ref<'_, ID2D1Bitmap>, bitmapbrushproperties: *const D2D1_BITMAP_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES) -> windows_core::Result; fn CreateSolidColorBrush(&self, color: *const Common::D2D1_COLOR_F, brushproperties: *const D2D1_BRUSH_PROPERTIES) -> windows_core::Result; fn CreateGradientStopCollection(&self, gradientstops: *const Common::D2D1_GRADIENT_STOP, gradientstopscount: u32, colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> windows_core::Result; - fn CreateLinearGradientBrush(&self, lineargradientbrushproperties: *const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES, gradientstopcollection: Option<&ID2D1GradientStopCollection>) -> windows_core::Result; - fn CreateRadialGradientBrush(&self, radialgradientbrushproperties: *const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES, gradientstopcollection: Option<&ID2D1GradientStopCollection>) -> windows_core::Result; + fn CreateLinearGradientBrush(&self, lineargradientbrushproperties: *const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES, gradientstopcollection: windows_core::Ref<'_, ID2D1GradientStopCollection>) -> windows_core::Result; + fn CreateRadialGradientBrush(&self, radialgradientbrushproperties: *const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES, gradientstopcollection: windows_core::Ref<'_, ID2D1GradientStopCollection>) -> windows_core::Result; fn CreateCompatibleRenderTarget(&self, desiredsize: *const Common::D2D_SIZE_F, desiredpixelsize: *const Common::D2D_SIZE_U, desiredformat: *const Common::D2D1_PIXEL_FORMAT, options: D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS) -> windows_core::Result; fn CreateLayer(&self, size: *const Common::D2D_SIZE_F) -> windows_core::Result; fn CreateMesh(&self) -> windows_core::Result; - fn DrawLine(&self, point0: &Common::D2D_POINT_2F, point1: &Common::D2D_POINT_2F, brush: Option<&ID2D1Brush>, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>); - fn DrawRectangle(&self, rect: *const Common::D2D_RECT_F, brush: Option<&ID2D1Brush>, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>); - fn FillRectangle(&self, rect: *const Common::D2D_RECT_F, brush: Option<&ID2D1Brush>); - fn DrawRoundedRectangle(&self, roundedrect: *const D2D1_ROUNDED_RECT, brush: Option<&ID2D1Brush>, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>); - fn FillRoundedRectangle(&self, roundedrect: *const D2D1_ROUNDED_RECT, brush: Option<&ID2D1Brush>); - fn DrawEllipse(&self, ellipse: *const D2D1_ELLIPSE, brush: Option<&ID2D1Brush>, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>); - fn FillEllipse(&self, ellipse: *const D2D1_ELLIPSE, brush: Option<&ID2D1Brush>); - fn DrawGeometry(&self, geometry: Option<&ID2D1Geometry>, brush: Option<&ID2D1Brush>, strokewidth: f32, strokestyle: Option<&ID2D1StrokeStyle>); - fn FillGeometry(&self, geometry: Option<&ID2D1Geometry>, brush: Option<&ID2D1Brush>, opacitybrush: Option<&ID2D1Brush>); - fn FillMesh(&self, mesh: Option<&ID2D1Mesh>, brush: Option<&ID2D1Brush>); - fn FillOpacityMask(&self, opacitymask: Option<&ID2D1Bitmap>, brush: Option<&ID2D1Brush>, content: D2D1_OPACITY_MASK_CONTENT, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F); - fn DrawBitmap(&self, bitmap: Option<&ID2D1Bitmap>, destinationrectangle: *const Common::D2D_RECT_F, opacity: f32, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, sourcerectangle: *const Common::D2D_RECT_F); - fn DrawText(&self, string: &windows_core::PCWSTR, stringlength: u32, textformat: Option<&super::DirectWrite::IDWriteTextFormat>, layoutrect: *const Common::D2D_RECT_F, defaultfillbrush: Option<&ID2D1Brush>, options: D2D1_DRAW_TEXT_OPTIONS, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); - fn DrawTextLayout(&self, origin: &Common::D2D_POINT_2F, textlayout: Option<&super::DirectWrite::IDWriteTextLayout>, defaultfillbrush: Option<&ID2D1Brush>, options: D2D1_DRAW_TEXT_OPTIONS); - fn DrawGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, foregroundbrush: Option<&ID2D1Brush>, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); + fn DrawLine(&self, point0: &Common::D2D_POINT_2F, point1: &Common::D2D_POINT_2F, brush: windows_core::Ref<'_, ID2D1Brush>, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>); + fn DrawRectangle(&self, rect: *const Common::D2D_RECT_F, brush: windows_core::Ref<'_, ID2D1Brush>, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>); + fn FillRectangle(&self, rect: *const Common::D2D_RECT_F, brush: windows_core::Ref<'_, ID2D1Brush>); + fn DrawRoundedRectangle(&self, roundedrect: *const D2D1_ROUNDED_RECT, brush: windows_core::Ref<'_, ID2D1Brush>, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>); + fn FillRoundedRectangle(&self, roundedrect: *const D2D1_ROUNDED_RECT, brush: windows_core::Ref<'_, ID2D1Brush>); + fn DrawEllipse(&self, ellipse: *const D2D1_ELLIPSE, brush: windows_core::Ref<'_, ID2D1Brush>, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>); + fn FillEllipse(&self, ellipse: *const D2D1_ELLIPSE, brush: windows_core::Ref<'_, ID2D1Brush>); + fn DrawGeometry(&self, geometry: windows_core::Ref<'_, ID2D1Geometry>, brush: windows_core::Ref<'_, ID2D1Brush>, strokewidth: f32, strokestyle: windows_core::Ref<'_, ID2D1StrokeStyle>); + fn FillGeometry(&self, geometry: windows_core::Ref<'_, ID2D1Geometry>, brush: windows_core::Ref<'_, ID2D1Brush>, opacitybrush: windows_core::Ref<'_, ID2D1Brush>); + fn FillMesh(&self, mesh: windows_core::Ref<'_, ID2D1Mesh>, brush: windows_core::Ref<'_, ID2D1Brush>); + fn FillOpacityMask(&self, opacitymask: windows_core::Ref<'_, ID2D1Bitmap>, brush: windows_core::Ref<'_, ID2D1Brush>, content: D2D1_OPACITY_MASK_CONTENT, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F); + fn DrawBitmap(&self, bitmap: windows_core::Ref<'_, ID2D1Bitmap>, destinationrectangle: *const Common::D2D_RECT_F, opacity: f32, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, sourcerectangle: *const Common::D2D_RECT_F); + fn DrawText(&self, string: &windows_core::PCWSTR, stringlength: u32, textformat: windows_core::Ref<'_, super::DirectWrite::IDWriteTextFormat>, layoutrect: *const Common::D2D_RECT_F, defaultfillbrush: windows_core::Ref<'_, ID2D1Brush>, options: D2D1_DRAW_TEXT_OPTIONS, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); + fn DrawTextLayout(&self, origin: &Common::D2D_POINT_2F, textlayout: windows_core::Ref<'_, super::DirectWrite::IDWriteTextLayout>, defaultfillbrush: windows_core::Ref<'_, ID2D1Brush>, options: D2D1_DRAW_TEXT_OPTIONS); + fn DrawGlyphRun(&self, baselineorigin: &Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, foregroundbrush: windows_core::Ref<'_, ID2D1Brush>, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE); fn SetTransform(&self, transform: *const super::super::super::Foundation::Numerics::Matrix3x2); fn GetTransform(&self, transform: *mut super::super::super::Foundation::Numerics::Matrix3x2); fn SetAntialiasMode(&self, antialiasmode: D2D1_ANTIALIAS_MODE); fn GetAntialiasMode(&self) -> D2D1_ANTIALIAS_MODE; fn SetTextAntialiasMode(&self, textantialiasmode: D2D1_TEXT_ANTIALIAS_MODE); fn GetTextAntialiasMode(&self) -> D2D1_TEXT_ANTIALIAS_MODE; - fn SetTextRenderingParams(&self, textrenderingparams: Option<&super::DirectWrite::IDWriteRenderingParams>); - fn GetTextRenderingParams(&self, textrenderingparams: *mut Option); + fn SetTextRenderingParams(&self, textrenderingparams: windows_core::Ref<'_, super::DirectWrite::IDWriteRenderingParams>); + fn GetTextRenderingParams(&self, textrenderingparams: windows_core::OutRef<'_, super::DirectWrite::IDWriteRenderingParams>); fn SetTags(&self, tag1: u64, tag2: u64); fn GetTags(&self, tag1: *mut u64, tag2: *mut u64); - fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS, layer: Option<&ID2D1Layer>); + fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS, layer: windows_core::Ref<'_, ID2D1Layer>); fn PopLayer(&self); fn Flush(&self, tag1: *mut u64, tag2: *mut u64) -> windows_core::Result<()>; - fn SaveDrawingState(&self, drawingstateblock: Option<&ID2D1DrawingStateBlock>); - fn RestoreDrawingState(&self, drawingstateblock: Option<&ID2D1DrawingStateBlock>); + fn SaveDrawingState(&self, drawingstateblock: windows_core::Ref<'_, ID2D1DrawingStateBlock>); + fn RestoreDrawingState(&self, drawingstateblock: windows_core::Ref<'_, ID2D1DrawingStateBlock>); fn PushAxisAlignedClip(&self, cliprect: *const Common::D2D_RECT_F, antialiasmode: D2D1_ANTIALIAS_MODE); fn PopAxisAlignedClip(&self); fn Clear(&self, clearcolor: *const Common::D2D1_COLOR_F); @@ -11180,7 +11180,7 @@ impl ID2D1RenderTarget_Vtbl { } unsafe extern "system" fn CreateBitmapFromWicBitmap(this: *mut core::ffi::c_void, wicbitmapsource: *mut core::ffi::c_void, bitmapproperties: *const D2D1_BITMAP_PROPERTIES, bitmap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1RenderTarget_Impl::CreateBitmapFromWicBitmap(this, windows_core::from_raw_borrowed(&wicbitmapsource), core::mem::transmute_copy(&bitmapproperties)) { + match ID2D1RenderTarget_Impl::CreateBitmapFromWicBitmap(this, core::mem::transmute_copy(&wicbitmapsource), core::mem::transmute_copy(&bitmapproperties)) { Ok(ok__) => { bitmap.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11194,7 +11194,7 @@ impl ID2D1RenderTarget_Vtbl { } unsafe extern "system" fn CreateBitmapBrush(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void, bitmapbrushproperties: *const D2D1_BITMAP_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES, bitmapbrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1RenderTarget_Impl::CreateBitmapBrush(this, windows_core::from_raw_borrowed(&bitmap), core::mem::transmute_copy(&bitmapbrushproperties), core::mem::transmute_copy(&brushproperties)) { + match ID2D1RenderTarget_Impl::CreateBitmapBrush(this, core::mem::transmute_copy(&bitmap), core::mem::transmute_copy(&bitmapbrushproperties), core::mem::transmute_copy(&brushproperties)) { Ok(ok__) => { bitmapbrush.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11224,7 +11224,7 @@ impl ID2D1RenderTarget_Vtbl { } unsafe extern "system" fn CreateLinearGradientBrush(this: *mut core::ffi::c_void, lineargradientbrushproperties: *const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES, gradientstopcollection: *mut core::ffi::c_void, lineargradientbrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1RenderTarget_Impl::CreateLinearGradientBrush(this, core::mem::transmute_copy(&lineargradientbrushproperties), core::mem::transmute_copy(&brushproperties), windows_core::from_raw_borrowed(&gradientstopcollection)) { + match ID2D1RenderTarget_Impl::CreateLinearGradientBrush(this, core::mem::transmute_copy(&lineargradientbrushproperties), core::mem::transmute_copy(&brushproperties), core::mem::transmute_copy(&gradientstopcollection)) { Ok(ok__) => { lineargradientbrush.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11234,7 +11234,7 @@ impl ID2D1RenderTarget_Vtbl { } unsafe extern "system" fn CreateRadialGradientBrush(this: *mut core::ffi::c_void, radialgradientbrushproperties: *const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES, brushproperties: *const D2D1_BRUSH_PROPERTIES, gradientstopcollection: *mut core::ffi::c_void, radialgradientbrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1RenderTarget_Impl::CreateRadialGradientBrush(this, core::mem::transmute_copy(&radialgradientbrushproperties), core::mem::transmute_copy(&brushproperties), windows_core::from_raw_borrowed(&gradientstopcollection)) { + match ID2D1RenderTarget_Impl::CreateRadialGradientBrush(this, core::mem::transmute_copy(&radialgradientbrushproperties), core::mem::transmute_copy(&brushproperties), core::mem::transmute_copy(&gradientstopcollection)) { Ok(ok__) => { radialgradientbrush.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11274,63 +11274,63 @@ impl ID2D1RenderTarget_Vtbl { } unsafe extern "system" fn DrawLine(this: *mut core::ffi::c_void, point0: Common::D2D_POINT_2F, point1: Common::D2D_POINT_2F, brush: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::DrawLine(this, core::mem::transmute(&point0), core::mem::transmute(&point1), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle)) + ID2D1RenderTarget_Impl::DrawLine(this, core::mem::transmute(&point0), core::mem::transmute(&point1), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle)) } unsafe extern "system" fn DrawRectangle(this: *mut core::ffi::c_void, rect: *const Common::D2D_RECT_F, brush: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::DrawRectangle(this, core::mem::transmute_copy(&rect), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle)) + ID2D1RenderTarget_Impl::DrawRectangle(this, core::mem::transmute_copy(&rect), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle)) } unsafe extern "system" fn FillRectangle(this: *mut core::ffi::c_void, rect: *const Common::D2D_RECT_F, brush: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::FillRectangle(this, core::mem::transmute_copy(&rect), windows_core::from_raw_borrowed(&brush)) + ID2D1RenderTarget_Impl::FillRectangle(this, core::mem::transmute_copy(&rect), core::mem::transmute_copy(&brush)) } unsafe extern "system" fn DrawRoundedRectangle(this: *mut core::ffi::c_void, roundedrect: *const D2D1_ROUNDED_RECT, brush: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::DrawRoundedRectangle(this, core::mem::transmute_copy(&roundedrect), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle)) + ID2D1RenderTarget_Impl::DrawRoundedRectangle(this, core::mem::transmute_copy(&roundedrect), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle)) } unsafe extern "system" fn FillRoundedRectangle(this: *mut core::ffi::c_void, roundedrect: *const D2D1_ROUNDED_RECT, brush: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::FillRoundedRectangle(this, core::mem::transmute_copy(&roundedrect), windows_core::from_raw_borrowed(&brush)) + ID2D1RenderTarget_Impl::FillRoundedRectangle(this, core::mem::transmute_copy(&roundedrect), core::mem::transmute_copy(&brush)) } unsafe extern "system" fn DrawEllipse(this: *mut core::ffi::c_void, ellipse: *const D2D1_ELLIPSE, brush: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::DrawEllipse(this, core::mem::transmute_copy(&ellipse), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle)) + ID2D1RenderTarget_Impl::DrawEllipse(this, core::mem::transmute_copy(&ellipse), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle)) } unsafe extern "system" fn FillEllipse(this: *mut core::ffi::c_void, ellipse: *const D2D1_ELLIPSE, brush: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::FillEllipse(this, core::mem::transmute_copy(&ellipse), windows_core::from_raw_borrowed(&brush)) + ID2D1RenderTarget_Impl::FillEllipse(this, core::mem::transmute_copy(&ellipse), core::mem::transmute_copy(&brush)) } unsafe extern "system" fn DrawGeometry(this: *mut core::ffi::c_void, geometry: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, strokewidth: f32, strokestyle: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::DrawGeometry(this, windows_core::from_raw_borrowed(&geometry), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&strokewidth), windows_core::from_raw_borrowed(&strokestyle)) + ID2D1RenderTarget_Impl::DrawGeometry(this, core::mem::transmute_copy(&geometry), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&strokestyle)) } unsafe extern "system" fn FillGeometry(this: *mut core::ffi::c_void, geometry: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, opacitybrush: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::FillGeometry(this, windows_core::from_raw_borrowed(&geometry), windows_core::from_raw_borrowed(&brush), windows_core::from_raw_borrowed(&opacitybrush)) + ID2D1RenderTarget_Impl::FillGeometry(this, core::mem::transmute_copy(&geometry), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&opacitybrush)) } unsafe extern "system" fn FillMesh(this: *mut core::ffi::c_void, mesh: *mut core::ffi::c_void, brush: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::FillMesh(this, windows_core::from_raw_borrowed(&mesh), windows_core::from_raw_borrowed(&brush)) + ID2D1RenderTarget_Impl::FillMesh(this, core::mem::transmute_copy(&mesh), core::mem::transmute_copy(&brush)) } unsafe extern "system" fn FillOpacityMask(this: *mut core::ffi::c_void, opacitymask: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, content: D2D1_OPACITY_MASK_CONTENT, destinationrectangle: *const Common::D2D_RECT_F, sourcerectangle: *const Common::D2D_RECT_F) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::FillOpacityMask(this, windows_core::from_raw_borrowed(&opacitymask), windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&content), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)) + ID2D1RenderTarget_Impl::FillOpacityMask(this, core::mem::transmute_copy(&opacitymask), core::mem::transmute_copy(&brush), core::mem::transmute_copy(&content), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&sourcerectangle)) } unsafe extern "system" fn DrawBitmap(this: *mut core::ffi::c_void, bitmap: *mut core::ffi::c_void, destinationrectangle: *const Common::D2D_RECT_F, opacity: f32, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, sourcerectangle: *const Common::D2D_RECT_F) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::DrawBitmap(this, windows_core::from_raw_borrowed(&bitmap), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&opacity), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&sourcerectangle)) + ID2D1RenderTarget_Impl::DrawBitmap(this, core::mem::transmute_copy(&bitmap), core::mem::transmute_copy(&destinationrectangle), core::mem::transmute_copy(&opacity), core::mem::transmute_copy(&interpolationmode), core::mem::transmute_copy(&sourcerectangle)) } unsafe extern "system" fn DrawText(this: *mut core::ffi::c_void, string: windows_core::PCWSTR, stringlength: u32, textformat: *mut core::ffi::c_void, layoutrect: *const Common::D2D_RECT_F, defaultfillbrush: *mut core::ffi::c_void, options: D2D1_DRAW_TEXT_OPTIONS, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::DrawText(this, core::mem::transmute(&string), core::mem::transmute_copy(&stringlength), windows_core::from_raw_borrowed(&textformat), core::mem::transmute_copy(&layoutrect), windows_core::from_raw_borrowed(&defaultfillbrush), core::mem::transmute_copy(&options), core::mem::transmute_copy(&measuringmode)) + ID2D1RenderTarget_Impl::DrawText(this, core::mem::transmute(&string), core::mem::transmute_copy(&stringlength), core::mem::transmute_copy(&textformat), core::mem::transmute_copy(&layoutrect), core::mem::transmute_copy(&defaultfillbrush), core::mem::transmute_copy(&options), core::mem::transmute_copy(&measuringmode)) } unsafe extern "system" fn DrawTextLayout(this: *mut core::ffi::c_void, origin: Common::D2D_POINT_2F, textlayout: *mut core::ffi::c_void, defaultfillbrush: *mut core::ffi::c_void, options: D2D1_DRAW_TEXT_OPTIONS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::DrawTextLayout(this, core::mem::transmute(&origin), windows_core::from_raw_borrowed(&textlayout), windows_core::from_raw_borrowed(&defaultfillbrush), core::mem::transmute_copy(&options)) + ID2D1RenderTarget_Impl::DrawTextLayout(this, core::mem::transmute(&origin), core::mem::transmute_copy(&textlayout), core::mem::transmute_copy(&defaultfillbrush), core::mem::transmute_copy(&options)) } unsafe extern "system" fn DrawGlyphRun(this: *mut core::ffi::c_void, baselineorigin: Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, foregroundbrush: *mut core::ffi::c_void, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::DrawGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), windows_core::from_raw_borrowed(&foregroundbrush), core::mem::transmute_copy(&measuringmode)) + ID2D1RenderTarget_Impl::DrawGlyphRun(this, core::mem::transmute(&baselineorigin), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&foregroundbrush), core::mem::transmute_copy(&measuringmode)) } unsafe extern "system" fn SetTransform(this: *mut core::ffi::c_void, transform: *const super::super::super::Foundation::Numerics::Matrix3x2) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11358,7 +11358,7 @@ impl ID2D1RenderTarget_Vtbl { } unsafe extern "system" fn SetTextRenderingParams(this: *mut core::ffi::c_void, textrenderingparams: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::SetTextRenderingParams(this, windows_core::from_raw_borrowed(&textrenderingparams)) + ID2D1RenderTarget_Impl::SetTextRenderingParams(this, core::mem::transmute_copy(&textrenderingparams)) } unsafe extern "system" fn GetTextRenderingParams(this: *mut core::ffi::c_void, textrenderingparams: *mut *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11374,7 +11374,7 @@ impl ID2D1RenderTarget_Vtbl { } unsafe extern "system" fn PushLayer(this: *mut core::ffi::c_void, layerparameters: *const D2D1_LAYER_PARAMETERS, layer: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::PushLayer(this, core::mem::transmute_copy(&layerparameters), windows_core::from_raw_borrowed(&layer)) + ID2D1RenderTarget_Impl::PushLayer(this, core::mem::transmute_copy(&layerparameters), core::mem::transmute_copy(&layer)) } unsafe extern "system" fn PopLayer(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11386,11 +11386,11 @@ impl ID2D1RenderTarget_Vtbl { } unsafe extern "system" fn SaveDrawingState(this: *mut core::ffi::c_void, drawingstateblock: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::SaveDrawingState(this, windows_core::from_raw_borrowed(&drawingstateblock)) + ID2D1RenderTarget_Impl::SaveDrawingState(this, core::mem::transmute_copy(&drawingstateblock)) } unsafe extern "system" fn RestoreDrawingState(this: *mut core::ffi::c_void, drawingstateblock: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1RenderTarget_Impl::RestoreDrawingState(this, windows_core::from_raw_borrowed(&drawingstateblock)) + ID2D1RenderTarget_Impl::RestoreDrawingState(this, core::mem::transmute_copy(&drawingstateblock)) } unsafe extern "system" fn PushAxisAlignedClip(this: *mut core::ffi::c_void, cliprect: *const Common::D2D_RECT_F, antialiasmode: D2D1_ANTIALIAS_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11522,7 +11522,7 @@ pub struct ID2D1Resource_Vtbl { pub GetFactory: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void), } pub trait ID2D1Resource_Impl: windows_core::IUnknownImpl { - fn GetFactory(&self, factory: *mut Option); + fn GetFactory(&self, factory: windows_core::OutRef<'_, ID2D1Factory>); } impl ID2D1Resource_Vtbl { pub const fn new() -> Self { @@ -11708,19 +11708,19 @@ pub struct ID2D1SourceTransform_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub trait ID2D1SourceTransform_Impl: ID2D1Transform_Impl { - fn SetRenderInfo(&self, renderinfo: Option<&ID2D1RenderInfo>) -> windows_core::Result<()>; - fn Draw(&self, target: Option<&ID2D1Bitmap1>, drawrect: *const super::super::Foundation::RECT, targetorigin: &Common::D2D_POINT_2U) -> windows_core::Result<()>; + fn SetRenderInfo(&self, renderinfo: windows_core::Ref<'_, ID2D1RenderInfo>) -> windows_core::Result<()>; + fn Draw(&self, target: windows_core::Ref<'_, ID2D1Bitmap1>, drawrect: *const super::super::Foundation::RECT, targetorigin: &Common::D2D_POINT_2U) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] impl ID2D1SourceTransform_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRenderInfo(this: *mut core::ffi::c_void, renderinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SourceTransform_Impl::SetRenderInfo(this, windows_core::from_raw_borrowed(&renderinfo)).into() + ID2D1SourceTransform_Impl::SetRenderInfo(this, core::mem::transmute_copy(&renderinfo)).into() } unsafe extern "system" fn Draw(this: *mut core::ffi::c_void, target: *mut core::ffi::c_void, drawrect: *const super::super::Foundation::RECT, targetorigin: Common::D2D_POINT_2U) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SourceTransform_Impl::Draw(this, windows_core::from_raw_borrowed(&target), core::mem::transmute_copy(&drawrect), core::mem::transmute(&targetorigin)).into() + ID2D1SourceTransform_Impl::Draw(this, core::mem::transmute_copy(&target), core::mem::transmute_copy(&drawrect), core::mem::transmute(&targetorigin)).into() } Self { base__: ID2D1Transform_Vtbl::new::(), SetRenderInfo: SetRenderInfo::, Draw: Draw:: } } @@ -12011,7 +12011,7 @@ pub struct ID2D1SvgAttribute_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ID2D1SvgAttribute_Impl: ID2D1Resource_Impl { - fn GetElement(&self, element: *mut Option); + fn GetElement(&self, element: windows_core::OutRef<'_, ID2D1SvgElement>); fn Clone(&self) -> windows_core::Result; } impl ID2D1SvgAttribute_Vtbl { @@ -12151,11 +12151,11 @@ pub struct ID2D1SvgDocument_Vtbl { pub trait ID2D1SvgDocument_Impl: ID2D1Resource_Impl { fn SetViewportSize(&self, viewportsize: &Common::D2D_SIZE_F) -> windows_core::Result<()>; fn GetViewportSize(&self) -> Common::D2D_SIZE_F; - fn SetRoot(&self, root: Option<&ID2D1SvgElement>) -> windows_core::Result<()>; - fn GetRoot(&self, root: *mut Option); + fn SetRoot(&self, root: windows_core::Ref<'_, ID2D1SvgElement>) -> windows_core::Result<()>; + fn GetRoot(&self, root: windows_core::OutRef<'_, ID2D1SvgElement>); fn FindElementById(&self, id: &windows_core::PCWSTR) -> windows_core::Result; - fn Serialize(&self, outputxmlstream: Option<&super::super::System::Com::IStream>, subtree: Option<&ID2D1SvgElement>) -> windows_core::Result<()>; - fn Deserialize(&self, inputxmlstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn Serialize(&self, outputxmlstream: windows_core::Ref<'_, super::super::System::Com::IStream>, subtree: windows_core::Ref<'_, ID2D1SvgElement>) -> windows_core::Result<()>; + fn Deserialize(&self, inputxmlstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn CreatePaint(&self, painttype: D2D1_SVG_PAINT_TYPE, color: *const Common::D2D1_COLOR_F, id: &windows_core::PCWSTR) -> windows_core::Result; fn CreateStrokeDashArray(&self, dashes: *const D2D1_SVG_LENGTH, dashescount: u32) -> windows_core::Result; fn CreatePointCollection(&self, points: *const Common::D2D_POINT_2F, pointscount: u32) -> windows_core::Result; @@ -12174,7 +12174,7 @@ impl ID2D1SvgDocument_Vtbl { } unsafe extern "system" fn SetRoot(this: *mut core::ffi::c_void, root: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SvgDocument_Impl::SetRoot(this, windows_core::from_raw_borrowed(&root)).into() + ID2D1SvgDocument_Impl::SetRoot(this, core::mem::transmute_copy(&root)).into() } unsafe extern "system" fn GetRoot(this: *mut core::ffi::c_void, root: *mut *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12192,11 +12192,11 @@ impl ID2D1SvgDocument_Vtbl { } unsafe extern "system" fn Serialize(this: *mut core::ffi::c_void, outputxmlstream: *mut core::ffi::c_void, subtree: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SvgDocument_Impl::Serialize(this, windows_core::from_raw_borrowed(&outputxmlstream), windows_core::from_raw_borrowed(&subtree)).into() + ID2D1SvgDocument_Impl::Serialize(this, core::mem::transmute_copy(&outputxmlstream), core::mem::transmute_copy(&subtree)).into() } unsafe extern "system" fn Deserialize(this: *mut core::ffi::c_void, inputxmlstream: *mut core::ffi::c_void, subtree: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1SvgDocument_Impl::Deserialize(this, windows_core::from_raw_borrowed(&inputxmlstream)) { + match ID2D1SvgDocument_Impl::Deserialize(this, core::mem::transmute_copy(&inputxmlstream)) { Ok(ok__) => { subtree.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12470,20 +12470,20 @@ pub struct ID2D1SvgElement_Vtbl { pub GetAttributeValueLength: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, D2D1_SVG_ATTRIBUTE_STRING_TYPE, *mut u32) -> windows_core::HRESULT, } pub trait ID2D1SvgElement_Impl: ID2D1Resource_Impl { - fn GetDocument(&self, document: *mut Option); + fn GetDocument(&self, document: windows_core::OutRef<'_, ID2D1SvgDocument>); fn GetTagName(&self, name: windows_core::PWSTR, namecount: u32) -> windows_core::Result<()>; fn GetTagNameLength(&self) -> u32; fn IsTextContent(&self) -> super::super::Foundation::BOOL; - fn GetParent(&self, parent: *mut Option); + fn GetParent(&self, parent: windows_core::OutRef<'_, ID2D1SvgElement>); fn HasChildren(&self) -> super::super::Foundation::BOOL; - fn GetFirstChild(&self, child: *mut Option); - fn GetLastChild(&self, child: *mut Option); - fn GetPreviousChild(&self, referencechild: Option<&ID2D1SvgElement>) -> windows_core::Result; - fn GetNextChild(&self, referencechild: Option<&ID2D1SvgElement>) -> windows_core::Result; - fn InsertChildBefore(&self, newchild: Option<&ID2D1SvgElement>, referencechild: Option<&ID2D1SvgElement>) -> windows_core::Result<()>; - fn AppendChild(&self, newchild: Option<&ID2D1SvgElement>) -> windows_core::Result<()>; - fn ReplaceChild(&self, newchild: Option<&ID2D1SvgElement>, oldchild: Option<&ID2D1SvgElement>) -> windows_core::Result<()>; - fn RemoveChild(&self, oldchild: Option<&ID2D1SvgElement>) -> windows_core::Result<()>; + fn GetFirstChild(&self, child: windows_core::OutRef<'_, ID2D1SvgElement>); + fn GetLastChild(&self, child: windows_core::OutRef<'_, ID2D1SvgElement>); + fn GetPreviousChild(&self, referencechild: windows_core::Ref<'_, ID2D1SvgElement>) -> windows_core::Result; + fn GetNextChild(&self, referencechild: windows_core::Ref<'_, ID2D1SvgElement>) -> windows_core::Result; + fn InsertChildBefore(&self, newchild: windows_core::Ref<'_, ID2D1SvgElement>, referencechild: windows_core::Ref<'_, ID2D1SvgElement>) -> windows_core::Result<()>; + fn AppendChild(&self, newchild: windows_core::Ref<'_, ID2D1SvgElement>) -> windows_core::Result<()>; + fn ReplaceChild(&self, newchild: windows_core::Ref<'_, ID2D1SvgElement>, oldchild: windows_core::Ref<'_, ID2D1SvgElement>) -> windows_core::Result<()>; + fn RemoveChild(&self, oldchild: windows_core::Ref<'_, ID2D1SvgElement>) -> windows_core::Result<()>; fn CreateChild(&self, tagname: &windows_core::PCWSTR) -> windows_core::Result; fn IsAttributeSpecified(&self, name: &windows_core::PCWSTR, inherited: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL; fn GetSpecifiedAttributeCount(&self) -> u32; @@ -12493,7 +12493,7 @@ pub trait ID2D1SvgElement_Impl: ID2D1Resource_Impl { fn SetTextValue(&self, name: &windows_core::PCWSTR, namecount: u32) -> windows_core::Result<()>; fn GetTextValue(&self, name: windows_core::PWSTR, namecount: u32) -> windows_core::Result<()>; fn GetTextValueLength(&self) -> u32; - fn SetAttributeValue(&self, name: &windows_core::PCWSTR, value: Option<&ID2D1SvgAttribute>) -> windows_core::Result<()>; + fn SetAttributeValue(&self, name: &windows_core::PCWSTR, value: windows_core::Ref<'_, ID2D1SvgAttribute>) -> windows_core::Result<()>; fn SetAttributeValue2(&self, name: &windows_core::PCWSTR, r#type: D2D1_SVG_ATTRIBUTE_POD_TYPE, value: *const core::ffi::c_void, valuesizeinbytes: u32) -> windows_core::Result<()>; fn SetAttributeValue3(&self, name: &windows_core::PCWSTR, r#type: D2D1_SVG_ATTRIBUTE_STRING_TYPE, value: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetAttributeValue(&self, name: &windows_core::PCWSTR, riid: *const windows_core::GUID, value: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; @@ -12537,7 +12537,7 @@ impl ID2D1SvgElement_Vtbl { } unsafe extern "system" fn GetPreviousChild(this: *mut core::ffi::c_void, referencechild: *mut core::ffi::c_void, previouschild: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1SvgElement_Impl::GetPreviousChild(this, windows_core::from_raw_borrowed(&referencechild)) { + match ID2D1SvgElement_Impl::GetPreviousChild(this, core::mem::transmute_copy(&referencechild)) { Ok(ok__) => { previouschild.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12547,7 +12547,7 @@ impl ID2D1SvgElement_Vtbl { } unsafe extern "system" fn GetNextChild(this: *mut core::ffi::c_void, referencechild: *mut core::ffi::c_void, nextchild: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID2D1SvgElement_Impl::GetNextChild(this, windows_core::from_raw_borrowed(&referencechild)) { + match ID2D1SvgElement_Impl::GetNextChild(this, core::mem::transmute_copy(&referencechild)) { Ok(ok__) => { nextchild.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12557,19 +12557,19 @@ impl ID2D1SvgElement_Vtbl { } unsafe extern "system" fn InsertChildBefore(this: *mut core::ffi::c_void, newchild: *mut core::ffi::c_void, referencechild: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SvgElement_Impl::InsertChildBefore(this, windows_core::from_raw_borrowed(&newchild), windows_core::from_raw_borrowed(&referencechild)).into() + ID2D1SvgElement_Impl::InsertChildBefore(this, core::mem::transmute_copy(&newchild), core::mem::transmute_copy(&referencechild)).into() } unsafe extern "system" fn AppendChild(this: *mut core::ffi::c_void, newchild: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SvgElement_Impl::AppendChild(this, windows_core::from_raw_borrowed(&newchild)).into() + ID2D1SvgElement_Impl::AppendChild(this, core::mem::transmute_copy(&newchild)).into() } unsafe extern "system" fn ReplaceChild(this: *mut core::ffi::c_void, newchild: *mut core::ffi::c_void, oldchild: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SvgElement_Impl::ReplaceChild(this, windows_core::from_raw_borrowed(&newchild), windows_core::from_raw_borrowed(&oldchild)).into() + ID2D1SvgElement_Impl::ReplaceChild(this, core::mem::transmute_copy(&newchild), core::mem::transmute_copy(&oldchild)).into() } unsafe extern "system" fn RemoveChild(this: *mut core::ffi::c_void, oldchild: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SvgElement_Impl::RemoveChild(this, windows_core::from_raw_borrowed(&oldchild)).into() + ID2D1SvgElement_Impl::RemoveChild(this, core::mem::transmute_copy(&oldchild)).into() } unsafe extern "system" fn CreateChild(this: *mut core::ffi::c_void, tagname: windows_core::PCWSTR, newchild: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12615,7 +12615,7 @@ impl ID2D1SvgElement_Vtbl { } unsafe extern "system" fn SetAttributeValue(this: *mut core::ffi::c_void, name: windows_core::PCWSTR, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SvgElement_Impl::SetAttributeValue(this, core::mem::transmute(&name), windows_core::from_raw_borrowed(&value)).into() + ID2D1SvgElement_Impl::SetAttributeValue(this, core::mem::transmute(&name), core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn SetAttributeValue2(this: *mut core::ffi::c_void, name: windows_core::PCWSTR, r#type: D2D1_SVG_ATTRIBUTE_POD_TYPE, value: *const core::ffi::c_void, valuesizeinbytes: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12731,17 +12731,17 @@ pub struct ID2D1SvgGlyphStyle_Vtbl { pub GetStroke: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut f32, *mut f32, u32, *mut f32), } pub trait ID2D1SvgGlyphStyle_Impl: ID2D1Resource_Impl { - fn SetFill(&self, brush: Option<&ID2D1Brush>) -> windows_core::Result<()>; - fn GetFill(&self, brush: *mut Option); - fn SetStroke(&self, brush: Option<&ID2D1Brush>, strokewidth: f32, dashes: *const f32, dashescount: u32, dashoffset: f32) -> windows_core::Result<()>; + fn SetFill(&self, brush: windows_core::Ref<'_, ID2D1Brush>) -> windows_core::Result<()>; + fn GetFill(&self, brush: windows_core::OutRef<'_, ID2D1Brush>); + fn SetStroke(&self, brush: windows_core::Ref<'_, ID2D1Brush>, strokewidth: f32, dashes: *const f32, dashescount: u32, dashoffset: f32) -> windows_core::Result<()>; fn GetStrokeDashesCount(&self) -> u32; - fn GetStroke(&self, brush: *mut Option, strokewidth: *mut f32, dashes: *mut f32, dashescount: u32, dashoffset: *mut f32); + fn GetStroke(&self, brush: windows_core::OutRef<'_, ID2D1Brush>, strokewidth: *mut f32, dashes: *mut f32, dashescount: u32, dashoffset: *mut f32); } impl ID2D1SvgGlyphStyle_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetFill(this: *mut core::ffi::c_void, brush: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SvgGlyphStyle_Impl::SetFill(this, windows_core::from_raw_borrowed(&brush)).into() + ID2D1SvgGlyphStyle_Impl::SetFill(this, core::mem::transmute_copy(&brush)).into() } unsafe extern "system" fn GetFill(this: *mut core::ffi::c_void, brush: *mut *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12749,7 +12749,7 @@ impl ID2D1SvgGlyphStyle_Vtbl { } unsafe extern "system" fn SetStroke(this: *mut core::ffi::c_void, brush: *mut core::ffi::c_void, strokewidth: f32, dashes: *const f32, dashescount: u32, dashoffset: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1SvgGlyphStyle_Impl::SetStroke(this, windows_core::from_raw_borrowed(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&dashes), core::mem::transmute_copy(&dashescount), core::mem::transmute_copy(&dashoffset)).into() + ID2D1SvgGlyphStyle_Impl::SetStroke(this, core::mem::transmute_copy(&brush), core::mem::transmute_copy(&strokewidth), core::mem::transmute_copy(&dashes), core::mem::transmute_copy(&dashescount), core::mem::transmute_copy(&dashoffset)).into() } unsafe extern "system" fn GetStrokeDashesCount(this: *mut core::ffi::c_void) -> u32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13377,12 +13377,12 @@ pub struct ID2D1TransformGraph_Vtbl { } pub trait ID2D1TransformGraph_Impl: windows_core::IUnknownImpl { fn GetInputCount(&self) -> u32; - fn SetSingleTransformNode(&self, node: Option<&ID2D1TransformNode>) -> windows_core::Result<()>; - fn AddNode(&self, node: Option<&ID2D1TransformNode>) -> windows_core::Result<()>; - fn RemoveNode(&self, node: Option<&ID2D1TransformNode>) -> windows_core::Result<()>; - fn SetOutputNode(&self, node: Option<&ID2D1TransformNode>) -> windows_core::Result<()>; - fn ConnectNode(&self, fromnode: Option<&ID2D1TransformNode>, tonode: Option<&ID2D1TransformNode>, tonodeinputindex: u32) -> windows_core::Result<()>; - fn ConnectToEffectInput(&self, toeffectinputindex: u32, node: Option<&ID2D1TransformNode>, tonodeinputindex: u32) -> windows_core::Result<()>; + fn SetSingleTransformNode(&self, node: windows_core::Ref<'_, ID2D1TransformNode>) -> windows_core::Result<()>; + fn AddNode(&self, node: windows_core::Ref<'_, ID2D1TransformNode>) -> windows_core::Result<()>; + fn RemoveNode(&self, node: windows_core::Ref<'_, ID2D1TransformNode>) -> windows_core::Result<()>; + fn SetOutputNode(&self, node: windows_core::Ref<'_, ID2D1TransformNode>) -> windows_core::Result<()>; + fn ConnectNode(&self, fromnode: windows_core::Ref<'_, ID2D1TransformNode>, tonode: windows_core::Ref<'_, ID2D1TransformNode>, tonodeinputindex: u32) -> windows_core::Result<()>; + fn ConnectToEffectInput(&self, toeffectinputindex: u32, node: windows_core::Ref<'_, ID2D1TransformNode>, tonodeinputindex: u32) -> windows_core::Result<()>; fn Clear(&self); fn SetPassthroughGraph(&self, effectinputindex: u32) -> windows_core::Result<()>; } @@ -13394,27 +13394,27 @@ impl ID2D1TransformGraph_Vtbl { } unsafe extern "system" fn SetSingleTransformNode(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1TransformGraph_Impl::SetSingleTransformNode(this, windows_core::from_raw_borrowed(&node)).into() + ID2D1TransformGraph_Impl::SetSingleTransformNode(this, core::mem::transmute_copy(&node)).into() } unsafe extern "system" fn AddNode(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1TransformGraph_Impl::AddNode(this, windows_core::from_raw_borrowed(&node)).into() + ID2D1TransformGraph_Impl::AddNode(this, core::mem::transmute_copy(&node)).into() } unsafe extern "system" fn RemoveNode(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1TransformGraph_Impl::RemoveNode(this, windows_core::from_raw_borrowed(&node)).into() + ID2D1TransformGraph_Impl::RemoveNode(this, core::mem::transmute_copy(&node)).into() } unsafe extern "system" fn SetOutputNode(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1TransformGraph_Impl::SetOutputNode(this, windows_core::from_raw_borrowed(&node)).into() + ID2D1TransformGraph_Impl::SetOutputNode(this, core::mem::transmute_copy(&node)).into() } unsafe extern "system" fn ConnectNode(this: *mut core::ffi::c_void, fromnode: *mut core::ffi::c_void, tonode: *mut core::ffi::c_void, tonodeinputindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1TransformGraph_Impl::ConnectNode(this, windows_core::from_raw_borrowed(&fromnode), windows_core::from_raw_borrowed(&tonode), core::mem::transmute_copy(&tonodeinputindex)).into() + ID2D1TransformGraph_Impl::ConnectNode(this, core::mem::transmute_copy(&fromnode), core::mem::transmute_copy(&tonode), core::mem::transmute_copy(&tonodeinputindex)).into() } unsafe extern "system" fn ConnectToEffectInput(this: *mut core::ffi::c_void, toeffectinputindex: u32, node: *mut core::ffi::c_void, tonodeinputindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID2D1TransformGraph_Impl::ConnectToEffectInput(this, core::mem::transmute_copy(&toeffectinputindex), windows_core::from_raw_borrowed(&node), core::mem::transmute_copy(&tonodeinputindex)).into() + ID2D1TransformGraph_Impl::ConnectToEffectInput(this, core::mem::transmute_copy(&toeffectinputindex), core::mem::transmute_copy(&node), core::mem::transmute_copy(&tonodeinputindex)).into() } unsafe extern "system" fn Clear(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13504,7 +13504,7 @@ pub struct ID2D1TransformedGeometry_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub trait ID2D1TransformedGeometry_Impl: ID2D1Geometry_Impl { - fn GetSourceGeometry(&self, sourcegeometry: *mut Option); + fn GetSourceGeometry(&self, sourcegeometry: windows_core::OutRef<'_, ID2D1Geometry>); fn GetTransform(&self, transform: *mut super::super::super::Foundation::Numerics::Matrix3x2); } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -13559,7 +13559,7 @@ pub struct ID2D1TransformedImageSource_Vtbl { pub GetProperties: unsafe extern "system" fn(*mut core::ffi::c_void, *mut D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES), } pub trait ID2D1TransformedImageSource_Impl: ID2D1Image_Impl { - fn GetSource(&self, imagesource: *mut Option); + fn GetSource(&self, imagesource: windows_core::OutRef<'_, ID2D1ImageSource>); fn GetProperties(&self, properties: *mut D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES); } impl ID2D1TransformedImageSource_Vtbl { diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Dxc/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Dxc/mod.rs index 2cb087d03d..50d0971cd5 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Dxc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Dxc/mod.rs @@ -145,13 +145,13 @@ pub struct IDxcAssembler_Vtbl { pub AssembleToContainer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDxcAssembler_Impl: windows_core::IUnknownImpl { - fn AssembleToContainer(&self, pshader: Option<&IDxcBlob>) -> windows_core::Result; + fn AssembleToContainer(&self, pshader: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result; } impl IDxcAssembler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AssembleToContainer(this: *mut core::ffi::c_void, pshader: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcAssembler_Impl::AssembleToContainer(this, windows_core::from_raw_borrowed(&pshader)) { + match IDxcAssembler_Impl::AssembleToContainer(this, core::mem::transmute_copy(&pshader)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -374,15 +374,15 @@ pub struct IDxcCompiler_Vtbl { pub Disassemble: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDxcCompiler_Impl: windows_core::IUnknownImpl { - fn Compile(&self, psource: Option<&IDxcBlob>, psourcename: &windows_core::PCWSTR, pentrypoint: &windows_core::PCWSTR, ptargetprofile: &windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32, pincludehandler: Option<&IDxcIncludeHandler>) -> windows_core::Result; - fn Preprocess(&self, psource: Option<&IDxcBlob>, psourcename: &windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32, pincludehandler: Option<&IDxcIncludeHandler>) -> windows_core::Result; - fn Disassemble(&self, psource: Option<&IDxcBlob>) -> windows_core::Result; + fn Compile(&self, psource: windows_core::Ref<'_, IDxcBlob>, psourcename: &windows_core::PCWSTR, pentrypoint: &windows_core::PCWSTR, ptargetprofile: &windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32, pincludehandler: windows_core::Ref<'_, IDxcIncludeHandler>) -> windows_core::Result; + fn Preprocess(&self, psource: windows_core::Ref<'_, IDxcBlob>, psourcename: &windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32, pincludehandler: windows_core::Ref<'_, IDxcIncludeHandler>) -> windows_core::Result; + fn Disassemble(&self, psource: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result; } impl IDxcCompiler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Compile(this: *mut core::ffi::c_void, psource: *mut core::ffi::c_void, psourcename: windows_core::PCWSTR, pentrypoint: windows_core::PCWSTR, ptargetprofile: windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32, pincludehandler: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcCompiler_Impl::Compile(this, windows_core::from_raw_borrowed(&psource), core::mem::transmute(&psourcename), core::mem::transmute(&pentrypoint), core::mem::transmute(&ptargetprofile), core::mem::transmute_copy(&parguments), core::mem::transmute_copy(&argcount), core::mem::transmute_copy(&pdefines), core::mem::transmute_copy(&definecount), windows_core::from_raw_borrowed(&pincludehandler)) { + match IDxcCompiler_Impl::Compile(this, core::mem::transmute_copy(&psource), core::mem::transmute(&psourcename), core::mem::transmute(&pentrypoint), core::mem::transmute(&ptargetprofile), core::mem::transmute_copy(&parguments), core::mem::transmute_copy(&argcount), core::mem::transmute_copy(&pdefines), core::mem::transmute_copy(&definecount), core::mem::transmute_copy(&pincludehandler)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -392,7 +392,7 @@ impl IDxcCompiler_Vtbl { } unsafe extern "system" fn Preprocess(this: *mut core::ffi::c_void, psource: *mut core::ffi::c_void, psourcename: windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32, pincludehandler: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcCompiler_Impl::Preprocess(this, windows_core::from_raw_borrowed(&psource), core::mem::transmute(&psourcename), core::mem::transmute_copy(&parguments), core::mem::transmute_copy(&argcount), core::mem::transmute_copy(&pdefines), core::mem::transmute_copy(&definecount), windows_core::from_raw_borrowed(&pincludehandler)) { + match IDxcCompiler_Impl::Preprocess(this, core::mem::transmute_copy(&psource), core::mem::transmute(&psourcename), core::mem::transmute_copy(&parguments), core::mem::transmute_copy(&argcount), core::mem::transmute_copy(&pdefines), core::mem::transmute_copy(&definecount), core::mem::transmute_copy(&pincludehandler)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -402,7 +402,7 @@ impl IDxcCompiler_Vtbl { } unsafe extern "system" fn Disassemble(this: *mut core::ffi::c_void, psource: *mut core::ffi::c_void, ppdisassembly: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcCompiler_Impl::Disassemble(this, windows_core::from_raw_borrowed(&psource)) { + match IDxcCompiler_Impl::Disassemble(this, core::mem::transmute_copy(&psource)) { Ok(ok__) => { ppdisassembly.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -463,28 +463,13 @@ pub struct IDxcCompiler2_Vtbl { pub CompileWithDebug: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, windows_core::PCWSTR, *const windows_core::PCWSTR, u32, *const DxcDefine, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut windows_core::PWSTR, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDxcCompiler2_Impl: IDxcCompiler_Impl { - fn CompileWithDebug(&self, psource: Option<&IDxcBlob>, psourcename: &windows_core::PCWSTR, pentrypoint: &windows_core::PCWSTR, ptargetprofile: &windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32, pincludehandler: Option<&IDxcIncludeHandler>, ppresult: *mut Option, ppdebugblobname: *mut windows_core::PWSTR, ppdebugblob: *mut Option) -> windows_core::Result<()>; + fn CompileWithDebug(&self, psource: windows_core::Ref<'_, IDxcBlob>, psourcename: &windows_core::PCWSTR, pentrypoint: &windows_core::PCWSTR, ptargetprofile: &windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32, pincludehandler: windows_core::Ref<'_, IDxcIncludeHandler>, ppresult: windows_core::OutRef<'_, IDxcOperationResult>, ppdebugblobname: *mut windows_core::PWSTR, ppdebugblob: windows_core::OutRef<'_, IDxcBlob>) -> windows_core::Result<()>; } impl IDxcCompiler2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CompileWithDebug(this: *mut core::ffi::c_void, psource: *mut core::ffi::c_void, psourcename: windows_core::PCWSTR, pentrypoint: windows_core::PCWSTR, ptargetprofile: windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32, pincludehandler: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void, ppdebugblobname: *mut windows_core::PWSTR, ppdebugblob: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcCompiler2_Impl::CompileWithDebug( - this, - windows_core::from_raw_borrowed(&psource), - core::mem::transmute(&psourcename), - core::mem::transmute(&pentrypoint), - core::mem::transmute(&ptargetprofile), - core::mem::transmute_copy(&parguments), - core::mem::transmute_copy(&argcount), - core::mem::transmute_copy(&pdefines), - core::mem::transmute_copy(&definecount), - windows_core::from_raw_borrowed(&pincludehandler), - core::mem::transmute_copy(&ppresult), - core::mem::transmute_copy(&ppdebugblobname), - core::mem::transmute_copy(&ppdebugblob), - ) - .into() + IDxcCompiler2_Impl::CompileWithDebug(this, core::mem::transmute_copy(&psource), core::mem::transmute(&psourcename), core::mem::transmute(&pentrypoint), core::mem::transmute(&ptargetprofile), core::mem::transmute_copy(&parguments), core::mem::transmute_copy(&argcount), core::mem::transmute_copy(&pdefines), core::mem::transmute_copy(&definecount), core::mem::transmute_copy(&pincludehandler), core::mem::transmute_copy(&ppresult), core::mem::transmute_copy(&ppdebugblobname), core::mem::transmute_copy(&ppdebugblob)).into() } Self { base__: IDxcCompiler_Vtbl::new::(), CompileWithDebug: CompileWithDebug:: } } @@ -519,14 +504,14 @@ pub struct IDxcCompiler3_Vtbl { pub Disassemble: unsafe extern "system" fn(*mut core::ffi::c_void, *const DxcBuffer, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDxcCompiler3_Impl: windows_core::IUnknownImpl { - fn Compile(&self, psource: *const DxcBuffer, parguments: *const windows_core::PCWSTR, argcount: u32, pincludehandler: Option<&IDxcIncludeHandler>, riid: *const windows_core::GUID, ppresult: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn Compile(&self, psource: *const DxcBuffer, parguments: *const windows_core::PCWSTR, argcount: u32, pincludehandler: windows_core::Ref<'_, IDxcIncludeHandler>, riid: *const windows_core::GUID, ppresult: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn Disassemble(&self, pobject: *const DxcBuffer, riid: *const windows_core::GUID, ppresult: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IDxcCompiler3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Compile(this: *mut core::ffi::c_void, psource: *const DxcBuffer, parguments: *const windows_core::PCWSTR, argcount: u32, pincludehandler: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcCompiler3_Impl::Compile(this, core::mem::transmute_copy(&psource), core::mem::transmute_copy(&parguments), core::mem::transmute_copy(&argcount), windows_core::from_raw_borrowed(&pincludehandler), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppresult)).into() + IDxcCompiler3_Impl::Compile(this, core::mem::transmute_copy(&psource), core::mem::transmute_copy(&parguments), core::mem::transmute_copy(&argcount), core::mem::transmute_copy(&pincludehandler), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppresult)).into() } unsafe extern "system" fn Disassemble(this: *mut core::ffi::c_void, pobject: *const DxcBuffer, riid: *const windows_core::GUID, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -646,8 +631,8 @@ pub struct IDxcContainerBuilder_Vtbl { pub SerializeContainer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDxcContainerBuilder_Impl: windows_core::IUnknownImpl { - fn Load(&self, pdxilcontainerheader: Option<&IDxcBlob>) -> windows_core::Result<()>; - fn AddPart(&self, fourcc: u32, psource: Option<&IDxcBlob>) -> windows_core::Result<()>; + fn Load(&self, pdxilcontainerheader: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result<()>; + fn AddPart(&self, fourcc: u32, psource: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result<()>; fn RemovePart(&self, fourcc: u32) -> windows_core::Result<()>; fn SerializeContainer(&self) -> windows_core::Result; } @@ -655,11 +640,11 @@ impl IDxcContainerBuilder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Load(this: *mut core::ffi::c_void, pdxilcontainerheader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcContainerBuilder_Impl::Load(this, windows_core::from_raw_borrowed(&pdxilcontainerheader)).into() + IDxcContainerBuilder_Impl::Load(this, core::mem::transmute_copy(&pdxilcontainerheader)).into() } unsafe extern "system" fn AddPart(this: *mut core::ffi::c_void, fourcc: u32, psource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcContainerBuilder_Impl::AddPart(this, core::mem::transmute_copy(&fourcc), windows_core::from_raw_borrowed(&psource)).into() + IDxcContainerBuilder_Impl::AddPart(this, core::mem::transmute_copy(&fourcc), core::mem::transmute_copy(&psource)).into() } unsafe extern "system" fn RemovePart(this: *mut core::ffi::c_void, fourcc: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -728,7 +713,7 @@ pub struct IDxcContainerReflection_Vtbl { pub GetPartReflection: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDxcContainerReflection_Impl: windows_core::IUnknownImpl { - fn Load(&self, pcontainer: Option<&IDxcBlob>) -> windows_core::Result<()>; + fn Load(&self, pcontainer: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result<()>; fn GetPartCount(&self) -> windows_core::Result; fn GetPartKind(&self, idx: u32) -> windows_core::Result; fn GetPartContent(&self, idx: u32) -> windows_core::Result; @@ -739,7 +724,7 @@ impl IDxcContainerReflection_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Load(this: *mut core::ffi::c_void, pcontainer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcContainerReflection_Impl::Load(this, windows_core::from_raw_borrowed(&pcontainer)).into() + IDxcContainerReflection_Impl::Load(this, core::mem::transmute_copy(&pcontainer)).into() } unsafe extern "system" fn GetPartCount(this: *mut core::ffi::c_void, presult: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -821,7 +806,7 @@ pub struct IDxcExtraOutputs_Vtbl { } pub trait IDxcExtraOutputs_Impl: windows_core::IUnknownImpl { fn GetOutputCount(&self) -> u32; - fn GetOutput(&self, uindex: u32, iid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void, ppoutputtype: *mut Option, ppoutputname: *mut Option) -> windows_core::Result<()>; + fn GetOutput(&self, uindex: u32, iid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void, ppoutputtype: windows_core::OutRef<'_, IDxcBlobUtf16>, ppoutputname: windows_core::OutRef<'_, IDxcBlobUtf16>) -> windows_core::Result<()>; } impl IDxcExtraOutputs_Vtbl { pub const fn new() -> Self { @@ -974,27 +959,27 @@ pub struct IDxcLibrary_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IDxcLibrary_Impl: windows_core::IUnknownImpl { - fn SetMalloc(&self, pmalloc: Option<&super::super::super::System::Com::IMalloc>) -> windows_core::Result<()>; - fn CreateBlobFromBlob(&self, pblob: Option<&IDxcBlob>, offset: u32, length: u32) -> windows_core::Result; + fn SetMalloc(&self, pmalloc: windows_core::Ref<'_, super::super::super::System::Com::IMalloc>) -> windows_core::Result<()>; + fn CreateBlobFromBlob(&self, pblob: windows_core::Ref<'_, IDxcBlob>, offset: u32, length: u32) -> windows_core::Result; fn CreateBlobFromFile(&self, pfilename: &windows_core::PCWSTR, codepage: *const DXC_CP) -> windows_core::Result; fn CreateBlobWithEncodingFromPinned(&self, ptext: *const core::ffi::c_void, size: u32, codepage: DXC_CP) -> windows_core::Result; fn CreateBlobWithEncodingOnHeapCopy(&self, ptext: *const core::ffi::c_void, size: u32, codepage: DXC_CP) -> windows_core::Result; - fn CreateBlobWithEncodingOnMalloc(&self, ptext: *const core::ffi::c_void, pimalloc: Option<&super::super::super::System::Com::IMalloc>, size: u32, codepage: DXC_CP) -> windows_core::Result; + fn CreateBlobWithEncodingOnMalloc(&self, ptext: *const core::ffi::c_void, pimalloc: windows_core::Ref<'_, super::super::super::System::Com::IMalloc>, size: u32, codepage: DXC_CP) -> windows_core::Result; fn CreateIncludeHandler(&self) -> windows_core::Result; - fn CreateStreamFromBlobReadOnly(&self, pblob: Option<&IDxcBlob>) -> windows_core::Result; - fn GetBlobAsUtf8(&self, pblob: Option<&IDxcBlob>) -> windows_core::Result; - fn GetBlobAsUtf16(&self, pblob: Option<&IDxcBlob>) -> windows_core::Result; + fn CreateStreamFromBlobReadOnly(&self, pblob: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result; + fn GetBlobAsUtf8(&self, pblob: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result; + fn GetBlobAsUtf16(&self, pblob: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IDxcLibrary_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetMalloc(this: *mut core::ffi::c_void, pmalloc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcLibrary_Impl::SetMalloc(this, windows_core::from_raw_borrowed(&pmalloc)).into() + IDxcLibrary_Impl::SetMalloc(this, core::mem::transmute_copy(&pmalloc)).into() } unsafe extern "system" fn CreateBlobFromBlob(this: *mut core::ffi::c_void, pblob: *mut core::ffi::c_void, offset: u32, length: u32, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcLibrary_Impl::CreateBlobFromBlob(this, windows_core::from_raw_borrowed(&pblob), core::mem::transmute_copy(&offset), core::mem::transmute_copy(&length)) { + match IDxcLibrary_Impl::CreateBlobFromBlob(this, core::mem::transmute_copy(&pblob), core::mem::transmute_copy(&offset), core::mem::transmute_copy(&length)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1034,7 +1019,7 @@ impl IDxcLibrary_Vtbl { } unsafe extern "system" fn CreateBlobWithEncodingOnMalloc(this: *mut core::ffi::c_void, ptext: *const core::ffi::c_void, pimalloc: *mut core::ffi::c_void, size: u32, codepage: DXC_CP, pblobencoding: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcLibrary_Impl::CreateBlobWithEncodingOnMalloc(this, core::mem::transmute_copy(&ptext), windows_core::from_raw_borrowed(&pimalloc), core::mem::transmute_copy(&size), core::mem::transmute_copy(&codepage)) { + match IDxcLibrary_Impl::CreateBlobWithEncodingOnMalloc(this, core::mem::transmute_copy(&ptext), core::mem::transmute_copy(&pimalloc), core::mem::transmute_copy(&size), core::mem::transmute_copy(&codepage)) { Ok(ok__) => { pblobencoding.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1054,7 +1039,7 @@ impl IDxcLibrary_Vtbl { } unsafe extern "system" fn CreateStreamFromBlobReadOnly(this: *mut core::ffi::c_void, pblob: *mut core::ffi::c_void, ppstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcLibrary_Impl::CreateStreamFromBlobReadOnly(this, windows_core::from_raw_borrowed(&pblob)) { + match IDxcLibrary_Impl::CreateStreamFromBlobReadOnly(this, core::mem::transmute_copy(&pblob)) { Ok(ok__) => { ppstream.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1064,7 +1049,7 @@ impl IDxcLibrary_Vtbl { } unsafe extern "system" fn GetBlobAsUtf8(this: *mut core::ffi::c_void, pblob: *mut core::ffi::c_void, pblobencoding: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcLibrary_Impl::GetBlobAsUtf8(this, windows_core::from_raw_borrowed(&pblob)) { + match IDxcLibrary_Impl::GetBlobAsUtf8(this, core::mem::transmute_copy(&pblob)) { Ok(ok__) => { pblobencoding.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1074,7 +1059,7 @@ impl IDxcLibrary_Vtbl { } unsafe extern "system" fn GetBlobAsUtf16(this: *mut core::ffi::c_void, pblob: *mut core::ffi::c_void, pblobencoding: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcLibrary_Impl::GetBlobAsUtf16(this, windows_core::from_raw_borrowed(&pblob)) { + match IDxcLibrary_Impl::GetBlobAsUtf16(this, core::mem::transmute_copy(&pblob)) { Ok(ok__) => { pblobencoding.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1128,14 +1113,14 @@ pub struct IDxcLinker_Vtbl { pub Link: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, *const windows_core::PCWSTR, u32, *const windows_core::PCWSTR, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDxcLinker_Impl: windows_core::IUnknownImpl { - fn RegisterLibrary(&self, plibname: &windows_core::PCWSTR, plib: Option<&IDxcBlob>) -> windows_core::Result<()>; + fn RegisterLibrary(&self, plibname: &windows_core::PCWSTR, plib: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result<()>; fn Link(&self, pentryname: &windows_core::PCWSTR, ptargetprofile: &windows_core::PCWSTR, plibnames: *const windows_core::PCWSTR, libcount: u32, parguments: *const windows_core::PCWSTR, argcount: u32) -> windows_core::Result; } impl IDxcLinker_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterLibrary(this: *mut core::ffi::c_void, plibname: windows_core::PCWSTR, plib: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcLinker_Impl::RegisterLibrary(this, core::mem::transmute(&plibname), windows_core::from_raw_borrowed(&plib)).into() + IDxcLinker_Impl::RegisterLibrary(this, core::mem::transmute(&plibname), core::mem::transmute_copy(&plib)).into() } unsafe extern "system" fn Link(this: *mut core::ffi::c_void, pentryname: windows_core::PCWSTR, ptargetprofile: windows_core::PCWSTR, plibnames: *const windows_core::PCWSTR, libcount: u32, parguments: *const windows_core::PCWSTR, argcount: u32, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1258,7 +1243,7 @@ pub struct IDxcOptimizer_Vtbl { pub trait IDxcOptimizer_Impl: windows_core::IUnknownImpl { fn GetAvailablePassCount(&self) -> windows_core::Result; fn GetAvailablePass(&self, index: u32) -> windows_core::Result; - fn RunOptimizer(&self, pblob: Option<&IDxcBlob>, ppoptions: *const windows_core::PCWSTR, optioncount: u32, poutputmodule: *mut Option, ppoutputtext: *mut Option) -> windows_core::Result<()>; + fn RunOptimizer(&self, pblob: windows_core::Ref<'_, IDxcBlob>, ppoptions: *const windows_core::PCWSTR, optioncount: u32, poutputmodule: windows_core::OutRef<'_, IDxcBlob>, ppoutputtext: windows_core::OutRef<'_, IDxcBlobEncoding>) -> windows_core::Result<()>; } impl IDxcOptimizer_Vtbl { pub const fn new() -> Self { @@ -1284,7 +1269,7 @@ impl IDxcOptimizer_Vtbl { } unsafe extern "system" fn RunOptimizer(this: *mut core::ffi::c_void, pblob: *mut core::ffi::c_void, ppoptions: *const windows_core::PCWSTR, optioncount: u32, poutputmodule: *mut *mut core::ffi::c_void, ppoutputtext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcOptimizer_Impl::RunOptimizer(this, windows_core::from_raw_borrowed(&pblob), core::mem::transmute_copy(&ppoptions), core::mem::transmute_copy(&optioncount), core::mem::transmute_copy(&poutputmodule), core::mem::transmute_copy(&ppoutputtext)).into() + IDxcOptimizer_Impl::RunOptimizer(this, core::mem::transmute_copy(&pblob), core::mem::transmute_copy(&ppoptions), core::mem::transmute_copy(&optioncount), core::mem::transmute_copy(&poutputmodule), core::mem::transmute_copy(&ppoutputtext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1536,7 +1521,7 @@ pub struct IDxcPdbUtils_Vtbl { pub OverrideRootSignature: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT, } pub trait IDxcPdbUtils_Impl: windows_core::IUnknownImpl { - fn Load(&self, ppdbordxil: Option<&IDxcBlob>) -> windows_core::Result<()>; + fn Load(&self, ppdbordxil: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result<()>; fn GetSourceCount(&self) -> windows_core::Result; fn GetSource(&self, uindex: u32) -> windows_core::Result; fn GetSourceName(&self, uindex: u32) -> windows_core::Result; @@ -1556,7 +1541,7 @@ pub trait IDxcPdbUtils_Impl: windows_core::IUnknownImpl { fn IsFullPDB(&self) -> super::super::super::Foundation::BOOL; fn GetFullPDB(&self) -> windows_core::Result; fn GetVersionInfo(&self) -> windows_core::Result; - fn SetCompiler(&self, pcompiler: Option<&IDxcCompiler3>) -> windows_core::Result<()>; + fn SetCompiler(&self, pcompiler: windows_core::Ref<'_, IDxcCompiler3>) -> windows_core::Result<()>; fn CompileForFullPDB(&self) -> windows_core::Result; fn OverrideArgs(&self, pargpairs: *const DxcArgPair, unumargpairs: u32) -> windows_core::Result<()>; fn OverrideRootSignature(&self, prootsignature: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -1565,7 +1550,7 @@ impl IDxcPdbUtils_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Load(this: *mut core::ffi::c_void, ppdbordxil: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcPdbUtils_Impl::Load(this, windows_core::from_raw_borrowed(&ppdbordxil)).into() + IDxcPdbUtils_Impl::Load(this, core::mem::transmute_copy(&ppdbordxil)).into() } unsafe extern "system" fn GetSourceCount(this: *mut core::ffi::c_void, pcount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1747,7 +1732,7 @@ impl IDxcPdbUtils_Vtbl { } unsafe extern "system" fn SetCompiler(this: *mut core::ffi::c_void, pcompiler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcPdbUtils_Impl::SetCompiler(this, windows_core::from_raw_borrowed(&pcompiler)).into() + IDxcPdbUtils_Impl::SetCompiler(this, core::mem::transmute_copy(&pcompiler)).into() } unsafe extern "system" fn CompileForFullPDB(this: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1839,7 +1824,7 @@ pub struct IDxcResult_Vtbl { } pub trait IDxcResult_Impl: IDxcOperationResult_Impl { fn HasOutput(&self, dxcoutkind: DXC_OUT_KIND) -> super::super::super::Foundation::BOOL; - fn GetOutput(&self, dxcoutkind: DXC_OUT_KIND, iid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void, ppoutputname: *mut Option) -> windows_core::Result<()>; + fn GetOutput(&self, dxcoutkind: DXC_OUT_KIND, iid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void, ppoutputname: windows_core::OutRef<'_, IDxcBlobUtf16>) -> windows_core::Result<()>; fn GetNumOutputs(&self) -> u32; fn GetOutputByIndex(&self, index: u32) -> DXC_OUT_KIND; fn PrimaryOutput(&self) -> DXC_OUT_KIND; @@ -1986,26 +1971,26 @@ pub struct IDxcUtils_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IDxcUtils_Impl: windows_core::IUnknownImpl { - fn CreateBlobFromBlob(&self, pblob: Option<&IDxcBlob>, offset: u32, length: u32) -> windows_core::Result; + fn CreateBlobFromBlob(&self, pblob: windows_core::Ref<'_, IDxcBlob>, offset: u32, length: u32) -> windows_core::Result; fn CreateBlobFromPinned(&self, pdata: *const core::ffi::c_void, size: u32, codepage: DXC_CP) -> windows_core::Result; - fn MoveToBlob(&self, pdata: *const core::ffi::c_void, pimalloc: Option<&super::super::super::System::Com::IMalloc>, size: u32, codepage: DXC_CP) -> windows_core::Result; + fn MoveToBlob(&self, pdata: *const core::ffi::c_void, pimalloc: windows_core::Ref<'_, super::super::super::System::Com::IMalloc>, size: u32, codepage: DXC_CP) -> windows_core::Result; fn CreateBlob(&self, pdata: *const core::ffi::c_void, size: u32, codepage: DXC_CP) -> windows_core::Result; fn LoadFile(&self, pfilename: &windows_core::PCWSTR, pcodepage: *const DXC_CP) -> windows_core::Result; - fn CreateReadOnlyStreamFromBlob(&self, pblob: Option<&IDxcBlob>) -> windows_core::Result; + fn CreateReadOnlyStreamFromBlob(&self, pblob: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result; fn CreateDefaultIncludeHandler(&self) -> windows_core::Result; - fn GetBlobAsUtf8(&self, pblob: Option<&IDxcBlob>) -> windows_core::Result; - fn GetBlobAsUtf16(&self, pblob: Option<&IDxcBlob>) -> windows_core::Result; + fn GetBlobAsUtf8(&self, pblob: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result; + fn GetBlobAsUtf16(&self, pblob: windows_core::Ref<'_, IDxcBlob>) -> windows_core::Result; fn GetDxilContainerPart(&self, pshader: *const DxcBuffer, dxcpart: u32, pppartdata: *mut *mut core::ffi::c_void, ppartsizeinbytes: *mut u32) -> windows_core::Result<()>; fn CreateReflection(&self, pdata: *const DxcBuffer, iid: *const windows_core::GUID, ppvreflection: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn BuildArguments(&self, psourcename: &windows_core::PCWSTR, pentrypoint: &windows_core::PCWSTR, ptargetprofile: &windows_core::PCWSTR, parguments: *const windows_core::PCWSTR, argcount: u32, pdefines: *const DxcDefine, definecount: u32) -> windows_core::Result; - fn GetPDBContents(&self, ppdbblob: Option<&IDxcBlob>, pphash: *mut Option, ppcontainer: *mut Option) -> windows_core::Result<()>; + fn GetPDBContents(&self, ppdbblob: windows_core::Ref<'_, IDxcBlob>, pphash: windows_core::OutRef<'_, IDxcBlob>, ppcontainer: windows_core::OutRef<'_, IDxcBlob>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IDxcUtils_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateBlobFromBlob(this: *mut core::ffi::c_void, pblob: *mut core::ffi::c_void, offset: u32, length: u32, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcUtils_Impl::CreateBlobFromBlob(this, windows_core::from_raw_borrowed(&pblob), core::mem::transmute_copy(&offset), core::mem::transmute_copy(&length)) { + match IDxcUtils_Impl::CreateBlobFromBlob(this, core::mem::transmute_copy(&pblob), core::mem::transmute_copy(&offset), core::mem::transmute_copy(&length)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2025,7 +2010,7 @@ impl IDxcUtils_Vtbl { } unsafe extern "system" fn MoveToBlob(this: *mut core::ffi::c_void, pdata: *const core::ffi::c_void, pimalloc: *mut core::ffi::c_void, size: u32, codepage: DXC_CP, pblobencoding: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcUtils_Impl::MoveToBlob(this, core::mem::transmute_copy(&pdata), windows_core::from_raw_borrowed(&pimalloc), core::mem::transmute_copy(&size), core::mem::transmute_copy(&codepage)) { + match IDxcUtils_Impl::MoveToBlob(this, core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&pimalloc), core::mem::transmute_copy(&size), core::mem::transmute_copy(&codepage)) { Ok(ok__) => { pblobencoding.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2055,7 +2040,7 @@ impl IDxcUtils_Vtbl { } unsafe extern "system" fn CreateReadOnlyStreamFromBlob(this: *mut core::ffi::c_void, pblob: *mut core::ffi::c_void, ppstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcUtils_Impl::CreateReadOnlyStreamFromBlob(this, windows_core::from_raw_borrowed(&pblob)) { + match IDxcUtils_Impl::CreateReadOnlyStreamFromBlob(this, core::mem::transmute_copy(&pblob)) { Ok(ok__) => { ppstream.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2075,7 +2060,7 @@ impl IDxcUtils_Vtbl { } unsafe extern "system" fn GetBlobAsUtf8(this: *mut core::ffi::c_void, pblob: *mut core::ffi::c_void, pblobencoding: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcUtils_Impl::GetBlobAsUtf8(this, windows_core::from_raw_borrowed(&pblob)) { + match IDxcUtils_Impl::GetBlobAsUtf8(this, core::mem::transmute_copy(&pblob)) { Ok(ok__) => { pblobencoding.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2085,7 +2070,7 @@ impl IDxcUtils_Vtbl { } unsafe extern "system" fn GetBlobAsUtf16(this: *mut core::ffi::c_void, pblob: *mut core::ffi::c_void, pblobencoding: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcUtils_Impl::GetBlobAsUtf16(this, windows_core::from_raw_borrowed(&pblob)) { + match IDxcUtils_Impl::GetBlobAsUtf16(this, core::mem::transmute_copy(&pblob)) { Ok(ok__) => { pblobencoding.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2113,7 +2098,7 @@ impl IDxcUtils_Vtbl { } unsafe extern "system" fn GetPDBContents(this: *mut core::ffi::c_void, ppdbblob: *mut core::ffi::c_void, pphash: *mut *mut core::ffi::c_void, ppcontainer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDxcUtils_Impl::GetPDBContents(this, windows_core::from_raw_borrowed(&ppdbblob), core::mem::transmute_copy(&pphash), core::mem::transmute_copy(&ppcontainer)).into() + IDxcUtils_Impl::GetPDBContents(this, core::mem::transmute_copy(&ppdbblob), core::mem::transmute_copy(&pphash), core::mem::transmute_copy(&ppcontainer)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2155,13 +2140,13 @@ pub struct IDxcValidator_Vtbl { pub Validate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDxcValidator_Impl: windows_core::IUnknownImpl { - fn Validate(&self, pshader: Option<&IDxcBlob>, flags: u32) -> windows_core::Result; + fn Validate(&self, pshader: windows_core::Ref<'_, IDxcBlob>, flags: u32) -> windows_core::Result; } impl IDxcValidator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Validate(this: *mut core::ffi::c_void, pshader: *mut core::ffi::c_void, flags: u32, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcValidator_Impl::Validate(this, windows_core::from_raw_borrowed(&pshader), core::mem::transmute_copy(&flags)) { + match IDxcValidator_Impl::Validate(this, core::mem::transmute_copy(&pshader), core::mem::transmute_copy(&flags)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2199,13 +2184,13 @@ pub struct IDxcValidator2_Vtbl { pub ValidateWithDebug: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, *const DxcBuffer, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDxcValidator2_Impl: IDxcValidator_Impl { - fn ValidateWithDebug(&self, pshader: Option<&IDxcBlob>, flags: u32, poptdebugbitcode: *const DxcBuffer) -> windows_core::Result; + fn ValidateWithDebug(&self, pshader: windows_core::Ref<'_, IDxcBlob>, flags: u32, poptdebugbitcode: *const DxcBuffer) -> windows_core::Result; } impl IDxcValidator2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ValidateWithDebug(this: *mut core::ffi::c_void, pshader: *mut core::ffi::c_void, flags: u32, poptdebugbitcode: *const DxcBuffer, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDxcValidator2_Impl::ValidateWithDebug(this, windows_core::from_raw_borrowed(&pshader), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&poptdebugbitcode)) { + match IDxcValidator2_Impl::ValidateWithDebug(this, core::mem::transmute_copy(&pshader), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&poptdebugbitcode)) { Ok(ok__) => { ppresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs index 421854376d..b04f7d12e0 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs @@ -3000,7 +3000,7 @@ pub trait ID3D10Debug_Impl: windows_core::IUnknownImpl { fn GetFeatureMask(&self) -> u32; fn SetPresentPerRenderOpDelay(&self, milliseconds: u32) -> windows_core::Result<()>; fn GetPresentPerRenderOpDelay(&self) -> u32; - fn SetSwapChain(&self, pswapchain: Option<&super::Dxgi::IDXGISwapChain>) -> windows_core::Result<()>; + fn SetSwapChain(&self, pswapchain: windows_core::Ref<'_, super::Dxgi::IDXGISwapChain>) -> windows_core::Result<()>; fn GetSwapChain(&self) -> windows_core::Result; fn Validate(&self) -> windows_core::Result<()>; } @@ -3025,7 +3025,7 @@ impl ID3D10Debug_Vtbl { } unsafe extern "system" fn SetSwapChain(this: *mut core::ffi::c_void, pswapchain: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Debug_Impl::SetSwapChain(this, windows_core::from_raw_borrowed(&pswapchain)).into() + ID3D10Debug_Impl::SetSwapChain(this, core::mem::transmute_copy(&pswapchain)).into() } unsafe extern "system" fn GetSwapChain(this: *mut core::ffi::c_void, ppswapchain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3688,62 +3688,62 @@ pub struct ID3D10Device_Vtbl { pub trait ID3D10Device_Impl: windows_core::IUnknownImpl { fn VSSetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option); fn PSSetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *const Option); - fn PSSetShader(&self, ppixelshader: Option<&ID3D10PixelShader>); + fn PSSetShader(&self, ppixelshader: windows_core::Ref<'_, ID3D10PixelShader>); fn PSSetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *const Option); - fn VSSetShader(&self, pvertexshader: Option<&ID3D10VertexShader>); + fn VSSetShader(&self, pvertexshader: windows_core::Ref<'_, ID3D10VertexShader>); fn DrawIndexed(&self, indexcount: u32, startindexlocation: u32, basevertexlocation: i32); fn Draw(&self, vertexcount: u32, startvertexlocation: u32); fn PSSetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option); - fn IASetInputLayout(&self, pinputlayout: Option<&ID3D10InputLayout>); + fn IASetInputLayout(&self, pinputlayout: windows_core::Ref<'_, ID3D10InputLayout>); fn IASetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: *const Option, pstrides: *const u32, poffsets: *const u32); - fn IASetIndexBuffer(&self, pindexbuffer: Option<&ID3D10Buffer>, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32); + fn IASetIndexBuffer(&self, pindexbuffer: windows_core::Ref<'_, ID3D10Buffer>, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32); fn DrawIndexedInstanced(&self, indexcountperinstance: u32, instancecount: u32, startindexlocation: u32, basevertexlocation: i32, startinstancelocation: u32); fn DrawInstanced(&self, vertexcountperinstance: u32, instancecount: u32, startvertexlocation: u32, startinstancelocation: u32); fn GSSetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option); - fn GSSetShader(&self, pshader: Option<&ID3D10GeometryShader>); + fn GSSetShader(&self, pshader: windows_core::Ref<'_, ID3D10GeometryShader>); fn IASetPrimitiveTopology(&self, topology: super::Direct3D::D3D_PRIMITIVE_TOPOLOGY); fn VSSetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *const Option); fn VSSetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *const Option); - fn SetPredication(&self, ppredicate: Option<&ID3D10Predicate>, predicatevalue: super::super::Foundation::BOOL); + fn SetPredication(&self, ppredicate: windows_core::Ref<'_, ID3D10Predicate>, predicatevalue: super::super::Foundation::BOOL); fn GSSetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *const Option); fn GSSetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *const Option); - fn OMSetRenderTargets(&self, numviews: u32, pprendertargetviews: *const Option, pdepthstencilview: Option<&ID3D10DepthStencilView>); - fn OMSetBlendState(&self, pblendstate: Option<&ID3D10BlendState>, blendfactor: *const f32, samplemask: u32); - fn OMSetDepthStencilState(&self, pdepthstencilstate: Option<&ID3D10DepthStencilState>, stencilref: u32); + fn OMSetRenderTargets(&self, numviews: u32, pprendertargetviews: *const Option, pdepthstencilview: windows_core::Ref<'_, ID3D10DepthStencilView>); + fn OMSetBlendState(&self, pblendstate: windows_core::Ref<'_, ID3D10BlendState>, blendfactor: *const f32, samplemask: u32); + fn OMSetDepthStencilState(&self, pdepthstencilstate: windows_core::Ref<'_, ID3D10DepthStencilState>, stencilref: u32); fn SOSetTargets(&self, numbuffers: u32, ppsotargets: *const Option, poffsets: *const u32); fn DrawAuto(&self); - fn RSSetState(&self, prasterizerstate: Option<&ID3D10RasterizerState>); + fn RSSetState(&self, prasterizerstate: windows_core::Ref<'_, ID3D10RasterizerState>); fn RSSetViewports(&self, numviewports: u32, pviewports: *const D3D10_VIEWPORT); fn RSSetScissorRects(&self, numrects: u32, prects: *const super::super::Foundation::RECT); - fn CopySubresourceRegion(&self, pdstresource: Option<&ID3D10Resource>, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: Option<&ID3D10Resource>, srcsubresource: u32, psrcbox: *const D3D10_BOX); - fn CopyResource(&self, pdstresource: Option<&ID3D10Resource>, psrcresource: Option<&ID3D10Resource>); - fn UpdateSubresource(&self, pdstresource: Option<&ID3D10Resource>, dstsubresource: u32, pdstbox: *const D3D10_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32); - fn ClearRenderTargetView(&self, prendertargetview: Option<&ID3D10RenderTargetView>, colorrgba: *const f32); - fn ClearDepthStencilView(&self, pdepthstencilview: Option<&ID3D10DepthStencilView>, clearflags: u32, depth: f32, stencil: u8); - fn GenerateMips(&self, pshaderresourceview: Option<&ID3D10ShaderResourceView>); - fn ResolveSubresource(&self, pdstresource: Option<&ID3D10Resource>, dstsubresource: u32, psrcresource: Option<&ID3D10Resource>, srcsubresource: u32, format: super::Dxgi::Common::DXGI_FORMAT); - fn VSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option); - fn PSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *mut Option); - fn PSGetShader(&self, pppixelshader: *mut Option); - fn PSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *mut Option); - fn VSGetShader(&self, ppvertexshader: *mut Option); - fn PSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option); - fn IAGetInputLayout(&self, ppinputlayout: *mut Option); - fn IAGetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: *mut Option, pstrides: *mut u32, poffsets: *mut u32); - fn IAGetIndexBuffer(&self, pindexbuffer: *mut Option, format: *mut super::Dxgi::Common::DXGI_FORMAT, offset: *mut u32); - fn GSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option); - fn GSGetShader(&self, ppgeometryshader: *mut Option); + fn CopySubresourceRegion(&self, pdstresource: windows_core::Ref<'_, ID3D10Resource>, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: windows_core::Ref<'_, ID3D10Resource>, srcsubresource: u32, psrcbox: *const D3D10_BOX); + fn CopyResource(&self, pdstresource: windows_core::Ref<'_, ID3D10Resource>, psrcresource: windows_core::Ref<'_, ID3D10Resource>); + fn UpdateSubresource(&self, pdstresource: windows_core::Ref<'_, ID3D10Resource>, dstsubresource: u32, pdstbox: *const D3D10_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32); + fn ClearRenderTargetView(&self, prendertargetview: windows_core::Ref<'_, ID3D10RenderTargetView>, colorrgba: *const f32); + fn ClearDepthStencilView(&self, pdepthstencilview: windows_core::Ref<'_, ID3D10DepthStencilView>, clearflags: u32, depth: f32, stencil: u8); + fn GenerateMips(&self, pshaderresourceview: windows_core::Ref<'_, ID3D10ShaderResourceView>); + fn ResolveSubresource(&self, pdstresource: windows_core::Ref<'_, ID3D10Resource>, dstsubresource: u32, psrcresource: windows_core::Ref<'_, ID3D10Resource>, srcsubresource: u32, format: super::Dxgi::Common::DXGI_FORMAT); + fn VSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D10Buffer>); + fn PSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: windows_core::OutRef<'_, ID3D10ShaderResourceView>); + fn PSGetShader(&self, pppixelshader: windows_core::OutRef<'_, ID3D10PixelShader>); + fn PSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: windows_core::OutRef<'_, ID3D10SamplerState>); + fn VSGetShader(&self, ppvertexshader: windows_core::OutRef<'_, ID3D10VertexShader>); + fn PSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D10Buffer>); + fn IAGetInputLayout(&self, ppinputlayout: windows_core::OutRef<'_, ID3D10InputLayout>); + fn IAGetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: windows_core::OutRef<'_, ID3D10Buffer>, pstrides: *mut u32, poffsets: *mut u32); + fn IAGetIndexBuffer(&self, pindexbuffer: windows_core::OutRef<'_, ID3D10Buffer>, format: *mut super::Dxgi::Common::DXGI_FORMAT, offset: *mut u32); + fn GSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D10Buffer>); + fn GSGetShader(&self, ppgeometryshader: windows_core::OutRef<'_, ID3D10GeometryShader>); fn IAGetPrimitiveTopology(&self, ptopology: *mut super::Direct3D::D3D_PRIMITIVE_TOPOLOGY); - fn VSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *mut Option); - fn VSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *mut Option); - fn GetPredication(&self, pppredicate: *mut Option, ppredicatevalue: *mut super::super::Foundation::BOOL); - fn GSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *mut Option); - fn GSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *mut Option); - fn OMGetRenderTargets(&self, numviews: u32, pprendertargetviews: *mut Option, ppdepthstencilview: *mut Option); - fn OMGetBlendState(&self, ppblendstate: *mut Option, blendfactor: *mut f32, psamplemask: *mut u32); - fn OMGetDepthStencilState(&self, ppdepthstencilstate: *mut Option, pstencilref: *mut u32); - fn SOGetTargets(&self, numbuffers: u32, ppsotargets: *mut Option, poffsets: *mut u32); - fn RSGetState(&self, pprasterizerstate: *mut Option); + fn VSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: windows_core::OutRef<'_, ID3D10ShaderResourceView>); + fn VSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: windows_core::OutRef<'_, ID3D10SamplerState>); + fn GetPredication(&self, pppredicate: windows_core::OutRef<'_, ID3D10Predicate>, ppredicatevalue: *mut super::super::Foundation::BOOL); + fn GSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: windows_core::OutRef<'_, ID3D10ShaderResourceView>); + fn GSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: windows_core::OutRef<'_, ID3D10SamplerState>); + fn OMGetRenderTargets(&self, numviews: u32, pprendertargetviews: windows_core::OutRef<'_, ID3D10RenderTargetView>, ppdepthstencilview: windows_core::OutRef<'_, ID3D10DepthStencilView>); + fn OMGetBlendState(&self, ppblendstate: windows_core::OutRef<'_, ID3D10BlendState>, blendfactor: *mut f32, psamplemask: *mut u32); + fn OMGetDepthStencilState(&self, ppdepthstencilstate: windows_core::OutRef<'_, ID3D10DepthStencilState>, pstencilref: *mut u32); + fn SOGetTargets(&self, numbuffers: u32, ppsotargets: windows_core::OutRef<'_, ID3D10Buffer>, poffsets: *mut u32); + fn RSGetState(&self, pprasterizerstate: windows_core::OutRef<'_, ID3D10RasterizerState>); fn RSGetViewports(&self, numviewports: *mut u32, pviewports: *mut D3D10_VIEWPORT); fn RSGetScissorRects(&self, numrects: *mut u32, prects: *mut super::super::Foundation::RECT); fn GetDeviceRemovedReason(&self) -> windows_core::Result<()>; @@ -3751,28 +3751,28 @@ pub trait ID3D10Device_Impl: windows_core::IUnknownImpl { fn GetExceptionMode(&self) -> u32; fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>; - fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn ClearState(&self); fn Flush(&self); - fn CreateBuffer(&self, pdesc: *const D3D10_BUFFER_DESC, pinitialdata: *const D3D10_SUBRESOURCE_DATA, ppbuffer: *mut Option) -> windows_core::Result<()>; + fn CreateBuffer(&self, pdesc: *const D3D10_BUFFER_DESC, pinitialdata: *const D3D10_SUBRESOURCE_DATA, ppbuffer: windows_core::OutRef<'_, ID3D10Buffer>) -> windows_core::Result<()>; fn CreateTexture1D(&self, pdesc: *const D3D10_TEXTURE1D_DESC, pinitialdata: *const D3D10_SUBRESOURCE_DATA) -> windows_core::Result; fn CreateTexture2D(&self, pdesc: *const D3D10_TEXTURE2D_DESC, pinitialdata: *const D3D10_SUBRESOURCE_DATA) -> windows_core::Result; fn CreateTexture3D(&self, pdesc: *const D3D10_TEXTURE3D_DESC, pinitialdata: *const D3D10_SUBRESOURCE_DATA) -> windows_core::Result; - fn CreateShaderResourceView(&self, presource: Option<&ID3D10Resource>, pdesc: *const D3D10_SHADER_RESOURCE_VIEW_DESC, ppsrview: *mut Option) -> windows_core::Result<()>; - fn CreateRenderTargetView(&self, presource: Option<&ID3D10Resource>, pdesc: *const D3D10_RENDER_TARGET_VIEW_DESC, pprtview: *mut Option) -> windows_core::Result<()>; - fn CreateDepthStencilView(&self, presource: Option<&ID3D10Resource>, pdesc: *const D3D10_DEPTH_STENCIL_VIEW_DESC, ppdepthstencilview: *mut Option) -> windows_core::Result<()>; - fn CreateInputLayout(&self, pinputelementdescs: *const D3D10_INPUT_ELEMENT_DESC, numelements: u32, pshaderbytecodewithinputsignature: *const core::ffi::c_void, bytecodelength: usize, ppinputlayout: *mut Option) -> windows_core::Result<()>; - fn CreateVertexShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, ppvertexshader: *mut Option) -> windows_core::Result<()>; - fn CreateGeometryShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, ppgeometryshader: *mut Option) -> windows_core::Result<()>; - fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, psodeclaration: *const D3D10_SO_DECLARATION_ENTRY, numentries: u32, outputstreamstride: u32, ppgeometryshader: *mut Option) -> windows_core::Result<()>; - fn CreatePixelShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pppixelshader: *mut Option) -> windows_core::Result<()>; - fn CreateBlendState(&self, pblendstatedesc: *const D3D10_BLEND_DESC, ppblendstate: *mut Option) -> windows_core::Result<()>; - fn CreateDepthStencilState(&self, pdepthstencildesc: *const D3D10_DEPTH_STENCIL_DESC, ppdepthstencilstate: *mut Option) -> windows_core::Result<()>; - fn CreateRasterizerState(&self, prasterizerdesc: *const D3D10_RASTERIZER_DESC, pprasterizerstate: *mut Option) -> windows_core::Result<()>; - fn CreateSamplerState(&self, psamplerdesc: *const D3D10_SAMPLER_DESC, ppsamplerstate: *mut Option) -> windows_core::Result<()>; - fn CreateQuery(&self, pquerydesc: *const D3D10_QUERY_DESC, ppquery: *mut Option) -> windows_core::Result<()>; - fn CreatePredicate(&self, ppredicatedesc: *const D3D10_QUERY_DESC, pppredicate: *mut Option) -> windows_core::Result<()>; - fn CreateCounter(&self, pcounterdesc: *const D3D10_COUNTER_DESC, ppcounter: *mut Option) -> windows_core::Result<()>; + fn CreateShaderResourceView(&self, presource: windows_core::Ref<'_, ID3D10Resource>, pdesc: *const D3D10_SHADER_RESOURCE_VIEW_DESC, ppsrview: windows_core::OutRef<'_, ID3D10ShaderResourceView>) -> windows_core::Result<()>; + fn CreateRenderTargetView(&self, presource: windows_core::Ref<'_, ID3D10Resource>, pdesc: *const D3D10_RENDER_TARGET_VIEW_DESC, pprtview: windows_core::OutRef<'_, ID3D10RenderTargetView>) -> windows_core::Result<()>; + fn CreateDepthStencilView(&self, presource: windows_core::Ref<'_, ID3D10Resource>, pdesc: *const D3D10_DEPTH_STENCIL_VIEW_DESC, ppdepthstencilview: windows_core::OutRef<'_, ID3D10DepthStencilView>) -> windows_core::Result<()>; + fn CreateInputLayout(&self, pinputelementdescs: *const D3D10_INPUT_ELEMENT_DESC, numelements: u32, pshaderbytecodewithinputsignature: *const core::ffi::c_void, bytecodelength: usize, ppinputlayout: windows_core::OutRef<'_, ID3D10InputLayout>) -> windows_core::Result<()>; + fn CreateVertexShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, ppvertexshader: windows_core::OutRef<'_, ID3D10VertexShader>) -> windows_core::Result<()>; + fn CreateGeometryShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, ppgeometryshader: windows_core::OutRef<'_, ID3D10GeometryShader>) -> windows_core::Result<()>; + fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, psodeclaration: *const D3D10_SO_DECLARATION_ENTRY, numentries: u32, outputstreamstride: u32, ppgeometryshader: windows_core::OutRef<'_, ID3D10GeometryShader>) -> windows_core::Result<()>; + fn CreatePixelShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pppixelshader: windows_core::OutRef<'_, ID3D10PixelShader>) -> windows_core::Result<()>; + fn CreateBlendState(&self, pblendstatedesc: *const D3D10_BLEND_DESC, ppblendstate: windows_core::OutRef<'_, ID3D10BlendState>) -> windows_core::Result<()>; + fn CreateDepthStencilState(&self, pdepthstencildesc: *const D3D10_DEPTH_STENCIL_DESC, ppdepthstencilstate: windows_core::OutRef<'_, ID3D10DepthStencilState>) -> windows_core::Result<()>; + fn CreateRasterizerState(&self, prasterizerdesc: *const D3D10_RASTERIZER_DESC, pprasterizerstate: windows_core::OutRef<'_, ID3D10RasterizerState>) -> windows_core::Result<()>; + fn CreateSamplerState(&self, psamplerdesc: *const D3D10_SAMPLER_DESC, ppsamplerstate: windows_core::OutRef<'_, ID3D10SamplerState>) -> windows_core::Result<()>; + fn CreateQuery(&self, pquerydesc: *const D3D10_QUERY_DESC, ppquery: windows_core::OutRef<'_, ID3D10Query>) -> windows_core::Result<()>; + fn CreatePredicate(&self, ppredicatedesc: *const D3D10_QUERY_DESC, pppredicate: windows_core::OutRef<'_, ID3D10Predicate>) -> windows_core::Result<()>; + fn CreateCounter(&self, pcounterdesc: *const D3D10_COUNTER_DESC, ppcounter: windows_core::OutRef<'_, ID3D10Counter>) -> windows_core::Result<()>; fn CheckFormatSupport(&self, format: super::Dxgi::Common::DXGI_FORMAT) -> windows_core::Result; fn CheckMultisampleQualityLevels(&self, format: super::Dxgi::Common::DXGI_FORMAT, samplecount: u32) -> windows_core::Result; fn CheckCounterInfo(&self, pcounterinfo: *mut D3D10_COUNTER_INFO); @@ -3795,7 +3795,7 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn PSSetShader(this: *mut core::ffi::c_void, ppixelshader: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::PSSetShader(this, windows_core::from_raw_borrowed(&ppixelshader)) + ID3D10Device_Impl::PSSetShader(this, core::mem::transmute_copy(&ppixelshader)) } unsafe extern "system" fn PSSetSamplers(this: *mut core::ffi::c_void, startslot: u32, numsamplers: u32, ppsamplers: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3803,7 +3803,7 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn VSSetShader(this: *mut core::ffi::c_void, pvertexshader: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::VSSetShader(this, windows_core::from_raw_borrowed(&pvertexshader)) + ID3D10Device_Impl::VSSetShader(this, core::mem::transmute_copy(&pvertexshader)) } unsafe extern "system" fn DrawIndexed(this: *mut core::ffi::c_void, indexcount: u32, startindexlocation: u32, basevertexlocation: i32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3819,7 +3819,7 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn IASetInputLayout(this: *mut core::ffi::c_void, pinputlayout: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::IASetInputLayout(this, windows_core::from_raw_borrowed(&pinputlayout)) + ID3D10Device_Impl::IASetInputLayout(this, core::mem::transmute_copy(&pinputlayout)) } unsafe extern "system" fn IASetVertexBuffers(this: *mut core::ffi::c_void, startslot: u32, numbuffers: u32, ppvertexbuffers: *const *mut core::ffi::c_void, pstrides: *const u32, poffsets: *const u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3827,7 +3827,7 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn IASetIndexBuffer(this: *mut core::ffi::c_void, pindexbuffer: *mut core::ffi::c_void, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::IASetIndexBuffer(this, windows_core::from_raw_borrowed(&pindexbuffer), core::mem::transmute_copy(&format), core::mem::transmute_copy(&offset)) + ID3D10Device_Impl::IASetIndexBuffer(this, core::mem::transmute_copy(&pindexbuffer), core::mem::transmute_copy(&format), core::mem::transmute_copy(&offset)) } unsafe extern "system" fn DrawIndexedInstanced(this: *mut core::ffi::c_void, indexcountperinstance: u32, instancecount: u32, startindexlocation: u32, basevertexlocation: i32, startinstancelocation: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3843,7 +3843,7 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn GSSetShader(this: *mut core::ffi::c_void, pshader: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::GSSetShader(this, windows_core::from_raw_borrowed(&pshader)) + ID3D10Device_Impl::GSSetShader(this, core::mem::transmute_copy(&pshader)) } unsafe extern "system" fn IASetPrimitiveTopology(this: *mut core::ffi::c_void, topology: super::Direct3D::D3D_PRIMITIVE_TOPOLOGY) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3859,7 +3859,7 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn SetPredication(this: *mut core::ffi::c_void, ppredicate: *mut core::ffi::c_void, predicatevalue: super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::SetPredication(this, windows_core::from_raw_borrowed(&ppredicate), core::mem::transmute_copy(&predicatevalue)) + ID3D10Device_Impl::SetPredication(this, core::mem::transmute_copy(&ppredicate), core::mem::transmute_copy(&predicatevalue)) } unsafe extern "system" fn GSSetShaderResources(this: *mut core::ffi::c_void, startslot: u32, numviews: u32, ppshaderresourceviews: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3871,15 +3871,15 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn OMSetRenderTargets(this: *mut core::ffi::c_void, numviews: u32, pprendertargetviews: *const *mut core::ffi::c_void, pdepthstencilview: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::OMSetRenderTargets(this, core::mem::transmute_copy(&numviews), core::mem::transmute_copy(&pprendertargetviews), windows_core::from_raw_borrowed(&pdepthstencilview)) + ID3D10Device_Impl::OMSetRenderTargets(this, core::mem::transmute_copy(&numviews), core::mem::transmute_copy(&pprendertargetviews), core::mem::transmute_copy(&pdepthstencilview)) } unsafe extern "system" fn OMSetBlendState(this: *mut core::ffi::c_void, pblendstate: *mut core::ffi::c_void, blendfactor: *const f32, samplemask: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::OMSetBlendState(this, windows_core::from_raw_borrowed(&pblendstate), core::mem::transmute_copy(&blendfactor), core::mem::transmute_copy(&samplemask)) + ID3D10Device_Impl::OMSetBlendState(this, core::mem::transmute_copy(&pblendstate), core::mem::transmute_copy(&blendfactor), core::mem::transmute_copy(&samplemask)) } unsafe extern "system" fn OMSetDepthStencilState(this: *mut core::ffi::c_void, pdepthstencilstate: *mut core::ffi::c_void, stencilref: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::OMSetDepthStencilState(this, windows_core::from_raw_borrowed(&pdepthstencilstate), core::mem::transmute_copy(&stencilref)) + ID3D10Device_Impl::OMSetDepthStencilState(this, core::mem::transmute_copy(&pdepthstencilstate), core::mem::transmute_copy(&stencilref)) } unsafe extern "system" fn SOSetTargets(this: *mut core::ffi::c_void, numbuffers: u32, ppsotargets: *const *mut core::ffi::c_void, poffsets: *const u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3891,7 +3891,7 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn RSSetState(this: *mut core::ffi::c_void, prasterizerstate: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::RSSetState(this, windows_core::from_raw_borrowed(&prasterizerstate)) + ID3D10Device_Impl::RSSetState(this, core::mem::transmute_copy(&prasterizerstate)) } unsafe extern "system" fn RSSetViewports(this: *mut core::ffi::c_void, numviewports: u32, pviewports: *const D3D10_VIEWPORT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3903,31 +3903,31 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn CopySubresourceRegion(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: *mut core::ffi::c_void, srcsubresource: u32, psrcbox: *const D3D10_BOX) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::CopySubresourceRegion(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&dstx), core::mem::transmute_copy(&dsty), core::mem::transmute_copy(&dstz), windows_core::from_raw_borrowed(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcbox)) + ID3D10Device_Impl::CopySubresourceRegion(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&dstx), core::mem::transmute_copy(&dsty), core::mem::transmute_copy(&dstz), core::mem::transmute_copy(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcbox)) } unsafe extern "system" fn CopyResource(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, psrcresource: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::CopyResource(this, windows_core::from_raw_borrowed(&pdstresource), windows_core::from_raw_borrowed(&psrcresource)) + ID3D10Device_Impl::CopyResource(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&psrcresource)) } unsafe extern "system" fn UpdateSubresource(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, pdstbox: *const D3D10_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::UpdateSubresource(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&pdstbox), core::mem::transmute_copy(&psrcdata), core::mem::transmute_copy(&srcrowpitch), core::mem::transmute_copy(&srcdepthpitch)) + ID3D10Device_Impl::UpdateSubresource(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&pdstbox), core::mem::transmute_copy(&psrcdata), core::mem::transmute_copy(&srcrowpitch), core::mem::transmute_copy(&srcdepthpitch)) } unsafe extern "system" fn ClearRenderTargetView(this: *mut core::ffi::c_void, prendertargetview: *mut core::ffi::c_void, colorrgba: *const f32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::ClearRenderTargetView(this, windows_core::from_raw_borrowed(&prendertargetview), core::mem::transmute_copy(&colorrgba)) + ID3D10Device_Impl::ClearRenderTargetView(this, core::mem::transmute_copy(&prendertargetview), core::mem::transmute_copy(&colorrgba)) } unsafe extern "system" fn ClearDepthStencilView(this: *mut core::ffi::c_void, pdepthstencilview: *mut core::ffi::c_void, clearflags: u32, depth: f32, stencil: u8) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::ClearDepthStencilView(this, windows_core::from_raw_borrowed(&pdepthstencilview), core::mem::transmute_copy(&clearflags), core::mem::transmute_copy(&depth), core::mem::transmute_copy(&stencil)) + ID3D10Device_Impl::ClearDepthStencilView(this, core::mem::transmute_copy(&pdepthstencilview), core::mem::transmute_copy(&clearflags), core::mem::transmute_copy(&depth), core::mem::transmute_copy(&stencil)) } unsafe extern "system" fn GenerateMips(this: *mut core::ffi::c_void, pshaderresourceview: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::GenerateMips(this, windows_core::from_raw_borrowed(&pshaderresourceview)) + ID3D10Device_Impl::GenerateMips(this, core::mem::transmute_copy(&pshaderresourceview)) } unsafe extern "system" fn ResolveSubresource(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, psrcresource: *mut core::ffi::c_void, srcsubresource: u32, format: super::Dxgi::Common::DXGI_FORMAT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::ResolveSubresource(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), windows_core::from_raw_borrowed(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&format)) + ID3D10Device_Impl::ResolveSubresource(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&format)) } unsafe extern "system" fn VSGetConstantBuffers(this: *mut core::ffi::c_void, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4047,7 +4047,7 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn SetPrivateDataInterface(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), windows_core::from_raw_borrowed(&pdata)).into() + ID3D10Device_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&pdata)).into() } unsafe extern "system" fn ClearState(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4093,15 +4093,15 @@ impl ID3D10Device_Vtbl { } unsafe extern "system" fn CreateShaderResourceView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D10_SHADER_RESOURCE_VIEW_DESC, ppsrview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::CreateShaderResourceView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppsrview)).into() + ID3D10Device_Impl::CreateShaderResourceView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppsrview)).into() } unsafe extern "system" fn CreateRenderTargetView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D10_RENDER_TARGET_VIEW_DESC, pprtview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::CreateRenderTargetView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprtview)).into() + ID3D10Device_Impl::CreateRenderTargetView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprtview)).into() } unsafe extern "system" fn CreateDepthStencilView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D10_DEPTH_STENCIL_VIEW_DESC, ppdepthstencilview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device_Impl::CreateDepthStencilView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppdepthstencilview)).into() + ID3D10Device_Impl::CreateDepthStencilView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppdepthstencilview)).into() } unsafe extern "system" fn CreateInputLayout(this: *mut core::ffi::c_void, pinputelementdescs: *const D3D10_INPUT_ELEMENT_DESC, numelements: u32, pshaderbytecodewithinputsignature: *const core::ffi::c_void, bytecodelength: usize, ppinputlayout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4339,8 +4339,8 @@ pub struct ID3D10Device1_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D10Device1_Impl: ID3D10Device_Impl { - fn CreateShaderResourceView1(&self, presource: Option<&ID3D10Resource>, pdesc: *const D3D10_SHADER_RESOURCE_VIEW_DESC1, ppsrview: *mut Option) -> windows_core::Result<()>; - fn CreateBlendState1(&self, pblendstatedesc: *const D3D10_BLEND_DESC1, ppblendstate: *mut Option) -> windows_core::Result<()>; + fn CreateShaderResourceView1(&self, presource: windows_core::Ref<'_, ID3D10Resource>, pdesc: *const D3D10_SHADER_RESOURCE_VIEW_DESC1, ppsrview: windows_core::OutRef<'_, ID3D10ShaderResourceView1>) -> windows_core::Result<()>; + fn CreateBlendState1(&self, pblendstatedesc: *const D3D10_BLEND_DESC1, ppblendstate: windows_core::OutRef<'_, ID3D10BlendState1>) -> windows_core::Result<()>; fn GetFeatureLevel(&self) -> D3D10_FEATURE_LEVEL1; } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] @@ -4348,7 +4348,7 @@ impl ID3D10Device1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateShaderResourceView1(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D10_SHADER_RESOURCE_VIEW_DESC1, ppsrview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10Device1_Impl::CreateShaderResourceView1(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppsrview)).into() + ID3D10Device1_Impl::CreateShaderResourceView1(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppsrview)).into() } unsafe extern "system" fn CreateBlendState1(this: *mut core::ffi::c_void, pblendstatedesc: *const D3D10_BLEND_DESC1, ppblendstate: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4405,10 +4405,10 @@ pub struct ID3D10DeviceChild_Vtbl { pub SetPrivateDataInterface: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ID3D10DeviceChild_Impl: windows_core::IUnknownImpl { - fn GetDevice(&self, ppdevice: *mut Option); + fn GetDevice(&self, ppdevice: windows_core::OutRef<'_, ID3D10Device>); fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>; - fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ID3D10DeviceChild_Vtbl { pub const fn new() -> Self { @@ -4426,7 +4426,7 @@ impl ID3D10DeviceChild_Vtbl { } unsafe extern "system" fn SetPrivateDataInterface(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D10DeviceChild_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), windows_core::from_raw_borrowed(&pdata)).into() + ID3D10DeviceChild_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&pdata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4715,9 +4715,9 @@ pub struct ID3D10EffectConstantBuffer_Vtbl { pub GetTextureBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ID3D10EffectConstantBuffer_Impl: ID3D10EffectVariable_Impl { - fn SetConstantBuffer(&self, pconstantbuffer: Option<&ID3D10Buffer>) -> windows_core::Result<()>; + fn SetConstantBuffer(&self, pconstantbuffer: windows_core::Ref<'_, ID3D10Buffer>) -> windows_core::Result<()>; fn GetConstantBuffer(&self) -> windows_core::Result; - fn SetTextureBuffer(&self, ptexturebuffer: Option<&ID3D10ShaderResourceView>) -> windows_core::Result<()>; + fn SetTextureBuffer(&self, ptexturebuffer: windows_core::Ref<'_, ID3D10ShaderResourceView>) -> windows_core::Result<()>; fn GetTextureBuffer(&self) -> windows_core::Result; } impl ID3D10EffectConstantBuffer_Vtbl { @@ -4725,7 +4725,7 @@ impl ID3D10EffectConstantBuffer_Vtbl { unsafe extern "system" fn SetConstantBuffer(this: *mut core::ffi::c_void, pconstantbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D10EffectConstantBuffer_Impl::SetConstantBuffer(this, windows_core::from_raw_borrowed(&pconstantbuffer)).into() + ID3D10EffectConstantBuffer_Impl::SetConstantBuffer(this, core::mem::transmute_copy(&pconstantbuffer)).into() } unsafe extern "system" fn GetConstantBuffer(this: *mut core::ffi::c_void, ppconstantbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; @@ -4741,7 +4741,7 @@ impl ID3D10EffectConstantBuffer_Vtbl { unsafe extern "system" fn SetTextureBuffer(this: *mut core::ffi::c_void, ptexturebuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D10EffectConstantBuffer_Impl::SetTextureBuffer(this, windows_core::from_raw_borrowed(&ptexturebuffer)).into() + ID3D10EffectConstantBuffer_Impl::SetTextureBuffer(this, core::mem::transmute_copy(&ptexturebuffer)).into() } unsafe extern "system" fn GetTextureBuffer(this: *mut core::ffi::c_void, pptexturebuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; @@ -4876,17 +4876,17 @@ pub struct ID3D10EffectDepthStencilViewVariable_Vtbl { pub GetDepthStencilArray: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait ID3D10EffectDepthStencilViewVariable_Impl: ID3D10EffectVariable_Impl { - fn SetDepthStencil(&self, presource: Option<&ID3D10DepthStencilView>) -> windows_core::Result<()>; + fn SetDepthStencil(&self, presource: windows_core::Ref<'_, ID3D10DepthStencilView>) -> windows_core::Result<()>; fn GetDepthStencil(&self) -> windows_core::Result; fn SetDepthStencilArray(&self, ppresources: *const Option, offset: u32, count: u32) -> windows_core::Result<()>; - fn GetDepthStencilArray(&self, ppresources: *mut Option, offset: u32, count: u32) -> windows_core::Result<()>; + fn GetDepthStencilArray(&self, ppresources: windows_core::OutRef<'_, ID3D10DepthStencilView>, offset: u32, count: u32) -> windows_core::Result<()>; } impl ID3D10EffectDepthStencilViewVariable_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDepthStencil(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D10EffectDepthStencilViewVariable_Impl::SetDepthStencil(this, windows_core::from_raw_borrowed(&presource)).into() + ID3D10EffectDepthStencilViewVariable_Impl::SetDepthStencil(this, core::mem::transmute_copy(&presource)).into() } unsafe extern "system" fn GetDepthStencil(this: *mut core::ffi::c_void, ppresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; @@ -5314,17 +5314,17 @@ pub struct ID3D10EffectRenderTargetViewVariable_Vtbl { pub GetRenderTargetArray: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait ID3D10EffectRenderTargetViewVariable_Impl: ID3D10EffectVariable_Impl { - fn SetRenderTarget(&self, presource: Option<&ID3D10RenderTargetView>) -> windows_core::Result<()>; + fn SetRenderTarget(&self, presource: windows_core::Ref<'_, ID3D10RenderTargetView>) -> windows_core::Result<()>; fn GetRenderTarget(&self) -> windows_core::Result; fn SetRenderTargetArray(&self, ppresources: *const Option, offset: u32, count: u32) -> windows_core::Result<()>; - fn GetRenderTargetArray(&self, ppresources: *mut Option, offset: u32, count: u32) -> windows_core::Result<()>; + fn GetRenderTargetArray(&self, ppresources: windows_core::OutRef<'_, ID3D10RenderTargetView>, offset: u32, count: u32) -> windows_core::Result<()>; } impl ID3D10EffectRenderTargetViewVariable_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRenderTarget(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D10EffectRenderTargetViewVariable_Impl::SetRenderTarget(this, windows_core::from_raw_borrowed(&presource)).into() + ID3D10EffectRenderTargetViewVariable_Impl::SetRenderTarget(this, core::mem::transmute_copy(&presource)).into() } unsafe extern "system" fn GetRenderTarget(this: *mut core::ffi::c_void, ppresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; @@ -5654,17 +5654,17 @@ pub struct ID3D10EffectShaderResourceVariable_Vtbl { pub GetResourceArray: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait ID3D10EffectShaderResourceVariable_Impl: ID3D10EffectVariable_Impl { - fn SetResource(&self, presource: Option<&ID3D10ShaderResourceView>) -> windows_core::Result<()>; + fn SetResource(&self, presource: windows_core::Ref<'_, ID3D10ShaderResourceView>) -> windows_core::Result<()>; fn GetResource(&self) -> windows_core::Result; fn SetResourceArray(&self, ppresources: *const Option, offset: u32, count: u32) -> windows_core::Result<()>; - fn GetResourceArray(&self, ppresources: *mut Option, offset: u32, count: u32) -> windows_core::Result<()>; + fn GetResourceArray(&self, ppresources: windows_core::OutRef<'_, ID3D10ShaderResourceView>, offset: u32, count: u32) -> windows_core::Result<()>; } impl ID3D10EffectShaderResourceVariable_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetResource(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D10EffectShaderResourceVariable_Impl::SetResource(this, windows_core::from_raw_borrowed(&presource)).into() + ID3D10EffectShaderResourceVariable_Impl::SetResource(this, core::mem::transmute_copy(&presource)).into() } unsafe extern "system" fn GetResource(this: *mut core::ffi::c_void, ppresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; @@ -8406,7 +8406,7 @@ pub struct ID3D10View_Vtbl { pub GetResource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void), } pub trait ID3D10View_Impl: ID3D10DeviceChild_Impl { - fn GetResource(&self, ppresource: *mut Option); + fn GetResource(&self, ppresource: windows_core::OutRef<'_, ID3D10Resource>); } impl ID3D10View_Vtbl { pub const fn new() -> Self { diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs index 3e2cb0a144..0f15beccf2 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs @@ -6304,7 +6304,7 @@ pub struct ID3D11ClassInstance_Vtbl { pub GetTypeName: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PSTR, *mut usize), } pub trait ID3D11ClassInstance_Impl: ID3D11DeviceChild_Impl { - fn GetClassLinkage(&self, pplinkage: *mut Option); + fn GetClassLinkage(&self, pplinkage: windows_core::OutRef<'_, ID3D11ClassLinkage>); fn GetDesc(&self, pdesc: *mut D3D11_CLASS_INSTANCE_DESC); fn GetInstanceName(&self, pinstancename: windows_core::PSTR, pbufferlength: *mut usize); fn GetTypeName(&self, ptypename: windows_core::PSTR, pbufferlength: *mut usize); @@ -6669,11 +6669,11 @@ pub trait ID3D11Debug_Impl: windows_core::IUnknownImpl { fn GetFeatureMask(&self) -> u32; fn SetPresentPerRenderOpDelay(&self, milliseconds: u32) -> windows_core::Result<()>; fn GetPresentPerRenderOpDelay(&self) -> u32; - fn SetSwapChain(&self, pswapchain: Option<&super::Dxgi::IDXGISwapChain>) -> windows_core::Result<()>; + fn SetSwapChain(&self, pswapchain: windows_core::Ref<'_, super::Dxgi::IDXGISwapChain>) -> windows_core::Result<()>; fn GetSwapChain(&self) -> windows_core::Result; - fn ValidateContext(&self, pcontext: Option<&ID3D11DeviceContext>) -> windows_core::Result<()>; + fn ValidateContext(&self, pcontext: windows_core::Ref<'_, ID3D11DeviceContext>) -> windows_core::Result<()>; fn ReportLiveDeviceObjects(&self, flags: D3D11_RLDO_FLAGS) -> windows_core::Result<()>; - fn ValidateContextForDispatch(&self, pcontext: Option<&ID3D11DeviceContext>) -> windows_core::Result<()>; + fn ValidateContextForDispatch(&self, pcontext: windows_core::Ref<'_, ID3D11DeviceContext>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Dxgi")] impl ID3D11Debug_Vtbl { @@ -6696,7 +6696,7 @@ impl ID3D11Debug_Vtbl { } unsafe extern "system" fn SetSwapChain(this: *mut core::ffi::c_void, pswapchain: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Debug_Impl::SetSwapChain(this, windows_core::from_raw_borrowed(&pswapchain)).into() + ID3D11Debug_Impl::SetSwapChain(this, core::mem::transmute_copy(&pswapchain)).into() } unsafe extern "system" fn GetSwapChain(this: *mut core::ffi::c_void, ppswapchain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6710,7 +6710,7 @@ impl ID3D11Debug_Vtbl { } unsafe extern "system" fn ValidateContext(this: *mut core::ffi::c_void, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Debug_Impl::ValidateContext(this, windows_core::from_raw_borrowed(&pcontext)).into() + ID3D11Debug_Impl::ValidateContext(this, core::mem::transmute_copy(&pcontext)).into() } unsafe extern "system" fn ReportLiveDeviceObjects(this: *mut core::ffi::c_void, flags: D3D11_RLDO_FLAGS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6718,7 +6718,7 @@ impl ID3D11Debug_Vtbl { } unsafe extern "system" fn ValidateContextForDispatch(this: *mut core::ffi::c_void, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Debug_Impl::ValidateContextForDispatch(this, windows_core::from_raw_borrowed(&pcontext)).into() + ID3D11Debug_Impl::ValidateContextForDispatch(this, core::mem::transmute_copy(&pcontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7108,31 +7108,31 @@ pub struct ID3D11Device_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D11Device_Impl: windows_core::IUnknownImpl { - fn CreateBuffer(&self, pdesc: *const D3D11_BUFFER_DESC, pinitialdata: *const D3D11_SUBRESOURCE_DATA, ppbuffer: *mut Option) -> windows_core::Result<()>; - fn CreateTexture1D(&self, pdesc: *const D3D11_TEXTURE1D_DESC, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture1d: *mut Option) -> windows_core::Result<()>; - fn CreateTexture2D(&self, pdesc: *const D3D11_TEXTURE2D_DESC, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture2d: *mut Option) -> windows_core::Result<()>; - fn CreateTexture3D(&self, pdesc: *const D3D11_TEXTURE3D_DESC, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture3d: *mut Option) -> windows_core::Result<()>; - fn CreateShaderResourceView(&self, presource: Option<&ID3D11Resource>, pdesc: *const D3D11_SHADER_RESOURCE_VIEW_DESC, ppsrview: *mut Option) -> windows_core::Result<()>; - fn CreateUnorderedAccessView(&self, presource: Option<&ID3D11Resource>, pdesc: *const D3D11_UNORDERED_ACCESS_VIEW_DESC, ppuaview: *mut Option) -> windows_core::Result<()>; - fn CreateRenderTargetView(&self, presource: Option<&ID3D11Resource>, pdesc: *const D3D11_RENDER_TARGET_VIEW_DESC, pprtview: *mut Option) -> windows_core::Result<()>; - fn CreateDepthStencilView(&self, presource: Option<&ID3D11Resource>, pdesc: *const D3D11_DEPTH_STENCIL_VIEW_DESC, ppdepthstencilview: *mut Option) -> windows_core::Result<()>; - fn CreateInputLayout(&self, pinputelementdescs: *const D3D11_INPUT_ELEMENT_DESC, numelements: u32, pshaderbytecodewithinputsignature: *const core::ffi::c_void, bytecodelength: usize, ppinputlayout: *mut Option) -> windows_core::Result<()>; - fn CreateVertexShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: Option<&ID3D11ClassLinkage>, ppvertexshader: *mut Option) -> windows_core::Result<()>; - fn CreateGeometryShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: Option<&ID3D11ClassLinkage>, ppgeometryshader: *mut Option) -> windows_core::Result<()>; - fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, psodeclaration: *const D3D11_SO_DECLARATION_ENTRY, numentries: u32, pbufferstrides: *const u32, numstrides: u32, rasterizedstream: u32, pclasslinkage: Option<&ID3D11ClassLinkage>, ppgeometryshader: *mut Option) -> windows_core::Result<()>; - fn CreatePixelShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: Option<&ID3D11ClassLinkage>, pppixelshader: *mut Option) -> windows_core::Result<()>; - fn CreateHullShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: Option<&ID3D11ClassLinkage>, pphullshader: *mut Option) -> windows_core::Result<()>; - fn CreateDomainShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: Option<&ID3D11ClassLinkage>, ppdomainshader: *mut Option) -> windows_core::Result<()>; - fn CreateComputeShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: Option<&ID3D11ClassLinkage>, ppcomputeshader: *mut Option) -> windows_core::Result<()>; + fn CreateBuffer(&self, pdesc: *const D3D11_BUFFER_DESC, pinitialdata: *const D3D11_SUBRESOURCE_DATA, ppbuffer: windows_core::OutRef<'_, ID3D11Buffer>) -> windows_core::Result<()>; + fn CreateTexture1D(&self, pdesc: *const D3D11_TEXTURE1D_DESC, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture1d: windows_core::OutRef<'_, ID3D11Texture1D>) -> windows_core::Result<()>; + fn CreateTexture2D(&self, pdesc: *const D3D11_TEXTURE2D_DESC, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture2d: windows_core::OutRef<'_, ID3D11Texture2D>) -> windows_core::Result<()>; + fn CreateTexture3D(&self, pdesc: *const D3D11_TEXTURE3D_DESC, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture3d: windows_core::OutRef<'_, ID3D11Texture3D>) -> windows_core::Result<()>; + fn CreateShaderResourceView(&self, presource: windows_core::Ref<'_, ID3D11Resource>, pdesc: *const D3D11_SHADER_RESOURCE_VIEW_DESC, ppsrview: windows_core::OutRef<'_, ID3D11ShaderResourceView>) -> windows_core::Result<()>; + fn CreateUnorderedAccessView(&self, presource: windows_core::Ref<'_, ID3D11Resource>, pdesc: *const D3D11_UNORDERED_ACCESS_VIEW_DESC, ppuaview: windows_core::OutRef<'_, ID3D11UnorderedAccessView>) -> windows_core::Result<()>; + fn CreateRenderTargetView(&self, presource: windows_core::Ref<'_, ID3D11Resource>, pdesc: *const D3D11_RENDER_TARGET_VIEW_DESC, pprtview: windows_core::OutRef<'_, ID3D11RenderTargetView>) -> windows_core::Result<()>; + fn CreateDepthStencilView(&self, presource: windows_core::Ref<'_, ID3D11Resource>, pdesc: *const D3D11_DEPTH_STENCIL_VIEW_DESC, ppdepthstencilview: windows_core::OutRef<'_, ID3D11DepthStencilView>) -> windows_core::Result<()>; + fn CreateInputLayout(&self, pinputelementdescs: *const D3D11_INPUT_ELEMENT_DESC, numelements: u32, pshaderbytecodewithinputsignature: *const core::ffi::c_void, bytecodelength: usize, ppinputlayout: windows_core::OutRef<'_, ID3D11InputLayout>) -> windows_core::Result<()>; + fn CreateVertexShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: windows_core::Ref<'_, ID3D11ClassLinkage>, ppvertexshader: windows_core::OutRef<'_, ID3D11VertexShader>) -> windows_core::Result<()>; + fn CreateGeometryShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: windows_core::Ref<'_, ID3D11ClassLinkage>, ppgeometryshader: windows_core::OutRef<'_, ID3D11GeometryShader>) -> windows_core::Result<()>; + fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, psodeclaration: *const D3D11_SO_DECLARATION_ENTRY, numentries: u32, pbufferstrides: *const u32, numstrides: u32, rasterizedstream: u32, pclasslinkage: windows_core::Ref<'_, ID3D11ClassLinkage>, ppgeometryshader: windows_core::OutRef<'_, ID3D11GeometryShader>) -> windows_core::Result<()>; + fn CreatePixelShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: windows_core::Ref<'_, ID3D11ClassLinkage>, pppixelshader: windows_core::OutRef<'_, ID3D11PixelShader>) -> windows_core::Result<()>; + fn CreateHullShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: windows_core::Ref<'_, ID3D11ClassLinkage>, pphullshader: windows_core::OutRef<'_, ID3D11HullShader>) -> windows_core::Result<()>; + fn CreateDomainShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: windows_core::Ref<'_, ID3D11ClassLinkage>, ppdomainshader: windows_core::OutRef<'_, ID3D11DomainShader>) -> windows_core::Result<()>; + fn CreateComputeShader(&self, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: windows_core::Ref<'_, ID3D11ClassLinkage>, ppcomputeshader: windows_core::OutRef<'_, ID3D11ComputeShader>) -> windows_core::Result<()>; fn CreateClassLinkage(&self) -> windows_core::Result; - fn CreateBlendState(&self, pblendstatedesc: *const D3D11_BLEND_DESC, ppblendstate: *mut Option) -> windows_core::Result<()>; - fn CreateDepthStencilState(&self, pdepthstencildesc: *const D3D11_DEPTH_STENCIL_DESC, ppdepthstencilstate: *mut Option) -> windows_core::Result<()>; - fn CreateRasterizerState(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC, pprasterizerstate: *mut Option) -> windows_core::Result<()>; - fn CreateSamplerState(&self, psamplerdesc: *const D3D11_SAMPLER_DESC, ppsamplerstate: *mut Option) -> windows_core::Result<()>; - fn CreateQuery(&self, pquerydesc: *const D3D11_QUERY_DESC, ppquery: *mut Option) -> windows_core::Result<()>; - fn CreatePredicate(&self, ppredicatedesc: *const D3D11_QUERY_DESC, pppredicate: *mut Option) -> windows_core::Result<()>; - fn CreateCounter(&self, pcounterdesc: *const D3D11_COUNTER_DESC, ppcounter: *mut Option) -> windows_core::Result<()>; - fn CreateDeferredContext(&self, contextflags: u32, ppdeferredcontext: *mut Option) -> windows_core::Result<()>; + fn CreateBlendState(&self, pblendstatedesc: *const D3D11_BLEND_DESC, ppblendstate: windows_core::OutRef<'_, ID3D11BlendState>) -> windows_core::Result<()>; + fn CreateDepthStencilState(&self, pdepthstencildesc: *const D3D11_DEPTH_STENCIL_DESC, ppdepthstencilstate: windows_core::OutRef<'_, ID3D11DepthStencilState>) -> windows_core::Result<()>; + fn CreateRasterizerState(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC, pprasterizerstate: windows_core::OutRef<'_, ID3D11RasterizerState>) -> windows_core::Result<()>; + fn CreateSamplerState(&self, psamplerdesc: *const D3D11_SAMPLER_DESC, ppsamplerstate: windows_core::OutRef<'_, ID3D11SamplerState>) -> windows_core::Result<()>; + fn CreateQuery(&self, pquerydesc: *const D3D11_QUERY_DESC, ppquery: windows_core::OutRef<'_, ID3D11Query>) -> windows_core::Result<()>; + fn CreatePredicate(&self, ppredicatedesc: *const D3D11_QUERY_DESC, pppredicate: windows_core::OutRef<'_, ID3D11Predicate>) -> windows_core::Result<()>; + fn CreateCounter(&self, pcounterdesc: *const D3D11_COUNTER_DESC, ppcounter: windows_core::OutRef<'_, ID3D11Counter>) -> windows_core::Result<()>; + fn CreateDeferredContext(&self, contextflags: u32, ppdeferredcontext: windows_core::OutRef<'_, ID3D11DeviceContext>) -> windows_core::Result<()>; fn OpenSharedResource(&self, hresource: super::super::Foundation::HANDLE, returnedinterface: *const windows_core::GUID, ppresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CheckFormatSupport(&self, format: super::Dxgi::Common::DXGI_FORMAT) -> windows_core::Result; fn CheckMultisampleQualityLevels(&self, format: super::Dxgi::Common::DXGI_FORMAT, samplecount: u32) -> windows_core::Result; @@ -7141,11 +7141,11 @@ pub trait ID3D11Device_Impl: windows_core::IUnknownImpl { fn CheckFeatureSupport(&self, feature: D3D11_FEATURE, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()>; fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>; - fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetFeatureLevel(&self) -> super::Direct3D::D3D_FEATURE_LEVEL; fn GetCreationFlags(&self) -> u32; fn GetDeviceRemovedReason(&self) -> windows_core::Result<()>; - fn GetImmediateContext(&self, ppimmediatecontext: *mut Option); + fn GetImmediateContext(&self, ppimmediatecontext: windows_core::OutRef<'_, ID3D11DeviceContext>); fn SetExceptionMode(&self, raiseflags: u32) -> windows_core::Result<()>; fn GetExceptionMode(&self) -> u32; } @@ -7170,19 +7170,19 @@ impl ID3D11Device_Vtbl { } unsafe extern "system" fn CreateShaderResourceView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D11_SHADER_RESOURCE_VIEW_DESC, ppsrview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateShaderResourceView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppsrview)).into() + ID3D11Device_Impl::CreateShaderResourceView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppsrview)).into() } unsafe extern "system" fn CreateUnorderedAccessView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D11_UNORDERED_ACCESS_VIEW_DESC, ppuaview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateUnorderedAccessView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppuaview)).into() + ID3D11Device_Impl::CreateUnorderedAccessView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppuaview)).into() } unsafe extern "system" fn CreateRenderTargetView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D11_RENDER_TARGET_VIEW_DESC, pprtview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateRenderTargetView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprtview)).into() + ID3D11Device_Impl::CreateRenderTargetView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprtview)).into() } unsafe extern "system" fn CreateDepthStencilView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D11_DEPTH_STENCIL_VIEW_DESC, ppdepthstencilview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateDepthStencilView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppdepthstencilview)).into() + ID3D11Device_Impl::CreateDepthStencilView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppdepthstencilview)).into() } unsafe extern "system" fn CreateInputLayout(this: *mut core::ffi::c_void, pinputelementdescs: *const D3D11_INPUT_ELEMENT_DESC, numelements: u32, pshaderbytecodewithinputsignature: *const core::ffi::c_void, bytecodelength: usize, ppinputlayout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7190,31 +7190,31 @@ impl ID3D11Device_Vtbl { } unsafe extern "system" fn CreateVertexShader(this: *mut core::ffi::c_void, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: *mut core::ffi::c_void, ppvertexshader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateVertexShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), windows_core::from_raw_borrowed(&pclasslinkage), core::mem::transmute_copy(&ppvertexshader)).into() + ID3D11Device_Impl::CreateVertexShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), core::mem::transmute_copy(&pclasslinkage), core::mem::transmute_copy(&ppvertexshader)).into() } unsafe extern "system" fn CreateGeometryShader(this: *mut core::ffi::c_void, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: *mut core::ffi::c_void, ppgeometryshader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateGeometryShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), windows_core::from_raw_borrowed(&pclasslinkage), core::mem::transmute_copy(&ppgeometryshader)).into() + ID3D11Device_Impl::CreateGeometryShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), core::mem::transmute_copy(&pclasslinkage), core::mem::transmute_copy(&ppgeometryshader)).into() } unsafe extern "system" fn CreateGeometryShaderWithStreamOutput(this: *mut core::ffi::c_void, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, psodeclaration: *const D3D11_SO_DECLARATION_ENTRY, numentries: u32, pbufferstrides: *const u32, numstrides: u32, rasterizedstream: u32, pclasslinkage: *mut core::ffi::c_void, ppgeometryshader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateGeometryShaderWithStreamOutput(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), core::mem::transmute_copy(&psodeclaration), core::mem::transmute_copy(&numentries), core::mem::transmute_copy(&pbufferstrides), core::mem::transmute_copy(&numstrides), core::mem::transmute_copy(&rasterizedstream), windows_core::from_raw_borrowed(&pclasslinkage), core::mem::transmute_copy(&ppgeometryshader)).into() + ID3D11Device_Impl::CreateGeometryShaderWithStreamOutput(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), core::mem::transmute_copy(&psodeclaration), core::mem::transmute_copy(&numentries), core::mem::transmute_copy(&pbufferstrides), core::mem::transmute_copy(&numstrides), core::mem::transmute_copy(&rasterizedstream), core::mem::transmute_copy(&pclasslinkage), core::mem::transmute_copy(&ppgeometryshader)).into() } unsafe extern "system" fn CreatePixelShader(this: *mut core::ffi::c_void, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: *mut core::ffi::c_void, pppixelshader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreatePixelShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), windows_core::from_raw_borrowed(&pclasslinkage), core::mem::transmute_copy(&pppixelshader)).into() + ID3D11Device_Impl::CreatePixelShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), core::mem::transmute_copy(&pclasslinkage), core::mem::transmute_copy(&pppixelshader)).into() } unsafe extern "system" fn CreateHullShader(this: *mut core::ffi::c_void, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: *mut core::ffi::c_void, pphullshader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateHullShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), windows_core::from_raw_borrowed(&pclasslinkage), core::mem::transmute_copy(&pphullshader)).into() + ID3D11Device_Impl::CreateHullShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), core::mem::transmute_copy(&pclasslinkage), core::mem::transmute_copy(&pphullshader)).into() } unsafe extern "system" fn CreateDomainShader(this: *mut core::ffi::c_void, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: *mut core::ffi::c_void, ppdomainshader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateDomainShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), windows_core::from_raw_borrowed(&pclasslinkage), core::mem::transmute_copy(&ppdomainshader)).into() + ID3D11Device_Impl::CreateDomainShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), core::mem::transmute_copy(&pclasslinkage), core::mem::transmute_copy(&ppdomainshader)).into() } unsafe extern "system" fn CreateComputeShader(this: *mut core::ffi::c_void, pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize, pclasslinkage: *mut core::ffi::c_void, ppcomputeshader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::CreateComputeShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), windows_core::from_raw_borrowed(&pclasslinkage), core::mem::transmute_copy(&ppcomputeshader)).into() + ID3D11Device_Impl::CreateComputeShader(this, core::mem::transmute_copy(&pshaderbytecode), core::mem::transmute_copy(&bytecodelength), core::mem::transmute_copy(&pclasslinkage), core::mem::transmute_copy(&ppcomputeshader)).into() } unsafe extern "system" fn CreateClassLinkage(this: *mut core::ffi::c_void, pplinkage: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7304,7 +7304,7 @@ impl ID3D11Device_Vtbl { } unsafe extern "system" fn SetPrivateDataInterface(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), windows_core::from_raw_borrowed(&pdata)).into() + ID3D11Device_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&pdata)).into() } unsafe extern "system" fn GetFeatureLevel(this: *mut core::ffi::c_void) -> super::Direct3D::D3D_FEATURE_LEVEL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7443,11 +7443,11 @@ pub struct ID3D11Device1_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D11Device1_Impl: ID3D11Device_Impl { - fn GetImmediateContext1(&self, ppimmediatecontext: *mut Option); - fn CreateDeferredContext1(&self, contextflags: u32, ppdeferredcontext: *mut Option) -> windows_core::Result<()>; - fn CreateBlendState1(&self, pblendstatedesc: *const D3D11_BLEND_DESC1, ppblendstate: *mut Option) -> windows_core::Result<()>; - fn CreateRasterizerState1(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC1, pprasterizerstate: *mut Option) -> windows_core::Result<()>; - fn CreateDeviceContextState(&self, flags: u32, pfeaturelevels: *const super::Direct3D::D3D_FEATURE_LEVEL, featurelevels: u32, sdkversion: u32, emulatedinterface: *const windows_core::GUID, pchosenfeaturelevel: *mut super::Direct3D::D3D_FEATURE_LEVEL, ppcontextstate: *mut Option) -> windows_core::Result<()>; + fn GetImmediateContext1(&self, ppimmediatecontext: windows_core::OutRef<'_, ID3D11DeviceContext1>); + fn CreateDeferredContext1(&self, contextflags: u32, ppdeferredcontext: windows_core::OutRef<'_, ID3D11DeviceContext1>) -> windows_core::Result<()>; + fn CreateBlendState1(&self, pblendstatedesc: *const D3D11_BLEND_DESC1, ppblendstate: windows_core::OutRef<'_, ID3D11BlendState1>) -> windows_core::Result<()>; + fn CreateRasterizerState1(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC1, pprasterizerstate: windows_core::OutRef<'_, ID3D11RasterizerState1>) -> windows_core::Result<()>; + fn CreateDeviceContextState(&self, flags: u32, pfeaturelevels: *const super::Direct3D::D3D_FEATURE_LEVEL, featurelevels: u32, sdkversion: u32, emulatedinterface: *const windows_core::GUID, pchosenfeaturelevel: *mut super::Direct3D::D3D_FEATURE_LEVEL, ppcontextstate: windows_core::OutRef<'_, ID3DDeviceContextState>) -> windows_core::Result<()>; fn OpenSharedResource1(&self, hresource: super::super::Foundation::HANDLE, returnedinterface: *const windows_core::GUID, ppresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn OpenSharedResourceByName(&self, lpname: &windows_core::PCWSTR, dwdesiredaccess: u32, returnedinterface: *const windows_core::GUID, ppresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } @@ -7545,9 +7545,9 @@ pub struct ID3D11Device2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D11Device2_Impl: ID3D11Device1_Impl { - fn GetImmediateContext2(&self, ppimmediatecontext: *mut Option); - fn CreateDeferredContext2(&self, contextflags: u32, ppdeferredcontext: *mut Option) -> windows_core::Result<()>; - fn GetResourceTiling(&self, ptiledresource: Option<&ID3D11Resource>, pnumtilesforentireresource: *mut u32, ppackedmipdesc: *mut D3D11_PACKED_MIP_DESC, pstandardtileshapefornonpackedmips: *mut D3D11_TILE_SHAPE, pnumsubresourcetilings: *mut u32, firstsubresourcetilingtoget: u32, psubresourcetilingsfornonpackedmips: *mut D3D11_SUBRESOURCE_TILING); + fn GetImmediateContext2(&self, ppimmediatecontext: windows_core::OutRef<'_, ID3D11DeviceContext2>); + fn CreateDeferredContext2(&self, contextflags: u32, ppdeferredcontext: windows_core::OutRef<'_, ID3D11DeviceContext2>) -> windows_core::Result<()>; + fn GetResourceTiling(&self, ptiledresource: windows_core::Ref<'_, ID3D11Resource>, pnumtilesforentireresource: *mut u32, ppackedmipdesc: *mut D3D11_PACKED_MIP_DESC, pstandardtileshapefornonpackedmips: *mut D3D11_TILE_SHAPE, pnumsubresourcetilings: *mut u32, firstsubresourcetilingtoget: u32, psubresourcetilingsfornonpackedmips: *mut D3D11_SUBRESOURCE_TILING); fn CheckMultisampleQualityLevels1(&self, format: super::Dxgi::Common::DXGI_FORMAT, samplecount: u32, flags: u32) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] @@ -7563,7 +7563,7 @@ impl ID3D11Device2_Vtbl { } unsafe extern "system" fn GetResourceTiling(this: *mut core::ffi::c_void, ptiledresource: *mut core::ffi::c_void, pnumtilesforentireresource: *mut u32, ppackedmipdesc: *mut D3D11_PACKED_MIP_DESC, pstandardtileshapefornonpackedmips: *mut D3D11_TILE_SHAPE, pnumsubresourcetilings: *mut u32, firstsubresourcetilingtoget: u32, psubresourcetilingsfornonpackedmips: *mut D3D11_SUBRESOURCE_TILING) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device2_Impl::GetResourceTiling(this, windows_core::from_raw_borrowed(&ptiledresource), core::mem::transmute_copy(&pnumtilesforentireresource), core::mem::transmute_copy(&ppackedmipdesc), core::mem::transmute_copy(&pstandardtileshapefornonpackedmips), core::mem::transmute_copy(&pnumsubresourcetilings), core::mem::transmute_copy(&firstsubresourcetilingtoget), core::mem::transmute_copy(&psubresourcetilingsfornonpackedmips)) + ID3D11Device2_Impl::GetResourceTiling(this, core::mem::transmute_copy(&ptiledresource), core::mem::transmute_copy(&pnumtilesforentireresource), core::mem::transmute_copy(&ppackedmipdesc), core::mem::transmute_copy(&pstandardtileshapefornonpackedmips), core::mem::transmute_copy(&pnumsubresourcetilings), core::mem::transmute_copy(&firstsubresourcetilingtoget), core::mem::transmute_copy(&psubresourcetilingsfornonpackedmips)) } unsafe extern "system" fn CheckMultisampleQualityLevels1(this: *mut core::ffi::c_void, format: super::Dxgi::Common::DXGI_FORMAT, samplecount: u32, flags: u32, pnumqualitylevels: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7690,17 +7690,17 @@ pub struct ID3D11Device3_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D11Device3_Impl: ID3D11Device2_Impl { - fn CreateTexture2D1(&self, pdesc1: *const D3D11_TEXTURE2D_DESC1, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture2d: *mut Option) -> windows_core::Result<()>; - fn CreateTexture3D1(&self, pdesc1: *const D3D11_TEXTURE3D_DESC1, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture3d: *mut Option) -> windows_core::Result<()>; - fn CreateRasterizerState2(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC2, pprasterizerstate: *mut Option) -> windows_core::Result<()>; - fn CreateShaderResourceView1(&self, presource: Option<&ID3D11Resource>, pdesc1: *const D3D11_SHADER_RESOURCE_VIEW_DESC1, ppsrview1: *mut Option) -> windows_core::Result<()>; - fn CreateUnorderedAccessView1(&self, presource: Option<&ID3D11Resource>, pdesc1: *const D3D11_UNORDERED_ACCESS_VIEW_DESC1, ppuaview1: *mut Option) -> windows_core::Result<()>; - fn CreateRenderTargetView1(&self, presource: Option<&ID3D11Resource>, pdesc1: *const D3D11_RENDER_TARGET_VIEW_DESC1, pprtview1: *mut Option) -> windows_core::Result<()>; - fn CreateQuery1(&self, pquerydesc1: *const D3D11_QUERY_DESC1, ppquery1: *mut Option) -> windows_core::Result<()>; - fn GetImmediateContext3(&self, ppimmediatecontext: *mut Option); - fn CreateDeferredContext3(&self, contextflags: u32, ppdeferredcontext: *mut Option) -> windows_core::Result<()>; - fn WriteToSubresource(&self, pdstresource: Option<&ID3D11Resource>, dstsubresource: u32, pdstbox: *const D3D11_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32); - fn ReadFromSubresource(&self, pdstdata: *mut core::ffi::c_void, dstrowpitch: u32, dstdepthpitch: u32, psrcresource: Option<&ID3D11Resource>, srcsubresource: u32, psrcbox: *const D3D11_BOX); + fn CreateTexture2D1(&self, pdesc1: *const D3D11_TEXTURE2D_DESC1, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture2d: windows_core::OutRef<'_, ID3D11Texture2D1>) -> windows_core::Result<()>; + fn CreateTexture3D1(&self, pdesc1: *const D3D11_TEXTURE3D_DESC1, pinitialdata: *const D3D11_SUBRESOURCE_DATA, pptexture3d: windows_core::OutRef<'_, ID3D11Texture3D1>) -> windows_core::Result<()>; + fn CreateRasterizerState2(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC2, pprasterizerstate: windows_core::OutRef<'_, ID3D11RasterizerState2>) -> windows_core::Result<()>; + fn CreateShaderResourceView1(&self, presource: windows_core::Ref<'_, ID3D11Resource>, pdesc1: *const D3D11_SHADER_RESOURCE_VIEW_DESC1, ppsrview1: windows_core::OutRef<'_, ID3D11ShaderResourceView1>) -> windows_core::Result<()>; + fn CreateUnorderedAccessView1(&self, presource: windows_core::Ref<'_, ID3D11Resource>, pdesc1: *const D3D11_UNORDERED_ACCESS_VIEW_DESC1, ppuaview1: windows_core::OutRef<'_, ID3D11UnorderedAccessView1>) -> windows_core::Result<()>; + fn CreateRenderTargetView1(&self, presource: windows_core::Ref<'_, ID3D11Resource>, pdesc1: *const D3D11_RENDER_TARGET_VIEW_DESC1, pprtview1: windows_core::OutRef<'_, ID3D11RenderTargetView1>) -> windows_core::Result<()>; + fn CreateQuery1(&self, pquerydesc1: *const D3D11_QUERY_DESC1, ppquery1: windows_core::OutRef<'_, ID3D11Query1>) -> windows_core::Result<()>; + fn GetImmediateContext3(&self, ppimmediatecontext: windows_core::OutRef<'_, ID3D11DeviceContext3>); + fn CreateDeferredContext3(&self, contextflags: u32, ppdeferredcontext: windows_core::OutRef<'_, ID3D11DeviceContext3>) -> windows_core::Result<()>; + fn WriteToSubresource(&self, pdstresource: windows_core::Ref<'_, ID3D11Resource>, dstsubresource: u32, pdstbox: *const D3D11_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32); + fn ReadFromSubresource(&self, pdstdata: *mut core::ffi::c_void, dstrowpitch: u32, dstdepthpitch: u32, psrcresource: windows_core::Ref<'_, ID3D11Resource>, srcsubresource: u32, psrcbox: *const D3D11_BOX); } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D11Device3_Vtbl { @@ -7719,15 +7719,15 @@ impl ID3D11Device3_Vtbl { } unsafe extern "system" fn CreateShaderResourceView1(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc1: *const D3D11_SHADER_RESOURCE_VIEW_DESC1, ppsrview1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device3_Impl::CreateShaderResourceView1(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc1), core::mem::transmute_copy(&ppsrview1)).into() + ID3D11Device3_Impl::CreateShaderResourceView1(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc1), core::mem::transmute_copy(&ppsrview1)).into() } unsafe extern "system" fn CreateUnorderedAccessView1(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc1: *const D3D11_UNORDERED_ACCESS_VIEW_DESC1, ppuaview1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device3_Impl::CreateUnorderedAccessView1(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc1), core::mem::transmute_copy(&ppuaview1)).into() + ID3D11Device3_Impl::CreateUnorderedAccessView1(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc1), core::mem::transmute_copy(&ppuaview1)).into() } unsafe extern "system" fn CreateRenderTargetView1(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc1: *const D3D11_RENDER_TARGET_VIEW_DESC1, pprtview1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device3_Impl::CreateRenderTargetView1(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc1), core::mem::transmute_copy(&pprtview1)).into() + ID3D11Device3_Impl::CreateRenderTargetView1(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc1), core::mem::transmute_copy(&pprtview1)).into() } unsafe extern "system" fn CreateQuery1(this: *mut core::ffi::c_void, pquerydesc1: *const D3D11_QUERY_DESC1, ppquery1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7743,11 +7743,11 @@ impl ID3D11Device3_Vtbl { } unsafe extern "system" fn WriteToSubresource(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, pdstbox: *const D3D11_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device3_Impl::WriteToSubresource(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&pdstbox), core::mem::transmute_copy(&psrcdata), core::mem::transmute_copy(&srcrowpitch), core::mem::transmute_copy(&srcdepthpitch)) + ID3D11Device3_Impl::WriteToSubresource(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&pdstbox), core::mem::transmute_copy(&psrcdata), core::mem::transmute_copy(&srcrowpitch), core::mem::transmute_copy(&srcdepthpitch)) } unsafe extern "system" fn ReadFromSubresource(this: *mut core::ffi::c_void, pdstdata: *mut core::ffi::c_void, dstrowpitch: u32, dstdepthpitch: u32, psrcresource: *mut core::ffi::c_void, srcsubresource: u32, psrcbox: *const D3D11_BOX) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Device3_Impl::ReadFromSubresource(this, core::mem::transmute_copy(&pdstdata), core::mem::transmute_copy(&dstrowpitch), core::mem::transmute_copy(&dstdepthpitch), windows_core::from_raw_borrowed(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcbox)) + ID3D11Device3_Impl::ReadFromSubresource(this, core::mem::transmute_copy(&pdstdata), core::mem::transmute_copy(&dstrowpitch), core::mem::transmute_copy(&dstdepthpitch), core::mem::transmute_copy(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcbox)) } Self { base__: ID3D11Device2_Vtbl::new::(), @@ -7925,10 +7925,10 @@ pub struct ID3D11DeviceChild_Vtbl { pub SetPrivateDataInterface: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ID3D11DeviceChild_Impl: windows_core::IUnknownImpl { - fn GetDevice(&self, ppdevice: *mut Option); + fn GetDevice(&self, ppdevice: windows_core::OutRef<'_, ID3D11Device>); fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>; - fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ID3D11DeviceChild_Vtbl { pub const fn new() -> Self { @@ -7946,7 +7946,7 @@ impl ID3D11DeviceChild_Vtbl { } unsafe extern "system" fn SetPrivateDataInterface(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceChild_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), windows_core::from_raw_borrowed(&pdata)).into() + ID3D11DeviceChild_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&pdata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -8556,112 +8556,112 @@ pub struct ID3D11DeviceContext_Vtbl { pub trait ID3D11DeviceContext_Impl: ID3D11DeviceChild_Impl { fn VSSetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option); fn PSSetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *const Option); - fn PSSetShader(&self, ppixelshader: Option<&ID3D11PixelShader>, ppclassinstances: *const Option, numclassinstances: u32); + fn PSSetShader(&self, ppixelshader: windows_core::Ref<'_, ID3D11PixelShader>, ppclassinstances: *const Option, numclassinstances: u32); fn PSSetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *const Option); - fn VSSetShader(&self, pvertexshader: Option<&ID3D11VertexShader>, ppclassinstances: *const Option, numclassinstances: u32); + fn VSSetShader(&self, pvertexshader: windows_core::Ref<'_, ID3D11VertexShader>, ppclassinstances: *const Option, numclassinstances: u32); fn DrawIndexed(&self, indexcount: u32, startindexlocation: u32, basevertexlocation: i32); fn Draw(&self, vertexcount: u32, startvertexlocation: u32); - fn Map(&self, presource: Option<&ID3D11Resource>, subresource: u32, maptype: D3D11_MAP, mapflags: u32, pmappedresource: *mut D3D11_MAPPED_SUBRESOURCE) -> windows_core::Result<()>; - fn Unmap(&self, presource: Option<&ID3D11Resource>, subresource: u32); + fn Map(&self, presource: windows_core::Ref<'_, ID3D11Resource>, subresource: u32, maptype: D3D11_MAP, mapflags: u32, pmappedresource: *mut D3D11_MAPPED_SUBRESOURCE) -> windows_core::Result<()>; + fn Unmap(&self, presource: windows_core::Ref<'_, ID3D11Resource>, subresource: u32); fn PSSetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option); - fn IASetInputLayout(&self, pinputlayout: Option<&ID3D11InputLayout>); + fn IASetInputLayout(&self, pinputlayout: windows_core::Ref<'_, ID3D11InputLayout>); fn IASetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: *const Option, pstrides: *const u32, poffsets: *const u32); - fn IASetIndexBuffer(&self, pindexbuffer: Option<&ID3D11Buffer>, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32); + fn IASetIndexBuffer(&self, pindexbuffer: windows_core::Ref<'_, ID3D11Buffer>, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32); fn DrawIndexedInstanced(&self, indexcountperinstance: u32, instancecount: u32, startindexlocation: u32, basevertexlocation: i32, startinstancelocation: u32); fn DrawInstanced(&self, vertexcountperinstance: u32, instancecount: u32, startvertexlocation: u32, startinstancelocation: u32); fn GSSetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option); - fn GSSetShader(&self, pshader: Option<&ID3D11GeometryShader>, ppclassinstances: *const Option, numclassinstances: u32); + fn GSSetShader(&self, pshader: windows_core::Ref<'_, ID3D11GeometryShader>, ppclassinstances: *const Option, numclassinstances: u32); fn IASetPrimitiveTopology(&self, topology: super::Direct3D::D3D_PRIMITIVE_TOPOLOGY); fn VSSetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *const Option); fn VSSetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *const Option); - fn Begin(&self, pasync: Option<&ID3D11Asynchronous>); - fn End(&self, pasync: Option<&ID3D11Asynchronous>); - fn GetData(&self, pasync: Option<&ID3D11Asynchronous>, pdata: *mut core::ffi::c_void, datasize: u32, getdataflags: u32) -> windows_core::Result<()>; - fn SetPredication(&self, ppredicate: Option<&ID3D11Predicate>, predicatevalue: super::super::Foundation::BOOL); + fn Begin(&self, pasync: windows_core::Ref<'_, ID3D11Asynchronous>); + fn End(&self, pasync: windows_core::Ref<'_, ID3D11Asynchronous>); + fn GetData(&self, pasync: windows_core::Ref<'_, ID3D11Asynchronous>, pdata: *mut core::ffi::c_void, datasize: u32, getdataflags: u32) -> windows_core::Result<()>; + fn SetPredication(&self, ppredicate: windows_core::Ref<'_, ID3D11Predicate>, predicatevalue: super::super::Foundation::BOOL); fn GSSetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *const Option); fn GSSetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *const Option); - fn OMSetRenderTargets(&self, numviews: u32, pprendertargetviews: *const Option, pdepthstencilview: Option<&ID3D11DepthStencilView>); - fn OMSetRenderTargetsAndUnorderedAccessViews(&self, numrtvs: u32, pprendertargetviews: *const Option, pdepthstencilview: Option<&ID3D11DepthStencilView>, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: *const Option, puavinitialcounts: *const u32); - fn OMSetBlendState(&self, pblendstate: Option<&ID3D11BlendState>, blendfactor: *const f32, samplemask: u32); - fn OMSetDepthStencilState(&self, pdepthstencilstate: Option<&ID3D11DepthStencilState>, stencilref: u32); + fn OMSetRenderTargets(&self, numviews: u32, pprendertargetviews: *const Option, pdepthstencilview: windows_core::Ref<'_, ID3D11DepthStencilView>); + fn OMSetRenderTargetsAndUnorderedAccessViews(&self, numrtvs: u32, pprendertargetviews: *const Option, pdepthstencilview: windows_core::Ref<'_, ID3D11DepthStencilView>, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: *const Option, puavinitialcounts: *const u32); + fn OMSetBlendState(&self, pblendstate: windows_core::Ref<'_, ID3D11BlendState>, blendfactor: *const f32, samplemask: u32); + fn OMSetDepthStencilState(&self, pdepthstencilstate: windows_core::Ref<'_, ID3D11DepthStencilState>, stencilref: u32); fn SOSetTargets(&self, numbuffers: u32, ppsotargets: *const Option, poffsets: *const u32); fn DrawAuto(&self); - fn DrawIndexedInstancedIndirect(&self, pbufferforargs: Option<&ID3D11Buffer>, alignedbyteoffsetforargs: u32); - fn DrawInstancedIndirect(&self, pbufferforargs: Option<&ID3D11Buffer>, alignedbyteoffsetforargs: u32); + fn DrawIndexedInstancedIndirect(&self, pbufferforargs: windows_core::Ref<'_, ID3D11Buffer>, alignedbyteoffsetforargs: u32); + fn DrawInstancedIndirect(&self, pbufferforargs: windows_core::Ref<'_, ID3D11Buffer>, alignedbyteoffsetforargs: u32); fn Dispatch(&self, threadgroupcountx: u32, threadgroupcounty: u32, threadgroupcountz: u32); - fn DispatchIndirect(&self, pbufferforargs: Option<&ID3D11Buffer>, alignedbyteoffsetforargs: u32); - fn RSSetState(&self, prasterizerstate: Option<&ID3D11RasterizerState>); + fn DispatchIndirect(&self, pbufferforargs: windows_core::Ref<'_, ID3D11Buffer>, alignedbyteoffsetforargs: u32); + fn RSSetState(&self, prasterizerstate: windows_core::Ref<'_, ID3D11RasterizerState>); fn RSSetViewports(&self, numviewports: u32, pviewports: *const D3D11_VIEWPORT); fn RSSetScissorRects(&self, numrects: u32, prects: *const super::super::Foundation::RECT); - fn CopySubresourceRegion(&self, pdstresource: Option<&ID3D11Resource>, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: Option<&ID3D11Resource>, srcsubresource: u32, psrcbox: *const D3D11_BOX); - fn CopyResource(&self, pdstresource: Option<&ID3D11Resource>, psrcresource: Option<&ID3D11Resource>); - fn UpdateSubresource(&self, pdstresource: Option<&ID3D11Resource>, dstsubresource: u32, pdstbox: *const D3D11_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32); - fn CopyStructureCount(&self, pdstbuffer: Option<&ID3D11Buffer>, dstalignedbyteoffset: u32, psrcview: Option<&ID3D11UnorderedAccessView>); - fn ClearRenderTargetView(&self, prendertargetview: Option<&ID3D11RenderTargetView>, colorrgba: *const f32); - fn ClearUnorderedAccessViewUint(&self, punorderedaccessview: Option<&ID3D11UnorderedAccessView>, values: *const u32); - fn ClearUnorderedAccessViewFloat(&self, punorderedaccessview: Option<&ID3D11UnorderedAccessView>, values: *const f32); - fn ClearDepthStencilView(&self, pdepthstencilview: Option<&ID3D11DepthStencilView>, clearflags: u32, depth: f32, stencil: u8); - fn GenerateMips(&self, pshaderresourceview: Option<&ID3D11ShaderResourceView>); - fn SetResourceMinLOD(&self, presource: Option<&ID3D11Resource>, minlod: f32); - fn GetResourceMinLOD(&self, presource: Option<&ID3D11Resource>) -> f32; - fn ResolveSubresource(&self, pdstresource: Option<&ID3D11Resource>, dstsubresource: u32, psrcresource: Option<&ID3D11Resource>, srcsubresource: u32, format: super::Dxgi::Common::DXGI_FORMAT); - fn ExecuteCommandList(&self, pcommandlist: Option<&ID3D11CommandList>, restorecontextstate: super::super::Foundation::BOOL); + fn CopySubresourceRegion(&self, pdstresource: windows_core::Ref<'_, ID3D11Resource>, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: windows_core::Ref<'_, ID3D11Resource>, srcsubresource: u32, psrcbox: *const D3D11_BOX); + fn CopyResource(&self, pdstresource: windows_core::Ref<'_, ID3D11Resource>, psrcresource: windows_core::Ref<'_, ID3D11Resource>); + fn UpdateSubresource(&self, pdstresource: windows_core::Ref<'_, ID3D11Resource>, dstsubresource: u32, pdstbox: *const D3D11_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32); + fn CopyStructureCount(&self, pdstbuffer: windows_core::Ref<'_, ID3D11Buffer>, dstalignedbyteoffset: u32, psrcview: windows_core::Ref<'_, ID3D11UnorderedAccessView>); + fn ClearRenderTargetView(&self, prendertargetview: windows_core::Ref<'_, ID3D11RenderTargetView>, colorrgba: *const f32); + fn ClearUnorderedAccessViewUint(&self, punorderedaccessview: windows_core::Ref<'_, ID3D11UnorderedAccessView>, values: *const u32); + fn ClearUnorderedAccessViewFloat(&self, punorderedaccessview: windows_core::Ref<'_, ID3D11UnorderedAccessView>, values: *const f32); + fn ClearDepthStencilView(&self, pdepthstencilview: windows_core::Ref<'_, ID3D11DepthStencilView>, clearflags: u32, depth: f32, stencil: u8); + fn GenerateMips(&self, pshaderresourceview: windows_core::Ref<'_, ID3D11ShaderResourceView>); + fn SetResourceMinLOD(&self, presource: windows_core::Ref<'_, ID3D11Resource>, minlod: f32); + fn GetResourceMinLOD(&self, presource: windows_core::Ref<'_, ID3D11Resource>) -> f32; + fn ResolveSubresource(&self, pdstresource: windows_core::Ref<'_, ID3D11Resource>, dstsubresource: u32, psrcresource: windows_core::Ref<'_, ID3D11Resource>, srcsubresource: u32, format: super::Dxgi::Common::DXGI_FORMAT); + fn ExecuteCommandList(&self, pcommandlist: windows_core::Ref<'_, ID3D11CommandList>, restorecontextstate: super::super::Foundation::BOOL); fn HSSetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *const Option); - fn HSSetShader(&self, phullshader: Option<&ID3D11HullShader>, ppclassinstances: *const Option, numclassinstances: u32); + fn HSSetShader(&self, phullshader: windows_core::Ref<'_, ID3D11HullShader>, ppclassinstances: *const Option, numclassinstances: u32); fn HSSetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *const Option); fn HSSetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option); fn DSSetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *const Option); - fn DSSetShader(&self, pdomainshader: Option<&ID3D11DomainShader>, ppclassinstances: *const Option, numclassinstances: u32); + fn DSSetShader(&self, pdomainshader: windows_core::Ref<'_, ID3D11DomainShader>, ppclassinstances: *const Option, numclassinstances: u32); fn DSSetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *const Option); fn DSSetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option); fn CSSetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *const Option); fn CSSetUnorderedAccessViews(&self, startslot: u32, numuavs: u32, ppunorderedaccessviews: *const Option, puavinitialcounts: *const u32); - fn CSSetShader(&self, pcomputeshader: Option<&ID3D11ComputeShader>, ppclassinstances: *const Option, numclassinstances: u32); + fn CSSetShader(&self, pcomputeshader: windows_core::Ref<'_, ID3D11ComputeShader>, ppclassinstances: *const Option, numclassinstances: u32); fn CSSetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *const Option); fn CSSetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option); - fn VSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option); - fn PSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *mut Option); - fn PSGetShader(&self, pppixelshader: *mut Option, ppclassinstances: *mut Option, pnumclassinstances: *mut u32); - fn PSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *mut Option); - fn VSGetShader(&self, ppvertexshader: *mut Option, ppclassinstances: *mut Option, pnumclassinstances: *mut u32); - fn PSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option); - fn IAGetInputLayout(&self, ppinputlayout: *mut Option); - fn IAGetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: *mut Option, pstrides: *mut u32, poffsets: *mut u32); - fn IAGetIndexBuffer(&self, pindexbuffer: *mut Option, format: *mut super::Dxgi::Common::DXGI_FORMAT, offset: *mut u32); - fn GSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option); - fn GSGetShader(&self, ppgeometryshader: *mut Option, ppclassinstances: *mut Option, pnumclassinstances: *mut u32); + fn VSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>); + fn PSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: windows_core::OutRef<'_, ID3D11ShaderResourceView>); + fn PSGetShader(&self, pppixelshader: windows_core::OutRef<'_, ID3D11PixelShader>, ppclassinstances: windows_core::OutRef<'_, ID3D11ClassInstance>, pnumclassinstances: *mut u32); + fn PSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: windows_core::OutRef<'_, ID3D11SamplerState>); + fn VSGetShader(&self, ppvertexshader: windows_core::OutRef<'_, ID3D11VertexShader>, ppclassinstances: windows_core::OutRef<'_, ID3D11ClassInstance>, pnumclassinstances: *mut u32); + fn PSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>); + fn IAGetInputLayout(&self, ppinputlayout: windows_core::OutRef<'_, ID3D11InputLayout>); + fn IAGetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: windows_core::OutRef<'_, ID3D11Buffer>, pstrides: *mut u32, poffsets: *mut u32); + fn IAGetIndexBuffer(&self, pindexbuffer: windows_core::OutRef<'_, ID3D11Buffer>, format: *mut super::Dxgi::Common::DXGI_FORMAT, offset: *mut u32); + fn GSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>); + fn GSGetShader(&self, ppgeometryshader: windows_core::OutRef<'_, ID3D11GeometryShader>, ppclassinstances: windows_core::OutRef<'_, ID3D11ClassInstance>, pnumclassinstances: *mut u32); fn IAGetPrimitiveTopology(&self, ptopology: *mut super::Direct3D::D3D_PRIMITIVE_TOPOLOGY); - fn VSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *mut Option); - fn VSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *mut Option); - fn GetPredication(&self, pppredicate: *mut Option, ppredicatevalue: *mut super::super::Foundation::BOOL); - fn GSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *mut Option); - fn GSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *mut Option); - fn OMGetRenderTargets(&self, numviews: u32, pprendertargetviews: *mut Option, ppdepthstencilview: *mut Option); - fn OMGetRenderTargetsAndUnorderedAccessViews(&self, numrtvs: u32, pprendertargetviews: *mut Option, ppdepthstencilview: *mut Option, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: *mut Option); - fn OMGetBlendState(&self, ppblendstate: *mut Option, blendfactor: *mut f32, psamplemask: *mut u32); - fn OMGetDepthStencilState(&self, ppdepthstencilstate: *mut Option, pstencilref: *mut u32); - fn SOGetTargets(&self, numbuffers: u32, ppsotargets: *mut Option); - fn RSGetState(&self, pprasterizerstate: *mut Option); + fn VSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: windows_core::OutRef<'_, ID3D11ShaderResourceView>); + fn VSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: windows_core::OutRef<'_, ID3D11SamplerState>); + fn GetPredication(&self, pppredicate: windows_core::OutRef<'_, ID3D11Predicate>, ppredicatevalue: *mut super::super::Foundation::BOOL); + fn GSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: windows_core::OutRef<'_, ID3D11ShaderResourceView>); + fn GSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: windows_core::OutRef<'_, ID3D11SamplerState>); + fn OMGetRenderTargets(&self, numviews: u32, pprendertargetviews: windows_core::OutRef<'_, ID3D11RenderTargetView>, ppdepthstencilview: windows_core::OutRef<'_, ID3D11DepthStencilView>); + fn OMGetRenderTargetsAndUnorderedAccessViews(&self, numrtvs: u32, pprendertargetviews: windows_core::OutRef<'_, ID3D11RenderTargetView>, ppdepthstencilview: windows_core::OutRef<'_, ID3D11DepthStencilView>, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: windows_core::OutRef<'_, ID3D11UnorderedAccessView>); + fn OMGetBlendState(&self, ppblendstate: windows_core::OutRef<'_, ID3D11BlendState>, blendfactor: *mut f32, psamplemask: *mut u32); + fn OMGetDepthStencilState(&self, ppdepthstencilstate: windows_core::OutRef<'_, ID3D11DepthStencilState>, pstencilref: *mut u32); + fn SOGetTargets(&self, numbuffers: u32, ppsotargets: windows_core::OutRef<'_, ID3D11Buffer>); + fn RSGetState(&self, pprasterizerstate: windows_core::OutRef<'_, ID3D11RasterizerState>); fn RSGetViewports(&self, pnumviewports: *mut u32, pviewports: *mut D3D11_VIEWPORT); fn RSGetScissorRects(&self, pnumrects: *mut u32, prects: *mut super::super::Foundation::RECT); - fn HSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *mut Option); - fn HSGetShader(&self, pphullshader: *mut Option, ppclassinstances: *mut Option, pnumclassinstances: *mut u32); - fn HSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *mut Option); - fn HSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option); - fn DSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *mut Option); - fn DSGetShader(&self, ppdomainshader: *mut Option, ppclassinstances: *mut Option, pnumclassinstances: *mut u32); - fn DSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *mut Option); - fn DSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option); - fn CSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: *mut Option); - fn CSGetUnorderedAccessViews(&self, startslot: u32, numuavs: u32, ppunorderedaccessviews: *mut Option); - fn CSGetShader(&self, ppcomputeshader: *mut Option, ppclassinstances: *mut Option, pnumclassinstances: *mut u32); - fn CSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: *mut Option); - fn CSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option); + fn HSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: windows_core::OutRef<'_, ID3D11ShaderResourceView>); + fn HSGetShader(&self, pphullshader: windows_core::OutRef<'_, ID3D11HullShader>, ppclassinstances: windows_core::OutRef<'_, ID3D11ClassInstance>, pnumclassinstances: *mut u32); + fn HSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: windows_core::OutRef<'_, ID3D11SamplerState>); + fn HSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>); + fn DSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: windows_core::OutRef<'_, ID3D11ShaderResourceView>); + fn DSGetShader(&self, ppdomainshader: windows_core::OutRef<'_, ID3D11DomainShader>, ppclassinstances: windows_core::OutRef<'_, ID3D11ClassInstance>, pnumclassinstances: *mut u32); + fn DSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: windows_core::OutRef<'_, ID3D11SamplerState>); + fn DSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>); + fn CSGetShaderResources(&self, startslot: u32, numviews: u32, ppshaderresourceviews: windows_core::OutRef<'_, ID3D11ShaderResourceView>); + fn CSGetUnorderedAccessViews(&self, startslot: u32, numuavs: u32, ppunorderedaccessviews: windows_core::OutRef<'_, ID3D11UnorderedAccessView>); + fn CSGetShader(&self, ppcomputeshader: windows_core::OutRef<'_, ID3D11ComputeShader>, ppclassinstances: windows_core::OutRef<'_, ID3D11ClassInstance>, pnumclassinstances: *mut u32); + fn CSGetSamplers(&self, startslot: u32, numsamplers: u32, ppsamplers: windows_core::OutRef<'_, ID3D11SamplerState>); + fn CSGetConstantBuffers(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>); fn ClearState(&self); fn Flush(&self); fn GetType(&self) -> D3D11_DEVICE_CONTEXT_TYPE; fn GetContextFlags(&self) -> u32; - fn FinishCommandList(&self, restoredeferredcontextstate: super::super::Foundation::BOOL, ppcommandlist: *mut Option) -> windows_core::Result<()>; + fn FinishCommandList(&self, restoredeferredcontextstate: super::super::Foundation::BOOL, ppcommandlist: windows_core::OutRef<'_, ID3D11CommandList>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D11DeviceContext_Vtbl { @@ -8676,7 +8676,7 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn PSSetShader(this: *mut core::ffi::c_void, ppixelshader: *mut core::ffi::c_void, ppclassinstances: *const *mut core::ffi::c_void, numclassinstances: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::PSSetShader(this, windows_core::from_raw_borrowed(&ppixelshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) + ID3D11DeviceContext_Impl::PSSetShader(this, core::mem::transmute_copy(&ppixelshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) } unsafe extern "system" fn PSSetSamplers(this: *mut core::ffi::c_void, startslot: u32, numsamplers: u32, ppsamplers: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8684,7 +8684,7 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn VSSetShader(this: *mut core::ffi::c_void, pvertexshader: *mut core::ffi::c_void, ppclassinstances: *const *mut core::ffi::c_void, numclassinstances: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::VSSetShader(this, windows_core::from_raw_borrowed(&pvertexshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) + ID3D11DeviceContext_Impl::VSSetShader(this, core::mem::transmute_copy(&pvertexshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) } unsafe extern "system" fn DrawIndexed(this: *mut core::ffi::c_void, indexcount: u32, startindexlocation: u32, basevertexlocation: i32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8696,11 +8696,11 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn Map(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, maptype: D3D11_MAP, mapflags: u32, pmappedresource: *mut D3D11_MAPPED_SUBRESOURCE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::Map(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&maptype), core::mem::transmute_copy(&mapflags), core::mem::transmute_copy(&pmappedresource)).into() + ID3D11DeviceContext_Impl::Map(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&maptype), core::mem::transmute_copy(&mapflags), core::mem::transmute_copy(&pmappedresource)).into() } unsafe extern "system" fn Unmap(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::Unmap(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource)) + ID3D11DeviceContext_Impl::Unmap(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource)) } unsafe extern "system" fn PSSetConstantBuffers(this: *mut core::ffi::c_void, startslot: u32, numbuffers: u32, ppconstantbuffers: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8708,7 +8708,7 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn IASetInputLayout(this: *mut core::ffi::c_void, pinputlayout: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::IASetInputLayout(this, windows_core::from_raw_borrowed(&pinputlayout)) + ID3D11DeviceContext_Impl::IASetInputLayout(this, core::mem::transmute_copy(&pinputlayout)) } unsafe extern "system" fn IASetVertexBuffers(this: *mut core::ffi::c_void, startslot: u32, numbuffers: u32, ppvertexbuffers: *const *mut core::ffi::c_void, pstrides: *const u32, poffsets: *const u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8716,7 +8716,7 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn IASetIndexBuffer(this: *mut core::ffi::c_void, pindexbuffer: *mut core::ffi::c_void, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::IASetIndexBuffer(this, windows_core::from_raw_borrowed(&pindexbuffer), core::mem::transmute_copy(&format), core::mem::transmute_copy(&offset)) + ID3D11DeviceContext_Impl::IASetIndexBuffer(this, core::mem::transmute_copy(&pindexbuffer), core::mem::transmute_copy(&format), core::mem::transmute_copy(&offset)) } unsafe extern "system" fn DrawIndexedInstanced(this: *mut core::ffi::c_void, indexcountperinstance: u32, instancecount: u32, startindexlocation: u32, basevertexlocation: i32, startinstancelocation: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8732,7 +8732,7 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn GSSetShader(this: *mut core::ffi::c_void, pshader: *mut core::ffi::c_void, ppclassinstances: *const *mut core::ffi::c_void, numclassinstances: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::GSSetShader(this, windows_core::from_raw_borrowed(&pshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) + ID3D11DeviceContext_Impl::GSSetShader(this, core::mem::transmute_copy(&pshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) } unsafe extern "system" fn IASetPrimitiveTopology(this: *mut core::ffi::c_void, topology: super::Direct3D::D3D_PRIMITIVE_TOPOLOGY) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8748,19 +8748,19 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn Begin(this: *mut core::ffi::c_void, pasync: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::Begin(this, windows_core::from_raw_borrowed(&pasync)) + ID3D11DeviceContext_Impl::Begin(this, core::mem::transmute_copy(&pasync)) } unsafe extern "system" fn End(this: *mut core::ffi::c_void, pasync: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::End(this, windows_core::from_raw_borrowed(&pasync)) + ID3D11DeviceContext_Impl::End(this, core::mem::transmute_copy(&pasync)) } unsafe extern "system" fn GetData(this: *mut core::ffi::c_void, pasync: *mut core::ffi::c_void, pdata: *mut core::ffi::c_void, datasize: u32, getdataflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::GetData(this, windows_core::from_raw_borrowed(&pasync), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&getdataflags)).into() + ID3D11DeviceContext_Impl::GetData(this, core::mem::transmute_copy(&pasync), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&getdataflags)).into() } unsafe extern "system" fn SetPredication(this: *mut core::ffi::c_void, ppredicate: *mut core::ffi::c_void, predicatevalue: super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::SetPredication(this, windows_core::from_raw_borrowed(&ppredicate), core::mem::transmute_copy(&predicatevalue)) + ID3D11DeviceContext_Impl::SetPredication(this, core::mem::transmute_copy(&ppredicate), core::mem::transmute_copy(&predicatevalue)) } unsafe extern "system" fn GSSetShaderResources(this: *mut core::ffi::c_void, startslot: u32, numviews: u32, ppshaderresourceviews: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8772,19 +8772,19 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn OMSetRenderTargets(this: *mut core::ffi::c_void, numviews: u32, pprendertargetviews: *const *mut core::ffi::c_void, pdepthstencilview: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::OMSetRenderTargets(this, core::mem::transmute_copy(&numviews), core::mem::transmute_copy(&pprendertargetviews), windows_core::from_raw_borrowed(&pdepthstencilview)) + ID3D11DeviceContext_Impl::OMSetRenderTargets(this, core::mem::transmute_copy(&numviews), core::mem::transmute_copy(&pprendertargetviews), core::mem::transmute_copy(&pdepthstencilview)) } unsafe extern "system" fn OMSetRenderTargetsAndUnorderedAccessViews(this: *mut core::ffi::c_void, numrtvs: u32, pprendertargetviews: *const *mut core::ffi::c_void, pdepthstencilview: *mut core::ffi::c_void, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: *const *mut core::ffi::c_void, puavinitialcounts: *const u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::OMSetRenderTargetsAndUnorderedAccessViews(this, core::mem::transmute_copy(&numrtvs), core::mem::transmute_copy(&pprendertargetviews), windows_core::from_raw_borrowed(&pdepthstencilview), core::mem::transmute_copy(&uavstartslot), core::mem::transmute_copy(&numuavs), core::mem::transmute_copy(&ppunorderedaccessviews), core::mem::transmute_copy(&puavinitialcounts)) + ID3D11DeviceContext_Impl::OMSetRenderTargetsAndUnorderedAccessViews(this, core::mem::transmute_copy(&numrtvs), core::mem::transmute_copy(&pprendertargetviews), core::mem::transmute_copy(&pdepthstencilview), core::mem::transmute_copy(&uavstartslot), core::mem::transmute_copy(&numuavs), core::mem::transmute_copy(&ppunorderedaccessviews), core::mem::transmute_copy(&puavinitialcounts)) } unsafe extern "system" fn OMSetBlendState(this: *mut core::ffi::c_void, pblendstate: *mut core::ffi::c_void, blendfactor: *const f32, samplemask: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::OMSetBlendState(this, windows_core::from_raw_borrowed(&pblendstate), core::mem::transmute_copy(&blendfactor), core::mem::transmute_copy(&samplemask)) + ID3D11DeviceContext_Impl::OMSetBlendState(this, core::mem::transmute_copy(&pblendstate), core::mem::transmute_copy(&blendfactor), core::mem::transmute_copy(&samplemask)) } unsafe extern "system" fn OMSetDepthStencilState(this: *mut core::ffi::c_void, pdepthstencilstate: *mut core::ffi::c_void, stencilref: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::OMSetDepthStencilState(this, windows_core::from_raw_borrowed(&pdepthstencilstate), core::mem::transmute_copy(&stencilref)) + ID3D11DeviceContext_Impl::OMSetDepthStencilState(this, core::mem::transmute_copy(&pdepthstencilstate), core::mem::transmute_copy(&stencilref)) } unsafe extern "system" fn SOSetTargets(this: *mut core::ffi::c_void, numbuffers: u32, ppsotargets: *const *mut core::ffi::c_void, poffsets: *const u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8796,11 +8796,11 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn DrawIndexedInstancedIndirect(this: *mut core::ffi::c_void, pbufferforargs: *mut core::ffi::c_void, alignedbyteoffsetforargs: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::DrawIndexedInstancedIndirect(this, windows_core::from_raw_borrowed(&pbufferforargs), core::mem::transmute_copy(&alignedbyteoffsetforargs)) + ID3D11DeviceContext_Impl::DrawIndexedInstancedIndirect(this, core::mem::transmute_copy(&pbufferforargs), core::mem::transmute_copy(&alignedbyteoffsetforargs)) } unsafe extern "system" fn DrawInstancedIndirect(this: *mut core::ffi::c_void, pbufferforargs: *mut core::ffi::c_void, alignedbyteoffsetforargs: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::DrawInstancedIndirect(this, windows_core::from_raw_borrowed(&pbufferforargs), core::mem::transmute_copy(&alignedbyteoffsetforargs)) + ID3D11DeviceContext_Impl::DrawInstancedIndirect(this, core::mem::transmute_copy(&pbufferforargs), core::mem::transmute_copy(&alignedbyteoffsetforargs)) } unsafe extern "system" fn Dispatch(this: *mut core::ffi::c_void, threadgroupcountx: u32, threadgroupcounty: u32, threadgroupcountz: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8808,11 +8808,11 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn DispatchIndirect(this: *mut core::ffi::c_void, pbufferforargs: *mut core::ffi::c_void, alignedbyteoffsetforargs: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::DispatchIndirect(this, windows_core::from_raw_borrowed(&pbufferforargs), core::mem::transmute_copy(&alignedbyteoffsetforargs)) + ID3D11DeviceContext_Impl::DispatchIndirect(this, core::mem::transmute_copy(&pbufferforargs), core::mem::transmute_copy(&alignedbyteoffsetforargs)) } unsafe extern "system" fn RSSetState(this: *mut core::ffi::c_void, prasterizerstate: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::RSSetState(this, windows_core::from_raw_borrowed(&prasterizerstate)) + ID3D11DeviceContext_Impl::RSSetState(this, core::mem::transmute_copy(&prasterizerstate)) } unsafe extern "system" fn RSSetViewports(this: *mut core::ffi::c_void, numviewports: u32, pviewports: *const D3D11_VIEWPORT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8824,55 +8824,55 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn CopySubresourceRegion(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: *mut core::ffi::c_void, srcsubresource: u32, psrcbox: *const D3D11_BOX) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::CopySubresourceRegion(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&dstx), core::mem::transmute_copy(&dsty), core::mem::transmute_copy(&dstz), windows_core::from_raw_borrowed(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcbox)) + ID3D11DeviceContext_Impl::CopySubresourceRegion(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&dstx), core::mem::transmute_copy(&dsty), core::mem::transmute_copy(&dstz), core::mem::transmute_copy(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcbox)) } unsafe extern "system" fn CopyResource(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, psrcresource: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::CopyResource(this, windows_core::from_raw_borrowed(&pdstresource), windows_core::from_raw_borrowed(&psrcresource)) + ID3D11DeviceContext_Impl::CopyResource(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&psrcresource)) } unsafe extern "system" fn UpdateSubresource(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, pdstbox: *const D3D11_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::UpdateSubresource(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&pdstbox), core::mem::transmute_copy(&psrcdata), core::mem::transmute_copy(&srcrowpitch), core::mem::transmute_copy(&srcdepthpitch)) + ID3D11DeviceContext_Impl::UpdateSubresource(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&pdstbox), core::mem::transmute_copy(&psrcdata), core::mem::transmute_copy(&srcrowpitch), core::mem::transmute_copy(&srcdepthpitch)) } unsafe extern "system" fn CopyStructureCount(this: *mut core::ffi::c_void, pdstbuffer: *mut core::ffi::c_void, dstalignedbyteoffset: u32, psrcview: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::CopyStructureCount(this, windows_core::from_raw_borrowed(&pdstbuffer), core::mem::transmute_copy(&dstalignedbyteoffset), windows_core::from_raw_borrowed(&psrcview)) + ID3D11DeviceContext_Impl::CopyStructureCount(this, core::mem::transmute_copy(&pdstbuffer), core::mem::transmute_copy(&dstalignedbyteoffset), core::mem::transmute_copy(&psrcview)) } unsafe extern "system" fn ClearRenderTargetView(this: *mut core::ffi::c_void, prendertargetview: *mut core::ffi::c_void, colorrgba: *const f32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::ClearRenderTargetView(this, windows_core::from_raw_borrowed(&prendertargetview), core::mem::transmute_copy(&colorrgba)) + ID3D11DeviceContext_Impl::ClearRenderTargetView(this, core::mem::transmute_copy(&prendertargetview), core::mem::transmute_copy(&colorrgba)) } unsafe extern "system" fn ClearUnorderedAccessViewUint(this: *mut core::ffi::c_void, punorderedaccessview: *mut core::ffi::c_void, values: *const u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::ClearUnorderedAccessViewUint(this, windows_core::from_raw_borrowed(&punorderedaccessview), core::mem::transmute_copy(&values)) + ID3D11DeviceContext_Impl::ClearUnorderedAccessViewUint(this, core::mem::transmute_copy(&punorderedaccessview), core::mem::transmute_copy(&values)) } unsafe extern "system" fn ClearUnorderedAccessViewFloat(this: *mut core::ffi::c_void, punorderedaccessview: *mut core::ffi::c_void, values: *const f32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::ClearUnorderedAccessViewFloat(this, windows_core::from_raw_borrowed(&punorderedaccessview), core::mem::transmute_copy(&values)) + ID3D11DeviceContext_Impl::ClearUnorderedAccessViewFloat(this, core::mem::transmute_copy(&punorderedaccessview), core::mem::transmute_copy(&values)) } unsafe extern "system" fn ClearDepthStencilView(this: *mut core::ffi::c_void, pdepthstencilview: *mut core::ffi::c_void, clearflags: u32, depth: f32, stencil: u8) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::ClearDepthStencilView(this, windows_core::from_raw_borrowed(&pdepthstencilview), core::mem::transmute_copy(&clearflags), core::mem::transmute_copy(&depth), core::mem::transmute_copy(&stencil)) + ID3D11DeviceContext_Impl::ClearDepthStencilView(this, core::mem::transmute_copy(&pdepthstencilview), core::mem::transmute_copy(&clearflags), core::mem::transmute_copy(&depth), core::mem::transmute_copy(&stencil)) } unsafe extern "system" fn GenerateMips(this: *mut core::ffi::c_void, pshaderresourceview: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::GenerateMips(this, windows_core::from_raw_borrowed(&pshaderresourceview)) + ID3D11DeviceContext_Impl::GenerateMips(this, core::mem::transmute_copy(&pshaderresourceview)) } unsafe extern "system" fn SetResourceMinLOD(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, minlod: f32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::SetResourceMinLOD(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&minlod)) + ID3D11DeviceContext_Impl::SetResourceMinLOD(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&minlod)) } unsafe extern "system" fn GetResourceMinLOD(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void) -> f32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::GetResourceMinLOD(this, windows_core::from_raw_borrowed(&presource)) + ID3D11DeviceContext_Impl::GetResourceMinLOD(this, core::mem::transmute_copy(&presource)) } unsafe extern "system" fn ResolveSubresource(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, psrcresource: *mut core::ffi::c_void, srcsubresource: u32, format: super::Dxgi::Common::DXGI_FORMAT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::ResolveSubresource(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), windows_core::from_raw_borrowed(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&format)) + ID3D11DeviceContext_Impl::ResolveSubresource(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&format)) } unsafe extern "system" fn ExecuteCommandList(this: *mut core::ffi::c_void, pcommandlist: *mut core::ffi::c_void, restorecontextstate: super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::ExecuteCommandList(this, windows_core::from_raw_borrowed(&pcommandlist), core::mem::transmute_copy(&restorecontextstate)) + ID3D11DeviceContext_Impl::ExecuteCommandList(this, core::mem::transmute_copy(&pcommandlist), core::mem::transmute_copy(&restorecontextstate)) } unsafe extern "system" fn HSSetShaderResources(this: *mut core::ffi::c_void, startslot: u32, numviews: u32, ppshaderresourceviews: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8880,7 +8880,7 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn HSSetShader(this: *mut core::ffi::c_void, phullshader: *mut core::ffi::c_void, ppclassinstances: *const *mut core::ffi::c_void, numclassinstances: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::HSSetShader(this, windows_core::from_raw_borrowed(&phullshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) + ID3D11DeviceContext_Impl::HSSetShader(this, core::mem::transmute_copy(&phullshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) } unsafe extern "system" fn HSSetSamplers(this: *mut core::ffi::c_void, startslot: u32, numsamplers: u32, ppsamplers: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8896,7 +8896,7 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn DSSetShader(this: *mut core::ffi::c_void, pdomainshader: *mut core::ffi::c_void, ppclassinstances: *const *mut core::ffi::c_void, numclassinstances: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::DSSetShader(this, windows_core::from_raw_borrowed(&pdomainshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) + ID3D11DeviceContext_Impl::DSSetShader(this, core::mem::transmute_copy(&pdomainshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) } unsafe extern "system" fn DSSetSamplers(this: *mut core::ffi::c_void, startslot: u32, numsamplers: u32, ppsamplers: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8916,7 +8916,7 @@ impl ID3D11DeviceContext_Vtbl { } unsafe extern "system" fn CSSetShader(this: *mut core::ffi::c_void, pcomputeshader: *mut core::ffi::c_void, ppclassinstances: *const *mut core::ffi::c_void, numclassinstances: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext_Impl::CSSetShader(this, windows_core::from_raw_borrowed(&pcomputeshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) + ID3D11DeviceContext_Impl::CSSetShader(this, core::mem::transmute_copy(&pcomputeshader), core::mem::transmute_copy(&ppclassinstances), core::mem::transmute_copy(&numclassinstances)) } unsafe extern "system" fn CSSetSamplers(this: *mut core::ffi::c_void, startslot: u32, numsamplers: u32, ppsamplers: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9334,44 +9334,44 @@ pub struct ID3D11DeviceContext1_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D11DeviceContext1_Impl: ID3D11DeviceContext_Impl { - fn CopySubresourceRegion1(&self, pdstresource: Option<&ID3D11Resource>, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: Option<&ID3D11Resource>, srcsubresource: u32, psrcbox: *const D3D11_BOX, copyflags: u32); - fn UpdateSubresource1(&self, pdstresource: Option<&ID3D11Resource>, dstsubresource: u32, pdstbox: *const D3D11_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32, copyflags: u32); - fn DiscardResource(&self, presource: Option<&ID3D11Resource>); - fn DiscardView(&self, presourceview: Option<&ID3D11View>); + fn CopySubresourceRegion1(&self, pdstresource: windows_core::Ref<'_, ID3D11Resource>, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: windows_core::Ref<'_, ID3D11Resource>, srcsubresource: u32, psrcbox: *const D3D11_BOX, copyflags: u32); + fn UpdateSubresource1(&self, pdstresource: windows_core::Ref<'_, ID3D11Resource>, dstsubresource: u32, pdstbox: *const D3D11_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32, copyflags: u32); + fn DiscardResource(&self, presource: windows_core::Ref<'_, ID3D11Resource>); + fn DiscardView(&self, presourceview: windows_core::Ref<'_, ID3D11View>); fn VSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option, pfirstconstant: *const u32, pnumconstants: *const u32); fn HSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option, pfirstconstant: *const u32, pnumconstants: *const u32); fn DSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option, pfirstconstant: *const u32, pnumconstants: *const u32); fn GSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option, pfirstconstant: *const u32, pnumconstants: *const u32); fn PSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option, pfirstconstant: *const u32, pnumconstants: *const u32); fn CSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *const Option, pfirstconstant: *const u32, pnumconstants: *const u32); - fn VSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option, pfirstconstant: *mut u32, pnumconstants: *mut u32); - fn HSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option, pfirstconstant: *mut u32, pnumconstants: *mut u32); - fn DSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option, pfirstconstant: *mut u32, pnumconstants: *mut u32); - fn GSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option, pfirstconstant: *mut u32, pnumconstants: *mut u32); - fn PSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option, pfirstconstant: *mut u32, pnumconstants: *mut u32); - fn CSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: *mut Option, pfirstconstant: *mut u32, pnumconstants: *mut u32); - fn SwapDeviceContextState(&self, pstate: Option<&ID3DDeviceContextState>, pppreviousstate: *mut Option); - fn ClearView(&self, pview: Option<&ID3D11View>, color: *const f32, prect: *const super::super::Foundation::RECT, numrects: u32); - fn DiscardView1(&self, presourceview: Option<&ID3D11View>, prects: *const super::super::Foundation::RECT, numrects: u32); + fn VSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>, pfirstconstant: *mut u32, pnumconstants: *mut u32); + fn HSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>, pfirstconstant: *mut u32, pnumconstants: *mut u32); + fn DSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>, pfirstconstant: *mut u32, pnumconstants: *mut u32); + fn GSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>, pfirstconstant: *mut u32, pnumconstants: *mut u32); + fn PSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>, pfirstconstant: *mut u32, pnumconstants: *mut u32); + fn CSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: windows_core::OutRef<'_, ID3D11Buffer>, pfirstconstant: *mut u32, pnumconstants: *mut u32); + fn SwapDeviceContextState(&self, pstate: windows_core::Ref<'_, ID3DDeviceContextState>, pppreviousstate: windows_core::OutRef<'_, ID3DDeviceContextState>); + fn ClearView(&self, pview: windows_core::Ref<'_, ID3D11View>, color: *const f32, prect: *const super::super::Foundation::RECT, numrects: u32); + fn DiscardView1(&self, presourceview: windows_core::Ref<'_, ID3D11View>, prects: *const super::super::Foundation::RECT, numrects: u32); } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D11DeviceContext1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CopySubresourceRegion1(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: *mut core::ffi::c_void, srcsubresource: u32, psrcbox: *const D3D11_BOX, copyflags: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext1_Impl::CopySubresourceRegion1(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&dstx), core::mem::transmute_copy(&dsty), core::mem::transmute_copy(&dstz), windows_core::from_raw_borrowed(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcbox), core::mem::transmute_copy(©flags)) + ID3D11DeviceContext1_Impl::CopySubresourceRegion1(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&dstx), core::mem::transmute_copy(&dsty), core::mem::transmute_copy(&dstz), core::mem::transmute_copy(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcbox), core::mem::transmute_copy(©flags)) } unsafe extern "system" fn UpdateSubresource1(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, pdstbox: *const D3D11_BOX, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32, copyflags: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext1_Impl::UpdateSubresource1(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&pdstbox), core::mem::transmute_copy(&psrcdata), core::mem::transmute_copy(&srcrowpitch), core::mem::transmute_copy(&srcdepthpitch), core::mem::transmute_copy(©flags)) + ID3D11DeviceContext1_Impl::UpdateSubresource1(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&pdstbox), core::mem::transmute_copy(&psrcdata), core::mem::transmute_copy(&srcrowpitch), core::mem::transmute_copy(&srcdepthpitch), core::mem::transmute_copy(©flags)) } unsafe extern "system" fn DiscardResource(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext1_Impl::DiscardResource(this, windows_core::from_raw_borrowed(&presource)) + ID3D11DeviceContext1_Impl::DiscardResource(this, core::mem::transmute_copy(&presource)) } unsafe extern "system" fn DiscardView(this: *mut core::ffi::c_void, presourceview: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext1_Impl::DiscardView(this, windows_core::from_raw_borrowed(&presourceview)) + ID3D11DeviceContext1_Impl::DiscardView(this, core::mem::transmute_copy(&presourceview)) } unsafe extern "system" fn VSSetConstantBuffers1(this: *mut core::ffi::c_void, startslot: u32, numbuffers: u32, ppconstantbuffers: *const *mut core::ffi::c_void, pfirstconstant: *const u32, pnumconstants: *const u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9423,15 +9423,15 @@ impl ID3D11DeviceContext1_Vtbl { } unsafe extern "system" fn SwapDeviceContextState(this: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void, pppreviousstate: *mut *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext1_Impl::SwapDeviceContextState(this, windows_core::from_raw_borrowed(&pstate), core::mem::transmute_copy(&pppreviousstate)) + ID3D11DeviceContext1_Impl::SwapDeviceContextState(this, core::mem::transmute_copy(&pstate), core::mem::transmute_copy(&pppreviousstate)) } unsafe extern "system" fn ClearView(this: *mut core::ffi::c_void, pview: *mut core::ffi::c_void, color: *const f32, prect: *const super::super::Foundation::RECT, numrects: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext1_Impl::ClearView(this, windows_core::from_raw_borrowed(&pview), core::mem::transmute_copy(&color), core::mem::transmute_copy(&prect), core::mem::transmute_copy(&numrects)) + ID3D11DeviceContext1_Impl::ClearView(this, core::mem::transmute_copy(&pview), core::mem::transmute_copy(&color), core::mem::transmute_copy(&prect), core::mem::transmute_copy(&numrects)) } unsafe extern "system" fn DiscardView1(this: *mut core::ffi::c_void, presourceview: *mut core::ffi::c_void, prects: *const super::super::Foundation::RECT, numrects: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext1_Impl::DiscardView1(this, windows_core::from_raw_borrowed(&presourceview), core::mem::transmute_copy(&prects), core::mem::transmute_copy(&numrects)) + ID3D11DeviceContext1_Impl::DiscardView1(this, core::mem::transmute_copy(&presourceview), core::mem::transmute_copy(&prects), core::mem::transmute_copy(&numrects)) } Self { base__: ID3D11DeviceContext_Vtbl::new::(), @@ -9563,12 +9563,12 @@ pub struct ID3D11DeviceContext2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D11DeviceContext2_Impl: ID3D11DeviceContext1_Impl { - fn UpdateTileMappings(&self, ptiledresource: Option<&ID3D11Resource>, numtiledresourceregions: u32, ptiledresourceregionstartcoordinates: *const D3D11_TILED_RESOURCE_COORDINATE, ptiledresourceregionsizes: *const D3D11_TILE_REGION_SIZE, ptilepool: Option<&ID3D11Buffer>, numranges: u32, prangeflags: *const u32, ptilepoolstartoffsets: *const u32, prangetilecounts: *const u32, flags: u32) -> windows_core::Result<()>; - fn CopyTileMappings(&self, pdesttiledresource: Option<&ID3D11Resource>, pdestregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, psourcetiledresource: Option<&ID3D11Resource>, psourceregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D11_TILE_REGION_SIZE, flags: u32) -> windows_core::Result<()>; - fn CopyTiles(&self, ptiledresource: Option<&ID3D11Resource>, ptileregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D11_TILE_REGION_SIZE, pbuffer: Option<&ID3D11Buffer>, bufferstartoffsetinbytes: u64, flags: u32); - fn UpdateTiles(&self, pdesttiledresource: Option<&ID3D11Resource>, pdesttileregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, pdesttileregionsize: *const D3D11_TILE_REGION_SIZE, psourcetiledata: *const core::ffi::c_void, flags: u32); - fn ResizeTilePool(&self, ptilepool: Option<&ID3D11Buffer>, newsizeinbytes: u64) -> windows_core::Result<()>; - fn TiledResourceBarrier(&self, ptiledresourceorviewaccessbeforebarrier: Option<&ID3D11DeviceChild>, ptiledresourceorviewaccessafterbarrier: Option<&ID3D11DeviceChild>); + fn UpdateTileMappings(&self, ptiledresource: windows_core::Ref<'_, ID3D11Resource>, numtiledresourceregions: u32, ptiledresourceregionstartcoordinates: *const D3D11_TILED_RESOURCE_COORDINATE, ptiledresourceregionsizes: *const D3D11_TILE_REGION_SIZE, ptilepool: windows_core::Ref<'_, ID3D11Buffer>, numranges: u32, prangeflags: *const u32, ptilepoolstartoffsets: *const u32, prangetilecounts: *const u32, flags: u32) -> windows_core::Result<()>; + fn CopyTileMappings(&self, pdesttiledresource: windows_core::Ref<'_, ID3D11Resource>, pdestregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, psourcetiledresource: windows_core::Ref<'_, ID3D11Resource>, psourceregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D11_TILE_REGION_SIZE, flags: u32) -> windows_core::Result<()>; + fn CopyTiles(&self, ptiledresource: windows_core::Ref<'_, ID3D11Resource>, ptileregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D11_TILE_REGION_SIZE, pbuffer: windows_core::Ref<'_, ID3D11Buffer>, bufferstartoffsetinbytes: u64, flags: u32); + fn UpdateTiles(&self, pdesttiledresource: windows_core::Ref<'_, ID3D11Resource>, pdesttileregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, pdesttileregionsize: *const D3D11_TILE_REGION_SIZE, psourcetiledata: *const core::ffi::c_void, flags: u32); + fn ResizeTilePool(&self, ptilepool: windows_core::Ref<'_, ID3D11Buffer>, newsizeinbytes: u64) -> windows_core::Result<()>; + fn TiledResourceBarrier(&self, ptiledresourceorviewaccessbeforebarrier: windows_core::Ref<'_, ID3D11DeviceChild>, ptiledresourceorviewaccessafterbarrier: windows_core::Ref<'_, ID3D11DeviceChild>); fn IsAnnotationEnabled(&self) -> super::super::Foundation::BOOL; fn SetMarkerInt(&self, plabel: &windows_core::PCWSTR, data: i32); fn BeginEventInt(&self, plabel: &windows_core::PCWSTR, data: i32); @@ -9579,40 +9579,27 @@ impl ID3D11DeviceContext2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UpdateTileMappings(this: *mut core::ffi::c_void, ptiledresource: *mut core::ffi::c_void, numtiledresourceregions: u32, ptiledresourceregionstartcoordinates: *const D3D11_TILED_RESOURCE_COORDINATE, ptiledresourceregionsizes: *const D3D11_TILE_REGION_SIZE, ptilepool: *mut core::ffi::c_void, numranges: u32, prangeflags: *const u32, ptilepoolstartoffsets: *const u32, prangetilecounts: *const u32, flags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext2_Impl::UpdateTileMappings( - this, - windows_core::from_raw_borrowed(&ptiledresource), - core::mem::transmute_copy(&numtiledresourceregions), - core::mem::transmute_copy(&ptiledresourceregionstartcoordinates), - core::mem::transmute_copy(&ptiledresourceregionsizes), - windows_core::from_raw_borrowed(&ptilepool), - core::mem::transmute_copy(&numranges), - core::mem::transmute_copy(&prangeflags), - core::mem::transmute_copy(&ptilepoolstartoffsets), - core::mem::transmute_copy(&prangetilecounts), - core::mem::transmute_copy(&flags), - ) - .into() + ID3D11DeviceContext2_Impl::UpdateTileMappings(this, core::mem::transmute_copy(&ptiledresource), core::mem::transmute_copy(&numtiledresourceregions), core::mem::transmute_copy(&ptiledresourceregionstartcoordinates), core::mem::transmute_copy(&ptiledresourceregionsizes), core::mem::transmute_copy(&ptilepool), core::mem::transmute_copy(&numranges), core::mem::transmute_copy(&prangeflags), core::mem::transmute_copy(&ptilepoolstartoffsets), core::mem::transmute_copy(&prangetilecounts), core::mem::transmute_copy(&flags)).into() } unsafe extern "system" fn CopyTileMappings(this: *mut core::ffi::c_void, pdesttiledresource: *mut core::ffi::c_void, pdestregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, psourcetiledresource: *mut core::ffi::c_void, psourceregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D11_TILE_REGION_SIZE, flags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext2_Impl::CopyTileMappings(this, windows_core::from_raw_borrowed(&pdesttiledresource), core::mem::transmute_copy(&pdestregionstartcoordinate), windows_core::from_raw_borrowed(&psourcetiledresource), core::mem::transmute_copy(&psourceregionstartcoordinate), core::mem::transmute_copy(&ptileregionsize), core::mem::transmute_copy(&flags)).into() + ID3D11DeviceContext2_Impl::CopyTileMappings(this, core::mem::transmute_copy(&pdesttiledresource), core::mem::transmute_copy(&pdestregionstartcoordinate), core::mem::transmute_copy(&psourcetiledresource), core::mem::transmute_copy(&psourceregionstartcoordinate), core::mem::transmute_copy(&ptileregionsize), core::mem::transmute_copy(&flags)).into() } unsafe extern "system" fn CopyTiles(this: *mut core::ffi::c_void, ptiledresource: *mut core::ffi::c_void, ptileregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D11_TILE_REGION_SIZE, pbuffer: *mut core::ffi::c_void, bufferstartoffsetinbytes: u64, flags: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext2_Impl::CopyTiles(this, windows_core::from_raw_borrowed(&ptiledresource), core::mem::transmute_copy(&ptileregionstartcoordinate), core::mem::transmute_copy(&ptileregionsize), windows_core::from_raw_borrowed(&pbuffer), core::mem::transmute_copy(&bufferstartoffsetinbytes), core::mem::transmute_copy(&flags)) + ID3D11DeviceContext2_Impl::CopyTiles(this, core::mem::transmute_copy(&ptiledresource), core::mem::transmute_copy(&ptileregionstartcoordinate), core::mem::transmute_copy(&ptileregionsize), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&bufferstartoffsetinbytes), core::mem::transmute_copy(&flags)) } unsafe extern "system" fn UpdateTiles(this: *mut core::ffi::c_void, pdesttiledresource: *mut core::ffi::c_void, pdesttileregionstartcoordinate: *const D3D11_TILED_RESOURCE_COORDINATE, pdesttileregionsize: *const D3D11_TILE_REGION_SIZE, psourcetiledata: *const core::ffi::c_void, flags: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext2_Impl::UpdateTiles(this, windows_core::from_raw_borrowed(&pdesttiledresource), core::mem::transmute_copy(&pdesttileregionstartcoordinate), core::mem::transmute_copy(&pdesttileregionsize), core::mem::transmute_copy(&psourcetiledata), core::mem::transmute_copy(&flags)) + ID3D11DeviceContext2_Impl::UpdateTiles(this, core::mem::transmute_copy(&pdesttiledresource), core::mem::transmute_copy(&pdesttileregionstartcoordinate), core::mem::transmute_copy(&pdesttileregionsize), core::mem::transmute_copy(&psourcetiledata), core::mem::transmute_copy(&flags)) } unsafe extern "system" fn ResizeTilePool(this: *mut core::ffi::c_void, ptilepool: *mut core::ffi::c_void, newsizeinbytes: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext2_Impl::ResizeTilePool(this, windows_core::from_raw_borrowed(&ptilepool), core::mem::transmute_copy(&newsizeinbytes)).into() + ID3D11DeviceContext2_Impl::ResizeTilePool(this, core::mem::transmute_copy(&ptilepool), core::mem::transmute_copy(&newsizeinbytes)).into() } unsafe extern "system" fn TiledResourceBarrier(this: *mut core::ffi::c_void, ptiledresourceorviewaccessbeforebarrier: *mut core::ffi::c_void, ptiledresourceorviewaccessafterbarrier: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext2_Impl::TiledResourceBarrier(this, windows_core::from_raw_borrowed(&ptiledresourceorviewaccessbeforebarrier), windows_core::from_raw_borrowed(&ptiledresourceorviewaccessafterbarrier)) + ID3D11DeviceContext2_Impl::TiledResourceBarrier(this, core::mem::transmute_copy(&ptiledresourceorviewaccessbeforebarrier), core::mem::transmute_copy(&ptiledresourceorviewaccessafterbarrier)) } unsafe extern "system" fn IsAnnotationEnabled(this: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9750,19 +9737,19 @@ pub struct ID3D11DeviceContext4_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D11DeviceContext4_Impl: ID3D11DeviceContext3_Impl { - fn Signal(&self, pfence: Option<&ID3D11Fence>, value: u64) -> windows_core::Result<()>; - fn Wait(&self, pfence: Option<&ID3D11Fence>, value: u64) -> windows_core::Result<()>; + fn Signal(&self, pfence: windows_core::Ref<'_, ID3D11Fence>, value: u64) -> windows_core::Result<()>; + fn Wait(&self, pfence: windows_core::Ref<'_, ID3D11Fence>, value: u64) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D11DeviceContext4_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Signal(this: *mut core::ffi::c_void, pfence: *mut core::ffi::c_void, value: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext4_Impl::Signal(this, windows_core::from_raw_borrowed(&pfence), core::mem::transmute_copy(&value)).into() + ID3D11DeviceContext4_Impl::Signal(this, core::mem::transmute_copy(&pfence), core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Wait(this: *mut core::ffi::c_void, pfence: *mut core::ffi::c_void, value: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11DeviceContext4_Impl::Wait(this, windows_core::from_raw_borrowed(&pfence), core::mem::transmute_copy(&value)).into() + ID3D11DeviceContext4_Impl::Wait(this, core::mem::transmute_copy(&pfence), core::mem::transmute_copy(&value)).into() } Self { base__: ID3D11DeviceContext3_Vtbl::new::(), Signal: Signal::, Wait: Wait:: } } @@ -9959,13 +9946,13 @@ pub struct ID3D11FunctionLinkingGraph_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub trait ID3D11FunctionLinkingGraph_Impl: windows_core::IUnknownImpl { - fn CreateModuleInstance(&self, ppmoduleinstance: *mut Option, pperrorbuffer: *mut Option) -> windows_core::Result<()>; + fn CreateModuleInstance(&self, ppmoduleinstance: windows_core::OutRef<'_, ID3D11ModuleInstance>, pperrorbuffer: windows_core::OutRef<'_, super::Direct3D::ID3DBlob>) -> windows_core::Result<()>; fn SetInputSignature(&self, pinputparameters: *const D3D11_PARAMETER_DESC, cinputparameters: u32) -> windows_core::Result; fn SetOutputSignature(&self, poutputparameters: *const D3D11_PARAMETER_DESC, coutputparameters: u32) -> windows_core::Result; - fn CallFunction(&self, pmoduleinstancenamespace: &windows_core::PCSTR, pmodulewithfunctionprototype: Option<&ID3D11Module>, pfunctionname: &windows_core::PCSTR) -> windows_core::Result; - fn PassValue(&self, psrcnode: Option<&ID3D11LinkingNode>, srcparameterindex: i32, pdstnode: Option<&ID3D11LinkingNode>, dstparameterindex: i32) -> windows_core::Result<()>; - fn PassValueWithSwizzle(&self, psrcnode: Option<&ID3D11LinkingNode>, srcparameterindex: i32, psrcswizzle: &windows_core::PCSTR, pdstnode: Option<&ID3D11LinkingNode>, dstparameterindex: i32, pdstswizzle: &windows_core::PCSTR) -> windows_core::Result<()>; - fn GetLastError(&self, pperrorbuffer: *mut Option) -> windows_core::Result<()>; + fn CallFunction(&self, pmoduleinstancenamespace: &windows_core::PCSTR, pmodulewithfunctionprototype: windows_core::Ref<'_, ID3D11Module>, pfunctionname: &windows_core::PCSTR) -> windows_core::Result; + fn PassValue(&self, psrcnode: windows_core::Ref<'_, ID3D11LinkingNode>, srcparameterindex: i32, pdstnode: windows_core::Ref<'_, ID3D11LinkingNode>, dstparameterindex: i32) -> windows_core::Result<()>; + fn PassValueWithSwizzle(&self, psrcnode: windows_core::Ref<'_, ID3D11LinkingNode>, srcparameterindex: i32, psrcswizzle: &windows_core::PCSTR, pdstnode: windows_core::Ref<'_, ID3D11LinkingNode>, dstparameterindex: i32, pdstswizzle: &windows_core::PCSTR) -> windows_core::Result<()>; + fn GetLastError(&self, pperrorbuffer: windows_core::OutRef<'_, super::Direct3D::ID3DBlob>) -> windows_core::Result<()>; fn GenerateHlsl(&self, uflags: u32) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -9997,7 +9984,7 @@ impl ID3D11FunctionLinkingGraph_Vtbl { } unsafe extern "system" fn CallFunction(this: *mut core::ffi::c_void, pmoduleinstancenamespace: windows_core::PCSTR, pmodulewithfunctionprototype: *mut core::ffi::c_void, pfunctionname: windows_core::PCSTR, ppcallnode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D11FunctionLinkingGraph_Impl::CallFunction(this, core::mem::transmute(&pmoduleinstancenamespace), windows_core::from_raw_borrowed(&pmodulewithfunctionprototype), core::mem::transmute(&pfunctionname)) { + match ID3D11FunctionLinkingGraph_Impl::CallFunction(this, core::mem::transmute(&pmoduleinstancenamespace), core::mem::transmute_copy(&pmodulewithfunctionprototype), core::mem::transmute(&pfunctionname)) { Ok(ok__) => { ppcallnode.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10007,11 +9994,11 @@ impl ID3D11FunctionLinkingGraph_Vtbl { } unsafe extern "system" fn PassValue(this: *mut core::ffi::c_void, psrcnode: *mut core::ffi::c_void, srcparameterindex: i32, pdstnode: *mut core::ffi::c_void, dstparameterindex: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11FunctionLinkingGraph_Impl::PassValue(this, windows_core::from_raw_borrowed(&psrcnode), core::mem::transmute_copy(&srcparameterindex), windows_core::from_raw_borrowed(&pdstnode), core::mem::transmute_copy(&dstparameterindex)).into() + ID3D11FunctionLinkingGraph_Impl::PassValue(this, core::mem::transmute_copy(&psrcnode), core::mem::transmute_copy(&srcparameterindex), core::mem::transmute_copy(&pdstnode), core::mem::transmute_copy(&dstparameterindex)).into() } unsafe extern "system" fn PassValueWithSwizzle(this: *mut core::ffi::c_void, psrcnode: *mut core::ffi::c_void, srcparameterindex: i32, psrcswizzle: windows_core::PCSTR, pdstnode: *mut core::ffi::c_void, dstparameterindex: i32, pdstswizzle: windows_core::PCSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11FunctionLinkingGraph_Impl::PassValueWithSwizzle(this, windows_core::from_raw_borrowed(&psrcnode), core::mem::transmute_copy(&srcparameterindex), core::mem::transmute(&psrcswizzle), windows_core::from_raw_borrowed(&pdstnode), core::mem::transmute_copy(&dstparameterindex), core::mem::transmute(&pdstswizzle)).into() + ID3D11FunctionLinkingGraph_Impl::PassValueWithSwizzle(this, core::mem::transmute_copy(&psrcnode), core::mem::transmute_copy(&srcparameterindex), core::mem::transmute(&psrcswizzle), core::mem::transmute_copy(&pdstnode), core::mem::transmute_copy(&dstparameterindex), core::mem::transmute(&pdstswizzle)).into() } unsafe extern "system" fn GetLastError(this: *mut core::ffi::c_void, pperrorbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10763,8 +10750,8 @@ pub struct ID3D11Linker_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub trait ID3D11Linker_Impl: windows_core::IUnknownImpl { - fn Link(&self, pentry: Option<&ID3D11ModuleInstance>, pentryname: &windows_core::PCSTR, ptargetname: &windows_core::PCSTR, uflags: u32, ppshaderblob: *mut Option, pperrorbuffer: *mut Option) -> windows_core::Result<()>; - fn UseLibrary(&self, plibrarymi: Option<&ID3D11ModuleInstance>) -> windows_core::Result<()>; + fn Link(&self, pentry: windows_core::Ref<'_, ID3D11ModuleInstance>, pentryname: &windows_core::PCSTR, ptargetname: &windows_core::PCSTR, uflags: u32, ppshaderblob: windows_core::OutRef<'_, super::Direct3D::ID3DBlob>, pperrorbuffer: windows_core::OutRef<'_, super::Direct3D::ID3DBlob>) -> windows_core::Result<()>; + fn UseLibrary(&self, plibrarymi: windows_core::Ref<'_, ID3D11ModuleInstance>) -> windows_core::Result<()>; fn AddClipPlaneFromCBuffer(&self, ucbufferslot: u32, ucbufferentry: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -10772,11 +10759,11 @@ impl ID3D11Linker_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Link(this: *mut core::ffi::c_void, pentry: *mut core::ffi::c_void, pentryname: windows_core::PCSTR, ptargetname: windows_core::PCSTR, uflags: u32, ppshaderblob: *mut *mut core::ffi::c_void, pperrorbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Linker_Impl::Link(this, windows_core::from_raw_borrowed(&pentry), core::mem::transmute(&pentryname), core::mem::transmute(&ptargetname), core::mem::transmute_copy(&uflags), core::mem::transmute_copy(&ppshaderblob), core::mem::transmute_copy(&pperrorbuffer)).into() + ID3D11Linker_Impl::Link(this, core::mem::transmute_copy(&pentry), core::mem::transmute(&pentryname), core::mem::transmute(&ptargetname), core::mem::transmute_copy(&uflags), core::mem::transmute_copy(&ppshaderblob), core::mem::transmute_copy(&pperrorbuffer)).into() } unsafe extern "system" fn UseLibrary(this: *mut core::ffi::c_void, plibrarymi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11Linker_Impl::UseLibrary(this, windows_core::from_raw_borrowed(&plibrarymi)).into() + ID3D11Linker_Impl::UseLibrary(this, core::mem::transmute_copy(&plibrarymi)).into() } unsafe extern "system" fn AddClipPlaneFromCBuffer(this: *mut core::ffi::c_void, ucbufferslot: u32, ucbufferentry: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11945,13 +11932,13 @@ pub trait ID3D11ShaderReflectionType_Impl { fn GetMemberTypeByIndex(&self, index: u32) -> Option; fn GetMemberTypeByName(&self, name: &windows_core::PCSTR) -> Option; fn GetMemberTypeName(&self, index: u32) -> windows_core::PCSTR; - fn IsEqual(&self, ptype: Option<&ID3D11ShaderReflectionType>) -> windows_core::Result<()>; + fn IsEqual(&self, ptype: windows_core::Ref<'_, ID3D11ShaderReflectionType>) -> windows_core::Result<()>; fn GetSubType(&self) -> Option; fn GetBaseClass(&self) -> Option; fn GetNumInterfaces(&self) -> u32; fn GetInterfaceByIndex(&self, uindex: u32) -> Option; - fn IsOfType(&self, ptype: Option<&ID3D11ShaderReflectionType>) -> windows_core::Result<()>; - fn ImplementsInterface(&self, pbase: Option<&ID3D11ShaderReflectionType>) -> windows_core::Result<()>; + fn IsOfType(&self, ptype: windows_core::Ref<'_, ID3D11ShaderReflectionType>) -> windows_core::Result<()>; + fn ImplementsInterface(&self, pbase: windows_core::Ref<'_, ID3D11ShaderReflectionType>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11ShaderReflectionType_Vtbl { @@ -11979,7 +11966,7 @@ impl ID3D11ShaderReflectionType_Vtbl { unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, ptype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D11ShaderReflectionType_Impl::IsEqual(this, windows_core::from_raw_borrowed(&ptype)).into() + ID3D11ShaderReflectionType_Impl::IsEqual(this, core::mem::transmute_copy(&ptype)).into() } unsafe extern "system" fn GetSubType(this: *mut core::ffi::c_void) -> Option { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; @@ -12004,12 +11991,12 @@ impl ID3D11ShaderReflectionType_Vtbl { unsafe extern "system" fn IsOfType(this: *mut core::ffi::c_void, ptype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D11ShaderReflectionType_Impl::IsOfType(this, windows_core::from_raw_borrowed(&ptype)).into() + ID3D11ShaderReflectionType_Impl::IsOfType(this, core::mem::transmute_copy(&ptype)).into() } unsafe extern "system" fn ImplementsInterface(this: *mut core::ffi::c_void, pbase: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D11ShaderReflectionType_Impl::ImplementsInterface(this, windows_core::from_raw_borrowed(&pbase)).into() + ID3D11ShaderReflectionType_Impl::ImplementsInterface(this, core::mem::transmute_copy(&pbase)).into() } Self { GetDesc: GetDesc::, @@ -12320,13 +12307,13 @@ pub struct ID3D11ShaderTraceFactory_Vtbl { pub CreateShaderTrace: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const D3D11_SHADER_TRACE_DESC, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ID3D11ShaderTraceFactory_Impl: windows_core::IUnknownImpl { - fn CreateShaderTrace(&self, pshader: Option<&windows_core::IUnknown>, ptracedesc: *const D3D11_SHADER_TRACE_DESC) -> windows_core::Result; + fn CreateShaderTrace(&self, pshader: windows_core::Ref<'_, windows_core::IUnknown>, ptracedesc: *const D3D11_SHADER_TRACE_DESC) -> windows_core::Result; } impl ID3D11ShaderTraceFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateShaderTrace(this: *mut core::ffi::c_void, pshader: *mut core::ffi::c_void, ptracedesc: *const D3D11_SHADER_TRACE_DESC, ppshadertrace: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D11ShaderTraceFactory_Impl::CreateShaderTrace(this, windows_core::from_raw_borrowed(&pshader), core::mem::transmute_copy(&ptracedesc)) { + match ID3D11ShaderTraceFactory_Impl::CreateShaderTrace(this, core::mem::transmute_copy(&pshader), core::mem::transmute_copy(&ptracedesc)) { Ok(ok__) => { ppshadertrace.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12632,7 +12619,7 @@ pub struct ID3D11TracingDevice_Vtbl { } pub trait ID3D11TracingDevice_Impl: windows_core::IUnknownImpl { fn SetShaderTrackingOptionsByType(&self, resourcetypeflags: u32, options: u32) -> windows_core::Result<()>; - fn SetShaderTrackingOptions(&self, pshader: Option<&windows_core::IUnknown>, options: u32) -> windows_core::Result<()>; + fn SetShaderTrackingOptions(&self, pshader: windows_core::Ref<'_, windows_core::IUnknown>, options: u32) -> windows_core::Result<()>; } impl ID3D11TracingDevice_Vtbl { pub const fn new() -> Self { @@ -12642,7 +12629,7 @@ impl ID3D11TracingDevice_Vtbl { } unsafe extern "system" fn SetShaderTrackingOptions(this: *mut core::ffi::c_void, pshader: *mut core::ffi::c_void, options: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11TracingDevice_Impl::SetShaderTrackingOptions(this, windows_core::from_raw_borrowed(&pshader), core::mem::transmute_copy(&options)).into() + ID3D11TracingDevice_Impl::SetShaderTrackingOptions(this, core::mem::transmute_copy(&pshader), core::mem::transmute_copy(&options)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -13225,299 +13212,299 @@ pub struct ID3D11VideoContext_Vtbl { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait ID3D11VideoContext_Impl: ID3D11DeviceChild_Impl { - fn GetDecoderBuffer(&self, pdecoder: Option<&ID3D11VideoDecoder>, r#type: D3D11_VIDEO_DECODER_BUFFER_TYPE, pbuffersize: *mut u32, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn ReleaseDecoderBuffer(&self, pdecoder: Option<&ID3D11VideoDecoder>, r#type: D3D11_VIDEO_DECODER_BUFFER_TYPE) -> windows_core::Result<()>; - fn DecoderBeginFrame(&self, pdecoder: Option<&ID3D11VideoDecoder>, pview: Option<&ID3D11VideoDecoderOutputView>, contentkeysize: u32, pcontentkey: *const core::ffi::c_void) -> windows_core::Result<()>; - fn DecoderEndFrame(&self, pdecoder: Option<&ID3D11VideoDecoder>) -> windows_core::Result<()>; - fn SubmitDecoderBuffers(&self, pdecoder: Option<&ID3D11VideoDecoder>, numbuffers: u32, pbufferdesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC) -> windows_core::Result<()>; - fn DecoderExtension(&self, pdecoder: Option<&ID3D11VideoDecoder>, pextensiondata: *const D3D11_VIDEO_DECODER_EXTENSION) -> i32; - fn VideoProcessorSetOutputTargetRect(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, enable: super::super::Foundation::BOOL, prect: *const super::super::Foundation::RECT); - fn VideoProcessorSetOutputBackgroundColor(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, ycbcr: super::super::Foundation::BOOL, pcolor: *const D3D11_VIDEO_COLOR); - fn VideoProcessorSetOutputColorSpace(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, pcolorspace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE); - fn VideoProcessorSetOutputAlphaFillMode(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, alphafillmode: D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, streamindex: u32); - fn VideoProcessorSetOutputConstriction(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, enable: super::super::Foundation::BOOL, size: &super::super::Foundation::SIZE); - fn VideoProcessorSetOutputStereoMode(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, enable: super::super::Foundation::BOOL); - fn VideoProcessorSetOutputExtension(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> i32; - fn VideoProcessorGetOutputTargetRect(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, enabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT); - fn VideoProcessorGetOutputBackgroundColor(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, pycbcr: *mut super::super::Foundation::BOOL, pcolor: *mut D3D11_VIDEO_COLOR); - fn VideoProcessorGetOutputColorSpace(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, pcolorspace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE); - fn VideoProcessorGetOutputAlphaFillMode(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, palphafillmode: *mut D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, pstreamindex: *mut u32); - fn VideoProcessorGetOutputConstriction(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, penabled: *mut super::super::Foundation::BOOL, psize: *mut super::super::Foundation::SIZE); - fn VideoProcessorGetOutputStereoMode(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, penabled: *mut super::super::Foundation::BOOL); - fn VideoProcessorGetOutputExtension(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *mut core::ffi::c_void) -> i32; - fn VideoProcessorSetStreamFrameFormat(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, frameformat: D3D11_VIDEO_FRAME_FORMAT); - fn VideoProcessorSetStreamColorSpace(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, pcolorspace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE); - fn VideoProcessorSetStreamOutputRate(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, outputrate: D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, repeatframe: super::super::Foundation::BOOL, pcustomrate: *const super::Dxgi::Common::DXGI_RATIONAL); - fn VideoProcessorSetStreamSourceRect(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, prect: *const super::super::Foundation::RECT); - fn VideoProcessorSetStreamDestRect(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, prect: *const super::super::Foundation::RECT); - fn VideoProcessorSetStreamAlpha(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, alpha: f32); - fn VideoProcessorSetStreamPalette(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, count: u32, pentries: *const u32); - fn VideoProcessorSetStreamPixelAspectRatio(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, psourceaspectratio: *const super::Dxgi::Common::DXGI_RATIONAL, pdestinationaspectratio: *const super::Dxgi::Common::DXGI_RATIONAL); - fn VideoProcessorSetStreamLumaKey(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, lower: f32, upper: f32); - fn VideoProcessorSetStreamStereoFormat(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, format: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, leftviewframe0: super::super::Foundation::BOOL, baseviewframe0: super::super::Foundation::BOOL, flipmode: D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, monooffset: i32); - fn VideoProcessorSetStreamAutoProcessingMode(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL); - fn VideoProcessorSetStreamFilter(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, filter: D3D11_VIDEO_PROCESSOR_FILTER, enable: super::super::Foundation::BOOL, level: i32); - fn VideoProcessorSetStreamExtension(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> i32; - fn VideoProcessorGetStreamFrameFormat(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, pframeformat: *mut D3D11_VIDEO_FRAME_FORMAT); - fn VideoProcessorGetStreamColorSpace(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, pcolorspace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE); - fn VideoProcessorGetStreamOutputRate(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, poutputrate: *mut D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, prepeatframe: *mut super::super::Foundation::BOOL, pcustomrate: *mut super::Dxgi::Common::DXGI_RATIONAL); - fn VideoProcessorGetStreamSourceRect(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT); - fn VideoProcessorGetStreamDestRect(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT); - fn VideoProcessorGetStreamAlpha(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, palpha: *mut f32); - fn VideoProcessorGetStreamPalette(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, count: u32, pentries: *mut u32); - fn VideoProcessorGetStreamPixelAspectRatio(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, psourceaspectratio: *mut super::Dxgi::Common::DXGI_RATIONAL, pdestinationaspectratio: *mut super::Dxgi::Common::DXGI_RATIONAL); - fn VideoProcessorGetStreamLumaKey(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, plower: *mut f32, pupper: *mut f32); - fn VideoProcessorGetStreamStereoFormat(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, penable: *mut super::super::Foundation::BOOL, pformat: *mut D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, pleftviewframe0: *mut super::super::Foundation::BOOL, pbaseviewframe0: *mut super::super::Foundation::BOOL, pflipmode: *mut D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, monooffset: *mut i32); - fn VideoProcessorGetStreamAutoProcessingMode(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL); - fn VideoProcessorGetStreamFilter(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, filter: D3D11_VIDEO_PROCESSOR_FILTER, penabled: *mut super::super::Foundation::BOOL, plevel: *mut i32); - fn VideoProcessorGetStreamExtension(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *mut core::ffi::c_void) -> i32; - fn VideoProcessorBlt(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, pview: Option<&ID3D11VideoProcessorOutputView>, outputframe: u32, streamcount: u32, pstreams: *const D3D11_VIDEO_PROCESSOR_STREAM) -> windows_core::Result<()>; - fn NegotiateCryptoSessionKeyExchange(&self, pcryptosession: Option<&ID3D11CryptoSession>, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn EncryptionBlt(&self, pcryptosession: Option<&ID3D11CryptoSession>, psrcsurface: Option<&ID3D11Texture2D>, pdstsurface: Option<&ID3D11Texture2D>, ivsize: u32, piv: *mut core::ffi::c_void); - fn DecryptionBlt(&self, pcryptosession: Option<&ID3D11CryptoSession>, psrcsurface: Option<&ID3D11Texture2D>, pdstsurface: Option<&ID3D11Texture2D>, pencryptedblockinfo: *const D3D11_ENCRYPTED_BLOCK_INFO, contentkeysize: u32, pcontentkey: *const core::ffi::c_void, ivsize: u32, piv: *mut core::ffi::c_void); - fn StartSessionKeyRefresh(&self, pcryptosession: Option<&ID3D11CryptoSession>, randomnumbersize: u32, prandomnumber: *mut core::ffi::c_void); - fn FinishSessionKeyRefresh(&self, pcryptosession: Option<&ID3D11CryptoSession>); - fn GetEncryptionBltKey(&self, pcryptosession: Option<&ID3D11CryptoSession>, keysize: u32, preadbackkey: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn NegotiateAuthenticatedChannelKeyExchange(&self, pchannel: Option<&ID3D11AuthenticatedChannel>, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn QueryAuthenticatedChannel(&self, pchannel: Option<&ID3D11AuthenticatedChannel>, inputsize: u32, pinput: *const core::ffi::c_void, outputsize: u32, poutput: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn ConfigureAuthenticatedChannel(&self, pchannel: Option<&ID3D11AuthenticatedChannel>, inputsize: u32, pinput: *const core::ffi::c_void, poutput: *mut D3D11_AUTHENTICATED_CONFIGURE_OUTPUT) -> windows_core::Result<()>; - fn VideoProcessorSetStreamRotation(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, rotation: D3D11_VIDEO_PROCESSOR_ROTATION); - fn VideoProcessorGetStreamRotation(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, penable: *mut super::super::Foundation::BOOL, protation: *mut D3D11_VIDEO_PROCESSOR_ROTATION); + fn GetDecoderBuffer(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, r#type: D3D11_VIDEO_DECODER_BUFFER_TYPE, pbuffersize: *mut u32, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ReleaseDecoderBuffer(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, r#type: D3D11_VIDEO_DECODER_BUFFER_TYPE) -> windows_core::Result<()>; + fn DecoderBeginFrame(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, pview: windows_core::Ref<'_, ID3D11VideoDecoderOutputView>, contentkeysize: u32, pcontentkey: *const core::ffi::c_void) -> windows_core::Result<()>; + fn DecoderEndFrame(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>) -> windows_core::Result<()>; + fn SubmitDecoderBuffers(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, numbuffers: u32, pbufferdesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC) -> windows_core::Result<()>; + fn DecoderExtension(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, pextensiondata: *const D3D11_VIDEO_DECODER_EXTENSION) -> i32; + fn VideoProcessorSetOutputTargetRect(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, enable: super::super::Foundation::BOOL, prect: *const super::super::Foundation::RECT); + fn VideoProcessorSetOutputBackgroundColor(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, ycbcr: super::super::Foundation::BOOL, pcolor: *const D3D11_VIDEO_COLOR); + fn VideoProcessorSetOutputColorSpace(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, pcolorspace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE); + fn VideoProcessorSetOutputAlphaFillMode(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, alphafillmode: D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, streamindex: u32); + fn VideoProcessorSetOutputConstriction(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, enable: super::super::Foundation::BOOL, size: &super::super::Foundation::SIZE); + fn VideoProcessorSetOutputStereoMode(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, enable: super::super::Foundation::BOOL); + fn VideoProcessorSetOutputExtension(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> i32; + fn VideoProcessorGetOutputTargetRect(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, enabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT); + fn VideoProcessorGetOutputBackgroundColor(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, pycbcr: *mut super::super::Foundation::BOOL, pcolor: *mut D3D11_VIDEO_COLOR); + fn VideoProcessorGetOutputColorSpace(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, pcolorspace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE); + fn VideoProcessorGetOutputAlphaFillMode(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, palphafillmode: *mut D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, pstreamindex: *mut u32); + fn VideoProcessorGetOutputConstriction(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, penabled: *mut super::super::Foundation::BOOL, psize: *mut super::super::Foundation::SIZE); + fn VideoProcessorGetOutputStereoMode(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, penabled: *mut super::super::Foundation::BOOL); + fn VideoProcessorGetOutputExtension(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *mut core::ffi::c_void) -> i32; + fn VideoProcessorSetStreamFrameFormat(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, frameformat: D3D11_VIDEO_FRAME_FORMAT); + fn VideoProcessorSetStreamColorSpace(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, pcolorspace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE); + fn VideoProcessorSetStreamOutputRate(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, outputrate: D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, repeatframe: super::super::Foundation::BOOL, pcustomrate: *const super::Dxgi::Common::DXGI_RATIONAL); + fn VideoProcessorSetStreamSourceRect(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, prect: *const super::super::Foundation::RECT); + fn VideoProcessorSetStreamDestRect(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, prect: *const super::super::Foundation::RECT); + fn VideoProcessorSetStreamAlpha(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, alpha: f32); + fn VideoProcessorSetStreamPalette(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, count: u32, pentries: *const u32); + fn VideoProcessorSetStreamPixelAspectRatio(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, psourceaspectratio: *const super::Dxgi::Common::DXGI_RATIONAL, pdestinationaspectratio: *const super::Dxgi::Common::DXGI_RATIONAL); + fn VideoProcessorSetStreamLumaKey(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, lower: f32, upper: f32); + fn VideoProcessorSetStreamStereoFormat(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, format: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, leftviewframe0: super::super::Foundation::BOOL, baseviewframe0: super::super::Foundation::BOOL, flipmode: D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, monooffset: i32); + fn VideoProcessorSetStreamAutoProcessingMode(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL); + fn VideoProcessorSetStreamFilter(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, filter: D3D11_VIDEO_PROCESSOR_FILTER, enable: super::super::Foundation::BOOL, level: i32); + fn VideoProcessorSetStreamExtension(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> i32; + fn VideoProcessorGetStreamFrameFormat(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, pframeformat: *mut D3D11_VIDEO_FRAME_FORMAT); + fn VideoProcessorGetStreamColorSpace(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, pcolorspace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE); + fn VideoProcessorGetStreamOutputRate(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, poutputrate: *mut D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, prepeatframe: *mut super::super::Foundation::BOOL, pcustomrate: *mut super::Dxgi::Common::DXGI_RATIONAL); + fn VideoProcessorGetStreamSourceRect(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT); + fn VideoProcessorGetStreamDestRect(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT); + fn VideoProcessorGetStreamAlpha(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, palpha: *mut f32); + fn VideoProcessorGetStreamPalette(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, count: u32, pentries: *mut u32); + fn VideoProcessorGetStreamPixelAspectRatio(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, psourceaspectratio: *mut super::Dxgi::Common::DXGI_RATIONAL, pdestinationaspectratio: *mut super::Dxgi::Common::DXGI_RATIONAL); + fn VideoProcessorGetStreamLumaKey(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, plower: *mut f32, pupper: *mut f32); + fn VideoProcessorGetStreamStereoFormat(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, penable: *mut super::super::Foundation::BOOL, pformat: *mut D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, pleftviewframe0: *mut super::super::Foundation::BOOL, pbaseviewframe0: *mut super::super::Foundation::BOOL, pflipmode: *mut D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, monooffset: *mut i32); + fn VideoProcessorGetStreamAutoProcessingMode(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, penabled: *mut super::super::Foundation::BOOL); + fn VideoProcessorGetStreamFilter(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, filter: D3D11_VIDEO_PROCESSOR_FILTER, penabled: *mut super::super::Foundation::BOOL, plevel: *mut i32); + fn VideoProcessorGetStreamExtension(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *mut core::ffi::c_void) -> i32; + fn VideoProcessorBlt(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, pview: windows_core::Ref<'_, ID3D11VideoProcessorOutputView>, outputframe: u32, streamcount: u32, pstreams: *const D3D11_VIDEO_PROCESSOR_STREAM) -> windows_core::Result<()>; + fn NegotiateCryptoSessionKeyExchange(&self, pcryptosession: windows_core::Ref<'_, ID3D11CryptoSession>, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn EncryptionBlt(&self, pcryptosession: windows_core::Ref<'_, ID3D11CryptoSession>, psrcsurface: windows_core::Ref<'_, ID3D11Texture2D>, pdstsurface: windows_core::Ref<'_, ID3D11Texture2D>, ivsize: u32, piv: *mut core::ffi::c_void); + fn DecryptionBlt(&self, pcryptosession: windows_core::Ref<'_, ID3D11CryptoSession>, psrcsurface: windows_core::Ref<'_, ID3D11Texture2D>, pdstsurface: windows_core::Ref<'_, ID3D11Texture2D>, pencryptedblockinfo: *const D3D11_ENCRYPTED_BLOCK_INFO, contentkeysize: u32, pcontentkey: *const core::ffi::c_void, ivsize: u32, piv: *mut core::ffi::c_void); + fn StartSessionKeyRefresh(&self, pcryptosession: windows_core::Ref<'_, ID3D11CryptoSession>, randomnumbersize: u32, prandomnumber: *mut core::ffi::c_void); + fn FinishSessionKeyRefresh(&self, pcryptosession: windows_core::Ref<'_, ID3D11CryptoSession>); + fn GetEncryptionBltKey(&self, pcryptosession: windows_core::Ref<'_, ID3D11CryptoSession>, keysize: u32, preadbackkey: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn NegotiateAuthenticatedChannelKeyExchange(&self, pchannel: windows_core::Ref<'_, ID3D11AuthenticatedChannel>, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn QueryAuthenticatedChannel(&self, pchannel: windows_core::Ref<'_, ID3D11AuthenticatedChannel>, inputsize: u32, pinput: *const core::ffi::c_void, outputsize: u32, poutput: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ConfigureAuthenticatedChannel(&self, pchannel: windows_core::Ref<'_, ID3D11AuthenticatedChannel>, inputsize: u32, pinput: *const core::ffi::c_void, poutput: *mut D3D11_AUTHENTICATED_CONFIGURE_OUTPUT) -> windows_core::Result<()>; + fn VideoProcessorSetStreamRotation(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, rotation: D3D11_VIDEO_PROCESSOR_ROTATION); + fn VideoProcessorGetStreamRotation(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, penable: *mut super::super::Foundation::BOOL, protation: *mut D3D11_VIDEO_PROCESSOR_ROTATION); } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl ID3D11VideoContext_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetDecoderBuffer(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, r#type: D3D11_VIDEO_DECODER_BUFFER_TYPE, pbuffersize: *mut u32, ppbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::GetDecoderBuffer(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&pbuffersize), core::mem::transmute_copy(&ppbuffer)).into() + ID3D11VideoContext_Impl::GetDecoderBuffer(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&pbuffersize), core::mem::transmute_copy(&ppbuffer)).into() } unsafe extern "system" fn ReleaseDecoderBuffer(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, r#type: D3D11_VIDEO_DECODER_BUFFER_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::ReleaseDecoderBuffer(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&r#type)).into() + ID3D11VideoContext_Impl::ReleaseDecoderBuffer(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&r#type)).into() } unsafe extern "system" fn DecoderBeginFrame(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, pview: *mut core::ffi::c_void, contentkeysize: u32, pcontentkey: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::DecoderBeginFrame(this, windows_core::from_raw_borrowed(&pdecoder), windows_core::from_raw_borrowed(&pview), core::mem::transmute_copy(&contentkeysize), core::mem::transmute_copy(&pcontentkey)).into() + ID3D11VideoContext_Impl::DecoderBeginFrame(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&pview), core::mem::transmute_copy(&contentkeysize), core::mem::transmute_copy(&pcontentkey)).into() } unsafe extern "system" fn DecoderEndFrame(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::DecoderEndFrame(this, windows_core::from_raw_borrowed(&pdecoder)).into() + ID3D11VideoContext_Impl::DecoderEndFrame(this, core::mem::transmute_copy(&pdecoder)).into() } unsafe extern "system" fn SubmitDecoderBuffers(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, numbuffers: u32, pbufferdesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::SubmitDecoderBuffers(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&numbuffers), core::mem::transmute_copy(&pbufferdesc)).into() + ID3D11VideoContext_Impl::SubmitDecoderBuffers(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&numbuffers), core::mem::transmute_copy(&pbufferdesc)).into() } unsafe extern "system" fn DecoderExtension(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, pextensiondata: *const D3D11_VIDEO_DECODER_EXTENSION) -> i32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::DecoderExtension(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&pextensiondata)) + ID3D11VideoContext_Impl::DecoderExtension(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&pextensiondata)) } unsafe extern "system" fn VideoProcessorSetOutputTargetRect(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, enable: super::super::Foundation::BOOL, prect: *const super::super::Foundation::RECT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetOutputTargetRect(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&prect)) + ID3D11VideoContext_Impl::VideoProcessorSetOutputTargetRect(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&prect)) } unsafe extern "system" fn VideoProcessorSetOutputBackgroundColor(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, ycbcr: super::super::Foundation::BOOL, pcolor: *const D3D11_VIDEO_COLOR) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetOutputBackgroundColor(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&ycbcr), core::mem::transmute_copy(&pcolor)) + ID3D11VideoContext_Impl::VideoProcessorSetOutputBackgroundColor(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&ycbcr), core::mem::transmute_copy(&pcolor)) } unsafe extern "system" fn VideoProcessorSetOutputColorSpace(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, pcolorspace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetOutputColorSpace(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&pcolorspace)) + ID3D11VideoContext_Impl::VideoProcessorSetOutputColorSpace(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&pcolorspace)) } unsafe extern "system" fn VideoProcessorSetOutputAlphaFillMode(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, alphafillmode: D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, streamindex: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetOutputAlphaFillMode(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&alphafillmode), core::mem::transmute_copy(&streamindex)) + ID3D11VideoContext_Impl::VideoProcessorSetOutputAlphaFillMode(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&alphafillmode), core::mem::transmute_copy(&streamindex)) } unsafe extern "system" fn VideoProcessorSetOutputConstriction(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, enable: super::super::Foundation::BOOL, size: super::super::Foundation::SIZE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetOutputConstriction(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&enable), core::mem::transmute(&size)) + ID3D11VideoContext_Impl::VideoProcessorSetOutputConstriction(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&enable), core::mem::transmute(&size)) } unsafe extern "system" fn VideoProcessorSetOutputStereoMode(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, enable: super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetOutputStereoMode(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&enable)) + ID3D11VideoContext_Impl::VideoProcessorSetOutputStereoMode(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&enable)) } unsafe extern "system" fn VideoProcessorSetOutputExtension(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> i32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetOutputExtension(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&pextensionguid), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)) + ID3D11VideoContext_Impl::VideoProcessorSetOutputExtension(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&pextensionguid), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)) } unsafe extern "system" fn VideoProcessorGetOutputTargetRect(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, enabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetOutputTargetRect(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&enabled), core::mem::transmute_copy(&prect)) + ID3D11VideoContext_Impl::VideoProcessorGetOutputTargetRect(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&enabled), core::mem::transmute_copy(&prect)) } unsafe extern "system" fn VideoProcessorGetOutputBackgroundColor(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, pycbcr: *mut super::super::Foundation::BOOL, pcolor: *mut D3D11_VIDEO_COLOR) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetOutputBackgroundColor(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&pycbcr), core::mem::transmute_copy(&pcolor)) + ID3D11VideoContext_Impl::VideoProcessorGetOutputBackgroundColor(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&pycbcr), core::mem::transmute_copy(&pcolor)) } unsafe extern "system" fn VideoProcessorGetOutputColorSpace(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, pcolorspace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetOutputColorSpace(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&pcolorspace)) + ID3D11VideoContext_Impl::VideoProcessorGetOutputColorSpace(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&pcolorspace)) } unsafe extern "system" fn VideoProcessorGetOutputAlphaFillMode(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, palphafillmode: *mut D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE, pstreamindex: *mut u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetOutputAlphaFillMode(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&palphafillmode), core::mem::transmute_copy(&pstreamindex)) + ID3D11VideoContext_Impl::VideoProcessorGetOutputAlphaFillMode(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&palphafillmode), core::mem::transmute_copy(&pstreamindex)) } unsafe extern "system" fn VideoProcessorGetOutputConstriction(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, penabled: *mut super::super::Foundation::BOOL, psize: *mut super::super::Foundation::SIZE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetOutputConstriction(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&psize)) + ID3D11VideoContext_Impl::VideoProcessorGetOutputConstriction(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&psize)) } unsafe extern "system" fn VideoProcessorGetOutputStereoMode(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, penabled: *mut super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetOutputStereoMode(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&penabled)) + ID3D11VideoContext_Impl::VideoProcessorGetOutputStereoMode(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&penabled)) } unsafe extern "system" fn VideoProcessorGetOutputExtension(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *mut core::ffi::c_void) -> i32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetOutputExtension(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&pextensionguid), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)) + ID3D11VideoContext_Impl::VideoProcessorGetOutputExtension(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&pextensionguid), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)) } unsafe extern "system" fn VideoProcessorSetStreamFrameFormat(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, frameformat: D3D11_VIDEO_FRAME_FORMAT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamFrameFormat(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&frameformat)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamFrameFormat(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&frameformat)) } unsafe extern "system" fn VideoProcessorSetStreamColorSpace(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, pcolorspace: *const D3D11_VIDEO_PROCESSOR_COLOR_SPACE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamColorSpace(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pcolorspace)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamColorSpace(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pcolorspace)) } unsafe extern "system" fn VideoProcessorSetStreamOutputRate(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, outputrate: D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, repeatframe: super::super::Foundation::BOOL, pcustomrate: *const super::Dxgi::Common::DXGI_RATIONAL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamOutputRate(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&outputrate), core::mem::transmute_copy(&repeatframe), core::mem::transmute_copy(&pcustomrate)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamOutputRate(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&outputrate), core::mem::transmute_copy(&repeatframe), core::mem::transmute_copy(&pcustomrate)) } unsafe extern "system" fn VideoProcessorSetStreamSourceRect(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, enable: super::super::Foundation::BOOL, prect: *const super::super::Foundation::RECT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamSourceRect(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&prect)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamSourceRect(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&prect)) } unsafe extern "system" fn VideoProcessorSetStreamDestRect(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, enable: super::super::Foundation::BOOL, prect: *const super::super::Foundation::RECT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamDestRect(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&prect)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamDestRect(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&prect)) } unsafe extern "system" fn VideoProcessorSetStreamAlpha(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, enable: super::super::Foundation::BOOL, alpha: f32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamAlpha(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&alpha)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamAlpha(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&alpha)) } unsafe extern "system" fn VideoProcessorSetStreamPalette(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, count: u32, pentries: *const u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamPalette(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&count), core::mem::transmute_copy(&pentries)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamPalette(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&count), core::mem::transmute_copy(&pentries)) } unsafe extern "system" fn VideoProcessorSetStreamPixelAspectRatio(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, enable: super::super::Foundation::BOOL, psourceaspectratio: *const super::Dxgi::Common::DXGI_RATIONAL, pdestinationaspectratio: *const super::Dxgi::Common::DXGI_RATIONAL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamPixelAspectRatio(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&psourceaspectratio), core::mem::transmute_copy(&pdestinationaspectratio)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamPixelAspectRatio(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&psourceaspectratio), core::mem::transmute_copy(&pdestinationaspectratio)) } unsafe extern "system" fn VideoProcessorSetStreamLumaKey(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, enable: super::super::Foundation::BOOL, lower: f32, upper: f32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamLumaKey(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&lower), core::mem::transmute_copy(&upper)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamLumaKey(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&lower), core::mem::transmute_copy(&upper)) } unsafe extern "system" fn VideoProcessorSetStreamStereoFormat(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, enable: super::super::Foundation::BOOL, format: D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, leftviewframe0: super::super::Foundation::BOOL, baseviewframe0: super::super::Foundation::BOOL, flipmode: D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, monooffset: i32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamStereoFormat(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&format), core::mem::transmute_copy(&leftviewframe0), core::mem::transmute_copy(&baseviewframe0), core::mem::transmute_copy(&flipmode), core::mem::transmute_copy(&monooffset)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamStereoFormat(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&format), core::mem::transmute_copy(&leftviewframe0), core::mem::transmute_copy(&baseviewframe0), core::mem::transmute_copy(&flipmode), core::mem::transmute_copy(&monooffset)) } unsafe extern "system" fn VideoProcessorSetStreamAutoProcessingMode(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, enable: super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamAutoProcessingMode(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamAutoProcessingMode(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable)) } unsafe extern "system" fn VideoProcessorSetStreamFilter(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, filter: D3D11_VIDEO_PROCESSOR_FILTER, enable: super::super::Foundation::BOOL, level: i32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamFilter(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&filter), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&level)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamFilter(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&filter), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&level)) } unsafe extern "system" fn VideoProcessorSetStreamExtension(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> i32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamExtension(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pextensionguid), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamExtension(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pextensionguid), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)) } unsafe extern "system" fn VideoProcessorGetStreamFrameFormat(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, pframeformat: *mut D3D11_VIDEO_FRAME_FORMAT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamFrameFormat(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pframeformat)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamFrameFormat(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pframeformat)) } unsafe extern "system" fn VideoProcessorGetStreamColorSpace(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, pcolorspace: *mut D3D11_VIDEO_PROCESSOR_COLOR_SPACE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamColorSpace(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pcolorspace)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamColorSpace(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pcolorspace)) } unsafe extern "system" fn VideoProcessorGetStreamOutputRate(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, poutputrate: *mut D3D11_VIDEO_PROCESSOR_OUTPUT_RATE, prepeatframe: *mut super::super::Foundation::BOOL, pcustomrate: *mut super::Dxgi::Common::DXGI_RATIONAL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamOutputRate(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&poutputrate), core::mem::transmute_copy(&prepeatframe), core::mem::transmute_copy(&pcustomrate)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamOutputRate(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&poutputrate), core::mem::transmute_copy(&prepeatframe), core::mem::transmute_copy(&pcustomrate)) } unsafe extern "system" fn VideoProcessorGetStreamSourceRect(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamSourceRect(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&prect)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamSourceRect(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&prect)) } unsafe extern "system" fn VideoProcessorGetStreamDestRect(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, prect: *mut super::super::Foundation::RECT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamDestRect(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&prect)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamDestRect(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&prect)) } unsafe extern "system" fn VideoProcessorGetStreamAlpha(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, palpha: *mut f32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamAlpha(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&palpha)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamAlpha(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&palpha)) } unsafe extern "system" fn VideoProcessorGetStreamPalette(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, count: u32, pentries: *mut u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamPalette(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&count), core::mem::transmute_copy(&pentries)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamPalette(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&count), core::mem::transmute_copy(&pentries)) } unsafe extern "system" fn VideoProcessorGetStreamPixelAspectRatio(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, psourceaspectratio: *mut super::Dxgi::Common::DXGI_RATIONAL, pdestinationaspectratio: *mut super::Dxgi::Common::DXGI_RATIONAL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamPixelAspectRatio(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&psourceaspectratio), core::mem::transmute_copy(&pdestinationaspectratio)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamPixelAspectRatio(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&psourceaspectratio), core::mem::transmute_copy(&pdestinationaspectratio)) } unsafe extern "system" fn VideoProcessorGetStreamLumaKey(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, penabled: *mut super::super::Foundation::BOOL, plower: *mut f32, pupper: *mut f32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamLumaKey(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&plower), core::mem::transmute_copy(&pupper)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamLumaKey(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&plower), core::mem::transmute_copy(&pupper)) } unsafe extern "system" fn VideoProcessorGetStreamStereoFormat(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, penable: *mut super::super::Foundation::BOOL, pformat: *mut D3D11_VIDEO_PROCESSOR_STEREO_FORMAT, pleftviewframe0: *mut super::super::Foundation::BOOL, pbaseviewframe0: *mut super::super::Foundation::BOOL, pflipmode: *mut D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE, monooffset: *mut i32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamStereoFormat(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penable), core::mem::transmute_copy(&pformat), core::mem::transmute_copy(&pleftviewframe0), core::mem::transmute_copy(&pbaseviewframe0), core::mem::transmute_copy(&pflipmode), core::mem::transmute_copy(&monooffset)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamStereoFormat(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penable), core::mem::transmute_copy(&pformat), core::mem::transmute_copy(&pleftviewframe0), core::mem::transmute_copy(&pbaseviewframe0), core::mem::transmute_copy(&pflipmode), core::mem::transmute_copy(&monooffset)) } unsafe extern "system" fn VideoProcessorGetStreamAutoProcessingMode(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, penabled: *mut super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamAutoProcessingMode(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamAutoProcessingMode(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penabled)) } unsafe extern "system" fn VideoProcessorGetStreamFilter(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, filter: D3D11_VIDEO_PROCESSOR_FILTER, penabled: *mut super::super::Foundation::BOOL, plevel: *mut i32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamFilter(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&filter), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&plevel)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamFilter(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&filter), core::mem::transmute_copy(&penabled), core::mem::transmute_copy(&plevel)) } unsafe extern "system" fn VideoProcessorGetStreamExtension(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, pextensionguid: *const windows_core::GUID, datasize: u32, pdata: *mut core::ffi::c_void) -> i32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamExtension(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pextensionguid), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamExtension(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pextensionguid), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)) } unsafe extern "system" fn VideoProcessorBlt(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, pview: *mut core::ffi::c_void, outputframe: u32, streamcount: u32, pstreams: *const D3D11_VIDEO_PROCESSOR_STREAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorBlt(this, windows_core::from_raw_borrowed(&pvideoprocessor), windows_core::from_raw_borrowed(&pview), core::mem::transmute_copy(&outputframe), core::mem::transmute_copy(&streamcount), core::mem::transmute_copy(&pstreams)).into() + ID3D11VideoContext_Impl::VideoProcessorBlt(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&pview), core::mem::transmute_copy(&outputframe), core::mem::transmute_copy(&streamcount), core::mem::transmute_copy(&pstreams)).into() } unsafe extern "system" fn NegotiateCryptoSessionKeyExchange(this: *mut core::ffi::c_void, pcryptosession: *mut core::ffi::c_void, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::NegotiateCryptoSessionKeyExchange(this, windows_core::from_raw_borrowed(&pcryptosession), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into() + ID3D11VideoContext_Impl::NegotiateCryptoSessionKeyExchange(this, core::mem::transmute_copy(&pcryptosession), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into() } unsafe extern "system" fn EncryptionBlt(this: *mut core::ffi::c_void, pcryptosession: *mut core::ffi::c_void, psrcsurface: *mut core::ffi::c_void, pdstsurface: *mut core::ffi::c_void, ivsize: u32, piv: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::EncryptionBlt(this, windows_core::from_raw_borrowed(&pcryptosession), windows_core::from_raw_borrowed(&psrcsurface), windows_core::from_raw_borrowed(&pdstsurface), core::mem::transmute_copy(&ivsize), core::mem::transmute_copy(&piv)) + ID3D11VideoContext_Impl::EncryptionBlt(this, core::mem::transmute_copy(&pcryptosession), core::mem::transmute_copy(&psrcsurface), core::mem::transmute_copy(&pdstsurface), core::mem::transmute_copy(&ivsize), core::mem::transmute_copy(&piv)) } unsafe extern "system" fn DecryptionBlt(this: *mut core::ffi::c_void, pcryptosession: *mut core::ffi::c_void, psrcsurface: *mut core::ffi::c_void, pdstsurface: *mut core::ffi::c_void, pencryptedblockinfo: *const D3D11_ENCRYPTED_BLOCK_INFO, contentkeysize: u32, pcontentkey: *const core::ffi::c_void, ivsize: u32, piv: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::DecryptionBlt(this, windows_core::from_raw_borrowed(&pcryptosession), windows_core::from_raw_borrowed(&psrcsurface), windows_core::from_raw_borrowed(&pdstsurface), core::mem::transmute_copy(&pencryptedblockinfo), core::mem::transmute_copy(&contentkeysize), core::mem::transmute_copy(&pcontentkey), core::mem::transmute_copy(&ivsize), core::mem::transmute_copy(&piv)) + ID3D11VideoContext_Impl::DecryptionBlt(this, core::mem::transmute_copy(&pcryptosession), core::mem::transmute_copy(&psrcsurface), core::mem::transmute_copy(&pdstsurface), core::mem::transmute_copy(&pencryptedblockinfo), core::mem::transmute_copy(&contentkeysize), core::mem::transmute_copy(&pcontentkey), core::mem::transmute_copy(&ivsize), core::mem::transmute_copy(&piv)) } unsafe extern "system" fn StartSessionKeyRefresh(this: *mut core::ffi::c_void, pcryptosession: *mut core::ffi::c_void, randomnumbersize: u32, prandomnumber: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::StartSessionKeyRefresh(this, windows_core::from_raw_borrowed(&pcryptosession), core::mem::transmute_copy(&randomnumbersize), core::mem::transmute_copy(&prandomnumber)) + ID3D11VideoContext_Impl::StartSessionKeyRefresh(this, core::mem::transmute_copy(&pcryptosession), core::mem::transmute_copy(&randomnumbersize), core::mem::transmute_copy(&prandomnumber)) } unsafe extern "system" fn FinishSessionKeyRefresh(this: *mut core::ffi::c_void, pcryptosession: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::FinishSessionKeyRefresh(this, windows_core::from_raw_borrowed(&pcryptosession)) + ID3D11VideoContext_Impl::FinishSessionKeyRefresh(this, core::mem::transmute_copy(&pcryptosession)) } unsafe extern "system" fn GetEncryptionBltKey(this: *mut core::ffi::c_void, pcryptosession: *mut core::ffi::c_void, keysize: u32, preadbackkey: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::GetEncryptionBltKey(this, windows_core::from_raw_borrowed(&pcryptosession), core::mem::transmute_copy(&keysize), core::mem::transmute_copy(&preadbackkey)).into() + ID3D11VideoContext_Impl::GetEncryptionBltKey(this, core::mem::transmute_copy(&pcryptosession), core::mem::transmute_copy(&keysize), core::mem::transmute_copy(&preadbackkey)).into() } unsafe extern "system" fn NegotiateAuthenticatedChannelKeyExchange(this: *mut core::ffi::c_void, pchannel: *mut core::ffi::c_void, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::NegotiateAuthenticatedChannelKeyExchange(this, windows_core::from_raw_borrowed(&pchannel), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into() + ID3D11VideoContext_Impl::NegotiateAuthenticatedChannelKeyExchange(this, core::mem::transmute_copy(&pchannel), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into() } unsafe extern "system" fn QueryAuthenticatedChannel(this: *mut core::ffi::c_void, pchannel: *mut core::ffi::c_void, inputsize: u32, pinput: *const core::ffi::c_void, outputsize: u32, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::QueryAuthenticatedChannel(this, windows_core::from_raw_borrowed(&pchannel), core::mem::transmute_copy(&inputsize), core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&outputsize), core::mem::transmute_copy(&poutput)).into() + ID3D11VideoContext_Impl::QueryAuthenticatedChannel(this, core::mem::transmute_copy(&pchannel), core::mem::transmute_copy(&inputsize), core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&outputsize), core::mem::transmute_copy(&poutput)).into() } unsafe extern "system" fn ConfigureAuthenticatedChannel(this: *mut core::ffi::c_void, pchannel: *mut core::ffi::c_void, inputsize: u32, pinput: *const core::ffi::c_void, poutput: *mut D3D11_AUTHENTICATED_CONFIGURE_OUTPUT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::ConfigureAuthenticatedChannel(this, windows_core::from_raw_borrowed(&pchannel), core::mem::transmute_copy(&inputsize), core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&poutput)).into() + ID3D11VideoContext_Impl::ConfigureAuthenticatedChannel(this, core::mem::transmute_copy(&pchannel), core::mem::transmute_copy(&inputsize), core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&poutput)).into() } unsafe extern "system" fn VideoProcessorSetStreamRotation(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, enable: super::super::Foundation::BOOL, rotation: D3D11_VIDEO_PROCESSOR_ROTATION) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorSetStreamRotation(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&rotation)) + ID3D11VideoContext_Impl::VideoProcessorSetStreamRotation(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&rotation)) } unsafe extern "system" fn VideoProcessorGetStreamRotation(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, penable: *mut super::super::Foundation::BOOL, protation: *mut D3D11_VIDEO_PROCESSOR_ROTATION) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext_Impl::VideoProcessorGetStreamRotation(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penable), core::mem::transmute_copy(&protation)) + ID3D11VideoContext_Impl::VideoProcessorGetStreamRotation(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penable), core::mem::transmute_copy(&protation)) } Self { base__: ID3D11DeviceChild_Vtbl::new::(), @@ -13742,31 +13729,31 @@ pub struct ID3D11VideoContext1_Vtbl { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait ID3D11VideoContext1_Impl: ID3D11VideoContext_Impl { - fn SubmitDecoderBuffers1(&self, pdecoder: Option<&ID3D11VideoDecoder>, numbuffers: u32, pbufferdesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC1) -> windows_core::Result<()>; - fn GetDataForNewHardwareKey(&self, pcryptosession: Option<&ID3D11CryptoSession>, privateinputsize: u32, pprivatinputdata: *const core::ffi::c_void) -> windows_core::Result; - fn CheckCryptoSessionStatus(&self, pcryptosession: Option<&ID3D11CryptoSession>) -> windows_core::Result; - fn DecoderEnableDownsampling(&self, pdecoder: Option<&ID3D11VideoDecoder>, inputcolorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, poutputdesc: *const D3D11_VIDEO_SAMPLE_DESC, referenceframecount: u32) -> windows_core::Result<()>; - fn DecoderUpdateDownsampling(&self, pdecoder: Option<&ID3D11VideoDecoder>, poutputdesc: *const D3D11_VIDEO_SAMPLE_DESC) -> windows_core::Result<()>; - fn VideoProcessorSetOutputColorSpace1(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE); - fn VideoProcessorSetOutputShaderUsage(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, shaderusage: super::super::Foundation::BOOL); - fn VideoProcessorGetOutputColorSpace1(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, pcolorspace: *mut super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE); - fn VideoProcessorGetOutputShaderUsage(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, pshaderusage: *mut super::super::Foundation::BOOL); - fn VideoProcessorSetStreamColorSpace1(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE); - fn VideoProcessorSetStreamMirror(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, fliphorizontal: super::super::Foundation::BOOL, flipvertical: super::super::Foundation::BOOL); - fn VideoProcessorGetStreamColorSpace1(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, pcolorspace: *mut super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE); - fn VideoProcessorGetStreamMirror(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, penable: *mut super::super::Foundation::BOOL, pfliphorizontal: *mut super::super::Foundation::BOOL, pflipvertical: *mut super::super::Foundation::BOOL); - fn VideoProcessorGetBehaviorHints(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, outputwidth: u32, outputheight: u32, outputformat: super::Dxgi::Common::DXGI_FORMAT, streamcount: u32, pstreams: *const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT) -> windows_core::Result; + fn SubmitDecoderBuffers1(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, numbuffers: u32, pbufferdesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC1) -> windows_core::Result<()>; + fn GetDataForNewHardwareKey(&self, pcryptosession: windows_core::Ref<'_, ID3D11CryptoSession>, privateinputsize: u32, pprivatinputdata: *const core::ffi::c_void) -> windows_core::Result; + fn CheckCryptoSessionStatus(&self, pcryptosession: windows_core::Ref<'_, ID3D11CryptoSession>) -> windows_core::Result; + fn DecoderEnableDownsampling(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, inputcolorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, poutputdesc: *const D3D11_VIDEO_SAMPLE_DESC, referenceframecount: u32) -> windows_core::Result<()>; + fn DecoderUpdateDownsampling(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, poutputdesc: *const D3D11_VIDEO_SAMPLE_DESC) -> windows_core::Result<()>; + fn VideoProcessorSetOutputColorSpace1(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE); + fn VideoProcessorSetOutputShaderUsage(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, shaderusage: super::super::Foundation::BOOL); + fn VideoProcessorGetOutputColorSpace1(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, pcolorspace: *mut super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE); + fn VideoProcessorGetOutputShaderUsage(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, pshaderusage: *mut super::super::Foundation::BOOL); + fn VideoProcessorSetStreamColorSpace1(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE); + fn VideoProcessorSetStreamMirror(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, enable: super::super::Foundation::BOOL, fliphorizontal: super::super::Foundation::BOOL, flipvertical: super::super::Foundation::BOOL); + fn VideoProcessorGetStreamColorSpace1(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, pcolorspace: *mut super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE); + fn VideoProcessorGetStreamMirror(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, penable: *mut super::super::Foundation::BOOL, pfliphorizontal: *mut super::super::Foundation::BOOL, pflipvertical: *mut super::super::Foundation::BOOL); + fn VideoProcessorGetBehaviorHints(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, outputwidth: u32, outputheight: u32, outputformat: super::Dxgi::Common::DXGI_FORMAT, streamcount: u32, pstreams: *const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl ID3D11VideoContext1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SubmitDecoderBuffers1(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, numbuffers: u32, pbufferdesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC1) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::SubmitDecoderBuffers1(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&numbuffers), core::mem::transmute_copy(&pbufferdesc)).into() + ID3D11VideoContext1_Impl::SubmitDecoderBuffers1(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&numbuffers), core::mem::transmute_copy(&pbufferdesc)).into() } unsafe extern "system" fn GetDataForNewHardwareKey(this: *mut core::ffi::c_void, pcryptosession: *mut core::ffi::c_void, privateinputsize: u32, pprivatinputdata: *const core::ffi::c_void, pprivateoutputdata: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D11VideoContext1_Impl::GetDataForNewHardwareKey(this, windows_core::from_raw_borrowed(&pcryptosession), core::mem::transmute_copy(&privateinputsize), core::mem::transmute_copy(&pprivatinputdata)) { + match ID3D11VideoContext1_Impl::GetDataForNewHardwareKey(this, core::mem::transmute_copy(&pcryptosession), core::mem::transmute_copy(&privateinputsize), core::mem::transmute_copy(&pprivatinputdata)) { Ok(ok__) => { pprivateoutputdata.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -13776,7 +13763,7 @@ impl ID3D11VideoContext1_Vtbl { } unsafe extern "system" fn CheckCryptoSessionStatus(this: *mut core::ffi::c_void, pcryptosession: *mut core::ffi::c_void, pstatus: *mut D3D11_CRYPTO_SESSION_STATUS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D11VideoContext1_Impl::CheckCryptoSessionStatus(this, windows_core::from_raw_borrowed(&pcryptosession)) { + match ID3D11VideoContext1_Impl::CheckCryptoSessionStatus(this, core::mem::transmute_copy(&pcryptosession)) { Ok(ok__) => { pstatus.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -13786,47 +13773,47 @@ impl ID3D11VideoContext1_Vtbl { } unsafe extern "system" fn DecoderEnableDownsampling(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, inputcolorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, poutputdesc: *const D3D11_VIDEO_SAMPLE_DESC, referenceframecount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::DecoderEnableDownsampling(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&inputcolorspace), core::mem::transmute_copy(&poutputdesc), core::mem::transmute_copy(&referenceframecount)).into() + ID3D11VideoContext1_Impl::DecoderEnableDownsampling(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&inputcolorspace), core::mem::transmute_copy(&poutputdesc), core::mem::transmute_copy(&referenceframecount)).into() } unsafe extern "system" fn DecoderUpdateDownsampling(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, poutputdesc: *const D3D11_VIDEO_SAMPLE_DESC) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::DecoderUpdateDownsampling(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&poutputdesc)).into() + ID3D11VideoContext1_Impl::DecoderUpdateDownsampling(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&poutputdesc)).into() } unsafe extern "system" fn VideoProcessorSetOutputColorSpace1(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::VideoProcessorSetOutputColorSpace1(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&colorspace)) + ID3D11VideoContext1_Impl::VideoProcessorSetOutputColorSpace1(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&colorspace)) } unsafe extern "system" fn VideoProcessorSetOutputShaderUsage(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, shaderusage: super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::VideoProcessorSetOutputShaderUsage(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&shaderusage)) + ID3D11VideoContext1_Impl::VideoProcessorSetOutputShaderUsage(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&shaderusage)) } unsafe extern "system" fn VideoProcessorGetOutputColorSpace1(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, pcolorspace: *mut super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::VideoProcessorGetOutputColorSpace1(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&pcolorspace)) + ID3D11VideoContext1_Impl::VideoProcessorGetOutputColorSpace1(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&pcolorspace)) } unsafe extern "system" fn VideoProcessorGetOutputShaderUsage(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, pshaderusage: *mut super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::VideoProcessorGetOutputShaderUsage(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&pshaderusage)) + ID3D11VideoContext1_Impl::VideoProcessorGetOutputShaderUsage(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&pshaderusage)) } unsafe extern "system" fn VideoProcessorSetStreamColorSpace1(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::VideoProcessorSetStreamColorSpace1(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&colorspace)) + ID3D11VideoContext1_Impl::VideoProcessorSetStreamColorSpace1(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&colorspace)) } unsafe extern "system" fn VideoProcessorSetStreamMirror(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, enable: super::super::Foundation::BOOL, fliphorizontal: super::super::Foundation::BOOL, flipvertical: super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::VideoProcessorSetStreamMirror(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&fliphorizontal), core::mem::transmute_copy(&flipvertical)) + ID3D11VideoContext1_Impl::VideoProcessorSetStreamMirror(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&enable), core::mem::transmute_copy(&fliphorizontal), core::mem::transmute_copy(&flipvertical)) } unsafe extern "system" fn VideoProcessorGetStreamColorSpace1(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, pcolorspace: *mut super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::VideoProcessorGetStreamColorSpace1(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pcolorspace)) + ID3D11VideoContext1_Impl::VideoProcessorGetStreamColorSpace1(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&pcolorspace)) } unsafe extern "system" fn VideoProcessorGetStreamMirror(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, penable: *mut super::super::Foundation::BOOL, pfliphorizontal: *mut super::super::Foundation::BOOL, pflipvertical: *mut super::super::Foundation::BOOL) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext1_Impl::VideoProcessorGetStreamMirror(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penable), core::mem::transmute_copy(&pfliphorizontal), core::mem::transmute_copy(&pflipvertical)) + ID3D11VideoContext1_Impl::VideoProcessorGetStreamMirror(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&penable), core::mem::transmute_copy(&pfliphorizontal), core::mem::transmute_copy(&pflipvertical)) } unsafe extern "system" fn VideoProcessorGetBehaviorHints(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, outputwidth: u32, outputheight: u32, outputformat: super::Dxgi::Common::DXGI_FORMAT, streamcount: u32, pstreams: *const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT, pbehaviorhints: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D11VideoContext1_Impl::VideoProcessorGetBehaviorHints(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&outputwidth), core::mem::transmute_copy(&outputheight), core::mem::transmute_copy(&outputformat), core::mem::transmute_copy(&streamcount), core::mem::transmute_copy(&pstreams)) { + match ID3D11VideoContext1_Impl::VideoProcessorGetBehaviorHints(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&outputwidth), core::mem::transmute_copy(&outputheight), core::mem::transmute_copy(&outputformat), core::mem::transmute_copy(&streamcount), core::mem::transmute_copy(&pstreams)) { Ok(ok__) => { pbehaviorhints.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -13922,29 +13909,29 @@ pub struct ID3D11VideoContext2_Vtbl { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait ID3D11VideoContext2_Impl: ID3D11VideoContext1_Impl { - fn VideoProcessorSetOutputHDRMetaData(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, r#type: super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, phdrmetadata: *const core::ffi::c_void); - fn VideoProcessorGetOutputHDRMetaData(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, ptype: *mut super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, pmetadata: *mut core::ffi::c_void); - fn VideoProcessorSetStreamHDRMetaData(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, r#type: super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, phdrmetadata: *const core::ffi::c_void); - fn VideoProcessorGetStreamHDRMetaData(&self, pvideoprocessor: Option<&ID3D11VideoProcessor>, streamindex: u32, ptype: *mut super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, pmetadata: *mut core::ffi::c_void); + fn VideoProcessorSetOutputHDRMetaData(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, r#type: super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, phdrmetadata: *const core::ffi::c_void); + fn VideoProcessorGetOutputHDRMetaData(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, ptype: *mut super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, pmetadata: *mut core::ffi::c_void); + fn VideoProcessorSetStreamHDRMetaData(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, r#type: super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, phdrmetadata: *const core::ffi::c_void); + fn VideoProcessorGetStreamHDRMetaData(&self, pvideoprocessor: windows_core::Ref<'_, ID3D11VideoProcessor>, streamindex: u32, ptype: *mut super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, pmetadata: *mut core::ffi::c_void); } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl ID3D11VideoContext2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn VideoProcessorSetOutputHDRMetaData(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, r#type: super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, phdrmetadata: *const core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext2_Impl::VideoProcessorSetOutputHDRMetaData(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&size), core::mem::transmute_copy(&phdrmetadata)) + ID3D11VideoContext2_Impl::VideoProcessorSetOutputHDRMetaData(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&size), core::mem::transmute_copy(&phdrmetadata)) } unsafe extern "system" fn VideoProcessorGetOutputHDRMetaData(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, ptype: *mut super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, pmetadata: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext2_Impl::VideoProcessorGetOutputHDRMetaData(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&size), core::mem::transmute_copy(&pmetadata)) + ID3D11VideoContext2_Impl::VideoProcessorGetOutputHDRMetaData(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&size), core::mem::transmute_copy(&pmetadata)) } unsafe extern "system" fn VideoProcessorSetStreamHDRMetaData(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, r#type: super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, phdrmetadata: *const core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext2_Impl::VideoProcessorSetStreamHDRMetaData(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&size), core::mem::transmute_copy(&phdrmetadata)) + ID3D11VideoContext2_Impl::VideoProcessorSetStreamHDRMetaData(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&size), core::mem::transmute_copy(&phdrmetadata)) } unsafe extern "system" fn VideoProcessorGetStreamHDRMetaData(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, streamindex: u32, ptype: *mut super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, pmetadata: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext2_Impl::VideoProcessorGetStreamHDRMetaData(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&size), core::mem::transmute_copy(&pmetadata)) + ID3D11VideoContext2_Impl::VideoProcessorGetStreamHDRMetaData(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&streamindex), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&size), core::mem::transmute_copy(&pmetadata)) } Self { base__: ID3D11VideoContext1_Vtbl::new::(), @@ -13995,19 +13982,19 @@ pub struct ID3D11VideoContext3_Vtbl { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait ID3D11VideoContext3_Impl: ID3D11VideoContext2_Impl { - fn DecoderBeginFrame1(&self, pdecoder: Option<&ID3D11VideoDecoder>, pview: Option<&ID3D11VideoDecoderOutputView>, contentkeysize: u32, pcontentkey: *const core::ffi::c_void, numcomponenthistograms: u32, phistogramoffsets: *const u32, pphistogrambuffers: *const Option) -> windows_core::Result<()>; - fn SubmitDecoderBuffers2(&self, pdecoder: Option<&ID3D11VideoDecoder>, numbuffers: u32, pbufferdesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC2) -> windows_core::Result<()>; + fn DecoderBeginFrame1(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, pview: windows_core::Ref<'_, ID3D11VideoDecoderOutputView>, contentkeysize: u32, pcontentkey: *const core::ffi::c_void, numcomponenthistograms: u32, phistogramoffsets: *const u32, pphistogrambuffers: *const Option) -> windows_core::Result<()>; + fn SubmitDecoderBuffers2(&self, pdecoder: windows_core::Ref<'_, ID3D11VideoDecoder>, numbuffers: u32, pbufferdesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC2) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl ID3D11VideoContext3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DecoderBeginFrame1(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, pview: *mut core::ffi::c_void, contentkeysize: u32, pcontentkey: *const core::ffi::c_void, numcomponenthistograms: u32, phistogramoffsets: *const u32, pphistogrambuffers: *const *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext3_Impl::DecoderBeginFrame1(this, windows_core::from_raw_borrowed(&pdecoder), windows_core::from_raw_borrowed(&pview), core::mem::transmute_copy(&contentkeysize), core::mem::transmute_copy(&pcontentkey), core::mem::transmute_copy(&numcomponenthistograms), core::mem::transmute_copy(&phistogramoffsets), core::mem::transmute_copy(&pphistogrambuffers)).into() + ID3D11VideoContext3_Impl::DecoderBeginFrame1(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&pview), core::mem::transmute_copy(&contentkeysize), core::mem::transmute_copy(&pcontentkey), core::mem::transmute_copy(&numcomponenthistograms), core::mem::transmute_copy(&phistogramoffsets), core::mem::transmute_copy(&pphistogrambuffers)).into() } unsafe extern "system" fn SubmitDecoderBuffers2(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, numbuffers: u32, pbufferdesc: *const D3D11_VIDEO_DECODER_BUFFER_DESC2) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoContext3_Impl::SubmitDecoderBuffers2(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&numbuffers), core::mem::transmute_copy(&pbufferdesc)).into() + ID3D11VideoContext3_Impl::SubmitDecoderBuffers2(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&numbuffers), core::mem::transmute_copy(&pbufferdesc)).into() } Self { base__: ID3D11VideoContext2_Vtbl::new::(), @@ -14251,12 +14238,12 @@ pub struct ID3D11VideoDevice_Vtbl { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait ID3D11VideoDevice_Impl: windows_core::IUnknownImpl { fn CreateVideoDecoder(&self, pvideodesc: *const D3D11_VIDEO_DECODER_DESC, pconfig: *const D3D11_VIDEO_DECODER_CONFIG) -> windows_core::Result; - fn CreateVideoProcessor(&self, penum: Option<&ID3D11VideoProcessorEnumerator>, rateconversionindex: u32) -> windows_core::Result; + fn CreateVideoProcessor(&self, penum: windows_core::Ref<'_, ID3D11VideoProcessorEnumerator>, rateconversionindex: u32) -> windows_core::Result; fn CreateAuthenticatedChannel(&self, channeltype: D3D11_AUTHENTICATED_CHANNEL_TYPE) -> windows_core::Result; fn CreateCryptoSession(&self, pcryptotype: *const windows_core::GUID, pdecoderprofile: *const windows_core::GUID, pkeyexchangetype: *const windows_core::GUID) -> windows_core::Result; - fn CreateVideoDecoderOutputView(&self, presource: Option<&ID3D11Resource>, pdesc: *const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC, ppvdovview: *mut Option) -> windows_core::Result<()>; - fn CreateVideoProcessorInputView(&self, presource: Option<&ID3D11Resource>, penum: Option<&ID3D11VideoProcessorEnumerator>, pdesc: *const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC, ppvpiview: *mut Option) -> windows_core::Result<()>; - fn CreateVideoProcessorOutputView(&self, presource: Option<&ID3D11Resource>, penum: Option<&ID3D11VideoProcessorEnumerator>, pdesc: *const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, ppvpoview: *mut Option) -> windows_core::Result<()>; + fn CreateVideoDecoderOutputView(&self, presource: windows_core::Ref<'_, ID3D11Resource>, pdesc: *const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC, ppvdovview: windows_core::OutRef<'_, ID3D11VideoDecoderOutputView>) -> windows_core::Result<()>; + fn CreateVideoProcessorInputView(&self, presource: windows_core::Ref<'_, ID3D11Resource>, penum: windows_core::Ref<'_, ID3D11VideoProcessorEnumerator>, pdesc: *const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC, ppvpiview: windows_core::OutRef<'_, ID3D11VideoProcessorInputView>) -> windows_core::Result<()>; + fn CreateVideoProcessorOutputView(&self, presource: windows_core::Ref<'_, ID3D11Resource>, penum: windows_core::Ref<'_, ID3D11VideoProcessorEnumerator>, pdesc: *const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, ppvpoview: windows_core::OutRef<'_, ID3D11VideoProcessorOutputView>) -> windows_core::Result<()>; fn CreateVideoProcessorEnumerator(&self, pdesc: *const D3D11_VIDEO_PROCESSOR_CONTENT_DESC) -> windows_core::Result; fn GetVideoDecoderProfileCount(&self) -> u32; fn GetVideoDecoderProfile(&self, index: u32) -> windows_core::Result; @@ -14266,7 +14253,7 @@ pub trait ID3D11VideoDevice_Impl: windows_core::IUnknownImpl { fn GetContentProtectionCaps(&self, pcryptotype: *const windows_core::GUID, pdecoderprofile: *const windows_core::GUID, pcaps: *mut D3D11_VIDEO_CONTENT_PROTECTION_CAPS) -> windows_core::Result<()>; fn CheckCryptoKeyExchange(&self, pcryptotype: *const windows_core::GUID, pdecoderprofile: *const windows_core::GUID, index: u32) -> windows_core::Result; fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>; - fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl ID3D11VideoDevice_Vtbl { @@ -14283,7 +14270,7 @@ impl ID3D11VideoDevice_Vtbl { } unsafe extern "system" fn CreateVideoProcessor(this: *mut core::ffi::c_void, penum: *mut core::ffi::c_void, rateconversionindex: u32, ppvideoprocessor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D11VideoDevice_Impl::CreateVideoProcessor(this, windows_core::from_raw_borrowed(&penum), core::mem::transmute_copy(&rateconversionindex)) { + match ID3D11VideoDevice_Impl::CreateVideoProcessor(this, core::mem::transmute_copy(&penum), core::mem::transmute_copy(&rateconversionindex)) { Ok(ok__) => { ppvideoprocessor.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -14313,15 +14300,15 @@ impl ID3D11VideoDevice_Vtbl { } unsafe extern "system" fn CreateVideoDecoderOutputView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC, ppvdovview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoDevice_Impl::CreateVideoDecoderOutputView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppvdovview)).into() + ID3D11VideoDevice_Impl::CreateVideoDecoderOutputView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppvdovview)).into() } unsafe extern "system" fn CreateVideoProcessorInputView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, penum: *mut core::ffi::c_void, pdesc: *const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC, ppvpiview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoDevice_Impl::CreateVideoProcessorInputView(this, windows_core::from_raw_borrowed(&presource), windows_core::from_raw_borrowed(&penum), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppvpiview)).into() + ID3D11VideoDevice_Impl::CreateVideoProcessorInputView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&penum), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppvpiview)).into() } unsafe extern "system" fn CreateVideoProcessorOutputView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, penum: *mut core::ffi::c_void, pdesc: *const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, ppvpoview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoDevice_Impl::CreateVideoProcessorOutputView(this, windows_core::from_raw_borrowed(&presource), windows_core::from_raw_borrowed(&penum), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppvpoview)).into() + ID3D11VideoDevice_Impl::CreateVideoProcessorOutputView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&penum), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppvpoview)).into() } unsafe extern "system" fn CreateVideoProcessorEnumerator(this: *mut core::ffi::c_void, pdesc: *const D3D11_VIDEO_PROCESSOR_CONTENT_DESC, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14391,7 +14378,7 @@ impl ID3D11VideoDevice_Vtbl { } unsafe extern "system" fn SetPrivateDataInterface(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoDevice_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), windows_core::from_raw_borrowed(&pdata)).into() + ID3D11VideoDevice_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&pdata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -14552,7 +14539,7 @@ pub struct ID3D11VideoDevice2_Vtbl { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait ID3D11VideoDevice2_Impl: ID3D11VideoDevice1_Impl { fn CheckFeatureSupport(&self, feature: D3D11_FEATURE_VIDEO, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()>; - fn NegotiateCryptoSessionKeyExchangeMT(&self, pcryptosession: Option<&ID3D11CryptoSession>, flags: D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn NegotiateCryptoSessionKeyExchangeMT(&self, pcryptosession: windows_core::Ref<'_, ID3D11CryptoSession>, flags: D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl ID3D11VideoDevice2_Vtbl { @@ -14563,7 +14550,7 @@ impl ID3D11VideoDevice2_Vtbl { } unsafe extern "system" fn NegotiateCryptoSessionKeyExchangeMT(this: *mut core::ffi::c_void, pcryptosession: *mut core::ffi::c_void, flags: D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11VideoDevice2_Impl::NegotiateCryptoSessionKeyExchangeMT(this, windows_core::from_raw_borrowed(&pcryptosession), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into() + ID3D11VideoDevice2_Impl::NegotiateCryptoSessionKeyExchangeMT(this, core::mem::transmute_copy(&pcryptosession), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&datasize), core::mem::transmute_copy(&pdata)).into() } Self { base__: ID3D11VideoDevice1_Vtbl::new::(), @@ -14911,7 +14898,7 @@ pub struct ID3D11View_Vtbl { pub GetResource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void), } pub trait ID3D11View_Impl: ID3D11DeviceChild_Impl { - fn GetResource(&self, ppresource: *mut Option); + fn GetResource(&self, ppresource: windows_core::OutRef<'_, ID3D11Resource>); } impl ID3D11View_Vtbl { pub const fn new() -> Self { @@ -15069,8 +15056,8 @@ pub trait ID3DX11FFT_Impl: windows_core::IUnknownImpl { fn SetInverseScale(&self, inversescale: f32) -> windows_core::Result<()>; fn GetInverseScale(&self) -> f32; fn AttachBuffersAndPrecompute(&self, numtempbuffers: u32, pptempbuffers: *const Option, numprecomputebuffers: u32, ppprecomputebuffersizes: *const Option) -> windows_core::Result<()>; - fn ForwardTransform(&self, pinputbuffer: Option<&ID3D11UnorderedAccessView>, ppoutputbuffer: *mut Option) -> windows_core::Result<()>; - fn InverseTransform(&self, pinputbuffer: Option<&ID3D11UnorderedAccessView>, ppoutputbuffer: *mut Option) -> windows_core::Result<()>; + fn ForwardTransform(&self, pinputbuffer: windows_core::Ref<'_, ID3D11UnorderedAccessView>, ppoutputbuffer: windows_core::OutRef<'_, ID3D11UnorderedAccessView>) -> windows_core::Result<()>; + fn InverseTransform(&self, pinputbuffer: windows_core::Ref<'_, ID3D11UnorderedAccessView>, ppoutputbuffer: windows_core::OutRef<'_, ID3D11UnorderedAccessView>) -> windows_core::Result<()>; } impl ID3DX11FFT_Vtbl { pub const fn new() -> Self { @@ -15096,11 +15083,11 @@ impl ID3DX11FFT_Vtbl { } unsafe extern "system" fn ForwardTransform(this: *mut core::ffi::c_void, pinputbuffer: *mut core::ffi::c_void, ppoutputbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3DX11FFT_Impl::ForwardTransform(this, windows_core::from_raw_borrowed(&pinputbuffer), core::mem::transmute_copy(&ppoutputbuffer)).into() + ID3DX11FFT_Impl::ForwardTransform(this, core::mem::transmute_copy(&pinputbuffer), core::mem::transmute_copy(&ppoutputbuffer)).into() } unsafe extern "system" fn InverseTransform(this: *mut core::ffi::c_void, pinputbuffer: *mut core::ffi::c_void, ppoutputbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3DX11FFT_Impl::InverseTransform(this, windows_core::from_raw_borrowed(&pinputbuffer), core::mem::transmute_copy(&ppoutputbuffer)).into() + ID3DX11FFT_Impl::InverseTransform(this, core::mem::transmute_copy(&pinputbuffer), core::mem::transmute_copy(&ppoutputbuffer)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -15150,8 +15137,8 @@ pub struct ID3DX11Scan_Vtbl { } pub trait ID3DX11Scan_Impl: windows_core::IUnknownImpl { fn SetScanDirection(&self, direction: D3DX11_SCAN_DIRECTION) -> windows_core::Result<()>; - fn Scan(&self, elementtype: D3DX11_SCAN_DATA_TYPE, opcode: D3DX11_SCAN_OPCODE, elementscansize: u32, psrc: Option<&ID3D11UnorderedAccessView>, pdst: Option<&ID3D11UnorderedAccessView>) -> windows_core::Result<()>; - fn Multiscan(&self, elementtype: D3DX11_SCAN_DATA_TYPE, opcode: D3DX11_SCAN_OPCODE, elementscansize: u32, elementscanpitch: u32, scancount: u32, psrc: Option<&ID3D11UnorderedAccessView>, pdst: Option<&ID3D11UnorderedAccessView>) -> windows_core::Result<()>; + fn Scan(&self, elementtype: D3DX11_SCAN_DATA_TYPE, opcode: D3DX11_SCAN_OPCODE, elementscansize: u32, psrc: windows_core::Ref<'_, ID3D11UnorderedAccessView>, pdst: windows_core::Ref<'_, ID3D11UnorderedAccessView>) -> windows_core::Result<()>; + fn Multiscan(&self, elementtype: D3DX11_SCAN_DATA_TYPE, opcode: D3DX11_SCAN_OPCODE, elementscansize: u32, elementscanpitch: u32, scancount: u32, psrc: windows_core::Ref<'_, ID3D11UnorderedAccessView>, pdst: windows_core::Ref<'_, ID3D11UnorderedAccessView>) -> windows_core::Result<()>; } impl ID3DX11Scan_Vtbl { pub const fn new() -> Self { @@ -15161,11 +15148,11 @@ impl ID3DX11Scan_Vtbl { } unsafe extern "system" fn Scan(this: *mut core::ffi::c_void, elementtype: D3DX11_SCAN_DATA_TYPE, opcode: D3DX11_SCAN_OPCODE, elementscansize: u32, psrc: *mut core::ffi::c_void, pdst: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3DX11Scan_Impl::Scan(this, core::mem::transmute_copy(&elementtype), core::mem::transmute_copy(&opcode), core::mem::transmute_copy(&elementscansize), windows_core::from_raw_borrowed(&psrc), windows_core::from_raw_borrowed(&pdst)).into() + ID3DX11Scan_Impl::Scan(this, core::mem::transmute_copy(&elementtype), core::mem::transmute_copy(&opcode), core::mem::transmute_copy(&elementscansize), core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst)).into() } unsafe extern "system" fn Multiscan(this: *mut core::ffi::c_void, elementtype: D3DX11_SCAN_DATA_TYPE, opcode: D3DX11_SCAN_OPCODE, elementscansize: u32, elementscanpitch: u32, scancount: u32, psrc: *mut core::ffi::c_void, pdst: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3DX11Scan_Impl::Multiscan(this, core::mem::transmute_copy(&elementtype), core::mem::transmute_copy(&opcode), core::mem::transmute_copy(&elementscansize), core::mem::transmute_copy(&elementscanpitch), core::mem::transmute_copy(&scancount), windows_core::from_raw_borrowed(&psrc), windows_core::from_raw_borrowed(&pdst)).into() + ID3DX11Scan_Impl::Multiscan(this, core::mem::transmute_copy(&elementtype), core::mem::transmute_copy(&opcode), core::mem::transmute_copy(&elementscansize), core::mem::transmute_copy(&elementscanpitch), core::mem::transmute_copy(&scancount), core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -15204,7 +15191,7 @@ pub struct ID3DX11SegmentedScan_Vtbl { } pub trait ID3DX11SegmentedScan_Impl: windows_core::IUnknownImpl { fn SetScanDirection(&self, direction: D3DX11_SCAN_DIRECTION) -> windows_core::Result<()>; - fn SegScan(&self, elementtype: D3DX11_SCAN_DATA_TYPE, opcode: D3DX11_SCAN_OPCODE, elementscansize: u32, psrc: Option<&ID3D11UnorderedAccessView>, psrcelementflags: Option<&ID3D11UnorderedAccessView>, pdst: Option<&ID3D11UnorderedAccessView>) -> windows_core::Result<()>; + fn SegScan(&self, elementtype: D3DX11_SCAN_DATA_TYPE, opcode: D3DX11_SCAN_OPCODE, elementscansize: u32, psrc: windows_core::Ref<'_, ID3D11UnorderedAccessView>, psrcelementflags: windows_core::Ref<'_, ID3D11UnorderedAccessView>, pdst: windows_core::Ref<'_, ID3D11UnorderedAccessView>) -> windows_core::Result<()>; } impl ID3DX11SegmentedScan_Vtbl { pub const fn new() -> Self { @@ -15214,7 +15201,7 @@ impl ID3DX11SegmentedScan_Vtbl { } unsafe extern "system" fn SegScan(this: *mut core::ffi::c_void, elementtype: D3DX11_SCAN_DATA_TYPE, opcode: D3DX11_SCAN_OPCODE, elementscansize: u32, psrc: *mut core::ffi::c_void, psrcelementflags: *mut core::ffi::c_void, pdst: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3DX11SegmentedScan_Impl::SegScan(this, core::mem::transmute_copy(&elementtype), core::mem::transmute_copy(&opcode), core::mem::transmute_copy(&elementscansize), windows_core::from_raw_borrowed(&psrc), windows_core::from_raw_borrowed(&psrcelementflags), windows_core::from_raw_borrowed(&pdst)).into() + ID3DX11SegmentedScan_Impl::SegScan(this, core::mem::transmute_copy(&elementtype), core::mem::transmute_copy(&opcode), core::mem::transmute_copy(&elementscansize), core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&psrcelementflags), core::mem::transmute_copy(&pdst)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs index 251c7bf185..bb35dd34df 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs @@ -70,7 +70,7 @@ pub struct ID3D11On12Device_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D11", feature = "Win32_Graphics_Direct3D12"))] pub trait ID3D11On12Device_Impl: windows_core::IUnknownImpl { - fn CreateWrappedResource(&self, presource12: Option<&windows_core::IUnknown>, pflags11: *const D3D11_RESOURCE_FLAGS, instate: super::Direct3D12::D3D12_RESOURCE_STATES, outstate: super::Direct3D12::D3D12_RESOURCE_STATES, riid: *const windows_core::GUID, ppresource11: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateWrappedResource(&self, presource12: windows_core::Ref<'_, windows_core::IUnknown>, pflags11: *const D3D11_RESOURCE_FLAGS, instate: super::Direct3D12::D3D12_RESOURCE_STATES, outstate: super::Direct3D12::D3D12_RESOURCE_STATES, riid: *const windows_core::GUID, ppresource11: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn ReleaseWrappedResources(&self, ppresources: *const Option, numresources: u32); fn AcquireWrappedResources(&self, ppresources: *const Option, numresources: u32); } @@ -79,7 +79,7 @@ impl ID3D11On12Device_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateWrappedResource(this: *mut core::ffi::c_void, presource12: *mut core::ffi::c_void, pflags11: *const D3D11_RESOURCE_FLAGS, instate: super::Direct3D12::D3D12_RESOURCE_STATES, outstate: super::Direct3D12::D3D12_RESOURCE_STATES, riid: *const windows_core::GUID, ppresource11: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11On12Device_Impl::CreateWrappedResource(this, windows_core::from_raw_borrowed(&presource12), core::mem::transmute_copy(&pflags11), core::mem::transmute_copy(&instate), core::mem::transmute_copy(&outstate), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppresource11)).into() + ID3D11On12Device_Impl::CreateWrappedResource(this, core::mem::transmute_copy(&presource12), core::mem::transmute_copy(&pflags11), core::mem::transmute_copy(&instate), core::mem::transmute_copy(&outstate), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppresource11)).into() } unsafe extern "system" fn ReleaseWrappedResources(this: *mut core::ffi::c_void, ppresources: *const *mut core::ffi::c_void, numresources: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -192,19 +192,19 @@ pub struct ID3D11On12Device2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D11", feature = "Win32_Graphics_Direct3D12"))] pub trait ID3D11On12Device2_Impl: ID3D11On12Device1_Impl { - fn UnwrapUnderlyingResource(&self, presource11: Option<&super::Direct3D11::ID3D11Resource>, pcommandqueue: Option<&super::Direct3D12::ID3D12CommandQueue>, riid: *const windows_core::GUID, ppvresource12: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn ReturnUnderlyingResource(&self, presource11: Option<&super::Direct3D11::ID3D11Resource>, numsync: u32, psignalvalues: *const u64, ppfences: *const Option) -> windows_core::Result<()>; + fn UnwrapUnderlyingResource(&self, presource11: windows_core::Ref<'_, super::Direct3D11::ID3D11Resource>, pcommandqueue: windows_core::Ref<'_, super::Direct3D12::ID3D12CommandQueue>, riid: *const windows_core::GUID, ppvresource12: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ReturnUnderlyingResource(&self, presource11: windows_core::Ref<'_, super::Direct3D11::ID3D11Resource>, numsync: u32, psignalvalues: *const u64, ppfences: *const Option) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D11", feature = "Win32_Graphics_Direct3D12"))] impl ID3D11On12Device2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UnwrapUnderlyingResource(this: *mut core::ffi::c_void, presource11: *mut core::ffi::c_void, pcommandqueue: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvresource12: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11On12Device2_Impl::UnwrapUnderlyingResource(this, windows_core::from_raw_borrowed(&presource11), windows_core::from_raw_borrowed(&pcommandqueue), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource12)).into() + ID3D11On12Device2_Impl::UnwrapUnderlyingResource(this, core::mem::transmute_copy(&presource11), core::mem::transmute_copy(&pcommandqueue), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource12)).into() } unsafe extern "system" fn ReturnUnderlyingResource(this: *mut core::ffi::c_void, presource11: *mut core::ffi::c_void, numsync: u32, psignalvalues: *const u64, ppfences: *const *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D11On12Device2_Impl::ReturnUnderlyingResource(this, windows_core::from_raw_borrowed(&presource11), core::mem::transmute_copy(&numsync), core::mem::transmute_copy(&psignalvalues), core::mem::transmute_copy(&ppfences)).into() + ID3D11On12Device2_Impl::ReturnUnderlyingResource(this, core::mem::transmute_copy(&presource11), core::mem::transmute_copy(&numsync), core::mem::transmute_copy(&psignalvalues), core::mem::transmute_copy(&ppfences)).into() } Self { base__: ID3D11On12Device1_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs index a4d160ac5f..c276f33c13 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs @@ -9331,14 +9331,14 @@ pub struct ID3D12CommandQueue_Vtbl { pub GetDesc: unsafe extern "system" fn(*mut core::ffi::c_void, *mut D3D12_COMMAND_QUEUE_DESC), } pub trait ID3D12CommandQueue_Impl: ID3D12Pageable_Impl { - fn UpdateTileMappings(&self, presource: Option<&ID3D12Resource>, numresourceregions: u32, presourceregionstartcoordinates: *const D3D12_TILED_RESOURCE_COORDINATE, presourceregionsizes: *const D3D12_TILE_REGION_SIZE, pheap: Option<&ID3D12Heap>, numranges: u32, prangeflags: *const D3D12_TILE_RANGE_FLAGS, pheaprangestartoffsets: *const u32, prangetilecounts: *const u32, flags: D3D12_TILE_MAPPING_FLAGS); - fn CopyTileMappings(&self, pdstresource: Option<&ID3D12Resource>, pdstregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, psrcresource: Option<&ID3D12Resource>, psrcregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, pregionsize: *const D3D12_TILE_REGION_SIZE, flags: D3D12_TILE_MAPPING_FLAGS); + fn UpdateTileMappings(&self, presource: windows_core::Ref<'_, ID3D12Resource>, numresourceregions: u32, presourceregionstartcoordinates: *const D3D12_TILED_RESOURCE_COORDINATE, presourceregionsizes: *const D3D12_TILE_REGION_SIZE, pheap: windows_core::Ref<'_, ID3D12Heap>, numranges: u32, prangeflags: *const D3D12_TILE_RANGE_FLAGS, pheaprangestartoffsets: *const u32, prangetilecounts: *const u32, flags: D3D12_TILE_MAPPING_FLAGS); + fn CopyTileMappings(&self, pdstresource: windows_core::Ref<'_, ID3D12Resource>, pdstregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, psrcresource: windows_core::Ref<'_, ID3D12Resource>, psrcregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, pregionsize: *const D3D12_TILE_REGION_SIZE, flags: D3D12_TILE_MAPPING_FLAGS); fn ExecuteCommandLists(&self, numcommandlists: u32, ppcommandlists: *const Option); fn SetMarker(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn BeginEvent(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn EndEvent(&self); - fn Signal(&self, pfence: Option<&ID3D12Fence>, value: u64) -> windows_core::Result<()>; - fn Wait(&self, pfence: Option<&ID3D12Fence>, value: u64) -> windows_core::Result<()>; + fn Signal(&self, pfence: windows_core::Ref<'_, ID3D12Fence>, value: u64) -> windows_core::Result<()>; + fn Wait(&self, pfence: windows_core::Ref<'_, ID3D12Fence>, value: u64) -> windows_core::Result<()>; fn GetTimestampFrequency(&self) -> windows_core::Result; fn GetClockCalibration(&self, pgputimestamp: *mut u64, pcputimestamp: *mut u64) -> windows_core::Result<()>; fn GetDesc(&self) -> D3D12_COMMAND_QUEUE_DESC; @@ -9347,11 +9347,11 @@ impl ID3D12CommandQueue_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UpdateTileMappings(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, numresourceregions: u32, presourceregionstartcoordinates: *const D3D12_TILED_RESOURCE_COORDINATE, presourceregionsizes: *const D3D12_TILE_REGION_SIZE, pheap: *mut core::ffi::c_void, numranges: u32, prangeflags: *const D3D12_TILE_RANGE_FLAGS, pheaprangestartoffsets: *const u32, prangetilecounts: *const u32, flags: D3D12_TILE_MAPPING_FLAGS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12CommandQueue_Impl::UpdateTileMappings(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&numresourceregions), core::mem::transmute_copy(&presourceregionstartcoordinates), core::mem::transmute_copy(&presourceregionsizes), windows_core::from_raw_borrowed(&pheap), core::mem::transmute_copy(&numranges), core::mem::transmute_copy(&prangeflags), core::mem::transmute_copy(&pheaprangestartoffsets), core::mem::transmute_copy(&prangetilecounts), core::mem::transmute_copy(&flags)) + ID3D12CommandQueue_Impl::UpdateTileMappings(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&numresourceregions), core::mem::transmute_copy(&presourceregionstartcoordinates), core::mem::transmute_copy(&presourceregionsizes), core::mem::transmute_copy(&pheap), core::mem::transmute_copy(&numranges), core::mem::transmute_copy(&prangeflags), core::mem::transmute_copy(&pheaprangestartoffsets), core::mem::transmute_copy(&prangetilecounts), core::mem::transmute_copy(&flags)) } unsafe extern "system" fn CopyTileMappings(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, pdstregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, psrcresource: *mut core::ffi::c_void, psrcregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, pregionsize: *const D3D12_TILE_REGION_SIZE, flags: D3D12_TILE_MAPPING_FLAGS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12CommandQueue_Impl::CopyTileMappings(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&pdstregionstartcoordinate), windows_core::from_raw_borrowed(&psrcresource), core::mem::transmute_copy(&psrcregionstartcoordinate), core::mem::transmute_copy(&pregionsize), core::mem::transmute_copy(&flags)) + ID3D12CommandQueue_Impl::CopyTileMappings(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&pdstregionstartcoordinate), core::mem::transmute_copy(&psrcresource), core::mem::transmute_copy(&psrcregionstartcoordinate), core::mem::transmute_copy(&pregionsize), core::mem::transmute_copy(&flags)) } unsafe extern "system" fn ExecuteCommandLists(this: *mut core::ffi::c_void, numcommandlists: u32, ppcommandlists: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9371,11 +9371,11 @@ impl ID3D12CommandQueue_Vtbl { } unsafe extern "system" fn Signal(this: *mut core::ffi::c_void, pfence: *mut core::ffi::c_void, value: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12CommandQueue_Impl::Signal(this, windows_core::from_raw_borrowed(&pfence), core::mem::transmute_copy(&value)).into() + ID3D12CommandQueue_Impl::Signal(this, core::mem::transmute_copy(&pfence), core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Wait(this: *mut core::ffi::c_void, pfence: *mut core::ffi::c_void, value: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12CommandQueue_Impl::Wait(this, windows_core::from_raw_borrowed(&pfence), core::mem::transmute_copy(&value)).into() + ID3D12CommandQueue_Impl::Wait(this, core::mem::transmute_copy(&pfence), core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn GetTimestampFrequency(this: *mut core::ffi::c_void, pfrequency: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9745,7 +9745,7 @@ pub struct ID3D12DebugCommandList_Vtbl { pub GetFeatureMask: unsafe extern "system" fn(*mut core::ffi::c_void) -> D3D12_DEBUG_FEATURE, } pub trait ID3D12DebugCommandList_Impl: windows_core::IUnknownImpl { - fn AssertResourceState(&self, presource: Option<&ID3D12Resource>, subresource: u32, state: u32) -> super::super::Foundation::BOOL; + fn AssertResourceState(&self, presource: windows_core::Ref<'_, ID3D12Resource>, subresource: u32, state: u32) -> super::super::Foundation::BOOL; fn SetFeatureMask(&self, mask: D3D12_DEBUG_FEATURE) -> windows_core::Result<()>; fn GetFeatureMask(&self) -> D3D12_DEBUG_FEATURE; } @@ -9753,7 +9753,7 @@ impl ID3D12DebugCommandList_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AssertResourceState(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, state: u32) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12DebugCommandList_Impl::AssertResourceState(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&state)) + ID3D12DebugCommandList_Impl::AssertResourceState(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&state)) } unsafe extern "system" fn SetFeatureMask(this: *mut core::ffi::c_void, mask: D3D12_DEBUG_FEATURE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9801,7 +9801,7 @@ pub struct ID3D12DebugCommandList1_Vtbl { pub GetDebugParameter: unsafe extern "system" fn(*mut core::ffi::c_void, D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait ID3D12DebugCommandList1_Impl: windows_core::IUnknownImpl { - fn AssertResourceState(&self, presource: Option<&ID3D12Resource>, subresource: u32, state: u32) -> super::super::Foundation::BOOL; + fn AssertResourceState(&self, presource: windows_core::Ref<'_, ID3D12Resource>, subresource: u32, state: u32) -> super::super::Foundation::BOOL; fn SetDebugParameter(&self, r#type: D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE, pdata: *const core::ffi::c_void, datasize: u32) -> windows_core::Result<()>; fn GetDebugParameter(&self, r#type: D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE, pdata: *mut core::ffi::c_void, datasize: u32) -> windows_core::Result<()>; } @@ -9809,7 +9809,7 @@ impl ID3D12DebugCommandList1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AssertResourceState(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, state: u32) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12DebugCommandList1_Impl::AssertResourceState(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&state)) + ID3D12DebugCommandList1_Impl::AssertResourceState(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&state)) } unsafe extern "system" fn SetDebugParameter(this: *mut core::ffi::c_void, r#type: D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE, pdata: *const core::ffi::c_void, datasize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9911,18 +9911,18 @@ pub struct ID3D12DebugCommandList3_Vtbl { pub AssertTextureLayout: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, D3D12_BARRIER_LAYOUT), } pub trait ID3D12DebugCommandList3_Impl: ID3D12DebugCommandList2_Impl { - fn AssertResourceAccess(&self, presource: Option<&ID3D12Resource>, subresource: u32, access: D3D12_BARRIER_ACCESS); - fn AssertTextureLayout(&self, presource: Option<&ID3D12Resource>, subresource: u32, layout: D3D12_BARRIER_LAYOUT); + fn AssertResourceAccess(&self, presource: windows_core::Ref<'_, ID3D12Resource>, subresource: u32, access: D3D12_BARRIER_ACCESS); + fn AssertTextureLayout(&self, presource: windows_core::Ref<'_, ID3D12Resource>, subresource: u32, layout: D3D12_BARRIER_LAYOUT); } impl ID3D12DebugCommandList3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AssertResourceAccess(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, access: D3D12_BARRIER_ACCESS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12DebugCommandList3_Impl::AssertResourceAccess(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&access)) + ID3D12DebugCommandList3_Impl::AssertResourceAccess(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&access)) } unsafe extern "system" fn AssertTextureLayout(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, layout: D3D12_BARRIER_LAYOUT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12DebugCommandList3_Impl::AssertTextureLayout(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&layout)) + ID3D12DebugCommandList3_Impl::AssertTextureLayout(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&layout)) } Self { base__: ID3D12DebugCommandList2_Vtbl::new::(), @@ -9953,13 +9953,13 @@ pub struct ID3D12DebugCommandQueue_Vtbl { pub AssertResourceState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32) -> super::super::Foundation::BOOL, } pub trait ID3D12DebugCommandQueue_Impl: windows_core::IUnknownImpl { - fn AssertResourceState(&self, presource: Option<&ID3D12Resource>, subresource: u32, state: u32) -> super::super::Foundation::BOOL; + fn AssertResourceState(&self, presource: windows_core::Ref<'_, ID3D12Resource>, subresource: u32, state: u32) -> super::super::Foundation::BOOL; } impl ID3D12DebugCommandQueue_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AssertResourceState(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, state: u32) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12DebugCommandQueue_Impl::AssertResourceState(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&state)) + ID3D12DebugCommandQueue_Impl::AssertResourceState(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&state)) } Self { base__: windows_core::IUnknown_Vtbl::new::(), AssertResourceState: AssertResourceState:: } } @@ -9999,18 +9999,18 @@ pub struct ID3D12DebugCommandQueue1_Vtbl { pub AssertTextureLayout: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, D3D12_BARRIER_LAYOUT), } pub trait ID3D12DebugCommandQueue1_Impl: ID3D12DebugCommandQueue_Impl { - fn AssertResourceAccess(&self, presource: Option<&ID3D12Resource>, subresource: u32, access: D3D12_BARRIER_ACCESS); - fn AssertTextureLayout(&self, presource: Option<&ID3D12Resource>, subresource: u32, layout: D3D12_BARRIER_LAYOUT); + fn AssertResourceAccess(&self, presource: windows_core::Ref<'_, ID3D12Resource>, subresource: u32, access: D3D12_BARRIER_ACCESS); + fn AssertTextureLayout(&self, presource: windows_core::Ref<'_, ID3D12Resource>, subresource: u32, layout: D3D12_BARRIER_LAYOUT); } impl ID3D12DebugCommandQueue1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AssertResourceAccess(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, access: D3D12_BARRIER_ACCESS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12DebugCommandQueue1_Impl::AssertResourceAccess(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&access)) + ID3D12DebugCommandQueue1_Impl::AssertResourceAccess(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&access)) } unsafe extern "system" fn AssertTextureLayout(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, layout: D3D12_BARRIER_LAYOUT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12DebugCommandQueue1_Impl::AssertTextureLayout(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&layout)) + ID3D12DebugCommandQueue1_Impl::AssertTextureLayout(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&layout)) } Self { base__: ID3D12DebugCommandQueue_Vtbl::new::(), @@ -10546,16 +10546,16 @@ pub trait ID3D12Device_Impl: ID3D12Object_Impl { fn CreateCommandAllocator(&self, r#type: D3D12_COMMAND_LIST_TYPE, riid: *const windows_core::GUID, ppcommandallocator: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateGraphicsPipelineState(&self, pdesc: *const D3D12_GRAPHICS_PIPELINE_STATE_DESC, riid: *const windows_core::GUID, pppipelinestate: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateComputePipelineState(&self, pdesc: *const D3D12_COMPUTE_PIPELINE_STATE_DESC, riid: *const windows_core::GUID, pppipelinestate: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateCommandList(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, pcommandallocator: Option<&ID3D12CommandAllocator>, pinitialstate: Option<&ID3D12PipelineState>, riid: *const windows_core::GUID, ppcommandlist: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateCommandList(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, pcommandallocator: windows_core::Ref<'_, ID3D12CommandAllocator>, pinitialstate: windows_core::Ref<'_, ID3D12PipelineState>, riid: *const windows_core::GUID, ppcommandlist: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CheckFeatureSupport(&self, feature: D3D12_FEATURE, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()>; fn CreateDescriptorHeap(&self, pdescriptorheapdesc: *const D3D12_DESCRIPTOR_HEAP_DESC, riid: *const windows_core::GUID, ppvheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetDescriptorHandleIncrementSize(&self, descriptorheaptype: D3D12_DESCRIPTOR_HEAP_TYPE) -> u32; fn CreateRootSignature(&self, nodemask: u32, pblobwithrootsignature: *const core::ffi::c_void, bloblengthinbytes: usize, riid: *const windows_core::GUID, ppvrootsignature: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateConstantBufferView(&self, pdesc: *const D3D12_CONSTANT_BUFFER_VIEW_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); - fn CreateShaderResourceView(&self, presource: Option<&ID3D12Resource>, pdesc: *const D3D12_SHADER_RESOURCE_VIEW_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); - fn CreateUnorderedAccessView(&self, presource: Option<&ID3D12Resource>, pcounterresource: Option<&ID3D12Resource>, pdesc: *const D3D12_UNORDERED_ACCESS_VIEW_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); - fn CreateRenderTargetView(&self, presource: Option<&ID3D12Resource>, pdesc: *const D3D12_RENDER_TARGET_VIEW_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); - fn CreateDepthStencilView(&self, presource: Option<&ID3D12Resource>, pdesc: *const D3D12_DEPTH_STENCIL_VIEW_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); + fn CreateShaderResourceView(&self, presource: windows_core::Ref<'_, ID3D12Resource>, pdesc: *const D3D12_SHADER_RESOURCE_VIEW_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); + fn CreateUnorderedAccessView(&self, presource: windows_core::Ref<'_, ID3D12Resource>, pcounterresource: windows_core::Ref<'_, ID3D12Resource>, pdesc: *const D3D12_UNORDERED_ACCESS_VIEW_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); + fn CreateRenderTargetView(&self, presource: windows_core::Ref<'_, ID3D12Resource>, pdesc: *const D3D12_RENDER_TARGET_VIEW_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); + fn CreateDepthStencilView(&self, presource: windows_core::Ref<'_, ID3D12Resource>, pdesc: *const D3D12_DEPTH_STENCIL_VIEW_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); fn CreateSampler(&self, pdesc: *const D3D12_SAMPLER_DESC, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); fn CopyDescriptors(&self, numdestdescriptorranges: u32, pdestdescriptorrangestarts: *const D3D12_CPU_DESCRIPTOR_HANDLE, pdestdescriptorrangesizes: *const u32, numsrcdescriptorranges: u32, psrcdescriptorrangestarts: *const D3D12_CPU_DESCRIPTOR_HANDLE, psrcdescriptorrangesizes: *const u32, descriptorheapstype: D3D12_DESCRIPTOR_HEAP_TYPE); fn CopyDescriptorsSimple(&self, numdescriptors: u32, destdescriptorrangestart: &D3D12_CPU_DESCRIPTOR_HANDLE, srcdescriptorrangestart: &D3D12_CPU_DESCRIPTOR_HANDLE, descriptorheapstype: D3D12_DESCRIPTOR_HEAP_TYPE); @@ -10563,9 +10563,9 @@ pub trait ID3D12Device_Impl: ID3D12Object_Impl { fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES; fn CreateCommittedResource(&self, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC, initialresourcestate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateHeap(&self, pdesc: *const D3D12_HEAP_DESC, riid: *const windows_core::GUID, ppvheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreatePlacedResource(&self, pheap: Option<&ID3D12Heap>, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreatePlacedResource(&self, pheap: windows_core::Ref<'_, ID3D12Heap>, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateReservedResource(&self, pdesc: *const D3D12_RESOURCE_DESC, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateSharedHandle(&self, pobject: Option<&ID3D12DeviceChild>, pattributes: *const super::super::Security::SECURITY_ATTRIBUTES, access: u32, name: &windows_core::PCWSTR) -> windows_core::Result; + fn CreateSharedHandle(&self, pobject: windows_core::Ref<'_, ID3D12DeviceChild>, pattributes: *const super::super::Security::SECURITY_ATTRIBUTES, access: u32, name: &windows_core::PCWSTR) -> windows_core::Result; fn OpenSharedHandle(&self, nthandle: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn OpenSharedHandleByName(&self, name: &windows_core::PCWSTR, access: u32) -> windows_core::Result; fn MakeResident(&self, numobjects: u32, ppobjects: *const Option) -> windows_core::Result<()>; @@ -10575,8 +10575,8 @@ pub trait ID3D12Device_Impl: ID3D12Object_Impl { fn GetCopyableFootprints(&self, presourcedesc: *const D3D12_RESOURCE_DESC, firstsubresource: u32, numsubresources: u32, baseoffset: u64, playouts: *mut D3D12_PLACED_SUBRESOURCE_FOOTPRINT, pnumrows: *mut u32, prowsizeinbytes: *mut u64, ptotalbytes: *mut u64); fn CreateQueryHeap(&self, pdesc: *const D3D12_QUERY_HEAP_DESC, riid: *const windows_core::GUID, ppvheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetStablePowerState(&self, enable: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn CreateCommandSignature(&self, pdesc: *const D3D12_COMMAND_SIGNATURE_DESC, prootsignature: Option<&ID3D12RootSignature>, riid: *const windows_core::GUID, ppvcommandsignature: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn GetResourceTiling(&self, ptiledresource: Option<&ID3D12Resource>, pnumtilesforentireresource: *mut u32, ppackedmipdesc: *mut D3D12_PACKED_MIP_INFO, pstandardtileshapefornonpackedmips: *mut D3D12_TILE_SHAPE, pnumsubresourcetilings: *mut u32, firstsubresourcetilingtoget: u32, psubresourcetilingsfornonpackedmips: *mut D3D12_SUBRESOURCE_TILING); + fn CreateCommandSignature(&self, pdesc: *const D3D12_COMMAND_SIGNATURE_DESC, prootsignature: windows_core::Ref<'_, ID3D12RootSignature>, riid: *const windows_core::GUID, ppvcommandsignature: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn GetResourceTiling(&self, ptiledresource: windows_core::Ref<'_, ID3D12Resource>, pnumtilesforentireresource: *mut u32, ppackedmipdesc: *mut D3D12_PACKED_MIP_INFO, pstandardtileshapefornonpackedmips: *mut D3D12_TILE_SHAPE, pnumsubresourcetilings: *mut u32, firstsubresourcetilingtoget: u32, psubresourcetilingsfornonpackedmips: *mut D3D12_SUBRESOURCE_TILING); fn GetAdapterLuid(&self) -> super::super::Foundation::LUID; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] @@ -10604,7 +10604,7 @@ impl ID3D12Device_Vtbl { } unsafe extern "system" fn CreateCommandList(this: *mut core::ffi::c_void, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, pcommandallocator: *mut core::ffi::c_void, pinitialstate: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppcommandlist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device_Impl::CreateCommandList(this, core::mem::transmute_copy(&nodemask), core::mem::transmute_copy(&r#type), windows_core::from_raw_borrowed(&pcommandallocator), windows_core::from_raw_borrowed(&pinitialstate), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppcommandlist)).into() + ID3D12Device_Impl::CreateCommandList(this, core::mem::transmute_copy(&nodemask), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&pcommandallocator), core::mem::transmute_copy(&pinitialstate), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppcommandlist)).into() } unsafe extern "system" fn CheckFeatureSupport(this: *mut core::ffi::c_void, feature: D3D12_FEATURE, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10628,19 +10628,19 @@ impl ID3D12Device_Vtbl { } unsafe extern "system" fn CreateShaderResourceView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D12_SHADER_RESOURCE_VIEW_DESC, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device_Impl::CreateShaderResourceView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute(&destdescriptor)) + ID3D12Device_Impl::CreateShaderResourceView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute(&destdescriptor)) } unsafe extern "system" fn CreateUnorderedAccessView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pcounterresource: *mut core::ffi::c_void, pdesc: *const D3D12_UNORDERED_ACCESS_VIEW_DESC, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device_Impl::CreateUnorderedAccessView(this, windows_core::from_raw_borrowed(&presource), windows_core::from_raw_borrowed(&pcounterresource), core::mem::transmute_copy(&pdesc), core::mem::transmute(&destdescriptor)) + ID3D12Device_Impl::CreateUnorderedAccessView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pcounterresource), core::mem::transmute_copy(&pdesc), core::mem::transmute(&destdescriptor)) } unsafe extern "system" fn CreateRenderTargetView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D12_RENDER_TARGET_VIEW_DESC, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device_Impl::CreateRenderTargetView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute(&destdescriptor)) + ID3D12Device_Impl::CreateRenderTargetView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute(&destdescriptor)) } unsafe extern "system" fn CreateDepthStencilView(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdesc: *const D3D12_DEPTH_STENCIL_VIEW_DESC, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device_Impl::CreateDepthStencilView(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute(&destdescriptor)) + ID3D12Device_Impl::CreateDepthStencilView(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdesc), core::mem::transmute(&destdescriptor)) } unsafe extern "system" fn CreateSampler(this: *mut core::ffi::c_void, pdesc: *const D3D12_SAMPLER_DESC, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10672,7 +10672,7 @@ impl ID3D12Device_Vtbl { } unsafe extern "system" fn CreatePlacedResource(this: *mut core::ffi::c_void, pheap: *mut core::ffi::c_void, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device_Impl::CreatePlacedResource(this, windows_core::from_raw_borrowed(&pheap), core::mem::transmute_copy(&heapoffset), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialstate), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() + ID3D12Device_Impl::CreatePlacedResource(this, core::mem::transmute_copy(&pheap), core::mem::transmute_copy(&heapoffset), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialstate), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() } unsafe extern "system" fn CreateReservedResource(this: *mut core::ffi::c_void, pdesc: *const D3D12_RESOURCE_DESC, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10680,7 +10680,7 @@ impl ID3D12Device_Vtbl { } unsafe extern "system" fn CreateSharedHandle(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void, pattributes: *const super::super::Security::SECURITY_ATTRIBUTES, access: u32, name: windows_core::PCWSTR, phandle: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D12Device_Impl::CreateSharedHandle(this, windows_core::from_raw_borrowed(&pobject), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&access), core::mem::transmute(&name)) { + match ID3D12Device_Impl::CreateSharedHandle(this, core::mem::transmute_copy(&pobject), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&access), core::mem::transmute(&name)) { Ok(ok__) => { phandle.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10732,11 +10732,11 @@ impl ID3D12Device_Vtbl { } unsafe extern "system" fn CreateCommandSignature(this: *mut core::ffi::c_void, pdesc: *const D3D12_COMMAND_SIGNATURE_DESC, prootsignature: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvcommandsignature: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device_Impl::CreateCommandSignature(this, core::mem::transmute_copy(&pdesc), windows_core::from_raw_borrowed(&prootsignature), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvcommandsignature)).into() + ID3D12Device_Impl::CreateCommandSignature(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&prootsignature), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvcommandsignature)).into() } unsafe extern "system" fn GetResourceTiling(this: *mut core::ffi::c_void, ptiledresource: *mut core::ffi::c_void, pnumtilesforentireresource: *mut u32, ppackedmipdesc: *mut D3D12_PACKED_MIP_INFO, pstandardtileshapefornonpackedmips: *mut D3D12_TILE_SHAPE, pnumsubresourcetilings: *mut u32, firstsubresourcetilingtoget: u32, psubresourcetilingsfornonpackedmips: *mut D3D12_SUBRESOURCE_TILING) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device_Impl::GetResourceTiling(this, windows_core::from_raw_borrowed(&ptiledresource), core::mem::transmute_copy(&pnumtilesforentireresource), core::mem::transmute_copy(&ppackedmipdesc), core::mem::transmute_copy(&pstandardtileshapefornonpackedmips), core::mem::transmute_copy(&pnumsubresourcetilings), core::mem::transmute_copy(&firstsubresourcetilingtoget), core::mem::transmute_copy(&psubresourcetilingsfornonpackedmips)) + ID3D12Device_Impl::GetResourceTiling(this, core::mem::transmute_copy(&ptiledresource), core::mem::transmute_copy(&pnumtilesforentireresource), core::mem::transmute_copy(&ppackedmipdesc), core::mem::transmute_copy(&pstandardtileshapefornonpackedmips), core::mem::transmute_copy(&pnumsubresourcetilings), core::mem::transmute_copy(&firstsubresourcetilingtoget), core::mem::transmute_copy(&psubresourcetilingsfornonpackedmips)) } unsafe extern "system" fn GetAdapterLuid(this: *mut core::ffi::c_void, result__: *mut super::super::Foundation::LUID) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10913,24 +10913,24 @@ pub struct ID3D12Device10_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] pub trait ID3D12Device10_Impl: ID3D12Device9_Impl { - fn CreateCommittedResource3(&self, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC1, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: Option<&ID3D12ProtectedResourceSession>, numcastableformats: u32, pcastableformats: *const super::Dxgi::Common::DXGI_FORMAT, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreatePlacedResource2(&self, pheap: Option<&ID3D12Heap>, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC1, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, numcastableformats: u32, pcastableformats: *const super::Dxgi::Common::DXGI_FORMAT, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateReservedResource2(&self, pdesc: *const D3D12_RESOURCE_DESC, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: Option<&ID3D12ProtectedResourceSession>, numcastableformats: u32, pcastableformats: *const super::Dxgi::Common::DXGI_FORMAT, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateCommittedResource3(&self, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC1, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: windows_core::Ref<'_, ID3D12ProtectedResourceSession>, numcastableformats: u32, pcastableformats: *const super::Dxgi::Common::DXGI_FORMAT, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreatePlacedResource2(&self, pheap: windows_core::Ref<'_, ID3D12Heap>, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC1, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, numcastableformats: u32, pcastableformats: *const super::Dxgi::Common::DXGI_FORMAT, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateReservedResource2(&self, pdesc: *const D3D12_RESOURCE_DESC, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: windows_core::Ref<'_, ID3D12ProtectedResourceSession>, numcastableformats: u32, pcastableformats: *const super::Dxgi::Common::DXGI_FORMAT, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] impl ID3D12Device10_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateCommittedResource3(this: *mut core::ffi::c_void, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC1, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: *mut core::ffi::c_void, numcastableformats: u32, pcastableformats: *const super::Dxgi::Common::DXGI_FORMAT, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device10_Impl::CreateCommittedResource3(this, core::mem::transmute_copy(&pheapproperties), core::mem::transmute_copy(&heapflags), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initiallayout), core::mem::transmute_copy(&poptimizedclearvalue), windows_core::from_raw_borrowed(&pprotectedsession), core::mem::transmute_copy(&numcastableformats), core::mem::transmute_copy(&pcastableformats), core::mem::transmute_copy(&riidresource), core::mem::transmute_copy(&ppvresource)).into() + ID3D12Device10_Impl::CreateCommittedResource3(this, core::mem::transmute_copy(&pheapproperties), core::mem::transmute_copy(&heapflags), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initiallayout), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&pprotectedsession), core::mem::transmute_copy(&numcastableformats), core::mem::transmute_copy(&pcastableformats), core::mem::transmute_copy(&riidresource), core::mem::transmute_copy(&ppvresource)).into() } unsafe extern "system" fn CreatePlacedResource2(this: *mut core::ffi::c_void, pheap: *mut core::ffi::c_void, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC1, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, numcastableformats: u32, pcastableformats: *const super::Dxgi::Common::DXGI_FORMAT, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device10_Impl::CreatePlacedResource2(this, windows_core::from_raw_borrowed(&pheap), core::mem::transmute_copy(&heapoffset), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initiallayout), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&numcastableformats), core::mem::transmute_copy(&pcastableformats), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() + ID3D12Device10_Impl::CreatePlacedResource2(this, core::mem::transmute_copy(&pheap), core::mem::transmute_copy(&heapoffset), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initiallayout), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&numcastableformats), core::mem::transmute_copy(&pcastableformats), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() } unsafe extern "system" fn CreateReservedResource2(this: *mut core::ffi::c_void, pdesc: *const D3D12_RESOURCE_DESC, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: *mut core::ffi::c_void, numcastableformats: u32, pcastableformats: *const super::Dxgi::Common::DXGI_FORMAT, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device10_Impl::CreateReservedResource2(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initiallayout), core::mem::transmute_copy(&poptimizedclearvalue), windows_core::from_raw_borrowed(&pprotectedsession), core::mem::transmute_copy(&numcastableformats), core::mem::transmute_copy(&pcastableformats), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() + ID3D12Device10_Impl::CreateReservedResource2(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initiallayout), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&pprotectedsession), core::mem::transmute_copy(&numcastableformats), core::mem::transmute_copy(&pcastableformats), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() } Self { base__: ID3D12Device9_Vtbl::new::(), @@ -11259,7 +11259,7 @@ pub struct ID3D12Device3_Vtbl { pub trait ID3D12Device3_Impl: ID3D12Device2_Impl { fn OpenExistingHeapFromAddress(&self, paddress: *const core::ffi::c_void, riid: *const windows_core::GUID, ppvheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn OpenExistingHeapFromFileMapping(&self, hfilemapping: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppvheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn EnqueueMakeResident(&self, flags: D3D12_RESIDENCY_FLAGS, numobjects: u32, ppobjects: *const Option, pfencetosignal: Option<&ID3D12Fence>, fencevaluetosignal: u64) -> windows_core::Result<()>; + fn EnqueueMakeResident(&self, flags: D3D12_RESIDENCY_FLAGS, numobjects: u32, ppobjects: *const Option, pfencetosignal: windows_core::Ref<'_, ID3D12Fence>, fencevaluetosignal: u64) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] impl ID3D12Device3_Vtbl { @@ -11274,7 +11274,7 @@ impl ID3D12Device3_Vtbl { } unsafe extern "system" fn EnqueueMakeResident(this: *mut core::ffi::c_void, flags: D3D12_RESIDENCY_FLAGS, numobjects: u32, ppobjects: *const *mut core::ffi::c_void, pfencetosignal: *mut core::ffi::c_void, fencevaluetosignal: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device3_Impl::EnqueueMakeResident(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&numobjects), core::mem::transmute_copy(&ppobjects), windows_core::from_raw_borrowed(&pfencetosignal), core::mem::transmute_copy(&fencevaluetosignal)).into() + ID3D12Device3_Impl::EnqueueMakeResident(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&numobjects), core::mem::transmute_copy(&ppobjects), core::mem::transmute_copy(&pfencetosignal), core::mem::transmute_copy(&fencevaluetosignal)).into() } Self { base__: ID3D12Device2_Vtbl::new::(), @@ -11369,9 +11369,9 @@ pub struct ID3D12Device4_Vtbl { pub trait ID3D12Device4_Impl: ID3D12Device3_Impl { fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS, riid: *const windows_core::GUID, ppcommandlist: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateProtectedResourceSession(&self, pdesc: *const D3D12_PROTECTED_RESOURCE_SESSION_DESC, riid: *const windows_core::GUID, ppsession: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateCommittedResource1(&self, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC, initialresourcestate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: Option<&ID3D12ProtectedResourceSession>, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateHeap1(&self, pdesc: *const D3D12_HEAP_DESC, pprotectedsession: Option<&ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateReservedResource1(&self, pdesc: *const D3D12_RESOURCE_DESC, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: Option<&ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateCommittedResource1(&self, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC, initialresourcestate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: windows_core::Ref<'_, ID3D12ProtectedResourceSession>, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateHeap1(&self, pdesc: *const D3D12_HEAP_DESC, pprotectedsession: windows_core::Ref<'_, ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateReservedResource1(&self, pdesc: *const D3D12_RESOURCE_DESC, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: windows_core::Ref<'_, ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetResourceAllocationInfo1(&self, visiblemask: u32, numresourcedescs: u32, presourcedescs: *const D3D12_RESOURCE_DESC, presourceallocationinfo1: *mut D3D12_RESOURCE_ALLOCATION_INFO1) -> D3D12_RESOURCE_ALLOCATION_INFO; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] @@ -11387,15 +11387,15 @@ impl ID3D12Device4_Vtbl { } unsafe extern "system" fn CreateCommittedResource1(this: *mut core::ffi::c_void, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC, initialresourcestate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: *mut core::ffi::c_void, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device4_Impl::CreateCommittedResource1(this, core::mem::transmute_copy(&pheapproperties), core::mem::transmute_copy(&heapflags), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialresourcestate), core::mem::transmute_copy(&poptimizedclearvalue), windows_core::from_raw_borrowed(&pprotectedsession), core::mem::transmute_copy(&riidresource), core::mem::transmute_copy(&ppvresource)).into() + ID3D12Device4_Impl::CreateCommittedResource1(this, core::mem::transmute_copy(&pheapproperties), core::mem::transmute_copy(&heapflags), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialresourcestate), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&pprotectedsession), core::mem::transmute_copy(&riidresource), core::mem::transmute_copy(&ppvresource)).into() } unsafe extern "system" fn CreateHeap1(this: *mut core::ffi::c_void, pdesc: *const D3D12_HEAP_DESC, pprotectedsession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvheap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device4_Impl::CreateHeap1(this, core::mem::transmute_copy(&pdesc), windows_core::from_raw_borrowed(&pprotectedsession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvheap)).into() + ID3D12Device4_Impl::CreateHeap1(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprotectedsession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvheap)).into() } unsafe extern "system" fn CreateReservedResource1(this: *mut core::ffi::c_void, pdesc: *const D3D12_RESOURCE_DESC, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device4_Impl::CreateReservedResource1(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialstate), core::mem::transmute_copy(&poptimizedclearvalue), windows_core::from_raw_borrowed(&pprotectedsession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() + ID3D12Device4_Impl::CreateReservedResource1(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialstate), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&pprotectedsession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() } unsafe extern "system" fn GetResourceAllocationInfo1(this: *mut core::ffi::c_void, result__: *mut D3D12_RESOURCE_ALLOCATION_INFO, visiblemask: u32, numresourcedescs: u32, presourcedescs: *const D3D12_RESOURCE_DESC, presourceallocationinfo1: *mut D3D12_RESOURCE_ALLOCATION_INFO1) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11486,7 +11486,7 @@ pub struct ID3D12Device5_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] pub trait ID3D12Device5_Impl: ID3D12Device4_Impl { - fn CreateLifetimeTracker(&self, powner: Option<&ID3D12LifetimeOwner>, riid: *const windows_core::GUID, ppvtracker: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateLifetimeTracker(&self, powner: windows_core::Ref<'_, ID3D12LifetimeOwner>, riid: *const windows_core::GUID, ppvtracker: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn RemoveDevice(&self); fn EnumerateMetaCommands(&self, pnummetacommands: *mut u32, pdescs: *mut D3D12_META_COMMAND_DESC) -> windows_core::Result<()>; fn EnumerateMetaCommandParameters(&self, commandid: *const windows_core::GUID, stage: D3D12_META_COMMAND_PARAMETER_STAGE, ptotalstructuresizeinbytes: *mut u32, pparametercount: *mut u32, pparameterdescs: *mut D3D12_META_COMMAND_PARAMETER_DESC) -> windows_core::Result<()>; @@ -11500,7 +11500,7 @@ impl ID3D12Device5_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateLifetimeTracker(this: *mut core::ffi::c_void, powner: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvtracker: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device5_Impl::CreateLifetimeTracker(this, windows_core::from_raw_borrowed(&powner), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvtracker)).into() + ID3D12Device5_Impl::CreateLifetimeTracker(this, core::mem::transmute_copy(&powner), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvtracker)).into() } unsafe extern "system" fn RemoveDevice(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11626,7 +11626,7 @@ pub struct ID3D12Device7_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] pub trait ID3D12Device7_Impl: ID3D12Device6_Impl { - fn AddToStateObject(&self, paddition: *const D3D12_STATE_OBJECT_DESC, pstateobjecttogrowfrom: Option<&ID3D12StateObject>, riid: *const windows_core::GUID, ppnewstateobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn AddToStateObject(&self, paddition: *const D3D12_STATE_OBJECT_DESC, pstateobjecttogrowfrom: windows_core::Ref<'_, ID3D12StateObject>, riid: *const windows_core::GUID, ppnewstateobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateProtectedResourceSession1(&self, pdesc: *const D3D12_PROTECTED_RESOURCE_SESSION_DESC1, riid: *const windows_core::GUID, ppsession: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] @@ -11634,7 +11634,7 @@ impl ID3D12Device7_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddToStateObject(this: *mut core::ffi::c_void, paddition: *const D3D12_STATE_OBJECT_DESC, pstateobjecttogrowfrom: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppnewstateobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device7_Impl::AddToStateObject(this, core::mem::transmute_copy(&paddition), windows_core::from_raw_borrowed(&pstateobjecttogrowfrom), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppnewstateobject)).into() + ID3D12Device7_Impl::AddToStateObject(this, core::mem::transmute_copy(&paddition), core::mem::transmute_copy(&pstateobjecttogrowfrom), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppnewstateobject)).into() } unsafe extern "system" fn CreateProtectedResourceSession1(this: *mut core::ffi::c_void, pdesc: *const D3D12_PROTECTED_RESOURCE_SESSION_DESC1, riid: *const windows_core::GUID, ppsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11723,9 +11723,9 @@ pub struct ID3D12Device8_Vtbl { #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] pub trait ID3D12Device8_Impl: ID3D12Device7_Impl { fn GetResourceAllocationInfo2(&self, visiblemask: u32, numresourcedescs: u32, presourcedescs: *const D3D12_RESOURCE_DESC1, presourceallocationinfo1: *mut D3D12_RESOURCE_ALLOCATION_INFO1) -> D3D12_RESOURCE_ALLOCATION_INFO; - fn CreateCommittedResource2(&self, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC1, initialresourcestate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: Option<&ID3D12ProtectedResourceSession>, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreatePlacedResource1(&self, pheap: Option<&ID3D12Heap>, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC1, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateSamplerFeedbackUnorderedAccessView(&self, ptargetedresource: Option<&ID3D12Resource>, pfeedbackresource: Option<&ID3D12Resource>, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); + fn CreateCommittedResource2(&self, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC1, initialresourcestate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: windows_core::Ref<'_, ID3D12ProtectedResourceSession>, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreatePlacedResource1(&self, pheap: windows_core::Ref<'_, ID3D12Heap>, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC1, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateSamplerFeedbackUnorderedAccessView(&self, ptargetedresource: windows_core::Ref<'_, ID3D12Resource>, pfeedbackresource: windows_core::Ref<'_, ID3D12Resource>, destdescriptor: &D3D12_CPU_DESCRIPTOR_HANDLE); fn GetCopyableFootprints1(&self, presourcedesc: *const D3D12_RESOURCE_DESC1, firstsubresource: u32, numsubresources: u32, baseoffset: u64, playouts: *mut D3D12_PLACED_SUBRESOURCE_FOOTPRINT, pnumrows: *mut u32, prowsizeinbytes: *mut u64, ptotalbytes: *mut u64); } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Security"))] @@ -11737,15 +11737,15 @@ impl ID3D12Device8_Vtbl { } unsafe extern "system" fn CreateCommittedResource2(this: *mut core::ffi::c_void, pheapproperties: *const D3D12_HEAP_PROPERTIES, heapflags: D3D12_HEAP_FLAGS, pdesc: *const D3D12_RESOURCE_DESC1, initialresourcestate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, pprotectedsession: *mut core::ffi::c_void, riidresource: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device8_Impl::CreateCommittedResource2(this, core::mem::transmute_copy(&pheapproperties), core::mem::transmute_copy(&heapflags), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialresourcestate), core::mem::transmute_copy(&poptimizedclearvalue), windows_core::from_raw_borrowed(&pprotectedsession), core::mem::transmute_copy(&riidresource), core::mem::transmute_copy(&ppvresource)).into() + ID3D12Device8_Impl::CreateCommittedResource2(this, core::mem::transmute_copy(&pheapproperties), core::mem::transmute_copy(&heapflags), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialresourcestate), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&pprotectedsession), core::mem::transmute_copy(&riidresource), core::mem::transmute_copy(&ppvresource)).into() } unsafe extern "system" fn CreatePlacedResource1(this: *mut core::ffi::c_void, pheap: *mut core::ffi::c_void, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC1, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: *const D3D12_CLEAR_VALUE, riid: *const windows_core::GUID, ppvresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device8_Impl::CreatePlacedResource1(this, windows_core::from_raw_borrowed(&pheap), core::mem::transmute_copy(&heapoffset), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialstate), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() + ID3D12Device8_Impl::CreatePlacedResource1(this, core::mem::transmute_copy(&pheap), core::mem::transmute_copy(&heapoffset), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&initialstate), core::mem::transmute_copy(&poptimizedclearvalue), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource)).into() } unsafe extern "system" fn CreateSamplerFeedbackUnorderedAccessView(this: *mut core::ffi::c_void, ptargetedresource: *mut core::ffi::c_void, pfeedbackresource: *mut core::ffi::c_void, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Device8_Impl::CreateSamplerFeedbackUnorderedAccessView(this, windows_core::from_raw_borrowed(&ptargetedresource), windows_core::from_raw_borrowed(&pfeedbackresource), core::mem::transmute(&destdescriptor)) + ID3D12Device8_Impl::CreateSamplerFeedbackUnorderedAccessView(this, core::mem::transmute_copy(&ptargetedresource), core::mem::transmute_copy(&pfeedbackresource), core::mem::transmute(&destdescriptor)) } unsafe extern "system" fn GetCopyableFootprints1(this: *mut core::ffi::c_void, presourcedesc: *const D3D12_RESOURCE_DESC1, firstsubresource: u32, numsubresources: u32, baseoffset: u64, playouts: *mut D3D12_PLACED_SUBRESOURCE_FOOTPRINT, pnumrows: *mut u32, prowsizeinbytes: *mut u64, ptotalbytes: *mut u64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11918,7 +11918,7 @@ pub struct ID3D12DeviceConfiguration_Vtbl { pub trait ID3D12DeviceConfiguration_Impl: windows_core::IUnknownImpl { fn GetDesc(&self) -> D3D12_DEVICE_CONFIGURATION_DESC; fn GetEnabledExperimentalFeatures(&self, pguids: *mut windows_core::GUID, numguids: u32) -> windows_core::Result<()>; - fn SerializeVersionedRootSignature(&self, pdesc: *const D3D12_VERSIONED_ROOT_SIGNATURE_DESC, ppresult: *mut Option, pperror: *mut Option) -> windows_core::Result<()>; + fn SerializeVersionedRootSignature(&self, pdesc: *const D3D12_VERSIONED_ROOT_SIGNATURE_DESC, ppresult: windows_core::OutRef<'_, super::Direct3D::ID3DBlob>, pperror: windows_core::OutRef<'_, super::Direct3D::ID3DBlob>) -> windows_core::Result<()>; fn CreateVersionedRootSignatureDeserializer(&self, pblob: *const core::ffi::c_void, size: usize, riid: *const windows_core::GUID, ppvdeserializer: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -12063,7 +12063,7 @@ pub trait ID3D12DeviceFactory_Impl: windows_core::IUnknownImpl { fn GetFlags(&self) -> D3D12_DEVICE_FACTORY_FLAGS; fn GetConfigurationInterface(&self, clsid: *const windows_core::GUID, iid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn EnableExperimentalFeatures(&self, numfeatures: u32, piids: *const windows_core::GUID, pconfigurationstructs: *const core::ffi::c_void, pconfigurationstructsizes: *const u32) -> windows_core::Result<()>; - fn CreateDevice(&self, adapter: Option<&windows_core::IUnknown>, featurelevel: super::Direct3D::D3D_FEATURE_LEVEL, riid: *const windows_core::GUID, ppvdevice: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateDevice(&self, adapter: windows_core::Ref<'_, windows_core::IUnknown>, featurelevel: super::Direct3D::D3D_FEATURE_LEVEL, riid: *const windows_core::GUID, ppvdevice: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12DeviceFactory_Vtbl { @@ -12094,7 +12094,7 @@ impl ID3D12DeviceFactory_Vtbl { } unsafe extern "system" fn CreateDevice(this: *mut core::ffi::c_void, adapter: *mut core::ffi::c_void, featurelevel: super::Direct3D::D3D_FEATURE_LEVEL, riid: *const windows_core::GUID, ppvdevice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12DeviceFactory_Impl::CreateDevice(this, windows_core::from_raw_borrowed(&adapter), core::mem::transmute_copy(&featurelevel), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvdevice)).into() + ID3D12DeviceFactory_Impl::CreateDevice(this, core::mem::transmute_copy(&adapter), core::mem::transmute_copy(&featurelevel), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvdevice)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -12743,10 +12743,10 @@ pub struct ID3D12GBVDiagnostics_Vtbl { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait ID3D12GBVDiagnostics_Impl: windows_core::IUnknownImpl { - fn GetGBVEntireSubresourceStatesData(&self, presource: Option<&ID3D12Resource>, pdata: *mut i32, datasize: u32) -> windows_core::Result<()>; - fn GetGBVSubresourceState(&self, presource: Option<&ID3D12Resource>, subresource: u32) -> windows_core::Result; - fn GetGBVResourceUniformState(&self, presource: Option<&ID3D12Resource>) -> windows_core::Result; - fn GetGBVResourceInfo(&self, presource: Option<&ID3D12Resource>, presourcedesc: *const D3D12_RESOURCE_DESC, presourcehash: *const u32, psubresourcestatesbyteoffset: *const u32) -> windows_core::Result<()>; + fn GetGBVEntireSubresourceStatesData(&self, presource: windows_core::Ref<'_, ID3D12Resource>, pdata: *mut i32, datasize: u32) -> windows_core::Result<()>; + fn GetGBVSubresourceState(&self, presource: windows_core::Ref<'_, ID3D12Resource>, subresource: u32) -> windows_core::Result; + fn GetGBVResourceUniformState(&self, presource: windows_core::Ref<'_, ID3D12Resource>) -> windows_core::Result; + fn GetGBVResourceInfo(&self, presource: windows_core::Ref<'_, ID3D12Resource>, presourcedesc: *const D3D12_RESOURCE_DESC, presourcehash: *const u32, psubresourcestatesbyteoffset: *const u32) -> windows_core::Result<()>; fn GBVReserved0(&self); fn GBVReserved1(&self); } @@ -12755,11 +12755,11 @@ impl ID3D12GBVDiagnostics_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetGBVEntireSubresourceStatesData(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdata: *mut i32, datasize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GBVDiagnostics_Impl::GetGBVEntireSubresourceStatesData(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&datasize)).into() + ID3D12GBVDiagnostics_Impl::GetGBVEntireSubresourceStatesData(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&datasize)).into() } unsafe extern "system" fn GetGBVSubresourceState(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, pdata: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D12GBVDiagnostics_Impl::GetGBVSubresourceState(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource)) { + match ID3D12GBVDiagnostics_Impl::GetGBVSubresourceState(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource)) { Ok(ok__) => { pdata.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12769,7 +12769,7 @@ impl ID3D12GBVDiagnostics_Vtbl { } unsafe extern "system" fn GetGBVResourceUniformState(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pdata: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D12GBVDiagnostics_Impl::GetGBVResourceUniformState(this, windows_core::from_raw_borrowed(&presource)) { + match ID3D12GBVDiagnostics_Impl::GetGBVResourceUniformState(this, core::mem::transmute_copy(&presource)) { Ok(ok__) => { pdata.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12779,7 +12779,7 @@ impl ID3D12GBVDiagnostics_Vtbl { } unsafe extern "system" fn GetGBVResourceInfo(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, presourcedesc: *const D3D12_RESOURCE_DESC, presourcehash: *const u32, psubresourcestatesbyteoffset: *const u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GBVDiagnostics_Impl::GetGBVResourceInfo(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&presourcedesc), core::mem::transmute_copy(&presourcehash), core::mem::transmute_copy(&psubresourcestatesbyteoffset)).into() + ID3D12GBVDiagnostics_Impl::GetGBVResourceInfo(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&presourcedesc), core::mem::transmute_copy(&presourcehash), core::mem::transmute_copy(&psubresourcestatesbyteoffset)).into() } unsafe extern "system" fn GBVReserved0(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13108,27 +13108,27 @@ pub struct ID3D12GraphicsCommandList_Vtbl { #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12GraphicsCommandList_Impl: ID3D12CommandList_Impl { fn Close(&self) -> windows_core::Result<()>; - fn Reset(&self, pallocator: Option<&ID3D12CommandAllocator>, pinitialstate: Option<&ID3D12PipelineState>) -> windows_core::Result<()>; - fn ClearState(&self, ppipelinestate: Option<&ID3D12PipelineState>); + fn Reset(&self, pallocator: windows_core::Ref<'_, ID3D12CommandAllocator>, pinitialstate: windows_core::Ref<'_, ID3D12PipelineState>) -> windows_core::Result<()>; + fn ClearState(&self, ppipelinestate: windows_core::Ref<'_, ID3D12PipelineState>); fn DrawInstanced(&self, vertexcountperinstance: u32, instancecount: u32, startvertexlocation: u32, startinstancelocation: u32); fn DrawIndexedInstanced(&self, indexcountperinstance: u32, instancecount: u32, startindexlocation: u32, basevertexlocation: i32, startinstancelocation: u32); fn Dispatch(&self, threadgroupcountx: u32, threadgroupcounty: u32, threadgroupcountz: u32); - fn CopyBufferRegion(&self, pdstbuffer: Option<&ID3D12Resource>, dstoffset: u64, psrcbuffer: Option<&ID3D12Resource>, srcoffset: u64, numbytes: u64); + fn CopyBufferRegion(&self, pdstbuffer: windows_core::Ref<'_, ID3D12Resource>, dstoffset: u64, psrcbuffer: windows_core::Ref<'_, ID3D12Resource>, srcoffset: u64, numbytes: u64); fn CopyTextureRegion(&self, pdst: *const D3D12_TEXTURE_COPY_LOCATION, dstx: u32, dsty: u32, dstz: u32, psrc: *const D3D12_TEXTURE_COPY_LOCATION, psrcbox: *const D3D12_BOX); - fn CopyResource(&self, pdstresource: Option<&ID3D12Resource>, psrcresource: Option<&ID3D12Resource>); - fn CopyTiles(&self, ptiledresource: Option<&ID3D12Resource>, ptileregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D12_TILE_REGION_SIZE, pbuffer: Option<&ID3D12Resource>, bufferstartoffsetinbytes: u64, flags: D3D12_TILE_COPY_FLAGS); - fn ResolveSubresource(&self, pdstresource: Option<&ID3D12Resource>, dstsubresource: u32, psrcresource: Option<&ID3D12Resource>, srcsubresource: u32, format: super::Dxgi::Common::DXGI_FORMAT); + fn CopyResource(&self, pdstresource: windows_core::Ref<'_, ID3D12Resource>, psrcresource: windows_core::Ref<'_, ID3D12Resource>); + fn CopyTiles(&self, ptiledresource: windows_core::Ref<'_, ID3D12Resource>, ptileregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D12_TILE_REGION_SIZE, pbuffer: windows_core::Ref<'_, ID3D12Resource>, bufferstartoffsetinbytes: u64, flags: D3D12_TILE_COPY_FLAGS); + fn ResolveSubresource(&self, pdstresource: windows_core::Ref<'_, ID3D12Resource>, dstsubresource: u32, psrcresource: windows_core::Ref<'_, ID3D12Resource>, srcsubresource: u32, format: super::Dxgi::Common::DXGI_FORMAT); fn IASetPrimitiveTopology(&self, primitivetopology: super::Direct3D::D3D_PRIMITIVE_TOPOLOGY); fn RSSetViewports(&self, numviewports: u32, pviewports: *const D3D12_VIEWPORT); fn RSSetScissorRects(&self, numrects: u32, prects: *const super::super::Foundation::RECT); fn OMSetBlendFactor(&self, blendfactor: *const f32); fn OMSetStencilRef(&self, stencilref: u32); - fn SetPipelineState(&self, ppipelinestate: Option<&ID3D12PipelineState>); + fn SetPipelineState(&self, ppipelinestate: windows_core::Ref<'_, ID3D12PipelineState>); fn ResourceBarrier(&self, numbarriers: u32, pbarriers: *const D3D12_RESOURCE_BARRIER); - fn ExecuteBundle(&self, pcommandlist: Option<&ID3D12GraphicsCommandList>); + fn ExecuteBundle(&self, pcommandlist: windows_core::Ref<'_, ID3D12GraphicsCommandList>); fn SetDescriptorHeaps(&self, numdescriptorheaps: u32, ppdescriptorheaps: *const Option); - fn SetComputeRootSignature(&self, prootsignature: Option<&ID3D12RootSignature>); - fn SetGraphicsRootSignature(&self, prootsignature: Option<&ID3D12RootSignature>); + fn SetComputeRootSignature(&self, prootsignature: windows_core::Ref<'_, ID3D12RootSignature>); + fn SetGraphicsRootSignature(&self, prootsignature: windows_core::Ref<'_, ID3D12RootSignature>); fn SetComputeRootDescriptorTable(&self, rootparameterindex: u32, basedescriptor: &D3D12_GPU_DESCRIPTOR_HANDLE); fn SetGraphicsRootDescriptorTable(&self, rootparameterindex: u32, basedescriptor: &D3D12_GPU_DESCRIPTOR_HANDLE); fn SetComputeRoot32BitConstant(&self, rootparameterindex: u32, srcdata: u32, destoffsetin32bitvalues: u32); @@ -13147,17 +13147,17 @@ pub trait ID3D12GraphicsCommandList_Impl: ID3D12CommandList_Impl { fn OMSetRenderTargets(&self, numrendertargetdescriptors: u32, prendertargetdescriptors: *const D3D12_CPU_DESCRIPTOR_HANDLE, rtssinglehandletodescriptorrange: super::super::Foundation::BOOL, pdepthstencildescriptor: *const D3D12_CPU_DESCRIPTOR_HANDLE); fn ClearDepthStencilView(&self, depthstencilview: &D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, numrects: u32, prects: *const super::super::Foundation::RECT); fn ClearRenderTargetView(&self, rendertargetview: &D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: *const f32, numrects: u32, prects: *const super::super::Foundation::RECT); - fn ClearUnorderedAccessViewUint(&self, viewgpuhandleincurrentheap: &D3D12_GPU_DESCRIPTOR_HANDLE, viewcpuhandle: &D3D12_CPU_DESCRIPTOR_HANDLE, presource: Option<&ID3D12Resource>, values: *const u32, numrects: u32, prects: *const super::super::Foundation::RECT); - fn ClearUnorderedAccessViewFloat(&self, viewgpuhandleincurrentheap: &D3D12_GPU_DESCRIPTOR_HANDLE, viewcpuhandle: &D3D12_CPU_DESCRIPTOR_HANDLE, presource: Option<&ID3D12Resource>, values: *const f32, numrects: u32, prects: *const super::super::Foundation::RECT); - fn DiscardResource(&self, presource: Option<&ID3D12Resource>, pregion: *const D3D12_DISCARD_REGION); - fn BeginQuery(&self, pqueryheap: Option<&ID3D12QueryHeap>, r#type: D3D12_QUERY_TYPE, index: u32); - fn EndQuery(&self, pqueryheap: Option<&ID3D12QueryHeap>, r#type: D3D12_QUERY_TYPE, index: u32); - fn ResolveQueryData(&self, pqueryheap: Option<&ID3D12QueryHeap>, r#type: D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: Option<&ID3D12Resource>, aligneddestinationbufferoffset: u64); - fn SetPredication(&self, pbuffer: Option<&ID3D12Resource>, alignedbufferoffset: u64, operation: D3D12_PREDICATION_OP); + fn ClearUnorderedAccessViewUint(&self, viewgpuhandleincurrentheap: &D3D12_GPU_DESCRIPTOR_HANDLE, viewcpuhandle: &D3D12_CPU_DESCRIPTOR_HANDLE, presource: windows_core::Ref<'_, ID3D12Resource>, values: *const u32, numrects: u32, prects: *const super::super::Foundation::RECT); + fn ClearUnorderedAccessViewFloat(&self, viewgpuhandleincurrentheap: &D3D12_GPU_DESCRIPTOR_HANDLE, viewcpuhandle: &D3D12_CPU_DESCRIPTOR_HANDLE, presource: windows_core::Ref<'_, ID3D12Resource>, values: *const f32, numrects: u32, prects: *const super::super::Foundation::RECT); + fn DiscardResource(&self, presource: windows_core::Ref<'_, ID3D12Resource>, pregion: *const D3D12_DISCARD_REGION); + fn BeginQuery(&self, pqueryheap: windows_core::Ref<'_, ID3D12QueryHeap>, r#type: D3D12_QUERY_TYPE, index: u32); + fn EndQuery(&self, pqueryheap: windows_core::Ref<'_, ID3D12QueryHeap>, r#type: D3D12_QUERY_TYPE, index: u32); + fn ResolveQueryData(&self, pqueryheap: windows_core::Ref<'_, ID3D12QueryHeap>, r#type: D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: windows_core::Ref<'_, ID3D12Resource>, aligneddestinationbufferoffset: u64); + fn SetPredication(&self, pbuffer: windows_core::Ref<'_, ID3D12Resource>, alignedbufferoffset: u64, operation: D3D12_PREDICATION_OP); fn SetMarker(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn BeginEvent(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn EndEvent(&self); - fn ExecuteIndirect(&self, pcommandsignature: Option<&ID3D12CommandSignature>, maxcommandcount: u32, pargumentbuffer: Option<&ID3D12Resource>, argumentbufferoffset: u64, pcountbuffer: Option<&ID3D12Resource>, countbufferoffset: u64); + fn ExecuteIndirect(&self, pcommandsignature: windows_core::Ref<'_, ID3D12CommandSignature>, maxcommandcount: u32, pargumentbuffer: windows_core::Ref<'_, ID3D12Resource>, argumentbufferoffset: u64, pcountbuffer: windows_core::Ref<'_, ID3D12Resource>, countbufferoffset: u64); } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D12GraphicsCommandList_Vtbl { @@ -13168,11 +13168,11 @@ impl ID3D12GraphicsCommandList_Vtbl { } unsafe extern "system" fn Reset(this: *mut core::ffi::c_void, pallocator: *mut core::ffi::c_void, pinitialstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::Reset(this, windows_core::from_raw_borrowed(&pallocator), windows_core::from_raw_borrowed(&pinitialstate)).into() + ID3D12GraphicsCommandList_Impl::Reset(this, core::mem::transmute_copy(&pallocator), core::mem::transmute_copy(&pinitialstate)).into() } unsafe extern "system" fn ClearState(this: *mut core::ffi::c_void, ppipelinestate: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::ClearState(this, windows_core::from_raw_borrowed(&ppipelinestate)) + ID3D12GraphicsCommandList_Impl::ClearState(this, core::mem::transmute_copy(&ppipelinestate)) } unsafe extern "system" fn DrawInstanced(this: *mut core::ffi::c_void, vertexcountperinstance: u32, instancecount: u32, startvertexlocation: u32, startinstancelocation: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13188,7 +13188,7 @@ impl ID3D12GraphicsCommandList_Vtbl { } unsafe extern "system" fn CopyBufferRegion(this: *mut core::ffi::c_void, pdstbuffer: *mut core::ffi::c_void, dstoffset: u64, psrcbuffer: *mut core::ffi::c_void, srcoffset: u64, numbytes: u64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::CopyBufferRegion(this, windows_core::from_raw_borrowed(&pdstbuffer), core::mem::transmute_copy(&dstoffset), windows_core::from_raw_borrowed(&psrcbuffer), core::mem::transmute_copy(&srcoffset), core::mem::transmute_copy(&numbytes)) + ID3D12GraphicsCommandList_Impl::CopyBufferRegion(this, core::mem::transmute_copy(&pdstbuffer), core::mem::transmute_copy(&dstoffset), core::mem::transmute_copy(&psrcbuffer), core::mem::transmute_copy(&srcoffset), core::mem::transmute_copy(&numbytes)) } unsafe extern "system" fn CopyTextureRegion(this: *mut core::ffi::c_void, pdst: *const D3D12_TEXTURE_COPY_LOCATION, dstx: u32, dsty: u32, dstz: u32, psrc: *const D3D12_TEXTURE_COPY_LOCATION, psrcbox: *const D3D12_BOX) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13196,15 +13196,15 @@ impl ID3D12GraphicsCommandList_Vtbl { } unsafe extern "system" fn CopyResource(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, psrcresource: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::CopyResource(this, windows_core::from_raw_borrowed(&pdstresource), windows_core::from_raw_borrowed(&psrcresource)) + ID3D12GraphicsCommandList_Impl::CopyResource(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&psrcresource)) } unsafe extern "system" fn CopyTiles(this: *mut core::ffi::c_void, ptiledresource: *mut core::ffi::c_void, ptileregionstartcoordinate: *const D3D12_TILED_RESOURCE_COORDINATE, ptileregionsize: *const D3D12_TILE_REGION_SIZE, pbuffer: *mut core::ffi::c_void, bufferstartoffsetinbytes: u64, flags: D3D12_TILE_COPY_FLAGS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::CopyTiles(this, windows_core::from_raw_borrowed(&ptiledresource), core::mem::transmute_copy(&ptileregionstartcoordinate), core::mem::transmute_copy(&ptileregionsize), windows_core::from_raw_borrowed(&pbuffer), core::mem::transmute_copy(&bufferstartoffsetinbytes), core::mem::transmute_copy(&flags)) + ID3D12GraphicsCommandList_Impl::CopyTiles(this, core::mem::transmute_copy(&ptiledresource), core::mem::transmute_copy(&ptileregionstartcoordinate), core::mem::transmute_copy(&ptileregionsize), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&bufferstartoffsetinbytes), core::mem::transmute_copy(&flags)) } unsafe extern "system" fn ResolveSubresource(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, psrcresource: *mut core::ffi::c_void, srcsubresource: u32, format: super::Dxgi::Common::DXGI_FORMAT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::ResolveSubresource(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), windows_core::from_raw_borrowed(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&format)) + ID3D12GraphicsCommandList_Impl::ResolveSubresource(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&format)) } unsafe extern "system" fn IASetPrimitiveTopology(this: *mut core::ffi::c_void, primitivetopology: super::Direct3D::D3D_PRIMITIVE_TOPOLOGY) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13228,7 +13228,7 @@ impl ID3D12GraphicsCommandList_Vtbl { } unsafe extern "system" fn SetPipelineState(this: *mut core::ffi::c_void, ppipelinestate: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::SetPipelineState(this, windows_core::from_raw_borrowed(&ppipelinestate)) + ID3D12GraphicsCommandList_Impl::SetPipelineState(this, core::mem::transmute_copy(&ppipelinestate)) } unsafe extern "system" fn ResourceBarrier(this: *mut core::ffi::c_void, numbarriers: u32, pbarriers: *const D3D12_RESOURCE_BARRIER) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13236,7 +13236,7 @@ impl ID3D12GraphicsCommandList_Vtbl { } unsafe extern "system" fn ExecuteBundle(this: *mut core::ffi::c_void, pcommandlist: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::ExecuteBundle(this, windows_core::from_raw_borrowed(&pcommandlist)) + ID3D12GraphicsCommandList_Impl::ExecuteBundle(this, core::mem::transmute_copy(&pcommandlist)) } unsafe extern "system" fn SetDescriptorHeaps(this: *mut core::ffi::c_void, numdescriptorheaps: u32, ppdescriptorheaps: *const *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13244,11 +13244,11 @@ impl ID3D12GraphicsCommandList_Vtbl { } unsafe extern "system" fn SetComputeRootSignature(this: *mut core::ffi::c_void, prootsignature: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::SetComputeRootSignature(this, windows_core::from_raw_borrowed(&prootsignature)) + ID3D12GraphicsCommandList_Impl::SetComputeRootSignature(this, core::mem::transmute_copy(&prootsignature)) } unsafe extern "system" fn SetGraphicsRootSignature(this: *mut core::ffi::c_void, prootsignature: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::SetGraphicsRootSignature(this, windows_core::from_raw_borrowed(&prootsignature)) + ID3D12GraphicsCommandList_Impl::SetGraphicsRootSignature(this, core::mem::transmute_copy(&prootsignature)) } unsafe extern "system" fn SetComputeRootDescriptorTable(this: *mut core::ffi::c_void, rootparameterindex: u32, basedescriptor: D3D12_GPU_DESCRIPTOR_HANDLE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13324,31 +13324,31 @@ impl ID3D12GraphicsCommandList_Vtbl { } unsafe extern "system" fn ClearUnorderedAccessViewUint(this: *mut core::ffi::c_void, viewgpuhandleincurrentheap: D3D12_GPU_DESCRIPTOR_HANDLE, viewcpuhandle: D3D12_CPU_DESCRIPTOR_HANDLE, presource: *mut core::ffi::c_void, values: *const u32, numrects: u32, prects: *const super::super::Foundation::RECT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::ClearUnorderedAccessViewUint(this, core::mem::transmute(&viewgpuhandleincurrentheap), core::mem::transmute(&viewcpuhandle), windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&values), core::mem::transmute_copy(&numrects), core::mem::transmute_copy(&prects)) + ID3D12GraphicsCommandList_Impl::ClearUnorderedAccessViewUint(this, core::mem::transmute(&viewgpuhandleincurrentheap), core::mem::transmute(&viewcpuhandle), core::mem::transmute_copy(&presource), core::mem::transmute_copy(&values), core::mem::transmute_copy(&numrects), core::mem::transmute_copy(&prects)) } unsafe extern "system" fn ClearUnorderedAccessViewFloat(this: *mut core::ffi::c_void, viewgpuhandleincurrentheap: D3D12_GPU_DESCRIPTOR_HANDLE, viewcpuhandle: D3D12_CPU_DESCRIPTOR_HANDLE, presource: *mut core::ffi::c_void, values: *const f32, numrects: u32, prects: *const super::super::Foundation::RECT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::ClearUnorderedAccessViewFloat(this, core::mem::transmute(&viewgpuhandleincurrentheap), core::mem::transmute(&viewcpuhandle), windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&values), core::mem::transmute_copy(&numrects), core::mem::transmute_copy(&prects)) + ID3D12GraphicsCommandList_Impl::ClearUnorderedAccessViewFloat(this, core::mem::transmute(&viewgpuhandleincurrentheap), core::mem::transmute(&viewcpuhandle), core::mem::transmute_copy(&presource), core::mem::transmute_copy(&values), core::mem::transmute_copy(&numrects), core::mem::transmute_copy(&prects)) } unsafe extern "system" fn DiscardResource(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pregion: *const D3D12_DISCARD_REGION) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::DiscardResource(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pregion)) + ID3D12GraphicsCommandList_Impl::DiscardResource(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pregion)) } unsafe extern "system" fn BeginQuery(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: D3D12_QUERY_TYPE, index: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::BeginQuery(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) + ID3D12GraphicsCommandList_Impl::BeginQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) } unsafe extern "system" fn EndQuery(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: D3D12_QUERY_TYPE, index: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::EndQuery(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) + ID3D12GraphicsCommandList_Impl::EndQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) } unsafe extern "system" fn ResolveQueryData(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: *mut core::ffi::c_void, aligneddestinationbufferoffset: u64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::ResolveQueryData(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), windows_core::from_raw_borrowed(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset)) + ID3D12GraphicsCommandList_Impl::ResolveQueryData(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), core::mem::transmute_copy(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset)) } unsafe extern "system" fn SetPredication(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void, alignedbufferoffset: u64, operation: D3D12_PREDICATION_OP) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::SetPredication(this, windows_core::from_raw_borrowed(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation)) + ID3D12GraphicsCommandList_Impl::SetPredication(this, core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation)) } unsafe extern "system" fn SetMarker(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13364,7 +13364,7 @@ impl ID3D12GraphicsCommandList_Vtbl { } unsafe extern "system" fn ExecuteIndirect(this: *mut core::ffi::c_void, pcommandsignature: *mut core::ffi::c_void, maxcommandcount: u32, pargumentbuffer: *mut core::ffi::c_void, argumentbufferoffset: u64, pcountbuffer: *mut core::ffi::c_void, countbufferoffset: u64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList_Impl::ExecuteIndirect(this, windows_core::from_raw_borrowed(&pcommandsignature), core::mem::transmute_copy(&maxcommandcount), windows_core::from_raw_borrowed(&pargumentbuffer), core::mem::transmute_copy(&argumentbufferoffset), windows_core::from_raw_borrowed(&pcountbuffer), core::mem::transmute_copy(&countbufferoffset)) + ID3D12GraphicsCommandList_Impl::ExecuteIndirect(this, core::mem::transmute_copy(&pcommandsignature), core::mem::transmute_copy(&maxcommandcount), core::mem::transmute_copy(&pargumentbuffer), core::mem::transmute_copy(&argumentbufferoffset), core::mem::transmute_copy(&pcountbuffer), core::mem::transmute_copy(&countbufferoffset)) } Self { base__: ID3D12CommandList_Vtbl::new::(), @@ -13487,11 +13487,11 @@ pub struct ID3D12GraphicsCommandList1_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12GraphicsCommandList1_Impl: ID3D12GraphicsCommandList_Impl { - fn AtomicCopyBufferUINT(&self, pdstbuffer: Option<&ID3D12Resource>, dstoffset: u64, psrcbuffer: Option<&ID3D12Resource>, srcoffset: u64, dependencies: u32, ppdependentresources: *const Option, pdependentsubresourceranges: *const D3D12_SUBRESOURCE_RANGE_UINT64); - fn AtomicCopyBufferUINT64(&self, pdstbuffer: Option<&ID3D12Resource>, dstoffset: u64, psrcbuffer: Option<&ID3D12Resource>, srcoffset: u64, dependencies: u32, ppdependentresources: *const Option, pdependentsubresourceranges: *const D3D12_SUBRESOURCE_RANGE_UINT64); + fn AtomicCopyBufferUINT(&self, pdstbuffer: windows_core::Ref<'_, ID3D12Resource>, dstoffset: u64, psrcbuffer: windows_core::Ref<'_, ID3D12Resource>, srcoffset: u64, dependencies: u32, ppdependentresources: *const Option, pdependentsubresourceranges: *const D3D12_SUBRESOURCE_RANGE_UINT64); + fn AtomicCopyBufferUINT64(&self, pdstbuffer: windows_core::Ref<'_, ID3D12Resource>, dstoffset: u64, psrcbuffer: windows_core::Ref<'_, ID3D12Resource>, srcoffset: u64, dependencies: u32, ppdependentresources: *const Option, pdependentsubresourceranges: *const D3D12_SUBRESOURCE_RANGE_UINT64); fn OMSetDepthBounds(&self, min: f32, max: f32); fn SetSamplePositions(&self, numsamplesperpixel: u32, numpixels: u32, psamplepositions: *const D3D12_SAMPLE_POSITION); - fn ResolveSubresourceRegion(&self, pdstresource: Option<&ID3D12Resource>, dstsubresource: u32, dstx: u32, dsty: u32, psrcresource: Option<&ID3D12Resource>, srcsubresource: u32, psrcrect: *const super::super::Foundation::RECT, format: super::Dxgi::Common::DXGI_FORMAT, resolvemode: D3D12_RESOLVE_MODE); + fn ResolveSubresourceRegion(&self, pdstresource: windows_core::Ref<'_, ID3D12Resource>, dstsubresource: u32, dstx: u32, dsty: u32, psrcresource: windows_core::Ref<'_, ID3D12Resource>, srcsubresource: u32, psrcrect: *const super::super::Foundation::RECT, format: super::Dxgi::Common::DXGI_FORMAT, resolvemode: D3D12_RESOLVE_MODE); fn SetViewInstanceMask(&self, mask: u32); } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] @@ -13499,11 +13499,11 @@ impl ID3D12GraphicsCommandList1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AtomicCopyBufferUINT(this: *mut core::ffi::c_void, pdstbuffer: *mut core::ffi::c_void, dstoffset: u64, psrcbuffer: *mut core::ffi::c_void, srcoffset: u64, dependencies: u32, ppdependentresources: *const *mut core::ffi::c_void, pdependentsubresourceranges: *const D3D12_SUBRESOURCE_RANGE_UINT64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList1_Impl::AtomicCopyBufferUINT(this, windows_core::from_raw_borrowed(&pdstbuffer), core::mem::transmute_copy(&dstoffset), windows_core::from_raw_borrowed(&psrcbuffer), core::mem::transmute_copy(&srcoffset), core::mem::transmute_copy(&dependencies), core::mem::transmute_copy(&ppdependentresources), core::mem::transmute_copy(&pdependentsubresourceranges)) + ID3D12GraphicsCommandList1_Impl::AtomicCopyBufferUINT(this, core::mem::transmute_copy(&pdstbuffer), core::mem::transmute_copy(&dstoffset), core::mem::transmute_copy(&psrcbuffer), core::mem::transmute_copy(&srcoffset), core::mem::transmute_copy(&dependencies), core::mem::transmute_copy(&ppdependentresources), core::mem::transmute_copy(&pdependentsubresourceranges)) } unsafe extern "system" fn AtomicCopyBufferUINT64(this: *mut core::ffi::c_void, pdstbuffer: *mut core::ffi::c_void, dstoffset: u64, psrcbuffer: *mut core::ffi::c_void, srcoffset: u64, dependencies: u32, ppdependentresources: *const *mut core::ffi::c_void, pdependentsubresourceranges: *const D3D12_SUBRESOURCE_RANGE_UINT64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList1_Impl::AtomicCopyBufferUINT64(this, windows_core::from_raw_borrowed(&pdstbuffer), core::mem::transmute_copy(&dstoffset), windows_core::from_raw_borrowed(&psrcbuffer), core::mem::transmute_copy(&srcoffset), core::mem::transmute_copy(&dependencies), core::mem::transmute_copy(&ppdependentresources), core::mem::transmute_copy(&pdependentsubresourceranges)) + ID3D12GraphicsCommandList1_Impl::AtomicCopyBufferUINT64(this, core::mem::transmute_copy(&pdstbuffer), core::mem::transmute_copy(&dstoffset), core::mem::transmute_copy(&psrcbuffer), core::mem::transmute_copy(&srcoffset), core::mem::transmute_copy(&dependencies), core::mem::transmute_copy(&ppdependentresources), core::mem::transmute_copy(&pdependentsubresourceranges)) } unsafe extern "system" fn OMSetDepthBounds(this: *mut core::ffi::c_void, min: f32, max: f32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13515,7 +13515,7 @@ impl ID3D12GraphicsCommandList1_Vtbl { } unsafe extern "system" fn ResolveSubresourceRegion(this: *mut core::ffi::c_void, pdstresource: *mut core::ffi::c_void, dstsubresource: u32, dstx: u32, dsty: u32, psrcresource: *mut core::ffi::c_void, srcsubresource: u32, psrcrect: *const super::super::Foundation::RECT, format: super::Dxgi::Common::DXGI_FORMAT, resolvemode: D3D12_RESOLVE_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList1_Impl::ResolveSubresourceRegion(this, windows_core::from_raw_borrowed(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&dstx), core::mem::transmute_copy(&dsty), windows_core::from_raw_borrowed(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcrect), core::mem::transmute_copy(&format), core::mem::transmute_copy(&resolvemode)) + ID3D12GraphicsCommandList1_Impl::ResolveSubresourceRegion(this, core::mem::transmute_copy(&pdstresource), core::mem::transmute_copy(&dstsubresource), core::mem::transmute_copy(&dstx), core::mem::transmute_copy(&dsty), core::mem::transmute_copy(&psrcresource), core::mem::transmute_copy(&srcsubresource), core::mem::transmute_copy(&psrcrect), core::mem::transmute_copy(&format), core::mem::transmute_copy(&resolvemode)) } unsafe extern "system" fn SetViewInstanceMask(this: *mut core::ffi::c_void, mask: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13672,14 +13672,14 @@ pub struct ID3D12GraphicsCommandList3_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12GraphicsCommandList3_Impl: ID3D12GraphicsCommandList2_Impl { - fn SetProtectedResourceSession(&self, pprotectedresourcesession: Option<&ID3D12ProtectedResourceSession>); + fn SetProtectedResourceSession(&self, pprotectedresourcesession: windows_core::Ref<'_, ID3D12ProtectedResourceSession>); } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D12GraphicsCommandList3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetProtectedResourceSession(this: *mut core::ffi::c_void, pprotectedresourcesession: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList3_Impl::SetProtectedResourceSession(this, windows_core::from_raw_borrowed(&pprotectedresourcesession)) + ID3D12GraphicsCommandList3_Impl::SetProtectedResourceSession(this, core::mem::transmute_copy(&pprotectedresourcesession)) } Self { base__: ID3D12GraphicsCommandList2_Vtbl::new::(), SetProtectedResourceSession: SetProtectedResourceSession:: } } @@ -13764,12 +13764,12 @@ pub struct ID3D12GraphicsCommandList4_Vtbl { pub trait ID3D12GraphicsCommandList4_Impl: ID3D12GraphicsCommandList3_Impl { fn BeginRenderPass(&self, numrendertargets: u32, prendertargets: *const D3D12_RENDER_PASS_RENDER_TARGET_DESC, pdepthstencil: *const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC, flags: D3D12_RENDER_PASS_FLAGS); fn EndRenderPass(&self); - fn InitializeMetaCommand(&self, pmetacommand: Option<&ID3D12MetaCommand>, pinitializationparametersdata: *const core::ffi::c_void, initializationparametersdatasizeinbytes: usize); - fn ExecuteMetaCommand(&self, pmetacommand: Option<&ID3D12MetaCommand>, pexecutionparametersdata: *const core::ffi::c_void, executionparametersdatasizeinbytes: usize); + fn InitializeMetaCommand(&self, pmetacommand: windows_core::Ref<'_, ID3D12MetaCommand>, pinitializationparametersdata: *const core::ffi::c_void, initializationparametersdatasizeinbytes: usize); + fn ExecuteMetaCommand(&self, pmetacommand: windows_core::Ref<'_, ID3D12MetaCommand>, pexecutionparametersdata: *const core::ffi::c_void, executionparametersdatasizeinbytes: usize); fn BuildRaytracingAccelerationStructure(&self, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, numpostbuildinfodescs: u32, ppostbuildinfodescs: *const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC); fn EmitRaytracingAccelerationStructurePostbuildInfo(&self, pdesc: *const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC, numsourceaccelerationstructures: u32, psourceaccelerationstructuredata: *const u64); fn CopyRaytracingAccelerationStructure(&self, destaccelerationstructuredata: u64, sourceaccelerationstructuredata: u64, mode: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE); - fn SetPipelineState1(&self, pstateobject: Option<&ID3D12StateObject>); + fn SetPipelineState1(&self, pstateobject: windows_core::Ref<'_, ID3D12StateObject>); fn DispatchRays(&self, pdesc: *const D3D12_DISPATCH_RAYS_DESC); } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] @@ -13785,11 +13785,11 @@ impl ID3D12GraphicsCommandList4_Vtbl { } unsafe extern "system" fn InitializeMetaCommand(this: *mut core::ffi::c_void, pmetacommand: *mut core::ffi::c_void, pinitializationparametersdata: *const core::ffi::c_void, initializationparametersdatasizeinbytes: usize) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList4_Impl::InitializeMetaCommand(this, windows_core::from_raw_borrowed(&pmetacommand), core::mem::transmute_copy(&pinitializationparametersdata), core::mem::transmute_copy(&initializationparametersdatasizeinbytes)) + ID3D12GraphicsCommandList4_Impl::InitializeMetaCommand(this, core::mem::transmute_copy(&pmetacommand), core::mem::transmute_copy(&pinitializationparametersdata), core::mem::transmute_copy(&initializationparametersdatasizeinbytes)) } unsafe extern "system" fn ExecuteMetaCommand(this: *mut core::ffi::c_void, pmetacommand: *mut core::ffi::c_void, pexecutionparametersdata: *const core::ffi::c_void, executionparametersdatasizeinbytes: usize) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList4_Impl::ExecuteMetaCommand(this, windows_core::from_raw_borrowed(&pmetacommand), core::mem::transmute_copy(&pexecutionparametersdata), core::mem::transmute_copy(&executionparametersdatasizeinbytes)) + ID3D12GraphicsCommandList4_Impl::ExecuteMetaCommand(this, core::mem::transmute_copy(&pmetacommand), core::mem::transmute_copy(&pexecutionparametersdata), core::mem::transmute_copy(&executionparametersdatasizeinbytes)) } unsafe extern "system" fn BuildRaytracingAccelerationStructure(this: *mut core::ffi::c_void, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, numpostbuildinfodescs: u32, ppostbuildinfodescs: *const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13805,7 +13805,7 @@ impl ID3D12GraphicsCommandList4_Vtbl { } unsafe extern "system" fn SetPipelineState1(this: *mut core::ffi::c_void, pstateobject: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList4_Impl::SetPipelineState1(this, windows_core::from_raw_borrowed(&pstateobject)) + ID3D12GraphicsCommandList4_Impl::SetPipelineState1(this, core::mem::transmute_copy(&pstateobject)) } unsafe extern "system" fn DispatchRays(this: *mut core::ffi::c_void, pdesc: *const D3D12_DISPATCH_RAYS_DESC) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13862,7 +13862,7 @@ pub struct ID3D12GraphicsCommandList5_Vtbl { #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12GraphicsCommandList5_Impl: ID3D12GraphicsCommandList4_Impl { fn RSSetShadingRate(&self, baseshadingrate: D3D12_SHADING_RATE, combiners: *const D3D12_SHADING_RATE_COMBINER); - fn RSSetShadingRateImage(&self, shadingrateimage: Option<&ID3D12Resource>); + fn RSSetShadingRateImage(&self, shadingrateimage: windows_core::Ref<'_, ID3D12Resource>); } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D12GraphicsCommandList5_Vtbl { @@ -13873,7 +13873,7 @@ impl ID3D12GraphicsCommandList5_Vtbl { } unsafe extern "system" fn RSSetShadingRateImage(this: *mut core::ffi::c_void, shadingrateimage: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12GraphicsCommandList5_Impl::RSSetShadingRateImage(this, windows_core::from_raw_borrowed(&shadingrateimage)) + ID3D12GraphicsCommandList5_Impl::RSSetShadingRateImage(this, core::mem::transmute_copy(&shadingrateimage)) } Self { base__: ID3D12GraphicsCommandList4_Vtbl::new::(), @@ -14698,13 +14698,13 @@ pub struct ID3D12LifetimeTracker_Vtbl { pub DestroyOwnedObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ID3D12LifetimeTracker_Impl: ID3D12DeviceChild_Impl { - fn DestroyOwnedObject(&self, pobject: Option<&ID3D12DeviceChild>) -> windows_core::Result<()>; + fn DestroyOwnedObject(&self, pobject: windows_core::Ref<'_, ID3D12DeviceChild>) -> windows_core::Result<()>; } impl ID3D12LifetimeTracker_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DestroyOwnedObject(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12LifetimeTracker_Impl::DestroyOwnedObject(this, windows_core::from_raw_borrowed(&pobject)).into() + ID3D12LifetimeTracker_Impl::DestroyOwnedObject(this, core::mem::transmute_copy(&pobject)).into() } Self { base__: ID3D12DeviceChild_Vtbl::new::(), DestroyOwnedObject: DestroyOwnedObject:: } } @@ -14814,7 +14814,7 @@ pub struct ID3D12Object_Vtbl { pub trait ID3D12Object_Impl: windows_core::IUnknownImpl { fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>; - fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetName(&self, name: &windows_core::PCWSTR) -> windows_core::Result<()>; } impl ID3D12Object_Vtbl { @@ -14829,7 +14829,7 @@ impl ID3D12Object_Vtbl { } unsafe extern "system" fn SetPrivateDataInterface(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12Object_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), windows_core::from_raw_borrowed(&pdata)).into() + ID3D12Object_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&pdata)).into() } unsafe extern "system" fn SetName(this: *mut core::ffi::c_void, name: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14928,7 +14928,7 @@ pub struct ID3D12PipelineLibrary_Vtbl { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait ID3D12PipelineLibrary_Impl: ID3D12DeviceChild_Impl { - fn StorePipeline(&self, pname: &windows_core::PCWSTR, ppipeline: Option<&ID3D12PipelineState>) -> windows_core::Result<()>; + fn StorePipeline(&self, pname: &windows_core::PCWSTR, ppipeline: windows_core::Ref<'_, ID3D12PipelineState>) -> windows_core::Result<()>; fn LoadGraphicsPipeline(&self, pname: &windows_core::PCWSTR, pdesc: *const D3D12_GRAPHICS_PIPELINE_STATE_DESC, riid: *const windows_core::GUID, pppipelinestate: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn LoadComputePipeline(&self, pname: &windows_core::PCWSTR, pdesc: *const D3D12_COMPUTE_PIPELINE_STATE_DESC, riid: *const windows_core::GUID, pppipelinestate: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetSerializedSize(&self) -> usize; @@ -14939,7 +14939,7 @@ impl ID3D12PipelineLibrary_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StorePipeline(this: *mut core::ffi::c_void, pname: windows_core::PCWSTR, ppipeline: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12PipelineLibrary_Impl::StorePipeline(this, core::mem::transmute(&pname), windows_core::from_raw_borrowed(&ppipeline)).into() + ID3D12PipelineLibrary_Impl::StorePipeline(this, core::mem::transmute(&pname), core::mem::transmute_copy(&ppipeline)).into() } unsafe extern "system" fn LoadGraphicsPipeline(this: *mut core::ffi::c_void, pname: windows_core::PCWSTR, pdesc: *const D3D12_GRAPHICS_PIPELINE_STATE_DESC, riid: *const windows_core::GUID, pppipelinestate: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16047,13 +16047,13 @@ pub trait ID3D12ShaderReflectionType_Impl { fn GetMemberTypeByIndex(&self, index: u32) -> Option; fn GetMemberTypeByName(&self, name: &windows_core::PCSTR) -> Option; fn GetMemberTypeName(&self, index: u32) -> windows_core::PCSTR; - fn IsEqual(&self, ptype: Option<&ID3D12ShaderReflectionType>) -> windows_core::Result<()>; + fn IsEqual(&self, ptype: windows_core::Ref<'_, ID3D12ShaderReflectionType>) -> windows_core::Result<()>; fn GetSubType(&self) -> Option; fn GetBaseClass(&self) -> Option; fn GetNumInterfaces(&self) -> u32; fn GetInterfaceByIndex(&self, uindex: u32) -> Option; - fn IsOfType(&self, ptype: Option<&ID3D12ShaderReflectionType>) -> windows_core::Result<()>; - fn ImplementsInterface(&self, pbase: Option<&ID3D12ShaderReflectionType>) -> windows_core::Result<()>; + fn IsOfType(&self, ptype: windows_core::Ref<'_, ID3D12ShaderReflectionType>) -> windows_core::Result<()>; + fn ImplementsInterface(&self, pbase: windows_core::Ref<'_, ID3D12ShaderReflectionType>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12ShaderReflectionType_Vtbl { @@ -16081,7 +16081,7 @@ impl ID3D12ShaderReflectionType_Vtbl { unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, ptype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D12ShaderReflectionType_Impl::IsEqual(this, windows_core::from_raw_borrowed(&ptype)).into() + ID3D12ShaderReflectionType_Impl::IsEqual(this, core::mem::transmute_copy(&ptype)).into() } unsafe extern "system" fn GetSubType(this: *mut core::ffi::c_void) -> Option { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; @@ -16106,12 +16106,12 @@ impl ID3D12ShaderReflectionType_Vtbl { unsafe extern "system" fn IsOfType(this: *mut core::ffi::c_void, ptype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D12ShaderReflectionType_Impl::IsOfType(this, windows_core::from_raw_borrowed(&ptype)).into() + ID3D12ShaderReflectionType_Impl::IsOfType(this, core::mem::transmute_copy(&ptype)).into() } unsafe extern "system" fn ImplementsInterface(this: *mut core::ffi::c_void, pbase: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - ID3D12ShaderReflectionType_Impl::ImplementsInterface(this, windows_core::from_raw_borrowed(&pbase)).into() + ID3D12ShaderReflectionType_Impl::ImplementsInterface(this, core::mem::transmute_copy(&pbase)).into() } Self { GetDesc: GetDesc::, @@ -16243,8 +16243,8 @@ pub struct ID3D12SharingContract_Vtbl { pub EndCapturableWork: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID), } pub trait ID3D12SharingContract_Impl: windows_core::IUnknownImpl { - fn Present(&self, presource: Option<&ID3D12Resource>, subresource: u32, window: super::super::Foundation::HWND); - fn SharedFenceSignal(&self, pfence: Option<&ID3D12Fence>, fencevalue: u64); + fn Present(&self, presource: windows_core::Ref<'_, ID3D12Resource>, subresource: u32, window: super::super::Foundation::HWND); + fn SharedFenceSignal(&self, pfence: windows_core::Ref<'_, ID3D12Fence>, fencevalue: u64); fn BeginCapturableWork(&self, guid: *const windows_core::GUID); fn EndCapturableWork(&self, guid: *const windows_core::GUID); } @@ -16252,11 +16252,11 @@ impl ID3D12SharingContract_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Present(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, subresource: u32, window: super::super::Foundation::HWND) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12SharingContract_Impl::Present(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&window)) + ID3D12SharingContract_Impl::Present(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&subresource), core::mem::transmute_copy(&window)) } unsafe extern "system" fn SharedFenceSignal(this: *mut core::ffi::c_void, pfence: *mut core::ffi::c_void, fencevalue: u64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12SharingContract_Impl::SharedFenceSignal(this, windows_core::from_raw_borrowed(&pfence), core::mem::transmute_copy(&fencevalue)) + ID3D12SharingContract_Impl::SharedFenceSignal(this, core::mem::transmute_copy(&pfence), core::mem::transmute_copy(&fencevalue)) } unsafe extern "system" fn BeginCapturableWork(this: *mut core::ffi::c_void, guid: *const windows_core::GUID) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16606,14 +16606,14 @@ pub struct ID3D12VirtualizationGuestDevice_Vtbl { pub CreateFenceFd: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64, *mut i32) -> windows_core::HRESULT, } pub trait ID3D12VirtualizationGuestDevice_Impl: windows_core::IUnknownImpl { - fn ShareWithHost(&self, pobject: Option<&ID3D12DeviceChild>) -> windows_core::Result; - fn CreateFenceFd(&self, pfence: Option<&ID3D12Fence>, fencevalue: u64) -> windows_core::Result; + fn ShareWithHost(&self, pobject: windows_core::Ref<'_, ID3D12DeviceChild>) -> windows_core::Result; + fn CreateFenceFd(&self, pfence: windows_core::Ref<'_, ID3D12Fence>, fencevalue: u64) -> windows_core::Result; } impl ID3D12VirtualizationGuestDevice_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ShareWithHost(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void, phandle: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D12VirtualizationGuestDevice_Impl::ShareWithHost(this, windows_core::from_raw_borrowed(&pobject)) { + match ID3D12VirtualizationGuestDevice_Impl::ShareWithHost(this, core::mem::transmute_copy(&pobject)) { Ok(ok__) => { phandle.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -16623,7 +16623,7 @@ impl ID3D12VirtualizationGuestDevice_Vtbl { } unsafe extern "system" fn CreateFenceFd(this: *mut core::ffi::c_void, pfence: *mut core::ffi::c_void, fencevalue: u64, pfencefd: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ID3D12VirtualizationGuestDevice_Impl::CreateFenceFd(this, windows_core::from_raw_borrowed(&pfence), core::mem::transmute_copy(&fencevalue)) { + match ID3D12VirtualizationGuestDevice_Impl::CreateFenceFd(this, core::mem::transmute_copy(&pfence), core::mem::transmute_copy(&fencevalue)) { Ok(ok__) => { pfencefd.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs index e820021376..c808c48e4d 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9/mod.rs @@ -3951,7 +3951,7 @@ pub trait IDirect3D9_Impl: windows_core::IUnknownImpl { fn CheckDeviceFormatConversion(&self, adapter: u32, devicetype: D3DDEVTYPE, sourceformat: D3DFORMAT, targetformat: D3DFORMAT) -> windows_core::Result<()>; fn GetDeviceCaps(&self, adapter: u32, devicetype: D3DDEVTYPE, pcaps: *mut D3DCAPS9) -> windows_core::Result<()>; fn GetAdapterMonitor(&self, adapter: u32) -> super::Gdi::HMONITOR; - fn CreateDevice(&self, adapter: u32, devicetype: D3DDEVTYPE, hfocuswindow: super::super::Foundation::HWND, behaviorflags: u32, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, ppreturneddeviceinterface: *mut Option) -> windows_core::Result<()>; + fn CreateDevice(&self, adapter: u32, devicetype: D3DDEVTYPE, hfocuswindow: super::super::Foundation::HWND, behaviorflags: u32, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, ppreturneddeviceinterface: windows_core::OutRef<'_, IDirect3DDevice9>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] impl IDirect3D9_Vtbl { @@ -4075,7 +4075,7 @@ pub trait IDirect3D9Ex_Impl: IDirect3D9_Impl { fn GetAdapterModeCountEx(&self, adapter: u32, pfilter: *const D3DDISPLAYMODEFILTER) -> u32; fn EnumAdapterModesEx(&self, adapter: u32, pfilter: *const D3DDISPLAYMODEFILTER, mode: u32, pmode: *mut D3DDISPLAYMODEEX) -> windows_core::Result<()>; fn GetAdapterDisplayModeEx(&self, adapter: u32, pmode: *mut D3DDISPLAYMODEEX, protation: *mut D3DDISPLAYROTATION) -> windows_core::Result<()>; - fn CreateDeviceEx(&self, adapter: u32, devicetype: D3DDEVTYPE, hfocuswindow: super::super::Foundation::HWND, behaviorflags: u32, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pfullscreendisplaymode: *mut D3DDISPLAYMODEEX, ppreturneddeviceinterface: *mut Option) -> windows_core::Result<()>; + fn CreateDeviceEx(&self, adapter: u32, devicetype: D3DDEVTYPE, hfocuswindow: super::super::Foundation::HWND, behaviorflags: u32, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pfullscreendisplaymode: *mut D3DDISPLAYMODEEX, ppreturneddeviceinterface: windows_core::OutRef<'_, IDirect3DDevice9Ex>) -> windows_core::Result<()>; fn GetAdapterLUID(&self, adapter: u32, pluid: *mut super::super::Foundation::LUID) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -4869,10 +4869,10 @@ pub trait IDirect3DDevice9_Impl: windows_core::IUnknownImpl { fn GetDeviceCaps(&self, pcaps: *mut D3DCAPS9) -> windows_core::Result<()>; fn GetDisplayMode(&self, iswapchain: u32, pmode: *mut D3DDISPLAYMODE) -> windows_core::Result<()>; fn GetCreationParameters(&self, pparameters: *mut D3DDEVICE_CREATION_PARAMETERS) -> windows_core::Result<()>; - fn SetCursorProperties(&self, xhotspot: u32, yhotspot: u32, pcursorbitmap: Option<&IDirect3DSurface9>) -> windows_core::Result<()>; + fn SetCursorProperties(&self, xhotspot: u32, yhotspot: u32, pcursorbitmap: windows_core::Ref<'_, IDirect3DSurface9>) -> windows_core::Result<()>; fn SetCursorPosition(&self, x: i32, y: i32, flags: u32); fn ShowCursor(&self, bshow: super::super::Foundation::BOOL) -> super::super::Foundation::BOOL; - fn CreateAdditionalSwapChain(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pswapchain: *mut Option) -> windows_core::Result<()>; + fn CreateAdditionalSwapChain(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pswapchain: windows_core::OutRef<'_, IDirect3DSwapChain9>) -> windows_core::Result<()>; fn GetSwapChain(&self, iswapchain: u32) -> windows_core::Result; fn GetNumberOfSwapChains(&self) -> u32; fn Reset(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS) -> windows_core::Result<()>; @@ -4882,23 +4882,23 @@ pub trait IDirect3DDevice9_Impl: windows_core::IUnknownImpl { fn SetDialogBoxMode(&self, benabledialogs: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetGammaRamp(&self, iswapchain: u32, flags: u32, pramp: *const D3DGAMMARAMP); fn GetGammaRamp(&self, iswapchain: u32, pramp: *mut D3DGAMMARAMP); - fn CreateTexture(&self, width: u32, height: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, pptexture: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn CreateVolumeTexture(&self, width: u32, height: u32, depth: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppvolumetexture: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn CreateCubeTexture(&self, edgelength: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppcubetexture: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn CreateVertexBuffer(&self, length: u32, usage: u32, fvf: u32, pool: D3DPOOL, ppvertexbuffer: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn CreateIndexBuffer(&self, length: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppindexbuffer: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn CreateRenderTarget(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: super::super::Foundation::BOOL, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn CreateDepthStencilSurface(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: super::super::Foundation::BOOL, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn UpdateSurface(&self, psourcesurface: Option<&IDirect3DSurface9>, psourcerect: *const super::super::Foundation::RECT, pdestinationsurface: Option<&IDirect3DSurface9>, pdestpoint: *const super::super::Foundation::POINT) -> windows_core::Result<()>; - fn UpdateTexture(&self, psourcetexture: Option<&IDirect3DBaseTexture9>, pdestinationtexture: Option<&IDirect3DBaseTexture9>) -> windows_core::Result<()>; - fn GetRenderTargetData(&self, prendertarget: Option<&IDirect3DSurface9>, pdestsurface: Option<&IDirect3DSurface9>) -> windows_core::Result<()>; - fn GetFrontBufferData(&self, iswapchain: u32, pdestsurface: Option<&IDirect3DSurface9>) -> windows_core::Result<()>; - fn StretchRect(&self, psourcesurface: Option<&IDirect3DSurface9>, psourcerect: *const super::super::Foundation::RECT, pdestsurface: Option<&IDirect3DSurface9>, pdestrect: *const super::super::Foundation::RECT, filter: D3DTEXTUREFILTERTYPE) -> windows_core::Result<()>; - fn ColorFill(&self, psurface: Option<&IDirect3DSurface9>, prect: *const super::super::Foundation::RECT, color: u32) -> windows_core::Result<()>; - fn CreateOffscreenPlainSurface(&self, width: u32, height: u32, format: D3DFORMAT, pool: D3DPOOL, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn SetRenderTarget(&self, rendertargetindex: u32, prendertarget: Option<&IDirect3DSurface9>) -> windows_core::Result<()>; + fn CreateTexture(&self, width: u32, height: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, pptexture: windows_core::OutRef<'_, IDirect3DTexture9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateVolumeTexture(&self, width: u32, height: u32, depth: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppvolumetexture: windows_core::OutRef<'_, IDirect3DVolumeTexture9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateCubeTexture(&self, edgelength: u32, levels: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppcubetexture: windows_core::OutRef<'_, IDirect3DCubeTexture9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateVertexBuffer(&self, length: u32, usage: u32, fvf: u32, pool: D3DPOOL, ppvertexbuffer: windows_core::OutRef<'_, IDirect3DVertexBuffer9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateIndexBuffer(&self, length: u32, usage: u32, format: D3DFORMAT, pool: D3DPOOL, ppindexbuffer: windows_core::OutRef<'_, IDirect3DIndexBuffer9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateRenderTarget(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: super::super::Foundation::BOOL, ppsurface: windows_core::OutRef<'_, IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateDepthStencilSurface(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: super::super::Foundation::BOOL, ppsurface: windows_core::OutRef<'_, IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn UpdateSurface(&self, psourcesurface: windows_core::Ref<'_, IDirect3DSurface9>, psourcerect: *const super::super::Foundation::RECT, pdestinationsurface: windows_core::Ref<'_, IDirect3DSurface9>, pdestpoint: *const super::super::Foundation::POINT) -> windows_core::Result<()>; + fn UpdateTexture(&self, psourcetexture: windows_core::Ref<'_, IDirect3DBaseTexture9>, pdestinationtexture: windows_core::Ref<'_, IDirect3DBaseTexture9>) -> windows_core::Result<()>; + fn GetRenderTargetData(&self, prendertarget: windows_core::Ref<'_, IDirect3DSurface9>, pdestsurface: windows_core::Ref<'_, IDirect3DSurface9>) -> windows_core::Result<()>; + fn GetFrontBufferData(&self, iswapchain: u32, pdestsurface: windows_core::Ref<'_, IDirect3DSurface9>) -> windows_core::Result<()>; + fn StretchRect(&self, psourcesurface: windows_core::Ref<'_, IDirect3DSurface9>, psourcerect: *const super::super::Foundation::RECT, pdestsurface: windows_core::Ref<'_, IDirect3DSurface9>, pdestrect: *const super::super::Foundation::RECT, filter: D3DTEXTUREFILTERTYPE) -> windows_core::Result<()>; + fn ColorFill(&self, psurface: windows_core::Ref<'_, IDirect3DSurface9>, prect: *const super::super::Foundation::RECT, color: u32) -> windows_core::Result<()>; + fn CreateOffscreenPlainSurface(&self, width: u32, height: u32, format: D3DFORMAT, pool: D3DPOOL, ppsurface: windows_core::OutRef<'_, IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn SetRenderTarget(&self, rendertargetindex: u32, prendertarget: windows_core::Ref<'_, IDirect3DSurface9>) -> windows_core::Result<()>; fn GetRenderTarget(&self, rendertargetindex: u32) -> windows_core::Result; - fn SetDepthStencilSurface(&self, pnewzstencil: Option<&IDirect3DSurface9>) -> windows_core::Result<()>; + fn SetDepthStencilSurface(&self, pnewzstencil: windows_core::Ref<'_, IDirect3DSurface9>) -> windows_core::Result<()>; fn GetDepthStencilSurface(&self) -> windows_core::Result; fn BeginScene(&self) -> windows_core::Result<()>; fn EndScene(&self) -> windows_core::Result<()>; @@ -4924,7 +4924,7 @@ pub trait IDirect3DDevice9_Impl: windows_core::IUnknownImpl { fn SetClipStatus(&self, pclipstatus: *const D3DCLIPSTATUS9) -> windows_core::Result<()>; fn GetClipStatus(&self, pclipstatus: *mut D3DCLIPSTATUS9) -> windows_core::Result<()>; fn GetTexture(&self, stage: u32) -> windows_core::Result; - fn SetTexture(&self, stage: u32, ptexture: Option<&IDirect3DBaseTexture9>) -> windows_core::Result<()>; + fn SetTexture(&self, stage: u32, ptexture: windows_core::Ref<'_, IDirect3DBaseTexture9>) -> windows_core::Result<()>; fn GetTextureStageState(&self, stage: u32, r#type: D3DTEXTURESTAGESTATETYPE, pvalue: *mut u32) -> windows_core::Result<()>; fn SetTextureStageState(&self, stage: u32, r#type: D3DTEXTURESTAGESTATETYPE, value: u32) -> windows_core::Result<()>; fn GetSamplerState(&self, sampler: u32, r#type: D3DSAMPLERSTATETYPE, pvalue: *mut u32) -> windows_core::Result<()>; @@ -4944,14 +4944,14 @@ pub trait IDirect3DDevice9_Impl: windows_core::IUnknownImpl { fn DrawIndexedPrimitive(&self, param0: D3DPRIMITIVETYPE, basevertexindex: i32, minvertexindex: u32, numvertices: u32, startindex: u32, primcount: u32) -> windows_core::Result<()>; fn DrawPrimitiveUP(&self, primitivetype: D3DPRIMITIVETYPE, primitivecount: u32, pvertexstreamzerodata: *const core::ffi::c_void, vertexstreamzerostride: u32) -> windows_core::Result<()>; fn DrawIndexedPrimitiveUP(&self, primitivetype: D3DPRIMITIVETYPE, minvertexindex: u32, numvertices: u32, primitivecount: u32, pindexdata: *const core::ffi::c_void, indexdataformat: D3DFORMAT, pvertexstreamzerodata: *const core::ffi::c_void, vertexstreamzerostride: u32) -> windows_core::Result<()>; - fn ProcessVertices(&self, srcstartindex: u32, destindex: u32, vertexcount: u32, pdestbuffer: Option<&IDirect3DVertexBuffer9>, pvertexdecl: Option<&IDirect3DVertexDeclaration9>, flags: u32) -> windows_core::Result<()>; + fn ProcessVertices(&self, srcstartindex: u32, destindex: u32, vertexcount: u32, pdestbuffer: windows_core::Ref<'_, IDirect3DVertexBuffer9>, pvertexdecl: windows_core::Ref<'_, IDirect3DVertexDeclaration9>, flags: u32) -> windows_core::Result<()>; fn CreateVertexDeclaration(&self, pvertexelements: *const D3DVERTEXELEMENT9) -> windows_core::Result; - fn SetVertexDeclaration(&self, pdecl: Option<&IDirect3DVertexDeclaration9>) -> windows_core::Result<()>; + fn SetVertexDeclaration(&self, pdecl: windows_core::Ref<'_, IDirect3DVertexDeclaration9>) -> windows_core::Result<()>; fn GetVertexDeclaration(&self) -> windows_core::Result; fn SetFVF(&self, fvf: u32) -> windows_core::Result<()>; fn GetFVF(&self, pfvf: *mut u32) -> windows_core::Result<()>; fn CreateVertexShader(&self, pfunction: *const u32) -> windows_core::Result; - fn SetVertexShader(&self, pshader: Option<&IDirect3DVertexShader9>) -> windows_core::Result<()>; + fn SetVertexShader(&self, pshader: windows_core::Ref<'_, IDirect3DVertexShader9>) -> windows_core::Result<()>; fn GetVertexShader(&self) -> windows_core::Result; fn SetVertexShaderConstantF(&self, startregister: u32, pconstantdata: *const f32, vector4fcount: u32) -> windows_core::Result<()>; fn GetVertexShaderConstantF(&self, startregister: u32, pconstantdata: *mut f32, vector4fcount: u32) -> windows_core::Result<()>; @@ -4959,14 +4959,14 @@ pub trait IDirect3DDevice9_Impl: windows_core::IUnknownImpl { fn GetVertexShaderConstantI(&self, startregister: u32, pconstantdata: *mut i32, vector4icount: u32) -> windows_core::Result<()>; fn SetVertexShaderConstantB(&self, startregister: u32, pconstantdata: *const super::super::Foundation::BOOL, boolcount: u32) -> windows_core::Result<()>; fn GetVertexShaderConstantB(&self, startregister: u32, pconstantdata: *mut super::super::Foundation::BOOL, boolcount: u32) -> windows_core::Result<()>; - fn SetStreamSource(&self, streamnumber: u32, pstreamdata: Option<&IDirect3DVertexBuffer9>, offsetinbytes: u32, stride: u32) -> windows_core::Result<()>; - fn GetStreamSource(&self, streamnumber: u32, ppstreamdata: *mut Option, poffsetinbytes: *mut u32, pstride: *mut u32) -> windows_core::Result<()>; + fn SetStreamSource(&self, streamnumber: u32, pstreamdata: windows_core::Ref<'_, IDirect3DVertexBuffer9>, offsetinbytes: u32, stride: u32) -> windows_core::Result<()>; + fn GetStreamSource(&self, streamnumber: u32, ppstreamdata: windows_core::OutRef<'_, IDirect3DVertexBuffer9>, poffsetinbytes: *mut u32, pstride: *mut u32) -> windows_core::Result<()>; fn SetStreamSourceFreq(&self, streamnumber: u32, setting: u32) -> windows_core::Result<()>; fn GetStreamSourceFreq(&self, streamnumber: u32, psetting: *mut u32) -> windows_core::Result<()>; - fn SetIndices(&self, pindexdata: Option<&IDirect3DIndexBuffer9>) -> windows_core::Result<()>; + fn SetIndices(&self, pindexdata: windows_core::Ref<'_, IDirect3DIndexBuffer9>) -> windows_core::Result<()>; fn GetIndices(&self) -> windows_core::Result; fn CreatePixelShader(&self, pfunction: *const u32) -> windows_core::Result; - fn SetPixelShader(&self, pshader: Option<&IDirect3DPixelShader9>) -> windows_core::Result<()>; + fn SetPixelShader(&self, pshader: windows_core::Ref<'_, IDirect3DPixelShader9>) -> windows_core::Result<()>; fn GetPixelShader(&self) -> windows_core::Result; fn SetPixelShaderConstantF(&self, startregister: u32, pconstantdata: *const f32, vector4fcount: u32) -> windows_core::Result<()>; fn GetPixelShaderConstantF(&self, startregister: u32, pconstantdata: *mut f32, vector4fcount: u32) -> windows_core::Result<()>; @@ -5018,7 +5018,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn SetCursorProperties(this: *mut core::ffi::c_void, xhotspot: u32, yhotspot: u32, pcursorbitmap: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::SetCursorProperties(this, core::mem::transmute_copy(&xhotspot), core::mem::transmute_copy(&yhotspot), windows_core::from_raw_borrowed(&pcursorbitmap)).into() + IDirect3DDevice9_Impl::SetCursorProperties(this, core::mem::transmute_copy(&xhotspot), core::mem::transmute_copy(&yhotspot), core::mem::transmute_copy(&pcursorbitmap)).into() } unsafe extern "system" fn SetCursorPosition(this: *mut core::ffi::c_void, x: i32, y: i32, flags: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5110,27 +5110,27 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn UpdateSurface(this: *mut core::ffi::c_void, psourcesurface: *mut core::ffi::c_void, psourcerect: *const super::super::Foundation::RECT, pdestinationsurface: *mut core::ffi::c_void, pdestpoint: *const super::super::Foundation::POINT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::UpdateSurface(this, windows_core::from_raw_borrowed(&psourcesurface), core::mem::transmute_copy(&psourcerect), windows_core::from_raw_borrowed(&pdestinationsurface), core::mem::transmute_copy(&pdestpoint)).into() + IDirect3DDevice9_Impl::UpdateSurface(this, core::mem::transmute_copy(&psourcesurface), core::mem::transmute_copy(&psourcerect), core::mem::transmute_copy(&pdestinationsurface), core::mem::transmute_copy(&pdestpoint)).into() } unsafe extern "system" fn UpdateTexture(this: *mut core::ffi::c_void, psourcetexture: *mut core::ffi::c_void, pdestinationtexture: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::UpdateTexture(this, windows_core::from_raw_borrowed(&psourcetexture), windows_core::from_raw_borrowed(&pdestinationtexture)).into() + IDirect3DDevice9_Impl::UpdateTexture(this, core::mem::transmute_copy(&psourcetexture), core::mem::transmute_copy(&pdestinationtexture)).into() } unsafe extern "system" fn GetRenderTargetData(this: *mut core::ffi::c_void, prendertarget: *mut core::ffi::c_void, pdestsurface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::GetRenderTargetData(this, windows_core::from_raw_borrowed(&prendertarget), windows_core::from_raw_borrowed(&pdestsurface)).into() + IDirect3DDevice9_Impl::GetRenderTargetData(this, core::mem::transmute_copy(&prendertarget), core::mem::transmute_copy(&pdestsurface)).into() } unsafe extern "system" fn GetFrontBufferData(this: *mut core::ffi::c_void, iswapchain: u32, pdestsurface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::GetFrontBufferData(this, core::mem::transmute_copy(&iswapchain), windows_core::from_raw_borrowed(&pdestsurface)).into() + IDirect3DDevice9_Impl::GetFrontBufferData(this, core::mem::transmute_copy(&iswapchain), core::mem::transmute_copy(&pdestsurface)).into() } unsafe extern "system" fn StretchRect(this: *mut core::ffi::c_void, psourcesurface: *mut core::ffi::c_void, psourcerect: *const super::super::Foundation::RECT, pdestsurface: *mut core::ffi::c_void, pdestrect: *const super::super::Foundation::RECT, filter: D3DTEXTUREFILTERTYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::StretchRect(this, windows_core::from_raw_borrowed(&psourcesurface), core::mem::transmute_copy(&psourcerect), windows_core::from_raw_borrowed(&pdestsurface), core::mem::transmute_copy(&pdestrect), core::mem::transmute_copy(&filter)).into() + IDirect3DDevice9_Impl::StretchRect(this, core::mem::transmute_copy(&psourcesurface), core::mem::transmute_copy(&psourcerect), core::mem::transmute_copy(&pdestsurface), core::mem::transmute_copy(&pdestrect), core::mem::transmute_copy(&filter)).into() } unsafe extern "system" fn ColorFill(this: *mut core::ffi::c_void, psurface: *mut core::ffi::c_void, prect: *const super::super::Foundation::RECT, color: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::ColorFill(this, windows_core::from_raw_borrowed(&psurface), core::mem::transmute_copy(&prect), core::mem::transmute_copy(&color)).into() + IDirect3DDevice9_Impl::ColorFill(this, core::mem::transmute_copy(&psurface), core::mem::transmute_copy(&prect), core::mem::transmute_copy(&color)).into() } unsafe extern "system" fn CreateOffscreenPlainSurface(this: *mut core::ffi::c_void, width: u32, height: u32, format: D3DFORMAT, pool: D3DPOOL, ppsurface: *mut *mut core::ffi::c_void, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5138,7 +5138,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn SetRenderTarget(this: *mut core::ffi::c_void, rendertargetindex: u32, prendertarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::SetRenderTarget(this, core::mem::transmute_copy(&rendertargetindex), windows_core::from_raw_borrowed(&prendertarget)).into() + IDirect3DDevice9_Impl::SetRenderTarget(this, core::mem::transmute_copy(&rendertargetindex), core::mem::transmute_copy(&prendertarget)).into() } unsafe extern "system" fn GetRenderTarget(this: *mut core::ffi::c_void, rendertargetindex: u32, pprendertarget: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5152,7 +5152,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn SetDepthStencilSurface(this: *mut core::ffi::c_void, pnewzstencil: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::SetDepthStencilSurface(this, windows_core::from_raw_borrowed(&pnewzstencil)).into() + IDirect3DDevice9_Impl::SetDepthStencilSurface(this, core::mem::transmute_copy(&pnewzstencil)).into() } unsafe extern "system" fn GetDepthStencilSurface(this: *mut core::ffi::c_void, ppzstencilsurface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5280,7 +5280,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn SetTexture(this: *mut core::ffi::c_void, stage: u32, ptexture: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::SetTexture(this, core::mem::transmute_copy(&stage), windows_core::from_raw_borrowed(&ptexture)).into() + IDirect3DDevice9_Impl::SetTexture(this, core::mem::transmute_copy(&stage), core::mem::transmute_copy(&ptexture)).into() } unsafe extern "system" fn GetTextureStageState(this: *mut core::ffi::c_void, stage: u32, r#type: D3DTEXTURESTAGESTATETYPE, pvalue: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5360,7 +5360,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn ProcessVertices(this: *mut core::ffi::c_void, srcstartindex: u32, destindex: u32, vertexcount: u32, pdestbuffer: *mut core::ffi::c_void, pvertexdecl: *mut core::ffi::c_void, flags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::ProcessVertices(this, core::mem::transmute_copy(&srcstartindex), core::mem::transmute_copy(&destindex), core::mem::transmute_copy(&vertexcount), windows_core::from_raw_borrowed(&pdestbuffer), windows_core::from_raw_borrowed(&pvertexdecl), core::mem::transmute_copy(&flags)).into() + IDirect3DDevice9_Impl::ProcessVertices(this, core::mem::transmute_copy(&srcstartindex), core::mem::transmute_copy(&destindex), core::mem::transmute_copy(&vertexcount), core::mem::transmute_copy(&pdestbuffer), core::mem::transmute_copy(&pvertexdecl), core::mem::transmute_copy(&flags)).into() } unsafe extern "system" fn CreateVertexDeclaration(this: *mut core::ffi::c_void, pvertexelements: *const D3DVERTEXELEMENT9, ppdecl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5374,7 +5374,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn SetVertexDeclaration(this: *mut core::ffi::c_void, pdecl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::SetVertexDeclaration(this, windows_core::from_raw_borrowed(&pdecl)).into() + IDirect3DDevice9_Impl::SetVertexDeclaration(this, core::mem::transmute_copy(&pdecl)).into() } unsafe extern "system" fn GetVertexDeclaration(this: *mut core::ffi::c_void, ppdecl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5406,7 +5406,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn SetVertexShader(this: *mut core::ffi::c_void, pshader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::SetVertexShader(this, windows_core::from_raw_borrowed(&pshader)).into() + IDirect3DDevice9_Impl::SetVertexShader(this, core::mem::transmute_copy(&pshader)).into() } unsafe extern "system" fn GetVertexShader(this: *mut core::ffi::c_void, ppshader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5444,7 +5444,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn SetStreamSource(this: *mut core::ffi::c_void, streamnumber: u32, pstreamdata: *mut core::ffi::c_void, offsetinbytes: u32, stride: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::SetStreamSource(this, core::mem::transmute_copy(&streamnumber), windows_core::from_raw_borrowed(&pstreamdata), core::mem::transmute_copy(&offsetinbytes), core::mem::transmute_copy(&stride)).into() + IDirect3DDevice9_Impl::SetStreamSource(this, core::mem::transmute_copy(&streamnumber), core::mem::transmute_copy(&pstreamdata), core::mem::transmute_copy(&offsetinbytes), core::mem::transmute_copy(&stride)).into() } unsafe extern "system" fn GetStreamSource(this: *mut core::ffi::c_void, streamnumber: u32, ppstreamdata: *mut *mut core::ffi::c_void, poffsetinbytes: *mut u32, pstride: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5460,7 +5460,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn SetIndices(this: *mut core::ffi::c_void, pindexdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::SetIndices(this, windows_core::from_raw_borrowed(&pindexdata)).into() + IDirect3DDevice9_Impl::SetIndices(this, core::mem::transmute_copy(&pindexdata)).into() } unsafe extern "system" fn GetIndices(this: *mut core::ffi::c_void, ppindexdata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5484,7 +5484,7 @@ impl IDirect3DDevice9_Vtbl { } unsafe extern "system" fn SetPixelShader(this: *mut core::ffi::c_void, pshader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9_Impl::SetPixelShader(this, windows_core::from_raw_borrowed(&pshader)).into() + IDirect3DDevice9_Impl::SetPixelShader(this, core::mem::transmute_copy(&pshader)).into() } unsafe extern "system" fn GetPixelShader(this: *mut core::ffi::c_void, ppshader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5755,18 +5755,18 @@ pub struct IDirect3DDevice9Ex_Vtbl { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Gdi"))] pub trait IDirect3DDevice9Ex_Impl: IDirect3DDevice9_Impl { fn SetConvolutionMonoKernel(&self, width: u32, height: u32, rows: *mut f32, columns: *mut f32) -> windows_core::Result<()>; - fn ComposeRects(&self, psrc: Option<&IDirect3DSurface9>, pdst: Option<&IDirect3DSurface9>, psrcrectdescs: Option<&IDirect3DVertexBuffer9>, numrects: u32, pdstrectdescs: Option<&IDirect3DVertexBuffer9>, operation: D3DCOMPOSERECTSOP, xoffset: i32, yoffset: i32) -> windows_core::Result<()>; + fn ComposeRects(&self, psrc: windows_core::Ref<'_, IDirect3DSurface9>, pdst: windows_core::Ref<'_, IDirect3DSurface9>, psrcrectdescs: windows_core::Ref<'_, IDirect3DVertexBuffer9>, numrects: u32, pdstrectdescs: windows_core::Ref<'_, IDirect3DVertexBuffer9>, operation: D3DCOMPOSERECTSOP, xoffset: i32, yoffset: i32) -> windows_core::Result<()>; fn PresentEx(&self, psourcerect: *const super::super::Foundation::RECT, pdestrect: *const super::super::Foundation::RECT, hdestwindowoverride: super::super::Foundation::HWND, pdirtyregion: *const super::Gdi::RGNDATA, dwflags: u32) -> windows_core::Result<()>; fn GetGPUThreadPriority(&self, ppriority: *mut i32) -> windows_core::Result<()>; fn SetGPUThreadPriority(&self, priority: i32) -> windows_core::Result<()>; fn WaitForVBlank(&self, iswapchain: u32) -> windows_core::Result<()>; - fn CheckResourceResidency(&self, presourcearray: *mut Option, numresources: u32) -> windows_core::Result<()>; + fn CheckResourceResidency(&self, presourcearray: windows_core::OutRef<'_, IDirect3DResource9>, numresources: u32) -> windows_core::Result<()>; fn SetMaximumFrameLatency(&self, maxlatency: u32) -> windows_core::Result<()>; fn GetMaximumFrameLatency(&self, pmaxlatency: *mut u32) -> windows_core::Result<()>; fn CheckDeviceState(&self, hdestinationwindow: super::super::Foundation::HWND) -> windows_core::Result<()>; - fn CreateRenderTargetEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: super::super::Foundation::BOOL, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()>; - fn CreateOffscreenPlainSurfaceEx(&self, width: u32, height: u32, format: D3DFORMAT, pool: D3DPOOL, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()>; - fn CreateDepthStencilSurfaceEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: super::super::Foundation::BOOL, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()>; + fn CreateRenderTargetEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, lockable: super::super::Foundation::BOOL, ppsurface: windows_core::OutRef<'_, IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()>; + fn CreateOffscreenPlainSurfaceEx(&self, width: u32, height: u32, format: D3DFORMAT, pool: D3DPOOL, ppsurface: windows_core::OutRef<'_, IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()>; + fn CreateDepthStencilSurfaceEx(&self, width: u32, height: u32, format: D3DFORMAT, multisample: D3DMULTISAMPLE_TYPE, multisamplequality: u32, discard: super::super::Foundation::BOOL, ppsurface: windows_core::OutRef<'_, IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE, usage: u32) -> windows_core::Result<()>; fn ResetEx(&self, ppresentationparameters: *mut D3DPRESENT_PARAMETERS, pfullscreendisplaymode: *mut D3DDISPLAYMODEEX) -> windows_core::Result<()>; fn GetDisplayModeEx(&self, iswapchain: u32, pmode: *mut D3DDISPLAYMODEEX, protation: *mut D3DDISPLAYROTATION) -> windows_core::Result<()>; } @@ -5779,7 +5779,7 @@ impl IDirect3DDevice9Ex_Vtbl { } unsafe extern "system" fn ComposeRects(this: *mut core::ffi::c_void, psrc: *mut core::ffi::c_void, pdst: *mut core::ffi::c_void, psrcrectdescs: *mut core::ffi::c_void, numrects: u32, pdstrectdescs: *mut core::ffi::c_void, operation: D3DCOMPOSERECTSOP, xoffset: i32, yoffset: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9Ex_Impl::ComposeRects(this, windows_core::from_raw_borrowed(&psrc), windows_core::from_raw_borrowed(&pdst), windows_core::from_raw_borrowed(&psrcrectdescs), core::mem::transmute_copy(&numrects), windows_core::from_raw_borrowed(&pdstrectdescs), core::mem::transmute_copy(&operation), core::mem::transmute_copy(&xoffset), core::mem::transmute_copy(&yoffset)).into() + IDirect3DDevice9Ex_Impl::ComposeRects(this, core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst), core::mem::transmute_copy(&psrcrectdescs), core::mem::transmute_copy(&numrects), core::mem::transmute_copy(&pdstrectdescs), core::mem::transmute_copy(&operation), core::mem::transmute_copy(&xoffset), core::mem::transmute_copy(&yoffset)).into() } unsafe extern "system" fn PresentEx(this: *mut core::ffi::c_void, psourcerect: *const super::super::Foundation::RECT, pdestrect: *const super::super::Foundation::RECT, hdestwindowoverride: super::super::Foundation::HWND, pdirtyregion: *const super::Gdi::RGNDATA, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6353,7 +6353,7 @@ pub struct IDirect3DSwapChain9_Vtbl { #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirect3DSwapChain9_Impl: windows_core::IUnknownImpl { fn Present(&self, psourcerect: *const super::super::Foundation::RECT, pdestrect: *const super::super::Foundation::RECT, hdestwindowoverride: super::super::Foundation::HWND, pdirtyregion: *const super::Gdi::RGNDATA, dwflags: u32) -> windows_core::Result<()>; - fn GetFrontBufferData(&self, pdestsurface: Option<&IDirect3DSurface9>) -> windows_core::Result<()>; + fn GetFrontBufferData(&self, pdestsurface: windows_core::Ref<'_, IDirect3DSurface9>) -> windows_core::Result<()>; fn GetBackBuffer(&self, ibackbuffer: u32, r#type: D3DBACKBUFFER_TYPE) -> windows_core::Result; fn GetRasterStatus(&self, prasterstatus: *mut D3DRASTER_STATUS) -> windows_core::Result<()>; fn GetDisplayMode(&self, pmode: *mut D3DDISPLAYMODE) -> windows_core::Result<()>; @@ -6369,7 +6369,7 @@ impl IDirect3DSwapChain9_Vtbl { } unsafe extern "system" fn GetFrontBufferData(this: *mut core::ffi::c_void, pdestsurface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DSwapChain9_Impl::GetFrontBufferData(this, windows_core::from_raw_borrowed(&pdestsurface)).into() + IDirect3DSwapChain9_Impl::GetFrontBufferData(this, core::mem::transmute_copy(&pdestsurface)).into() } unsafe extern "system" fn GetBackBuffer(this: *mut core::ffi::c_void, ibackbuffer: u32, r#type: D3DBACKBUFFER_TYPE, ppbackbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9on12/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9on12/mod.rs index 64ef92e3b3..c6ebf98f52 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9on12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D9on12/mod.rs @@ -62,8 +62,8 @@ pub struct IDirect3DDevice9On12_Vtbl { #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Direct3D9"))] pub trait IDirect3DDevice9On12_Impl: windows_core::IUnknownImpl { fn GetD3D12Device(&self, riid: *const windows_core::GUID, ppvdevice: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn UnwrapUnderlyingResource(&self, presource: Option<&super::Direct3D9::IDirect3DResource9>, pcommandqueue: Option<&super::Direct3D12::ID3D12CommandQueue>, riid: *const windows_core::GUID, ppvresource12: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn ReturnUnderlyingResource(&self, presource: Option<&super::Direct3D9::IDirect3DResource9>, numsync: u32, psignalvalues: *mut u64, ppfences: *mut Option) -> windows_core::Result<()>; + fn UnwrapUnderlyingResource(&self, presource: windows_core::Ref<'_, super::Direct3D9::IDirect3DResource9>, pcommandqueue: windows_core::Ref<'_, super::Direct3D12::ID3D12CommandQueue>, riid: *const windows_core::GUID, ppvresource12: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ReturnUnderlyingResource(&self, presource: windows_core::Ref<'_, super::Direct3D9::IDirect3DResource9>, numsync: u32, psignalvalues: *mut u64, ppfences: windows_core::OutRef<'_, super::Direct3D12::ID3D12Fence>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Direct3D9"))] impl IDirect3DDevice9On12_Vtbl { @@ -74,11 +74,11 @@ impl IDirect3DDevice9On12_Vtbl { } unsafe extern "system" fn UnwrapUnderlyingResource(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pcommandqueue: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvresource12: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9On12_Impl::UnwrapUnderlyingResource(this, windows_core::from_raw_borrowed(&presource), windows_core::from_raw_borrowed(&pcommandqueue), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource12)).into() + IDirect3DDevice9On12_Impl::UnwrapUnderlyingResource(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pcommandqueue), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvresource12)).into() } unsafe extern "system" fn ReturnUnderlyingResource(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, numsync: u32, psignalvalues: *mut u64, ppfences: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDevice9On12_Impl::ReturnUnderlyingResource(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&numsync), core::mem::transmute_copy(&psignalvalues), core::mem::transmute_copy(&ppfences)).into() + IDirect3DDevice9On12_Impl::ReturnUnderlyingResource(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&numsync), core::mem::transmute_copy(&psignalvalues), core::mem::transmute_copy(&ppfences)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs index 3ca56ccd6f..3de289e856 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs @@ -273,9 +273,9 @@ pub trait IDCompositionAffineTransform2DEffect_Impl: IDCompositionFilterEffect_I fn SetInterpolationMode(&self, interpolationmode: super::Direct2D::Common::D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE) -> windows_core::Result<()>; fn SetBorderMode(&self, bordermode: super::Direct2D::Common::D2D1_BORDER_MODE) -> windows_core::Result<()>; fn SetTransformMatrix(&self, transformmatrix: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::Result<()>; - fn SetTransformMatrixElement(&self, row: i32, column: i32, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetTransformMatrixElement(&self, row: i32, column: i32, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetTransformMatrixElement2(&self, row: i32, column: i32, value: f32) -> windows_core::Result<()>; - fn SetSharpness(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetSharpness(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetSharpness2(&self, sharpness: f32) -> windows_core::Result<()>; } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -295,7 +295,7 @@ impl IDCompositionAffineTransform2DEffect_Vtbl { } unsafe extern "system" fn SetTransformMatrixElement(this: *mut core::ffi::c_void, row: i32, column: i32, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionAffineTransform2DEffect_Impl::SetTransformMatrixElement(this, core::mem::transmute_copy(&row), core::mem::transmute_copy(&column), windows_core::from_raw_borrowed(&animation)).into() + IDCompositionAffineTransform2DEffect_Impl::SetTransformMatrixElement(this, core::mem::transmute_copy(&row), core::mem::transmute_copy(&column), core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetTransformMatrixElement2(this: *mut core::ffi::c_void, row: i32, column: i32, value: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -303,7 +303,7 @@ impl IDCompositionAffineTransform2DEffect_Vtbl { } unsafe extern "system" fn SetSharpness(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionAffineTransform2DEffect_Impl::SetSharpness(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionAffineTransform2DEffect_Impl::SetSharpness(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetSharpness2(this: *mut core::ffi::c_void, sharpness: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -481,13 +481,13 @@ pub struct IDCompositionArithmeticCompositeEffect_Vtbl { pub trait IDCompositionArithmeticCompositeEffect_Impl: IDCompositionFilterEffect_Impl { fn SetCoefficients(&self, coefficients: *const super::Direct2D::Common::D2D_VECTOR_4F) -> windows_core::Result<()>; fn SetClampOutput(&self, clampoutput: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetCoefficient1(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCoefficient1(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCoefficient12(&self, coeffcient1: f32) -> windows_core::Result<()>; - fn SetCoefficient2(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCoefficient2(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCoefficient22(&self, coefficient2: f32) -> windows_core::Result<()>; - fn SetCoefficient3(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCoefficient3(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCoefficient32(&self, coefficient3: f32) -> windows_core::Result<()>; - fn SetCoefficient4(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCoefficient4(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCoefficient42(&self, coefficient4: f32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -503,7 +503,7 @@ impl IDCompositionArithmeticCompositeEffect_Vtbl { } unsafe extern "system" fn SetCoefficient1(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionArithmeticCompositeEffect_Impl::SetCoefficient1(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionArithmeticCompositeEffect_Impl::SetCoefficient1(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCoefficient12(this: *mut core::ffi::c_void, coeffcient1: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -511,7 +511,7 @@ impl IDCompositionArithmeticCompositeEffect_Vtbl { } unsafe extern "system" fn SetCoefficient2(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionArithmeticCompositeEffect_Impl::SetCoefficient2(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionArithmeticCompositeEffect_Impl::SetCoefficient2(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCoefficient22(this: *mut core::ffi::c_void, coefficient2: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -519,7 +519,7 @@ impl IDCompositionArithmeticCompositeEffect_Vtbl { } unsafe extern "system" fn SetCoefficient3(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionArithmeticCompositeEffect_Impl::SetCoefficient3(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionArithmeticCompositeEffect_Impl::SetCoefficient3(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCoefficient32(this: *mut core::ffi::c_void, coefficient3: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -527,7 +527,7 @@ impl IDCompositionArithmeticCompositeEffect_Vtbl { } unsafe extern "system" fn SetCoefficient4(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionArithmeticCompositeEffect_Impl::SetCoefficient4(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionArithmeticCompositeEffect_Impl::SetCoefficient4(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCoefficient42(this: *mut core::ffi::c_void, coefficient4: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -672,13 +672,13 @@ pub struct IDCompositionBrightnessEffect_Vtbl { pub trait IDCompositionBrightnessEffect_Impl: IDCompositionFilterEffect_Impl { fn SetWhitePoint(&self, whitepoint: *const super::Direct2D::Common::D2D_VECTOR_2F) -> windows_core::Result<()>; fn SetBlackPoint(&self, blackpoint: *const super::Direct2D::Common::D2D_VECTOR_2F) -> windows_core::Result<()>; - fn SetWhitePointX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetWhitePointX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetWhitePointX2(&self, whitepointx: f32) -> windows_core::Result<()>; - fn SetWhitePointY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetWhitePointY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetWhitePointY2(&self, whitepointy: f32) -> windows_core::Result<()>; - fn SetBlackPointX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBlackPointX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBlackPointX2(&self, blackpointx: f32) -> windows_core::Result<()>; - fn SetBlackPointY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBlackPointY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBlackPointY2(&self, blackpointy: f32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -694,7 +694,7 @@ impl IDCompositionBrightnessEffect_Vtbl { } unsafe extern "system" fn SetWhitePointX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionBrightnessEffect_Impl::SetWhitePointX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionBrightnessEffect_Impl::SetWhitePointX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetWhitePointX2(this: *mut core::ffi::c_void, whitepointx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -702,7 +702,7 @@ impl IDCompositionBrightnessEffect_Vtbl { } unsafe extern "system" fn SetWhitePointY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionBrightnessEffect_Impl::SetWhitePointY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionBrightnessEffect_Impl::SetWhitePointY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetWhitePointY2(this: *mut core::ffi::c_void, whitepointy: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -710,7 +710,7 @@ impl IDCompositionBrightnessEffect_Vtbl { } unsafe extern "system" fn SetBlackPointX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionBrightnessEffect_Impl::SetBlackPointX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionBrightnessEffect_Impl::SetBlackPointX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBlackPointX2(this: *mut core::ffi::c_void, blackpointx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -718,7 +718,7 @@ impl IDCompositionBrightnessEffect_Vtbl { } unsafe extern "system" fn SetBlackPointY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionBrightnessEffect_Impl::SetBlackPointY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionBrightnessEffect_Impl::SetBlackPointY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBlackPointY2(this: *mut core::ffi::c_void, blackpointy: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -808,7 +808,7 @@ pub struct IDCompositionColorMatrixEffect_Vtbl { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub trait IDCompositionColorMatrixEffect_Impl: IDCompositionFilterEffect_Impl { fn SetMatrix(&self, matrix: *const super::Direct2D::Common::D2D_MATRIX_5X4_F) -> windows_core::Result<()>; - fn SetMatrixElement(&self, row: i32, column: i32, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetMatrixElement(&self, row: i32, column: i32, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetMatrixElement2(&self, row: i32, column: i32, value: f32) -> windows_core::Result<()>; fn SetAlphaMode(&self, mode: super::Direct2D::Common::D2D1_COLORMATRIX_ALPHA_MODE) -> windows_core::Result<()>; fn SetClampOutput(&self, clamp: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -822,7 +822,7 @@ impl IDCompositionColorMatrixEffect_Vtbl { } unsafe extern "system" fn SetMatrixElement(this: *mut core::ffi::c_void, row: i32, column: i32, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionColorMatrixEffect_Impl::SetMatrixElement(this, core::mem::transmute_copy(&row), core::mem::transmute_copy(&column), windows_core::from_raw_borrowed(&animation)).into() + IDCompositionColorMatrixEffect_Impl::SetMatrixElement(this, core::mem::transmute_copy(&row), core::mem::transmute_copy(&column), core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetMatrixElement2(this: *mut core::ffi::c_void, row: i32, column: i32, value: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1617,7 +1617,7 @@ pub trait IDCompositionDevice2_Impl: windows_core::IUnknownImpl { fn WaitForCommitCompletion(&self) -> windows_core::Result<()>; fn GetFrameStatistics(&self) -> windows_core::Result; fn CreateVisual(&self) -> windows_core::Result; - fn CreateSurfaceFactory(&self, renderingdevice: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateSurfaceFactory(&self, renderingdevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn CreateSurface(&self, width: u32, height: u32, pixelformat: super::Dxgi::Common::DXGI_FORMAT, alphamode: super::Dxgi::Common::DXGI_ALPHA_MODE) -> windows_core::Result; fn CreateVirtualSurface(&self, initialwidth: u32, initialheight: u32, pixelformat: super::Dxgi::Common::DXGI_FORMAT, alphamode: super::Dxgi::Common::DXGI_ALPHA_MODE) -> windows_core::Result; fn CreateTranslateTransform(&self) -> windows_core::Result; @@ -1668,7 +1668,7 @@ impl IDCompositionDevice2_Vtbl { } unsafe extern "system" fn CreateSurfaceFactory(this: *mut core::ffi::c_void, renderingdevice: *mut core::ffi::c_void, surfacefactory: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDCompositionDevice2_Impl::CreateSurfaceFactory(this, windows_core::from_raw_borrowed(&renderingdevice)) { + match IDCompositionDevice2_Impl::CreateSurfaceFactory(this, core::mem::transmute_copy(&renderingdevice)) { Ok(ok__) => { surfacefactory.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2150,15 +2150,15 @@ pub struct IDCompositionDevice4_Vtbl { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait IDCompositionDevice4_Impl: IDCompositionDevice3_Impl { - fn CheckCompositionTextureSupport(&self, renderingdevice: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn CreateCompositionTexture(&self, d3dtexture: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CheckCompositionTextureSupport(&self, renderingdevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn CreateCompositionTexture(&self, d3dtexture: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl IDCompositionDevice4_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CheckCompositionTextureSupport(this: *mut core::ffi::c_void, renderingdevice: *mut core::ffi::c_void, supportscompositiontextures: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDCompositionDevice4_Impl::CheckCompositionTextureSupport(this, windows_core::from_raw_borrowed(&renderingdevice)) { + match IDCompositionDevice4_Impl::CheckCompositionTextureSupport(this, core::mem::transmute_copy(&renderingdevice)) { Ok(ok__) => { supportscompositiontextures.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2168,7 +2168,7 @@ impl IDCompositionDevice4_Vtbl { } unsafe extern "system" fn CreateCompositionTexture(this: *mut core::ffi::c_void, d3dtexture: *mut core::ffi::c_void, compositiontexture: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDCompositionDevice4_Impl::CreateCompositionTexture(this, windows_core::from_raw_borrowed(&d3dtexture)) { + match IDCompositionDevice4_Impl::CreateCompositionTexture(this, core::mem::transmute_copy(&d3dtexture)) { Ok(ok__) => { compositiontexture.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2278,15 +2278,15 @@ pub struct IDCompositionEffectGroup_Vtbl { pub SetTransform3D: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDCompositionEffectGroup_Impl: IDCompositionEffect_Impl { - fn SetOpacity(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOpacity(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOpacity2(&self, opacity: f32) -> windows_core::Result<()>; - fn SetTransform3D(&self, transform3d: Option<&IDCompositionTransform3D>) -> windows_core::Result<()>; + fn SetTransform3D(&self, transform3d: windows_core::Ref<'_, IDCompositionTransform3D>) -> windows_core::Result<()>; } impl IDCompositionEffectGroup_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOpacity(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionEffectGroup_Impl::SetOpacity(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionEffectGroup_Impl::SetOpacity(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOpacity2(this: *mut core::ffi::c_void, opacity: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2294,7 +2294,7 @@ impl IDCompositionEffectGroup_Vtbl { } unsafe extern "system" fn SetTransform3D(this: *mut core::ffi::c_void, transform3d: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionEffectGroup_Impl::SetTransform3D(this, windows_core::from_raw_borrowed(&transform3d)).into() + IDCompositionEffectGroup_Impl::SetTransform3D(this, core::mem::transmute_copy(&transform3d)).into() } Self { base__: IDCompositionEffect_Vtbl::new::(), @@ -2330,13 +2330,13 @@ pub struct IDCompositionFilterEffect_Vtbl { pub SetInput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IDCompositionFilterEffect_Impl: IDCompositionEffect_Impl { - fn SetInput(&self, index: u32, input: Option<&windows_core::IUnknown>, flags: u32) -> windows_core::Result<()>; + fn SetInput(&self, index: u32, input: windows_core::Ref<'_, windows_core::IUnknown>, flags: u32) -> windows_core::Result<()>; } impl IDCompositionFilterEffect_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetInput(this: *mut core::ffi::c_void, index: u32, input: *mut core::ffi::c_void, flags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionFilterEffect_Impl::SetInput(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&input), core::mem::transmute_copy(&flags)).into() + IDCompositionFilterEffect_Impl::SetInput(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&input), core::mem::transmute_copy(&flags)).into() } Self { base__: IDCompositionEffect_Vtbl::new::(), SetInput: SetInput:: } } @@ -2380,7 +2380,7 @@ pub struct IDCompositionGaussianBlurEffect_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub trait IDCompositionGaussianBlurEffect_Impl: IDCompositionFilterEffect_Impl { - fn SetStandardDeviation(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetStandardDeviation(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetStandardDeviation2(&self, amount: f32) -> windows_core::Result<()>; fn SetBorderMode(&self, mode: super::Direct2D::Common::D2D1_BORDER_MODE) -> windows_core::Result<()>; } @@ -2389,7 +2389,7 @@ impl IDCompositionGaussianBlurEffect_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetStandardDeviation(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionGaussianBlurEffect_Impl::SetStandardDeviation(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionGaussianBlurEffect_Impl::SetStandardDeviation(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetStandardDeviation2(this: *mut core::ffi::c_void, amount: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2438,14 +2438,14 @@ pub struct IDCompositionHueRotationEffect_Vtbl { pub SetAngle2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionHueRotationEffect_Impl: IDCompositionFilterEffect_Impl { - fn SetAngle(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAngle(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAngle2(&self, amountdegrees: f32) -> windows_core::Result<()>; } impl IDCompositionHueRotationEffect_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetAngle(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionHueRotationEffect_Impl::SetAngle(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionHueRotationEffect_Impl::SetAngle(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAngle2(this: *mut core::ffi::c_void, amountdegrees: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2485,7 +2485,7 @@ pub struct IDCompositionInkTrailDevice_Vtbl { } pub trait IDCompositionInkTrailDevice_Impl: windows_core::IUnknownImpl { fn CreateDelegatedInkTrail(&self) -> windows_core::Result; - fn CreateDelegatedInkTrailForSwapChain(&self, swapchain: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateDelegatedInkTrailForSwapChain(&self, swapchain: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } impl IDCompositionInkTrailDevice_Vtbl { pub const fn new() -> Self { @@ -2501,7 +2501,7 @@ impl IDCompositionInkTrailDevice_Vtbl { } unsafe extern "system" fn CreateDelegatedInkTrailForSwapChain(this: *mut core::ffi::c_void, swapchain: *mut core::ffi::c_void, inktrail: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDCompositionInkTrailDevice_Impl::CreateDelegatedInkTrailForSwapChain(this, windows_core::from_raw_borrowed(&swapchain)) { + match IDCompositionInkTrailDevice_Impl::CreateDelegatedInkTrailForSwapChain(this, core::mem::transmute_copy(&swapchain)) { Ok(ok__) => { inktrail.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2643,24 +2643,24 @@ pub struct IDCompositionLinearTransferEffect_Vtbl { pub SetClampOutput: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IDCompositionLinearTransferEffect_Impl: IDCompositionFilterEffect_Impl { - fn SetRedYIntercept(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetRedYIntercept(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetRedYIntercept2(&self, redyintercept: f32) -> windows_core::Result<()>; - fn SetRedSlope(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetRedSlope(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetRedSlope2(&self, redslope: f32) -> windows_core::Result<()>; fn SetRedDisable(&self, reddisable: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetGreenYIntercept(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetGreenYIntercept(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetGreenYIntercept2(&self, greenyintercept: f32) -> windows_core::Result<()>; - fn SetGreenSlope(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetGreenSlope(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetGreenSlope2(&self, greenslope: f32) -> windows_core::Result<()>; fn SetGreenDisable(&self, greendisable: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetBlueYIntercept(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBlueYIntercept(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBlueYIntercept2(&self, blueyintercept: f32) -> windows_core::Result<()>; - fn SetBlueSlope(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBlueSlope(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBlueSlope2(&self, blueslope: f32) -> windows_core::Result<()>; fn SetBlueDisable(&self, bluedisable: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetAlphaYIntercept(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAlphaYIntercept(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAlphaYIntercept2(&self, alphayintercept: f32) -> windows_core::Result<()>; - fn SetAlphaSlope(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAlphaSlope(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAlphaSlope2(&self, alphaslope: f32) -> windows_core::Result<()>; fn SetAlphaDisable(&self, alphadisable: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetClampOutput(&self, clampoutput: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -2669,7 +2669,7 @@ impl IDCompositionLinearTransferEffect_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRedYIntercept(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionLinearTransferEffect_Impl::SetRedYIntercept(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionLinearTransferEffect_Impl::SetRedYIntercept(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetRedYIntercept2(this: *mut core::ffi::c_void, redyintercept: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2677,7 +2677,7 @@ impl IDCompositionLinearTransferEffect_Vtbl { } unsafe extern "system" fn SetRedSlope(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionLinearTransferEffect_Impl::SetRedSlope(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionLinearTransferEffect_Impl::SetRedSlope(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetRedSlope2(this: *mut core::ffi::c_void, redslope: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2689,7 +2689,7 @@ impl IDCompositionLinearTransferEffect_Vtbl { } unsafe extern "system" fn SetGreenYIntercept(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionLinearTransferEffect_Impl::SetGreenYIntercept(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionLinearTransferEffect_Impl::SetGreenYIntercept(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetGreenYIntercept2(this: *mut core::ffi::c_void, greenyintercept: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2697,7 +2697,7 @@ impl IDCompositionLinearTransferEffect_Vtbl { } unsafe extern "system" fn SetGreenSlope(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionLinearTransferEffect_Impl::SetGreenSlope(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionLinearTransferEffect_Impl::SetGreenSlope(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetGreenSlope2(this: *mut core::ffi::c_void, greenslope: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2709,7 +2709,7 @@ impl IDCompositionLinearTransferEffect_Vtbl { } unsafe extern "system" fn SetBlueYIntercept(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionLinearTransferEffect_Impl::SetBlueYIntercept(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionLinearTransferEffect_Impl::SetBlueYIntercept(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBlueYIntercept2(this: *mut core::ffi::c_void, blueyintercept: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2717,7 +2717,7 @@ impl IDCompositionLinearTransferEffect_Vtbl { } unsafe extern "system" fn SetBlueSlope(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionLinearTransferEffect_Impl::SetBlueSlope(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionLinearTransferEffect_Impl::SetBlueSlope(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBlueSlope2(this: *mut core::ffi::c_void, blueslope: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2729,7 +2729,7 @@ impl IDCompositionLinearTransferEffect_Vtbl { } unsafe extern "system" fn SetAlphaYIntercept(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionLinearTransferEffect_Impl::SetAlphaYIntercept(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionLinearTransferEffect_Impl::SetAlphaYIntercept(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAlphaYIntercept2(this: *mut core::ffi::c_void, alphayintercept: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2737,7 +2737,7 @@ impl IDCompositionLinearTransferEffect_Vtbl { } unsafe extern "system" fn SetAlphaSlope(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionLinearTransferEffect_Impl::SetAlphaSlope(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionLinearTransferEffect_Impl::SetAlphaSlope(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAlphaSlope2(this: *mut core::ffi::c_void, alphaslope: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2817,7 +2817,7 @@ pub struct IDCompositionMatrixTransform_Vtbl { #[cfg(feature = "Foundation_Numerics")] pub trait IDCompositionMatrixTransform_Impl: IDCompositionTransform_Impl { fn SetMatrix(&self, matrix: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::Result<()>; - fn SetMatrixElement(&self, row: i32, column: i32, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetMatrixElement(&self, row: i32, column: i32, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetMatrixElement2(&self, row: i32, column: i32, value: f32) -> windows_core::Result<()>; } #[cfg(feature = "Foundation_Numerics")] @@ -2829,7 +2829,7 @@ impl IDCompositionMatrixTransform_Vtbl { } unsafe extern "system" fn SetMatrixElement(this: *mut core::ffi::c_void, row: i32, column: i32, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionMatrixTransform_Impl::SetMatrixElement(this, core::mem::transmute_copy(&row), core::mem::transmute_copy(&column), windows_core::from_raw_borrowed(&animation)).into() + IDCompositionMatrixTransform_Impl::SetMatrixElement(this, core::mem::transmute_copy(&row), core::mem::transmute_copy(&column), core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetMatrixElement2(this: *mut core::ffi::c_void, row: i32, column: i32, value: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2884,7 +2884,7 @@ pub struct IDCompositionMatrixTransform3D_Vtbl { #[cfg(feature = "Foundation_Numerics")] pub trait IDCompositionMatrixTransform3D_Impl: IDCompositionTransform3D_Impl { fn SetMatrix(&self, matrix: *const super::super::super::Foundation::Numerics::Matrix4x4) -> windows_core::Result<()>; - fn SetMatrixElement(&self, row: i32, column: i32, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetMatrixElement(&self, row: i32, column: i32, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetMatrixElement2(&self, row: i32, column: i32, value: f32) -> windows_core::Result<()>; } #[cfg(feature = "Foundation_Numerics")] @@ -2896,7 +2896,7 @@ impl IDCompositionMatrixTransform3D_Vtbl { } unsafe extern "system" fn SetMatrixElement(this: *mut core::ffi::c_void, row: i32, column: i32, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionMatrixTransform3D_Impl::SetMatrixElement(this, core::mem::transmute_copy(&row), core::mem::transmute_copy(&column), windows_core::from_raw_borrowed(&animation)).into() + IDCompositionMatrixTransform3D_Impl::SetMatrixElement(this, core::mem::transmute_copy(&row), core::mem::transmute_copy(&column), core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetMatrixElement2(this: *mut core::ffi::c_void, row: i32, column: i32, value: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3062,36 +3062,36 @@ pub struct IDCompositionRectangleClip_Vtbl { pub SetBottomRightRadiusY2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionRectangleClip_Impl: IDCompositionClip_Impl { - fn SetLeft(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetLeft(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetLeft2(&self, left: f32) -> windows_core::Result<()>; - fn SetTop(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetTop(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetTop2(&self, top: f32) -> windows_core::Result<()>; - fn SetRight(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetRight(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetRight2(&self, right: f32) -> windows_core::Result<()>; - fn SetBottom(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBottom(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBottom2(&self, bottom: f32) -> windows_core::Result<()>; - fn SetTopLeftRadiusX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetTopLeftRadiusX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetTopLeftRadiusX2(&self, radius: f32) -> windows_core::Result<()>; - fn SetTopLeftRadiusY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetTopLeftRadiusY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetTopLeftRadiusY2(&self, radius: f32) -> windows_core::Result<()>; - fn SetTopRightRadiusX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetTopRightRadiusX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetTopRightRadiusX2(&self, radius: f32) -> windows_core::Result<()>; - fn SetTopRightRadiusY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetTopRightRadiusY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetTopRightRadiusY2(&self, radius: f32) -> windows_core::Result<()>; - fn SetBottomLeftRadiusX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBottomLeftRadiusX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBottomLeftRadiusX2(&self, radius: f32) -> windows_core::Result<()>; - fn SetBottomLeftRadiusY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBottomLeftRadiusY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBottomLeftRadiusY2(&self, radius: f32) -> windows_core::Result<()>; - fn SetBottomRightRadiusX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBottomRightRadiusX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBottomRightRadiusX2(&self, radius: f32) -> windows_core::Result<()>; - fn SetBottomRightRadiusY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBottomRightRadiusY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBottomRightRadiusY2(&self, radius: f32) -> windows_core::Result<()>; } impl IDCompositionRectangleClip_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetLeft(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetLeft(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetLeft(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetLeft2(this: *mut core::ffi::c_void, left: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3099,7 +3099,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetTop(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetTop(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetTop(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetTop2(this: *mut core::ffi::c_void, top: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3107,7 +3107,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetRight(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetRight(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetRight(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetRight2(this: *mut core::ffi::c_void, right: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3115,7 +3115,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetBottom(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetBottom(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetBottom(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBottom2(this: *mut core::ffi::c_void, bottom: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3123,7 +3123,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetTopLeftRadiusX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetTopLeftRadiusX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetTopLeftRadiusX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetTopLeftRadiusX2(this: *mut core::ffi::c_void, radius: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3131,7 +3131,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetTopLeftRadiusY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetTopLeftRadiusY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetTopLeftRadiusY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetTopLeftRadiusY2(this: *mut core::ffi::c_void, radius: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3139,7 +3139,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetTopRightRadiusX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetTopRightRadiusX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetTopRightRadiusX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetTopRightRadiusX2(this: *mut core::ffi::c_void, radius: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3147,7 +3147,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetTopRightRadiusY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetTopRightRadiusY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetTopRightRadiusY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetTopRightRadiusY2(this: *mut core::ffi::c_void, radius: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3155,7 +3155,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetBottomLeftRadiusX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetBottomLeftRadiusX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetBottomLeftRadiusX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBottomLeftRadiusX2(this: *mut core::ffi::c_void, radius: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3163,7 +3163,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetBottomLeftRadiusY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetBottomLeftRadiusY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetBottomLeftRadiusY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBottomLeftRadiusY2(this: *mut core::ffi::c_void, radius: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3171,7 +3171,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetBottomRightRadiusX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetBottomRightRadiusX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetBottomRightRadiusX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBottomRightRadiusX2(this: *mut core::ffi::c_void, radius: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3179,7 +3179,7 @@ impl IDCompositionRectangleClip_Vtbl { } unsafe extern "system" fn SetBottomRightRadiusY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRectangleClip_Impl::SetBottomRightRadiusY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRectangleClip_Impl::SetBottomRightRadiusY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBottomRightRadiusY2(this: *mut core::ffi::c_void, radius: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3266,18 +3266,18 @@ pub struct IDCompositionRotateTransform_Vtbl { pub SetCenterY2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionRotateTransform_Impl: IDCompositionTransform_Impl { - fn SetAngle(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAngle(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAngle2(&self, angle: f32) -> windows_core::Result<()>; - fn SetCenterX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterX2(&self, centerx: f32) -> windows_core::Result<()>; - fn SetCenterY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterY2(&self, centery: f32) -> windows_core::Result<()>; } impl IDCompositionRotateTransform_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetAngle(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform_Impl::SetAngle(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform_Impl::SetAngle(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAngle2(this: *mut core::ffi::c_void, angle: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3285,7 +3285,7 @@ impl IDCompositionRotateTransform_Vtbl { } unsafe extern "system" fn SetCenterX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform_Impl::SetCenterX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform_Impl::SetCenterX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterX2(this: *mut core::ffi::c_void, centerx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3293,7 +3293,7 @@ impl IDCompositionRotateTransform_Vtbl { } unsafe extern "system" fn SetCenterY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform_Impl::SetCenterY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform_Impl::SetCenterY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterY2(this: *mut core::ffi::c_void, centery: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3406,26 +3406,26 @@ pub struct IDCompositionRotateTransform3D_Vtbl { pub SetCenterZ2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionRotateTransform3D_Impl: IDCompositionTransform3D_Impl { - fn SetAngle(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAngle(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAngle2(&self, angle: f32) -> windows_core::Result<()>; - fn SetAxisX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAxisX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAxisX2(&self, axisx: f32) -> windows_core::Result<()>; - fn SetAxisY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAxisY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAxisY2(&self, axisy: f32) -> windows_core::Result<()>; - fn SetAxisZ(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAxisZ(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAxisZ2(&self, axisz: f32) -> windows_core::Result<()>; - fn SetCenterX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterX2(&self, centerx: f32) -> windows_core::Result<()>; - fn SetCenterY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterY2(&self, centery: f32) -> windows_core::Result<()>; - fn SetCenterZ(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterZ(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterZ2(&self, centerz: f32) -> windows_core::Result<()>; } impl IDCompositionRotateTransform3D_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetAngle(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform3D_Impl::SetAngle(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform3D_Impl::SetAngle(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAngle2(this: *mut core::ffi::c_void, angle: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3433,7 +3433,7 @@ impl IDCompositionRotateTransform3D_Vtbl { } unsafe extern "system" fn SetAxisX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform3D_Impl::SetAxisX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform3D_Impl::SetAxisX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAxisX2(this: *mut core::ffi::c_void, axisx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3441,7 +3441,7 @@ impl IDCompositionRotateTransform3D_Vtbl { } unsafe extern "system" fn SetAxisY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform3D_Impl::SetAxisY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform3D_Impl::SetAxisY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAxisY2(this: *mut core::ffi::c_void, axisy: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3449,7 +3449,7 @@ impl IDCompositionRotateTransform3D_Vtbl { } unsafe extern "system" fn SetAxisZ(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform3D_Impl::SetAxisZ(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform3D_Impl::SetAxisZ(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAxisZ2(this: *mut core::ffi::c_void, axisz: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3457,7 +3457,7 @@ impl IDCompositionRotateTransform3D_Vtbl { } unsafe extern "system" fn SetCenterX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform3D_Impl::SetCenterX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform3D_Impl::SetCenterX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterX2(this: *mut core::ffi::c_void, centerx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3465,7 +3465,7 @@ impl IDCompositionRotateTransform3D_Vtbl { } unsafe extern "system" fn SetCenterY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform3D_Impl::SetCenterY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform3D_Impl::SetCenterY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterY2(this: *mut core::ffi::c_void, centery: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3473,7 +3473,7 @@ impl IDCompositionRotateTransform3D_Vtbl { } unsafe extern "system" fn SetCenterZ(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionRotateTransform3D_Impl::SetCenterZ(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionRotateTransform3D_Impl::SetCenterZ(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterZ2(this: *mut core::ffi::c_void, centerz: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3528,14 +3528,14 @@ pub struct IDCompositionSaturationEffect_Vtbl { pub SetSaturation2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionSaturationEffect_Impl: IDCompositionFilterEffect_Impl { - fn SetSaturation(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetSaturation(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetSaturation2(&self, ratio: f32) -> windows_core::Result<()>; } impl IDCompositionSaturationEffect_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSaturation(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionSaturationEffect_Impl::SetSaturation(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionSaturationEffect_Impl::SetSaturation(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetSaturation2(this: *mut core::ffi::c_void, ratio: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3611,20 +3611,20 @@ pub struct IDCompositionScaleTransform_Vtbl { pub SetCenterY2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionScaleTransform_Impl: IDCompositionTransform_Impl { - fn SetScaleX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetScaleX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetScaleX2(&self, scalex: f32) -> windows_core::Result<()>; - fn SetScaleY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetScaleY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetScaleY2(&self, scaley: f32) -> windows_core::Result<()>; - fn SetCenterX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterX2(&self, centerx: f32) -> windows_core::Result<()>; - fn SetCenterY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterY2(&self, centery: f32) -> windows_core::Result<()>; } impl IDCompositionScaleTransform_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetScaleX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform_Impl::SetScaleX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform_Impl::SetScaleX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetScaleX2(this: *mut core::ffi::c_void, scalex: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3632,7 +3632,7 @@ impl IDCompositionScaleTransform_Vtbl { } unsafe extern "system" fn SetScaleY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform_Impl::SetScaleY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform_Impl::SetScaleY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetScaleY2(this: *mut core::ffi::c_void, scaley: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3640,7 +3640,7 @@ impl IDCompositionScaleTransform_Vtbl { } unsafe extern "system" fn SetCenterX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform_Impl::SetCenterX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform_Impl::SetCenterX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterX2(this: *mut core::ffi::c_void, centerx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3648,7 +3648,7 @@ impl IDCompositionScaleTransform_Vtbl { } unsafe extern "system" fn SetCenterY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform_Impl::SetCenterY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform_Impl::SetCenterY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterY2(this: *mut core::ffi::c_void, centery: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3752,24 +3752,24 @@ pub struct IDCompositionScaleTransform3D_Vtbl { pub SetCenterZ2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionScaleTransform3D_Impl: IDCompositionTransform3D_Impl { - fn SetScaleX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetScaleX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetScaleX2(&self, scalex: f32) -> windows_core::Result<()>; - fn SetScaleY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetScaleY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetScaleY2(&self, scaley: f32) -> windows_core::Result<()>; - fn SetScaleZ(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetScaleZ(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetScaleZ2(&self, scalez: f32) -> windows_core::Result<()>; - fn SetCenterX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterX2(&self, centerx: f32) -> windows_core::Result<()>; - fn SetCenterY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterY2(&self, centery: f32) -> windows_core::Result<()>; - fn SetCenterZ(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterZ(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterZ2(&self, centerz: f32) -> windows_core::Result<()>; } impl IDCompositionScaleTransform3D_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetScaleX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform3D_Impl::SetScaleX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform3D_Impl::SetScaleX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetScaleX2(this: *mut core::ffi::c_void, scalex: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3777,7 +3777,7 @@ impl IDCompositionScaleTransform3D_Vtbl { } unsafe extern "system" fn SetScaleY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform3D_Impl::SetScaleY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform3D_Impl::SetScaleY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetScaleY2(this: *mut core::ffi::c_void, scaley: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3785,7 +3785,7 @@ impl IDCompositionScaleTransform3D_Vtbl { } unsafe extern "system" fn SetScaleZ(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform3D_Impl::SetScaleZ(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform3D_Impl::SetScaleZ(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetScaleZ2(this: *mut core::ffi::c_void, scalez: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3793,7 +3793,7 @@ impl IDCompositionScaleTransform3D_Vtbl { } unsafe extern "system" fn SetCenterX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform3D_Impl::SetCenterX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform3D_Impl::SetCenterX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterX2(this: *mut core::ffi::c_void, centerx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3801,7 +3801,7 @@ impl IDCompositionScaleTransform3D_Vtbl { } unsafe extern "system" fn SetCenterY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform3D_Impl::SetCenterY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform3D_Impl::SetCenterY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterY2(this: *mut core::ffi::c_void, centery: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3809,7 +3809,7 @@ impl IDCompositionScaleTransform3D_Vtbl { } unsafe extern "system" fn SetCenterZ(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionScaleTransform3D_Impl::SetCenterZ(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionScaleTransform3D_Impl::SetCenterZ(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterZ2(this: *mut core::ffi::c_void, centerz: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3915,16 +3915,16 @@ pub struct IDCompositionShadowEffect_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub trait IDCompositionShadowEffect_Impl: IDCompositionFilterEffect_Impl { - fn SetStandardDeviation(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetStandardDeviation(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetStandardDeviation2(&self, amount: f32) -> windows_core::Result<()>; fn SetColor(&self, color: *const super::Direct2D::Common::D2D_VECTOR_4F) -> windows_core::Result<()>; - fn SetRed(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetRed(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetRed2(&self, amount: f32) -> windows_core::Result<()>; - fn SetGreen(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetGreen(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetGreen2(&self, amount: f32) -> windows_core::Result<()>; - fn SetBlue(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBlue(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBlue2(&self, amount: f32) -> windows_core::Result<()>; - fn SetAlpha(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAlpha(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAlpha2(&self, amount: f32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -3932,7 +3932,7 @@ impl IDCompositionShadowEffect_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetStandardDeviation(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionShadowEffect_Impl::SetStandardDeviation(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionShadowEffect_Impl::SetStandardDeviation(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetStandardDeviation2(this: *mut core::ffi::c_void, amount: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3944,7 +3944,7 @@ impl IDCompositionShadowEffect_Vtbl { } unsafe extern "system" fn SetRed(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionShadowEffect_Impl::SetRed(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionShadowEffect_Impl::SetRed(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetRed2(this: *mut core::ffi::c_void, amount: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3952,7 +3952,7 @@ impl IDCompositionShadowEffect_Vtbl { } unsafe extern "system" fn SetGreen(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionShadowEffect_Impl::SetGreen(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionShadowEffect_Impl::SetGreen(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetGreen2(this: *mut core::ffi::c_void, amount: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3960,7 +3960,7 @@ impl IDCompositionShadowEffect_Vtbl { } unsafe extern "system" fn SetBlue(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionShadowEffect_Impl::SetBlue(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionShadowEffect_Impl::SetBlue(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBlue2(this: *mut core::ffi::c_void, amount: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3968,7 +3968,7 @@ impl IDCompositionShadowEffect_Vtbl { } unsafe extern "system" fn SetAlpha(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionShadowEffect_Impl::SetAlpha(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionShadowEffect_Impl::SetAlpha(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAlpha2(this: *mut core::ffi::c_void, amount: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4054,20 +4054,20 @@ pub struct IDCompositionSkewTransform_Vtbl { pub SetCenterY2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionSkewTransform_Impl: IDCompositionTransform_Impl { - fn SetAngleX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAngleX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAngleX2(&self, anglex: f32) -> windows_core::Result<()>; - fn SetAngleY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAngleY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAngleY2(&self, angley: f32) -> windows_core::Result<()>; - fn SetCenterX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterX2(&self, centerx: f32) -> windows_core::Result<()>; - fn SetCenterY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetCenterY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetCenterY2(&self, centery: f32) -> windows_core::Result<()>; } impl IDCompositionSkewTransform_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetAngleX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionSkewTransform_Impl::SetAngleX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionSkewTransform_Impl::SetAngleX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAngleX2(this: *mut core::ffi::c_void, anglex: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4075,7 +4075,7 @@ impl IDCompositionSkewTransform_Vtbl { } unsafe extern "system" fn SetAngleY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionSkewTransform_Impl::SetAngleY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionSkewTransform_Impl::SetAngleY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAngleY2(this: *mut core::ffi::c_void, angley: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4083,7 +4083,7 @@ impl IDCompositionSkewTransform_Vtbl { } unsafe extern "system" fn SetCenterX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionSkewTransform_Impl::SetCenterX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionSkewTransform_Impl::SetCenterX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterX2(this: *mut core::ffi::c_void, centerx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4091,7 +4091,7 @@ impl IDCompositionSkewTransform_Vtbl { } unsafe extern "system" fn SetCenterY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionSkewTransform_Impl::SetCenterY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionSkewTransform_Impl::SetCenterY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetCenterY2(this: *mut core::ffi::c_void, centery: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4359,13 +4359,13 @@ pub trait IDCompositionTableTransferEffect_Impl: IDCompositionFilterEffect_Impl fn SetBlueDisable(&self, bluedisable: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetAlphaDisable(&self, alphadisable: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetClampOutput(&self, clampoutput: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetRedTableValue(&self, index: u32, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetRedTableValue(&self, index: u32, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetRedTableValue2(&self, index: u32, value: f32) -> windows_core::Result<()>; - fn SetGreenTableValue(&self, index: u32, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetGreenTableValue(&self, index: u32, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetGreenTableValue2(&self, index: u32, value: f32) -> windows_core::Result<()>; - fn SetBlueTableValue(&self, index: u32, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetBlueTableValue(&self, index: u32, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetBlueTableValue2(&self, index: u32, value: f32) -> windows_core::Result<()>; - fn SetAlphaTableValue(&self, index: u32, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetAlphaTableValue(&self, index: u32, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetAlphaTableValue2(&self, index: u32, value: f32) -> windows_core::Result<()>; } impl IDCompositionTableTransferEffect_Vtbl { @@ -4408,7 +4408,7 @@ impl IDCompositionTableTransferEffect_Vtbl { } unsafe extern "system" fn SetRedTableValue(this: *mut core::ffi::c_void, index: u32, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTableTransferEffect_Impl::SetRedTableValue(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&animation)).into() + IDCompositionTableTransferEffect_Impl::SetRedTableValue(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetRedTableValue2(this: *mut core::ffi::c_void, index: u32, value: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4416,7 +4416,7 @@ impl IDCompositionTableTransferEffect_Vtbl { } unsafe extern "system" fn SetGreenTableValue(this: *mut core::ffi::c_void, index: u32, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTableTransferEffect_Impl::SetGreenTableValue(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&animation)).into() + IDCompositionTableTransferEffect_Impl::SetGreenTableValue(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetGreenTableValue2(this: *mut core::ffi::c_void, index: u32, value: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4424,7 +4424,7 @@ impl IDCompositionTableTransferEffect_Vtbl { } unsafe extern "system" fn SetBlueTableValue(this: *mut core::ffi::c_void, index: u32, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTableTransferEffect_Impl::SetBlueTableValue(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&animation)).into() + IDCompositionTableTransferEffect_Impl::SetBlueTableValue(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetBlueTableValue2(this: *mut core::ffi::c_void, index: u32, value: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4432,7 +4432,7 @@ impl IDCompositionTableTransferEffect_Vtbl { } unsafe extern "system" fn SetAlphaTableValue(this: *mut core::ffi::c_void, index: u32, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTableTransferEffect_Impl::SetAlphaTableValue(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&animation)).into() + IDCompositionTableTransferEffect_Impl::SetAlphaTableValue(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetAlphaTableValue2(this: *mut core::ffi::c_void, index: u32, value: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4480,13 +4480,13 @@ pub struct IDCompositionTarget_Vtbl { pub SetRoot: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDCompositionTarget_Impl: windows_core::IUnknownImpl { - fn SetRoot(&self, visual: Option<&IDCompositionVisual>) -> windows_core::Result<()>; + fn SetRoot(&self, visual: windows_core::Ref<'_, IDCompositionVisual>) -> windows_core::Result<()>; } impl IDCompositionTarget_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRoot(this: *mut core::ffi::c_void, visual: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTarget_Impl::SetRoot(this, windows_core::from_raw_borrowed(&visual)).into() + IDCompositionTarget_Impl::SetRoot(this, core::mem::transmute_copy(&visual)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetRoot: SetRoot:: } } @@ -4656,16 +4656,16 @@ pub struct IDCompositionTranslateTransform_Vtbl { pub SetOffsetY2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionTranslateTransform_Impl: IDCompositionTransform_Impl { - fn SetOffsetX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOffsetX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOffsetX2(&self, offsetx: f32) -> windows_core::Result<()>; - fn SetOffsetY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOffsetY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOffsetY2(&self, offsety: f32) -> windows_core::Result<()>; } impl IDCompositionTranslateTransform_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOffsetX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTranslateTransform_Impl::SetOffsetX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionTranslateTransform_Impl::SetOffsetX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOffsetX2(this: *mut core::ffi::c_void, offsetx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4673,7 +4673,7 @@ impl IDCompositionTranslateTransform_Vtbl { } unsafe extern "system" fn SetOffsetY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTranslateTransform_Impl::SetOffsetY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionTranslateTransform_Impl::SetOffsetY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOffsetY2(this: *mut core::ffi::c_void, offsety: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4740,18 +4740,18 @@ pub struct IDCompositionTranslateTransform3D_Vtbl { pub SetOffsetZ2: unsafe extern "system" fn(*mut core::ffi::c_void, f32) -> windows_core::HRESULT, } pub trait IDCompositionTranslateTransform3D_Impl: IDCompositionTransform3D_Impl { - fn SetOffsetX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOffsetX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOffsetX2(&self, offsetx: f32) -> windows_core::Result<()>; - fn SetOffsetY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOffsetY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOffsetY2(&self, offsety: f32) -> windows_core::Result<()>; - fn SetOffsetZ(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOffsetZ(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOffsetZ2(&self, offsetz: f32) -> windows_core::Result<()>; } impl IDCompositionTranslateTransform3D_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOffsetX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTranslateTransform3D_Impl::SetOffsetX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionTranslateTransform3D_Impl::SetOffsetX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOffsetX2(this: *mut core::ffi::c_void, offsetx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4759,7 +4759,7 @@ impl IDCompositionTranslateTransform3D_Vtbl { } unsafe extern "system" fn SetOffsetY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTranslateTransform3D_Impl::SetOffsetY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionTranslateTransform3D_Impl::SetOffsetY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOffsetY2(this: *mut core::ffi::c_void, offsety: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4767,7 +4767,7 @@ impl IDCompositionTranslateTransform3D_Vtbl { } unsafe extern "system" fn SetOffsetZ(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionTranslateTransform3D_Impl::SetOffsetZ(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionTranslateTransform3D_Impl::SetOffsetZ(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOffsetZ2(this: *mut core::ffi::c_void, offsetz: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5061,21 +5061,21 @@ pub struct IDCompositionVisual_Vtbl { } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub trait IDCompositionVisual_Impl: windows_core::IUnknownImpl { - fn SetOffsetX(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOffsetX(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOffsetX2(&self, offsetx: f32) -> windows_core::Result<()>; - fn SetOffsetY(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOffsetY(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOffsetY2(&self, offsety: f32) -> windows_core::Result<()>; - fn SetTransform(&self, transform: Option<&IDCompositionTransform>) -> windows_core::Result<()>; + fn SetTransform(&self, transform: windows_core::Ref<'_, IDCompositionTransform>) -> windows_core::Result<()>; fn SetTransform2(&self, matrix: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::Result<()>; - fn SetTransformParent(&self, visual: Option<&IDCompositionVisual>) -> windows_core::Result<()>; - fn SetEffect(&self, effect: Option<&IDCompositionEffect>) -> windows_core::Result<()>; + fn SetTransformParent(&self, visual: windows_core::Ref<'_, IDCompositionVisual>) -> windows_core::Result<()>; + fn SetEffect(&self, effect: windows_core::Ref<'_, IDCompositionEffect>) -> windows_core::Result<()>; fn SetBitmapInterpolationMode(&self, interpolationmode: DCOMPOSITION_BITMAP_INTERPOLATION_MODE) -> windows_core::Result<()>; fn SetBorderMode(&self, bordermode: DCOMPOSITION_BORDER_MODE) -> windows_core::Result<()>; - fn SetClip(&self, clip: Option<&IDCompositionClip>) -> windows_core::Result<()>; + fn SetClip(&self, clip: windows_core::Ref<'_, IDCompositionClip>) -> windows_core::Result<()>; fn SetClip2(&self, rect: *const super::Direct2D::Common::D2D_RECT_F) -> windows_core::Result<()>; - fn SetContent(&self, content: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn AddVisual(&self, visual: Option<&IDCompositionVisual>, insertabove: super::super::Foundation::BOOL, referencevisual: Option<&IDCompositionVisual>) -> windows_core::Result<()>; - fn RemoveVisual(&self, visual: Option<&IDCompositionVisual>) -> windows_core::Result<()>; + fn SetContent(&self, content: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddVisual(&self, visual: windows_core::Ref<'_, IDCompositionVisual>, insertabove: super::super::Foundation::BOOL, referencevisual: windows_core::Ref<'_, IDCompositionVisual>) -> windows_core::Result<()>; + fn RemoveVisual(&self, visual: windows_core::Ref<'_, IDCompositionVisual>) -> windows_core::Result<()>; fn RemoveAllVisuals(&self) -> windows_core::Result<()>; fn SetCompositeMode(&self, compositemode: DCOMPOSITION_COMPOSITE_MODE) -> windows_core::Result<()>; } @@ -5084,7 +5084,7 @@ impl IDCompositionVisual_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOffsetX(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual_Impl::SetOffsetX(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionVisual_Impl::SetOffsetX(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOffsetX2(this: *mut core::ffi::c_void, offsetx: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5092,7 +5092,7 @@ impl IDCompositionVisual_Vtbl { } unsafe extern "system" fn SetOffsetY(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual_Impl::SetOffsetY(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionVisual_Impl::SetOffsetY(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOffsetY2(this: *mut core::ffi::c_void, offsety: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5100,7 +5100,7 @@ impl IDCompositionVisual_Vtbl { } unsafe extern "system" fn SetTransform(this: *mut core::ffi::c_void, transform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual_Impl::SetTransform(this, windows_core::from_raw_borrowed(&transform)).into() + IDCompositionVisual_Impl::SetTransform(this, core::mem::transmute_copy(&transform)).into() } unsafe extern "system" fn SetTransform2(this: *mut core::ffi::c_void, matrix: *const super::super::super::Foundation::Numerics::Matrix3x2) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5108,11 +5108,11 @@ impl IDCompositionVisual_Vtbl { } unsafe extern "system" fn SetTransformParent(this: *mut core::ffi::c_void, visual: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual_Impl::SetTransformParent(this, windows_core::from_raw_borrowed(&visual)).into() + IDCompositionVisual_Impl::SetTransformParent(this, core::mem::transmute_copy(&visual)).into() } unsafe extern "system" fn SetEffect(this: *mut core::ffi::c_void, effect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual_Impl::SetEffect(this, windows_core::from_raw_borrowed(&effect)).into() + IDCompositionVisual_Impl::SetEffect(this, core::mem::transmute_copy(&effect)).into() } unsafe extern "system" fn SetBitmapInterpolationMode(this: *mut core::ffi::c_void, interpolationmode: DCOMPOSITION_BITMAP_INTERPOLATION_MODE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5124,7 +5124,7 @@ impl IDCompositionVisual_Vtbl { } unsafe extern "system" fn SetClip(this: *mut core::ffi::c_void, clip: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual_Impl::SetClip(this, windows_core::from_raw_borrowed(&clip)).into() + IDCompositionVisual_Impl::SetClip(this, core::mem::transmute_copy(&clip)).into() } unsafe extern "system" fn SetClip2(this: *mut core::ffi::c_void, rect: *const super::Direct2D::Common::D2D_RECT_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5132,15 +5132,15 @@ impl IDCompositionVisual_Vtbl { } unsafe extern "system" fn SetContent(this: *mut core::ffi::c_void, content: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual_Impl::SetContent(this, windows_core::from_raw_borrowed(&content)).into() + IDCompositionVisual_Impl::SetContent(this, core::mem::transmute_copy(&content)).into() } unsafe extern "system" fn AddVisual(this: *mut core::ffi::c_void, visual: *mut core::ffi::c_void, insertabove: super::super::Foundation::BOOL, referencevisual: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual_Impl::AddVisual(this, windows_core::from_raw_borrowed(&visual), core::mem::transmute_copy(&insertabove), windows_core::from_raw_borrowed(&referencevisual)).into() + IDCompositionVisual_Impl::AddVisual(this, core::mem::transmute_copy(&visual), core::mem::transmute_copy(&insertabove), core::mem::transmute_copy(&referencevisual)).into() } unsafe extern "system" fn RemoveVisual(this: *mut core::ffi::c_void, visual: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual_Impl::RemoveVisual(this, windows_core::from_raw_borrowed(&visual)).into() + IDCompositionVisual_Impl::RemoveVisual(this, core::mem::transmute_copy(&visual)).into() } unsafe extern "system" fn RemoveAllVisuals(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5289,11 +5289,11 @@ pub struct IDCompositionVisual3_Vtbl { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub trait IDCompositionVisual3_Impl: IDCompositionVisualDebug_Impl { fn SetDepthMode(&self, mode: DCOMPOSITION_DEPTH_MODE) -> windows_core::Result<()>; - fn SetOffsetZ(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOffsetZ(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOffsetZ2(&self, offsetz: f32) -> windows_core::Result<()>; - fn SetOpacity(&self, animation: Option<&IDCompositionAnimation>) -> windows_core::Result<()>; + fn SetOpacity(&self, animation: windows_core::Ref<'_, IDCompositionAnimation>) -> windows_core::Result<()>; fn SetOpacity2(&self, opacity: f32) -> windows_core::Result<()>; - fn SetTransform(&self, transform: Option<&IDCompositionTransform3D>) -> windows_core::Result<()>; + fn SetTransform(&self, transform: windows_core::Ref<'_, IDCompositionTransform3D>) -> windows_core::Result<()>; fn SetTransform2(&self, matrix: *const super::Direct2D::Common::D2D_MATRIX_4X4_F) -> windows_core::Result<()>; fn SetVisible(&self, visible: super::super::Foundation::BOOL) -> windows_core::Result<()>; } @@ -5306,7 +5306,7 @@ impl IDCompositionVisual3_Vtbl { } unsafe extern "system" fn SetOffsetZ(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual3_Impl::SetOffsetZ(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionVisual3_Impl::SetOffsetZ(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOffsetZ2(this: *mut core::ffi::c_void, offsetz: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5314,7 +5314,7 @@ impl IDCompositionVisual3_Vtbl { } unsafe extern "system" fn SetOpacity(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual3_Impl::SetOpacity(this, windows_core::from_raw_borrowed(&animation)).into() + IDCompositionVisual3_Impl::SetOpacity(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn SetOpacity2(this: *mut core::ffi::c_void, opacity: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5322,7 +5322,7 @@ impl IDCompositionVisual3_Vtbl { } unsafe extern "system" fn SetTransform(this: *mut core::ffi::c_void, transform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDCompositionVisual3_Impl::SetTransform(this, windows_core::from_raw_borrowed(&transform)).into() + IDCompositionVisual3_Impl::SetTransform(this, core::mem::transmute_copy(&transform)).into() } unsafe extern "system" fn SetTransform2(this: *mut core::ffi::c_void, matrix: *const super::Direct2D::Common::D2D_MATRIX_4X4_F) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs index c2aa1f9964..d4752046d7 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs @@ -6098,7 +6098,7 @@ pub struct IDDVideoPortContainer_Vtbl { pub QueryVideoPortStatus: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut DDVIDEOPORTSTATUS) -> windows_core::HRESULT, } pub trait IDDVideoPortContainer_Impl: windows_core::IUnknownImpl { - fn CreateVideoPort(&self, param0: u32, param1: *mut DDVIDEOPORTDESC, param2: *mut Option, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateVideoPort(&self, param0: u32, param1: *mut DDVIDEOPORTDESC, param2: windows_core::OutRef<'_, IDirectDrawVideoPort>, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumVideoPorts(&self, param0: u32, param1: *mut DDVIDEOPORTCAPS, param2: *mut core::ffi::c_void, param3: LPDDENUMVIDEOCALLBACK) -> windows_core::Result<()>; fn GetVideoPortConnectInfo(&self, param0: u32, pcinfo: *mut u32, param2: *mut DDVIDEOPORTCONNECT) -> windows_core::Result<()>; fn QueryVideoPortStatus(&self, param0: u32, param1: *mut DDVIDEOPORTSTATUS) -> windows_core::Result<()>; @@ -6107,7 +6107,7 @@ impl IDDVideoPortContainer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateVideoPort(this: *mut core::ffi::c_void, param0: u32, param1: *mut DDVIDEOPORTDESC, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDDVideoPortContainer_Impl::CreateVideoPort(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDDVideoPortContainer_Impl::CreateVideoPort(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn EnumVideoPorts(this: *mut core::ffi::c_void, param0: u32, param1: *mut DDVIDEOPORTCAPS, param2: *mut core::ffi::c_void, param3: LPDDENUMVIDEOCALLBACK) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6243,10 +6243,10 @@ pub struct IDirectDraw_Vtbl { #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirectDraw_Impl: windows_core::IUnknownImpl { fn Compact(&self) -> windows_core::Result<()>; - fn CreateClipper(&self, param0: u32, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CreatePalette(&self, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: *mut Option, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CreateSurface(&self, param0: *mut DDSURFACEDESC, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DuplicateSurface(&self, param0: Option<&IDirectDrawSurface>) -> windows_core::Result; + fn CreateClipper(&self, param0: u32, param1: windows_core::OutRef<'_, IDirectDrawClipper>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreatePalette(&self, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: windows_core::OutRef<'_, IDirectDrawPalette>, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateSurface(&self, param0: *mut DDSURFACEDESC, param1: windows_core::OutRef<'_, IDirectDrawSurface>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DuplicateSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface>) -> windows_core::Result; fn EnumDisplayModes(&self, param0: u32, param1: *mut DDSURFACEDESC, param2: *mut core::ffi::c_void, param3: LPDDENUMMODESCALLBACK) -> windows_core::Result<()>; fn EnumSurfaces(&self, param0: u32, param1: *mut DDSURFACEDESC, param2: *mut core::ffi::c_void, param3: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()>; fn FlipToGDISurface(&self) -> windows_core::Result<()>; @@ -6272,19 +6272,19 @@ impl IDirectDraw_Vtbl { } unsafe extern "system" fn CreateClipper(this: *mut core::ffi::c_void, param0: u32, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw_Impl::CreateClipper(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectDraw_Impl::CreateClipper(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn CreatePalette(this: *mut core::ffi::c_void, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw_Impl::CreatePalette(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectDraw_Impl::CreatePalette(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn CreateSurface(this: *mut core::ffi::c_void, param0: *mut DDSURFACEDESC, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw_Impl::CreateSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectDraw_Impl::CreateSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn DuplicateSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDirectDraw_Impl::DuplicateSurface(this, windows_core::from_raw_borrowed(¶m0)) { + match IDirectDraw_Impl::DuplicateSurface(this, core::mem::transmute_copy(¶m0)) { Ok(ok__) => { param1.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6501,10 +6501,10 @@ pub struct IDirectDraw2_Vtbl { #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirectDraw2_Impl: windows_core::IUnknownImpl { fn Compact(&self) -> windows_core::Result<()>; - fn CreateClipper(&self, param0: u32, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CreatePalette(&self, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: *mut Option, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CreateSurface(&self, param0: *mut DDSURFACEDESC, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DuplicateSurface(&self, param0: Option<&IDirectDrawSurface>) -> windows_core::Result; + fn CreateClipper(&self, param0: u32, param1: windows_core::OutRef<'_, IDirectDrawClipper>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreatePalette(&self, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: windows_core::OutRef<'_, IDirectDrawPalette>, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateSurface(&self, param0: *mut DDSURFACEDESC, param1: windows_core::OutRef<'_, IDirectDrawSurface>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DuplicateSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface>) -> windows_core::Result; fn EnumDisplayModes(&self, param0: u32, param1: *mut DDSURFACEDESC, param2: *mut core::ffi::c_void, param3: LPDDENUMMODESCALLBACK) -> windows_core::Result<()>; fn EnumSurfaces(&self, param0: u32, param1: *mut DDSURFACEDESC, param2: *mut core::ffi::c_void, param3: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()>; fn FlipToGDISurface(&self) -> windows_core::Result<()>; @@ -6531,19 +6531,19 @@ impl IDirectDraw2_Vtbl { } unsafe extern "system" fn CreateClipper(this: *mut core::ffi::c_void, param0: u32, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw2_Impl::CreateClipper(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectDraw2_Impl::CreateClipper(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn CreatePalette(this: *mut core::ffi::c_void, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw2_Impl::CreatePalette(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectDraw2_Impl::CreatePalette(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn CreateSurface(this: *mut core::ffi::c_void, param0: *mut DDSURFACEDESC, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw2_Impl::CreateSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectDraw2_Impl::CreateSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn DuplicateSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDirectDraw2_Impl::DuplicateSurface(this, windows_core::from_raw_borrowed(¶m0)) { + match IDirectDraw2_Impl::DuplicateSurface(this, core::mem::transmute_copy(¶m0)) { Ok(ok__) => { param1.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6786,10 +6786,10 @@ pub struct IDirectDraw4_Vtbl { #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirectDraw4_Impl: windows_core::IUnknownImpl { fn Compact(&self) -> windows_core::Result<()>; - fn CreateClipper(&self, param0: u32, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CreatePalette(&self, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: *mut Option, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CreateSurface(&self, param0: *mut DDSURFACEDESC2, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DuplicateSurface(&self, param0: Option<&IDirectDrawSurface4>) -> windows_core::Result; + fn CreateClipper(&self, param0: u32, param1: windows_core::OutRef<'_, IDirectDrawClipper>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreatePalette(&self, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: windows_core::OutRef<'_, IDirectDrawPalette>, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateSurface(&self, param0: *mut DDSURFACEDESC2, param1: windows_core::OutRef<'_, IDirectDrawSurface4>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DuplicateSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface4>) -> windows_core::Result; fn EnumDisplayModes(&self, param0: u32, param1: *mut DDSURFACEDESC2, param2: *mut core::ffi::c_void, param3: LPDDENUMMODESCALLBACK2) -> windows_core::Result<()>; fn EnumSurfaces(&self, param0: u32, param1: *mut DDSURFACEDESC2, param2: *mut core::ffi::c_void, param3: LPDDENUMSURFACESCALLBACK2) -> windows_core::Result<()>; fn FlipToGDISurface(&self) -> windows_core::Result<()>; @@ -6820,19 +6820,19 @@ impl IDirectDraw4_Vtbl { } unsafe extern "system" fn CreateClipper(this: *mut core::ffi::c_void, param0: u32, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw4_Impl::CreateClipper(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectDraw4_Impl::CreateClipper(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn CreatePalette(this: *mut core::ffi::c_void, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw4_Impl::CreatePalette(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectDraw4_Impl::CreatePalette(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn CreateSurface(this: *mut core::ffi::c_void, param0: *mut DDSURFACEDESC2, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw4_Impl::CreateSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectDraw4_Impl::CreateSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn DuplicateSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDirectDraw4_Impl::DuplicateSurface(this, windows_core::from_raw_borrowed(¶m0)) { + match IDirectDraw4_Impl::DuplicateSurface(this, core::mem::transmute_copy(¶m0)) { Ok(ok__) => { param1.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7109,10 +7109,10 @@ pub struct IDirectDraw7_Vtbl { #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirectDraw7_Impl: windows_core::IUnknownImpl { fn Compact(&self) -> windows_core::Result<()>; - fn CreateClipper(&self, param0: u32, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CreatePalette(&self, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: *mut Option, param3: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CreateSurface(&self, param0: *mut DDSURFACEDESC2, param1: *mut Option, param2: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DuplicateSurface(&self, param0: Option<&IDirectDrawSurface7>) -> windows_core::Result; + fn CreateClipper(&self, param0: u32, param1: windows_core::OutRef<'_, IDirectDrawClipper>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreatePalette(&self, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: windows_core::OutRef<'_, IDirectDrawPalette>, param3: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateSurface(&self, param0: *mut DDSURFACEDESC2, param1: windows_core::OutRef<'_, IDirectDrawSurface7>, param2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DuplicateSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface7>) -> windows_core::Result; fn EnumDisplayModes(&self, param0: u32, param1: *mut DDSURFACEDESC2, param2: *mut core::ffi::c_void, param3: LPDDENUMMODESCALLBACK2) -> windows_core::Result<()>; fn EnumSurfaces(&self, param0: u32, param1: *mut DDSURFACEDESC2, param2: *mut core::ffi::c_void, param3: LPDDENUMSURFACESCALLBACK7) -> windows_core::Result<()>; fn FlipToGDISurface(&self) -> windows_core::Result<()>; @@ -7145,19 +7145,19 @@ impl IDirectDraw7_Vtbl { } unsafe extern "system" fn CreateClipper(this: *mut core::ffi::c_void, param0: u32, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw7_Impl::CreateClipper(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectDraw7_Impl::CreateClipper(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn CreatePalette(this: *mut core::ffi::c_void, param0: u32, param1: *mut super::Gdi::PALETTEENTRY, param2: *mut *mut core::ffi::c_void, param3: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw7_Impl::CreatePalette(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)).into() + IDirectDraw7_Impl::CreatePalette(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn CreateSurface(this: *mut core::ffi::c_void, param0: *mut DDSURFACEDESC2, param1: *mut *mut core::ffi::c_void, param2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDraw7_Impl::CreateSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2)).into() + IDirectDraw7_Impl::CreateSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn DuplicateSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDirectDraw7_Impl::DuplicateSurface(this, windows_core::from_raw_borrowed(¶m0)) { + match IDirectDraw7_Impl::DuplicateSurface(this, core::mem::transmute_copy(¶m0)) { Ok(ok__) => { param1.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7349,7 +7349,7 @@ pub struct IDirectDrawClipper_Vtbl { pub trait IDirectDrawClipper_Impl: windows_core::IUnknownImpl { fn GetClipList(&self, param0: *mut super::super::Foundation::RECT, param1: *mut super::Gdi::RGNDATA, param2: *mut u32) -> windows_core::Result<()>; fn GetHWnd(&self, param0: *mut super::super::Foundation::HWND) -> windows_core::Result<()>; - fn Initialize(&self, param0: Option<&IDirectDraw>, param1: u32) -> windows_core::Result<()>; + fn Initialize(&self, param0: windows_core::Ref<'_, IDirectDraw>, param1: u32) -> windows_core::Result<()>; fn IsClipListChanged(&self, param0: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetClipList(&self, param0: *mut super::Gdi::RGNDATA, param1: u32) -> windows_core::Result<()>; fn SetHWnd(&self, param0: u32, param1: super::super::Foundation::HWND) -> windows_core::Result<()>; @@ -7367,7 +7367,7 @@ impl IDirectDrawClipper_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawClipper_Impl::Initialize(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawClipper_Impl::Initialize(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn IsClipListChanged(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7573,7 +7573,7 @@ pub struct IDirectDrawPalette_Vtbl { pub trait IDirectDrawPalette_Impl: windows_core::IUnknownImpl { fn GetCaps(&self, param0: *mut u32) -> windows_core::Result<()>; fn GetEntries(&self, param0: u32, param1: u32, param2: u32, param3: *mut super::Gdi::PALETTEENTRY) -> windows_core::Result<()>; - fn Initialize(&self, param0: Option<&IDirectDraw>, param1: u32, param2: *mut super::Gdi::PALETTEENTRY) -> windows_core::Result<()>; + fn Initialize(&self, param0: windows_core::Ref<'_, IDirectDraw>, param1: u32, param2: *mut super::Gdi::PALETTEENTRY) -> windows_core::Result<()>; fn SetEntries(&self, param0: u32, param1: u32, param2: u32, param3: *mut super::Gdi::PALETTEENTRY) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -7589,7 +7589,7 @@ impl IDirectDrawPalette_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: u32, param2: *mut super::Gdi::PALETTEENTRY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawPalette_Impl::Initialize(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() + IDirectDrawPalette_Impl::Initialize(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn SetEntries(this: *mut core::ffi::c_void, param0: u32, param1: u32, param2: u32, param3: *mut super::Gdi::PALETTEENTRY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7791,16 +7791,16 @@ pub struct IDirectDrawSurface_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirectDrawSurface_Impl: windows_core::IUnknownImpl { - fn AddAttachedSurface(&self, param0: Option<&IDirectDrawSurface>) -> windows_core::Result<()>; + fn AddAttachedSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface>) -> windows_core::Result<()>; fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; - fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; + fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()>; - fn BltFast(&self, param0: u32, param1: u32, param2: Option<&IDirectDrawSurface>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; - fn DeleteAttachedSurface(&self, param0: u32, param1: Option<&IDirectDrawSurface>) -> windows_core::Result<()>; + fn BltFast(&self, param0: u32, param1: u32, param2: windows_core::Ref<'_, IDirectDrawSurface>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; + fn DeleteAttachedSurface(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface>) -> windows_core::Result<()>; fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()>; fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()>; - fn Flip(&self, param0: Option<&IDirectDrawSurface>, param1: u32) -> windows_core::Result<()>; - fn GetAttachedSurface(&self, param0: *mut DDSCAPS, param1: *mut Option) -> windows_core::Result<()>; + fn Flip(&self, param0: windows_core::Ref<'_, IDirectDrawSurface>, param1: u32) -> windows_core::Result<()>; + fn GetAttachedSurface(&self, param0: *mut DDSCAPS, param1: windows_core::OutRef<'_, IDirectDrawSurface>) -> windows_core::Result<()>; fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()>; fn GetCaps(&self, param0: *mut DDSCAPS) -> windows_core::Result<()>; fn GetClipper(&self) -> windows_core::Result; @@ -7811,26 +7811,26 @@ pub trait IDirectDrawSurface_Impl: windows_core::IUnknownImpl { fn GetPalette(&self) -> windows_core::Result; fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()>; fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC) -> windows_core::Result<()>; - fn Initialize(&self, param0: Option<&IDirectDraw>, param1: *mut DDSURFACEDESC) -> windows_core::Result<()>; + fn Initialize(&self, param0: windows_core::Ref<'_, IDirectDraw>, param1: *mut DDSURFACEDESC) -> windows_core::Result<()>; fn IsLost(&self) -> windows_core::Result<()>; fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()>; fn Restore(&self) -> windows_core::Result<()>; - fn SetClipper(&self, param0: Option<&IDirectDrawClipper>) -> windows_core::Result<()>; + fn SetClipper(&self, param0: windows_core::Ref<'_, IDirectDrawClipper>) -> windows_core::Result<()>; fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()>; fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()>; - fn SetPalette(&self, param0: Option<&IDirectDrawPalette>) -> windows_core::Result<()>; + fn SetPalette(&self, param0: windows_core::Ref<'_, IDirectDrawPalette>) -> windows_core::Result<()>; fn Unlock(&self, param0: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; + fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()>; - fn UpdateOverlayZOrder(&self, param0: u32, param1: Option<&IDirectDrawSurface>) -> windows_core::Result<()>; + fn UpdateOverlayZOrder(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] impl IDirectDrawSurface_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddAttachedSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::AddAttachedSurface(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface_Impl::AddAttachedSurface(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn AddOverlayDirtyRect(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7838,7 +7838,7 @@ impl IDirectDrawSurface_Vtbl { } unsafe extern "system" fn Blt(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::Blt(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface_Impl::Blt(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn BltBatch(this: *mut core::ffi::c_void, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7846,11 +7846,11 @@ impl IDirectDrawSurface_Vtbl { } unsafe extern "system" fn BltFast(this: *mut core::ffi::c_void, param0: u32, param1: u32, param2: *mut core::ffi::c_void, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn DeleteAttachedSurface(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn EnumAttachedSurfaces(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7862,7 +7862,7 @@ impl IDirectDrawSurface_Vtbl { } unsafe extern "system" fn Flip(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::Flip(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface_Impl::Flip(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetAttachedSurface(this: *mut core::ffi::c_void, param0: *mut DDSCAPS, param1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7922,7 +7922,7 @@ impl IDirectDrawSurface_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut DDSURFACEDESC) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::Initialize(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface_Impl::Initialize(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn IsLost(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7942,7 +7942,7 @@ impl IDirectDrawSurface_Vtbl { } unsafe extern "system" fn SetClipper(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::SetClipper(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface_Impl::SetClipper(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn SetColorKey(this: *mut core::ffi::c_void, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7954,7 +7954,7 @@ impl IDirectDrawSurface_Vtbl { } unsafe extern "system" fn SetPalette(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::SetPalette(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface_Impl::SetPalette(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn Unlock(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7962,7 +7962,7 @@ impl IDirectDrawSurface_Vtbl { } unsafe extern "system" fn UpdateOverlay(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn UpdateOverlayDisplay(this: *mut core::ffi::c_void, param0: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7970,7 +7970,7 @@ impl IDirectDrawSurface_Vtbl { } unsafe extern "system" fn UpdateOverlayZOrder(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -8209,16 +8209,16 @@ pub struct IDirectDrawSurface2_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirectDrawSurface2_Impl: windows_core::IUnknownImpl { - fn AddAttachedSurface(&self, param0: Option<&IDirectDrawSurface2>) -> windows_core::Result<()>; + fn AddAttachedSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface2>) -> windows_core::Result<()>; fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; - fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface2>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; + fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface2>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()>; - fn BltFast(&self, param0: u32, param1: u32, param2: Option<&IDirectDrawSurface2>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; - fn DeleteAttachedSurface(&self, param0: u32, param1: Option<&IDirectDrawSurface2>) -> windows_core::Result<()>; + fn BltFast(&self, param0: u32, param1: u32, param2: windows_core::Ref<'_, IDirectDrawSurface2>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; + fn DeleteAttachedSurface(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface2>) -> windows_core::Result<()>; fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()>; fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()>; - fn Flip(&self, param0: Option<&IDirectDrawSurface2>, param1: u32) -> windows_core::Result<()>; - fn GetAttachedSurface(&self, param0: *mut DDSCAPS, param1: *mut Option) -> windows_core::Result<()>; + fn Flip(&self, param0: windows_core::Ref<'_, IDirectDrawSurface2>, param1: u32) -> windows_core::Result<()>; + fn GetAttachedSurface(&self, param0: *mut DDSCAPS, param1: windows_core::OutRef<'_, IDirectDrawSurface2>) -> windows_core::Result<()>; fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()>; fn GetCaps(&self, param0: *mut DDSCAPS) -> windows_core::Result<()>; fn GetClipper(&self) -> windows_core::Result; @@ -8229,19 +8229,19 @@ pub trait IDirectDrawSurface2_Impl: windows_core::IUnknownImpl { fn GetPalette(&self) -> windows_core::Result; fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()>; fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC) -> windows_core::Result<()>; - fn Initialize(&self, param0: Option<&IDirectDraw>, param1: *mut DDSURFACEDESC) -> windows_core::Result<()>; + fn Initialize(&self, param0: windows_core::Ref<'_, IDirectDraw>, param1: *mut DDSURFACEDESC) -> windows_core::Result<()>; fn IsLost(&self) -> windows_core::Result<()>; fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()>; fn Restore(&self) -> windows_core::Result<()>; - fn SetClipper(&self, param0: Option<&IDirectDrawClipper>) -> windows_core::Result<()>; + fn SetClipper(&self, param0: windows_core::Ref<'_, IDirectDrawClipper>) -> windows_core::Result<()>; fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()>; fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()>; - fn SetPalette(&self, param0: Option<&IDirectDrawPalette>) -> windows_core::Result<()>; + fn SetPalette(&self, param0: windows_core::Ref<'_, IDirectDrawPalette>) -> windows_core::Result<()>; fn Unlock(&self, param0: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface2>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; + fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface2>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()>; - fn UpdateOverlayZOrder(&self, param0: u32, param1: Option<&IDirectDrawSurface2>) -> windows_core::Result<()>; + fn UpdateOverlayZOrder(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface2>) -> windows_core::Result<()>; fn GetDDInterface(&self, param0: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn PageLock(&self, param0: u32) -> windows_core::Result<()>; fn PageUnlock(&self, param0: u32) -> windows_core::Result<()>; @@ -8251,7 +8251,7 @@ impl IDirectDrawSurface2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddAttachedSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::AddAttachedSurface(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface2_Impl::AddAttachedSurface(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn AddOverlayDirtyRect(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8259,7 +8259,7 @@ impl IDirectDrawSurface2_Vtbl { } unsafe extern "system" fn Blt(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::Blt(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface2_Impl::Blt(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn BltBatch(this: *mut core::ffi::c_void, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8267,11 +8267,11 @@ impl IDirectDrawSurface2_Vtbl { } unsafe extern "system" fn BltFast(this: *mut core::ffi::c_void, param0: u32, param1: u32, param2: *mut core::ffi::c_void, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface2_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn DeleteAttachedSurface(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface2_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn EnumAttachedSurfaces(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8283,7 +8283,7 @@ impl IDirectDrawSurface2_Vtbl { } unsafe extern "system" fn Flip(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::Flip(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface2_Impl::Flip(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetAttachedSurface(this: *mut core::ffi::c_void, param0: *mut DDSCAPS, param1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8343,7 +8343,7 @@ impl IDirectDrawSurface2_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut DDSURFACEDESC) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::Initialize(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface2_Impl::Initialize(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn IsLost(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8363,7 +8363,7 @@ impl IDirectDrawSurface2_Vtbl { } unsafe extern "system" fn SetClipper(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::SetClipper(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface2_Impl::SetClipper(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn SetColorKey(this: *mut core::ffi::c_void, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8375,7 +8375,7 @@ impl IDirectDrawSurface2_Vtbl { } unsafe extern "system" fn SetPalette(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::SetPalette(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface2_Impl::SetPalette(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn Unlock(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8383,7 +8383,7 @@ impl IDirectDrawSurface2_Vtbl { } unsafe extern "system" fn UpdateOverlay(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface2_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn UpdateOverlayDisplay(this: *mut core::ffi::c_void, param0: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8391,7 +8391,7 @@ impl IDirectDrawSurface2_Vtbl { } unsafe extern "system" fn UpdateOverlayZOrder(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface2_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface2_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetDDInterface(this: *mut core::ffi::c_void, param0: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8649,16 +8649,16 @@ pub struct IDirectDrawSurface3_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirectDrawSurface3_Impl: windows_core::IUnknownImpl { - fn AddAttachedSurface(&self, param0: Option<&IDirectDrawSurface3>) -> windows_core::Result<()>; + fn AddAttachedSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface3>) -> windows_core::Result<()>; fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; - fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface3>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; + fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface3>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()>; - fn BltFast(&self, param0: u32, param1: u32, param2: Option<&IDirectDrawSurface3>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; - fn DeleteAttachedSurface(&self, param0: u32, param1: Option<&IDirectDrawSurface3>) -> windows_core::Result<()>; + fn BltFast(&self, param0: u32, param1: u32, param2: windows_core::Ref<'_, IDirectDrawSurface3>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; + fn DeleteAttachedSurface(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface3>) -> windows_core::Result<()>; fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()>; fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK) -> windows_core::Result<()>; - fn Flip(&self, param0: Option<&IDirectDrawSurface3>, param1: u32) -> windows_core::Result<()>; - fn GetAttachedSurface(&self, param0: *mut DDSCAPS, param1: *mut Option) -> windows_core::Result<()>; + fn Flip(&self, param0: windows_core::Ref<'_, IDirectDrawSurface3>, param1: u32) -> windows_core::Result<()>; + fn GetAttachedSurface(&self, param0: *mut DDSCAPS, param1: windows_core::OutRef<'_, IDirectDrawSurface3>) -> windows_core::Result<()>; fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()>; fn GetCaps(&self, param0: *mut DDSCAPS) -> windows_core::Result<()>; fn GetClipper(&self) -> windows_core::Result; @@ -8669,19 +8669,19 @@ pub trait IDirectDrawSurface3_Impl: windows_core::IUnknownImpl { fn GetPalette(&self) -> windows_core::Result; fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()>; fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC) -> windows_core::Result<()>; - fn Initialize(&self, param0: Option<&IDirectDraw>, param1: *mut DDSURFACEDESC) -> windows_core::Result<()>; + fn Initialize(&self, param0: windows_core::Ref<'_, IDirectDraw>, param1: *mut DDSURFACEDESC) -> windows_core::Result<()>; fn IsLost(&self) -> windows_core::Result<()>; fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()>; fn Restore(&self) -> windows_core::Result<()>; - fn SetClipper(&self, param0: Option<&IDirectDrawClipper>) -> windows_core::Result<()>; + fn SetClipper(&self, param0: windows_core::Ref<'_, IDirectDrawClipper>) -> windows_core::Result<()>; fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()>; fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()>; - fn SetPalette(&self, param0: Option<&IDirectDrawPalette>) -> windows_core::Result<()>; + fn SetPalette(&self, param0: windows_core::Ref<'_, IDirectDrawPalette>) -> windows_core::Result<()>; fn Unlock(&self, param0: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface3>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; + fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface3>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()>; - fn UpdateOverlayZOrder(&self, param0: u32, param1: Option<&IDirectDrawSurface3>) -> windows_core::Result<()>; + fn UpdateOverlayZOrder(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface3>) -> windows_core::Result<()>; fn GetDDInterface(&self, param0: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn PageLock(&self, param0: u32) -> windows_core::Result<()>; fn PageUnlock(&self, param0: u32) -> windows_core::Result<()>; @@ -8692,7 +8692,7 @@ impl IDirectDrawSurface3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddAttachedSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::AddAttachedSurface(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface3_Impl::AddAttachedSurface(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn AddOverlayDirtyRect(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8700,7 +8700,7 @@ impl IDirectDrawSurface3_Vtbl { } unsafe extern "system" fn Blt(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::Blt(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface3_Impl::Blt(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn BltBatch(this: *mut core::ffi::c_void, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8708,11 +8708,11 @@ impl IDirectDrawSurface3_Vtbl { } unsafe extern "system" fn BltFast(this: *mut core::ffi::c_void, param0: u32, param1: u32, param2: *mut core::ffi::c_void, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface3_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn DeleteAttachedSurface(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface3_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn EnumAttachedSurfaces(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8724,7 +8724,7 @@ impl IDirectDrawSurface3_Vtbl { } unsafe extern "system" fn Flip(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::Flip(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface3_Impl::Flip(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetAttachedSurface(this: *mut core::ffi::c_void, param0: *mut DDSCAPS, param1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8784,7 +8784,7 @@ impl IDirectDrawSurface3_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut DDSURFACEDESC) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::Initialize(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface3_Impl::Initialize(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn IsLost(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8804,7 +8804,7 @@ impl IDirectDrawSurface3_Vtbl { } unsafe extern "system" fn SetClipper(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::SetClipper(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface3_Impl::SetClipper(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn SetColorKey(this: *mut core::ffi::c_void, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8816,7 +8816,7 @@ impl IDirectDrawSurface3_Vtbl { } unsafe extern "system" fn SetPalette(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::SetPalette(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface3_Impl::SetPalette(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn Unlock(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8824,7 +8824,7 @@ impl IDirectDrawSurface3_Vtbl { } unsafe extern "system" fn UpdateOverlay(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface3_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn UpdateOverlayDisplay(this: *mut core::ffi::c_void, param0: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8832,7 +8832,7 @@ impl IDirectDrawSurface3_Vtbl { } unsafe extern "system" fn UpdateOverlayZOrder(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface3_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface3_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetDDInterface(this: *mut core::ffi::c_void, param0: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9115,16 +9115,16 @@ pub struct IDirectDrawSurface4_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirectDrawSurface4_Impl: windows_core::IUnknownImpl { - fn AddAttachedSurface(&self, param0: Option<&IDirectDrawSurface4>) -> windows_core::Result<()>; + fn AddAttachedSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface4>) -> windows_core::Result<()>; fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; - fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface4>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; + fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface4>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()>; - fn BltFast(&self, param0: u32, param1: u32, param2: Option<&IDirectDrawSurface4>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; - fn DeleteAttachedSurface(&self, param0: u32, param1: Option<&IDirectDrawSurface4>) -> windows_core::Result<()>; + fn BltFast(&self, param0: u32, param1: u32, param2: windows_core::Ref<'_, IDirectDrawSurface4>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; + fn DeleteAttachedSurface(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface4>) -> windows_core::Result<()>; fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK2) -> windows_core::Result<()>; fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK2) -> windows_core::Result<()>; - fn Flip(&self, param0: Option<&IDirectDrawSurface4>, param1: u32) -> windows_core::Result<()>; - fn GetAttachedSurface(&self, param0: *mut DDSCAPS2, param1: *mut Option) -> windows_core::Result<()>; + fn Flip(&self, param0: windows_core::Ref<'_, IDirectDrawSurface4>, param1: u32) -> windows_core::Result<()>; + fn GetAttachedSurface(&self, param0: *mut DDSCAPS2, param1: windows_core::OutRef<'_, IDirectDrawSurface4>) -> windows_core::Result<()>; fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()>; fn GetCaps(&self, param0: *mut DDSCAPS2) -> windows_core::Result<()>; fn GetClipper(&self) -> windows_core::Result; @@ -9135,19 +9135,19 @@ pub trait IDirectDrawSurface4_Impl: windows_core::IUnknownImpl { fn GetPalette(&self) -> windows_core::Result; fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()>; fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC2) -> windows_core::Result<()>; - fn Initialize(&self, param0: Option<&IDirectDraw>, param1: *mut DDSURFACEDESC2) -> windows_core::Result<()>; + fn Initialize(&self, param0: windows_core::Ref<'_, IDirectDraw>, param1: *mut DDSURFACEDESC2) -> windows_core::Result<()>; fn IsLost(&self) -> windows_core::Result<()>; fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC2, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()>; fn Restore(&self) -> windows_core::Result<()>; - fn SetClipper(&self, param0: Option<&IDirectDrawClipper>) -> windows_core::Result<()>; + fn SetClipper(&self, param0: windows_core::Ref<'_, IDirectDrawClipper>) -> windows_core::Result<()>; fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()>; fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()>; - fn SetPalette(&self, param0: Option<&IDirectDrawPalette>) -> windows_core::Result<()>; + fn SetPalette(&self, param0: windows_core::Ref<'_, IDirectDrawPalette>) -> windows_core::Result<()>; fn Unlock(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; - fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface4>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; + fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface4>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()>; - fn UpdateOverlayZOrder(&self, param0: u32, param1: Option<&IDirectDrawSurface4>) -> windows_core::Result<()>; + fn UpdateOverlayZOrder(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface4>) -> windows_core::Result<()>; fn GetDDInterface(&self, param0: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn PageLock(&self, param0: u32) -> windows_core::Result<()>; fn PageUnlock(&self, param0: u32) -> windows_core::Result<()>; @@ -9163,7 +9163,7 @@ impl IDirectDrawSurface4_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddAttachedSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::AddAttachedSurface(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface4_Impl::AddAttachedSurface(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn AddOverlayDirtyRect(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9171,7 +9171,7 @@ impl IDirectDrawSurface4_Vtbl { } unsafe extern "system" fn Blt(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::Blt(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface4_Impl::Blt(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn BltBatch(this: *mut core::ffi::c_void, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9179,11 +9179,11 @@ impl IDirectDrawSurface4_Vtbl { } unsafe extern "system" fn BltFast(this: *mut core::ffi::c_void, param0: u32, param1: u32, param2: *mut core::ffi::c_void, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface4_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn DeleteAttachedSurface(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface4_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn EnumAttachedSurfaces(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK2) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9195,7 +9195,7 @@ impl IDirectDrawSurface4_Vtbl { } unsafe extern "system" fn Flip(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::Flip(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface4_Impl::Flip(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetAttachedSurface(this: *mut core::ffi::c_void, param0: *mut DDSCAPS2, param1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9255,7 +9255,7 @@ impl IDirectDrawSurface4_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut DDSURFACEDESC2) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::Initialize(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface4_Impl::Initialize(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn IsLost(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9275,7 +9275,7 @@ impl IDirectDrawSurface4_Vtbl { } unsafe extern "system" fn SetClipper(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::SetClipper(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface4_Impl::SetClipper(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn SetColorKey(this: *mut core::ffi::c_void, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9287,7 +9287,7 @@ impl IDirectDrawSurface4_Vtbl { } unsafe extern "system" fn SetPalette(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::SetPalette(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface4_Impl::SetPalette(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn Unlock(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9295,7 +9295,7 @@ impl IDirectDrawSurface4_Vtbl { } unsafe extern "system" fn UpdateOverlay(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface4_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn UpdateOverlayDisplay(this: *mut core::ffi::c_void, param0: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9303,7 +9303,7 @@ impl IDirectDrawSurface4_Vtbl { } unsafe extern "system" fn UpdateOverlayZOrder(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface4_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface4_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetDDInterface(this: *mut core::ffi::c_void, param0: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9627,16 +9627,16 @@ pub struct IDirectDrawSurface7_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDirectDrawSurface7_Impl: windows_core::IUnknownImpl { - fn AddAttachedSurface(&self, param0: Option<&IDirectDrawSurface7>) -> windows_core::Result<()>; + fn AddAttachedSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface7>) -> windows_core::Result<()>; fn AddOverlayDirtyRect(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; - fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface7>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; + fn Blt(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface7>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::Result<()>; fn BltBatch(&self, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::Result<()>; - fn BltFast(&self, param0: u32, param1: u32, param2: Option<&IDirectDrawSurface7>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; - fn DeleteAttachedSurface(&self, param0: u32, param1: Option<&IDirectDrawSurface7>) -> windows_core::Result<()>; + fn BltFast(&self, param0: u32, param1: u32, param2: windows_core::Ref<'_, IDirectDrawSurface7>, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::Result<()>; + fn DeleteAttachedSurface(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface7>) -> windows_core::Result<()>; fn EnumAttachedSurfaces(&self, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK7) -> windows_core::Result<()>; fn EnumOverlayZOrders(&self, param0: u32, param1: *mut core::ffi::c_void, param2: LPDDENUMSURFACESCALLBACK7) -> windows_core::Result<()>; - fn Flip(&self, param0: Option<&IDirectDrawSurface7>, param1: u32) -> windows_core::Result<()>; - fn GetAttachedSurface(&self, param0: *mut DDSCAPS2, param1: *mut Option) -> windows_core::Result<()>; + fn Flip(&self, param0: windows_core::Ref<'_, IDirectDrawSurface7>, param1: u32) -> windows_core::Result<()>; + fn GetAttachedSurface(&self, param0: *mut DDSCAPS2, param1: windows_core::OutRef<'_, IDirectDrawSurface7>) -> windows_core::Result<()>; fn GetBltStatus(&self, param0: u32) -> windows_core::Result<()>; fn GetCaps(&self, param0: *mut DDSCAPS2) -> windows_core::Result<()>; fn GetClipper(&self) -> windows_core::Result; @@ -9647,19 +9647,19 @@ pub trait IDirectDrawSurface7_Impl: windows_core::IUnknownImpl { fn GetPalette(&self) -> windows_core::Result; fn GetPixelFormat(&self, param0: *mut DDPIXELFORMAT) -> windows_core::Result<()>; fn GetSurfaceDesc(&self, param0: *mut DDSURFACEDESC2) -> windows_core::Result<()>; - fn Initialize(&self, param0: Option<&IDirectDraw>, param1: *mut DDSURFACEDESC2) -> windows_core::Result<()>; + fn Initialize(&self, param0: windows_core::Ref<'_, IDirectDraw>, param1: *mut DDSURFACEDESC2) -> windows_core::Result<()>; fn IsLost(&self) -> windows_core::Result<()>; fn Lock(&self, param0: *mut super::super::Foundation::RECT, param1: *mut DDSURFACEDESC2, param2: u32, param3: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn ReleaseDC(&self, param0: super::Gdi::HDC) -> windows_core::Result<()>; fn Restore(&self) -> windows_core::Result<()>; - fn SetClipper(&self, param0: Option<&IDirectDrawClipper>) -> windows_core::Result<()>; + fn SetClipper(&self, param0: windows_core::Ref<'_, IDirectDrawClipper>) -> windows_core::Result<()>; fn SetColorKey(&self, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::Result<()>; fn SetOverlayPosition(&self, param0: i32, param1: i32) -> windows_core::Result<()>; - fn SetPalette(&self, param0: Option<&IDirectDrawPalette>) -> windows_core::Result<()>; + fn SetPalette(&self, param0: windows_core::Ref<'_, IDirectDrawPalette>) -> windows_core::Result<()>; fn Unlock(&self, param0: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; - fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: Option<&IDirectDrawSurface7>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; + fn UpdateOverlay(&self, param0: *mut super::super::Foundation::RECT, param1: windows_core::Ref<'_, IDirectDrawSurface7>, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::Result<()>; fn UpdateOverlayDisplay(&self, param0: u32) -> windows_core::Result<()>; - fn UpdateOverlayZOrder(&self, param0: u32, param1: Option<&IDirectDrawSurface7>) -> windows_core::Result<()>; + fn UpdateOverlayZOrder(&self, param0: u32, param1: windows_core::Ref<'_, IDirectDrawSurface7>) -> windows_core::Result<()>; fn GetDDInterface(&self, param0: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn PageLock(&self, param0: u32) -> windows_core::Result<()>; fn PageUnlock(&self, param0: u32) -> windows_core::Result<()>; @@ -9679,7 +9679,7 @@ impl IDirectDrawSurface7_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddAttachedSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::AddAttachedSurface(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface7_Impl::AddAttachedSurface(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn AddOverlayDirtyRect(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9687,7 +9687,7 @@ impl IDirectDrawSurface7_Vtbl { } unsafe extern "system" fn Blt(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDBLTFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::Blt(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface7_Impl::Blt(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn BltBatch(this: *mut core::ffi::c_void, param0: *mut DDBLTBATCH, param1: u32, param2: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9695,11 +9695,11 @@ impl IDirectDrawSurface7_Vtbl { } unsafe extern "system" fn BltFast(this: *mut core::ffi::c_void, param0: u32, param1: u32, param2: *mut core::ffi::c_void, param3: *mut super::super::Foundation::RECT, param4: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), windows_core::from_raw_borrowed(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface7_Impl::BltFast(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn DeleteAttachedSurface(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface7_Impl::DeleteAttachedSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn EnumAttachedSurfaces(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: LPDDENUMSURFACESCALLBACK7) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9711,7 +9711,7 @@ impl IDirectDrawSurface7_Vtbl { } unsafe extern "system" fn Flip(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::Flip(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface7_Impl::Flip(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetAttachedSurface(this: *mut core::ffi::c_void, param0: *mut DDSCAPS2, param1: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9771,7 +9771,7 @@ impl IDirectDrawSurface7_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut DDSURFACEDESC2) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::Initialize(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawSurface7_Impl::Initialize(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn IsLost(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9791,7 +9791,7 @@ impl IDirectDrawSurface7_Vtbl { } unsafe extern "system" fn SetClipper(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::SetClipper(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface7_Impl::SetClipper(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn SetColorKey(this: *mut core::ffi::c_void, param0: u32, param1: *mut DDCOLORKEY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9803,7 +9803,7 @@ impl IDirectDrawSurface7_Vtbl { } unsafe extern "system" fn SetPalette(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::SetPalette(this, windows_core::from_raw_borrowed(¶m0)).into() + IDirectDrawSurface7_Impl::SetPalette(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn Unlock(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9811,7 +9811,7 @@ impl IDirectDrawSurface7_Vtbl { } unsafe extern "system" fn UpdateOverlay(this: *mut core::ffi::c_void, param0: *mut super::super::Foundation::RECT, param1: *mut core::ffi::c_void, param2: *mut super::super::Foundation::RECT, param3: u32, param4: *mut DDOVERLAYFX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() + IDirectDrawSurface7_Impl::UpdateOverlay(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)).into() } unsafe extern "system" fn UpdateOverlayDisplay(this: *mut core::ffi::c_void, param0: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9819,7 +9819,7 @@ impl IDirectDrawSurface7_Vtbl { } unsafe extern "system" fn UpdateOverlayZOrder(this: *mut core::ffi::c_void, param0: u32, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawSurface7_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IDirectDrawSurface7_Impl::UpdateOverlayZOrder(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetDDInterface(this: *mut core::ffi::c_void, param0: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10041,7 +10041,7 @@ pub struct IDirectDrawVideoPort_Vtbl { pub WaitForSync: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, u32) -> windows_core::HRESULT, } pub trait IDirectDrawVideoPort_Impl: windows_core::IUnknownImpl { - fn Flip(&self, param0: Option<&IDirectDrawSurface>, param1: u32) -> windows_core::Result<()>; + fn Flip(&self, param0: windows_core::Ref<'_, IDirectDrawSurface>, param1: u32) -> windows_core::Result<()>; fn GetBandwidthInfo(&self, param0: *mut DDPIXELFORMAT, param1: u32, param2: u32, param3: u32, param4: *mut DDVIDEOPORTBANDWIDTH) -> windows_core::Result<()>; fn GetColorControls(&self, param0: *mut DDCOLORCONTROL) -> windows_core::Result<()>; fn GetInputFormats(&self, lpnumformats: *mut u32, param1: *mut DDPIXELFORMAT, param2: u32) -> windows_core::Result<()>; @@ -10050,7 +10050,7 @@ pub trait IDirectDrawVideoPort_Impl: windows_core::IUnknownImpl { fn GetVideoLine(&self, param0: *mut u32) -> windows_core::Result<()>; fn GetVideoSignalStatus(&self, param0: *mut u32) -> windows_core::Result<()>; fn SetColorControls(&self, param0: *mut DDCOLORCONTROL) -> windows_core::Result<()>; - fn SetTargetSurface(&self, param0: Option<&IDirectDrawSurface>, param1: u32) -> windows_core::Result<()>; + fn SetTargetSurface(&self, param0: windows_core::Ref<'_, IDirectDrawSurface>, param1: u32) -> windows_core::Result<()>; fn StartVideo(&self, param0: *mut DDVIDEOPORTINFO) -> windows_core::Result<()>; fn StopVideo(&self) -> windows_core::Result<()>; fn UpdateVideo(&self, param0: *mut DDVIDEOPORTINFO) -> windows_core::Result<()>; @@ -10060,7 +10060,7 @@ impl IDirectDrawVideoPort_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Flip(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawVideoPort_Impl::Flip(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawVideoPort_Impl::Flip(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn GetBandwidthInfo(this: *mut core::ffi::c_void, param0: *mut DDPIXELFORMAT, param1: u32, param2: u32, param3: u32, param4: *mut DDVIDEOPORTBANDWIDTH) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10096,7 +10096,7 @@ impl IDirectDrawVideoPort_Vtbl { } unsafe extern "system" fn SetTargetSurface(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawVideoPort_Impl::SetTargetSurface(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IDirectDrawVideoPort_Impl::SetTargetSurface(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn StartVideo(this: *mut core::ffi::c_void, param0: *mut DDVIDEOPORTINFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs index e40901ea8a..ec6019b20d 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs @@ -496,24 +496,24 @@ pub struct IDirectManipulationCompositor_Vtbl { pub Flush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectManipulationCompositor_Impl: windows_core::IUnknownImpl { - fn AddContent(&self, content: Option<&IDirectManipulationContent>, device: Option<&windows_core::IUnknown>, parentvisual: Option<&windows_core::IUnknown>, childvisual: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn RemoveContent(&self, content: Option<&IDirectManipulationContent>) -> windows_core::Result<()>; - fn SetUpdateManager(&self, updatemanager: Option<&IDirectManipulationUpdateManager>) -> windows_core::Result<()>; + fn AddContent(&self, content: windows_core::Ref<'_, IDirectManipulationContent>, device: windows_core::Ref<'_, windows_core::IUnknown>, parentvisual: windows_core::Ref<'_, windows_core::IUnknown>, childvisual: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn RemoveContent(&self, content: windows_core::Ref<'_, IDirectManipulationContent>) -> windows_core::Result<()>; + fn SetUpdateManager(&self, updatemanager: windows_core::Ref<'_, IDirectManipulationUpdateManager>) -> windows_core::Result<()>; fn Flush(&self) -> windows_core::Result<()>; } impl IDirectManipulationCompositor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddContent(this: *mut core::ffi::c_void, content: *mut core::ffi::c_void, device: *mut core::ffi::c_void, parentvisual: *mut core::ffi::c_void, childvisual: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationCompositor_Impl::AddContent(this, windows_core::from_raw_borrowed(&content), windows_core::from_raw_borrowed(&device), windows_core::from_raw_borrowed(&parentvisual), windows_core::from_raw_borrowed(&childvisual)).into() + IDirectManipulationCompositor_Impl::AddContent(this, core::mem::transmute_copy(&content), core::mem::transmute_copy(&device), core::mem::transmute_copy(&parentvisual), core::mem::transmute_copy(&childvisual)).into() } unsafe extern "system" fn RemoveContent(this: *mut core::ffi::c_void, content: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationCompositor_Impl::RemoveContent(this, windows_core::from_raw_borrowed(&content)).into() + IDirectManipulationCompositor_Impl::RemoveContent(this, core::mem::transmute_copy(&content)).into() } unsafe extern "system" fn SetUpdateManager(this: *mut core::ffi::c_void, updatemanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationCompositor_Impl::SetUpdateManager(this, windows_core::from_raw_borrowed(&updatemanager)).into() + IDirectManipulationCompositor_Impl::SetUpdateManager(this, core::mem::transmute_copy(&updatemanager)).into() } unsafe extern "system" fn Flush(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -557,13 +557,13 @@ pub struct IDirectManipulationCompositor2_Vtbl { pub AddContentWithCrossProcessChaining: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectManipulationCompositor2_Impl: IDirectManipulationCompositor_Impl { - fn AddContentWithCrossProcessChaining(&self, content: Option<&IDirectManipulationPrimaryContent>, device: Option<&windows_core::IUnknown>, parentvisual: Option<&windows_core::IUnknown>, childvisual: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddContentWithCrossProcessChaining(&self, content: windows_core::Ref<'_, IDirectManipulationPrimaryContent>, device: windows_core::Ref<'_, windows_core::IUnknown>, parentvisual: windows_core::Ref<'_, windows_core::IUnknown>, childvisual: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IDirectManipulationCompositor2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddContentWithCrossProcessChaining(this: *mut core::ffi::c_void, content: *mut core::ffi::c_void, device: *mut core::ffi::c_void, parentvisual: *mut core::ffi::c_void, childvisual: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationCompositor2_Impl::AddContentWithCrossProcessChaining(this, windows_core::from_raw_borrowed(&content), windows_core::from_raw_borrowed(&device), windows_core::from_raw_borrowed(&parentvisual), windows_core::from_raw_borrowed(&childvisual)).into() + IDirectManipulationCompositor2_Impl::AddContentWithCrossProcessChaining(this, core::mem::transmute_copy(&content), core::mem::transmute_copy(&device), core::mem::transmute_copy(&parentvisual), core::mem::transmute_copy(&childvisual)).into() } Self { base__: IDirectManipulationCompositor_Vtbl::new::(), @@ -631,7 +631,7 @@ pub trait IDirectManipulationContent_Impl: windows_core::IUnknownImpl { fn SetContentRect(&self, contentsize: *const super::super::Foundation::RECT) -> windows_core::Result<()>; fn GetViewport(&self, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetTag(&self, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void, id: *mut u32) -> windows_core::Result<()>; - fn SetTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; + fn SetTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; fn GetOutputTransform(&self, matrix: *mut f32, pointcount: u32) -> windows_core::Result<()>; fn GetContentTransform(&self, matrix: *mut f32, pointcount: u32) -> windows_core::Result<()>; fn SyncContentTransform(&self, matrix: *const f32, pointcount: u32) -> windows_core::Result<()>; @@ -662,7 +662,7 @@ impl IDirectManipulationContent_Vtbl { } unsafe extern "system" fn SetTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationContent_Impl::SetTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)).into() + IDirectManipulationContent_Impl::SetTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn GetOutputTransform(this: *mut core::ffi::c_void, matrix: *mut f32, pointcount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -808,13 +808,13 @@ pub struct IDirectManipulationDragDropEventHandler_Vtbl { pub OnDragDropStatusChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, DIRECTMANIPULATION_DRAG_DROP_STATUS, DIRECTMANIPULATION_DRAG_DROP_STATUS) -> windows_core::HRESULT, } pub trait IDirectManipulationDragDropEventHandler_Impl: windows_core::IUnknownImpl { - fn OnDragDropStatusChange(&self, viewport: Option<&IDirectManipulationViewport2>, current: DIRECTMANIPULATION_DRAG_DROP_STATUS, previous: DIRECTMANIPULATION_DRAG_DROP_STATUS) -> windows_core::Result<()>; + fn OnDragDropStatusChange(&self, viewport: windows_core::Ref<'_, IDirectManipulationViewport2>, current: DIRECTMANIPULATION_DRAG_DROP_STATUS, previous: DIRECTMANIPULATION_DRAG_DROP_STATUS) -> windows_core::Result<()>; } impl IDirectManipulationDragDropEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnDragDropStatusChange(this: *mut core::ffi::c_void, viewport: *mut core::ffi::c_void, current: DIRECTMANIPULATION_DRAG_DROP_STATUS, previous: DIRECTMANIPULATION_DRAG_DROP_STATUS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationDragDropEventHandler_Impl::OnDragDropStatusChange(this, windows_core::from_raw_borrowed(&viewport), core::mem::transmute_copy(¤t), core::mem::transmute_copy(&previous)).into() + IDirectManipulationDragDropEventHandler_Impl::OnDragDropStatusChange(this, core::mem::transmute_copy(&viewport), core::mem::transmute_copy(¤t), core::mem::transmute_copy(&previous)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnDragDropStatusChange: OnDragDropStatusChange:: } } @@ -867,13 +867,13 @@ pub struct IDirectManipulationInteractionEventHandler_Vtbl { pub OnInteraction: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, DIRECTMANIPULATION_INTERACTION_TYPE) -> windows_core::HRESULT, } pub trait IDirectManipulationInteractionEventHandler_Impl: windows_core::IUnknownImpl { - fn OnInteraction(&self, viewport: Option<&IDirectManipulationViewport2>, interaction: DIRECTMANIPULATION_INTERACTION_TYPE) -> windows_core::Result<()>; + fn OnInteraction(&self, viewport: windows_core::Ref<'_, IDirectManipulationViewport2>, interaction: DIRECTMANIPULATION_INTERACTION_TYPE) -> windows_core::Result<()>; } impl IDirectManipulationInteractionEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnInteraction(this: *mut core::ffi::c_void, viewport: *mut core::ffi::c_void, interaction: DIRECTMANIPULATION_INTERACTION_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationInteractionEventHandler_Impl::OnInteraction(this, windows_core::from_raw_borrowed(&viewport), core::mem::transmute_copy(&interaction)).into() + IDirectManipulationInteractionEventHandler_Impl::OnInteraction(this, core::mem::transmute_copy(&viewport), core::mem::transmute_copy(&interaction)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnInteraction: OnInteraction:: } } @@ -944,8 +944,8 @@ pub trait IDirectManipulationManager_Impl: windows_core::IUnknownImpl { fn RegisterHitTestTarget(&self, window: super::super::Foundation::HWND, hittestwindow: super::super::Foundation::HWND, r#type: DIRECTMANIPULATION_HITTEST_TYPE) -> windows_core::Result<()>; fn ProcessInput(&self, message: *const super::super::UI::WindowsAndMessaging::MSG) -> windows_core::Result; fn GetUpdateManager(&self, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateViewport(&self, frameinfo: Option<&IDirectManipulationFrameInfoProvider>, window: super::super::Foundation::HWND, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateContent(&self, frameinfo: Option<&IDirectManipulationFrameInfoProvider>, clsid: *const windows_core::GUID, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateViewport(&self, frameinfo: windows_core::Ref<'_, IDirectManipulationFrameInfoProvider>, window: super::super::Foundation::HWND, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateContent(&self, frameinfo: windows_core::Ref<'_, IDirectManipulationFrameInfoProvider>, clsid: *const windows_core::GUID, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] impl IDirectManipulationManager_Vtbl { @@ -978,11 +978,11 @@ impl IDirectManipulationManager_Vtbl { } unsafe extern "system" fn CreateViewport(this: *mut core::ffi::c_void, frameinfo: *mut core::ffi::c_void, window: super::super::Foundation::HWND, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationManager_Impl::CreateViewport(this, windows_core::from_raw_borrowed(&frameinfo), core::mem::transmute_copy(&window), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&object)).into() + IDirectManipulationManager_Impl::CreateViewport(this, core::mem::transmute_copy(&frameinfo), core::mem::transmute_copy(&window), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn CreateContent(this: *mut core::ffi::c_void, frameinfo: *mut core::ffi::c_void, clsid: *const windows_core::GUID, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationManager_Impl::CreateContent(this, windows_core::from_raw_borrowed(&frameinfo), core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&object)).into() + IDirectManipulationManager_Impl::CreateContent(this, core::mem::transmute_copy(&frameinfo), core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&object)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1250,15 +1250,15 @@ pub struct IDirectManipulationUpdateManager_Vtbl { pub Update: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectManipulationUpdateManager_Impl: windows_core::IUnknownImpl { - fn RegisterWaitHandleCallback(&self, handle: super::super::Foundation::HANDLE, eventhandler: Option<&IDirectManipulationUpdateHandler>) -> windows_core::Result; + fn RegisterWaitHandleCallback(&self, handle: super::super::Foundation::HANDLE, eventhandler: windows_core::Ref<'_, IDirectManipulationUpdateHandler>) -> windows_core::Result; fn UnregisterWaitHandleCallback(&self, cookie: u32) -> windows_core::Result<()>; - fn Update(&self, frameinfo: Option<&IDirectManipulationFrameInfoProvider>) -> windows_core::Result<()>; + fn Update(&self, frameinfo: windows_core::Ref<'_, IDirectManipulationFrameInfoProvider>) -> windows_core::Result<()>; } impl IDirectManipulationUpdateManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterWaitHandleCallback(this: *mut core::ffi::c_void, handle: super::super::Foundation::HANDLE, eventhandler: *mut core::ffi::c_void, cookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDirectManipulationUpdateManager_Impl::RegisterWaitHandleCallback(this, core::mem::transmute_copy(&handle), windows_core::from_raw_borrowed(&eventhandler)) { + match IDirectManipulationUpdateManager_Impl::RegisterWaitHandleCallback(this, core::mem::transmute_copy(&handle), core::mem::transmute_copy(&eventhandler)) { Ok(ok__) => { cookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1272,7 +1272,7 @@ impl IDirectManipulationUpdateManager_Vtbl { } unsafe extern "system" fn Update(this: *mut core::ffi::c_void, frameinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationUpdateManager_Impl::Update(this, windows_core::from_raw_borrowed(&frameinfo)).into() + IDirectManipulationUpdateManager_Impl::Update(this, core::mem::transmute_copy(&frameinfo)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1436,22 +1436,22 @@ pub trait IDirectManipulationViewport_Impl: windows_core::IUnknownImpl { fn ReleaseAllContacts(&self) -> windows_core::Result<()>; fn GetStatus(&self) -> windows_core::Result; fn GetTag(&self, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void, id: *mut u32) -> windows_core::Result<()>; - fn SetTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; + fn SetTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; fn GetViewportRect(&self) -> windows_core::Result; fn SetViewportRect(&self, viewport: *const super::super::Foundation::RECT) -> windows_core::Result<()>; fn ZoomToRect(&self, left: f32, top: f32, right: f32, bottom: f32, animate: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetViewportTransform(&self, matrix: *const f32, pointcount: u32) -> windows_core::Result<()>; fn SyncDisplayTransform(&self, matrix: *const f32, pointcount: u32) -> windows_core::Result<()>; fn GetPrimaryContent(&self, riid: *const windows_core::GUID, object: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn AddContent(&self, content: Option<&IDirectManipulationContent>) -> windows_core::Result<()>; - fn RemoveContent(&self, content: Option<&IDirectManipulationContent>) -> windows_core::Result<()>; + fn AddContent(&self, content: windows_core::Ref<'_, IDirectManipulationContent>) -> windows_core::Result<()>; + fn RemoveContent(&self, content: windows_core::Ref<'_, IDirectManipulationContent>) -> windows_core::Result<()>; fn SetViewportOptions(&self, options: DIRECTMANIPULATION_VIEWPORT_OPTIONS) -> windows_core::Result<()>; fn AddConfiguration(&self, configuration: DIRECTMANIPULATION_CONFIGURATION) -> windows_core::Result<()>; fn RemoveConfiguration(&self, configuration: DIRECTMANIPULATION_CONFIGURATION) -> windows_core::Result<()>; fn ActivateConfiguration(&self, configuration: DIRECTMANIPULATION_CONFIGURATION) -> windows_core::Result<()>; fn SetManualGesture(&self, configuration: DIRECTMANIPULATION_GESTURE_CONFIGURATION) -> windows_core::Result<()>; fn SetChaining(&self, enabledtypes: DIRECTMANIPULATION_MOTION_TYPES) -> windows_core::Result<()>; - fn AddEventHandler(&self, window: super::super::Foundation::HWND, eventhandler: Option<&IDirectManipulationViewportEventHandler>) -> windows_core::Result; + fn AddEventHandler(&self, window: super::super::Foundation::HWND, eventhandler: windows_core::Ref<'_, IDirectManipulationViewportEventHandler>) -> windows_core::Result; fn RemoveEventHandler(&self, cookie: u32) -> windows_core::Result<()>; fn SetInputMode(&self, mode: DIRECTMANIPULATION_INPUT_MODE) -> windows_core::Result<()>; fn SetUpdateMode(&self, mode: DIRECTMANIPULATION_INPUT_MODE) -> windows_core::Result<()>; @@ -1496,7 +1496,7 @@ impl IDirectManipulationViewport_Vtbl { } unsafe extern "system" fn SetTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationViewport_Impl::SetTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)).into() + IDirectManipulationViewport_Impl::SetTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn GetViewportRect(this: *mut core::ffi::c_void, viewport: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1530,11 +1530,11 @@ impl IDirectManipulationViewport_Vtbl { } unsafe extern "system" fn AddContent(this: *mut core::ffi::c_void, content: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationViewport_Impl::AddContent(this, windows_core::from_raw_borrowed(&content)).into() + IDirectManipulationViewport_Impl::AddContent(this, core::mem::transmute_copy(&content)).into() } unsafe extern "system" fn RemoveContent(this: *mut core::ffi::c_void, content: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationViewport_Impl::RemoveContent(this, windows_core::from_raw_borrowed(&content)).into() + IDirectManipulationViewport_Impl::RemoveContent(this, core::mem::transmute_copy(&content)).into() } unsafe extern "system" fn SetViewportOptions(this: *mut core::ffi::c_void, options: DIRECTMANIPULATION_VIEWPORT_OPTIONS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1562,7 +1562,7 @@ impl IDirectManipulationViewport_Vtbl { } unsafe extern "system" fn AddEventHandler(this: *mut core::ffi::c_void, window: super::super::Foundation::HWND, eventhandler: *mut core::ffi::c_void, cookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDirectManipulationViewport_Impl::AddEventHandler(this, core::mem::transmute_copy(&window), windows_core::from_raw_borrowed(&eventhandler)) { + match IDirectManipulationViewport_Impl::AddEventHandler(this, core::mem::transmute_copy(&window), core::mem::transmute_copy(&eventhandler)) { Ok(ok__) => { cookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1658,7 +1658,7 @@ pub struct IDirectManipulationViewport2_Vtbl { pub RemoveAllBehaviors: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectManipulationViewport2_Impl: IDirectManipulationViewport_Impl { - fn AddBehavior(&self, behavior: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn AddBehavior(&self, behavior: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn RemoveBehavior(&self, cookie: u32) -> windows_core::Result<()>; fn RemoveAllBehaviors(&self) -> windows_core::Result<()>; } @@ -1666,7 +1666,7 @@ impl IDirectManipulationViewport2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddBehavior(this: *mut core::ffi::c_void, behavior: *mut core::ffi::c_void, cookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDirectManipulationViewport2_Impl::AddBehavior(this, windows_core::from_raw_borrowed(&behavior)) { + match IDirectManipulationViewport2_Impl::AddBehavior(this, core::mem::transmute_copy(&behavior)) { Ok(ok__) => { cookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1725,23 +1725,23 @@ pub struct IDirectManipulationViewportEventHandler_Vtbl { pub OnContentUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectManipulationViewportEventHandler_Impl: windows_core::IUnknownImpl { - fn OnViewportStatusChanged(&self, viewport: Option<&IDirectManipulationViewport>, current: DIRECTMANIPULATION_STATUS, previous: DIRECTMANIPULATION_STATUS) -> windows_core::Result<()>; - fn OnViewportUpdated(&self, viewport: Option<&IDirectManipulationViewport>) -> windows_core::Result<()>; - fn OnContentUpdated(&self, viewport: Option<&IDirectManipulationViewport>, content: Option<&IDirectManipulationContent>) -> windows_core::Result<()>; + fn OnViewportStatusChanged(&self, viewport: windows_core::Ref<'_, IDirectManipulationViewport>, current: DIRECTMANIPULATION_STATUS, previous: DIRECTMANIPULATION_STATUS) -> windows_core::Result<()>; + fn OnViewportUpdated(&self, viewport: windows_core::Ref<'_, IDirectManipulationViewport>) -> windows_core::Result<()>; + fn OnContentUpdated(&self, viewport: windows_core::Ref<'_, IDirectManipulationViewport>, content: windows_core::Ref<'_, IDirectManipulationContent>) -> windows_core::Result<()>; } impl IDirectManipulationViewportEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnViewportStatusChanged(this: *mut core::ffi::c_void, viewport: *mut core::ffi::c_void, current: DIRECTMANIPULATION_STATUS, previous: DIRECTMANIPULATION_STATUS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationViewportEventHandler_Impl::OnViewportStatusChanged(this, windows_core::from_raw_borrowed(&viewport), core::mem::transmute_copy(¤t), core::mem::transmute_copy(&previous)).into() + IDirectManipulationViewportEventHandler_Impl::OnViewportStatusChanged(this, core::mem::transmute_copy(&viewport), core::mem::transmute_copy(¤t), core::mem::transmute_copy(&previous)).into() } unsafe extern "system" fn OnViewportUpdated(this: *mut core::ffi::c_void, viewport: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationViewportEventHandler_Impl::OnViewportUpdated(this, windows_core::from_raw_borrowed(&viewport)).into() + IDirectManipulationViewportEventHandler_Impl::OnViewportUpdated(this, core::mem::transmute_copy(&viewport)).into() } unsafe extern "system" fn OnContentUpdated(this: *mut core::ffi::c_void, viewport: *mut core::ffi::c_void, content: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectManipulationViewportEventHandler_Impl::OnContentUpdated(this, windows_core::from_raw_borrowed(&viewport), windows_core::from_raw_borrowed(&content)).into() + IDirectManipulationViewportEventHandler_Impl::OnContentUpdated(this, core::mem::transmute_copy(&viewport), core::mem::transmute_copy(&content)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs index 58cbd8abf9..33a2a9614d 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs @@ -1933,7 +1933,7 @@ pub struct IDWriteBitmapRenderTarget_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDWriteBitmapRenderTarget_Impl: windows_core::IUnknownImpl { - fn DrawGlyphRun(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: Option<&IDWriteRenderingParams>, textcolor: super::super::Foundation::COLORREF, blackboxrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; + fn DrawGlyphRun(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: windows_core::Ref<'_, IDWriteRenderingParams>, textcolor: super::super::Foundation::COLORREF, blackboxrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; fn GetMemoryDC(&self) -> super::Gdi::HDC; fn GetPixelsPerDip(&self) -> f32; fn SetPixelsPerDip(&self, pixelsperdip: f32) -> windows_core::Result<()>; @@ -1947,7 +1947,7 @@ impl IDWriteBitmapRenderTarget_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DrawGlyphRun(this: *mut core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: *mut core::ffi::c_void, textcolor: super::super::Foundation::COLORREF, blackboxrect: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteBitmapRenderTarget_Impl::DrawGlyphRun(this, core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&glyphrun), windows_core::from_raw_borrowed(&renderingparams), core::mem::transmute_copy(&textcolor), core::mem::transmute_copy(&blackboxrect)).into() + IDWriteBitmapRenderTarget_Impl::DrawGlyphRun(this, core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&renderingparams), core::mem::transmute_copy(&textcolor), core::mem::transmute_copy(&blackboxrect)).into() } unsafe extern "system" fn GetMemoryDC(this: *mut core::ffi::c_void) -> super::Gdi::HDC { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2140,7 +2140,7 @@ pub struct IDWriteBitmapRenderTarget3_Vtbl { pub trait IDWriteBitmapRenderTarget3_Impl: IDWriteBitmapRenderTarget2_Impl { fn GetPaintFeatureLevel(&self) -> DWRITE_PAINT_FEATURE_LEVEL; fn DrawPaintGlyphRun(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, glyphimageformat: DWRITE_GLYPH_IMAGE_FORMATS, textcolor: super::super::Foundation::COLORREF, colorpaletteindex: u32, blackboxrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; - fn DrawGlyphRunWithColorSupport(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: Option<&IDWriteRenderingParams>, textcolor: super::super::Foundation::COLORREF, colorpaletteindex: u32, blackboxrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; + fn DrawGlyphRunWithColorSupport(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: windows_core::Ref<'_, IDWriteRenderingParams>, textcolor: super::super::Foundation::COLORREF, colorpaletteindex: u32, blackboxrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] impl IDWriteBitmapRenderTarget3_Vtbl { @@ -2155,7 +2155,7 @@ impl IDWriteBitmapRenderTarget3_Vtbl { } unsafe extern "system" fn DrawGlyphRunWithColorSupport(this: *mut core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: *mut core::ffi::c_void, textcolor: super::super::Foundation::COLORREF, colorpaletteindex: u32, blackboxrect: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteBitmapRenderTarget3_Impl::DrawGlyphRunWithColorSupport(this, core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&glyphrun), windows_core::from_raw_borrowed(&renderingparams), core::mem::transmute_copy(&textcolor), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&blackboxrect)).into() + IDWriteBitmapRenderTarget3_Impl::DrawGlyphRunWithColorSupport(this, core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&renderingparams), core::mem::transmute_copy(&textcolor), core::mem::transmute_copy(&colorpaletteindex), core::mem::transmute_copy(&blackboxrect)).into() } Self { base__: IDWriteBitmapRenderTarget2_Vtbl::new::(), @@ -2426,24 +2426,24 @@ pub struct IDWriteFactory_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDWriteFactory_Impl: windows_core::IUnknownImpl { - fn GetSystemFontCollection(&self, fontcollection: *mut Option, checkforupdates: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn CreateCustomFontCollection(&self, collectionloader: Option<&IDWriteFontCollectionLoader>, collectionkey: *const core::ffi::c_void, collectionkeysize: u32) -> windows_core::Result; - fn RegisterFontCollectionLoader(&self, fontcollectionloader: Option<&IDWriteFontCollectionLoader>) -> windows_core::Result<()>; - fn UnregisterFontCollectionLoader(&self, fontcollectionloader: Option<&IDWriteFontCollectionLoader>) -> windows_core::Result<()>; + fn GetSystemFontCollection(&self, fontcollection: windows_core::OutRef<'_, IDWriteFontCollection>, checkforupdates: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn CreateCustomFontCollection(&self, collectionloader: windows_core::Ref<'_, IDWriteFontCollectionLoader>, collectionkey: *const core::ffi::c_void, collectionkeysize: u32) -> windows_core::Result; + fn RegisterFontCollectionLoader(&self, fontcollectionloader: windows_core::Ref<'_, IDWriteFontCollectionLoader>) -> windows_core::Result<()>; + fn UnregisterFontCollectionLoader(&self, fontcollectionloader: windows_core::Ref<'_, IDWriteFontCollectionLoader>) -> windows_core::Result<()>; fn CreateFontFileReference(&self, filepath: &windows_core::PCWSTR, lastwritetime: *const super::super::Foundation::FILETIME) -> windows_core::Result; - fn CreateCustomFontFileReference(&self, fontfilereferencekey: *const core::ffi::c_void, fontfilereferencekeysize: u32, fontfileloader: Option<&IDWriteFontFileLoader>) -> windows_core::Result; + fn CreateCustomFontFileReference(&self, fontfilereferencekey: *const core::ffi::c_void, fontfilereferencekeysize: u32, fontfileloader: windows_core::Ref<'_, IDWriteFontFileLoader>) -> windows_core::Result; fn CreateFontFace(&self, fontfacetype: DWRITE_FONT_FACE_TYPE, numberoffiles: u32, fontfiles: *const Option, faceindex: u32, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> windows_core::Result; fn CreateRenderingParams(&self) -> windows_core::Result; fn CreateMonitorRenderingParams(&self, monitor: super::Gdi::HMONITOR) -> windows_core::Result; fn CreateCustomRenderingParams(&self, gamma: f32, enhancedcontrast: f32, cleartypelevel: f32, pixelgeometry: DWRITE_PIXEL_GEOMETRY, renderingmode: DWRITE_RENDERING_MODE) -> windows_core::Result; - fn RegisterFontFileLoader(&self, fontfileloader: Option<&IDWriteFontFileLoader>) -> windows_core::Result<()>; - fn UnregisterFontFileLoader(&self, fontfileloader: Option<&IDWriteFontFileLoader>) -> windows_core::Result<()>; - fn CreateTextFormat(&self, fontfamilyname: &windows_core::PCWSTR, fontcollection: Option<&IDWriteFontCollection>, fontweight: DWRITE_FONT_WEIGHT, fontstyle: DWRITE_FONT_STYLE, fontstretch: DWRITE_FONT_STRETCH, fontsize: f32, localename: &windows_core::PCWSTR) -> windows_core::Result; + fn RegisterFontFileLoader(&self, fontfileloader: windows_core::Ref<'_, IDWriteFontFileLoader>) -> windows_core::Result<()>; + fn UnregisterFontFileLoader(&self, fontfileloader: windows_core::Ref<'_, IDWriteFontFileLoader>) -> windows_core::Result<()>; + fn CreateTextFormat(&self, fontfamilyname: &windows_core::PCWSTR, fontcollection: windows_core::Ref<'_, IDWriteFontCollection>, fontweight: DWRITE_FONT_WEIGHT, fontstyle: DWRITE_FONT_STYLE, fontstretch: DWRITE_FONT_STRETCH, fontsize: f32, localename: &windows_core::PCWSTR) -> windows_core::Result; fn CreateTypography(&self) -> windows_core::Result; fn GetGdiInterop(&self) -> windows_core::Result; - fn CreateTextLayout(&self, string: &windows_core::PCWSTR, stringlength: u32, textformat: Option<&IDWriteTextFormat>, maxwidth: f32, maxheight: f32) -> windows_core::Result; - fn CreateGdiCompatibleTextLayout(&self, string: &windows_core::PCWSTR, stringlength: u32, textformat: Option<&IDWriteTextFormat>, layoutwidth: f32, layoutheight: f32, pixelsperdip: f32, transform: *const DWRITE_MATRIX, usegdinatural: super::super::Foundation::BOOL) -> windows_core::Result; - fn CreateEllipsisTrimmingSign(&self, textformat: Option<&IDWriteTextFormat>) -> windows_core::Result; + fn CreateTextLayout(&self, string: &windows_core::PCWSTR, stringlength: u32, textformat: windows_core::Ref<'_, IDWriteTextFormat>, maxwidth: f32, maxheight: f32) -> windows_core::Result; + fn CreateGdiCompatibleTextLayout(&self, string: &windows_core::PCWSTR, stringlength: u32, textformat: windows_core::Ref<'_, IDWriteTextFormat>, layoutwidth: f32, layoutheight: f32, pixelsperdip: f32, transform: *const DWRITE_MATRIX, usegdinatural: super::super::Foundation::BOOL) -> windows_core::Result; + fn CreateEllipsisTrimmingSign(&self, textformat: windows_core::Ref<'_, IDWriteTextFormat>) -> windows_core::Result; fn CreateTextAnalyzer(&self) -> windows_core::Result; fn CreateNumberSubstitution(&self, substitutionmethod: DWRITE_NUMBER_SUBSTITUTION_METHOD, localename: &windows_core::PCWSTR, ignoreuseroverride: super::super::Foundation::BOOL) -> windows_core::Result; fn CreateGlyphRunAnalysis(&self, glyphrun: *const DWRITE_GLYPH_RUN, pixelsperdip: f32, transform: *const DWRITE_MATRIX, renderingmode: DWRITE_RENDERING_MODE, measuringmode: DWRITE_MEASURING_MODE, baselineoriginx: f32, baselineoriginy: f32) -> windows_core::Result; @@ -2457,7 +2457,7 @@ impl IDWriteFactory_Vtbl { } unsafe extern "system" fn CreateCustomFontCollection(this: *mut core::ffi::c_void, collectionloader: *mut core::ffi::c_void, collectionkey: *const core::ffi::c_void, collectionkeysize: u32, fontcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory_Impl::CreateCustomFontCollection(this, windows_core::from_raw_borrowed(&collectionloader), core::mem::transmute_copy(&collectionkey), core::mem::transmute_copy(&collectionkeysize)) { + match IDWriteFactory_Impl::CreateCustomFontCollection(this, core::mem::transmute_copy(&collectionloader), core::mem::transmute_copy(&collectionkey), core::mem::transmute_copy(&collectionkeysize)) { Ok(ok__) => { fontcollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2467,11 +2467,11 @@ impl IDWriteFactory_Vtbl { } unsafe extern "system" fn RegisterFontCollectionLoader(this: *mut core::ffi::c_void, fontcollectionloader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFactory_Impl::RegisterFontCollectionLoader(this, windows_core::from_raw_borrowed(&fontcollectionloader)).into() + IDWriteFactory_Impl::RegisterFontCollectionLoader(this, core::mem::transmute_copy(&fontcollectionloader)).into() } unsafe extern "system" fn UnregisterFontCollectionLoader(this: *mut core::ffi::c_void, fontcollectionloader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFactory_Impl::UnregisterFontCollectionLoader(this, windows_core::from_raw_borrowed(&fontcollectionloader)).into() + IDWriteFactory_Impl::UnregisterFontCollectionLoader(this, core::mem::transmute_copy(&fontcollectionloader)).into() } unsafe extern "system" fn CreateFontFileReference(this: *mut core::ffi::c_void, filepath: windows_core::PCWSTR, lastwritetime: *const super::super::Foundation::FILETIME, fontfile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2485,7 +2485,7 @@ impl IDWriteFactory_Vtbl { } unsafe extern "system" fn CreateCustomFontFileReference(this: *mut core::ffi::c_void, fontfilereferencekey: *const core::ffi::c_void, fontfilereferencekeysize: u32, fontfileloader: *mut core::ffi::c_void, fontfile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory_Impl::CreateCustomFontFileReference(this, core::mem::transmute_copy(&fontfilereferencekey), core::mem::transmute_copy(&fontfilereferencekeysize), windows_core::from_raw_borrowed(&fontfileloader)) { + match IDWriteFactory_Impl::CreateCustomFontFileReference(this, core::mem::transmute_copy(&fontfilereferencekey), core::mem::transmute_copy(&fontfilereferencekeysize), core::mem::transmute_copy(&fontfileloader)) { Ok(ok__) => { fontfile.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2535,15 +2535,15 @@ impl IDWriteFactory_Vtbl { } unsafe extern "system" fn RegisterFontFileLoader(this: *mut core::ffi::c_void, fontfileloader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFactory_Impl::RegisterFontFileLoader(this, windows_core::from_raw_borrowed(&fontfileloader)).into() + IDWriteFactory_Impl::RegisterFontFileLoader(this, core::mem::transmute_copy(&fontfileloader)).into() } unsafe extern "system" fn UnregisterFontFileLoader(this: *mut core::ffi::c_void, fontfileloader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFactory_Impl::UnregisterFontFileLoader(this, windows_core::from_raw_borrowed(&fontfileloader)).into() + IDWriteFactory_Impl::UnregisterFontFileLoader(this, core::mem::transmute_copy(&fontfileloader)).into() } unsafe extern "system" fn CreateTextFormat(this: *mut core::ffi::c_void, fontfamilyname: windows_core::PCWSTR, fontcollection: *mut core::ffi::c_void, fontweight: DWRITE_FONT_WEIGHT, fontstyle: DWRITE_FONT_STYLE, fontstretch: DWRITE_FONT_STRETCH, fontsize: f32, localename: windows_core::PCWSTR, textformat: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory_Impl::CreateTextFormat(this, core::mem::transmute(&fontfamilyname), windows_core::from_raw_borrowed(&fontcollection), core::mem::transmute_copy(&fontweight), core::mem::transmute_copy(&fontstyle), core::mem::transmute_copy(&fontstretch), core::mem::transmute_copy(&fontsize), core::mem::transmute(&localename)) { + match IDWriteFactory_Impl::CreateTextFormat(this, core::mem::transmute(&fontfamilyname), core::mem::transmute_copy(&fontcollection), core::mem::transmute_copy(&fontweight), core::mem::transmute_copy(&fontstyle), core::mem::transmute_copy(&fontstretch), core::mem::transmute_copy(&fontsize), core::mem::transmute(&localename)) { Ok(ok__) => { textformat.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2573,7 +2573,7 @@ impl IDWriteFactory_Vtbl { } unsafe extern "system" fn CreateTextLayout(this: *mut core::ffi::c_void, string: windows_core::PCWSTR, stringlength: u32, textformat: *mut core::ffi::c_void, maxwidth: f32, maxheight: f32, textlayout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory_Impl::CreateTextLayout(this, core::mem::transmute(&string), core::mem::transmute_copy(&stringlength), windows_core::from_raw_borrowed(&textformat), core::mem::transmute_copy(&maxwidth), core::mem::transmute_copy(&maxheight)) { + match IDWriteFactory_Impl::CreateTextLayout(this, core::mem::transmute(&string), core::mem::transmute_copy(&stringlength), core::mem::transmute_copy(&textformat), core::mem::transmute_copy(&maxwidth), core::mem::transmute_copy(&maxheight)) { Ok(ok__) => { textlayout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2583,7 +2583,7 @@ impl IDWriteFactory_Vtbl { } unsafe extern "system" fn CreateGdiCompatibleTextLayout(this: *mut core::ffi::c_void, string: windows_core::PCWSTR, stringlength: u32, textformat: *mut core::ffi::c_void, layoutwidth: f32, layoutheight: f32, pixelsperdip: f32, transform: *const DWRITE_MATRIX, usegdinatural: super::super::Foundation::BOOL, textlayout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory_Impl::CreateGdiCompatibleTextLayout(this, core::mem::transmute(&string), core::mem::transmute_copy(&stringlength), windows_core::from_raw_borrowed(&textformat), core::mem::transmute_copy(&layoutwidth), core::mem::transmute_copy(&layoutheight), core::mem::transmute_copy(&pixelsperdip), core::mem::transmute_copy(&transform), core::mem::transmute_copy(&usegdinatural)) { + match IDWriteFactory_Impl::CreateGdiCompatibleTextLayout(this, core::mem::transmute(&string), core::mem::transmute_copy(&stringlength), core::mem::transmute_copy(&textformat), core::mem::transmute_copy(&layoutwidth), core::mem::transmute_copy(&layoutheight), core::mem::transmute_copy(&pixelsperdip), core::mem::transmute_copy(&transform), core::mem::transmute_copy(&usegdinatural)) { Ok(ok__) => { textlayout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2593,7 +2593,7 @@ impl IDWriteFactory_Vtbl { } unsafe extern "system" fn CreateEllipsisTrimmingSign(this: *mut core::ffi::c_void, textformat: *mut core::ffi::c_void, trimmingsign: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory_Impl::CreateEllipsisTrimmingSign(this, windows_core::from_raw_borrowed(&textformat)) { + match IDWriteFactory_Impl::CreateEllipsisTrimmingSign(this, core::mem::transmute_copy(&textformat)) { Ok(ok__) => { trimmingsign.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2691,7 +2691,7 @@ pub struct IDWriteFactory1_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDWriteFactory1_Impl: IDWriteFactory_Impl { - fn GetEudcFontCollection(&self, fontcollection: *mut Option, checkforupdates: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn GetEudcFontCollection(&self, fontcollection: windows_core::OutRef<'_, IDWriteFontCollection>, checkforupdates: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn CreateCustomRenderingParams(&self, gamma: f32, enhancedcontrast: f32, enhancedcontrastgrayscale: f32, cleartypelevel: f32, pixelgeometry: DWRITE_PIXEL_GEOMETRY, renderingmode: DWRITE_RENDERING_MODE) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -2917,12 +2917,12 @@ pub struct IDWriteFactory3_Vtbl { pub trait IDWriteFactory3_Impl: IDWriteFactory2_Impl { fn CreateGlyphRunAnalysis(&self, glyphrun: *const DWRITE_GLYPH_RUN, transform: *const DWRITE_MATRIX, renderingmode: DWRITE_RENDERING_MODE1, measuringmode: DWRITE_MEASURING_MODE, gridfitmode: DWRITE_GRID_FIT_MODE, antialiasmode: DWRITE_TEXT_ANTIALIAS_MODE, baselineoriginx: f32, baselineoriginy: f32) -> windows_core::Result; fn CreateCustomRenderingParams(&self, gamma: f32, enhancedcontrast: f32, grayscaleenhancedcontrast: f32, cleartypelevel: f32, pixelgeometry: DWRITE_PIXEL_GEOMETRY, renderingmode: DWRITE_RENDERING_MODE1, gridfitmode: DWRITE_GRID_FIT_MODE) -> windows_core::Result; - fn CreateFontFaceReference(&self, fontfile: Option<&IDWriteFontFile>, faceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS) -> windows_core::Result; + fn CreateFontFaceReference(&self, fontfile: windows_core::Ref<'_, IDWriteFontFile>, faceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS) -> windows_core::Result; fn CreateFontFaceReference2(&self, filepath: &windows_core::PCWSTR, lastwritetime: *const super::super::Foundation::FILETIME, faceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS) -> windows_core::Result; fn GetSystemFontSet(&self) -> windows_core::Result; fn CreateFontSetBuilder(&self) -> windows_core::Result; - fn CreateFontCollectionFromFontSet(&self, fontset: Option<&IDWriteFontSet>) -> windows_core::Result; - fn GetSystemFontCollection(&self, includedownloadablefonts: super::super::Foundation::BOOL, fontcollection: *mut Option, checkforupdates: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn CreateFontCollectionFromFontSet(&self, fontset: windows_core::Ref<'_, IDWriteFontSet>) -> windows_core::Result; + fn GetSystemFontCollection(&self, includedownloadablefonts: super::super::Foundation::BOOL, fontcollection: windows_core::OutRef<'_, IDWriteFontCollection1>, checkforupdates: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetFontDownloadQueue(&self) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -2950,7 +2950,7 @@ impl IDWriteFactory3_Vtbl { } unsafe extern "system" fn CreateFontFaceReference(this: *mut core::ffi::c_void, fontfile: *mut core::ffi::c_void, faceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS, fontfacereference: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory3_Impl::CreateFontFaceReference(this, windows_core::from_raw_borrowed(&fontfile), core::mem::transmute_copy(&faceindex), core::mem::transmute_copy(&fontsimulations)) { + match IDWriteFactory3_Impl::CreateFontFaceReference(this, core::mem::transmute_copy(&fontfile), core::mem::transmute_copy(&faceindex), core::mem::transmute_copy(&fontsimulations)) { Ok(ok__) => { fontfacereference.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2990,7 +2990,7 @@ impl IDWriteFactory3_Vtbl { } unsafe extern "system" fn CreateFontCollectionFromFontSet(this: *mut core::ffi::c_void, fontset: *mut core::ffi::c_void, fontcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory3_Impl::CreateFontCollectionFromFontSet(this, windows_core::from_raw_borrowed(&fontset)) { + match IDWriteFactory3_Impl::CreateFontCollectionFromFontSet(this, core::mem::transmute_copy(&fontset)) { Ok(ok__) => { fontcollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3313,20 +3313,20 @@ pub struct IDWriteFactory6_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Gdi"))] pub trait IDWriteFactory6_Impl: IDWriteFactory5_Impl { - fn CreateFontFaceReference(&self, fontfile: Option<&IDWriteFontFile>, faceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32) -> windows_core::Result; - fn CreateFontResource(&self, fontfile: Option<&IDWriteFontFile>, faceindex: u32) -> windows_core::Result; + fn CreateFontFaceReference(&self, fontfile: windows_core::Ref<'_, IDWriteFontFile>, faceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32) -> windows_core::Result; + fn CreateFontResource(&self, fontfile: windows_core::Ref<'_, IDWriteFontFile>, faceindex: u32) -> windows_core::Result; fn GetSystemFontSet(&self, includedownloadablefonts: super::super::Foundation::BOOL) -> windows_core::Result; fn GetSystemFontCollection(&self, includedownloadablefonts: super::super::Foundation::BOOL, fontfamilymodel: DWRITE_FONT_FAMILY_MODEL) -> windows_core::Result; - fn CreateFontCollectionFromFontSet(&self, fontset: Option<&IDWriteFontSet>, fontfamilymodel: DWRITE_FONT_FAMILY_MODEL) -> windows_core::Result; + fn CreateFontCollectionFromFontSet(&self, fontset: windows_core::Ref<'_, IDWriteFontSet>, fontfamilymodel: DWRITE_FONT_FAMILY_MODEL) -> windows_core::Result; fn CreateFontSetBuilder(&self) -> windows_core::Result; - fn CreateTextFormat(&self, fontfamilyname: &windows_core::PCWSTR, fontcollection: Option<&IDWriteFontCollection>, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, fontsize: f32, localename: &windows_core::PCWSTR) -> windows_core::Result; + fn CreateTextFormat(&self, fontfamilyname: &windows_core::PCWSTR, fontcollection: windows_core::Ref<'_, IDWriteFontCollection>, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, fontsize: f32, localename: &windows_core::PCWSTR) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Gdi"))] impl IDWriteFactory6_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFontFaceReference(this: *mut core::ffi::c_void, fontfile: *mut core::ffi::c_void, faceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, fontfacereference: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory6_Impl::CreateFontFaceReference(this, windows_core::from_raw_borrowed(&fontfile), core::mem::transmute_copy(&faceindex), core::mem::transmute_copy(&fontsimulations), core::mem::transmute_copy(&fontaxisvalues), core::mem::transmute_copy(&fontaxisvaluecount)) { + match IDWriteFactory6_Impl::CreateFontFaceReference(this, core::mem::transmute_copy(&fontfile), core::mem::transmute_copy(&faceindex), core::mem::transmute_copy(&fontsimulations), core::mem::transmute_copy(&fontaxisvalues), core::mem::transmute_copy(&fontaxisvaluecount)) { Ok(ok__) => { fontfacereference.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3336,7 +3336,7 @@ impl IDWriteFactory6_Vtbl { } unsafe extern "system" fn CreateFontResource(this: *mut core::ffi::c_void, fontfile: *mut core::ffi::c_void, faceindex: u32, fontresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory6_Impl::CreateFontResource(this, windows_core::from_raw_borrowed(&fontfile), core::mem::transmute_copy(&faceindex)) { + match IDWriteFactory6_Impl::CreateFontResource(this, core::mem::transmute_copy(&fontfile), core::mem::transmute_copy(&faceindex)) { Ok(ok__) => { fontresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3366,7 +3366,7 @@ impl IDWriteFactory6_Vtbl { } unsafe extern "system" fn CreateFontCollectionFromFontSet(this: *mut core::ffi::c_void, fontset: *mut core::ffi::c_void, fontfamilymodel: DWRITE_FONT_FAMILY_MODEL, fontcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory6_Impl::CreateFontCollectionFromFontSet(this, windows_core::from_raw_borrowed(&fontset), core::mem::transmute_copy(&fontfamilymodel)) { + match IDWriteFactory6_Impl::CreateFontCollectionFromFontSet(this, core::mem::transmute_copy(&fontset), core::mem::transmute_copy(&fontfamilymodel)) { Ok(ok__) => { fontcollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3386,7 +3386,7 @@ impl IDWriteFactory6_Vtbl { } unsafe extern "system" fn CreateTextFormat(this: *mut core::ffi::c_void, fontfamilyname: windows_core::PCWSTR, fontcollection: *mut core::ffi::c_void, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, fontsize: f32, localename: windows_core::PCWSTR, textformat: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFactory6_Impl::CreateTextFormat(this, core::mem::transmute(&fontfamilyname), windows_core::from_raw_borrowed(&fontcollection), core::mem::transmute_copy(&fontaxisvalues), core::mem::transmute_copy(&fontaxisvaluecount), core::mem::transmute_copy(&fontsize), core::mem::transmute(&localename)) { + match IDWriteFactory6_Impl::CreateTextFormat(this, core::mem::transmute(&fontfamilyname), core::mem::transmute_copy(&fontcollection), core::mem::transmute_copy(&fontaxisvalues), core::mem::transmute_copy(&fontaxisvaluecount), core::mem::transmute_copy(&fontsize), core::mem::transmute(&localename)) { Ok(ok__) => { textformat.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3598,7 +3598,7 @@ pub trait IDWriteFont_Impl: windows_core::IUnknownImpl { fn GetStyle(&self) -> DWRITE_FONT_STYLE; fn IsSymbolFont(&self) -> super::super::Foundation::BOOL; fn GetFaceNames(&self) -> windows_core::Result; - fn GetInformationalStrings(&self, informationalstringid: DWRITE_INFORMATIONAL_STRING_ID, informationalstrings: *mut Option, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn GetInformationalStrings(&self, informationalstringid: DWRITE_INFORMATIONAL_STRING_ID, informationalstrings: windows_core::OutRef<'_, IDWriteLocalizedStrings>, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetSimulations(&self) -> DWRITE_FONT_SIMULATIONS; fn GetMetrics(&self, fontmetrics: *mut DWRITE_FONT_METRICS); fn HasCharacter(&self, unicodevalue: u32) -> windows_core::Result; @@ -3844,7 +3844,7 @@ pub struct IDWriteFont3_Vtbl { } pub trait IDWriteFont3_Impl: IDWriteFont2_Impl { fn CreateFontFace(&self) -> windows_core::Result; - fn Equals(&self, font: Option<&IDWriteFont>) -> super::super::Foundation::BOOL; + fn Equals(&self, font: windows_core::Ref<'_, IDWriteFont>) -> super::super::Foundation::BOOL; fn GetFontFaceReference(&self) -> windows_core::Result; fn HasCharacter(&self, unicodevalue: u32) -> super::super::Foundation::BOOL; fn GetLocality(&self) -> DWRITE_LOCALITY; @@ -3863,7 +3863,7 @@ impl IDWriteFont3_Vtbl { } unsafe extern "system" fn Equals(this: *mut core::ffi::c_void, font: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFont3_Impl::Equals(this, windows_core::from_raw_borrowed(&font)) + IDWriteFont3_Impl::Equals(this, core::mem::transmute_copy(&font)) } unsafe extern "system" fn GetFontFaceReference(this: *mut core::ffi::c_void, fontfacereference: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3935,7 +3935,7 @@ pub trait IDWriteFontCollection_Impl: windows_core::IUnknownImpl { fn GetFontFamilyCount(&self) -> u32; fn GetFontFamily(&self, index: u32) -> windows_core::Result; fn FindFamilyName(&self, familyname: &windows_core::PCWSTR, index: *mut u32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn GetFontFromFontFace(&self, fontface: Option<&IDWriteFontFace>) -> windows_core::Result; + fn GetFontFromFontFace(&self, fontface: windows_core::Ref<'_, IDWriteFontFace>) -> windows_core::Result; } impl IDWriteFontCollection_Vtbl { pub const fn new() -> Self { @@ -3959,7 +3959,7 @@ impl IDWriteFontCollection_Vtbl { } unsafe extern "system" fn GetFontFromFontFace(this: *mut core::ffi::c_void, fontface: *mut core::ffi::c_void, font: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFontCollection_Impl::GetFontFromFontFace(this, windows_core::from_raw_borrowed(&fontface)) { + match IDWriteFontCollection_Impl::GetFontFromFontFace(this, core::mem::transmute_copy(&fontface)) { Ok(ok__) => { font.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4191,13 +4191,13 @@ pub struct IDWriteFontCollectionLoader_Vtbl { pub CreateEnumeratorFromKey: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDWriteFontCollectionLoader_Impl: windows_core::IUnknownImpl { - fn CreateEnumeratorFromKey(&self, factory: Option<&IDWriteFactory>, collectionkey: *const core::ffi::c_void, collectionkeysize: u32) -> windows_core::Result; + fn CreateEnumeratorFromKey(&self, factory: windows_core::Ref<'_, IDWriteFactory>, collectionkey: *const core::ffi::c_void, collectionkeysize: u32) -> windows_core::Result; } impl IDWriteFontCollectionLoader_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateEnumeratorFromKey(this: *mut core::ffi::c_void, factory: *mut core::ffi::c_void, collectionkey: *const core::ffi::c_void, collectionkeysize: u32, fontfileenumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFontCollectionLoader_Impl::CreateEnumeratorFromKey(this, windows_core::from_raw_borrowed(&factory), core::mem::transmute_copy(&collectionkey), core::mem::transmute_copy(&collectionkeysize)) { + match IDWriteFontCollectionLoader_Impl::CreateEnumeratorFromKey(this, core::mem::transmute_copy(&factory), core::mem::transmute_copy(&collectionkey), core::mem::transmute_copy(&collectionkeysize)) { Ok(ok__) => { fontfileenumerator.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4231,13 +4231,13 @@ pub struct IDWriteFontDownloadListener_Vtbl { pub DownloadCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::HRESULT), } pub trait IDWriteFontDownloadListener_Impl: windows_core::IUnknownImpl { - fn DownloadCompleted(&self, downloadqueue: Option<&IDWriteFontDownloadQueue>, context: Option<&windows_core::IUnknown>, downloadresult: windows_core::HRESULT); + fn DownloadCompleted(&self, downloadqueue: windows_core::Ref<'_, IDWriteFontDownloadQueue>, context: windows_core::Ref<'_, windows_core::IUnknown>, downloadresult: windows_core::HRESULT); } impl IDWriteFontDownloadListener_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DownloadCompleted(this: *mut core::ffi::c_void, downloadqueue: *mut core::ffi::c_void, context: *mut core::ffi::c_void, downloadresult: windows_core::HRESULT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontDownloadListener_Impl::DownloadCompleted(this, windows_core::from_raw_borrowed(&downloadqueue), windows_core::from_raw_borrowed(&context), core::mem::transmute_copy(&downloadresult)) + IDWriteFontDownloadListener_Impl::DownloadCompleted(this, core::mem::transmute_copy(&downloadqueue), core::mem::transmute_copy(&context), core::mem::transmute_copy(&downloadresult)) } Self { base__: windows_core::IUnknown_Vtbl::new::(), DownloadCompleted: DownloadCompleted:: } } @@ -4288,10 +4288,10 @@ pub struct IDWriteFontDownloadQueue_Vtbl { pub GetGenerationCount: unsafe extern "system" fn(*mut core::ffi::c_void) -> u64, } pub trait IDWriteFontDownloadQueue_Impl: windows_core::IUnknownImpl { - fn AddListener(&self, listener: Option<&IDWriteFontDownloadListener>) -> windows_core::Result; + fn AddListener(&self, listener: windows_core::Ref<'_, IDWriteFontDownloadListener>) -> windows_core::Result; fn RemoveListener(&self, token: u32) -> windows_core::Result<()>; fn IsEmpty(&self) -> super::super::Foundation::BOOL; - fn BeginDownload(&self, context: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn BeginDownload(&self, context: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn CancelDownload(&self) -> windows_core::Result<()>; fn GetGenerationCount(&self) -> u64; } @@ -4299,7 +4299,7 @@ impl IDWriteFontDownloadQueue_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddListener(this: *mut core::ffi::c_void, listener: *mut core::ffi::c_void, token: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFontDownloadQueue_Impl::AddListener(this, windows_core::from_raw_borrowed(&listener)) { + match IDWriteFontDownloadQueue_Impl::AddListener(this, core::mem::transmute_copy(&listener)) { Ok(ok__) => { token.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4317,7 +4317,7 @@ impl IDWriteFontDownloadQueue_Vtbl { } unsafe extern "system" fn BeginDownload(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontDownloadQueue_Impl::BeginDownload(this, windows_core::from_raw_borrowed(&context)).into() + IDWriteFontDownloadQueue_Impl::BeginDownload(this, core::mem::transmute_copy(&context)).into() } unsafe extern "system" fn CancelDownload(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4427,7 +4427,7 @@ pub struct IDWriteFontFace_Vtbl { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub trait IDWriteFontFace_Impl: windows_core::IUnknownImpl { fn GetType(&self) -> DWRITE_FONT_FACE_TYPE; - fn GetFiles(&self, numberoffiles: *mut u32, fontfiles: *mut Option) -> windows_core::Result<()>; + fn GetFiles(&self, numberoffiles: *mut u32, fontfiles: windows_core::OutRef<'_, IDWriteFontFile>) -> windows_core::Result<()>; fn GetIndex(&self) -> u32; fn GetSimulations(&self) -> DWRITE_FONT_SIMULATIONS; fn IsSymbolFont(&self) -> super::super::Foundation::BOOL; @@ -4437,8 +4437,8 @@ pub trait IDWriteFontFace_Impl: windows_core::IUnknownImpl { fn GetGlyphIndices(&self, codepoints: *const u32, codepointcount: u32) -> windows_core::Result; fn TryGetFontTable(&self, opentypetabletag: u32, tabledata: *mut *mut core::ffi::c_void, tablesize: *mut u32, tablecontext: *mut *mut core::ffi::c_void, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn ReleaseFontTable(&self, tablecontext: *const core::ffi::c_void); - fn GetGlyphRunOutline(&self, emsize: f32, glyphindices: *const u16, glyphadvances: *const f32, glyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphcount: u32, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, geometrysink: Option<&super::Direct2D::Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; - fn GetRecommendedRenderingMode(&self, emsize: f32, pixelsperdip: f32, measuringmode: DWRITE_MEASURING_MODE, renderingparams: Option<&IDWriteRenderingParams>) -> windows_core::Result; + fn GetGlyphRunOutline(&self, emsize: f32, glyphindices: *const u16, glyphadvances: *const f32, glyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphcount: u32, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, geometrysink: windows_core::Ref<'_, super::Direct2D::Common::ID2D1SimplifiedGeometrySink>) -> windows_core::Result<()>; + fn GetRecommendedRenderingMode(&self, emsize: f32, pixelsperdip: f32, measuringmode: DWRITE_MEASURING_MODE, renderingparams: windows_core::Ref<'_, IDWriteRenderingParams>) -> windows_core::Result; fn GetGdiCompatibleMetrics(&self, emsize: f32, pixelsperdip: f32, transform: *const DWRITE_MATRIX, fontfacemetrics: *mut DWRITE_FONT_METRICS) -> windows_core::Result<()>; fn GetGdiCompatibleGlyphMetrics(&self, emsize: f32, pixelsperdip: f32, transform: *const DWRITE_MATRIX, usegdinatural: super::super::Foundation::BOOL, glyphindices: *const u16, glyphcount: u32, glyphmetrics: *mut DWRITE_GLYPH_METRICS, issideways: super::super::Foundation::BOOL) -> windows_core::Result<()>; } @@ -4497,11 +4497,11 @@ impl IDWriteFontFace_Vtbl { } unsafe extern "system" fn GetGlyphRunOutline(this: *mut core::ffi::c_void, emsize: f32, glyphindices: *const u16, glyphadvances: *const f32, glyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphcount: u32, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, geometrysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontFace_Impl::GetGlyphRunOutline(this, core::mem::transmute_copy(&emsize), core::mem::transmute_copy(&glyphindices), core::mem::transmute_copy(&glyphadvances), core::mem::transmute_copy(&glyphoffsets), core::mem::transmute_copy(&glyphcount), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), windows_core::from_raw_borrowed(&geometrysink)).into() + IDWriteFontFace_Impl::GetGlyphRunOutline(this, core::mem::transmute_copy(&emsize), core::mem::transmute_copy(&glyphindices), core::mem::transmute_copy(&glyphadvances), core::mem::transmute_copy(&glyphoffsets), core::mem::transmute_copy(&glyphcount), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), core::mem::transmute_copy(&geometrysink)).into() } unsafe extern "system" fn GetRecommendedRenderingMode(this: *mut core::ffi::c_void, emsize: f32, pixelsperdip: f32, measuringmode: DWRITE_MEASURING_MODE, renderingparams: *mut core::ffi::c_void, renderingmode: *mut DWRITE_RENDERING_MODE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteFontFace_Impl::GetRecommendedRenderingMode(this, core::mem::transmute_copy(&emsize), core::mem::transmute_copy(&pixelsperdip), core::mem::transmute_copy(&measuringmode), windows_core::from_raw_borrowed(&renderingparams)) { + match IDWriteFontFace_Impl::GetRecommendedRenderingMode(this, core::mem::transmute_copy(&emsize), core::mem::transmute_copy(&pixelsperdip), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&renderingparams)) { Ok(ok__) => { renderingmode.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4773,7 +4773,7 @@ pub trait IDWriteFontFace2_Impl: IDWriteFontFace1_Impl { fn GetColorPaletteCount(&self) -> u32; fn GetPaletteEntryCount(&self) -> u32; fn GetPaletteEntries(&self, colorpaletteindex: u32, firstentryindex: u32, entrycount: u32, paletteentries: *mut DWRITE_COLOR_F) -> windows_core::Result<()>; - fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: *const DWRITE_MATRIX, issideways: super::super::Foundation::BOOL, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: Option<&IDWriteRenderingParams>, renderingmode: *mut DWRITE_RENDERING_MODE, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::Result<()>; + fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: *const DWRITE_MATRIX, issideways: super::super::Foundation::BOOL, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: windows_core::Ref<'_, IDWriteRenderingParams>, renderingmode: *mut DWRITE_RENDERING_MODE, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] impl IDWriteFontFace2_Vtbl { @@ -4796,7 +4796,7 @@ impl IDWriteFontFace2_Vtbl { } unsafe extern "system" fn GetRecommendedRenderingMode(this: *mut core::ffi::c_void, fontemsize: f32, dpix: f32, dpiy: f32, transform: *const DWRITE_MATRIX, issideways: super::super::Foundation::BOOL, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: *mut core::ffi::c_void, renderingmode: *mut DWRITE_RENDERING_MODE, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontFace2_Impl::GetRecommendedRenderingMode(this, core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy), core::mem::transmute_copy(&transform), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&outlinethreshold), core::mem::transmute_copy(&measuringmode), windows_core::from_raw_borrowed(&renderingparams), core::mem::transmute_copy(&renderingmode), core::mem::transmute_copy(&gridfitmode)).into() + IDWriteFontFace2_Impl::GetRecommendedRenderingMode(this, core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy), core::mem::transmute_copy(&transform), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&outlinethreshold), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&renderingparams), core::mem::transmute_copy(&renderingmode), core::mem::transmute_copy(&gridfitmode)).into() } Self { base__: IDWriteFontFace1_Vtbl::new::(), @@ -4906,9 +4906,9 @@ pub trait IDWriteFontFace3_Impl: IDWriteFontFace2_Impl { fn GetStyle(&self) -> DWRITE_FONT_STYLE; fn GetFamilyNames(&self) -> windows_core::Result; fn GetFaceNames(&self) -> windows_core::Result; - fn GetInformationalStrings(&self, informationalstringid: DWRITE_INFORMATIONAL_STRING_ID, informationalstrings: *mut Option, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn GetInformationalStrings(&self, informationalstringid: DWRITE_INFORMATIONAL_STRING_ID, informationalstrings: windows_core::OutRef<'_, IDWriteLocalizedStrings>, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn HasCharacter(&self, unicodevalue: u32) -> super::super::Foundation::BOOL; - fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: *const DWRITE_MATRIX, issideways: super::super::Foundation::BOOL, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: Option<&IDWriteRenderingParams>, renderingmode: *mut DWRITE_RENDERING_MODE1, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::Result<()>; + fn GetRecommendedRenderingMode(&self, fontemsize: f32, dpix: f32, dpiy: f32, transform: *const DWRITE_MATRIX, issideways: super::super::Foundation::BOOL, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: windows_core::Ref<'_, IDWriteRenderingParams>, renderingmode: *mut DWRITE_RENDERING_MODE1, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::Result<()>; fn IsCharacterLocal(&self, unicodevalue: u32) -> super::super::Foundation::BOOL; fn IsGlyphLocal(&self, glyphid: u16) -> super::super::Foundation::BOOL; fn AreCharactersLocal(&self, characters: &windows_core::PCWSTR, charactercount: u32, enqueueifnotlocal: super::super::Foundation::BOOL) -> windows_core::Result; @@ -4973,7 +4973,7 @@ impl IDWriteFontFace3_Vtbl { } unsafe extern "system" fn GetRecommendedRenderingMode(this: *mut core::ffi::c_void, fontemsize: f32, dpix: f32, dpiy: f32, transform: *const DWRITE_MATRIX, issideways: super::super::Foundation::BOOL, outlinethreshold: DWRITE_OUTLINE_THRESHOLD, measuringmode: DWRITE_MEASURING_MODE, renderingparams: *mut core::ffi::c_void, renderingmode: *mut DWRITE_RENDERING_MODE1, gridfitmode: *mut DWRITE_GRID_FIT_MODE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontFace3_Impl::GetRecommendedRenderingMode(this, core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy), core::mem::transmute_copy(&transform), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&outlinethreshold), core::mem::transmute_copy(&measuringmode), windows_core::from_raw_borrowed(&renderingparams), core::mem::transmute_copy(&renderingmode), core::mem::transmute_copy(&gridfitmode)).into() + IDWriteFontFace3_Impl::GetRecommendedRenderingMode(this, core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy), core::mem::transmute_copy(&transform), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&outlinethreshold), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&renderingparams), core::mem::transmute_copy(&renderingmode), core::mem::transmute_copy(&gridfitmode)).into() } unsafe extern "system" fn IsCharacterLocal(this: *mut core::ffi::c_void, unicodevalue: u32) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5160,7 +5160,7 @@ pub trait IDWriteFontFace5_Impl: IDWriteFontFace4_Impl { fn GetFontAxisValues(&self, fontaxisvalues: *mut DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32) -> windows_core::Result<()>; fn HasVariations(&self) -> super::super::Foundation::BOOL; fn GetFontResource(&self) -> windows_core::Result; - fn Equals(&self, fontface: Option<&IDWriteFontFace>) -> super::super::Foundation::BOOL; + fn Equals(&self, fontface: windows_core::Ref<'_, IDWriteFontFace>) -> super::super::Foundation::BOOL; } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] impl IDWriteFontFace5_Vtbl { @@ -5189,7 +5189,7 @@ impl IDWriteFontFace5_Vtbl { } unsafe extern "system" fn Equals(this: *mut core::ffi::c_void, fontface: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontFace5_Impl::Equals(this, windows_core::from_raw_borrowed(&fontface)) + IDWriteFontFace5_Impl::Equals(this, core::mem::transmute_copy(&fontface)) } Self { base__: IDWriteFontFace4_Vtbl::new::(), @@ -5413,7 +5413,7 @@ pub struct IDWriteFontFaceReference_Vtbl { pub trait IDWriteFontFaceReference_Impl: windows_core::IUnknownImpl { fn CreateFontFace(&self) -> windows_core::Result; fn CreateFontFaceWithSimulations(&self, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> windows_core::Result; - fn Equals(&self, fontfacereference: Option<&IDWriteFontFaceReference>) -> super::super::Foundation::BOOL; + fn Equals(&self, fontfacereference: windows_core::Ref<'_, IDWriteFontFaceReference>) -> super::super::Foundation::BOOL; fn GetFontFaceIndex(&self) -> u32; fn GetSimulations(&self) -> DWRITE_FONT_SIMULATIONS; fn GetFontFile(&self) -> windows_core::Result; @@ -5450,7 +5450,7 @@ impl IDWriteFontFaceReference_Vtbl { } unsafe extern "system" fn Equals(this: *mut core::ffi::c_void, fontfacereference: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontFaceReference_Impl::Equals(this, windows_core::from_raw_borrowed(&fontfacereference)) + IDWriteFontFaceReference_Impl::Equals(this, core::mem::transmute_copy(&fontfacereference)) } unsafe extern "system" fn GetFontFaceIndex(this: *mut core::ffi::c_void) -> u32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5617,13 +5617,13 @@ pub struct IDWriteFontFallback_Vtbl { pub MapCharacters: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32, *mut core::ffi::c_void, windows_core::PCWSTR, DWRITE_FONT_WEIGHT, DWRITE_FONT_STYLE, DWRITE_FONT_STRETCH, *mut u32, *mut *mut core::ffi::c_void, *mut f32) -> windows_core::HRESULT, } pub trait IDWriteFontFallback_Impl: windows_core::IUnknownImpl { - fn MapCharacters(&self, analysissource: Option<&IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, basefontcollection: Option<&IDWriteFontCollection>, basefamilyname: &windows_core::PCWSTR, baseweight: DWRITE_FONT_WEIGHT, basestyle: DWRITE_FONT_STYLE, basestretch: DWRITE_FONT_STRETCH, mappedlength: *mut u32, mappedfont: *mut Option, scale: *mut f32) -> windows_core::Result<()>; + fn MapCharacters(&self, analysissource: windows_core::Ref<'_, IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, basefontcollection: windows_core::Ref<'_, IDWriteFontCollection>, basefamilyname: &windows_core::PCWSTR, baseweight: DWRITE_FONT_WEIGHT, basestyle: DWRITE_FONT_STYLE, basestretch: DWRITE_FONT_STRETCH, mappedlength: *mut u32, mappedfont: windows_core::OutRef<'_, IDWriteFont>, scale: *mut f32) -> windows_core::Result<()>; } impl IDWriteFontFallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn MapCharacters(this: *mut core::ffi::c_void, analysissource: *mut core::ffi::c_void, textposition: u32, textlength: u32, basefontcollection: *mut core::ffi::c_void, basefamilyname: windows_core::PCWSTR, baseweight: DWRITE_FONT_WEIGHT, basestyle: DWRITE_FONT_STYLE, basestretch: DWRITE_FONT_STRETCH, mappedlength: *mut u32, mappedfont: *mut *mut core::ffi::c_void, scale: *mut f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontFallback_Impl::MapCharacters(this, windows_core::from_raw_borrowed(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&basefontcollection), core::mem::transmute(&basefamilyname), core::mem::transmute_copy(&baseweight), core::mem::transmute_copy(&basestyle), core::mem::transmute_copy(&basestretch), core::mem::transmute_copy(&mappedlength), core::mem::transmute_copy(&mappedfont), core::mem::transmute_copy(&scale)).into() + IDWriteFontFallback_Impl::MapCharacters(this, core::mem::transmute_copy(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&basefontcollection), core::mem::transmute(&basefamilyname), core::mem::transmute_copy(&baseweight), core::mem::transmute_copy(&basestyle), core::mem::transmute_copy(&basestretch), core::mem::transmute_copy(&mappedlength), core::mem::transmute_copy(&mappedfont), core::mem::transmute_copy(&scale)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), MapCharacters: MapCharacters:: } } @@ -5658,13 +5658,13 @@ pub struct IDWriteFontFallback1_Vtbl { pub MapCharacters: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32, *mut core::ffi::c_void, windows_core::PCWSTR, *const DWRITE_FONT_AXIS_VALUE, u32, *mut u32, *mut f32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDWriteFontFallback1_Impl: IDWriteFontFallback_Impl { - fn MapCharacters(&self, analysissource: Option<&IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, basefontcollection: Option<&IDWriteFontCollection>, basefamilyname: &windows_core::PCWSTR, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, mappedlength: *mut u32, scale: *mut f32, mappedfontface: *mut Option) -> windows_core::Result<()>; + fn MapCharacters(&self, analysissource: windows_core::Ref<'_, IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, basefontcollection: windows_core::Ref<'_, IDWriteFontCollection>, basefamilyname: &windows_core::PCWSTR, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, mappedlength: *mut u32, scale: *mut f32, mappedfontface: windows_core::OutRef<'_, IDWriteFontFace5>) -> windows_core::Result<()>; } impl IDWriteFontFallback1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn MapCharacters(this: *mut core::ffi::c_void, analysissource: *mut core::ffi::c_void, textposition: u32, textlength: u32, basefontcollection: *mut core::ffi::c_void, basefamilyname: windows_core::PCWSTR, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, mappedlength: *mut u32, scale: *mut f32, mappedfontface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontFallback1_Impl::MapCharacters(this, windows_core::from_raw_borrowed(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&basefontcollection), core::mem::transmute(&basefamilyname), core::mem::transmute_copy(&fontaxisvalues), core::mem::transmute_copy(&fontaxisvaluecount), core::mem::transmute_copy(&mappedlength), core::mem::transmute_copy(&scale), core::mem::transmute_copy(&mappedfontface)).into() + IDWriteFontFallback1_Impl::MapCharacters(this, core::mem::transmute_copy(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&basefontcollection), core::mem::transmute(&basefamilyname), core::mem::transmute_copy(&fontaxisvalues), core::mem::transmute_copy(&fontaxisvaluecount), core::mem::transmute_copy(&mappedlength), core::mem::transmute_copy(&scale), core::mem::transmute_copy(&mappedfontface)).into() } Self { base__: IDWriteFontFallback_Vtbl::new::(), MapCharacters: MapCharacters:: } } @@ -5705,19 +5705,19 @@ pub struct IDWriteFontFallbackBuilder_Vtbl { pub CreateFontFallback: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDWriteFontFallbackBuilder_Impl: windows_core::IUnknownImpl { - fn AddMapping(&self, ranges: *const DWRITE_UNICODE_RANGE, rangescount: u32, targetfamilynames: *const *const u16, targetfamilynamescount: u32, fontcollection: Option<&IDWriteFontCollection>, localename: &windows_core::PCWSTR, basefamilyname: &windows_core::PCWSTR, scale: f32) -> windows_core::Result<()>; - fn AddMappings(&self, fontfallback: Option<&IDWriteFontFallback>) -> windows_core::Result<()>; + fn AddMapping(&self, ranges: *const DWRITE_UNICODE_RANGE, rangescount: u32, targetfamilynames: *const *const u16, targetfamilynamescount: u32, fontcollection: windows_core::Ref<'_, IDWriteFontCollection>, localename: &windows_core::PCWSTR, basefamilyname: &windows_core::PCWSTR, scale: f32) -> windows_core::Result<()>; + fn AddMappings(&self, fontfallback: windows_core::Ref<'_, IDWriteFontFallback>) -> windows_core::Result<()>; fn CreateFontFallback(&self) -> windows_core::Result; } impl IDWriteFontFallbackBuilder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddMapping(this: *mut core::ffi::c_void, ranges: *const DWRITE_UNICODE_RANGE, rangescount: u32, targetfamilynames: *const *const u16, targetfamilynamescount: u32, fontcollection: *mut core::ffi::c_void, localename: windows_core::PCWSTR, basefamilyname: windows_core::PCWSTR, scale: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontFallbackBuilder_Impl::AddMapping(this, core::mem::transmute_copy(&ranges), core::mem::transmute_copy(&rangescount), core::mem::transmute_copy(&targetfamilynames), core::mem::transmute_copy(&targetfamilynamescount), windows_core::from_raw_borrowed(&fontcollection), core::mem::transmute(&localename), core::mem::transmute(&basefamilyname), core::mem::transmute_copy(&scale)).into() + IDWriteFontFallbackBuilder_Impl::AddMapping(this, core::mem::transmute_copy(&ranges), core::mem::transmute_copy(&rangescount), core::mem::transmute_copy(&targetfamilynames), core::mem::transmute_copy(&targetfamilynamescount), core::mem::transmute_copy(&fontcollection), core::mem::transmute(&localename), core::mem::transmute(&basefamilyname), core::mem::transmute_copy(&scale)).into() } unsafe extern "system" fn AddMappings(this: *mut core::ffi::c_void, fontfallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontFallbackBuilder_Impl::AddMappings(this, windows_core::from_raw_borrowed(&fontfallback)).into() + IDWriteFontFallbackBuilder_Impl::AddMappings(this, core::mem::transmute_copy(&fontfallback)).into() } unsafe extern "system" fn CreateFontFallback(this: *mut core::ffi::c_void, fontfallback: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6442,7 +6442,7 @@ pub trait IDWriteFontResource_Impl: windows_core::IUnknownImpl { fn GetFontAxisAttributes(&self, axisindex: u32) -> DWRITE_FONT_AXIS_ATTRIBUTES; fn GetAxisNames(&self, axisindex: u32) -> windows_core::Result; fn GetAxisValueNameCount(&self, axisindex: u32) -> u32; - fn GetAxisValueNames(&self, axisindex: u32, axisvalueindex: u32, fontaxisrange: *mut DWRITE_FONT_AXIS_RANGE, names: *mut Option) -> windows_core::Result<()>; + fn GetAxisValueNames(&self, axisindex: u32, axisvalueindex: u32, fontaxisrange: *mut DWRITE_FONT_AXIS_RANGE, names: windows_core::OutRef<'_, IDWriteLocalizedStrings>) -> windows_core::Result<()>; fn HasVariations(&self) -> super::super::Foundation::BOOL; fn CreateFontFace(&self, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32) -> windows_core::Result; fn CreateFontFaceReference(&self, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32) -> windows_core::Result; @@ -6613,11 +6613,11 @@ pub struct IDWriteFontSet_Vtbl { pub trait IDWriteFontSet_Impl: windows_core::IUnknownImpl { fn GetFontCount(&self) -> u32; fn GetFontFaceReference(&self, listindex: u32) -> windows_core::Result; - fn FindFontFaceReference(&self, fontfacereference: Option<&IDWriteFontFaceReference>, listindex: *mut u32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn FindFontFace(&self, fontface: Option<&IDWriteFontFace>, listindex: *mut u32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn FindFontFaceReference(&self, fontfacereference: windows_core::Ref<'_, IDWriteFontFaceReference>, listindex: *mut u32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn FindFontFace(&self, fontface: windows_core::Ref<'_, IDWriteFontFace>, listindex: *mut u32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetPropertyValues(&self, propertyid: DWRITE_FONT_PROPERTY_ID) -> windows_core::Result; fn GetPropertyValues2(&self, propertyid: DWRITE_FONT_PROPERTY_ID, preferredlocalenames: &windows_core::PCWSTR) -> windows_core::Result; - fn GetPropertyValues3(&self, listindex: u32, propertyid: DWRITE_FONT_PROPERTY_ID, exists: *mut super::super::Foundation::BOOL, values: *mut Option) -> windows_core::Result<()>; + fn GetPropertyValues3(&self, listindex: u32, propertyid: DWRITE_FONT_PROPERTY_ID, exists: *mut super::super::Foundation::BOOL, values: windows_core::OutRef<'_, IDWriteLocalizedStrings>) -> windows_core::Result<()>; fn GetPropertyOccurrenceCount(&self, property: *const DWRITE_FONT_PROPERTY) -> windows_core::Result; fn GetMatchingFonts(&self, familyname: &windows_core::PCWSTR, fontweight: DWRITE_FONT_WEIGHT, fontstretch: DWRITE_FONT_STRETCH, fontstyle: DWRITE_FONT_STYLE) -> windows_core::Result; fn GetMatchingFonts2(&self, properties: *const DWRITE_FONT_PROPERTY, propertycount: u32) -> windows_core::Result; @@ -6640,11 +6640,11 @@ impl IDWriteFontSet_Vtbl { } unsafe extern "system" fn FindFontFaceReference(this: *mut core::ffi::c_void, fontfacereference: *mut core::ffi::c_void, listindex: *mut u32, exists: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontSet_Impl::FindFontFaceReference(this, windows_core::from_raw_borrowed(&fontfacereference), core::mem::transmute_copy(&listindex), core::mem::transmute_copy(&exists)).into() + IDWriteFontSet_Impl::FindFontFaceReference(this, core::mem::transmute_copy(&fontfacereference), core::mem::transmute_copy(&listindex), core::mem::transmute_copy(&exists)).into() } unsafe extern "system" fn FindFontFace(this: *mut core::ffi::c_void, fontface: *mut core::ffi::c_void, listindex: *mut u32, exists: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontSet_Impl::FindFontFace(this, windows_core::from_raw_borrowed(&fontface), core::mem::transmute_copy(&listindex), core::mem::transmute_copy(&exists)).into() + IDWriteFontSet_Impl::FindFontFace(this, core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&listindex), core::mem::transmute_copy(&exists)).into() } unsafe extern "system" fn GetPropertyValues(this: *mut core::ffi::c_void, propertyid: DWRITE_FONT_PROPERTY_ID, values: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7125,24 +7125,24 @@ pub struct IDWriteFontSetBuilder_Vtbl { pub CreateFontSet: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDWriteFontSetBuilder_Impl: windows_core::IUnknownImpl { - fn AddFontFaceReference(&self, fontfacereference: Option<&IDWriteFontFaceReference>, properties: *const DWRITE_FONT_PROPERTY, propertycount: u32) -> windows_core::Result<()>; - fn AddFontFaceReference2(&self, fontfacereference: Option<&IDWriteFontFaceReference>) -> windows_core::Result<()>; - fn AddFontSet(&self, fontset: Option<&IDWriteFontSet>) -> windows_core::Result<()>; + fn AddFontFaceReference(&self, fontfacereference: windows_core::Ref<'_, IDWriteFontFaceReference>, properties: *const DWRITE_FONT_PROPERTY, propertycount: u32) -> windows_core::Result<()>; + fn AddFontFaceReference2(&self, fontfacereference: windows_core::Ref<'_, IDWriteFontFaceReference>) -> windows_core::Result<()>; + fn AddFontSet(&self, fontset: windows_core::Ref<'_, IDWriteFontSet>) -> windows_core::Result<()>; fn CreateFontSet(&self) -> windows_core::Result; } impl IDWriteFontSetBuilder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddFontFaceReference(this: *mut core::ffi::c_void, fontfacereference: *mut core::ffi::c_void, properties: *const DWRITE_FONT_PROPERTY, propertycount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontSetBuilder_Impl::AddFontFaceReference(this, windows_core::from_raw_borrowed(&fontfacereference), core::mem::transmute_copy(&properties), core::mem::transmute_copy(&propertycount)).into() + IDWriteFontSetBuilder_Impl::AddFontFaceReference(this, core::mem::transmute_copy(&fontfacereference), core::mem::transmute_copy(&properties), core::mem::transmute_copy(&propertycount)).into() } unsafe extern "system" fn AddFontFaceReference2(this: *mut core::ffi::c_void, fontfacereference: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontSetBuilder_Impl::AddFontFaceReference2(this, windows_core::from_raw_borrowed(&fontfacereference)).into() + IDWriteFontSetBuilder_Impl::AddFontFaceReference2(this, core::mem::transmute_copy(&fontfacereference)).into() } unsafe extern "system" fn AddFontSet(this: *mut core::ffi::c_void, fontset: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontSetBuilder_Impl::AddFontSet(this, windows_core::from_raw_borrowed(&fontset)).into() + IDWriteFontSetBuilder_Impl::AddFontSet(this, core::mem::transmute_copy(&fontset)).into() } unsafe extern "system" fn CreateFontSet(this: *mut core::ffi::c_void, fontset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7191,13 +7191,13 @@ pub struct IDWriteFontSetBuilder1_Vtbl { pub AddFontFile: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDWriteFontSetBuilder1_Impl: IDWriteFontSetBuilder_Impl { - fn AddFontFile(&self, fontfile: Option<&IDWriteFontFile>) -> windows_core::Result<()>; + fn AddFontFile(&self, fontfile: windows_core::Ref<'_, IDWriteFontFile>) -> windows_core::Result<()>; } impl IDWriteFontSetBuilder1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddFontFile(this: *mut core::ffi::c_void, fontfile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontSetBuilder1_Impl::AddFontFile(this, windows_core::from_raw_borrowed(&fontfile)).into() + IDWriteFontSetBuilder1_Impl::AddFontFile(this, core::mem::transmute_copy(&fontfile)).into() } Self { base__: IDWriteFontSetBuilder_Vtbl::new::(), AddFontFile: AddFontFile:: } } @@ -7237,14 +7237,14 @@ pub struct IDWriteFontSetBuilder2_Vtbl { pub AddFontFile: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT, } pub trait IDWriteFontSetBuilder2_Impl: IDWriteFontSetBuilder1_Impl { - fn AddFont(&self, fontfile: Option<&IDWriteFontFile>, fontfaceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, fontaxisranges: *const DWRITE_FONT_AXIS_RANGE, fontaxisrangecount: u32, properties: *const DWRITE_FONT_PROPERTY, propertycount: u32) -> windows_core::Result<()>; + fn AddFont(&self, fontfile: windows_core::Ref<'_, IDWriteFontFile>, fontfaceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, fontaxisranges: *const DWRITE_FONT_AXIS_RANGE, fontaxisrangecount: u32, properties: *const DWRITE_FONT_PROPERTY, propertycount: u32) -> windows_core::Result<()>; fn AddFontFile(&self, filepath: &windows_core::PCWSTR) -> windows_core::Result<()>; } impl IDWriteFontSetBuilder2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddFont(this: *mut core::ffi::c_void, fontfile: *mut core::ffi::c_void, fontfaceindex: u32, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: *const DWRITE_FONT_AXIS_VALUE, fontaxisvaluecount: u32, fontaxisranges: *const DWRITE_FONT_AXIS_RANGE, fontaxisrangecount: u32, properties: *const DWRITE_FONT_PROPERTY, propertycount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteFontSetBuilder2_Impl::AddFont(this, windows_core::from_raw_borrowed(&fontfile), core::mem::transmute_copy(&fontfaceindex), core::mem::transmute_copy(&fontsimulations), core::mem::transmute_copy(&fontaxisvalues), core::mem::transmute_copy(&fontaxisvaluecount), core::mem::transmute_copy(&fontaxisranges), core::mem::transmute_copy(&fontaxisrangecount), core::mem::transmute_copy(&properties), core::mem::transmute_copy(&propertycount)).into() + IDWriteFontSetBuilder2_Impl::AddFont(this, core::mem::transmute_copy(&fontfile), core::mem::transmute_copy(&fontfaceindex), core::mem::transmute_copy(&fontsimulations), core::mem::transmute_copy(&fontaxisvalues), core::mem::transmute_copy(&fontaxisvaluecount), core::mem::transmute_copy(&fontaxisranges), core::mem::transmute_copy(&fontaxisrangecount), core::mem::transmute_copy(&properties), core::mem::transmute_copy(&propertycount)).into() } unsafe extern "system" fn AddFontFile(this: *mut core::ffi::c_void, filepath: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7323,8 +7323,8 @@ pub struct IDWriteGdiInterop_Vtbl { #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDWriteGdiInterop_Impl: windows_core::IUnknownImpl { fn CreateFontFromLOGFONT(&self, logfont: *const super::Gdi::LOGFONTW) -> windows_core::Result; - fn ConvertFontToLOGFONT(&self, font: Option<&IDWriteFont>, logfont: *mut super::Gdi::LOGFONTW, issystemfont: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn ConvertFontFaceToLOGFONT(&self, font: Option<&IDWriteFontFace>, logfont: *mut super::Gdi::LOGFONTW) -> windows_core::Result<()>; + fn ConvertFontToLOGFONT(&self, font: windows_core::Ref<'_, IDWriteFont>, logfont: *mut super::Gdi::LOGFONTW, issystemfont: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn ConvertFontFaceToLOGFONT(&self, font: windows_core::Ref<'_, IDWriteFontFace>, logfont: *mut super::Gdi::LOGFONTW) -> windows_core::Result<()>; fn CreateFontFaceFromHdc(&self, hdc: super::Gdi::HDC) -> windows_core::Result; fn CreateBitmapRenderTarget(&self, hdc: super::Gdi::HDC, width: u32, height: u32) -> windows_core::Result; } @@ -7343,11 +7343,11 @@ impl IDWriteGdiInterop_Vtbl { } unsafe extern "system" fn ConvertFontToLOGFONT(this: *mut core::ffi::c_void, font: *mut core::ffi::c_void, logfont: *mut super::Gdi::LOGFONTW, issystemfont: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteGdiInterop_Impl::ConvertFontToLOGFONT(this, windows_core::from_raw_borrowed(&font), core::mem::transmute_copy(&logfont), core::mem::transmute_copy(&issystemfont)).into() + IDWriteGdiInterop_Impl::ConvertFontToLOGFONT(this, core::mem::transmute_copy(&font), core::mem::transmute_copy(&logfont), core::mem::transmute_copy(&issystemfont)).into() } unsafe extern "system" fn ConvertFontFaceToLOGFONT(this: *mut core::ffi::c_void, font: *mut core::ffi::c_void, logfont: *mut super::Gdi::LOGFONTW) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteGdiInterop_Impl::ConvertFontFaceToLOGFONT(this, windows_core::from_raw_borrowed(&font), core::mem::transmute_copy(&logfont)).into() + IDWriteGdiInterop_Impl::ConvertFontFaceToLOGFONT(this, core::mem::transmute_copy(&font), core::mem::transmute_copy(&logfont)).into() } unsafe extern "system" fn CreateFontFaceFromHdc(this: *mut core::ffi::c_void, hdc: super::Gdi::HDC, fontface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7450,17 +7450,17 @@ pub struct IDWriteGdiInterop1_Vtbl { } #[cfg(all(feature = "Win32_Globalization", feature = "Win32_Graphics_Gdi"))] pub trait IDWriteGdiInterop1_Impl: IDWriteGdiInterop_Impl { - fn CreateFontFromLOGFONT(&self, logfont: *const super::Gdi::LOGFONTW, fontcollection: Option<&IDWriteFontCollection>) -> windows_core::Result; - fn GetFontSignature(&self, fontface: Option<&IDWriteFontFace>, fontsignature: *mut super::super::Globalization::FONTSIGNATURE) -> windows_core::Result<()>; - fn GetFontSignature2(&self, font: Option<&IDWriteFont>, fontsignature: *mut super::super::Globalization::FONTSIGNATURE) -> windows_core::Result<()>; - fn GetMatchingFontsByLOGFONT(&self, logfont: *const super::Gdi::LOGFONTA, fontset: Option<&IDWriteFontSet>) -> windows_core::Result; + fn CreateFontFromLOGFONT(&self, logfont: *const super::Gdi::LOGFONTW, fontcollection: windows_core::Ref<'_, IDWriteFontCollection>) -> windows_core::Result; + fn GetFontSignature(&self, fontface: windows_core::Ref<'_, IDWriteFontFace>, fontsignature: *mut super::super::Globalization::FONTSIGNATURE) -> windows_core::Result<()>; + fn GetFontSignature2(&self, font: windows_core::Ref<'_, IDWriteFont>, fontsignature: *mut super::super::Globalization::FONTSIGNATURE) -> windows_core::Result<()>; + fn GetMatchingFontsByLOGFONT(&self, logfont: *const super::Gdi::LOGFONTA, fontset: windows_core::Ref<'_, IDWriteFontSet>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Globalization", feature = "Win32_Graphics_Gdi"))] impl IDWriteGdiInterop1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFontFromLOGFONT(this: *mut core::ffi::c_void, logfont: *const super::Gdi::LOGFONTW, fontcollection: *mut core::ffi::c_void, font: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteGdiInterop1_Impl::CreateFontFromLOGFONT(this, core::mem::transmute_copy(&logfont), windows_core::from_raw_borrowed(&fontcollection)) { + match IDWriteGdiInterop1_Impl::CreateFontFromLOGFONT(this, core::mem::transmute_copy(&logfont), core::mem::transmute_copy(&fontcollection)) { Ok(ok__) => { font.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7470,15 +7470,15 @@ impl IDWriteGdiInterop1_Vtbl { } unsafe extern "system" fn GetFontSignature(this: *mut core::ffi::c_void, fontface: *mut core::ffi::c_void, fontsignature: *mut super::super::Globalization::FONTSIGNATURE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteGdiInterop1_Impl::GetFontSignature(this, windows_core::from_raw_borrowed(&fontface), core::mem::transmute_copy(&fontsignature)).into() + IDWriteGdiInterop1_Impl::GetFontSignature(this, core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&fontsignature)).into() } unsafe extern "system" fn GetFontSignature2(this: *mut core::ffi::c_void, font: *mut core::ffi::c_void, fontsignature: *mut super::super::Globalization::FONTSIGNATURE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteGdiInterop1_Impl::GetFontSignature2(this, windows_core::from_raw_borrowed(&font), core::mem::transmute_copy(&fontsignature)).into() + IDWriteGdiInterop1_Impl::GetFontSignature2(this, core::mem::transmute_copy(&font), core::mem::transmute_copy(&fontsignature)).into() } unsafe extern "system" fn GetMatchingFontsByLOGFONT(this: *mut core::ffi::c_void, logfont: *const super::Gdi::LOGFONTA, fontset: *mut core::ffi::c_void, filteredset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteGdiInterop1_Impl::GetMatchingFontsByLOGFONT(this, core::mem::transmute_copy(&logfont), windows_core::from_raw_borrowed(&fontset)) { + match IDWriteGdiInterop1_Impl::GetMatchingFontsByLOGFONT(this, core::mem::transmute_copy(&logfont), core::mem::transmute_copy(&fontset)) { Ok(ok__) => { filteredset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7531,7 +7531,7 @@ pub struct IDWriteGlyphRunAnalysis_Vtbl { pub trait IDWriteGlyphRunAnalysis_Impl: windows_core::IUnknownImpl { fn GetAlphaTextureBounds(&self, texturetype: DWRITE_TEXTURE_TYPE) -> windows_core::Result; fn CreateAlphaTexture(&self, texturetype: DWRITE_TEXTURE_TYPE, texturebounds: *const super::super::Foundation::RECT, alphavalues: *mut u8, buffersize: u32) -> windows_core::Result<()>; - fn GetAlphaBlendParams(&self, renderingparams: Option<&IDWriteRenderingParams>, blendgamma: *mut f32, blendenhancedcontrast: *mut f32, blendcleartypelevel: *mut f32) -> windows_core::Result<()>; + fn GetAlphaBlendParams(&self, renderingparams: windows_core::Ref<'_, IDWriteRenderingParams>, blendgamma: *mut f32, blendenhancedcontrast: *mut f32, blendcleartypelevel: *mut f32) -> windows_core::Result<()>; } impl IDWriteGlyphRunAnalysis_Vtbl { pub const fn new() -> Self { @@ -7551,7 +7551,7 @@ impl IDWriteGlyphRunAnalysis_Vtbl { } unsafe extern "system" fn GetAlphaBlendParams(this: *mut core::ffi::c_void, renderingparams: *mut core::ffi::c_void, blendgamma: *mut f32, blendenhancedcontrast: *mut f32, blendcleartypelevel: *mut f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteGlyphRunAnalysis_Impl::GetAlphaBlendParams(this, windows_core::from_raw_borrowed(&renderingparams), core::mem::transmute_copy(&blendgamma), core::mem::transmute_copy(&blendenhancedcontrast), core::mem::transmute_copy(&blendcleartypelevel)).into() + IDWriteGlyphRunAnalysis_Impl::GetAlphaBlendParams(this, core::mem::transmute_copy(&renderingparams), core::mem::transmute_copy(&blendgamma), core::mem::transmute_copy(&blendenhancedcontrast), core::mem::transmute_copy(&blendcleartypelevel)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7595,14 +7595,14 @@ pub struct IDWriteInMemoryFontFileLoader_Vtbl { pub GetFileCount: unsafe extern "system" fn(*mut core::ffi::c_void) -> u32, } pub trait IDWriteInMemoryFontFileLoader_Impl: IDWriteFontFileLoader_Impl { - fn CreateInMemoryFontFileReference(&self, factory: Option<&IDWriteFactory>, fontdata: *const core::ffi::c_void, fontdatasize: u32, ownerobject: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateInMemoryFontFileReference(&self, factory: windows_core::Ref<'_, IDWriteFactory>, fontdata: *const core::ffi::c_void, fontdatasize: u32, ownerobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn GetFileCount(&self) -> u32; } impl IDWriteInMemoryFontFileLoader_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateInMemoryFontFileReference(this: *mut core::ffi::c_void, factory: *mut core::ffi::c_void, fontdata: *const core::ffi::c_void, fontdatasize: u32, ownerobject: *mut core::ffi::c_void, fontfile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteInMemoryFontFileLoader_Impl::CreateInMemoryFontFileReference(this, windows_core::from_raw_borrowed(&factory), core::mem::transmute_copy(&fontdata), core::mem::transmute_copy(&fontdatasize), windows_core::from_raw_borrowed(&ownerobject)) { + match IDWriteInMemoryFontFileLoader_Impl::CreateInMemoryFontFileReference(this, core::mem::transmute_copy(&factory), core::mem::transmute_copy(&fontdata), core::mem::transmute_copy(&fontdatasize), core::mem::transmute_copy(&ownerobject)) { Ok(ok__) => { fontfile.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7658,7 +7658,7 @@ pub struct IDWriteInlineObject_Vtbl { pub GetBreakConditions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DWRITE_BREAK_CONDITION, *mut DWRITE_BREAK_CONDITION) -> windows_core::HRESULT, } pub trait IDWriteInlineObject_Impl: windows_core::IUnknownImpl { - fn Draw(&self, clientdrawingcontext: *const core::ffi::c_void, renderer: Option<&IDWriteTextRenderer>, originx: f32, originy: f32, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, clientdrawingeffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Draw(&self, clientdrawingcontext: *const core::ffi::c_void, renderer: windows_core::Ref<'_, IDWriteTextRenderer>, originx: f32, originy: f32, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, clientdrawingeffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetMetrics(&self) -> windows_core::Result; fn GetOverhangMetrics(&self) -> windows_core::Result; fn GetBreakConditions(&self, breakconditionbefore: *mut DWRITE_BREAK_CONDITION, breakconditionafter: *mut DWRITE_BREAK_CONDITION) -> windows_core::Result<()>; @@ -7667,7 +7667,7 @@ impl IDWriteInlineObject_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Draw(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, renderer: *mut core::ffi::c_void, originx: f32, originy: f32, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, clientdrawingeffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteInlineObject_Impl::Draw(this, core::mem::transmute_copy(&clientdrawingcontext), windows_core::from_raw_borrowed(&renderer), core::mem::transmute_copy(&originx), core::mem::transmute_copy(&originy), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), windows_core::from_raw_borrowed(&clientdrawingeffect)).into() + IDWriteInlineObject_Impl::Draw(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&renderer), core::mem::transmute_copy(&originx), core::mem::transmute_copy(&originy), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), core::mem::transmute_copy(&clientdrawingeffect)).into() } unsafe extern "system" fn GetMetrics(this: *mut core::ffi::c_void, metrics: *mut DWRITE_INLINE_OBJECT_METRICS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8137,7 +8137,7 @@ pub struct IDWriteRemoteFontFileLoader_Vtbl { pub trait IDWriteRemoteFontFileLoader_Impl: IDWriteFontFileLoader_Impl { fn CreateRemoteStreamFromKey(&self, fontfilereferencekey: *const core::ffi::c_void, fontfilereferencekeysize: u32) -> windows_core::Result; fn GetLocalityFromKey(&self, fontfilereferencekey: *const core::ffi::c_void, fontfilereferencekeysize: u32) -> windows_core::Result; - fn CreateFontFileReferenceFromUrl(&self, factory: Option<&IDWriteFactory>, baseurl: &windows_core::PCWSTR, fontfileurl: &windows_core::PCWSTR) -> windows_core::Result; + fn CreateFontFileReferenceFromUrl(&self, factory: windows_core::Ref<'_, IDWriteFactory>, baseurl: &windows_core::PCWSTR, fontfileurl: &windows_core::PCWSTR) -> windows_core::Result; } impl IDWriteRemoteFontFileLoader_Vtbl { pub const fn new() -> Self { @@ -8163,7 +8163,7 @@ impl IDWriteRemoteFontFileLoader_Vtbl { } unsafe extern "system" fn CreateFontFileReferenceFromUrl(this: *mut core::ffi::c_void, factory: *mut core::ffi::c_void, baseurl: windows_core::PCWSTR, fontfileurl: windows_core::PCWSTR, fontfile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteRemoteFontFileLoader_Impl::CreateFontFileReferenceFromUrl(this, windows_core::from_raw_borrowed(&factory), core::mem::transmute(&baseurl), core::mem::transmute(&fontfileurl)) { + match IDWriteRemoteFontFileLoader_Impl::CreateFontFileReferenceFromUrl(this, core::mem::transmute_copy(&factory), core::mem::transmute(&baseurl), core::mem::transmute(&fontfileurl)) { Ok(ok__) => { fontfile.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8567,7 +8567,7 @@ pub trait IDWriteTextAnalysisSink_Impl: windows_core::IUnknownImpl { fn SetScriptAnalysis(&self, textposition: u32, textlength: u32, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS) -> windows_core::Result<()>; fn SetLineBreakpoints(&self, textposition: u32, textlength: u32, linebreakpoints: *const DWRITE_LINE_BREAKPOINT) -> windows_core::Result<()>; fn SetBidiLevel(&self, textposition: u32, textlength: u32, explicitlevel: u8, resolvedlevel: u8) -> windows_core::Result<()>; - fn SetNumberSubstitution(&self, textposition: u32, textlength: u32, numbersubstitution: Option<&IDWriteNumberSubstitution>) -> windows_core::Result<()>; + fn SetNumberSubstitution(&self, textposition: u32, textlength: u32, numbersubstitution: windows_core::Ref<'_, IDWriteNumberSubstitution>) -> windows_core::Result<()>; } impl IDWriteTextAnalysisSink_Vtbl { pub const fn new() -> Self { @@ -8585,7 +8585,7 @@ impl IDWriteTextAnalysisSink_Vtbl { } unsafe extern "system" fn SetNumberSubstitution(this: *mut core::ffi::c_void, textposition: u32, textlength: u32, numbersubstitution: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextAnalysisSink_Impl::SetNumberSubstitution(this, core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&numbersubstitution)).into() + IDWriteTextAnalysisSink_Impl::SetNumberSubstitution(this, core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&numbersubstitution)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -8671,7 +8671,7 @@ pub trait IDWriteTextAnalysisSource_Impl: windows_core::IUnknownImpl { fn GetTextBeforePosition(&self, textposition: u32, textstring: *mut *mut u16, textlength: *mut u32) -> windows_core::Result<()>; fn GetParagraphReadingDirection(&self) -> DWRITE_READING_DIRECTION; fn GetLocaleName(&self, textposition: u32, textlength: *mut u32, localename: *mut *mut u16) -> windows_core::Result<()>; - fn GetNumberSubstitution(&self, textposition: u32, textlength: *mut u32, numbersubstitution: *mut Option) -> windows_core::Result<()>; + fn GetNumberSubstitution(&self, textposition: u32, textlength: *mut u32, numbersubstitution: windows_core::OutRef<'_, IDWriteNumberSubstitution>) -> windows_core::Result<()>; } impl IDWriteTextAnalysisSource_Vtbl { pub const fn new() -> Self { @@ -8881,31 +8881,54 @@ pub struct IDWriteTextAnalyzer_Vtbl { pub GetGdiCompatibleGlyphPlacements: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *const u16, *const DWRITE_SHAPING_TEXT_PROPERTIES, u32, *const u16, *const DWRITE_SHAPING_GLYPH_PROPERTIES, u32, *mut core::ffi::c_void, f32, f32, *const DWRITE_MATRIX, super::super::Foundation::BOOL, super::super::Foundation::BOOL, super::super::Foundation::BOOL, *const DWRITE_SCRIPT_ANALYSIS, windows_core::PCWSTR, *const *const DWRITE_TYPOGRAPHIC_FEATURES, *const u32, u32, *mut f32, *mut DWRITE_GLYPH_OFFSET) -> windows_core::HRESULT, } pub trait IDWriteTextAnalyzer_Impl: windows_core::IUnknownImpl { - fn AnalyzeScript(&self, analysissource: Option<&IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, analysissink: Option<&IDWriteTextAnalysisSink>) -> windows_core::Result<()>; - fn AnalyzeBidi(&self, analysissource: Option<&IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, analysissink: Option<&IDWriteTextAnalysisSink>) -> windows_core::Result<()>; - fn AnalyzeNumberSubstitution(&self, analysissource: Option<&IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, analysissink: Option<&IDWriteTextAnalysisSink>) -> windows_core::Result<()>; - fn AnalyzeLineBreakpoints(&self, analysissource: Option<&IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, analysissink: Option<&IDWriteTextAnalysisSink>) -> windows_core::Result<()>; - fn GetGlyphs(&self, textstring: &windows_core::PCWSTR, textlength: u32, fontface: Option<&IDWriteFontFace>, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, numbersubstitution: Option<&IDWriteNumberSubstitution>, features: *const *const DWRITE_TYPOGRAPHIC_FEATURES, featurerangelengths: *const u32, featureranges: u32, maxglyphcount: u32, clustermap: *mut u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, glyphindices: *mut u16, glyphprops: *mut DWRITE_SHAPING_GLYPH_PROPERTIES, actualglyphcount: *mut u32) -> windows_core::Result<()>; - fn GetGlyphPlacements(&self, textstring: &windows_core::PCWSTR, clustermap: *const u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: Option<&IDWriteFontFace>, fontemsize: f32, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, features: *const *const DWRITE_TYPOGRAPHIC_FEATURES, featurerangelengths: *const u32, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()>; - fn GetGdiCompatibleGlyphPlacements(&self, textstring: &windows_core::PCWSTR, clustermap: *const u16, textprops: *const DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: Option<&IDWriteFontFace>, fontemsize: f32, pixelsperdip: f32, transform: *const DWRITE_MATRIX, usegdinatural: super::super::Foundation::BOOL, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, features: *const *const DWRITE_TYPOGRAPHIC_FEATURES, featurerangelengths: *const u32, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()>; + fn AnalyzeScript(&self, analysissource: windows_core::Ref<'_, IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, analysissink: windows_core::Ref<'_, IDWriteTextAnalysisSink>) -> windows_core::Result<()>; + fn AnalyzeBidi(&self, analysissource: windows_core::Ref<'_, IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, analysissink: windows_core::Ref<'_, IDWriteTextAnalysisSink>) -> windows_core::Result<()>; + fn AnalyzeNumberSubstitution(&self, analysissource: windows_core::Ref<'_, IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, analysissink: windows_core::Ref<'_, IDWriteTextAnalysisSink>) -> windows_core::Result<()>; + fn AnalyzeLineBreakpoints(&self, analysissource: windows_core::Ref<'_, IDWriteTextAnalysisSource>, textposition: u32, textlength: u32, analysissink: windows_core::Ref<'_, IDWriteTextAnalysisSink>) -> windows_core::Result<()>; + fn GetGlyphs(&self, textstring: &windows_core::PCWSTR, textlength: u32, fontface: windows_core::Ref<'_, IDWriteFontFace>, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, numbersubstitution: windows_core::Ref<'_, IDWriteNumberSubstitution>, features: *const *const DWRITE_TYPOGRAPHIC_FEATURES, featurerangelengths: *const u32, featureranges: u32, maxglyphcount: u32, clustermap: *mut u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, glyphindices: *mut u16, glyphprops: *mut DWRITE_SHAPING_GLYPH_PROPERTIES, actualglyphcount: *mut u32) -> windows_core::Result<()>; + fn GetGlyphPlacements(&self, textstring: &windows_core::PCWSTR, clustermap: *const u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: windows_core::Ref<'_, IDWriteFontFace>, fontemsize: f32, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, features: *const *const DWRITE_TYPOGRAPHIC_FEATURES, featurerangelengths: *const u32, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()>; + fn GetGdiCompatibleGlyphPlacements( + &self, + textstring: &windows_core::PCWSTR, + clustermap: *const u16, + textprops: *const DWRITE_SHAPING_TEXT_PROPERTIES, + textlength: u32, + glyphindices: *const u16, + glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, + glyphcount: u32, + fontface: windows_core::Ref<'_, IDWriteFontFace>, + fontemsize: f32, + pixelsperdip: f32, + transform: *const DWRITE_MATRIX, + usegdinatural: super::super::Foundation::BOOL, + issideways: super::super::Foundation::BOOL, + isrighttoleft: super::super::Foundation::BOOL, + scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, + localename: &windows_core::PCWSTR, + features: *const *const DWRITE_TYPOGRAPHIC_FEATURES, + featurerangelengths: *const u32, + featureranges: u32, + glyphadvances: *mut f32, + glyphoffsets: *mut DWRITE_GLYPH_OFFSET, + ) -> windows_core::Result<()>; } impl IDWriteTextAnalyzer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AnalyzeScript(this: *mut core::ffi::c_void, analysissource: *mut core::ffi::c_void, textposition: u32, textlength: u32, analysissink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextAnalyzer_Impl::AnalyzeScript(this, windows_core::from_raw_borrowed(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&analysissink)).into() + IDWriteTextAnalyzer_Impl::AnalyzeScript(this, core::mem::transmute_copy(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&analysissink)).into() } unsafe extern "system" fn AnalyzeBidi(this: *mut core::ffi::c_void, analysissource: *mut core::ffi::c_void, textposition: u32, textlength: u32, analysissink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextAnalyzer_Impl::AnalyzeBidi(this, windows_core::from_raw_borrowed(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&analysissink)).into() + IDWriteTextAnalyzer_Impl::AnalyzeBidi(this, core::mem::transmute_copy(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&analysissink)).into() } unsafe extern "system" fn AnalyzeNumberSubstitution(this: *mut core::ffi::c_void, analysissource: *mut core::ffi::c_void, textposition: u32, textlength: u32, analysissink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextAnalyzer_Impl::AnalyzeNumberSubstitution(this, windows_core::from_raw_borrowed(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&analysissink)).into() + IDWriteTextAnalyzer_Impl::AnalyzeNumberSubstitution(this, core::mem::transmute_copy(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&analysissink)).into() } unsafe extern "system" fn AnalyzeLineBreakpoints(this: *mut core::ffi::c_void, analysissource: *mut core::ffi::c_void, textposition: u32, textlength: u32, analysissink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextAnalyzer_Impl::AnalyzeLineBreakpoints(this, windows_core::from_raw_borrowed(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&analysissink)).into() + IDWriteTextAnalyzer_Impl::AnalyzeLineBreakpoints(this, core::mem::transmute_copy(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&analysissink)).into() } unsafe extern "system" fn GetGlyphs(this: *mut core::ffi::c_void, textstring: windows_core::PCWSTR, textlength: u32, fontface: *mut core::ffi::c_void, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: windows_core::PCWSTR, numbersubstitution: *mut core::ffi::c_void, features: *const *const DWRITE_TYPOGRAPHIC_FEATURES, featurerangelengths: *const u32, featureranges: u32, maxglyphcount: u32, clustermap: *mut u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, glyphindices: *mut u16, glyphprops: *mut DWRITE_SHAPING_GLYPH_PROPERTIES, actualglyphcount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8913,12 +8936,12 @@ impl IDWriteTextAnalyzer_Vtbl { this, core::mem::transmute(&textstring), core::mem::transmute_copy(&textlength), - windows_core::from_raw_borrowed(&fontface), + core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), core::mem::transmute_copy(&scriptanalysis), core::mem::transmute(&localename), - windows_core::from_raw_borrowed(&numbersubstitution), + core::mem::transmute_copy(&numbersubstitution), core::mem::transmute_copy(&features), core::mem::transmute_copy(&featurerangelengths), core::mem::transmute_copy(&featureranges), @@ -8942,7 +8965,7 @@ impl IDWriteTextAnalyzer_Vtbl { core::mem::transmute_copy(&glyphindices), core::mem::transmute_copy(&glyphprops), core::mem::transmute_copy(&glyphcount), - windows_core::from_raw_borrowed(&fontface), + core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), @@ -8990,7 +9013,7 @@ impl IDWriteTextAnalyzer_Vtbl { core::mem::transmute_copy(&glyphindices), core::mem::transmute_copy(&glyphprops), core::mem::transmute_copy(&glyphcount), - windows_core::from_raw_borrowed(&fontface), + core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&fontemsize), core::mem::transmute_copy(&pixelsperdip), core::mem::transmute_copy(&transform), @@ -9117,14 +9140,14 @@ pub struct IDWriteTextAnalyzer1_Vtbl { } pub trait IDWriteTextAnalyzer1_Impl: IDWriteTextAnalyzer_Impl { fn ApplyCharacterSpacing(&self, leadingspacing: f32, trailingspacing: f32, minimumadvancewidth: f32, textlength: u32, glyphcount: u32, clustermap: *const u16, glyphadvances: *const f32, glyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES, modifiedglyphadvances: *mut f32, modifiedglyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()>; - fn GetBaseline(&self, fontface: Option<&IDWriteFontFace>, baseline: DWRITE_BASELINE, isvertical: super::super::Foundation::BOOL, issimulationallowed: super::super::Foundation::BOOL, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, baselinecoordinate: *mut i32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn AnalyzeVerticalGlyphOrientation(&self, analysissource: Option<&IDWriteTextAnalysisSource1>, textposition: u32, textlength: u32, analysissink: Option<&IDWriteTextAnalysisSink1>) -> windows_core::Result<()>; + fn GetBaseline(&self, fontface: windows_core::Ref<'_, IDWriteFontFace>, baseline: DWRITE_BASELINE, isvertical: super::super::Foundation::BOOL, issimulationallowed: super::super::Foundation::BOOL, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, baselinecoordinate: *mut i32, exists: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn AnalyzeVerticalGlyphOrientation(&self, analysissource: windows_core::Ref<'_, IDWriteTextAnalysisSource1>, textposition: u32, textlength: u32, analysissink: windows_core::Ref<'_, IDWriteTextAnalysisSink1>) -> windows_core::Result<()>; fn GetGlyphOrientationTransform(&self, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, issideways: super::super::Foundation::BOOL, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()>; fn GetScriptProperties(&self, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, scriptproperties: *mut DWRITE_SCRIPT_PROPERTIES) -> windows_core::Result<()>; - fn GetTextComplexity(&self, textstring: &windows_core::PCWSTR, textlength: u32, fontface: Option<&IDWriteFontFace>, istextsimple: *mut super::super::Foundation::BOOL, textlengthread: *mut u32, glyphindices: *mut u16) -> windows_core::Result<()>; - fn GetJustificationOpportunities(&self, fontface: Option<&IDWriteFontFace>, fontemsize: f32, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, textlength: u32, glyphcount: u32, textstring: &windows_core::PCWSTR, clustermap: *const u16, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES) -> windows_core::Result; + fn GetTextComplexity(&self, textstring: &windows_core::PCWSTR, textlength: u32, fontface: windows_core::Ref<'_, IDWriteFontFace>, istextsimple: *mut super::super::Foundation::BOOL, textlengthread: *mut u32, glyphindices: *mut u16) -> windows_core::Result<()>; + fn GetJustificationOpportunities(&self, fontface: windows_core::Ref<'_, IDWriteFontFace>, fontemsize: f32, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, textlength: u32, glyphcount: u32, textstring: &windows_core::PCWSTR, clustermap: *const u16, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES) -> windows_core::Result; fn JustifyGlyphAdvances(&self, linewidth: f32, glyphcount: u32, justificationopportunities: *const DWRITE_JUSTIFICATION_OPPORTUNITY, glyphadvances: *const f32, glyphoffsets: *const DWRITE_GLYPH_OFFSET, justifiedglyphadvances: *mut f32, justifiedglyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()>; - fn GetJustifiedGlyphs(&self, fontface: Option<&IDWriteFontFace>, fontemsize: f32, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, textlength: u32, glyphcount: u32, maxglyphcount: u32, clustermap: *const u16, glyphindices: *const u16, glyphadvances: *const f32, justifiedglyphadvances: *const f32, justifiedglyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES, actualglyphcount: *mut u32, modifiedclustermap: *mut u16, modifiedglyphindices: *mut u16, modifiedglyphadvances: *mut f32, modifiedglyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()>; + fn GetJustifiedGlyphs(&self, fontface: windows_core::Ref<'_, IDWriteFontFace>, fontemsize: f32, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, textlength: u32, glyphcount: u32, maxglyphcount: u32, clustermap: *const u16, glyphindices: *const u16, glyphadvances: *const f32, justifiedglyphadvances: *const f32, justifiedglyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES, actualglyphcount: *mut u32, modifiedclustermap: *mut u16, modifiedglyphindices: *mut u16, modifiedglyphadvances: *mut f32, modifiedglyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()>; } impl IDWriteTextAnalyzer1_Vtbl { pub const fn new() -> Self { @@ -9148,11 +9171,11 @@ impl IDWriteTextAnalyzer1_Vtbl { } unsafe extern "system" fn GetBaseline(this: *mut core::ffi::c_void, fontface: *mut core::ffi::c_void, baseline: DWRITE_BASELINE, isvertical: super::super::Foundation::BOOL, issimulationallowed: super::super::Foundation::BOOL, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: windows_core::PCWSTR, baselinecoordinate: *mut i32, exists: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextAnalyzer1_Impl::GetBaseline(this, windows_core::from_raw_borrowed(&fontface), core::mem::transmute_copy(&baseline), core::mem::transmute_copy(&isvertical), core::mem::transmute_copy(&issimulationallowed), core::mem::transmute(&scriptanalysis), core::mem::transmute(&localename), core::mem::transmute_copy(&baselinecoordinate), core::mem::transmute_copy(&exists)).into() + IDWriteTextAnalyzer1_Impl::GetBaseline(this, core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&baseline), core::mem::transmute_copy(&isvertical), core::mem::transmute_copy(&issimulationallowed), core::mem::transmute(&scriptanalysis), core::mem::transmute(&localename), core::mem::transmute_copy(&baselinecoordinate), core::mem::transmute_copy(&exists)).into() } unsafe extern "system" fn AnalyzeVerticalGlyphOrientation(this: *mut core::ffi::c_void, analysissource: *mut core::ffi::c_void, textposition: u32, textlength: u32, analysissink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextAnalyzer1_Impl::AnalyzeVerticalGlyphOrientation(this, windows_core::from_raw_borrowed(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&analysissink)).into() + IDWriteTextAnalyzer1_Impl::AnalyzeVerticalGlyphOrientation(this, core::mem::transmute_copy(&analysissource), core::mem::transmute_copy(&textposition), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&analysissink)).into() } unsafe extern "system" fn GetGlyphOrientationTransform(this: *mut core::ffi::c_void, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, issideways: super::super::Foundation::BOOL, transform: *mut DWRITE_MATRIX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9164,11 +9187,11 @@ impl IDWriteTextAnalyzer1_Vtbl { } unsafe extern "system" fn GetTextComplexity(this: *mut core::ffi::c_void, textstring: windows_core::PCWSTR, textlength: u32, fontface: *mut core::ffi::c_void, istextsimple: *mut super::super::Foundation::BOOL, textlengthread: *mut u32, glyphindices: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextAnalyzer1_Impl::GetTextComplexity(this, core::mem::transmute(&textstring), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&fontface), core::mem::transmute_copy(&istextsimple), core::mem::transmute_copy(&textlengthread), core::mem::transmute_copy(&glyphindices)).into() + IDWriteTextAnalyzer1_Impl::GetTextComplexity(this, core::mem::transmute(&textstring), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&istextsimple), core::mem::transmute_copy(&textlengthread), core::mem::transmute_copy(&glyphindices)).into() } unsafe extern "system" fn GetJustificationOpportunities(this: *mut core::ffi::c_void, fontface: *mut core::ffi::c_void, fontemsize: f32, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, textlength: u32, glyphcount: u32, textstring: windows_core::PCWSTR, clustermap: *const u16, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES, justificationopportunities: *mut DWRITE_JUSTIFICATION_OPPORTUNITY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteTextAnalyzer1_Impl::GetJustificationOpportunities(this, windows_core::from_raw_borrowed(&fontface), core::mem::transmute_copy(&fontemsize), core::mem::transmute(&scriptanalysis), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&glyphcount), core::mem::transmute(&textstring), core::mem::transmute_copy(&clustermap), core::mem::transmute_copy(&glyphproperties)) { + match IDWriteTextAnalyzer1_Impl::GetJustificationOpportunities(this, core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&fontemsize), core::mem::transmute(&scriptanalysis), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&glyphcount), core::mem::transmute(&textstring), core::mem::transmute_copy(&clustermap), core::mem::transmute_copy(&glyphproperties)) { Ok(ok__) => { justificationopportunities.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9184,7 +9207,7 @@ impl IDWriteTextAnalyzer1_Vtbl { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IDWriteTextAnalyzer1_Impl::GetJustifiedGlyphs( this, - windows_core::from_raw_borrowed(&fontface), + core::mem::transmute_copy(&fontface), core::mem::transmute_copy(&fontemsize), core::mem::transmute(&scriptanalysis), core::mem::transmute_copy(&textlength), @@ -9261,8 +9284,8 @@ pub struct IDWriteTextAnalyzer2_Vtbl { } pub trait IDWriteTextAnalyzer2_Impl: IDWriteTextAnalyzer1_Impl { fn GetGlyphOrientationTransform(&self, glyphorientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, issideways: super::super::Foundation::BOOL, originx: f32, originy: f32, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()>; - fn GetTypographicFeatures(&self, fontface: Option<&IDWriteFontFace>, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, maxtagcount: u32, actualtagcount: *mut u32, tags: *mut DWRITE_FONT_FEATURE_TAG) -> windows_core::Result<()>; - fn CheckTypographicFeature(&self, fontface: Option<&IDWriteFontFace>, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, featuretag: DWRITE_FONT_FEATURE_TAG, glyphcount: u32, glyphindices: *const u16) -> windows_core::Result; + fn GetTypographicFeatures(&self, fontface: windows_core::Ref<'_, IDWriteFontFace>, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, maxtagcount: u32, actualtagcount: *mut u32, tags: *mut DWRITE_FONT_FEATURE_TAG) -> windows_core::Result<()>; + fn CheckTypographicFeature(&self, fontface: windows_core::Ref<'_, IDWriteFontFace>, scriptanalysis: &DWRITE_SCRIPT_ANALYSIS, localename: &windows_core::PCWSTR, featuretag: DWRITE_FONT_FEATURE_TAG, glyphcount: u32, glyphindices: *const u16) -> windows_core::Result; } impl IDWriteTextAnalyzer2_Vtbl { pub const fn new() -> Self { @@ -9272,11 +9295,11 @@ impl IDWriteTextAnalyzer2_Vtbl { } unsafe extern "system" fn GetTypographicFeatures(this: *mut core::ffi::c_void, fontface: *mut core::ffi::c_void, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: windows_core::PCWSTR, maxtagcount: u32, actualtagcount: *mut u32, tags: *mut DWRITE_FONT_FEATURE_TAG) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextAnalyzer2_Impl::GetTypographicFeatures(this, windows_core::from_raw_borrowed(&fontface), core::mem::transmute(&scriptanalysis), core::mem::transmute(&localename), core::mem::transmute_copy(&maxtagcount), core::mem::transmute_copy(&actualtagcount), core::mem::transmute_copy(&tags)).into() + IDWriteTextAnalyzer2_Impl::GetTypographicFeatures(this, core::mem::transmute_copy(&fontface), core::mem::transmute(&scriptanalysis), core::mem::transmute(&localename), core::mem::transmute_copy(&maxtagcount), core::mem::transmute_copy(&actualtagcount), core::mem::transmute_copy(&tags)).into() } unsafe extern "system" fn CheckTypographicFeature(this: *mut core::ffi::c_void, fontface: *mut core::ffi::c_void, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: windows_core::PCWSTR, featuretag: DWRITE_FONT_FEATURE_TAG, glyphcount: u32, glyphindices: *const u16, featureapplies: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDWriteTextAnalyzer2_Impl::CheckTypographicFeature(this, windows_core::from_raw_borrowed(&fontface), core::mem::transmute(&scriptanalysis), core::mem::transmute(&localename), core::mem::transmute_copy(&featuretag), core::mem::transmute_copy(&glyphcount), core::mem::transmute_copy(&glyphindices)) { + match IDWriteTextAnalyzer2_Impl::CheckTypographicFeature(this, core::mem::transmute_copy(&fontface), core::mem::transmute(&scriptanalysis), core::mem::transmute(&localename), core::mem::transmute_copy(&featuretag), core::mem::transmute_copy(&glyphcount), core::mem::transmute_copy(&glyphindices)) { Ok(ok__) => { featureapplies.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9417,7 +9440,7 @@ pub trait IDWriteTextFormat_Impl: windows_core::IUnknownImpl { fn SetReadingDirection(&self, readingdirection: DWRITE_READING_DIRECTION) -> windows_core::Result<()>; fn SetFlowDirection(&self, flowdirection: DWRITE_FLOW_DIRECTION) -> windows_core::Result<()>; fn SetIncrementalTabStop(&self, incrementaltabstop: f32) -> windows_core::Result<()>; - fn SetTrimming(&self, trimmingoptions: *const DWRITE_TRIMMING, trimmingsign: Option<&IDWriteInlineObject>) -> windows_core::Result<()>; + fn SetTrimming(&self, trimmingoptions: *const DWRITE_TRIMMING, trimmingsign: windows_core::Ref<'_, IDWriteInlineObject>) -> windows_core::Result<()>; fn SetLineSpacing(&self, linespacingmethod: DWRITE_LINE_SPACING_METHOD, linespacing: f32, baseline: f32) -> windows_core::Result<()>; fn GetTextAlignment(&self) -> DWRITE_TEXT_ALIGNMENT; fn GetParagraphAlignment(&self) -> DWRITE_PARAGRAPH_ALIGNMENT; @@ -9425,7 +9448,7 @@ pub trait IDWriteTextFormat_Impl: windows_core::IUnknownImpl { fn GetReadingDirection(&self) -> DWRITE_READING_DIRECTION; fn GetFlowDirection(&self) -> DWRITE_FLOW_DIRECTION; fn GetIncrementalTabStop(&self) -> f32; - fn GetTrimming(&self, trimmingoptions: *mut DWRITE_TRIMMING, trimmingsign: *mut Option) -> windows_core::Result<()>; + fn GetTrimming(&self, trimmingoptions: *mut DWRITE_TRIMMING, trimmingsign: windows_core::OutRef<'_, IDWriteInlineObject>) -> windows_core::Result<()>; fn GetLineSpacing(&self, linespacingmethod: *mut DWRITE_LINE_SPACING_METHOD, linespacing: *mut f32, baseline: *mut f32) -> windows_core::Result<()>; fn GetFontCollection(&self) -> windows_core::Result; fn GetFontFamilyNameLength(&self) -> u32; @@ -9465,7 +9488,7 @@ impl IDWriteTextFormat_Vtbl { } unsafe extern "system" fn SetTrimming(this: *mut core::ffi::c_void, trimmingoptions: *const DWRITE_TRIMMING, trimmingsign: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextFormat_Impl::SetTrimming(this, core::mem::transmute_copy(&trimmingoptions), windows_core::from_raw_borrowed(&trimmingsign)).into() + IDWriteTextFormat_Impl::SetTrimming(this, core::mem::transmute_copy(&trimmingoptions), core::mem::transmute_copy(&trimmingsign)).into() } unsafe extern "system" fn SetLineSpacing(this: *mut core::ffi::c_void, linespacingmethod: DWRITE_LINE_SPACING_METHOD, linespacing: f32, baseline: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9638,7 +9661,7 @@ pub trait IDWriteTextFormat1_Impl: IDWriteTextFormat_Impl { fn GetLastLineWrapping(&self) -> super::super::Foundation::BOOL; fn SetOpticalAlignment(&self, opticalalignment: DWRITE_OPTICAL_ALIGNMENT) -> windows_core::Result<()>; fn GetOpticalAlignment(&self) -> DWRITE_OPTICAL_ALIGNMENT; - fn SetFontFallback(&self, fontfallback: Option<&IDWriteFontFallback>) -> windows_core::Result<()>; + fn SetFontFallback(&self, fontfallback: windows_core::Ref<'_, IDWriteFontFallback>) -> windows_core::Result<()>; fn GetFontFallback(&self) -> windows_core::Result; } impl IDWriteTextFormat1_Vtbl { @@ -9669,7 +9692,7 @@ impl IDWriteTextFormat1_Vtbl { } unsafe extern "system" fn SetFontFallback(this: *mut core::ffi::c_void, fontfallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextFormat1_Impl::SetFontFallback(this, windows_core::from_raw_borrowed(&fontfallback)).into() + IDWriteTextFormat1_Impl::SetFontFallback(this, core::mem::transmute_copy(&fontfallback)).into() } unsafe extern "system" fn GetFontFallback(this: *mut core::ffi::c_void, fontfallback: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10024,7 +10047,7 @@ pub struct IDWriteTextLayout_Vtbl { pub trait IDWriteTextLayout_Impl: IDWriteTextFormat_Impl { fn SetMaxWidth(&self, maxwidth: f32) -> windows_core::Result<()>; fn SetMaxHeight(&self, maxheight: f32) -> windows_core::Result<()>; - fn SetFontCollection(&self, fontcollection: Option<&IDWriteFontCollection>, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; + fn SetFontCollection(&self, fontcollection: windows_core::Ref<'_, IDWriteFontCollection>, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn SetFontFamilyName(&self, fontfamilyname: &windows_core::PCWSTR, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn SetFontWeight(&self, fontweight: DWRITE_FONT_WEIGHT, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn SetFontStyle(&self, fontstyle: DWRITE_FONT_STYLE, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; @@ -10032,13 +10055,13 @@ pub trait IDWriteTextLayout_Impl: IDWriteTextFormat_Impl { fn SetFontSize(&self, fontsize: f32, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn SetUnderline(&self, hasunderline: super::super::Foundation::BOOL, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn SetStrikethrough(&self, hasstrikethrough: super::super::Foundation::BOOL, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; - fn SetDrawingEffect(&self, drawingeffect: Option<&windows_core::IUnknown>, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; - fn SetInlineObject(&self, inlineobject: Option<&IDWriteInlineObject>, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; - fn SetTypography(&self, typography: Option<&IDWriteTypography>, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; + fn SetDrawingEffect(&self, drawingeffect: windows_core::Ref<'_, windows_core::IUnknown>, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; + fn SetInlineObject(&self, inlineobject: windows_core::Ref<'_, IDWriteInlineObject>, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; + fn SetTypography(&self, typography: windows_core::Ref<'_, IDWriteTypography>, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn SetLocaleName(&self, localename: &windows_core::PCWSTR, textrange: &DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn GetMaxWidth(&self) -> f32; fn GetMaxHeight(&self) -> f32; - fn GetFontCollection(&self, currentposition: u32, fontcollection: *mut Option, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; + fn GetFontCollection(&self, currentposition: u32, fontcollection: windows_core::OutRef<'_, IDWriteFontCollection>, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn GetFontFamilyNameLength(&self, currentposition: u32, namelength: *mut u32, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn GetFontFamilyName(&self, currentposition: u32, fontfamilyname: windows_core::PWSTR, namesize: u32, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn GetFontWeight(&self, currentposition: u32, fontweight: *mut DWRITE_FONT_WEIGHT, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; @@ -10047,12 +10070,12 @@ pub trait IDWriteTextLayout_Impl: IDWriteTextFormat_Impl { fn GetFontSize(&self, currentposition: u32, fontsize: *mut f32, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn GetUnderline(&self, currentposition: u32, hasunderline: *mut super::super::Foundation::BOOL, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn GetStrikethrough(&self, currentposition: u32, hasstrikethrough: *mut super::super::Foundation::BOOL, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; - fn GetDrawingEffect(&self, currentposition: u32, drawingeffect: *mut Option, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; - fn GetInlineObject(&self, currentposition: u32, inlineobject: *mut Option, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; - fn GetTypography(&self, currentposition: u32, typography: *mut Option, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; + fn GetDrawingEffect(&self, currentposition: u32, drawingeffect: windows_core::OutRef<'_, windows_core::IUnknown>, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; + fn GetInlineObject(&self, currentposition: u32, inlineobject: windows_core::OutRef<'_, IDWriteInlineObject>, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; + fn GetTypography(&self, currentposition: u32, typography: windows_core::OutRef<'_, IDWriteTypography>, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn GetLocaleNameLength(&self, currentposition: u32, namelength: *mut u32, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; fn GetLocaleName(&self, currentposition: u32, localename: windows_core::PWSTR, namesize: u32, textrange: *mut DWRITE_TEXT_RANGE) -> windows_core::Result<()>; - fn Draw(&self, clientdrawingcontext: *const core::ffi::c_void, renderer: Option<&IDWriteTextRenderer>, originx: f32, originy: f32) -> windows_core::Result<()>; + fn Draw(&self, clientdrawingcontext: *const core::ffi::c_void, renderer: windows_core::Ref<'_, IDWriteTextRenderer>, originx: f32, originy: f32) -> windows_core::Result<()>; fn GetLineMetrics(&self, linemetrics: *mut DWRITE_LINE_METRICS, maxlinecount: u32, actuallinecount: *mut u32) -> windows_core::Result<()>; fn GetMetrics(&self, textmetrics: *mut DWRITE_TEXT_METRICS) -> windows_core::Result<()>; fn GetOverhangMetrics(&self) -> windows_core::Result; @@ -10074,7 +10097,7 @@ impl IDWriteTextLayout_Vtbl { } unsafe extern "system" fn SetFontCollection(this: *mut core::ffi::c_void, fontcollection: *mut core::ffi::c_void, textrange: DWRITE_TEXT_RANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextLayout_Impl::SetFontCollection(this, windows_core::from_raw_borrowed(&fontcollection), core::mem::transmute(&textrange)).into() + IDWriteTextLayout_Impl::SetFontCollection(this, core::mem::transmute_copy(&fontcollection), core::mem::transmute(&textrange)).into() } unsafe extern "system" fn SetFontFamilyName(this: *mut core::ffi::c_void, fontfamilyname: windows_core::PCWSTR, textrange: DWRITE_TEXT_RANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10106,15 +10129,15 @@ impl IDWriteTextLayout_Vtbl { } unsafe extern "system" fn SetDrawingEffect(this: *mut core::ffi::c_void, drawingeffect: *mut core::ffi::c_void, textrange: DWRITE_TEXT_RANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextLayout_Impl::SetDrawingEffect(this, windows_core::from_raw_borrowed(&drawingeffect), core::mem::transmute(&textrange)).into() + IDWriteTextLayout_Impl::SetDrawingEffect(this, core::mem::transmute_copy(&drawingeffect), core::mem::transmute(&textrange)).into() } unsafe extern "system" fn SetInlineObject(this: *mut core::ffi::c_void, inlineobject: *mut core::ffi::c_void, textrange: DWRITE_TEXT_RANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextLayout_Impl::SetInlineObject(this, windows_core::from_raw_borrowed(&inlineobject), core::mem::transmute(&textrange)).into() + IDWriteTextLayout_Impl::SetInlineObject(this, core::mem::transmute_copy(&inlineobject), core::mem::transmute(&textrange)).into() } unsafe extern "system" fn SetTypography(this: *mut core::ffi::c_void, typography: *mut core::ffi::c_void, textrange: DWRITE_TEXT_RANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextLayout_Impl::SetTypography(this, windows_core::from_raw_borrowed(&typography), core::mem::transmute(&textrange)).into() + IDWriteTextLayout_Impl::SetTypography(this, core::mem::transmute_copy(&typography), core::mem::transmute(&textrange)).into() } unsafe extern "system" fn SetLocaleName(this: *mut core::ffi::c_void, localename: windows_core::PCWSTR, textrange: DWRITE_TEXT_RANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10186,7 +10209,7 @@ impl IDWriteTextLayout_Vtbl { } unsafe extern "system" fn Draw(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, renderer: *mut core::ffi::c_void, originx: f32, originy: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextLayout_Impl::Draw(this, core::mem::transmute_copy(&clientdrawingcontext), windows_core::from_raw_borrowed(&renderer), core::mem::transmute_copy(&originx), core::mem::transmute_copy(&originy)).into() + IDWriteTextLayout_Impl::Draw(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&renderer), core::mem::transmute_copy(&originx), core::mem::transmute_copy(&originy)).into() } unsafe extern "system" fn GetLineMetrics(this: *mut core::ffi::c_void, linemetrics: *mut DWRITE_LINE_METRICS, maxlinecount: u32, actuallinecount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10413,7 +10436,7 @@ pub trait IDWriteTextLayout2_Impl: IDWriteTextLayout1_Impl { fn GetLastLineWrapping(&self) -> super::super::Foundation::BOOL; fn SetOpticalAlignment(&self, opticalalignment: DWRITE_OPTICAL_ALIGNMENT) -> windows_core::Result<()>; fn GetOpticalAlignment(&self) -> DWRITE_OPTICAL_ALIGNMENT; - fn SetFontFallback(&self, fontfallback: Option<&IDWriteFontFallback>) -> windows_core::Result<()>; + fn SetFontFallback(&self, fontfallback: windows_core::Ref<'_, IDWriteFontFallback>) -> windows_core::Result<()>; fn GetFontFallback(&self) -> windows_core::Result; } impl IDWriteTextLayout2_Vtbl { @@ -10448,7 +10471,7 @@ impl IDWriteTextLayout2_Vtbl { } unsafe extern "system" fn SetFontFallback(this: *mut core::ffi::c_void, fontfallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextLayout2_Impl::SetFontFallback(this, windows_core::from_raw_borrowed(&fontfallback)).into() + IDWriteTextLayout2_Impl::SetFontFallback(this, core::mem::transmute_copy(&fontfallback)).into() } unsafe extern "system" fn GetFontFallback(this: *mut core::ffi::c_void, fontfallback: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10672,28 +10695,28 @@ pub struct IDWriteTextRenderer_Vtbl { pub DrawInlineObject: unsafe extern "system" fn(*mut core::ffi::c_void, *const core::ffi::c_void, f32, f32, *mut core::ffi::c_void, super::super::Foundation::BOOL, super::super::Foundation::BOOL, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDWriteTextRenderer_Impl: IDWritePixelSnapping_Impl { - fn DrawGlyphRun(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, glyphrundescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, clientdrawingeffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DrawUnderline(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DrawStrikethrough(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DrawInlineObject(&self, clientdrawingcontext: *const core::ffi::c_void, originx: f32, originy: f32, inlineobject: Option<&IDWriteInlineObject>, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, clientdrawingeffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn DrawGlyphRun(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, glyphrundescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, clientdrawingeffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DrawUnderline(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DrawStrikethrough(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DrawInlineObject(&self, clientdrawingcontext: *const core::ffi::c_void, originx: f32, originy: f32, inlineobject: windows_core::Ref<'_, IDWriteInlineObject>, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, clientdrawingeffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IDWriteTextRenderer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DrawGlyphRun(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, glyphrundescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, clientdrawingeffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextRenderer_Impl::DrawGlyphRun(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), windows_core::from_raw_borrowed(&clientdrawingeffect)).into() + IDWriteTextRenderer_Impl::DrawGlyphRun(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), core::mem::transmute_copy(&clientdrawingeffect)).into() } unsafe extern "system" fn DrawUnderline(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextRenderer_Impl::DrawUnderline(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&underline), windows_core::from_raw_borrowed(&clientdrawingeffect)).into() + IDWriteTextRenderer_Impl::DrawUnderline(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&underline), core::mem::transmute_copy(&clientdrawingeffect)).into() } unsafe extern "system" fn DrawStrikethrough(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextRenderer_Impl::DrawStrikethrough(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&strikethrough), windows_core::from_raw_borrowed(&clientdrawingeffect)).into() + IDWriteTextRenderer_Impl::DrawStrikethrough(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&strikethrough), core::mem::transmute_copy(&clientdrawingeffect)).into() } unsafe extern "system" fn DrawInlineObject(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, originx: f32, originy: f32, inlineobject: *mut core::ffi::c_void, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, clientdrawingeffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextRenderer_Impl::DrawInlineObject(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&originx), core::mem::transmute_copy(&originy), windows_core::from_raw_borrowed(&inlineobject), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), windows_core::from_raw_borrowed(&clientdrawingeffect)).into() + IDWriteTextRenderer_Impl::DrawInlineObject(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&originx), core::mem::transmute_copy(&originy), core::mem::transmute_copy(&inlineobject), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), core::mem::transmute_copy(&clientdrawingeffect)).into() } Self { base__: IDWritePixelSnapping_Vtbl::new::(), @@ -10754,28 +10777,28 @@ pub struct IDWriteTextRenderer1_Vtbl { pub DrawInlineObject: unsafe extern "system" fn(*mut core::ffi::c_void, *const core::ffi::c_void, f32, f32, DWRITE_GLYPH_ORIENTATION_ANGLE, *mut core::ffi::c_void, super::super::Foundation::BOOL, super::super::Foundation::BOOL, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDWriteTextRenderer1_Impl: IDWriteTextRenderer_Impl { - fn DrawGlyphRun(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, glyphrundescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, clientdrawingeffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DrawUnderline(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DrawStrikethrough(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn DrawInlineObject(&self, clientdrawingcontext: *const core::ffi::c_void, originx: f32, originy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, inlineobject: Option<&IDWriteInlineObject>, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, clientdrawingeffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn DrawGlyphRun(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, glyphrundescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, clientdrawingeffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DrawUnderline(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DrawStrikethrough(&self, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn DrawInlineObject(&self, clientdrawingcontext: *const core::ffi::c_void, originx: f32, originy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, inlineobject: windows_core::Ref<'_, IDWriteInlineObject>, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, clientdrawingeffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IDWriteTextRenderer1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DrawGlyphRun(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, glyphrundescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, clientdrawingeffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextRenderer1_Impl::DrawGlyphRun(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&orientationangle), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), windows_core::from_raw_borrowed(&clientdrawingeffect)).into() + IDWriteTextRenderer1_Impl::DrawGlyphRun(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&orientationangle), core::mem::transmute_copy(&measuringmode), core::mem::transmute_copy(&glyphrun), core::mem::transmute_copy(&glyphrundescription), core::mem::transmute_copy(&clientdrawingeffect)).into() } unsafe extern "system" fn DrawUnderline(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextRenderer1_Impl::DrawUnderline(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&orientationangle), core::mem::transmute_copy(&underline), windows_core::from_raw_borrowed(&clientdrawingeffect)).into() + IDWriteTextRenderer1_Impl::DrawUnderline(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&orientationangle), core::mem::transmute_copy(&underline), core::mem::transmute_copy(&clientdrawingeffect)).into() } unsafe extern "system" fn DrawStrikethrough(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextRenderer1_Impl::DrawStrikethrough(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&orientationangle), core::mem::transmute_copy(&strikethrough), windows_core::from_raw_borrowed(&clientdrawingeffect)).into() + IDWriteTextRenderer1_Impl::DrawStrikethrough(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&baselineoriginx), core::mem::transmute_copy(&baselineoriginy), core::mem::transmute_copy(&orientationangle), core::mem::transmute_copy(&strikethrough), core::mem::transmute_copy(&clientdrawingeffect)).into() } unsafe extern "system" fn DrawInlineObject(this: *mut core::ffi::c_void, clientdrawingcontext: *const core::ffi::c_void, originx: f32, originy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, inlineobject: *mut core::ffi::c_void, issideways: super::super::Foundation::BOOL, isrighttoleft: super::super::Foundation::BOOL, clientdrawingeffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDWriteTextRenderer1_Impl::DrawInlineObject(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&originx), core::mem::transmute_copy(&originy), core::mem::transmute_copy(&orientationangle), windows_core::from_raw_borrowed(&inlineobject), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), windows_core::from_raw_borrowed(&clientdrawingeffect)).into() + IDWriteTextRenderer1_Impl::DrawInlineObject(this, core::mem::transmute_copy(&clientdrawingcontext), core::mem::transmute_copy(&originx), core::mem::transmute_copy(&originy), core::mem::transmute_copy(&orientationangle), core::mem::transmute_copy(&inlineobject), core::mem::transmute_copy(&issideways), core::mem::transmute_copy(&isrighttoleft), core::mem::transmute_copy(&clientdrawingeffect)).into() } Self { base__: IDWriteTextRenderer_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs index 23f5b5108c..764ef533ca 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs @@ -2291,7 +2291,7 @@ pub struct IDXGIDevice_Vtbl { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait IDXGIDevice_Impl: IDXGIObject_Impl { fn GetAdapter(&self) -> windows_core::Result; - fn CreateSurface(&self, pdesc: *const DXGI_SURFACE_DESC, numsurfaces: u32, usage: DXGI_USAGE, psharedresource: *const DXGI_SHARED_RESOURCE, ppsurface: *mut Option) -> windows_core::Result<()>; + fn CreateSurface(&self, pdesc: *const DXGI_SURFACE_DESC, numsurfaces: u32, usage: DXGI_USAGE, psharedresource: *const DXGI_SHARED_RESOURCE, ppsurface: windows_core::OutRef<'_, IDXGISurface>) -> windows_core::Result<()>; fn QueryResourceResidency(&self, ppresources: *const Option, presidencystatus: *mut DXGI_RESIDENCY, numresources: u32) -> windows_core::Result<()>; fn SetGPUThreadPriority(&self, priority: i32) -> windows_core::Result<()>; fn GetGPUThreadPriority(&self) -> windows_core::Result; @@ -2709,7 +2709,7 @@ pub trait IDXGIFactory_Impl: IDXGIObject_Impl { fn EnumAdapters(&self, adapter: u32) -> windows_core::Result; fn MakeWindowAssociation(&self, windowhandle: super::super::Foundation::HWND, flags: DXGI_MWA_FLAGS) -> windows_core::Result<()>; fn GetWindowAssociation(&self) -> windows_core::Result; - fn CreateSwapChain(&self, pdevice: Option<&windows_core::IUnknown>, pdesc: *const DXGI_SWAP_CHAIN_DESC, ppswapchain: *mut Option) -> windows_core::HRESULT; + fn CreateSwapChain(&self, pdevice: windows_core::Ref<'_, windows_core::IUnknown>, pdesc: *const DXGI_SWAP_CHAIN_DESC, ppswapchain: windows_core::OutRef<'_, IDXGISwapChain>) -> windows_core::HRESULT; fn CreateSoftwareAdapter(&self, module: super::super::Foundation::HMODULE) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -2741,7 +2741,7 @@ impl IDXGIFactory_Vtbl { } unsafe extern "system" fn CreateSwapChain(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, pdesc: *const DXGI_SWAP_CHAIN_DESC, ppswapchain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXGIFactory_Impl::CreateSwapChain(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppswapchain)) + IDXGIFactory_Impl::CreateSwapChain(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&ppswapchain)) } unsafe extern "system" fn CreateSoftwareAdapter(this: *mut core::ffi::c_void, module: super::super::Foundation::HMODULE, ppadapter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2923,8 +2923,8 @@ pub struct IDXGIFactory2_Vtbl { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait IDXGIFactory2_Impl: IDXGIFactory1_Impl { fn IsWindowedStereoEnabled(&self) -> super::super::Foundation::BOOL; - fn CreateSwapChainForHwnd(&self, pdevice: Option<&windows_core::IUnknown>, hwnd: super::super::Foundation::HWND, pdesc: *const DXGI_SWAP_CHAIN_DESC1, pfullscreendesc: *const DXGI_SWAP_CHAIN_FULLSCREEN_DESC, prestricttooutput: Option<&IDXGIOutput>) -> windows_core::Result; - fn CreateSwapChainForCoreWindow(&self, pdevice: Option<&windows_core::IUnknown>, pwindow: Option<&windows_core::IUnknown>, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: Option<&IDXGIOutput>) -> windows_core::Result; + fn CreateSwapChainForHwnd(&self, pdevice: windows_core::Ref<'_, windows_core::IUnknown>, hwnd: super::super::Foundation::HWND, pdesc: *const DXGI_SWAP_CHAIN_DESC1, pfullscreendesc: *const DXGI_SWAP_CHAIN_FULLSCREEN_DESC, prestricttooutput: windows_core::Ref<'_, IDXGIOutput>) -> windows_core::Result; + fn CreateSwapChainForCoreWindow(&self, pdevice: windows_core::Ref<'_, windows_core::IUnknown>, pwindow: windows_core::Ref<'_, windows_core::IUnknown>, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: windows_core::Ref<'_, IDXGIOutput>) -> windows_core::Result; fn GetSharedResourceAdapterLuid(&self, hresource: super::super::Foundation::HANDLE) -> windows_core::Result; fn RegisterStereoStatusWindow(&self, windowhandle: super::super::Foundation::HWND, wmsg: u32) -> windows_core::Result; fn RegisterStereoStatusEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result; @@ -2932,7 +2932,7 @@ pub trait IDXGIFactory2_Impl: IDXGIFactory1_Impl { fn RegisterOcclusionStatusWindow(&self, windowhandle: super::super::Foundation::HWND, wmsg: u32) -> windows_core::Result; fn RegisterOcclusionStatusEvent(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result; fn UnregisterOcclusionStatus(&self, dwcookie: u32); - fn CreateSwapChainForComposition(&self, pdevice: Option<&windows_core::IUnknown>, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: Option<&IDXGIOutput>) -> windows_core::Result; + fn CreateSwapChainForComposition(&self, pdevice: windows_core::Ref<'_, windows_core::IUnknown>, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: windows_core::Ref<'_, IDXGIOutput>) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl IDXGIFactory2_Vtbl { @@ -2943,7 +2943,7 @@ impl IDXGIFactory2_Vtbl { } unsafe extern "system" fn CreateSwapChainForHwnd(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, pdesc: *const DXGI_SWAP_CHAIN_DESC1, pfullscreendesc: *const DXGI_SWAP_CHAIN_FULLSCREEN_DESC, prestricttooutput: *mut core::ffi::c_void, ppswapchain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXGIFactory2_Impl::CreateSwapChainForHwnd(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pfullscreendesc), windows_core::from_raw_borrowed(&prestricttooutput)) { + match IDXGIFactory2_Impl::CreateSwapChainForHwnd(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pfullscreendesc), core::mem::transmute_copy(&prestricttooutput)) { Ok(ok__) => { ppswapchain.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2953,7 +2953,7 @@ impl IDXGIFactory2_Vtbl { } unsafe extern "system" fn CreateSwapChainForCoreWindow(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, pwindow: *mut core::ffi::c_void, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: *mut core::ffi::c_void, ppswapchain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXGIFactory2_Impl::CreateSwapChainForCoreWindow(this, windows_core::from_raw_borrowed(&pdevice), windows_core::from_raw_borrowed(&pwindow), core::mem::transmute_copy(&pdesc), windows_core::from_raw_borrowed(&prestricttooutput)) { + match IDXGIFactory2_Impl::CreateSwapChainForCoreWindow(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&pwindow), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&prestricttooutput)) { Ok(ok__) => { ppswapchain.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3021,7 +3021,7 @@ impl IDXGIFactory2_Vtbl { } unsafe extern "system" fn CreateSwapChainForComposition(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: *mut core::ffi::c_void, ppswapchain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXGIFactory2_Impl::CreateSwapChainForComposition(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&pdesc), windows_core::from_raw_borrowed(&prestricttooutput)) { + match IDXGIFactory2_Impl::CreateSwapChainForComposition(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&prestricttooutput)) { Ok(ok__) => { ppswapchain.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3337,15 +3337,15 @@ pub struct IDXGIFactoryMedia_Vtbl { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait IDXGIFactoryMedia_Impl: windows_core::IUnknownImpl { - fn CreateSwapChainForCompositionSurfaceHandle(&self, pdevice: Option<&windows_core::IUnknown>, hsurface: super::super::Foundation::HANDLE, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: Option<&IDXGIOutput>) -> windows_core::Result; - fn CreateDecodeSwapChainForCompositionSurfaceHandle(&self, pdevice: Option<&windows_core::IUnknown>, hsurface: super::super::Foundation::HANDLE, pdesc: *const DXGI_DECODE_SWAP_CHAIN_DESC, pyuvdecodebuffers: Option<&IDXGIResource>, prestricttooutput: Option<&IDXGIOutput>) -> windows_core::Result; + fn CreateSwapChainForCompositionSurfaceHandle(&self, pdevice: windows_core::Ref<'_, windows_core::IUnknown>, hsurface: super::super::Foundation::HANDLE, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: windows_core::Ref<'_, IDXGIOutput>) -> windows_core::Result; + fn CreateDecodeSwapChainForCompositionSurfaceHandle(&self, pdevice: windows_core::Ref<'_, windows_core::IUnknown>, hsurface: super::super::Foundation::HANDLE, pdesc: *const DXGI_DECODE_SWAP_CHAIN_DESC, pyuvdecodebuffers: windows_core::Ref<'_, IDXGIResource>, prestricttooutput: windows_core::Ref<'_, IDXGIOutput>) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl IDXGIFactoryMedia_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateSwapChainForCompositionSurfaceHandle(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, hsurface: super::super::Foundation::HANDLE, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: *mut core::ffi::c_void, ppswapchain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXGIFactoryMedia_Impl::CreateSwapChainForCompositionSurfaceHandle(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&hsurface), core::mem::transmute_copy(&pdesc), windows_core::from_raw_borrowed(&prestricttooutput)) { + match IDXGIFactoryMedia_Impl::CreateSwapChainForCompositionSurfaceHandle(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&hsurface), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&prestricttooutput)) { Ok(ok__) => { ppswapchain.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3355,7 +3355,7 @@ impl IDXGIFactoryMedia_Vtbl { } unsafe extern "system" fn CreateDecodeSwapChainForCompositionSurfaceHandle(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, hsurface: super::super::Foundation::HANDLE, pdesc: *const DXGI_DECODE_SWAP_CHAIN_DESC, pyuvdecodebuffers: *mut core::ffi::c_void, prestricttooutput: *mut core::ffi::c_void, ppswapchain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXGIFactoryMedia_Impl::CreateDecodeSwapChainForCompositionSurfaceHandle(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&hsurface), core::mem::transmute_copy(&pdesc), windows_core::from_raw_borrowed(&pyuvdecodebuffers), windows_core::from_raw_borrowed(&prestricttooutput)) { + match IDXGIFactoryMedia_Impl::CreateDecodeSwapChainForCompositionSurfaceHandle(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&hsurface), core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pyuvdecodebuffers), core::mem::transmute_copy(&prestricttooutput)) { Ok(ok__) => { ppswapchain.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3860,7 +3860,7 @@ pub struct IDXGIObject_Vtbl { } pub trait IDXGIObject_Impl: windows_core::IUnknownImpl { fn SetPrivateData(&self, name: *const windows_core::GUID, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>; - fn SetPrivateDataInterface(&self, name: *const windows_core::GUID, punknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetPrivateDataInterface(&self, name: *const windows_core::GUID, punknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetPrivateData(&self, name: *const windows_core::GUID, pdatasize: *mut u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetParent(&self, riid: *const windows_core::GUID, ppparent: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } @@ -3872,7 +3872,7 @@ impl IDXGIObject_Vtbl { } unsafe extern "system" fn SetPrivateDataInterface(this: *mut core::ffi::c_void, name: *const windows_core::GUID, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXGIObject_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&name), windows_core::from_raw_borrowed(&punknown)).into() + IDXGIObject_Impl::SetPrivateDataInterface(this, core::mem::transmute_copy(&name), core::mem::transmute_copy(&punknown)).into() } unsafe extern "system" fn GetPrivateData(this: *mut core::ffi::c_void, name: *const windows_core::GUID, pdatasize: *mut u32, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4000,15 +4000,15 @@ pub struct IDXGIOutput_Vtbl { pub trait IDXGIOutput_Impl: IDXGIObject_Impl { fn GetDesc(&self) -> windows_core::Result; fn GetDisplayModeList(&self, enumformat: Common::DXGI_FORMAT, flags: DXGI_ENUM_MODES, pnummodes: *mut u32, pdesc: *mut Common::DXGI_MODE_DESC) -> windows_core::Result<()>; - fn FindClosestMatchingMode(&self, pmodetomatch: *const Common::DXGI_MODE_DESC, pclosestmatch: *mut Common::DXGI_MODE_DESC, pconcerneddevice: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn FindClosestMatchingMode(&self, pmodetomatch: *const Common::DXGI_MODE_DESC, pclosestmatch: *mut Common::DXGI_MODE_DESC, pconcerneddevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn WaitForVBlank(&self) -> windows_core::Result<()>; - fn TakeOwnership(&self, pdevice: Option<&windows_core::IUnknown>, exclusive: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn TakeOwnership(&self, pdevice: windows_core::Ref<'_, windows_core::IUnknown>, exclusive: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn ReleaseOwnership(&self); fn GetGammaControlCapabilities(&self, pgammacaps: *mut Common::DXGI_GAMMA_CONTROL_CAPABILITIES) -> windows_core::Result<()>; fn SetGammaControl(&self, parray: *const Common::DXGI_GAMMA_CONTROL) -> windows_core::Result<()>; fn GetGammaControl(&self, parray: *mut Common::DXGI_GAMMA_CONTROL) -> windows_core::Result<()>; - fn SetDisplaySurface(&self, pscanoutsurface: Option<&IDXGISurface>) -> windows_core::Result<()>; - fn GetDisplaySurfaceData(&self, pdestination: Option<&IDXGISurface>) -> windows_core::Result<()>; + fn SetDisplaySurface(&self, pscanoutsurface: windows_core::Ref<'_, IDXGISurface>) -> windows_core::Result<()>; + fn GetDisplaySurfaceData(&self, pdestination: windows_core::Ref<'_, IDXGISurface>) -> windows_core::Result<()>; fn GetFrameStatistics(&self, pstats: *mut DXGI_FRAME_STATISTICS) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] @@ -4030,7 +4030,7 @@ impl IDXGIOutput_Vtbl { } unsafe extern "system" fn FindClosestMatchingMode(this: *mut core::ffi::c_void, pmodetomatch: *const Common::DXGI_MODE_DESC, pclosestmatch: *mut Common::DXGI_MODE_DESC, pconcerneddevice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXGIOutput_Impl::FindClosestMatchingMode(this, core::mem::transmute_copy(&pmodetomatch), core::mem::transmute_copy(&pclosestmatch), windows_core::from_raw_borrowed(&pconcerneddevice)).into() + IDXGIOutput_Impl::FindClosestMatchingMode(this, core::mem::transmute_copy(&pmodetomatch), core::mem::transmute_copy(&pclosestmatch), core::mem::transmute_copy(&pconcerneddevice)).into() } unsafe extern "system" fn WaitForVBlank(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4038,7 +4038,7 @@ impl IDXGIOutput_Vtbl { } unsafe extern "system" fn TakeOwnership(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, exclusive: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXGIOutput_Impl::TakeOwnership(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&exclusive)).into() + IDXGIOutput_Impl::TakeOwnership(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&exclusive)).into() } unsafe extern "system" fn ReleaseOwnership(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4058,11 +4058,11 @@ impl IDXGIOutput_Vtbl { } unsafe extern "system" fn SetDisplaySurface(this: *mut core::ffi::c_void, pscanoutsurface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXGIOutput_Impl::SetDisplaySurface(this, windows_core::from_raw_borrowed(&pscanoutsurface)).into() + IDXGIOutput_Impl::SetDisplaySurface(this, core::mem::transmute_copy(&pscanoutsurface)).into() } unsafe extern "system" fn GetDisplaySurfaceData(this: *mut core::ffi::c_void, pdestination: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXGIOutput_Impl::GetDisplaySurfaceData(this, windows_core::from_raw_borrowed(&pdestination)).into() + IDXGIOutput_Impl::GetDisplaySurfaceData(this, core::mem::transmute_copy(&pdestination)).into() } unsafe extern "system" fn GetFrameStatistics(this: *mut core::ffi::c_void, pstats: *mut DXGI_FRAME_STATISTICS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4145,9 +4145,9 @@ pub struct IDXGIOutput1_Vtbl { #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] pub trait IDXGIOutput1_Impl: IDXGIOutput_Impl { fn GetDisplayModeList1(&self, enumformat: Common::DXGI_FORMAT, flags: DXGI_ENUM_MODES, pnummodes: *mut u32, pdesc: *mut DXGI_MODE_DESC1) -> windows_core::Result<()>; - fn FindClosestMatchingMode1(&self, pmodetomatch: *const DXGI_MODE_DESC1, pclosestmatch: *mut DXGI_MODE_DESC1, pconcerneddevice: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn GetDisplaySurfaceData1(&self, pdestination: Option<&IDXGIResource>) -> windows_core::Result<()>; - fn DuplicateOutput(&self, pdevice: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn FindClosestMatchingMode1(&self, pmodetomatch: *const DXGI_MODE_DESC1, pclosestmatch: *mut DXGI_MODE_DESC1, pconcerneddevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetDisplaySurfaceData1(&self, pdestination: windows_core::Ref<'_, IDXGIResource>) -> windows_core::Result<()>; + fn DuplicateOutput(&self, pdevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] impl IDXGIOutput1_Vtbl { @@ -4158,15 +4158,15 @@ impl IDXGIOutput1_Vtbl { } unsafe extern "system" fn FindClosestMatchingMode1(this: *mut core::ffi::c_void, pmodetomatch: *const DXGI_MODE_DESC1, pclosestmatch: *mut DXGI_MODE_DESC1, pconcerneddevice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXGIOutput1_Impl::FindClosestMatchingMode1(this, core::mem::transmute_copy(&pmodetomatch), core::mem::transmute_copy(&pclosestmatch), windows_core::from_raw_borrowed(&pconcerneddevice)).into() + IDXGIOutput1_Impl::FindClosestMatchingMode1(this, core::mem::transmute_copy(&pmodetomatch), core::mem::transmute_copy(&pclosestmatch), core::mem::transmute_copy(&pconcerneddevice)).into() } unsafe extern "system" fn GetDisplaySurfaceData1(this: *mut core::ffi::c_void, pdestination: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXGIOutput1_Impl::GetDisplaySurfaceData1(this, windows_core::from_raw_borrowed(&pdestination)).into() + IDXGIOutput1_Impl::GetDisplaySurfaceData1(this, core::mem::transmute_copy(&pdestination)).into() } unsafe extern "system" fn DuplicateOutput(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, ppoutputduplication: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXGIOutput1_Impl::DuplicateOutput(this, windows_core::from_raw_borrowed(&pdevice)) { + match IDXGIOutput1_Impl::DuplicateOutput(this, core::mem::transmute_copy(&pdevice)) { Ok(ok__) => { ppoutputduplication.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4261,14 +4261,14 @@ pub struct IDXGIOutput3_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] pub trait IDXGIOutput3_Impl: IDXGIOutput2_Impl { - fn CheckOverlaySupport(&self, enumformat: Common::DXGI_FORMAT, pconcerneddevice: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CheckOverlaySupport(&self, enumformat: Common::DXGI_FORMAT, pconcerneddevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] impl IDXGIOutput3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CheckOverlaySupport(this: *mut core::ffi::c_void, enumformat: Common::DXGI_FORMAT, pconcerneddevice: *mut core::ffi::c_void, pflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXGIOutput3_Impl::CheckOverlaySupport(this, core::mem::transmute_copy(&enumformat), windows_core::from_raw_borrowed(&pconcerneddevice)) { + match IDXGIOutput3_Impl::CheckOverlaySupport(this, core::mem::transmute_copy(&enumformat), core::mem::transmute_copy(&pconcerneddevice)) { Ok(ok__) => { pflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4316,14 +4316,14 @@ pub struct IDXGIOutput4_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] pub trait IDXGIOutput4_Impl: IDXGIOutput3_Impl { - fn CheckOverlayColorSpaceSupport(&self, format: Common::DXGI_FORMAT, colorspace: Common::DXGI_COLOR_SPACE_TYPE, pconcerneddevice: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CheckOverlayColorSpaceSupport(&self, format: Common::DXGI_FORMAT, colorspace: Common::DXGI_COLOR_SPACE_TYPE, pconcerneddevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] impl IDXGIOutput4_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CheckOverlayColorSpaceSupport(this: *mut core::ffi::c_void, format: Common::DXGI_FORMAT, colorspace: Common::DXGI_COLOR_SPACE_TYPE, pconcerneddevice: *mut core::ffi::c_void, pflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXGIOutput4_Impl::CheckOverlayColorSpaceSupport(this, core::mem::transmute_copy(&format), core::mem::transmute_copy(&colorspace), windows_core::from_raw_borrowed(&pconcerneddevice)) { + match IDXGIOutput4_Impl::CheckOverlayColorSpaceSupport(this, core::mem::transmute_copy(&format), core::mem::transmute_copy(&colorspace), core::mem::transmute_copy(&pconcerneddevice)) { Ok(ok__) => { pflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4371,14 +4371,14 @@ pub struct IDXGIOutput5_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] pub trait IDXGIOutput5_Impl: IDXGIOutput4_Impl { - fn DuplicateOutput1(&self, pdevice: Option<&windows_core::IUnknown>, flags: u32, supportedformatscount: u32, psupportedformats: *const Common::DXGI_FORMAT) -> windows_core::Result; + fn DuplicateOutput1(&self, pdevice: windows_core::Ref<'_, windows_core::IUnknown>, flags: u32, supportedformatscount: u32, psupportedformats: *const Common::DXGI_FORMAT) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] impl IDXGIOutput5_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DuplicateOutput1(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, flags: u32, supportedformatscount: u32, psupportedformats: *const Common::DXGI_FORMAT, ppoutputduplication: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDXGIOutput5_Impl::DuplicateOutput1(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&supportedformatscount), core::mem::transmute_copy(&psupportedformats)) { + match IDXGIOutput5_Impl::DuplicateOutput1(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&supportedformatscount), core::mem::transmute_copy(&psupportedformats)) { Ok(ok__) => { ppoutputduplication.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4526,7 +4526,7 @@ pub struct IDXGIOutputDuplication_Vtbl { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub trait IDXGIOutputDuplication_Impl: IDXGIObject_Impl { fn GetDesc(&self, pdesc: *mut DXGI_OUTDUPL_DESC); - fn AcquireNextFrame(&self, timeoutinmilliseconds: u32, pframeinfo: *mut DXGI_OUTDUPL_FRAME_INFO, ppdesktopresource: *mut Option) -> windows_core::Result<()>; + fn AcquireNextFrame(&self, timeoutinmilliseconds: u32, pframeinfo: *mut DXGI_OUTDUPL_FRAME_INFO, ppdesktopresource: windows_core::OutRef<'_, IDXGIResource>) -> windows_core::Result<()>; fn GetFrameDirtyRects(&self, dirtyrectsbuffersize: u32, pdirtyrectsbuffer: *mut super::super::Foundation::RECT, pdirtyrectsbuffersizerequired: *mut u32) -> windows_core::Result<()>; fn GetFrameMoveRects(&self, moverectsbuffersize: u32, pmoverectbuffer: *mut DXGI_OUTDUPL_MOVE_RECT, pmoverectsbuffersizerequired: *mut u32) -> windows_core::Result<()>; fn GetFramePointerShape(&self, pointershapebuffersize: u32, ppointershapebuffer: *mut core::ffi::c_void, ppointershapebuffersizerequired: *mut u32, ppointershapeinfo: *mut DXGI_OUTDUPL_POINTER_SHAPE_INFO) -> windows_core::Result<()>; @@ -5023,8 +5023,8 @@ pub struct IDXGISwapChain_Vtbl { pub trait IDXGISwapChain_Impl: IDXGIDeviceSubObject_Impl { fn Present(&self, syncinterval: u32, flags: DXGI_PRESENT) -> windows_core::HRESULT; fn GetBuffer(&self, buffer: u32, riid: *const windows_core::GUID, ppsurface: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn SetFullscreenState(&self, fullscreen: super::super::Foundation::BOOL, ptarget: Option<&IDXGIOutput>) -> windows_core::Result<()>; - fn GetFullscreenState(&self, pfullscreen: *mut super::super::Foundation::BOOL, pptarget: *mut Option) -> windows_core::Result<()>; + fn SetFullscreenState(&self, fullscreen: super::super::Foundation::BOOL, ptarget: windows_core::Ref<'_, IDXGIOutput>) -> windows_core::Result<()>; + fn GetFullscreenState(&self, pfullscreen: *mut super::super::Foundation::BOOL, pptarget: windows_core::OutRef<'_, IDXGIOutput>) -> windows_core::Result<()>; fn GetDesc(&self) -> windows_core::Result; fn ResizeBuffers(&self, buffercount: u32, width: u32, height: u32, newformat: Common::DXGI_FORMAT, swapchainflags: &DXGI_SWAP_CHAIN_FLAG) -> windows_core::Result<()>; fn ResizeTarget(&self, pnewtargetparameters: *const Common::DXGI_MODE_DESC) -> windows_core::Result<()>; @@ -5045,7 +5045,7 @@ impl IDXGISwapChain_Vtbl { } unsafe extern "system" fn SetFullscreenState(this: *mut core::ffi::c_void, fullscreen: super::super::Foundation::BOOL, ptarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXGISwapChain_Impl::SetFullscreenState(this, core::mem::transmute_copy(&fullscreen), windows_core::from_raw_borrowed(&ptarget)).into() + IDXGISwapChain_Impl::SetFullscreenState(this, core::mem::transmute_copy(&fullscreen), core::mem::transmute_copy(&ptarget)).into() } unsafe extern "system" fn GetFullscreenState(this: *mut core::ffi::c_void, pfullscreen: *mut super::super::Foundation::BOOL, pptarget: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/D2D/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/D2D/mod.rs index 529425c85b..6dfcddedfc 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/D2D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/D2D/mod.rs @@ -44,24 +44,24 @@ pub struct IWICImageEncoder_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] pub trait IWICImageEncoder_Impl: windows_core::IUnknownImpl { - fn WriteFrame(&self, pimage: Option<&super::super::Direct2D::ID2D1Image>, pframeencode: Option<&super::IWICBitmapFrameEncode>, pimageparameters: *const super::WICImageParameters) -> windows_core::Result<()>; - fn WriteFrameThumbnail(&self, pimage: Option<&super::super::Direct2D::ID2D1Image>, pframeencode: Option<&super::IWICBitmapFrameEncode>, pimageparameters: *const super::WICImageParameters) -> windows_core::Result<()>; - fn WriteThumbnail(&self, pimage: Option<&super::super::Direct2D::ID2D1Image>, pencoder: Option<&super::IWICBitmapEncoder>, pimageparameters: *const super::WICImageParameters) -> windows_core::Result<()>; + fn WriteFrame(&self, pimage: windows_core::Ref<'_, super::super::Direct2D::ID2D1Image>, pframeencode: windows_core::Ref<'_, super::IWICBitmapFrameEncode>, pimageparameters: *const super::WICImageParameters) -> windows_core::Result<()>; + fn WriteFrameThumbnail(&self, pimage: windows_core::Ref<'_, super::super::Direct2D::ID2D1Image>, pframeencode: windows_core::Ref<'_, super::IWICBitmapFrameEncode>, pimageparameters: *const super::WICImageParameters) -> windows_core::Result<()>; + fn WriteThumbnail(&self, pimage: windows_core::Ref<'_, super::super::Direct2D::ID2D1Image>, pencoder: windows_core::Ref<'_, super::IWICBitmapEncoder>, pimageparameters: *const super::WICImageParameters) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] impl IWICImageEncoder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn WriteFrame(this: *mut core::ffi::c_void, pimage: *mut core::ffi::c_void, pframeencode: *mut core::ffi::c_void, pimageparameters: *const super::WICImageParameters) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICImageEncoder_Impl::WriteFrame(this, windows_core::from_raw_borrowed(&pimage), windows_core::from_raw_borrowed(&pframeencode), core::mem::transmute_copy(&pimageparameters)).into() + IWICImageEncoder_Impl::WriteFrame(this, core::mem::transmute_copy(&pimage), core::mem::transmute_copy(&pframeencode), core::mem::transmute_copy(&pimageparameters)).into() } unsafe extern "system" fn WriteFrameThumbnail(this: *mut core::ffi::c_void, pimage: *mut core::ffi::c_void, pframeencode: *mut core::ffi::c_void, pimageparameters: *const super::WICImageParameters) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICImageEncoder_Impl::WriteFrameThumbnail(this, windows_core::from_raw_borrowed(&pimage), windows_core::from_raw_borrowed(&pframeencode), core::mem::transmute_copy(&pimageparameters)).into() + IWICImageEncoder_Impl::WriteFrameThumbnail(this, core::mem::transmute_copy(&pimage), core::mem::transmute_copy(&pframeencode), core::mem::transmute_copy(&pimageparameters)).into() } unsafe extern "system" fn WriteThumbnail(this: *mut core::ffi::c_void, pimage: *mut core::ffi::c_void, pencoder: *mut core::ffi::c_void, pimageparameters: *const super::WICImageParameters) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICImageEncoder_Impl::WriteThumbnail(this, windows_core::from_raw_borrowed(&pimage), windows_core::from_raw_borrowed(&pencoder), core::mem::transmute_copy(&pimageparameters)).into() + IWICImageEncoder_Impl::WriteThumbnail(this, core::mem::transmute_copy(&pimage), core::mem::transmute_copy(&pencoder), core::mem::transmute_copy(&pimageparameters)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -104,14 +104,14 @@ pub struct IWICImagingFactory2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct2D", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IWICImagingFactory2_Impl: super::IWICImagingFactory_Impl { - fn CreateImageEncoder(&self, pd2ddevice: Option<&super::super::Direct2D::ID2D1Device>) -> windows_core::Result; + fn CreateImageEncoder(&self, pd2ddevice: windows_core::Ref<'_, super::super::Direct2D::ID2D1Device>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Direct2D", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_UI_WindowsAndMessaging"))] impl IWICImagingFactory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateImageEncoder(this: *mut core::ffi::c_void, pd2ddevice: *mut core::ffi::c_void, ppwicimageencoder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICImagingFactory2_Impl::CreateImageEncoder(this, windows_core::from_raw_borrowed(&pd2ddevice)) { + match IWICImagingFactory2_Impl::CreateImageEncoder(this, core::mem::transmute_copy(&pd2ddevice)) { Ok(ok__) => { ppwicimageencoder.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs index e00cd72ada..9d8399b59a 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs @@ -370,7 +370,7 @@ pub struct IWICBitmap_Vtbl { } pub trait IWICBitmap_Impl: IWICBitmapSource_Impl { fn Lock(&self, prclock: *const WICRect, flags: u32) -> windows_core::Result; - fn SetPalette(&self, pipalette: Option<&IWICPalette>) -> windows_core::Result<()>; + fn SetPalette(&self, pipalette: windows_core::Ref<'_, IWICPalette>) -> windows_core::Result<()>; fn SetResolution(&self, dpix: f64, dpiy: f64) -> windows_core::Result<()>; } impl IWICBitmap_Vtbl { @@ -387,7 +387,7 @@ impl IWICBitmap_Vtbl { } unsafe extern "system" fn SetPalette(this: *mut core::ffi::c_void, pipalette: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmap_Impl::SetPalette(this, windows_core::from_raw_borrowed(&pipalette)).into() + IWICBitmap_Impl::SetPalette(this, core::mem::transmute_copy(&pipalette)).into() } unsafe extern "system" fn SetResolution(this: *mut core::ffi::c_void, dpix: f64, dpiy: f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -427,13 +427,13 @@ pub struct IWICBitmapClipper_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const WICRect) -> windows_core::HRESULT, } pub trait IWICBitmapClipper_Impl: IWICBitmapSource_Impl { - fn Initialize(&self, pisource: Option<&IWICBitmapSource>, prc: *const WICRect) -> windows_core::Result<()>; + fn Initialize(&self, pisource: windows_core::Ref<'_, IWICBitmapSource>, prc: *const WICRect) -> windows_core::Result<()>; } impl IWICBitmapClipper_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pisource: *mut core::ffi::c_void, prc: *const WICRect) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapClipper_Impl::Initialize(this, windows_core::from_raw_borrowed(&pisource), core::mem::transmute_copy(&prc)).into() + IWICBitmapClipper_Impl::Initialize(this, core::mem::transmute_copy(&pisource), core::mem::transmute_copy(&prc)).into() } Self { base__: IWICBitmapSource_Vtbl::new::(), Initialize: Initialize:: } } @@ -741,14 +741,14 @@ pub struct IWICBitmapDecoder_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWICBitmapDecoder_Impl: windows_core::IUnknownImpl { - fn QueryCapability(&self, pistream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; - fn Initialize(&self, pistream: Option<&super::super::System::Com::IStream>, cacheoptions: WICDecodeOptions) -> windows_core::Result<()>; + fn QueryCapability(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; + fn Initialize(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>, cacheoptions: WICDecodeOptions) -> windows_core::Result<()>; fn GetContainerFormat(&self) -> windows_core::Result; fn GetDecoderInfo(&self) -> windows_core::Result; - fn CopyPalette(&self, pipalette: Option<&IWICPalette>) -> windows_core::Result<()>; + fn CopyPalette(&self, pipalette: windows_core::Ref<'_, IWICPalette>) -> windows_core::Result<()>; fn GetMetadataQueryReader(&self) -> windows_core::Result; fn GetPreview(&self) -> windows_core::Result; - fn GetColorContexts(&self, ccount: u32, ppicolorcontexts: *mut Option, pcactualcount: *mut u32) -> windows_core::Result<()>; + fn GetColorContexts(&self, ccount: u32, ppicolorcontexts: windows_core::OutRef<'_, IWICColorContext>, pcactualcount: *mut u32) -> windows_core::Result<()>; fn GetThumbnail(&self) -> windows_core::Result; fn GetFrameCount(&self) -> windows_core::Result; fn GetFrame(&self, index: u32) -> windows_core::Result; @@ -758,7 +758,7 @@ impl IWICBitmapDecoder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryCapability(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, pdwcapability: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICBitmapDecoder_Impl::QueryCapability(this, windows_core::from_raw_borrowed(&pistream)) { + match IWICBitmapDecoder_Impl::QueryCapability(this, core::mem::transmute_copy(&pistream)) { Ok(ok__) => { pdwcapability.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -768,7 +768,7 @@ impl IWICBitmapDecoder_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, cacheoptions: WICDecodeOptions) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapDecoder_Impl::Initialize(this, windows_core::from_raw_borrowed(&pistream), core::mem::transmute_copy(&cacheoptions)).into() + IWICBitmapDecoder_Impl::Initialize(this, core::mem::transmute_copy(&pistream), core::mem::transmute_copy(&cacheoptions)).into() } unsafe extern "system" fn GetContainerFormat(this: *mut core::ffi::c_void, pguidcontainerformat: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -792,7 +792,7 @@ impl IWICBitmapDecoder_Vtbl { } unsafe extern "system" fn CopyPalette(this: *mut core::ffi::c_void, pipalette: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapDecoder_Impl::CopyPalette(this, windows_core::from_raw_borrowed(&pipalette)).into() + IWICBitmapDecoder_Impl::CopyPalette(this, core::mem::transmute_copy(&pipalette)).into() } unsafe extern "system" fn GetMetadataQueryReader(this: *mut core::ffi::c_void, ppimetadataqueryreader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -907,7 +907,7 @@ pub struct IWICBitmapDecoderInfo_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IWICBitmapDecoderInfo_Impl: IWICBitmapCodecInfo_Impl { fn GetPatterns(&self, cbsizepatterns: u32, ppatterns: *mut WICBitmapPattern, pcpatterns: *mut u32, pcbpatternsactual: *mut u32) -> windows_core::Result<()>; - fn MatchesPattern(&self, pistream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn MatchesPattern(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn CreateInstance(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -919,7 +919,7 @@ impl IWICBitmapDecoderInfo_Vtbl { } unsafe extern "system" fn MatchesPattern(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, pfmatches: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICBitmapDecoderInfo_Impl::MatchesPattern(this, windows_core::from_raw_borrowed(&pistream)) { + match IWICBitmapDecoderInfo_Impl::MatchesPattern(this, core::mem::transmute_copy(&pistream)) { Ok(ok__) => { pfmatches.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1023,14 +1023,14 @@ pub struct IWICBitmapEncoder_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait IWICBitmapEncoder_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pistream: Option<&super::super::System::Com::IStream>, cacheoption: WICBitmapEncoderCacheOption) -> windows_core::Result<()>; + fn Initialize(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>, cacheoption: WICBitmapEncoderCacheOption) -> windows_core::Result<()>; fn GetContainerFormat(&self) -> windows_core::Result; fn GetEncoderInfo(&self) -> windows_core::Result; fn SetColorContexts(&self, ccount: u32, ppicolorcontext: *const Option) -> windows_core::Result<()>; - fn SetPalette(&self, pipalette: Option<&IWICPalette>) -> windows_core::Result<()>; - fn SetThumbnail(&self, pithumbnail: Option<&IWICBitmapSource>) -> windows_core::Result<()>; - fn SetPreview(&self, pipreview: Option<&IWICBitmapSource>) -> windows_core::Result<()>; - fn CreateNewFrame(&self, ppiframeencode: *mut Option, ppiencoderoptions: *mut Option) -> windows_core::Result<()>; + fn SetPalette(&self, pipalette: windows_core::Ref<'_, IWICPalette>) -> windows_core::Result<()>; + fn SetThumbnail(&self, pithumbnail: windows_core::Ref<'_, IWICBitmapSource>) -> windows_core::Result<()>; + fn SetPreview(&self, pipreview: windows_core::Ref<'_, IWICBitmapSource>) -> windows_core::Result<()>; + fn CreateNewFrame(&self, ppiframeencode: windows_core::OutRef<'_, IWICBitmapFrameEncode>, ppiencoderoptions: windows_core::OutRef<'_, super::super::System::Com::StructuredStorage::IPropertyBag2>) -> windows_core::Result<()>; fn Commit(&self) -> windows_core::Result<()>; fn GetMetadataQueryWriter(&self) -> windows_core::Result; } @@ -1039,7 +1039,7 @@ impl IWICBitmapEncoder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, cacheoption: WICBitmapEncoderCacheOption) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapEncoder_Impl::Initialize(this, windows_core::from_raw_borrowed(&pistream), core::mem::transmute_copy(&cacheoption)).into() + IWICBitmapEncoder_Impl::Initialize(this, core::mem::transmute_copy(&pistream), core::mem::transmute_copy(&cacheoption)).into() } unsafe extern "system" fn GetContainerFormat(this: *mut core::ffi::c_void, pguidcontainerformat: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1067,15 +1067,15 @@ impl IWICBitmapEncoder_Vtbl { } unsafe extern "system" fn SetPalette(this: *mut core::ffi::c_void, pipalette: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapEncoder_Impl::SetPalette(this, windows_core::from_raw_borrowed(&pipalette)).into() + IWICBitmapEncoder_Impl::SetPalette(this, core::mem::transmute_copy(&pipalette)).into() } unsafe extern "system" fn SetThumbnail(this: *mut core::ffi::c_void, pithumbnail: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapEncoder_Impl::SetThumbnail(this, windows_core::from_raw_borrowed(&pithumbnail)).into() + IWICBitmapEncoder_Impl::SetThumbnail(this, core::mem::transmute_copy(&pithumbnail)).into() } unsafe extern "system" fn SetPreview(this: *mut core::ffi::c_void, pipreview: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapEncoder_Impl::SetPreview(this, windows_core::from_raw_borrowed(&pipreview)).into() + IWICBitmapEncoder_Impl::SetPreview(this, core::mem::transmute_copy(&pipreview)).into() } unsafe extern "system" fn CreateNewFrame(this: *mut core::ffi::c_void, ppiframeencode: *mut *mut core::ffi::c_void, ppiencoderoptions: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1178,13 +1178,13 @@ pub struct IWICBitmapFlipRotator_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, WICBitmapTransformOptions) -> windows_core::HRESULT, } pub trait IWICBitmapFlipRotator_Impl: IWICBitmapSource_Impl { - fn Initialize(&self, pisource: Option<&IWICBitmapSource>, options: WICBitmapTransformOptions) -> windows_core::Result<()>; + fn Initialize(&self, pisource: windows_core::Ref<'_, IWICBitmapSource>, options: WICBitmapTransformOptions) -> windows_core::Result<()>; } impl IWICBitmapFlipRotator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pisource: *mut core::ffi::c_void, options: WICBitmapTransformOptions) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapFlipRotator_Impl::Initialize(this, windows_core::from_raw_borrowed(&pisource), core::mem::transmute_copy(&options)).into() + IWICBitmapFlipRotator_Impl::Initialize(this, core::mem::transmute_copy(&pisource), core::mem::transmute_copy(&options)).into() } Self { base__: IWICBitmapSource_Vtbl::new::(), Initialize: Initialize:: } } @@ -1223,7 +1223,7 @@ pub struct IWICBitmapFrameDecode_Vtbl { } pub trait IWICBitmapFrameDecode_Impl: IWICBitmapSource_Impl { fn GetMetadataQueryReader(&self) -> windows_core::Result; - fn GetColorContexts(&self, ccount: u32, ppicolorcontexts: *mut Option, pcactualcount: *mut u32) -> windows_core::Result<()>; + fn GetColorContexts(&self, ccount: u32, ppicolorcontexts: windows_core::OutRef<'_, IWICColorContext>, pcactualcount: *mut u32) -> windows_core::Result<()>; fn GetThumbnail(&self) -> windows_core::Result; } impl IWICBitmapFrameDecode_Vtbl { @@ -1335,15 +1335,15 @@ pub struct IWICBitmapFrameEncode_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait IWICBitmapFrameEncode_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, piencoderoptions: Option<&super::super::System::Com::StructuredStorage::IPropertyBag2>) -> windows_core::Result<()>; + fn Initialize(&self, piencoderoptions: windows_core::Ref<'_, super::super::System::Com::StructuredStorage::IPropertyBag2>) -> windows_core::Result<()>; fn SetSize(&self, uiwidth: u32, uiheight: u32) -> windows_core::Result<()>; fn SetResolution(&self, dpix: f64, dpiy: f64) -> windows_core::Result<()>; fn SetPixelFormat(&self, ppixelformat: *mut windows_core::GUID) -> windows_core::Result<()>; fn SetColorContexts(&self, ccount: u32, ppicolorcontext: *const Option) -> windows_core::Result<()>; - fn SetPalette(&self, pipalette: Option<&IWICPalette>) -> windows_core::Result<()>; - fn SetThumbnail(&self, pithumbnail: Option<&IWICBitmapSource>) -> windows_core::Result<()>; + fn SetPalette(&self, pipalette: windows_core::Ref<'_, IWICPalette>) -> windows_core::Result<()>; + fn SetThumbnail(&self, pithumbnail: windows_core::Ref<'_, IWICBitmapSource>) -> windows_core::Result<()>; fn WritePixels(&self, linecount: u32, cbstride: u32, cbbuffersize: u32, pbpixels: *const u8) -> windows_core::Result<()>; - fn WriteSource(&self, pibitmapsource: Option<&IWICBitmapSource>, prc: *const WICRect) -> windows_core::Result<()>; + fn WriteSource(&self, pibitmapsource: windows_core::Ref<'_, IWICBitmapSource>, prc: *const WICRect) -> windows_core::Result<()>; fn Commit(&self) -> windows_core::Result<()>; fn GetMetadataQueryWriter(&self) -> windows_core::Result; } @@ -1352,7 +1352,7 @@ impl IWICBitmapFrameEncode_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, piencoderoptions: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapFrameEncode_Impl::Initialize(this, windows_core::from_raw_borrowed(&piencoderoptions)).into() + IWICBitmapFrameEncode_Impl::Initialize(this, core::mem::transmute_copy(&piencoderoptions)).into() } unsafe extern "system" fn SetSize(this: *mut core::ffi::c_void, uiwidth: u32, uiheight: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1372,11 +1372,11 @@ impl IWICBitmapFrameEncode_Vtbl { } unsafe extern "system" fn SetPalette(this: *mut core::ffi::c_void, pipalette: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapFrameEncode_Impl::SetPalette(this, windows_core::from_raw_borrowed(&pipalette)).into() + IWICBitmapFrameEncode_Impl::SetPalette(this, core::mem::transmute_copy(&pipalette)).into() } unsafe extern "system" fn SetThumbnail(this: *mut core::ffi::c_void, pithumbnail: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapFrameEncode_Impl::SetThumbnail(this, windows_core::from_raw_borrowed(&pithumbnail)).into() + IWICBitmapFrameEncode_Impl::SetThumbnail(this, core::mem::transmute_copy(&pithumbnail)).into() } unsafe extern "system" fn WritePixels(this: *mut core::ffi::c_void, linecount: u32, cbstride: u32, cbbuffersize: u32, pbpixels: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1384,7 +1384,7 @@ impl IWICBitmapFrameEncode_Vtbl { } unsafe extern "system" fn WriteSource(this: *mut core::ffi::c_void, pibitmapsource: *mut core::ffi::c_void, prc: *const WICRect) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapFrameEncode_Impl::WriteSource(this, windows_core::from_raw_borrowed(&pibitmapsource), core::mem::transmute_copy(&prc)).into() + IWICBitmapFrameEncode_Impl::WriteSource(this, core::mem::transmute_copy(&pibitmapsource), core::mem::transmute_copy(&prc)).into() } unsafe extern "system" fn Commit(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1518,13 +1518,13 @@ pub struct IWICBitmapScaler_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32, WICBitmapInterpolationMode) -> windows_core::HRESULT, } pub trait IWICBitmapScaler_Impl: IWICBitmapSource_Impl { - fn Initialize(&self, pisource: Option<&IWICBitmapSource>, uiwidth: u32, uiheight: u32, mode: WICBitmapInterpolationMode) -> windows_core::Result<()>; + fn Initialize(&self, pisource: windows_core::Ref<'_, IWICBitmapSource>, uiwidth: u32, uiheight: u32, mode: WICBitmapInterpolationMode) -> windows_core::Result<()>; } impl IWICBitmapScaler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pisource: *mut core::ffi::c_void, uiwidth: u32, uiheight: u32, mode: WICBitmapInterpolationMode) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapScaler_Impl::Initialize(this, windows_core::from_raw_borrowed(&pisource), core::mem::transmute_copy(&uiwidth), core::mem::transmute_copy(&uiheight), core::mem::transmute_copy(&mode)).into() + IWICBitmapScaler_Impl::Initialize(this, core::mem::transmute_copy(&pisource), core::mem::transmute_copy(&uiwidth), core::mem::transmute_copy(&uiheight), core::mem::transmute_copy(&mode)).into() } Self { base__: IWICBitmapSource_Vtbl::new::(), Initialize: Initialize:: } } @@ -1569,7 +1569,7 @@ pub trait IWICBitmapSource_Impl: windows_core::IUnknownImpl { fn GetSize(&self, puiwidth: *mut u32, puiheight: *mut u32) -> windows_core::Result<()>; fn GetPixelFormat(&self) -> windows_core::Result; fn GetResolution(&self, pdpix: *mut f64, pdpiy: *mut f64) -> windows_core::Result<()>; - fn CopyPalette(&self, pipalette: Option<&IWICPalette>) -> windows_core::Result<()>; + fn CopyPalette(&self, pipalette: windows_core::Ref<'_, IWICPalette>) -> windows_core::Result<()>; fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, cbbuffersize: u32, pbbuffer: *mut u8) -> windows_core::Result<()>; } impl IWICBitmapSource_Vtbl { @@ -1594,7 +1594,7 @@ impl IWICBitmapSource_Vtbl { } unsafe extern "system" fn CopyPalette(this: *mut core::ffi::c_void, pipalette: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICBitmapSource_Impl::CopyPalette(this, windows_core::from_raw_borrowed(&pipalette)).into() + IWICBitmapSource_Impl::CopyPalette(this, core::mem::transmute_copy(&pipalette)).into() } unsafe extern "system" fn CopyPixels(this: *mut core::ffi::c_void, prc: *const WICRect, cbstride: u32, cbbuffersize: u32, pbbuffer: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1804,13 +1804,13 @@ pub struct IWICColorTransform_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait IWICColorTransform_Impl: IWICBitmapSource_Impl { - fn Initialize(&self, pibitmapsource: Option<&IWICBitmapSource>, picontextsource: Option<&IWICColorContext>, picontextdest: Option<&IWICColorContext>, pixelfmtdest: *const windows_core::GUID) -> windows_core::Result<()>; + fn Initialize(&self, pibitmapsource: windows_core::Ref<'_, IWICBitmapSource>, picontextsource: windows_core::Ref<'_, IWICColorContext>, picontextdest: windows_core::Ref<'_, IWICColorContext>, pixelfmtdest: *const windows_core::GUID) -> windows_core::Result<()>; } impl IWICColorTransform_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pibitmapsource: *mut core::ffi::c_void, picontextsource: *mut core::ffi::c_void, picontextdest: *mut core::ffi::c_void, pixelfmtdest: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICColorTransform_Impl::Initialize(this, windows_core::from_raw_borrowed(&pibitmapsource), windows_core::from_raw_borrowed(&picontextsource), windows_core::from_raw_borrowed(&picontextdest), core::mem::transmute_copy(&pixelfmtdest)).into() + IWICColorTransform_Impl::Initialize(this, core::mem::transmute_copy(&pibitmapsource), core::mem::transmute_copy(&picontextsource), core::mem::transmute_copy(&picontextdest), core::mem::transmute_copy(&pixelfmtdest)).into() } Self { base__: IWICBitmapSource_Vtbl::new::(), Initialize: Initialize:: } } @@ -1897,12 +1897,12 @@ pub struct IWICComponentFactory_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IWICComponentFactory_Impl: IWICImagingFactory_Impl { - fn CreateMetadataReader(&self, guidmetadataformat: *const windows_core::GUID, pguidvendor: *const windows_core::GUID, dwoptions: u32, pistream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; - fn CreateMetadataReaderFromContainer(&self, guidcontainerformat: *const windows_core::GUID, pguidvendor: *const windows_core::GUID, dwoptions: u32, pistream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateMetadataReader(&self, guidmetadataformat: *const windows_core::GUID, pguidvendor: *const windows_core::GUID, dwoptions: u32, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateMetadataReaderFromContainer(&self, guidcontainerformat: *const windows_core::GUID, pguidvendor: *const windows_core::GUID, dwoptions: u32, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn CreateMetadataWriter(&self, guidmetadataformat: *const windows_core::GUID, pguidvendor: *const windows_core::GUID, dwmetadataoptions: u32) -> windows_core::Result; - fn CreateMetadataWriterFromReader(&self, pireader: Option<&IWICMetadataReader>, pguidvendor: *const windows_core::GUID) -> windows_core::Result; - fn CreateQueryReaderFromBlockReader(&self, piblockreader: Option<&IWICMetadataBlockReader>) -> windows_core::Result; - fn CreateQueryWriterFromBlockWriter(&self, piblockwriter: Option<&IWICMetadataBlockWriter>) -> windows_core::Result; + fn CreateMetadataWriterFromReader(&self, pireader: windows_core::Ref<'_, IWICMetadataReader>, pguidvendor: *const windows_core::GUID) -> windows_core::Result; + fn CreateQueryReaderFromBlockReader(&self, piblockreader: windows_core::Ref<'_, IWICMetadataBlockReader>) -> windows_core::Result; + fn CreateQueryWriterFromBlockWriter(&self, piblockwriter: windows_core::Ref<'_, IWICMetadataBlockWriter>) -> windows_core::Result; fn CreateEncoderPropertyBag(&self, ppropoptions: *const super::super::System::Com::StructuredStorage::PROPBAG2, ccount: u32) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_WindowsAndMessaging"))] @@ -1910,7 +1910,7 @@ impl IWICComponentFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateMetadataReader(this: *mut core::ffi::c_void, guidmetadataformat: *const windows_core::GUID, pguidvendor: *const windows_core::GUID, dwoptions: u32, pistream: *mut core::ffi::c_void, ppireader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICComponentFactory_Impl::CreateMetadataReader(this, core::mem::transmute_copy(&guidmetadataformat), core::mem::transmute_copy(&pguidvendor), core::mem::transmute_copy(&dwoptions), windows_core::from_raw_borrowed(&pistream)) { + match IWICComponentFactory_Impl::CreateMetadataReader(this, core::mem::transmute_copy(&guidmetadataformat), core::mem::transmute_copy(&pguidvendor), core::mem::transmute_copy(&dwoptions), core::mem::transmute_copy(&pistream)) { Ok(ok__) => { ppireader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1920,7 +1920,7 @@ impl IWICComponentFactory_Vtbl { } unsafe extern "system" fn CreateMetadataReaderFromContainer(this: *mut core::ffi::c_void, guidcontainerformat: *const windows_core::GUID, pguidvendor: *const windows_core::GUID, dwoptions: u32, pistream: *mut core::ffi::c_void, ppireader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICComponentFactory_Impl::CreateMetadataReaderFromContainer(this, core::mem::transmute_copy(&guidcontainerformat), core::mem::transmute_copy(&pguidvendor), core::mem::transmute_copy(&dwoptions), windows_core::from_raw_borrowed(&pistream)) { + match IWICComponentFactory_Impl::CreateMetadataReaderFromContainer(this, core::mem::transmute_copy(&guidcontainerformat), core::mem::transmute_copy(&pguidvendor), core::mem::transmute_copy(&dwoptions), core::mem::transmute_copy(&pistream)) { Ok(ok__) => { ppireader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1940,7 +1940,7 @@ impl IWICComponentFactory_Vtbl { } unsafe extern "system" fn CreateMetadataWriterFromReader(this: *mut core::ffi::c_void, pireader: *mut core::ffi::c_void, pguidvendor: *const windows_core::GUID, ppiwriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICComponentFactory_Impl::CreateMetadataWriterFromReader(this, windows_core::from_raw_borrowed(&pireader), core::mem::transmute_copy(&pguidvendor)) { + match IWICComponentFactory_Impl::CreateMetadataWriterFromReader(this, core::mem::transmute_copy(&pireader), core::mem::transmute_copy(&pguidvendor)) { Ok(ok__) => { ppiwriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1950,7 +1950,7 @@ impl IWICComponentFactory_Vtbl { } unsafe extern "system" fn CreateQueryReaderFromBlockReader(this: *mut core::ffi::c_void, piblockreader: *mut core::ffi::c_void, ppiqueryreader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICComponentFactory_Impl::CreateQueryReaderFromBlockReader(this, windows_core::from_raw_borrowed(&piblockreader)) { + match IWICComponentFactory_Impl::CreateQueryReaderFromBlockReader(this, core::mem::transmute_copy(&piblockreader)) { Ok(ok__) => { ppiqueryreader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1960,7 +1960,7 @@ impl IWICComponentFactory_Vtbl { } unsafe extern "system" fn CreateQueryWriterFromBlockWriter(this: *mut core::ffi::c_void, piblockwriter: *mut core::ffi::c_void, ppiquerywriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICComponentFactory_Impl::CreateQueryWriterFromBlockWriter(this, windows_core::from_raw_borrowed(&piblockwriter)) { + match IWICComponentFactory_Impl::CreateQueryWriterFromBlockWriter(this, core::mem::transmute_copy(&piblockwriter)) { Ok(ok__) => { ppiquerywriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2211,7 +2211,7 @@ pub struct IWICDdsEncoder_Vtbl { pub trait IWICDdsEncoder_Impl: windows_core::IUnknownImpl { fn SetParameters(&self, pparameters: *const WICDdsParameters) -> windows_core::Result<()>; fn GetParameters(&self, pparameters: *mut WICDdsParameters) -> windows_core::Result<()>; - fn CreateNewFrame(&self, ppiframeencode: *mut Option, parrayindex: *mut u32, pmiplevel: *mut u32, psliceindex: *mut u32) -> windows_core::Result<()>; + fn CreateNewFrame(&self, ppiframeencode: windows_core::OutRef<'_, IWICBitmapFrameEncode>, parrayindex: *mut u32, pmiplevel: *mut u32, psliceindex: *mut u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] impl IWICDdsEncoder_Vtbl { @@ -2496,14 +2496,14 @@ pub trait IWICDevelopRaw_Impl: IWICBitmapFrameDecode_Impl { fn GetTint(&self) -> windows_core::Result; fn SetNoiseReduction(&self, noisereduction: f64) -> windows_core::Result<()>; fn GetNoiseReduction(&self) -> windows_core::Result; - fn SetDestinationColorContext(&self, pcolorcontext: Option<&IWICColorContext>) -> windows_core::Result<()>; + fn SetDestinationColorContext(&self, pcolorcontext: windows_core::Ref<'_, IWICColorContext>) -> windows_core::Result<()>; fn SetToneCurve(&self, cbtonecurvesize: u32, ptonecurve: *const WICRawToneCurve) -> windows_core::Result<()>; fn GetToneCurve(&self, cbtonecurvebuffersize: u32, ptonecurve: *mut WICRawToneCurve, pcbactualtonecurvebuffersize: *mut u32) -> windows_core::Result<()>; fn SetRotation(&self, rotation: f64) -> windows_core::Result<()>; fn GetRotation(&self) -> windows_core::Result; fn SetRenderMode(&self, rendermode: WICRawRenderMode) -> windows_core::Result<()>; fn GetRenderMode(&self) -> windows_core::Result; - fn SetNotificationCallback(&self, pcallback: Option<&IWICDevelopRawNotificationCallback>) -> windows_core::Result<()>; + fn SetNotificationCallback(&self, pcallback: windows_core::Ref<'_, IWICDevelopRawNotificationCallback>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl IWICDevelopRaw_Vtbl { @@ -2666,7 +2666,7 @@ impl IWICDevelopRaw_Vtbl { } unsafe extern "system" fn SetDestinationColorContext(this: *mut core::ffi::c_void, pcolorcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICDevelopRaw_Impl::SetDestinationColorContext(this, windows_core::from_raw_borrowed(&pcolorcontext)).into() + IWICDevelopRaw_Impl::SetDestinationColorContext(this, core::mem::transmute_copy(&pcolorcontext)).into() } unsafe extern "system" fn SetToneCurve(this: *mut core::ffi::c_void, cbtonecurvesize: u32, ptonecurve: *const WICRawToneCurve) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2706,7 +2706,7 @@ impl IWICDevelopRaw_Vtbl { } unsafe extern "system" fn SetNotificationCallback(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICDevelopRaw_Impl::SetNotificationCallback(this, windows_core::from_raw_borrowed(&pcallback)).into() + IWICDevelopRaw_Impl::SetNotificationCallback(this, core::mem::transmute_copy(&pcallback)).into() } Self { base__: IWICBitmapFrameDecode_Vtbl::new::(), @@ -2929,14 +2929,14 @@ pub struct IWICFormatConverter_Vtbl { pub CanConvert: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IWICFormatConverter_Impl: IWICBitmapSource_Impl { - fn Initialize(&self, pisource: Option<&IWICBitmapSource>, dstformat: *const windows_core::GUID, dither: WICBitmapDitherType, pipalette: Option<&IWICPalette>, alphathresholdpercent: f64, palettetranslate: WICBitmapPaletteType) -> windows_core::Result<()>; + fn Initialize(&self, pisource: windows_core::Ref<'_, IWICBitmapSource>, dstformat: *const windows_core::GUID, dither: WICBitmapDitherType, pipalette: windows_core::Ref<'_, IWICPalette>, alphathresholdpercent: f64, palettetranslate: WICBitmapPaletteType) -> windows_core::Result<()>; fn CanConvert(&self, srcpixelformat: *const windows_core::GUID, dstpixelformat: *const windows_core::GUID) -> windows_core::Result; } impl IWICFormatConverter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pisource: *mut core::ffi::c_void, dstformat: *const windows_core::GUID, dither: WICBitmapDitherType, pipalette: *mut core::ffi::c_void, alphathresholdpercent: f64, palettetranslate: WICBitmapPaletteType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICFormatConverter_Impl::Initialize(this, windows_core::from_raw_borrowed(&pisource), core::mem::transmute_copy(&dstformat), core::mem::transmute_copy(&dither), windows_core::from_raw_borrowed(&pipalette), core::mem::transmute_copy(&alphathresholdpercent), core::mem::transmute_copy(&palettetranslate)).into() + IWICFormatConverter_Impl::Initialize(this, core::mem::transmute_copy(&pisource), core::mem::transmute_copy(&dstformat), core::mem::transmute_copy(&dither), core::mem::transmute_copy(&pipalette), core::mem::transmute_copy(&alphathresholdpercent), core::mem::transmute_copy(&palettetranslate)).into() } unsafe extern "system" fn CanConvert(this: *mut core::ffi::c_void, srcpixelformat: *const windows_core::GUID, dstpixelformat: *const windows_core::GUID, pfcanconvert: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3186,7 +3186,7 @@ pub struct IWICImagingFactory_Vtbl { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IWICImagingFactory_Impl: windows_core::IUnknownImpl { fn CreateDecoderFromFilename(&self, wzfilename: &windows_core::PCWSTR, pguidvendor: *const windows_core::GUID, dwdesiredaccess: super::super::Foundation::GENERIC_ACCESS_RIGHTS, metadataoptions: WICDecodeOptions) -> windows_core::Result; - fn CreateDecoderFromStream(&self, pistream: Option<&super::super::System::Com::IStream>, pguidvendor: *const windows_core::GUID, metadataoptions: WICDecodeOptions) -> windows_core::Result; + fn CreateDecoderFromStream(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>, pguidvendor: *const windows_core::GUID, metadataoptions: WICDecodeOptions) -> windows_core::Result; fn CreateDecoderFromFileHandle(&self, hfile: usize, pguidvendor: *const windows_core::GUID, metadataoptions: WICDecodeOptions) -> windows_core::Result; fn CreateComponentInfo(&self, clsidcomponent: *const windows_core::GUID) -> windows_core::Result; fn CreateDecoder(&self, guidcontainerformat: *const windows_core::GUID, pguidvendor: *const windows_core::GUID) -> windows_core::Result; @@ -3200,16 +3200,16 @@ pub trait IWICImagingFactory_Impl: windows_core::IUnknownImpl { fn CreateColorContext(&self) -> windows_core::Result; fn CreateColorTransformer(&self) -> windows_core::Result; fn CreateBitmap(&self, uiwidth: u32, uiheight: u32, pixelformat: *const windows_core::GUID, option: WICBitmapCreateCacheOption) -> windows_core::Result; - fn CreateBitmapFromSource(&self, pibitmapsource: Option<&IWICBitmapSource>, option: WICBitmapCreateCacheOption) -> windows_core::Result; - fn CreateBitmapFromSourceRect(&self, pibitmapsource: Option<&IWICBitmapSource>, x: u32, y: u32, width: u32, height: u32) -> windows_core::Result; + fn CreateBitmapFromSource(&self, pibitmapsource: windows_core::Ref<'_, IWICBitmapSource>, option: WICBitmapCreateCacheOption) -> windows_core::Result; + fn CreateBitmapFromSourceRect(&self, pibitmapsource: windows_core::Ref<'_, IWICBitmapSource>, x: u32, y: u32, width: u32, height: u32) -> windows_core::Result; fn CreateBitmapFromMemory(&self, uiwidth: u32, uiheight: u32, pixelformat: *const windows_core::GUID, cbstride: u32, cbbuffersize: u32, pbbuffer: *const u8) -> windows_core::Result; fn CreateBitmapFromHBITMAP(&self, hbitmap: super::Gdi::HBITMAP, hpalette: super::Gdi::HPALETTE, options: WICBitmapAlphaChannelOption) -> windows_core::Result; fn CreateBitmapFromHICON(&self, hicon: super::super::UI::WindowsAndMessaging::HICON) -> windows_core::Result; fn CreateComponentEnumerator(&self, componenttypes: u32, options: u32) -> windows_core::Result; - fn CreateFastMetadataEncoderFromDecoder(&self, pidecoder: Option<&IWICBitmapDecoder>) -> windows_core::Result; - fn CreateFastMetadataEncoderFromFrameDecode(&self, piframedecoder: Option<&IWICBitmapFrameDecode>) -> windows_core::Result; + fn CreateFastMetadataEncoderFromDecoder(&self, pidecoder: windows_core::Ref<'_, IWICBitmapDecoder>) -> windows_core::Result; + fn CreateFastMetadataEncoderFromFrameDecode(&self, piframedecoder: windows_core::Ref<'_, IWICBitmapFrameDecode>) -> windows_core::Result; fn CreateQueryWriter(&self, guidmetadataformat: *const windows_core::GUID, pguidvendor: *const windows_core::GUID) -> windows_core::Result; - fn CreateQueryWriterFromReader(&self, piqueryreader: Option<&IWICMetadataQueryReader>, pguidvendor: *const windows_core::GUID) -> windows_core::Result; + fn CreateQueryWriterFromReader(&self, piqueryreader: windows_core::Ref<'_, IWICMetadataQueryReader>, pguidvendor: *const windows_core::GUID) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_UI_WindowsAndMessaging"))] impl IWICImagingFactory_Vtbl { @@ -3226,7 +3226,7 @@ impl IWICImagingFactory_Vtbl { } unsafe extern "system" fn CreateDecoderFromStream(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, pguidvendor: *const windows_core::GUID, metadataoptions: WICDecodeOptions, ppidecoder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICImagingFactory_Impl::CreateDecoderFromStream(this, windows_core::from_raw_borrowed(&pistream), core::mem::transmute_copy(&pguidvendor), core::mem::transmute_copy(&metadataoptions)) { + match IWICImagingFactory_Impl::CreateDecoderFromStream(this, core::mem::transmute_copy(&pistream), core::mem::transmute_copy(&pguidvendor), core::mem::transmute_copy(&metadataoptions)) { Ok(ok__) => { ppidecoder.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3366,7 +3366,7 @@ impl IWICImagingFactory_Vtbl { } unsafe extern "system" fn CreateBitmapFromSource(this: *mut core::ffi::c_void, pibitmapsource: *mut core::ffi::c_void, option: WICBitmapCreateCacheOption, ppibitmap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICImagingFactory_Impl::CreateBitmapFromSource(this, windows_core::from_raw_borrowed(&pibitmapsource), core::mem::transmute_copy(&option)) { + match IWICImagingFactory_Impl::CreateBitmapFromSource(this, core::mem::transmute_copy(&pibitmapsource), core::mem::transmute_copy(&option)) { Ok(ok__) => { ppibitmap.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3376,7 +3376,7 @@ impl IWICImagingFactory_Vtbl { } unsafe extern "system" fn CreateBitmapFromSourceRect(this: *mut core::ffi::c_void, pibitmapsource: *mut core::ffi::c_void, x: u32, y: u32, width: u32, height: u32, ppibitmap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICImagingFactory_Impl::CreateBitmapFromSourceRect(this, windows_core::from_raw_borrowed(&pibitmapsource), core::mem::transmute_copy(&x), core::mem::transmute_copy(&y), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height)) { + match IWICImagingFactory_Impl::CreateBitmapFromSourceRect(this, core::mem::transmute_copy(&pibitmapsource), core::mem::transmute_copy(&x), core::mem::transmute_copy(&y), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height)) { Ok(ok__) => { ppibitmap.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3426,7 +3426,7 @@ impl IWICImagingFactory_Vtbl { } unsafe extern "system" fn CreateFastMetadataEncoderFromDecoder(this: *mut core::ffi::c_void, pidecoder: *mut core::ffi::c_void, ppifastencoder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICImagingFactory_Impl::CreateFastMetadataEncoderFromDecoder(this, windows_core::from_raw_borrowed(&pidecoder)) { + match IWICImagingFactory_Impl::CreateFastMetadataEncoderFromDecoder(this, core::mem::transmute_copy(&pidecoder)) { Ok(ok__) => { ppifastencoder.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3436,7 +3436,7 @@ impl IWICImagingFactory_Vtbl { } unsafe extern "system" fn CreateFastMetadataEncoderFromFrameDecode(this: *mut core::ffi::c_void, piframedecoder: *mut core::ffi::c_void, ppifastencoder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICImagingFactory_Impl::CreateFastMetadataEncoderFromFrameDecode(this, windows_core::from_raw_borrowed(&piframedecoder)) { + match IWICImagingFactory_Impl::CreateFastMetadataEncoderFromFrameDecode(this, core::mem::transmute_copy(&piframedecoder)) { Ok(ok__) => { ppifastencoder.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3456,7 +3456,7 @@ impl IWICImagingFactory_Vtbl { } unsafe extern "system" fn CreateQueryWriterFromReader(this: *mut core::ffi::c_void, piqueryreader: *mut core::ffi::c_void, pguidvendor: *const windows_core::GUID, ppiquerywriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICImagingFactory_Impl::CreateQueryWriterFromReader(this, windows_core::from_raw_borrowed(&piqueryreader), core::mem::transmute_copy(&pguidvendor)) { + match IWICImagingFactory_Impl::CreateQueryWriterFromReader(this, core::mem::transmute_copy(&piqueryreader), core::mem::transmute_copy(&pguidvendor)) { Ok(ok__) => { ppiquerywriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3860,10 +3860,10 @@ pub struct IWICMetadataBlockWriter_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWICMetadataBlockWriter_Impl: IWICMetadataBlockReader_Impl { - fn InitializeFromBlockReader(&self, pimdblockreader: Option<&IWICMetadataBlockReader>) -> windows_core::Result<()>; + fn InitializeFromBlockReader(&self, pimdblockreader: windows_core::Ref<'_, IWICMetadataBlockReader>) -> windows_core::Result<()>; fn GetWriterByIndex(&self, nindex: u32) -> windows_core::Result; - fn AddWriter(&self, pimetadatawriter: Option<&IWICMetadataWriter>) -> windows_core::Result<()>; - fn SetWriterByIndex(&self, nindex: u32, pimetadatawriter: Option<&IWICMetadataWriter>) -> windows_core::Result<()>; + fn AddWriter(&self, pimetadatawriter: windows_core::Ref<'_, IWICMetadataWriter>) -> windows_core::Result<()>; + fn SetWriterByIndex(&self, nindex: u32, pimetadatawriter: windows_core::Ref<'_, IWICMetadataWriter>) -> windows_core::Result<()>; fn RemoveWriterByIndex(&self, nindex: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -3871,7 +3871,7 @@ impl IWICMetadataBlockWriter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromBlockReader(this: *mut core::ffi::c_void, pimdblockreader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICMetadataBlockWriter_Impl::InitializeFromBlockReader(this, windows_core::from_raw_borrowed(&pimdblockreader)).into() + IWICMetadataBlockWriter_Impl::InitializeFromBlockReader(this, core::mem::transmute_copy(&pimdblockreader)).into() } unsafe extern "system" fn GetWriterByIndex(this: *mut core::ffi::c_void, nindex: u32, ppimetadatawriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3885,11 +3885,11 @@ impl IWICMetadataBlockWriter_Vtbl { } unsafe extern "system" fn AddWriter(this: *mut core::ffi::c_void, pimetadatawriter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICMetadataBlockWriter_Impl::AddWriter(this, windows_core::from_raw_borrowed(&pimetadatawriter)).into() + IWICMetadataBlockWriter_Impl::AddWriter(this, core::mem::transmute_copy(&pimetadatawriter)).into() } unsafe extern "system" fn SetWriterByIndex(this: *mut core::ffi::c_void, nindex: u32, pimetadatawriter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICMetadataBlockWriter_Impl::SetWriterByIndex(this, core::mem::transmute_copy(&nindex), windows_core::from_raw_borrowed(&pimetadatawriter)).into() + IWICMetadataBlockWriter_Impl::SetWriterByIndex(this, core::mem::transmute_copy(&nindex), core::mem::transmute_copy(&pimetadatawriter)).into() } unsafe extern "system" fn RemoveWriterByIndex(this: *mut core::ffi::c_void, nindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4342,7 +4342,7 @@ pub struct IWICMetadataReaderInfo_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IWICMetadataReaderInfo_Impl: IWICMetadataHandlerInfo_Impl { fn GetPatterns(&self, guidcontainerformat: *const windows_core::GUID, cbsize: u32, ppattern: *mut WICMetadataPattern, pccount: *mut u32, pcbactual: *mut u32) -> windows_core::Result<()>; - fn MatchesPattern(&self, guidcontainerformat: *const windows_core::GUID, pistream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn MatchesPattern(&self, guidcontainerformat: *const windows_core::GUID, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn CreateInstance(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -4354,7 +4354,7 @@ impl IWICMetadataReaderInfo_Vtbl { } unsafe extern "system" fn MatchesPattern(this: *mut core::ffi::c_void, guidcontainerformat: *const windows_core::GUID, pistream: *mut core::ffi::c_void, pfmatches: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWICMetadataReaderInfo_Impl::MatchesPattern(this, core::mem::transmute_copy(&guidcontainerformat), windows_core::from_raw_borrowed(&pistream)) { + match IWICMetadataReaderInfo_Impl::MatchesPattern(this, core::mem::transmute_copy(&guidcontainerformat), core::mem::transmute_copy(&pistream)) { Ok(ok__) => { pfmatches.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4583,8 +4583,8 @@ pub struct IWICPalette_Vtbl { pub trait IWICPalette_Impl: windows_core::IUnknownImpl { fn InitializePredefined(&self, epalettetype: WICBitmapPaletteType, faddtransparentcolor: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn InitializeCustom(&self, pcolors: *const u32, ccount: u32) -> windows_core::Result<()>; - fn InitializeFromBitmap(&self, pisurface: Option<&IWICBitmapSource>, ccount: u32, faddtransparentcolor: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn InitializeFromPalette(&self, pipalette: Option<&IWICPalette>) -> windows_core::Result<()>; + fn InitializeFromBitmap(&self, pisurface: windows_core::Ref<'_, IWICBitmapSource>, ccount: u32, faddtransparentcolor: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn InitializeFromPalette(&self, pipalette: windows_core::Ref<'_, IWICPalette>) -> windows_core::Result<()>; fn GetType(&self) -> windows_core::Result; fn GetColorCount(&self) -> windows_core::Result; fn GetColors(&self, ccount: u32, pcolors: *mut u32, pcactualcolors: *mut u32) -> windows_core::Result<()>; @@ -4604,11 +4604,11 @@ impl IWICPalette_Vtbl { } unsafe extern "system" fn InitializeFromBitmap(this: *mut core::ffi::c_void, pisurface: *mut core::ffi::c_void, ccount: u32, faddtransparentcolor: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICPalette_Impl::InitializeFromBitmap(this, windows_core::from_raw_borrowed(&pisurface), core::mem::transmute_copy(&ccount), core::mem::transmute_copy(&faddtransparentcolor)).into() + IWICPalette_Impl::InitializeFromBitmap(this, core::mem::transmute_copy(&pisurface), core::mem::transmute_copy(&ccount), core::mem::transmute_copy(&faddtransparentcolor)).into() } unsafe extern "system" fn InitializeFromPalette(this: *mut core::ffi::c_void, pipalette: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICPalette_Impl::InitializeFromPalette(this, windows_core::from_raw_borrowed(&pipalette)).into() + IWICPalette_Impl::InitializeFromPalette(this, core::mem::transmute_copy(&pipalette)).into() } unsafe extern "system" fn GetType(this: *mut core::ffi::c_void, pepalettetype: *mut WICBitmapPaletteType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4726,19 +4726,19 @@ pub struct IWICPersistStream_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWICPersistStream_Impl: super::super::System::Com::IPersistStream_Impl { - fn LoadEx(&self, pistream: Option<&super::super::System::Com::IStream>, pguidpreferredvendor: *const windows_core::GUID, dwpersistoptions: u32) -> windows_core::Result<()>; - fn SaveEx(&self, pistream: Option<&super::super::System::Com::IStream>, dwpersistoptions: u32, fcleardirty: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn LoadEx(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>, pguidpreferredvendor: *const windows_core::GUID, dwpersistoptions: u32) -> windows_core::Result<()>; + fn SaveEx(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>, dwpersistoptions: u32, fcleardirty: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IWICPersistStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn LoadEx(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, pguidpreferredvendor: *const windows_core::GUID, dwpersistoptions: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICPersistStream_Impl::LoadEx(this, windows_core::from_raw_borrowed(&pistream), core::mem::transmute_copy(&pguidpreferredvendor), core::mem::transmute_copy(&dwpersistoptions)).into() + IWICPersistStream_Impl::LoadEx(this, core::mem::transmute_copy(&pistream), core::mem::transmute_copy(&pguidpreferredvendor), core::mem::transmute_copy(&dwpersistoptions)).into() } unsafe extern "system" fn SaveEx(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, dwpersistoptions: u32, fcleardirty: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICPersistStream_Impl::SaveEx(this, windows_core::from_raw_borrowed(&pistream), core::mem::transmute_copy(&dwpersistoptions), core::mem::transmute_copy(&fcleardirty)).into() + IWICPersistStream_Impl::SaveEx(this, core::mem::transmute_copy(&pistream), core::mem::transmute_copy(&dwpersistoptions), core::mem::transmute_copy(&fcleardirty)).into() } Self { base__: super::super::System::Com::IPersistStream_Vtbl::new::(), @@ -5027,14 +5027,14 @@ pub struct IWICPlanarFormatConverter_Vtbl { pub CanConvert: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32, *const windows_core::GUID, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IWICPlanarFormatConverter_Impl: IWICBitmapSource_Impl { - fn Initialize(&self, ppplanes: *const Option, cplanes: u32, dstformat: *const windows_core::GUID, dither: WICBitmapDitherType, pipalette: Option<&IWICPalette>, alphathresholdpercent: f64, palettetranslate: WICBitmapPaletteType) -> windows_core::Result<()>; + fn Initialize(&self, ppplanes: *const Option, cplanes: u32, dstformat: *const windows_core::GUID, dither: WICBitmapDitherType, pipalette: windows_core::Ref<'_, IWICPalette>, alphathresholdpercent: f64, palettetranslate: WICBitmapPaletteType) -> windows_core::Result<()>; fn CanConvert(&self, psrcpixelformats: *const windows_core::GUID, csrcplanes: u32, dstpixelformat: *const windows_core::GUID) -> windows_core::Result; } impl IWICPlanarFormatConverter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, ppplanes: *const *mut core::ffi::c_void, cplanes: u32, dstformat: *const windows_core::GUID, dither: WICBitmapDitherType, pipalette: *mut core::ffi::c_void, alphathresholdpercent: f64, palettetranslate: WICBitmapPaletteType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICPlanarFormatConverter_Impl::Initialize(this, core::mem::transmute_copy(&ppplanes), core::mem::transmute_copy(&cplanes), core::mem::transmute_copy(&dstformat), core::mem::transmute_copy(&dither), windows_core::from_raw_borrowed(&pipalette), core::mem::transmute_copy(&alphathresholdpercent), core::mem::transmute_copy(&palettetranslate)).into() + IWICPlanarFormatConverter_Impl::Initialize(this, core::mem::transmute_copy(&ppplanes), core::mem::transmute_copy(&cplanes), core::mem::transmute_copy(&dstformat), core::mem::transmute_copy(&dither), core::mem::transmute_copy(&pipalette), core::mem::transmute_copy(&alphathresholdpercent), core::mem::transmute_copy(&palettetranslate)).into() } unsafe extern "system" fn CanConvert(this: *mut core::ffi::c_void, psrcpixelformats: *const windows_core::GUID, csrcplanes: u32, dstpixelformat: *const windows_core::GUID, pfcanconvert: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5192,17 +5192,17 @@ pub struct IWICStream_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWICStream_Impl: super::super::System::Com::IStream_Impl { - fn InitializeFromIStream(&self, pistream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn InitializeFromIStream(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn InitializeFromFilename(&self, wzfilename: &windows_core::PCWSTR, dwdesiredaccess: u32) -> windows_core::Result<()>; fn InitializeFromMemory(&self, pbbuffer: *const u8, cbbuffersize: u32) -> windows_core::Result<()>; - fn InitializeFromIStreamRegion(&self, pistream: Option<&super::super::System::Com::IStream>, uloffset: u64, ulmaxsize: u64) -> windows_core::Result<()>; + fn InitializeFromIStreamRegion(&self, pistream: windows_core::Ref<'_, super::super::System::Com::IStream>, uloffset: u64, ulmaxsize: u64) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IWICStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromIStream(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICStream_Impl::InitializeFromIStream(this, windows_core::from_raw_borrowed(&pistream)).into() + IWICStream_Impl::InitializeFromIStream(this, core::mem::transmute_copy(&pistream)).into() } unsafe extern "system" fn InitializeFromFilename(this: *mut core::ffi::c_void, wzfilename: windows_core::PCWSTR, dwdesiredaccess: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5214,7 +5214,7 @@ impl IWICStream_Vtbl { } unsafe extern "system" fn InitializeFromIStreamRegion(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, uloffset: u64, ulmaxsize: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWICStream_Impl::InitializeFromIStreamRegion(this, windows_core::from_raw_borrowed(&pistream), core::mem::transmute_copy(&uloffset), core::mem::transmute_copy(&ulmaxsize)).into() + IWICStream_Impl::InitializeFromIStreamRegion(this, core::mem::transmute_copy(&pistream), core::mem::transmute_copy(&uloffset), core::mem::transmute_copy(&ulmaxsize)).into() } Self { base__: super::super::System::Com::IStream_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs index 399149ea19..ed82164c70 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs @@ -3263,13 +3263,13 @@ pub struct IAsyncGetSendNotificationCookie_Vtbl { pub FinishAsyncCallWithData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IAsyncGetSendNotificationCookie_Impl: IPrintAsyncCookie_Impl { - fn FinishAsyncCallWithData(&self, param0: Option<&IPrintAsyncNotifyDataObject>, param1: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn FinishAsyncCallWithData(&self, param0: windows_core::Ref<'_, IPrintAsyncNotifyDataObject>, param1: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IAsyncGetSendNotificationCookie_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FinishAsyncCallWithData(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncGetSendNotificationCookie_Impl::FinishAsyncCallWithData(this, windows_core::from_raw_borrowed(¶m0), core::mem::transmute_copy(¶m1)).into() + IAsyncGetSendNotificationCookie_Impl::FinishAsyncCallWithData(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } Self { base__: IPrintAsyncCookie_Vtbl::new::(), FinishAsyncCallWithData: FinishAsyncCallWithData:: } } @@ -3378,8 +3378,8 @@ pub trait IBidiAsyncNotifyChannel_Impl: IPrintAsyncNotifyChannel_Impl { fn CreateNotificationChannel(&self) -> windows_core::Result<()>; fn GetPrintName(&self, param0: *const Option) -> windows_core::Result<()>; fn GetChannelNotificationType(&self, param0: *const Option) -> windows_core::Result<()>; - fn AsyncGetNotificationSendResponse(&self, param0: Option<&IPrintAsyncNotifyDataObject>, param1: Option<&IAsyncGetSendNotificationCookie>) -> windows_core::Result<()>; - fn AsyncCloseChannel(&self, param0: Option<&IPrintAsyncNotifyDataObject>, param1: Option<&IPrintAsyncCookie>) -> windows_core::Result<()>; + fn AsyncGetNotificationSendResponse(&self, param0: windows_core::Ref<'_, IPrintAsyncNotifyDataObject>, param1: windows_core::Ref<'_, IAsyncGetSendNotificationCookie>) -> windows_core::Result<()>; + fn AsyncCloseChannel(&self, param0: windows_core::Ref<'_, IPrintAsyncNotifyDataObject>, param1: windows_core::Ref<'_, IPrintAsyncCookie>) -> windows_core::Result<()>; } impl IBidiAsyncNotifyChannel_Vtbl { pub const fn new() -> Self { @@ -3397,11 +3397,11 @@ impl IBidiAsyncNotifyChannel_Vtbl { } unsafe extern "system" fn AsyncGetNotificationSendResponse(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBidiAsyncNotifyChannel_Impl::AsyncGetNotificationSendResponse(this, windows_core::from_raw_borrowed(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IBidiAsyncNotifyChannel_Impl::AsyncGetNotificationSendResponse(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } unsafe extern "system" fn AsyncCloseChannel(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void, param1: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBidiAsyncNotifyChannel_Impl::AsyncCloseChannel(this, windows_core::from_raw_borrowed(¶m0), windows_core::from_raw_borrowed(¶m1)).into() + IBidiAsyncNotifyChannel_Impl::AsyncCloseChannel(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1)).into() } Self { base__: IPrintAsyncNotifyChannel_Vtbl::new::(), @@ -3536,7 +3536,7 @@ pub struct IBidiRequestContainer_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IBidiRequestContainer_Impl: windows_core::IUnknownImpl { - fn AddRequest(&self, prequest: Option<&IBidiRequest>) -> windows_core::Result<()>; + fn AddRequest(&self, prequest: windows_core::Ref<'_, IBidiRequest>) -> windows_core::Result<()>; fn GetEnumObject(&self) -> windows_core::Result; fn GetRequestCount(&self) -> windows_core::Result; } @@ -3545,7 +3545,7 @@ impl IBidiRequestContainer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddRequest(this: *mut core::ffi::c_void, prequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBidiRequestContainer_Impl::AddRequest(this, windows_core::from_raw_borrowed(&prequest)).into() + IBidiRequestContainer_Impl::AddRequest(this, core::mem::transmute_copy(&prequest)).into() } unsafe extern "system" fn GetEnumObject(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3618,8 +3618,8 @@ pub struct IBidiSpl_Vtbl { pub trait IBidiSpl_Impl: windows_core::IUnknownImpl { fn BindDevice(&self, pszdevicename: &windows_core::PCWSTR, dwaccess: u32) -> windows_core::Result<()>; fn UnbindDevice(&self) -> windows_core::Result<()>; - fn SendRecv(&self, pszaction: &windows_core::PCWSTR, prequest: Option<&IBidiRequest>) -> windows_core::Result<()>; - fn MultiSendRecv(&self, pszaction: &windows_core::PCWSTR, prequestcontainer: Option<&IBidiRequestContainer>) -> windows_core::Result<()>; + fn SendRecv(&self, pszaction: &windows_core::PCWSTR, prequest: windows_core::Ref<'_, IBidiRequest>) -> windows_core::Result<()>; + fn MultiSendRecv(&self, pszaction: &windows_core::PCWSTR, prequestcontainer: windows_core::Ref<'_, IBidiRequestContainer>) -> windows_core::Result<()>; } impl IBidiSpl_Vtbl { pub const fn new() -> Self { @@ -3633,11 +3633,11 @@ impl IBidiSpl_Vtbl { } unsafe extern "system" fn SendRecv(this: *mut core::ffi::c_void, pszaction: windows_core::PCWSTR, prequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBidiSpl_Impl::SendRecv(this, core::mem::transmute(&pszaction), windows_core::from_raw_borrowed(&prequest)).into() + IBidiSpl_Impl::SendRecv(this, core::mem::transmute(&pszaction), core::mem::transmute_copy(&prequest)).into() } unsafe extern "system" fn MultiSendRecv(this: *mut core::ffi::c_void, pszaction: windows_core::PCWSTR, prequestcontainer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBidiSpl_Impl::MultiSendRecv(this, core::mem::transmute(&pszaction), windows_core::from_raw_borrowed(&prequestcontainer)).into() + IBidiSpl_Impl::MultiSendRecv(this, core::mem::transmute(&pszaction), core::mem::transmute_copy(&prequestcontainer)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3693,7 +3693,7 @@ pub trait IBidiSpl2_Impl: windows_core::IUnknownImpl { fn BindDevice(&self, pszdevicename: &windows_core::PCWSTR, dwaccess: u32) -> windows_core::Result<()>; fn UnbindDevice(&self) -> windows_core::Result<()>; fn SendRecvXMLString(&self, bstrrequest: &windows_core::BSTR) -> windows_core::Result; - fn SendRecvXMLStream(&self, psrequest: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn SendRecvXMLStream(&self, psrequest: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IBidiSpl2_Vtbl { @@ -3718,7 +3718,7 @@ impl IBidiSpl2_Vtbl { } unsafe extern "system" fn SendRecvXMLStream(this: *mut core::ffi::c_void, psrequest: *mut core::ffi::c_void, ppsresponse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBidiSpl2_Impl::SendRecvXMLStream(this, windows_core::from_raw_borrowed(&psrequest)) { + match IBidiSpl2_Impl::SendRecvXMLStream(this, core::mem::transmute_copy(&psrequest)) { Ok(ok__) => { ppsresponse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4075,7 +4075,7 @@ pub struct IFixedDocument_Vtbl { pub trait IFixedDocument_Impl: windows_core::IUnknownImpl { fn GetUri(&self) -> windows_core::Result; fn GetPrintTicket(&self) -> windows_core::Result; - fn SetPrintTicket(&self, pprintticket: Option<&IPartPrintTicket>) -> windows_core::Result<()>; + fn SetPrintTicket(&self, pprintticket: windows_core::Ref<'_, IPartPrintTicket>) -> windows_core::Result<()>; } impl IFixedDocument_Vtbl { pub const fn new() -> Self { @@ -4101,7 +4101,7 @@ impl IFixedDocument_Vtbl { } unsafe extern "system" fn SetPrintTicket(this: *mut core::ffi::c_void, pprintticket: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFixedDocument_Impl::SetPrintTicket(this, windows_core::from_raw_borrowed(&pprintticket)).into() + IFixedDocument_Impl::SetPrintTicket(this, core::mem::transmute_copy(&pprintticket)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4143,7 +4143,7 @@ pub struct IFixedDocumentSequence_Vtbl { pub trait IFixedDocumentSequence_Impl: windows_core::IUnknownImpl { fn GetUri(&self) -> windows_core::Result; fn GetPrintTicket(&self) -> windows_core::Result; - fn SetPrintTicket(&self, pprintticket: Option<&IPartPrintTicket>) -> windows_core::Result<()>; + fn SetPrintTicket(&self, pprintticket: windows_core::Ref<'_, IPartPrintTicket>) -> windows_core::Result<()>; } impl IFixedDocumentSequence_Vtbl { pub const fn new() -> Self { @@ -4169,7 +4169,7 @@ impl IFixedDocumentSequence_Vtbl { } unsafe extern "system" fn SetPrintTicket(this: *mut core::ffi::c_void, pprintticket: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFixedDocumentSequence_Impl::SetPrintTicket(this, windows_core::from_raw_borrowed(&pprintticket)).into() + IFixedDocumentSequence_Impl::SetPrintTicket(this, core::mem::transmute_copy(&pprintticket)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4245,8 +4245,8 @@ pub trait IFixedPage_Impl: IPartBase_Impl { fn GetPrintTicket(&self) -> windows_core::Result; fn GetPagePart(&self, uri: &windows_core::PCWSTR) -> windows_core::Result; fn GetWriteStream(&self) -> windows_core::Result; - fn SetPrintTicket(&self, ppprintticket: Option<&IPartPrintTicket>) -> windows_core::Result<()>; - fn SetPagePart(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetPrintTicket(&self, ppprintticket: windows_core::Ref<'_, IPartPrintTicket>) -> windows_core::Result<()>; + fn SetPagePart(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn DeleteResource(&self, uri: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetXpsPartIterator(&self) -> windows_core::Result; } @@ -4284,11 +4284,11 @@ impl IFixedPage_Vtbl { } unsafe extern "system" fn SetPrintTicket(this: *mut core::ffi::c_void, ppprintticket: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFixedPage_Impl::SetPrintTicket(this, windows_core::from_raw_borrowed(&ppprintticket)).into() + IFixedPage_Impl::SetPrintTicket(this, core::mem::transmute_copy(&ppprintticket)).into() } unsafe extern "system" fn SetPagePart(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFixedPage_Impl::SetPagePart(this, windows_core::from_raw_borrowed(&punk)).into() + IFixedPage_Impl::SetPagePart(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn DeleteResource(this: *mut core::ffi::c_void, uri: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5088,14 +5088,14 @@ pub struct IPrintAsyncNotify_Vtbl { pub CreatePrintAsyncNotifyRegistration: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, PrintAsyncNotifyUserFilter, PrintAsyncNotifyConversationStyle, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPrintAsyncNotify_Impl: windows_core::IUnknownImpl { - fn CreatePrintAsyncNotifyChannel(&self, param0: u32, param1: *const windows_core::GUID, param2: PrintAsyncNotifyUserFilter, param3: PrintAsyncNotifyConversationStyle, param4: Option<&IPrintAsyncNotifyCallback>) -> windows_core::Result; - fn CreatePrintAsyncNotifyRegistration(&self, param0: *const windows_core::GUID, param1: PrintAsyncNotifyUserFilter, param2: PrintAsyncNotifyConversationStyle, param3: Option<&IPrintAsyncNotifyCallback>) -> windows_core::Result; + fn CreatePrintAsyncNotifyChannel(&self, param0: u32, param1: *const windows_core::GUID, param2: PrintAsyncNotifyUserFilter, param3: PrintAsyncNotifyConversationStyle, param4: windows_core::Ref<'_, IPrintAsyncNotifyCallback>) -> windows_core::Result; + fn CreatePrintAsyncNotifyRegistration(&self, param0: *const windows_core::GUID, param1: PrintAsyncNotifyUserFilter, param2: PrintAsyncNotifyConversationStyle, param3: windows_core::Ref<'_, IPrintAsyncNotifyCallback>) -> windows_core::Result; } impl IPrintAsyncNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreatePrintAsyncNotifyChannel(this: *mut core::ffi::c_void, param0: u32, param1: *const windows_core::GUID, param2: PrintAsyncNotifyUserFilter, param3: PrintAsyncNotifyConversationStyle, param4: *mut core::ffi::c_void, param5: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintAsyncNotify_Impl::CreatePrintAsyncNotifyChannel(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), windows_core::from_raw_borrowed(¶m4)) { + match IPrintAsyncNotify_Impl::CreatePrintAsyncNotifyChannel(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3), core::mem::transmute_copy(¶m4)) { Ok(ok__) => { param5.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5105,7 +5105,7 @@ impl IPrintAsyncNotify_Vtbl { } unsafe extern "system" fn CreatePrintAsyncNotifyRegistration(this: *mut core::ffi::c_void, param0: *const windows_core::GUID, param1: PrintAsyncNotifyUserFilter, param2: PrintAsyncNotifyConversationStyle, param3: *mut core::ffi::c_void, param4: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintAsyncNotify_Impl::CreatePrintAsyncNotifyRegistration(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), windows_core::from_raw_borrowed(¶m3)) { + match IPrintAsyncNotify_Impl::CreatePrintAsyncNotifyRegistration(this, core::mem::transmute_copy(¶m0), core::mem::transmute_copy(¶m1), core::mem::transmute_copy(¶m2), core::mem::transmute_copy(¶m3)) { Ok(ok__) => { param4.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5149,18 +5149,18 @@ pub struct IPrintAsyncNotifyCallback_Vtbl { pub ChannelClosed: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPrintAsyncNotifyCallback_Impl: windows_core::IUnknownImpl { - fn OnEventNotify(&self, pchannel: Option<&IPrintAsyncNotifyChannel>, pdata: Option<&IPrintAsyncNotifyDataObject>) -> windows_core::Result<()>; - fn ChannelClosed(&self, pchannel: Option<&IPrintAsyncNotifyChannel>, pdata: Option<&IPrintAsyncNotifyDataObject>) -> windows_core::Result<()>; + fn OnEventNotify(&self, pchannel: windows_core::Ref<'_, IPrintAsyncNotifyChannel>, pdata: windows_core::Ref<'_, IPrintAsyncNotifyDataObject>) -> windows_core::Result<()>; + fn ChannelClosed(&self, pchannel: windows_core::Ref<'_, IPrintAsyncNotifyChannel>, pdata: windows_core::Ref<'_, IPrintAsyncNotifyDataObject>) -> windows_core::Result<()>; } impl IPrintAsyncNotifyCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnEventNotify(this: *mut core::ffi::c_void, pchannel: *mut core::ffi::c_void, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintAsyncNotifyCallback_Impl::OnEventNotify(this, windows_core::from_raw_borrowed(&pchannel), windows_core::from_raw_borrowed(&pdata)).into() + IPrintAsyncNotifyCallback_Impl::OnEventNotify(this, core::mem::transmute_copy(&pchannel), core::mem::transmute_copy(&pdata)).into() } unsafe extern "system" fn ChannelClosed(this: *mut core::ffi::c_void, pchannel: *mut core::ffi::c_void, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintAsyncNotifyCallback_Impl::ChannelClosed(this, windows_core::from_raw_borrowed(&pchannel), windows_core::from_raw_borrowed(&pdata)).into() + IPrintAsyncNotifyCallback_Impl::ChannelClosed(this, core::mem::transmute_copy(&pchannel), core::mem::transmute_copy(&pdata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5196,18 +5196,18 @@ pub struct IPrintAsyncNotifyChannel_Vtbl { pub CloseChannel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPrintAsyncNotifyChannel_Impl: windows_core::IUnknownImpl { - fn SendNotification(&self, pdata: Option<&IPrintAsyncNotifyDataObject>) -> windows_core::Result<()>; - fn CloseChannel(&self, pdata: Option<&IPrintAsyncNotifyDataObject>) -> windows_core::Result<()>; + fn SendNotification(&self, pdata: windows_core::Ref<'_, IPrintAsyncNotifyDataObject>) -> windows_core::Result<()>; + fn CloseChannel(&self, pdata: windows_core::Ref<'_, IPrintAsyncNotifyDataObject>) -> windows_core::Result<()>; } impl IPrintAsyncNotifyChannel_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SendNotification(this: *mut core::ffi::c_void, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintAsyncNotifyChannel_Impl::SendNotification(this, windows_core::from_raw_borrowed(&pdata)).into() + IPrintAsyncNotifyChannel_Impl::SendNotification(this, core::mem::transmute_copy(&pdata)).into() } unsafe extern "system" fn CloseChannel(this: *mut core::ffi::c_void, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintAsyncNotifyChannel_Impl::CloseChannel(this, windows_core::from_raw_borrowed(&pdata)).into() + IPrintAsyncNotifyChannel_Impl::CloseChannel(this, core::mem::transmute_copy(&pdata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5331,7 +5331,7 @@ pub struct IPrintAsyncNotifyServerReferral_Vtbl { } pub trait IPrintAsyncNotifyServerReferral_Impl: windows_core::IUnknownImpl { fn GetServerReferral(&self) -> windows_core::Result; - fn AsyncGetServerReferral(&self, param0: Option<&IAsyncGetSrvReferralCookie>) -> windows_core::Result<()>; + fn AsyncGetServerReferral(&self, param0: windows_core::Ref<'_, IAsyncGetSrvReferralCookie>) -> windows_core::Result<()>; fn SetServerReferral(&self, prmtserverreferral: &windows_core::PCWSTR) -> windows_core::Result<()>; } impl IPrintAsyncNotifyServerReferral_Vtbl { @@ -5348,7 +5348,7 @@ impl IPrintAsyncNotifyServerReferral_Vtbl { } unsafe extern "system" fn AsyncGetServerReferral(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintAsyncNotifyServerReferral_Impl::AsyncGetServerReferral(this, windows_core::from_raw_borrowed(¶m0)).into() + IPrintAsyncNotifyServerReferral_Impl::AsyncGetServerReferral(this, core::mem::transmute_copy(¶m0)).into() } unsafe extern "system" fn SetServerReferral(this: *mut core::ffi::c_void, prmtserverreferral: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5388,13 +5388,13 @@ pub struct IPrintBidiAsyncNotifyRegistration_Vtbl { pub AsyncGetNewChannel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPrintBidiAsyncNotifyRegistration_Impl: IPrintAsyncNotifyRegistration_Impl { - fn AsyncGetNewChannel(&self, param0: Option<&IPrintAsyncNewChannelCookie>) -> windows_core::Result<()>; + fn AsyncGetNewChannel(&self, param0: windows_core::Ref<'_, IPrintAsyncNewChannelCookie>) -> windows_core::Result<()>; } impl IPrintBidiAsyncNotifyRegistration_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AsyncGetNewChannel(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintBidiAsyncNotifyRegistration_Impl::AsyncGetNewChannel(this, windows_core::from_raw_borrowed(¶m0)).into() + IPrintBidiAsyncNotifyRegistration_Impl::AsyncGetNewChannel(this, core::mem::transmute_copy(¶m0)).into() } Self { base__: IPrintAsyncNotifyRegistration_Vtbl::new::(), AsyncGetNewChannel: AsyncGetNewChannel:: } } @@ -5528,7 +5528,7 @@ pub trait IPrintCoreHelper_Impl: windows_core::IUnknownImpl { fn EnumOptions(&self, pszfeaturekeyword: &windows_core::PCSTR, poptionlist: *mut *mut *mut windows_core::PCSTR, pdwnumoptions: *mut u32) -> windows_core::Result<()>; fn GetFontSubstitution(&self, psztruetypefontname: &windows_core::PCWSTR, ppszdevfontname: *const windows_core::PCWSTR) -> windows_core::Result<()>; fn SetFontSubstitution(&self, psztruetypefontname: &windows_core::PCWSTR, pszdevfontname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn CreateInstanceOfMSXMLObject(&self, rclsid: *const windows_core::GUID, punkouter: Option<&windows_core::IUnknown>, dwclscontext: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateInstanceOfMSXMLObject(&self, rclsid: *const windows_core::GUID, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, dwclscontext: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] impl IPrintCoreHelper_Vtbl { @@ -5573,7 +5573,7 @@ impl IPrintCoreHelper_Vtbl { } unsafe extern "system" fn CreateInstanceOfMSXMLObject(this: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, punkouter: *mut core::ffi::c_void, dwclscontext: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintCoreHelper_Impl::CreateInstanceOfMSXMLObject(this, core::mem::transmute_copy(&rclsid), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IPrintCoreHelper_Impl::CreateInstanceOfMSXMLObject(this, core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5699,7 +5699,7 @@ pub struct IPrintCoreHelperUni_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] pub trait IPrintCoreHelperUni_Impl: IPrintCoreHelper_Impl { - fn CreateGDLSnapshot(&self, pdevmode: *mut super::Gdi::DEVMODEA, cbsize: u32, dwflags: u32, ppsnapshotstream: *mut Option) -> windows_core::Result<()>; + fn CreateGDLSnapshot(&self, pdevmode: *mut super::Gdi::DEVMODEA, cbsize: u32, dwflags: u32, ppsnapshotstream: windows_core::OutRef<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn CreateDefaultGDLSnapshot(&self, dwflags: u32) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] @@ -6354,7 +6354,7 @@ pub struct IPrintOemUI_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IPrintOemUI_Impl: IPrintOemCommon_Impl { - fn PublishDriverInterface(&self, piunknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn PublishDriverInterface(&self, piunknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn CommonUIProp(&self, dwmode: u32, poemcuipparam: *const OEMCUIPPARAM) -> windows_core::Result<()>; fn DocumentPropertySheets(&self, ppsuiinfo: *mut PROPSHEETUI_INFO, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; fn DevicePropertySheets(&self, ppsuiinfo: *const PROPSHEETUI_INFO, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; @@ -6372,7 +6372,7 @@ impl IPrintOemUI_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PublishDriverInterface(this: *mut core::ffi::c_void, piunknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintOemUI_Impl::PublishDriverInterface(this, windows_core::from_raw_borrowed(&piunknown)).into() + IPrintOemUI_Impl::PublishDriverInterface(this, core::mem::transmute_copy(&piunknown)).into() } unsafe extern "system" fn CommonUIProp(this: *mut core::ffi::c_void, dwmode: u32, poemcuipparam: *const OEMCUIPPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6600,7 +6600,7 @@ pub struct IPrintPipelineFilter_Vtbl { pub StartOperation: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPrintPipelineFilter_Impl: windows_core::IUnknownImpl { - fn InitializeFilter(&self, pinegotiation: Option<&IInterFilterCommunicator>, pipropertybag: Option<&IPrintPipelinePropertyBag>, pipipelinecontrol: Option<&IPrintPipelineManagerControl>) -> windows_core::Result<()>; + fn InitializeFilter(&self, pinegotiation: windows_core::Ref<'_, IInterFilterCommunicator>, pipropertybag: windows_core::Ref<'_, IPrintPipelinePropertyBag>, pipipelinecontrol: windows_core::Ref<'_, IPrintPipelineManagerControl>) -> windows_core::Result<()>; fn ShutdownOperation(&self) -> windows_core::Result<()>; fn StartOperation(&self) -> windows_core::Result<()>; } @@ -6608,7 +6608,7 @@ impl IPrintPipelineFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFilter(this: *mut core::ffi::c_void, pinegotiation: *mut core::ffi::c_void, pipropertybag: *mut core::ffi::c_void, pipipelinecontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintPipelineFilter_Impl::InitializeFilter(this, windows_core::from_raw_borrowed(&pinegotiation), windows_core::from_raw_borrowed(&pipropertybag), windows_core::from_raw_borrowed(&pipipelinecontrol)).into() + IPrintPipelineFilter_Impl::InitializeFilter(this, core::mem::transmute_copy(&pinegotiation), core::mem::transmute_copy(&pipropertybag), core::mem::transmute_copy(&pipipelinecontrol)).into() } unsafe extern "system" fn ShutdownOperation(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6655,7 +6655,7 @@ pub struct IPrintPipelineManagerControl_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IPrintPipelineManagerControl_Impl: windows_core::IUnknownImpl { - fn RequestShutdown(&self, hrreason: windows_core::HRESULT, preason: Option<&IImgErrorInfo>) -> windows_core::Result<()>; + fn RequestShutdown(&self, hrreason: windows_core::HRESULT, preason: windows_core::Ref<'_, IImgErrorInfo>) -> windows_core::Result<()>; fn FilterFinished(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -6663,7 +6663,7 @@ impl IPrintPipelineManagerControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RequestShutdown(this: *mut core::ffi::c_void, hrreason: windows_core::HRESULT, preason: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintPipelineManagerControl_Impl::RequestShutdown(this, core::mem::transmute_copy(&hrreason), windows_core::from_raw_borrowed(&preason)).into() + IPrintPipelineManagerControl_Impl::RequestShutdown(this, core::mem::transmute_copy(&hrreason), core::mem::transmute_copy(&preason)).into() } unsafe extern "system" fn FilterFinished(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6817,7 +6817,7 @@ pub struct IPrintPreviewDxgiPackageTarget_Vtbl { #[cfg(feature = "Win32_Graphics_Dxgi")] pub trait IPrintPreviewDxgiPackageTarget_Impl: windows_core::IUnknownImpl { fn SetJobPageCount(&self, counttype: PageCountType, count: u32) -> windows_core::Result<()>; - fn DrawPage(&self, jobpagenumber: u32, pageimage: Option<&super::Dxgi::IDXGISurface>, dpix: f32, dpiy: f32) -> windows_core::Result<()>; + fn DrawPage(&self, jobpagenumber: u32, pageimage: windows_core::Ref<'_, super::Dxgi::IDXGISurface>, dpix: f32, dpiy: f32) -> windows_core::Result<()>; fn InvalidatePreview(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Dxgi")] @@ -6829,7 +6829,7 @@ impl IPrintPreviewDxgiPackageTarget_Vtbl { } unsafe extern "system" fn DrawPage(this: *mut core::ffi::c_void, jobpagenumber: u32, pageimage: *mut core::ffi::c_void, dpix: f32, dpiy: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintPreviewDxgiPackageTarget_Impl::DrawPage(this, core::mem::transmute_copy(&jobpagenumber), windows_core::from_raw_borrowed(&pageimage), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy)).into() + IPrintPreviewDxgiPackageTarget_Impl::DrawPage(this, core::mem::transmute_copy(&jobpagenumber), core::mem::transmute_copy(&pageimage), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy)).into() } unsafe extern "system" fn InvalidatePreview(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7003,14 +7003,14 @@ pub struct IPrintSchemaAsyncOperationEvent_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPrintSchemaAsyncOperationEvent_Impl: super::super::System::Com::IDispatch_Impl { - fn Completed(&self, pticket: Option<&IPrintSchemaTicket>, hroperation: windows_core::HRESULT) -> windows_core::Result<()>; + fn Completed(&self, pticket: windows_core::Ref<'_, IPrintSchemaTicket>, hroperation: windows_core::HRESULT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IPrintSchemaAsyncOperationEvent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Completed(this: *mut core::ffi::c_void, pticket: *mut core::ffi::c_void, hroperation: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintSchemaAsyncOperationEvent_Impl::Completed(this, windows_core::from_raw_borrowed(&pticket), core::mem::transmute_copy(&hroperation)).into() + IPrintSchemaAsyncOperationEvent_Impl::Completed(this, core::mem::transmute_copy(&pticket), core::mem::transmute_copy(&hroperation)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), Completed: Completed:: } } @@ -7087,8 +7087,8 @@ pub trait IPrintSchemaCapabilities_Impl: IPrintSchemaElement_Impl { fn PageImageableSize(&self) -> windows_core::Result; fn JobCopiesAllDocumentsMinValue(&self) -> windows_core::Result; fn JobCopiesAllDocumentsMaxValue(&self) -> windows_core::Result; - fn GetSelectedOptionInPrintTicket(&self, pfeature: Option<&IPrintSchemaFeature>) -> windows_core::Result; - fn GetOptions(&self, pfeature: Option<&IPrintSchemaFeature>) -> windows_core::Result; + fn GetSelectedOptionInPrintTicket(&self, pfeature: windows_core::Ref<'_, IPrintSchemaFeature>) -> windows_core::Result; + fn GetOptions(&self, pfeature: windows_core::Ref<'_, IPrintSchemaFeature>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IPrintSchemaCapabilities_Vtbl { @@ -7145,7 +7145,7 @@ impl IPrintSchemaCapabilities_Vtbl { } unsafe extern "system" fn GetSelectedOptionInPrintTicket(this: *mut core::ffi::c_void, pfeature: *mut core::ffi::c_void, ppoption: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintSchemaCapabilities_Impl::GetSelectedOptionInPrintTicket(this, windows_core::from_raw_borrowed(&pfeature)) { + match IPrintSchemaCapabilities_Impl::GetSelectedOptionInPrintTicket(this, core::mem::transmute_copy(&pfeature)) { Ok(ok__) => { ppoption.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7155,7 +7155,7 @@ impl IPrintSchemaCapabilities_Vtbl { } unsafe extern "system" fn GetOptions(this: *mut core::ffi::c_void, pfeature: *mut core::ffi::c_void, ppoptioncollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintSchemaCapabilities_Impl::GetOptions(this, windows_core::from_raw_borrowed(&pfeature)) { + match IPrintSchemaCapabilities_Impl::GetOptions(this, core::mem::transmute_copy(&pfeature)) { Ok(ok__) => { ppoptioncollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7413,7 +7413,7 @@ pub struct IPrintSchemaFeature_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPrintSchemaFeature_Impl: IPrintSchemaDisplayableElement_Impl { fn SelectedOption(&self) -> windows_core::Result; - fn SetSelectedOption(&self, poption: Option<&IPrintSchemaOption>) -> windows_core::Result<()>; + fn SetSelectedOption(&self, poption: windows_core::Ref<'_, IPrintSchemaOption>) -> windows_core::Result<()>; fn SelectionType(&self) -> windows_core::Result; fn GetOption(&self, bstrname: &windows_core::BSTR, bstrnamespaceuri: &windows_core::BSTR) -> windows_core::Result; fn DisplayUI(&self) -> windows_core::Result; @@ -7433,7 +7433,7 @@ impl IPrintSchemaFeature_Vtbl { } unsafe extern "system" fn SetSelectedOption(this: *mut core::ffi::c_void, poption: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintSchemaFeature_Impl::SetSelectedOption(this, windows_core::from_raw_borrowed(&poption)).into() + IPrintSchemaFeature_Impl::SetSelectedOption(this, core::mem::transmute_copy(&poption)).into() } unsafe extern "system" fn SelectionType(this: *mut core::ffi::c_void, pselectiontype: *mut PrintSchemaSelectionType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8158,7 +8158,7 @@ pub trait IPrintSchemaTicket_Impl: IPrintSchemaElement_Impl { fn GetFeatureByKeyName(&self, bstrkeyname: &windows_core::BSTR) -> windows_core::Result; fn GetFeature(&self, bstrname: &windows_core::BSTR, bstrnamespaceuri: &windows_core::BSTR) -> windows_core::Result; fn ValidateAsync(&self) -> windows_core::Result; - fn CommitAsync(&self, pprintticketcommit: Option<&IPrintSchemaTicket>) -> windows_core::Result; + fn CommitAsync(&self, pprintticketcommit: windows_core::Ref<'_, IPrintSchemaTicket>) -> windows_core::Result; fn NotifyXmlChanged(&self) -> windows_core::Result<()>; fn GetCapabilities(&self) -> windows_core::Result; fn JobCopiesAllDocuments(&self) -> windows_core::Result; @@ -8199,7 +8199,7 @@ impl IPrintSchemaTicket_Vtbl { } unsafe extern "system" fn CommitAsync(this: *mut core::ffi::c_void, pprintticketcommit: *mut core::ffi::c_void, ppasyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintSchemaTicket_Impl::CommitAsync(this, windows_core::from_raw_borrowed(&pprintticketcommit)) { + match IPrintSchemaTicket_Impl::CommitAsync(this, core::mem::transmute_copy(&pprintticketcommit)) { Ok(ok__) => { ppasyncoperation.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8372,10 +8372,10 @@ pub trait IPrintTicketProvider_Impl: windows_core::IUnknownImpl { fn GetSupportedVersions(&self, hprinter: &PRINTER_HANDLE, ppversions: *mut *mut i32, cversions: *mut i32) -> windows_core::Result<()>; fn BindPrinter(&self, hprinter: &PRINTER_HANDLE, version: i32, poptions: *mut SHIMOPTS, pdevmodeflags: *mut u32, cnamespaces: *mut i32, ppnamespaces: *mut *mut windows_core::BSTR) -> windows_core::Result<()>; fn QueryDeviceNamespace(&self, pdefaultnamespace: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn ConvertPrintTicketToDevMode(&self, pprintticket: Option<&super::super::Data::Xml::MsXml::IXMLDOMDocument2>, cbdevmodein: u32, pdevmodein: *mut super::Gdi::DEVMODEA, pcbdevmodeout: *mut u32, ppdevmodeout: *mut *mut super::Gdi::DEVMODEA) -> windows_core::Result<()>; - fn ConvertDevModeToPrintTicket(&self, cbdevmode: u32, pdevmode: *mut super::Gdi::DEVMODEA, pprintticket: Option<&super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result<()>; - fn GetPrintCapabilities(&self, pprintticket: Option<&super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result; - fn ValidatePrintTicket(&self, pbaseticket: Option<&super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result<()>; + fn ConvertPrintTicketToDevMode(&self, pprintticket: windows_core::Ref<'_, super::super::Data::Xml::MsXml::IXMLDOMDocument2>, cbdevmodein: u32, pdevmodein: *mut super::Gdi::DEVMODEA, pcbdevmodeout: *mut u32, ppdevmodeout: *mut *mut super::Gdi::DEVMODEA) -> windows_core::Result<()>; + fn ConvertDevModeToPrintTicket(&self, cbdevmode: u32, pdevmode: *mut super::Gdi::DEVMODEA, pprintticket: windows_core::Ref<'_, super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result<()>; + fn GetPrintCapabilities(&self, pprintticket: windows_core::Ref<'_, super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result; + fn ValidatePrintTicket(&self, pbaseticket: windows_core::Ref<'_, super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] impl IPrintTicketProvider_Vtbl { @@ -8394,15 +8394,15 @@ impl IPrintTicketProvider_Vtbl { } unsafe extern "system" fn ConvertPrintTicketToDevMode(this: *mut core::ffi::c_void, pprintticket: *mut core::ffi::c_void, cbdevmodein: u32, pdevmodein: *mut super::Gdi::DEVMODEA, pcbdevmodeout: *mut u32, ppdevmodeout: *mut *mut super::Gdi::DEVMODEA) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintTicketProvider_Impl::ConvertPrintTicketToDevMode(this, windows_core::from_raw_borrowed(&pprintticket), core::mem::transmute_copy(&cbdevmodein), core::mem::transmute_copy(&pdevmodein), core::mem::transmute_copy(&pcbdevmodeout), core::mem::transmute_copy(&ppdevmodeout)).into() + IPrintTicketProvider_Impl::ConvertPrintTicketToDevMode(this, core::mem::transmute_copy(&pprintticket), core::mem::transmute_copy(&cbdevmodein), core::mem::transmute_copy(&pdevmodein), core::mem::transmute_copy(&pcbdevmodeout), core::mem::transmute_copy(&ppdevmodeout)).into() } unsafe extern "system" fn ConvertDevModeToPrintTicket(this: *mut core::ffi::c_void, cbdevmode: u32, pdevmode: *mut super::Gdi::DEVMODEA, pprintticket: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintTicketProvider_Impl::ConvertDevModeToPrintTicket(this, core::mem::transmute_copy(&cbdevmode), core::mem::transmute_copy(&pdevmode), windows_core::from_raw_borrowed(&pprintticket)).into() + IPrintTicketProvider_Impl::ConvertDevModeToPrintTicket(this, core::mem::transmute_copy(&cbdevmode), core::mem::transmute_copy(&pdevmode), core::mem::transmute_copy(&pprintticket)).into() } unsafe extern "system" fn GetPrintCapabilities(this: *mut core::ffi::c_void, pprintticket: *mut core::ffi::c_void, ppcapabilities: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintTicketProvider_Impl::GetPrintCapabilities(this, windows_core::from_raw_borrowed(&pprintticket)) { + match IPrintTicketProvider_Impl::GetPrintCapabilities(this, core::mem::transmute_copy(&pprintticket)) { Ok(ok__) => { ppcapabilities.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8412,7 +8412,7 @@ impl IPrintTicketProvider_Vtbl { } unsafe extern "system" fn ValidatePrintTicket(this: *mut core::ffi::c_void, pbaseticket: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintTicketProvider_Impl::ValidatePrintTicket(this, windows_core::from_raw_borrowed(&pbaseticket)).into() + IPrintTicketProvider_Impl::ValidatePrintTicket(this, core::mem::transmute_copy(&pbaseticket)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -8472,15 +8472,15 @@ pub struct IPrintTicketProvider2_Vtbl { } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] pub trait IPrintTicketProvider2_Impl: IPrintTicketProvider_Impl { - fn GetPrintDeviceCapabilities(&self, pprintticket: Option<&super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result; - fn GetPrintDeviceResources(&self, pszlocalename: &windows_core::PCWSTR, pprintticket: Option<&super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result; + fn GetPrintDeviceCapabilities(&self, pprintticket: windows_core::Ref<'_, super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result; + fn GetPrintDeviceResources(&self, pszlocalename: &windows_core::PCWSTR, pprintticket: windows_core::Ref<'_, super::super::Data::Xml::MsXml::IXMLDOMDocument2>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] impl IPrintTicketProvider2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetPrintDeviceCapabilities(this: *mut core::ffi::c_void, pprintticket: *mut core::ffi::c_void, ppdevicecapabilities: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintTicketProvider2_Impl::GetPrintDeviceCapabilities(this, windows_core::from_raw_borrowed(&pprintticket)) { + match IPrintTicketProvider2_Impl::GetPrintDeviceCapabilities(this, core::mem::transmute_copy(&pprintticket)) { Ok(ok__) => { ppdevicecapabilities.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8490,7 +8490,7 @@ impl IPrintTicketProvider2_Vtbl { } unsafe extern "system" fn GetPrintDeviceResources(this: *mut core::ffi::c_void, pszlocalename: windows_core::PCWSTR, pprintticket: *mut core::ffi::c_void, ppdeviceresources: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintTicketProvider2_Impl::GetPrintDeviceResources(this, core::mem::transmute(&pszlocalename), windows_core::from_raw_borrowed(&pprintticket)) { + match IPrintTicketProvider2_Impl::GetPrintDeviceResources(this, core::mem::transmute(&pszlocalename), core::mem::transmute_copy(&pprintticket)) { Ok(ok__) => { ppdeviceresources.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8532,13 +8532,13 @@ pub struct IPrintUnidiAsyncNotifyRegistration_Vtbl { pub AsyncGetNotification: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPrintUnidiAsyncNotifyRegistration_Impl: IPrintAsyncNotifyRegistration_Impl { - fn AsyncGetNotification(&self, param0: Option<&IAsyncGetSendNotificationCookie>) -> windows_core::Result<()>; + fn AsyncGetNotification(&self, param0: windows_core::Ref<'_, IAsyncGetSendNotificationCookie>) -> windows_core::Result<()>; } impl IPrintUnidiAsyncNotifyRegistration_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AsyncGetNotification(this: *mut core::ffi::c_void, param0: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintUnidiAsyncNotifyRegistration_Impl::AsyncGetNotification(this, windows_core::from_raw_borrowed(¶m0)).into() + IPrintUnidiAsyncNotifyRegistration_Impl::AsyncGetNotification(this, core::mem::transmute_copy(¶m0)).into() } Self { base__: IPrintAsyncNotifyRegistration_Vtbl::new::(), AsyncGetNotification: AsyncGetNotification:: } } @@ -8899,19 +8899,19 @@ pub struct IPrinterExtensionEvent_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPrinterExtensionEvent_Impl: super::super::System::Com::IDispatch_Impl { - fn OnDriverEvent(&self, peventargs: Option<&IPrinterExtensionEventArgs>) -> windows_core::Result<()>; - fn OnPrinterQueuesEnumerated(&self, pcontextcollection: Option<&IPrinterExtensionContextCollection>) -> windows_core::Result<()>; + fn OnDriverEvent(&self, peventargs: windows_core::Ref<'_, IPrinterExtensionEventArgs>) -> windows_core::Result<()>; + fn OnPrinterQueuesEnumerated(&self, pcontextcollection: windows_core::Ref<'_, IPrinterExtensionContextCollection>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IPrinterExtensionEvent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnDriverEvent(this: *mut core::ffi::c_void, peventargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrinterExtensionEvent_Impl::OnDriverEvent(this, windows_core::from_raw_borrowed(&peventargs)).into() + IPrinterExtensionEvent_Impl::OnDriverEvent(this, core::mem::transmute_copy(&peventargs)).into() } unsafe extern "system" fn OnPrinterQueuesEnumerated(this: *mut core::ffi::c_void, pcontextcollection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrinterExtensionEvent_Impl::OnPrinterQueuesEnumerated(this, windows_core::from_raw_borrowed(&pcontextcollection)).into() + IPrinterExtensionEvent_Impl::OnPrinterQueuesEnumerated(this, core::mem::transmute_copy(&pcontextcollection)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -9483,7 +9483,7 @@ pub struct IPrinterQueue2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPrinterQueue2_Impl: IPrinterQueue_Impl { - fn SendBidiSetRequestAsync(&self, bstrbidirequest: &windows_core::BSTR, pcallback: Option<&IPrinterBidiSetRequestCallback>) -> windows_core::Result; + fn SendBidiSetRequestAsync(&self, bstrbidirequest: &windows_core::BSTR, pcallback: windows_core::Ref<'_, IPrinterBidiSetRequestCallback>) -> windows_core::Result; fn GetPrinterQueueView(&self, ulviewoffset: u32, ulviewsize: u32) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -9491,7 +9491,7 @@ impl IPrinterQueue2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SendBidiSetRequestAsync(this: *mut core::ffi::c_void, bstrbidirequest: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, ppasyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrinterQueue2_Impl::SendBidiSetRequestAsync(this, core::mem::transmute(&bstrbidirequest), windows_core::from_raw_borrowed(&pcallback)) { + match IPrinterQueue2_Impl::SendBidiSetRequestAsync(this, core::mem::transmute(&bstrbidirequest), core::mem::transmute_copy(&pcallback)) { Ok(ok__) => { ppasyncoperation.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9633,14 +9633,14 @@ pub struct IPrinterQueueViewEvent_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPrinterQueueViewEvent_Impl: super::super::System::Com::IDispatch_Impl { - fn OnChanged(&self, pcollection: Option<&IPrintJobCollection>, ulviewoffset: u32, ulviewsize: u32, ulcountjobsinprintqueue: u32) -> windows_core::Result<()>; + fn OnChanged(&self, pcollection: windows_core::Ref<'_, IPrintJobCollection>, ulviewoffset: u32, ulviewsize: u32, ulcountjobsinprintqueue: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IPrinterQueueViewEvent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnChanged(this: *mut core::ffi::c_void, pcollection: *mut core::ffi::c_void, ulviewoffset: u32, ulviewsize: u32, ulcountjobsinprintqueue: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrinterQueueViewEvent_Impl::OnChanged(this, windows_core::from_raw_borrowed(&pcollection), core::mem::transmute_copy(&ulviewoffset), core::mem::transmute_copy(&ulviewsize), core::mem::transmute_copy(&ulcountjobsinprintqueue)).into() + IPrinterQueueViewEvent_Impl::OnChanged(this, core::mem::transmute_copy(&pcollection), core::mem::transmute_copy(&ulviewoffset), core::mem::transmute_copy(&ulviewsize), core::mem::transmute_copy(&ulcountjobsinprintqueue)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), OnChanged: OnChanged:: } } @@ -9813,7 +9813,7 @@ pub trait IPrinterScriptablePropertyBag_Impl: super::super::System::Com::IDispat fn GetString(&self, bstrname: &windows_core::BSTR) -> windows_core::Result; fn SetString(&self, bstrname: &windows_core::BSTR, bstrvalue: &windows_core::BSTR) -> windows_core::Result<()>; fn GetBytes(&self, bstrname: &windows_core::BSTR) -> windows_core::Result; - fn SetBytes(&self, bstrname: &windows_core::BSTR, parray: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetBytes(&self, bstrname: &windows_core::BSTR, parray: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn GetReadStream(&self, bstrname: &windows_core::BSTR) -> windows_core::Result; fn GetWriteStream(&self, bstrname: &windows_core::BSTR) -> windows_core::Result; } @@ -9874,7 +9874,7 @@ impl IPrinterScriptablePropertyBag_Vtbl { } unsafe extern "system" fn SetBytes(this: *mut core::ffi::c_void, bstrname: *mut core::ffi::c_void, parray: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrinterScriptablePropertyBag_Impl::SetBytes(this, core::mem::transmute(&bstrname), windows_core::from_raw_borrowed(&parray)).into() + IPrinterScriptablePropertyBag_Impl::SetBytes(this, core::mem::transmute(&bstrname), core::mem::transmute_copy(&parray)).into() } unsafe extern "system" fn GetReadStream(this: *mut core::ffi::c_void, bstrname: *mut core::ffi::c_void, ppstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10000,7 +10000,7 @@ pub struct IPrinterScriptableSequentialStream_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPrinterScriptableSequentialStream_Impl: super::super::System::Com::IDispatch_Impl { fn Read(&self, cbread: i32) -> windows_core::Result; - fn Write(&self, parray: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result; + fn Write(&self, parray: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IPrinterScriptableSequentialStream_Vtbl { @@ -10017,7 +10017,7 @@ impl IPrinterScriptableSequentialStream_Vtbl { } unsafe extern "system" fn Write(this: *mut core::ffi::c_void, parray: *mut core::ffi::c_void, pcbwritten: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrinterScriptableSequentialStream_Impl::Write(this, windows_core::from_raw_borrowed(&parray)) { + match IPrinterScriptableSequentialStream_Impl::Write(this, core::mem::transmute_copy(&parray)) { Ok(ok__) => { pcbwritten.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10131,7 +10131,7 @@ pub struct IXpsDocument_Vtbl { } pub trait IXpsDocument_Impl: windows_core::IUnknownImpl { fn GetThumbnail(&self) -> windows_core::Result; - fn SetThumbnail(&self, pthumbnail: Option<&IPartThumbnail>) -> windows_core::Result<()>; + fn SetThumbnail(&self, pthumbnail: windows_core::Ref<'_, IPartThumbnail>) -> windows_core::Result<()>; } impl IXpsDocument_Vtbl { pub const fn new() -> Self { @@ -10147,7 +10147,7 @@ impl IXpsDocument_Vtbl { } unsafe extern "system" fn SetThumbnail(this: *mut core::ffi::c_void, pthumbnail: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsDocument_Impl::SetThumbnail(this, windows_core::from_raw_borrowed(&pthumbnail)).into() + IXpsDocument_Impl::SetThumbnail(this, core::mem::transmute_copy(&pthumbnail)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10215,35 +10215,35 @@ pub struct IXpsDocumentConsumer_Vtbl { pub GetNewEmptyPart: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *const windows_core::GUID, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IXpsDocumentConsumer_Impl: windows_core::IUnknownImpl { - fn SendXpsUnknown(&self, punknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn SendXpsDocument(&self, pixpsdocument: Option<&IXpsDocument>) -> windows_core::Result<()>; - fn SendFixedDocumentSequence(&self, pifixeddocumentsequence: Option<&IFixedDocumentSequence>) -> windows_core::Result<()>; - fn SendFixedDocument(&self, pifixeddocument: Option<&IFixedDocument>) -> windows_core::Result<()>; - fn SendFixedPage(&self, pifixedpage: Option<&IFixedPage>) -> windows_core::Result<()>; + fn SendXpsUnknown(&self, punknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn SendXpsDocument(&self, pixpsdocument: windows_core::Ref<'_, IXpsDocument>) -> windows_core::Result<()>; + fn SendFixedDocumentSequence(&self, pifixeddocumentsequence: windows_core::Ref<'_, IFixedDocumentSequence>) -> windows_core::Result<()>; + fn SendFixedDocument(&self, pifixeddocument: windows_core::Ref<'_, IFixedDocument>) -> windows_core::Result<()>; + fn SendFixedPage(&self, pifixedpage: windows_core::Ref<'_, IFixedPage>) -> windows_core::Result<()>; fn CloseSender(&self) -> windows_core::Result<()>; - fn GetNewEmptyPart(&self, uri: &windows_core::PCWSTR, riid: *const windows_core::GUID, ppnewobject: *mut *mut core::ffi::c_void, ppwritestream: *mut Option) -> windows_core::Result<()>; + fn GetNewEmptyPart(&self, uri: &windows_core::PCWSTR, riid: *const windows_core::GUID, ppnewobject: *mut *mut core::ffi::c_void, ppwritestream: windows_core::OutRef<'_, IPrintWriteStream>) -> windows_core::Result<()>; } impl IXpsDocumentConsumer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SendXpsUnknown(this: *mut core::ffi::c_void, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsDocumentConsumer_Impl::SendXpsUnknown(this, windows_core::from_raw_borrowed(&punknown)).into() + IXpsDocumentConsumer_Impl::SendXpsUnknown(this, core::mem::transmute_copy(&punknown)).into() } unsafe extern "system" fn SendXpsDocument(this: *mut core::ffi::c_void, pixpsdocument: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsDocumentConsumer_Impl::SendXpsDocument(this, windows_core::from_raw_borrowed(&pixpsdocument)).into() + IXpsDocumentConsumer_Impl::SendXpsDocument(this, core::mem::transmute_copy(&pixpsdocument)).into() } unsafe extern "system" fn SendFixedDocumentSequence(this: *mut core::ffi::c_void, pifixeddocumentsequence: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsDocumentConsumer_Impl::SendFixedDocumentSequence(this, windows_core::from_raw_borrowed(&pifixeddocumentsequence)).into() + IXpsDocumentConsumer_Impl::SendFixedDocumentSequence(this, core::mem::transmute_copy(&pifixeddocumentsequence)).into() } unsafe extern "system" fn SendFixedDocument(this: *mut core::ffi::c_void, pifixeddocument: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsDocumentConsumer_Impl::SendFixedDocument(this, windows_core::from_raw_borrowed(&pifixeddocument)).into() + IXpsDocumentConsumer_Impl::SendFixedDocument(this, core::mem::transmute_copy(&pifixeddocument)).into() } unsafe extern "system" fn SendFixedPage(this: *mut core::ffi::c_void, pifixedpage: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsDocumentConsumer_Impl::SendFixedPage(this, windows_core::from_raw_borrowed(&pifixedpage)).into() + IXpsDocumentConsumer_Impl::SendFixedPage(this, core::mem::transmute_copy(&pifixedpage)).into() } unsafe extern "system" fn CloseSender(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10330,7 +10330,7 @@ pub struct IXpsPartIterator_Vtbl { } pub trait IXpsPartIterator_Impl: windows_core::IUnknownImpl { fn Reset(&self); - fn Current(&self, puri: *mut windows_core::BSTR, ppxpspart: *mut Option) -> windows_core::Result<()>; + fn Current(&self, puri: *mut windows_core::BSTR, ppxpspart: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn IsDone(&self) -> super::super::Foundation::BOOL; fn Next(&self); } @@ -10387,14 +10387,14 @@ pub struct IXpsRasterizationFactory_Vtbl { } #[cfg(feature = "Win32_Storage_Xps")] pub trait IXpsRasterizationFactory_Impl: windows_core::IUnknownImpl { - fn CreateRasterizer(&self, xpspage: Option<&super::super::Storage::Xps::IXpsOMPage>, dpi: f32, nontextrenderingmode: XPSRAS_RENDERING_MODE, textrenderingmode: XPSRAS_RENDERING_MODE) -> windows_core::Result; + fn CreateRasterizer(&self, xpspage: windows_core::Ref<'_, super::super::Storage::Xps::IXpsOMPage>, dpi: f32, nontextrenderingmode: XPSRAS_RENDERING_MODE, textrenderingmode: XPSRAS_RENDERING_MODE) -> windows_core::Result; } #[cfg(feature = "Win32_Storage_Xps")] impl IXpsRasterizationFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateRasterizer(this: *mut core::ffi::c_void, xpspage: *mut core::ffi::c_void, dpi: f32, nontextrenderingmode: XPSRAS_RENDERING_MODE, textrenderingmode: XPSRAS_RENDERING_MODE, ppixpsrasterizer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsRasterizationFactory_Impl::CreateRasterizer(this, windows_core::from_raw_borrowed(&xpspage), core::mem::transmute_copy(&dpi), core::mem::transmute_copy(&nontextrenderingmode), core::mem::transmute_copy(&textrenderingmode)) { + match IXpsRasterizationFactory_Impl::CreateRasterizer(this, core::mem::transmute_copy(&xpspage), core::mem::transmute_copy(&dpi), core::mem::transmute_copy(&nontextrenderingmode), core::mem::transmute_copy(&textrenderingmode)) { Ok(ok__) => { ppixpsrasterizer.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10432,14 +10432,14 @@ pub struct IXpsRasterizationFactory1_Vtbl { } #[cfg(feature = "Win32_Storage_Xps")] pub trait IXpsRasterizationFactory1_Impl: windows_core::IUnknownImpl { - fn CreateRasterizer(&self, xpspage: Option<&super::super::Storage::Xps::IXpsOMPage>, dpi: f32, nontextrenderingmode: XPSRAS_RENDERING_MODE, textrenderingmode: XPSRAS_RENDERING_MODE, pixelformat: XPSRAS_PIXEL_FORMAT) -> windows_core::Result; + fn CreateRasterizer(&self, xpspage: windows_core::Ref<'_, super::super::Storage::Xps::IXpsOMPage>, dpi: f32, nontextrenderingmode: XPSRAS_RENDERING_MODE, textrenderingmode: XPSRAS_RENDERING_MODE, pixelformat: XPSRAS_PIXEL_FORMAT) -> windows_core::Result; } #[cfg(feature = "Win32_Storage_Xps")] impl IXpsRasterizationFactory1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateRasterizer(this: *mut core::ffi::c_void, xpspage: *mut core::ffi::c_void, dpi: f32, nontextrenderingmode: XPSRAS_RENDERING_MODE, textrenderingmode: XPSRAS_RENDERING_MODE, pixelformat: XPSRAS_PIXEL_FORMAT, ppixpsrasterizer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsRasterizationFactory1_Impl::CreateRasterizer(this, windows_core::from_raw_borrowed(&xpspage), core::mem::transmute_copy(&dpi), core::mem::transmute_copy(&nontextrenderingmode), core::mem::transmute_copy(&textrenderingmode), core::mem::transmute_copy(&pixelformat)) { + match IXpsRasterizationFactory1_Impl::CreateRasterizer(this, core::mem::transmute_copy(&xpspage), core::mem::transmute_copy(&dpi), core::mem::transmute_copy(&nontextrenderingmode), core::mem::transmute_copy(&textrenderingmode), core::mem::transmute_copy(&pixelformat)) { Ok(ok__) => { ppixpsrasterizer.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10477,14 +10477,14 @@ pub struct IXpsRasterizationFactory2_Vtbl { } #[cfg(feature = "Win32_Storage_Xps")] pub trait IXpsRasterizationFactory2_Impl: windows_core::IUnknownImpl { - fn CreateRasterizer(&self, xpspage: Option<&super::super::Storage::Xps::IXpsOMPage>, dpix: f32, dpiy: f32, nontextrenderingmode: XPSRAS_RENDERING_MODE, textrenderingmode: XPSRAS_RENDERING_MODE, pixelformat: XPSRAS_PIXEL_FORMAT, backgroundcolor: XPSRAS_BACKGROUND_COLOR) -> windows_core::Result; + fn CreateRasterizer(&self, xpspage: windows_core::Ref<'_, super::super::Storage::Xps::IXpsOMPage>, dpix: f32, dpiy: f32, nontextrenderingmode: XPSRAS_RENDERING_MODE, textrenderingmode: XPSRAS_RENDERING_MODE, pixelformat: XPSRAS_PIXEL_FORMAT, backgroundcolor: XPSRAS_BACKGROUND_COLOR) -> windows_core::Result; } #[cfg(feature = "Win32_Storage_Xps")] impl IXpsRasterizationFactory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateRasterizer(this: *mut core::ffi::c_void, xpspage: *mut core::ffi::c_void, dpix: f32, dpiy: f32, nontextrenderingmode: XPSRAS_RENDERING_MODE, textrenderingmode: XPSRAS_RENDERING_MODE, pixelformat: XPSRAS_PIXEL_FORMAT, backgroundcolor: XPSRAS_BACKGROUND_COLOR, ppixpsrasterizer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsRasterizationFactory2_Impl::CreateRasterizer(this, windows_core::from_raw_borrowed(&xpspage), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy), core::mem::transmute_copy(&nontextrenderingmode), core::mem::transmute_copy(&textrenderingmode), core::mem::transmute_copy(&pixelformat), core::mem::transmute_copy(&backgroundcolor)) { + match IXpsRasterizationFactory2_Impl::CreateRasterizer(this, core::mem::transmute_copy(&xpspage), core::mem::transmute_copy(&dpix), core::mem::transmute_copy(&dpiy), core::mem::transmute_copy(&nontextrenderingmode), core::mem::transmute_copy(&textrenderingmode), core::mem::transmute_copy(&pixelformat), core::mem::transmute_copy(&backgroundcolor)) { Ok(ok__) => { ppixpsrasterizer.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10526,7 +10526,7 @@ pub struct IXpsRasterizer_Vtbl { } #[cfg(feature = "Win32_Graphics_Imaging")] pub trait IXpsRasterizer_Impl: windows_core::IUnknownImpl { - fn RasterizeRect(&self, x: i32, y: i32, width: i32, height: i32, notificationcallback: Option<&IXpsRasterizerNotificationCallback>) -> windows_core::Result; + fn RasterizeRect(&self, x: i32, y: i32, width: i32, height: i32, notificationcallback: windows_core::Ref<'_, IXpsRasterizerNotificationCallback>) -> windows_core::Result; fn SetMinimalLineWidth(&self, width: i32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Imaging")] @@ -10534,7 +10534,7 @@ impl IXpsRasterizer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RasterizeRect(this: *mut core::ffi::c_void, x: i32, y: i32, width: i32, height: i32, notificationcallback: *mut core::ffi::c_void, bitmap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsRasterizer_Impl::RasterizeRect(this, core::mem::transmute_copy(&x), core::mem::transmute_copy(&y), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), windows_core::from_raw_borrowed(¬ificationcallback)) { + match IXpsRasterizer_Impl::RasterizeRect(this, core::mem::transmute_copy(&x), core::mem::transmute_copy(&y), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(¬ificationcallback)) { Ok(ok__) => { bitmap.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs index e1d7863f5c..4027b1b07a 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/Apo/mod.rs @@ -476,7 +476,7 @@ pub struct IApoAuxiliaryInputConfiguration_Vtbl { pub trait IApoAuxiliaryInputConfiguration_Impl: windows_core::IUnknownImpl { fn AddAuxiliaryInput(&self, dwinputid: u32, cbdatasize: u32, pbydata: *const u8, pinputconnection: *const APO_CONNECTION_DESCRIPTOR) -> windows_core::Result<()>; fn RemoveAuxiliaryInput(&self, dwinputid: u32) -> windows_core::Result<()>; - fn IsInputFormatSupported(&self, prequestedinputformat: Option<&IAudioMediaType>) -> windows_core::Result; + fn IsInputFormatSupported(&self, prequestedinputformat: windows_core::Ref<'_, IAudioMediaType>) -> windows_core::Result; } impl IApoAuxiliaryInputConfiguration_Vtbl { pub const fn new() -> Self { @@ -490,7 +490,7 @@ impl IApoAuxiliaryInputConfiguration_Vtbl { } unsafe extern "system" fn IsInputFormatSupported(this: *mut core::ffi::c_void, prequestedinputformat: *mut core::ffi::c_void, ppsupportedinputformat: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IApoAuxiliaryInputConfiguration_Impl::IsInputFormatSupported(this, windows_core::from_raw_borrowed(&prequestedinputformat)) { + match IApoAuxiliaryInputConfiguration_Impl::IsInputFormatSupported(this, core::mem::transmute_copy(&prequestedinputformat)) { Ok(ok__) => { ppsupportedinputformat.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -554,13 +554,13 @@ pub struct IAudioDeviceModulesClient_Vtbl { pub SetAudioDeviceModulesManager: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAudioDeviceModulesClient_Impl: windows_core::IUnknownImpl { - fn SetAudioDeviceModulesManager(&self, paudiodevicemodulesmanager: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetAudioDeviceModulesManager(&self, paudiodevicemodulesmanager: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IAudioDeviceModulesClient_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetAudioDeviceModulesManager(this: *mut core::ffi::c_void, paudiodevicemodulesmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioDeviceModulesClient_Impl::SetAudioDeviceModulesManager(this, windows_core::from_raw_borrowed(&paudiodevicemodulesmanager)).into() + IAudioDeviceModulesClient_Impl::SetAudioDeviceModulesManager(this, core::mem::transmute_copy(&paudiodevicemodulesmanager)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetAudioDeviceModulesManager: SetAudioDeviceModulesManager:: } } @@ -600,7 +600,7 @@ pub struct IAudioMediaType_Vtbl { } pub trait IAudioMediaType_Impl: windows_core::IUnknownImpl { fn IsCompressedFormat(&self) -> windows_core::Result; - fn IsEqual(&self, piaudiotype: Option<&IAudioMediaType>) -> windows_core::Result; + fn IsEqual(&self, piaudiotype: windows_core::Ref<'_, IAudioMediaType>) -> windows_core::Result; fn GetAudioFormat(&self) -> *mut super::WAVEFORMATEX; fn GetUncompressedAudioFormat(&self, puncompressedaudioformat: *mut UNCOMPRESSEDAUDIOFORMAT) -> windows_core::Result<()>; } @@ -618,7 +618,7 @@ impl IAudioMediaType_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, piaudiotype: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAudioMediaType_Impl::IsEqual(this, windows_core::from_raw_borrowed(&piaudiotype)) { + match IAudioMediaType_Impl::IsEqual(this, core::mem::transmute_copy(&piaudiotype)) { Ok(ok__) => { pdwflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -701,8 +701,8 @@ pub trait IAudioProcessingObject_Impl: windows_core::IUnknownImpl { fn GetLatency(&self) -> windows_core::Result; fn GetRegistrationProperties(&self) -> windows_core::Result<*mut APO_REG_PROPERTIES>; fn Initialize(&self, cbdatasize: u32, pbydata: *const u8) -> windows_core::Result<()>; - fn IsInputFormatSupported(&self, poppositeformat: Option<&IAudioMediaType>, prequestedinputformat: Option<&IAudioMediaType>) -> windows_core::Result; - fn IsOutputFormatSupported(&self, poppositeformat: Option<&IAudioMediaType>, prequestedoutputformat: Option<&IAudioMediaType>) -> windows_core::Result; + fn IsInputFormatSupported(&self, poppositeformat: windows_core::Ref<'_, IAudioMediaType>, prequestedinputformat: windows_core::Ref<'_, IAudioMediaType>) -> windows_core::Result; + fn IsOutputFormatSupported(&self, poppositeformat: windows_core::Ref<'_, IAudioMediaType>, prequestedoutputformat: windows_core::Ref<'_, IAudioMediaType>) -> windows_core::Result; fn GetInputChannelCount(&self) -> windows_core::Result; } impl IAudioProcessingObject_Vtbl { @@ -737,7 +737,7 @@ impl IAudioProcessingObject_Vtbl { } unsafe extern "system" fn IsInputFormatSupported(this: *mut core::ffi::c_void, poppositeformat: *mut core::ffi::c_void, prequestedinputformat: *mut core::ffi::c_void, ppsupportedinputformat: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAudioProcessingObject_Impl::IsInputFormatSupported(this, windows_core::from_raw_borrowed(&poppositeformat), windows_core::from_raw_borrowed(&prequestedinputformat)) { + match IAudioProcessingObject_Impl::IsInputFormatSupported(this, core::mem::transmute_copy(&poppositeformat), core::mem::transmute_copy(&prequestedinputformat)) { Ok(ok__) => { ppsupportedinputformat.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -747,7 +747,7 @@ impl IAudioProcessingObject_Vtbl { } unsafe extern "system" fn IsOutputFormatSupported(this: *mut core::ffi::c_void, poppositeformat: *mut core::ffi::c_void, prequestedoutputformat: *mut core::ffi::c_void, ppsupportedoutputformat: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAudioProcessingObject_Impl::IsOutputFormatSupported(this, windows_core::from_raw_borrowed(&poppositeformat), windows_core::from_raw_borrowed(&prequestedoutputformat)) { + match IAudioProcessingObject_Impl::IsOutputFormatSupported(this, core::mem::transmute_copy(&poppositeformat), core::mem::transmute_copy(&prequestedoutputformat)) { Ok(ok__) => { ppsupportedoutputformat.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs index f0b279e09c..69622e9f56 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectMusic/mod.rs @@ -895,14 +895,14 @@ pub struct IDirectMusic_Vtbl { #[cfg(feature = "Win32_Media_Audio_DirectSound")] pub trait IDirectMusic_Impl: windows_core::IUnknownImpl { fn EnumPort(&self, dwindex: u32, pportcaps: *mut DMUS_PORTCAPS) -> windows_core::Result<()>; - fn CreateMusicBuffer(&self, pbufferdesc: *mut DMUS_BUFFERDESC, ppbuffer: *mut Option, punkouter: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CreatePort(&self, rclsidport: *const windows_core::GUID, pportparams: *mut DMUS_PORTPARAMS8, ppport: *mut Option, punkouter: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateMusicBuffer(&self, pbufferdesc: *mut DMUS_BUFFERDESC, ppbuffer: windows_core::OutRef<'_, IDirectMusicBuffer>, punkouter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreatePort(&self, rclsidport: *const windows_core::GUID, pportparams: *mut DMUS_PORTPARAMS8, ppport: windows_core::OutRef<'_, IDirectMusicPort>, punkouter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumMasterClock(&self, dwindex: u32, lpclockinfo: *mut DMUS_CLOCKINFO8) -> windows_core::Result<()>; - fn GetMasterClock(&self, pguidclock: *mut windows_core::GUID, ppreferenceclock: *mut Option) -> windows_core::Result<()>; + fn GetMasterClock(&self, pguidclock: *mut windows_core::GUID, ppreferenceclock: windows_core::OutRef<'_, super::super::IReferenceClock>) -> windows_core::Result<()>; fn SetMasterClock(&self, rguidclock: *const windows_core::GUID) -> windows_core::Result<()>; fn Activate(&self, fenable: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetDefaultPort(&self, pguidport: *mut windows_core::GUID) -> windows_core::Result<()>; - fn SetDirectSound(&self, pdirectsound: Option<&super::DirectSound::IDirectSound>, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()>; + fn SetDirectSound(&self, pdirectsound: windows_core::Ref<'_, super::DirectSound::IDirectSound>, hwnd: super::super::super::Foundation::HWND) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_Audio_DirectSound")] impl IDirectMusic_Vtbl { @@ -913,11 +913,11 @@ impl IDirectMusic_Vtbl { } unsafe extern "system" fn CreateMusicBuffer(this: *mut core::ffi::c_void, pbufferdesc: *mut DMUS_BUFFERDESC, ppbuffer: *mut *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusic_Impl::CreateMusicBuffer(this, core::mem::transmute_copy(&pbufferdesc), core::mem::transmute_copy(&ppbuffer), windows_core::from_raw_borrowed(&punkouter)).into() + IDirectMusic_Impl::CreateMusicBuffer(this, core::mem::transmute_copy(&pbufferdesc), core::mem::transmute_copy(&ppbuffer), core::mem::transmute_copy(&punkouter)).into() } unsafe extern "system" fn CreatePort(this: *mut core::ffi::c_void, rclsidport: *const windows_core::GUID, pportparams: *mut DMUS_PORTPARAMS8, ppport: *mut *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusic_Impl::CreatePort(this, core::mem::transmute_copy(&rclsidport), core::mem::transmute_copy(&pportparams), core::mem::transmute_copy(&ppport), windows_core::from_raw_borrowed(&punkouter)).into() + IDirectMusic_Impl::CreatePort(this, core::mem::transmute_copy(&rclsidport), core::mem::transmute_copy(&pportparams), core::mem::transmute_copy(&ppport), core::mem::transmute_copy(&punkouter)).into() } unsafe extern "system" fn EnumMasterClock(this: *mut core::ffi::c_void, dwindex: u32, lpclockinfo: *mut DMUS_CLOCKINFO8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -941,7 +941,7 @@ impl IDirectMusic_Vtbl { } unsafe extern "system" fn SetDirectSound(this: *mut core::ffi::c_void, pdirectsound: *mut core::ffi::c_void, hwnd: super::super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusic_Impl::SetDirectSound(this, windows_core::from_raw_borrowed(&pdirectsound), core::mem::transmute_copy(&hwnd)).into() + IDirectMusic_Impl::SetDirectSound(this, core::mem::transmute_copy(&pdirectsound), core::mem::transmute_copy(&hwnd)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -985,14 +985,14 @@ pub struct IDirectMusic8_Vtbl { } #[cfg(feature = "Win32_Media_Audio_DirectSound")] pub trait IDirectMusic8_Impl: IDirectMusic_Impl { - fn SetExternalMasterClock(&self, pclock: Option<&super::super::IReferenceClock>) -> windows_core::Result<()>; + fn SetExternalMasterClock(&self, pclock: windows_core::Ref<'_, super::super::IReferenceClock>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_Audio_DirectSound")] impl IDirectMusic8_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetExternalMasterClock(this: *mut core::ffi::c_void, pclock: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusic8_Impl::SetExternalMasterClock(this, windows_core::from_raw_borrowed(&pclock)).into() + IDirectMusic8_Impl::SetExternalMasterClock(this, core::mem::transmute_copy(&pclock)).into() } Self { base__: IDirectMusic_Vtbl::new::(), SetExternalMasterClock: SetExternalMasterClock:: } } @@ -1388,11 +1388,11 @@ pub struct IDirectMusicPort_Vtbl { } #[cfg(all(feature = "Win32_Media_Audio_DirectSound", feature = "Win32_System_IO"))] pub trait IDirectMusicPort_Impl: windows_core::IUnknownImpl { - fn PlayBuffer(&self, pbuffer: Option<&IDirectMusicBuffer>) -> windows_core::Result<()>; + fn PlayBuffer(&self, pbuffer: windows_core::Ref<'_, IDirectMusicBuffer>) -> windows_core::Result<()>; fn SetReadNotificationHandle(&self, hevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn Read(&self, pbuffer: Option<&IDirectMusicBuffer>) -> windows_core::Result<()>; - fn DownloadInstrument(&self, pinstrument: Option<&IDirectMusicInstrument>, ppdownloadedinstrument: *mut Option, pnoteranges: *mut DMUS_NOTERANGE, dwnumnoteranges: u32) -> windows_core::Result<()>; - fn UnloadInstrument(&self, pdownloadedinstrument: Option<&IDirectMusicDownloadedInstrument>) -> windows_core::Result<()>; + fn Read(&self, pbuffer: windows_core::Ref<'_, IDirectMusicBuffer>) -> windows_core::Result<()>; + fn DownloadInstrument(&self, pinstrument: windows_core::Ref<'_, IDirectMusicInstrument>, ppdownloadedinstrument: windows_core::OutRef<'_, IDirectMusicDownloadedInstrument>, pnoteranges: *mut DMUS_NOTERANGE, dwnumnoteranges: u32) -> windows_core::Result<()>; + fn UnloadInstrument(&self, pdownloadedinstrument: windows_core::Ref<'_, IDirectMusicDownloadedInstrument>) -> windows_core::Result<()>; fn GetLatencyClock(&self) -> windows_core::Result; fn GetRunningStats(&self, pstats: *mut DMUS_SYNTHSTATS) -> windows_core::Result<()>; fn Compact(&self) -> windows_core::Result<()>; @@ -1403,7 +1403,7 @@ pub trait IDirectMusicPort_Impl: windows_core::IUnknownImpl { fn Activate(&self, factive: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetChannelPriority(&self, dwchannelgroup: u32, dwchannel: u32, dwpriority: u32) -> windows_core::Result<()>; fn GetChannelPriority(&self, dwchannelgroup: u32, dwchannel: u32, pdwpriority: *mut u32) -> windows_core::Result<()>; - fn SetDirectSound(&self, pdirectsound: Option<&super::DirectSound::IDirectSound>, pdirectsoundbuffer: Option<&super::DirectSound::IDirectSoundBuffer>) -> windows_core::Result<()>; + fn SetDirectSound(&self, pdirectsound: windows_core::Ref<'_, super::DirectSound::IDirectSound>, pdirectsoundbuffer: windows_core::Ref<'_, super::DirectSound::IDirectSoundBuffer>) -> windows_core::Result<()>; fn GetFormat(&self, pwaveformatex: *mut super::WAVEFORMATEX, pdwwaveformatexsize: *mut u32, pdwbuffersize: *mut u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Media_Audio_DirectSound", feature = "Win32_System_IO"))] @@ -1411,7 +1411,7 @@ impl IDirectMusicPort_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PlayBuffer(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicPort_Impl::PlayBuffer(this, windows_core::from_raw_borrowed(&pbuffer)).into() + IDirectMusicPort_Impl::PlayBuffer(this, core::mem::transmute_copy(&pbuffer)).into() } unsafe extern "system" fn SetReadNotificationHandle(this: *mut core::ffi::c_void, hevent: super::super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1419,15 +1419,15 @@ impl IDirectMusicPort_Vtbl { } unsafe extern "system" fn Read(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicPort_Impl::Read(this, windows_core::from_raw_borrowed(&pbuffer)).into() + IDirectMusicPort_Impl::Read(this, core::mem::transmute_copy(&pbuffer)).into() } unsafe extern "system" fn DownloadInstrument(this: *mut core::ffi::c_void, pinstrument: *mut core::ffi::c_void, ppdownloadedinstrument: *mut *mut core::ffi::c_void, pnoteranges: *mut DMUS_NOTERANGE, dwnumnoteranges: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicPort_Impl::DownloadInstrument(this, windows_core::from_raw_borrowed(&pinstrument), core::mem::transmute_copy(&ppdownloadedinstrument), core::mem::transmute_copy(&pnoteranges), core::mem::transmute_copy(&dwnumnoteranges)).into() + IDirectMusicPort_Impl::DownloadInstrument(this, core::mem::transmute_copy(&pinstrument), core::mem::transmute_copy(&ppdownloadedinstrument), core::mem::transmute_copy(&pnoteranges), core::mem::transmute_copy(&dwnumnoteranges)).into() } unsafe extern "system" fn UnloadInstrument(this: *mut core::ffi::c_void, pdownloadedinstrument: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicPort_Impl::UnloadInstrument(this, windows_core::from_raw_borrowed(&pdownloadedinstrument)).into() + IDirectMusicPort_Impl::UnloadInstrument(this, core::mem::transmute_copy(&pdownloadedinstrument)).into() } unsafe extern "system" fn GetLatencyClock(this: *mut core::ffi::c_void, ppclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1477,7 +1477,7 @@ impl IDirectMusicPort_Vtbl { } unsafe extern "system" fn SetDirectSound(this: *mut core::ffi::c_void, pdirectsound: *mut core::ffi::c_void, pdirectsoundbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicPort_Impl::SetDirectSound(this, windows_core::from_raw_borrowed(&pdirectsound), windows_core::from_raw_borrowed(&pdirectsoundbuffer)).into() + IDirectMusicPort_Impl::SetDirectSound(this, core::mem::transmute_copy(&pdirectsound), core::mem::transmute_copy(&pdirectsoundbuffer)).into() } unsafe extern "system" fn GetFormat(this: *mut core::ffi::c_void, pwaveformatex: *mut super::WAVEFORMATEX, pdwwaveformatexsize: *mut u32, pdwbuffersize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1555,8 +1555,8 @@ pub trait IDirectMusicPortDownload_Impl: windows_core::IUnknownImpl { fn AllocateBuffer(&self, dwsize: u32) -> windows_core::Result; fn GetDLId(&self, pdwstartdlid: *mut u32, dwcount: u32) -> windows_core::Result<()>; fn GetAppend(&self, pdwappend: *mut u32) -> windows_core::Result<()>; - fn Download(&self, pidmdownload: Option<&IDirectMusicDownload>) -> windows_core::Result<()>; - fn Unload(&self, pidmdownload: Option<&IDirectMusicDownload>) -> windows_core::Result<()>; + fn Download(&self, pidmdownload: windows_core::Ref<'_, IDirectMusicDownload>) -> windows_core::Result<()>; + fn Unload(&self, pidmdownload: windows_core::Ref<'_, IDirectMusicDownload>) -> windows_core::Result<()>; } impl IDirectMusicPortDownload_Vtbl { pub const fn new() -> Self { @@ -1590,11 +1590,11 @@ impl IDirectMusicPortDownload_Vtbl { } unsafe extern "system" fn Download(this: *mut core::ffi::c_void, pidmdownload: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicPortDownload_Impl::Download(this, windows_core::from_raw_borrowed(&pidmdownload)).into() + IDirectMusicPortDownload_Impl::Download(this, core::mem::transmute_copy(&pidmdownload)).into() } unsafe extern "system" fn Unload(this: *mut core::ffi::c_void, pidmdownload: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicPortDownload_Impl::Unload(this, windows_core::from_raw_borrowed(&pidmdownload)).into() + IDirectMusicPortDownload_Impl::Unload(this, core::mem::transmute_copy(&pidmdownload)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1703,10 +1703,10 @@ pub trait IDirectMusicSynth_Impl: windows_core::IUnknownImpl { fn PlayBuffer(&self, rt: i64, pbbuffer: *mut u8, cbbuffer: u32) -> windows_core::Result<()>; fn GetRunningStats(&self, pstats: *mut DMUS_SYNTHSTATS) -> windows_core::Result<()>; fn GetPortCaps(&self, pcaps: *mut DMUS_PORTCAPS) -> windows_core::Result<()>; - fn SetMasterClock(&self, pclock: Option<&super::super::IReferenceClock>) -> windows_core::Result<()>; + fn SetMasterClock(&self, pclock: windows_core::Ref<'_, super::super::IReferenceClock>) -> windows_core::Result<()>; fn GetLatencyClock(&self) -> windows_core::Result; fn Activate(&self, fenable: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetSynthSink(&self, psynthsink: Option<&IDirectMusicSynthSink>) -> windows_core::Result<()>; + fn SetSynthSink(&self, psynthsink: windows_core::Ref<'_, IDirectMusicSynthSink>) -> windows_core::Result<()>; fn Render(&self, pbuffer: *mut i16, dwlength: u32, llposition: i64) -> windows_core::Result<()>; fn SetChannelPriority(&self, dwchannelgroup: u32, dwchannel: u32, dwpriority: u32) -> windows_core::Result<()>; fn GetChannelPriority(&self, dwchannelgroup: u32, dwchannel: u32, pdwpriority: *mut u32) -> windows_core::Result<()>; @@ -1749,7 +1749,7 @@ impl IDirectMusicSynth_Vtbl { } unsafe extern "system" fn SetMasterClock(this: *mut core::ffi::c_void, pclock: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicSynth_Impl::SetMasterClock(this, windows_core::from_raw_borrowed(&pclock)).into() + IDirectMusicSynth_Impl::SetMasterClock(this, core::mem::transmute_copy(&pclock)).into() } unsafe extern "system" fn GetLatencyClock(this: *mut core::ffi::c_void, ppclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1767,7 +1767,7 @@ impl IDirectMusicSynth_Vtbl { } unsafe extern "system" fn SetSynthSink(this: *mut core::ffi::c_void, psynthsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicSynth_Impl::SetSynthSink(this, windows_core::from_raw_borrowed(&psynthsink)).into() + IDirectMusicSynth_Impl::SetSynthSink(this, core::mem::transmute_copy(&psynthsink)).into() } unsafe extern "system" fn Render(this: *mut core::ffi::c_void, pbuffer: *mut i16, dwlength: u32, llposition: i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1949,13 +1949,13 @@ pub struct IDirectMusicSynthSink_Vtbl { } #[cfg(feature = "Win32_Media_Audio_DirectSound")] pub trait IDirectMusicSynthSink_Impl: windows_core::IUnknownImpl { - fn Init(&self, psynth: Option<&IDirectMusicSynth>) -> windows_core::Result<()>; - fn SetMasterClock(&self, pclock: Option<&super::super::IReferenceClock>) -> windows_core::Result<()>; + fn Init(&self, psynth: windows_core::Ref<'_, IDirectMusicSynth>) -> windows_core::Result<()>; + fn SetMasterClock(&self, pclock: windows_core::Ref<'_, super::super::IReferenceClock>) -> windows_core::Result<()>; fn GetLatencyClock(&self) -> windows_core::Result; fn Activate(&self, fenable: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SampleToRefTime(&self, llsampletime: i64, prftime: *mut i64) -> windows_core::Result<()>; fn RefTimeToSample(&self, rftime: i64, pllsampletime: *mut i64) -> windows_core::Result<()>; - fn SetDirectSound(&self, pdirectsound: Option<&super::DirectSound::IDirectSound>, pdirectsoundbuffer: Option<&super::DirectSound::IDirectSoundBuffer>) -> windows_core::Result<()>; + fn SetDirectSound(&self, pdirectsound: windows_core::Ref<'_, super::DirectSound::IDirectSound>, pdirectsoundbuffer: windows_core::Ref<'_, super::DirectSound::IDirectSoundBuffer>) -> windows_core::Result<()>; fn GetDesiredBufferSize(&self, pdwbuffersizeinsamples: *mut u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_Audio_DirectSound")] @@ -1963,11 +1963,11 @@ impl IDirectMusicSynthSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, psynth: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicSynthSink_Impl::Init(this, windows_core::from_raw_borrowed(&psynth)).into() + IDirectMusicSynthSink_Impl::Init(this, core::mem::transmute_copy(&psynth)).into() } unsafe extern "system" fn SetMasterClock(this: *mut core::ffi::c_void, pclock: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicSynthSink_Impl::SetMasterClock(this, windows_core::from_raw_borrowed(&pclock)).into() + IDirectMusicSynthSink_Impl::SetMasterClock(this, core::mem::transmute_copy(&pclock)).into() } unsafe extern "system" fn GetLatencyClock(this: *mut core::ffi::c_void, ppclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1993,7 +1993,7 @@ impl IDirectMusicSynthSink_Vtbl { } unsafe extern "system" fn SetDirectSound(this: *mut core::ffi::c_void, pdirectsound: *mut core::ffi::c_void, pdirectsoundbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicSynthSink_Impl::SetDirectSound(this, windows_core::from_raw_borrowed(&pdirectsound), windows_core::from_raw_borrowed(&pdirectsoundbuffer)).into() + IDirectMusicSynthSink_Impl::SetDirectSound(this, core::mem::transmute_copy(&pdirectsound), core::mem::transmute_copy(&pdirectsoundbuffer)).into() } unsafe extern "system" fn GetDesiredBufferSize(this: *mut core::ffi::c_void, pdwbuffersizeinsamples: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2033,13 +2033,13 @@ pub struct IDirectMusicThru_Vtbl { pub ThruChannel: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, u32, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectMusicThru_Impl: windows_core::IUnknownImpl { - fn ThruChannel(&self, dwsourcechannelgroup: u32, dwsourcechannel: u32, dwdestinationchannelgroup: u32, dwdestinationchannel: u32, pdestinationport: Option<&IDirectMusicPort>) -> windows_core::Result<()>; + fn ThruChannel(&self, dwsourcechannelgroup: u32, dwsourcechannel: u32, dwdestinationchannelgroup: u32, dwdestinationchannel: u32, pdestinationport: windows_core::Ref<'_, IDirectMusicPort>) -> windows_core::Result<()>; } impl IDirectMusicThru_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ThruChannel(this: *mut core::ffi::c_void, dwsourcechannelgroup: u32, dwsourcechannel: u32, dwdestinationchannelgroup: u32, dwdestinationchannel: u32, pdestinationport: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectMusicThru_Impl::ThruChannel(this, core::mem::transmute_copy(&dwsourcechannelgroup), core::mem::transmute_copy(&dwsourcechannel), core::mem::transmute_copy(&dwdestinationchannelgroup), core::mem::transmute_copy(&dwdestinationchannel), windows_core::from_raw_borrowed(&pdestinationport)).into() + IDirectMusicThru_Impl::ThruChannel(this, core::mem::transmute_copy(&dwsourcechannelgroup), core::mem::transmute_copy(&dwsourcechannel), core::mem::transmute_copy(&dwdestinationchannelgroup), core::mem::transmute_copy(&dwdestinationchannel), core::mem::transmute_copy(&pdestinationport)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ThruChannel: ThruChannel:: } } diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs index c61a9c2fe5..246bca5f7e 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs @@ -801,9 +801,9 @@ pub struct IDirectSound_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait IDirectSound_Impl: windows_core::IUnknownImpl { - fn CreateSoundBuffer(&self, pcdsbufferdesc: *const DSBUFFERDESC, ppdsbuffer: *mut Option, punkouter: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateSoundBuffer(&self, pcdsbufferdesc: *const DSBUFFERDESC, ppdsbuffer: windows_core::OutRef<'_, IDirectSoundBuffer>, punkouter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetCaps(&self, pdscaps: *mut DSCAPS) -> windows_core::Result<()>; - fn DuplicateSoundBuffer(&self, pdsbufferoriginal: Option<&IDirectSoundBuffer>) -> windows_core::Result; + fn DuplicateSoundBuffer(&self, pdsbufferoriginal: windows_core::Ref<'_, IDirectSoundBuffer>) -> windows_core::Result; fn SetCooperativeLevel(&self, hwnd: super::super::super::Foundation::HWND, dwlevel: u32) -> windows_core::Result<()>; fn Compact(&self) -> windows_core::Result<()>; fn GetSpeakerConfig(&self) -> windows_core::Result; @@ -814,7 +814,7 @@ impl IDirectSound_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateSoundBuffer(this: *mut core::ffi::c_void, pcdsbufferdesc: *const DSBUFFERDESC, ppdsbuffer: *mut *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectSound_Impl::CreateSoundBuffer(this, core::mem::transmute_copy(&pcdsbufferdesc), core::mem::transmute_copy(&ppdsbuffer), windows_core::from_raw_borrowed(&punkouter)).into() + IDirectSound_Impl::CreateSoundBuffer(this, core::mem::transmute_copy(&pcdsbufferdesc), core::mem::transmute_copy(&ppdsbuffer), core::mem::transmute_copy(&punkouter)).into() } unsafe extern "system" fn GetCaps(this: *mut core::ffi::c_void, pdscaps: *mut DSCAPS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -822,7 +822,7 @@ impl IDirectSound_Vtbl { } unsafe extern "system" fn DuplicateSoundBuffer(this: *mut core::ffi::c_void, pdsbufferoriginal: *mut core::ffi::c_void, ppdsbufferduplicate: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDirectSound_Impl::DuplicateSoundBuffer(this, windows_core::from_raw_borrowed(&pdsbufferoriginal)) { + match IDirectSound_Impl::DuplicateSoundBuffer(this, core::mem::transmute_copy(&pdsbufferoriginal)) { Ok(ok__) => { ppdsbufferduplicate.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1511,7 +1511,7 @@ pub trait IDirectSoundBuffer_Impl: windows_core::IUnknownImpl { fn GetPan(&self) -> windows_core::Result; fn GetFrequency(&self) -> windows_core::Result; fn GetStatus(&self) -> windows_core::Result; - fn Initialize(&self, pdirectsound: Option<&IDirectSound>, pcdsbufferdesc: *const DSBUFFERDESC) -> windows_core::Result<()>; + fn Initialize(&self, pdirectsound: windows_core::Ref<'_, IDirectSound>, pcdsbufferdesc: *const DSBUFFERDESC) -> windows_core::Result<()>; fn Lock(&self, dwoffset: u32, dwbytes: u32, ppvaudioptr1: *mut *mut core::ffi::c_void, pdwaudiobytes1: *mut u32, ppvaudioptr2: *mut *mut core::ffi::c_void, pdwaudiobytes2: *mut u32, dwflags: u32) -> windows_core::Result<()>; fn Play(&self, dwreserved1: u32, dwpriority: u32, dwflags: u32) -> windows_core::Result<()>; fn SetCurrentPosition(&self, dwnewposition: u32) -> windows_core::Result<()>; @@ -1579,7 +1579,7 @@ impl IDirectSoundBuffer_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pdirectsound: *mut core::ffi::c_void, pcdsbufferdesc: *const DSBUFFERDESC) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectSoundBuffer_Impl::Initialize(this, windows_core::from_raw_borrowed(&pdirectsound), core::mem::transmute_copy(&pcdsbufferdesc)).into() + IDirectSoundBuffer_Impl::Initialize(this, core::mem::transmute_copy(&pdirectsound), core::mem::transmute_copy(&pcdsbufferdesc)).into() } unsafe extern "system" fn Lock(this: *mut core::ffi::c_void, dwoffset: u32, dwbytes: u32, ppvaudioptr1: *mut *mut core::ffi::c_void, pdwaudiobytes1: *mut u32, ppvaudioptr2: *mut *mut core::ffi::c_void, pdwaudiobytes2: *mut u32, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1730,7 +1730,7 @@ pub struct IDirectSoundCapture_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait IDirectSoundCapture_Impl: windows_core::IUnknownImpl { - fn CreateCaptureBuffer(&self, pcdscbufferdesc: *const DSCBUFFERDESC, ppdscbuffer: *mut Option, punkouter: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateCaptureBuffer(&self, pcdscbufferdesc: *const DSCBUFFERDESC, ppdscbuffer: windows_core::OutRef<'_, IDirectSoundCaptureBuffer>, punkouter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetCaps(&self) -> windows_core::Result; fn Initialize(&self, pcguiddevice: *const windows_core::GUID) -> windows_core::Result<()>; } @@ -1738,7 +1738,7 @@ impl IDirectSoundCapture_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateCaptureBuffer(this: *mut core::ffi::c_void, pcdscbufferdesc: *const DSCBUFFERDESC, ppdscbuffer: *mut *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectSoundCapture_Impl::CreateCaptureBuffer(this, core::mem::transmute_copy(&pcdscbufferdesc), core::mem::transmute_copy(&ppdscbuffer), windows_core::from_raw_borrowed(&punkouter)).into() + IDirectSoundCapture_Impl::CreateCaptureBuffer(this, core::mem::transmute_copy(&pcdscbufferdesc), core::mem::transmute_copy(&ppdscbuffer), core::mem::transmute_copy(&punkouter)).into() } unsafe extern "system" fn GetCaps(this: *mut core::ffi::c_void, pdsccaps: *mut DSCCAPS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1820,7 +1820,7 @@ pub trait IDirectSoundCaptureBuffer_Impl: windows_core::IUnknownImpl { fn GetCurrentPosition(&self, pdwcaptureposition: *mut u32, pdwreadposition: *mut u32) -> windows_core::Result<()>; fn GetFormat(&self, pwfxformat: *mut super::WAVEFORMATEX, dwsizeallocated: u32, pdwsizewritten: *mut u32) -> windows_core::Result<()>; fn GetStatus(&self) -> windows_core::Result; - fn Initialize(&self, pdirectsoundcapture: Option<&IDirectSoundCapture>, pcdscbufferdesc: *const DSCBUFFERDESC) -> windows_core::Result<()>; + fn Initialize(&self, pdirectsoundcapture: windows_core::Ref<'_, IDirectSoundCapture>, pcdscbufferdesc: *const DSCBUFFERDESC) -> windows_core::Result<()>; fn Lock(&self, dwoffset: u32, dwbytes: u32, ppvaudioptr1: *mut *mut core::ffi::c_void, pdwaudiobytes1: *mut u32, ppvaudioptr2: *mut *mut core::ffi::c_void, pdwaudiobytes2: *mut u32, dwflags: u32) -> windows_core::Result<()>; fn Start(&self, dwflags: u32) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; @@ -1858,7 +1858,7 @@ impl IDirectSoundCaptureBuffer_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pdirectsoundcapture: *mut core::ffi::c_void, pcdscbufferdesc: *const DSCBUFFERDESC) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectSoundCaptureBuffer_Impl::Initialize(this, windows_core::from_raw_borrowed(&pdirectsoundcapture), core::mem::transmute_copy(&pcdscbufferdesc)).into() + IDirectSoundCaptureBuffer_Impl::Initialize(this, core::mem::transmute_copy(&pdirectsoundcapture), core::mem::transmute_copy(&pcdscbufferdesc)).into() } unsafe extern "system" fn Lock(this: *mut core::ffi::c_void, dwoffset: u32, dwbytes: u32, ppvaudioptr1: *mut *mut core::ffi::c_void, pdwaudiobytes1: *mut u32, ppvaudioptr2: *mut *mut core::ffi::c_void, pdwaudiobytes2: *mut u32, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2531,7 +2531,7 @@ pub struct IDirectSoundFullDuplex_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *const DSCBUFFERDESC, *const DSBUFFERDESC, super::super::super::Foundation::HWND, u32, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDirectSoundFullDuplex_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pcaptureguid: *const windows_core::GUID, prenderguid: *const windows_core::GUID, lpdscbufferdesc: *const DSCBUFFERDESC, lpdsbufferdesc: *const DSBUFFERDESC, hwnd: super::super::super::Foundation::HWND, dwlevel: u32, lplpdirectsoundcapturebuffer8: *mut Option, lplpdirectsoundbuffer8: *mut Option) -> windows_core::Result<()>; + fn Initialize(&self, pcaptureguid: *const windows_core::GUID, prenderguid: *const windows_core::GUID, lpdscbufferdesc: *const DSCBUFFERDESC, lpdsbufferdesc: *const DSBUFFERDESC, hwnd: super::super::super::Foundation::HWND, dwlevel: u32, lplpdirectsoundcapturebuffer8: windows_core::OutRef<'_, IDirectSoundCaptureBuffer8>, lplpdirectsoundbuffer8: windows_core::OutRef<'_, IDirectSoundBuffer8>) -> windows_core::Result<()>; } impl IDirectSoundFullDuplex_Vtbl { pub const fn new() -> Self { diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs index c4953a61c6..4abc6b2d22 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/Endpoints/mod.rs @@ -360,8 +360,8 @@ pub struct IAudioEndpointVolume_Vtbl { pub GetVolumeRange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut f32, *mut f32, *mut f32) -> windows_core::HRESULT, } pub trait IAudioEndpointVolume_Impl: windows_core::IUnknownImpl { - fn RegisterControlChangeNotify(&self, pnotify: Option<&IAudioEndpointVolumeCallback>) -> windows_core::Result<()>; - fn UnregisterControlChangeNotify(&self, pnotify: Option<&IAudioEndpointVolumeCallback>) -> windows_core::Result<()>; + fn RegisterControlChangeNotify(&self, pnotify: windows_core::Ref<'_, IAudioEndpointVolumeCallback>) -> windows_core::Result<()>; + fn UnregisterControlChangeNotify(&self, pnotify: windows_core::Ref<'_, IAudioEndpointVolumeCallback>) -> windows_core::Result<()>; fn GetChannelCount(&self) -> windows_core::Result; fn SetMasterVolumeLevel(&self, fleveldb: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; fn SetMasterVolumeLevelScalar(&self, flevel: f32, pguideventcontext: *const windows_core::GUID) -> windows_core::Result<()>; @@ -383,11 +383,11 @@ impl IAudioEndpointVolume_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterControlChangeNotify(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioEndpointVolume_Impl::RegisterControlChangeNotify(this, windows_core::from_raw_borrowed(&pnotify)).into() + IAudioEndpointVolume_Impl::RegisterControlChangeNotify(this, core::mem::transmute_copy(&pnotify)).into() } unsafe extern "system" fn UnregisterControlChangeNotify(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioEndpointVolume_Impl::UnregisterControlChangeNotify(this, windows_core::from_raw_borrowed(&pnotify)).into() + IAudioEndpointVolume_Impl::UnregisterControlChangeNotify(this, core::mem::transmute_copy(&pnotify)).into() } unsafe extern "system" fn GetChannelCount(this: *mut core::ffi::c_void, pnchannelcount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -761,10 +761,10 @@ pub struct IHardwareAudioEngineBase_Vtbl { } pub trait IHardwareAudioEngineBase_Impl: windows_core::IUnknownImpl { fn GetAvailableOffloadConnectorCount(&self, _pwstrdeviceid: &windows_core::PCWSTR, _uconnectorid: u32) -> windows_core::Result; - fn GetEngineFormat(&self, pdevice: Option<&super::IMMDevice>, _brequestdeviceformat: super::super::super::Foundation::BOOL, _ppwfxformat: *mut *mut super::WAVEFORMATEX) -> windows_core::Result<()>; - fn SetEngineDeviceFormat(&self, pdevice: Option<&super::IMMDevice>, _pwfxformat: *mut super::WAVEFORMATEX) -> windows_core::Result<()>; - fn SetGfxState(&self, pdevice: Option<&super::IMMDevice>, _benable: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn GetGfxState(&self, pdevice: Option<&super::IMMDevice>) -> windows_core::Result; + fn GetEngineFormat(&self, pdevice: windows_core::Ref<'_, super::IMMDevice>, _brequestdeviceformat: super::super::super::Foundation::BOOL, _ppwfxformat: *mut *mut super::WAVEFORMATEX) -> windows_core::Result<()>; + fn SetEngineDeviceFormat(&self, pdevice: windows_core::Ref<'_, super::IMMDevice>, _pwfxformat: *mut super::WAVEFORMATEX) -> windows_core::Result<()>; + fn SetGfxState(&self, pdevice: windows_core::Ref<'_, super::IMMDevice>, _benable: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn GetGfxState(&self, pdevice: windows_core::Ref<'_, super::IMMDevice>) -> windows_core::Result; } impl IHardwareAudioEngineBase_Vtbl { pub const fn new() -> Self { @@ -780,19 +780,19 @@ impl IHardwareAudioEngineBase_Vtbl { } unsafe extern "system" fn GetEngineFormat(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, _brequestdeviceformat: super::super::super::Foundation::BOOL, _ppwfxformat: *mut *mut super::WAVEFORMATEX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHardwareAudioEngineBase_Impl::GetEngineFormat(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&_brequestdeviceformat), core::mem::transmute_copy(&_ppwfxformat)).into() + IHardwareAudioEngineBase_Impl::GetEngineFormat(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&_brequestdeviceformat), core::mem::transmute_copy(&_ppwfxformat)).into() } unsafe extern "system" fn SetEngineDeviceFormat(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, _pwfxformat: *mut super::WAVEFORMATEX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHardwareAudioEngineBase_Impl::SetEngineDeviceFormat(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&_pwfxformat)).into() + IHardwareAudioEngineBase_Impl::SetEngineDeviceFormat(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&_pwfxformat)).into() } unsafe extern "system" fn SetGfxState(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, _benable: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHardwareAudioEngineBase_Impl::SetGfxState(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&_benable)).into() + IHardwareAudioEngineBase_Impl::SetGfxState(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&_benable)).into() } unsafe extern "system" fn GetGfxState(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, _pbenable: *mut super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHardwareAudioEngineBase_Impl::GetGfxState(this, windows_core::from_raw_borrowed(&pdevice)) { + match IHardwareAudioEngineBase_Impl::GetGfxState(this, core::mem::transmute_copy(&pdevice)) { Ok(ok__) => { _pbenable.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/mod.rs index 2226a2fbd9..80236cda8a 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/mod.rs @@ -527,11 +527,11 @@ pub struct IXAudio2_Vtbl { pub SetDebugConfiguration: unsafe extern "system" fn(*mut core::ffi::c_void, *const XAUDIO2_DEBUG_CONFIGURATION, *const core::ffi::c_void), } pub trait IXAudio2_Impl: windows_core::IUnknownImpl { - fn RegisterForCallbacks(&self, pcallback: Option<&IXAudio2EngineCallback>) -> windows_core::Result<()>; - fn UnregisterForCallbacks(&self, pcallback: Option<&IXAudio2EngineCallback>); - fn CreateSourceVoice(&self, ppsourcevoice: *mut Option, psourceformat: *const super::WAVEFORMATEX, flags: u32, maxfrequencyratio: f32, pcallback: Option<&IXAudio2VoiceCallback>, psendlist: *const XAUDIO2_VOICE_SENDS, peffectchain: *const XAUDIO2_EFFECT_CHAIN) -> windows_core::Result<()>; - fn CreateSubmixVoice(&self, ppsubmixvoice: *mut Option, inputchannels: u32, inputsamplerate: u32, flags: u32, processingstage: u32, psendlist: *const XAUDIO2_VOICE_SENDS, peffectchain: *const XAUDIO2_EFFECT_CHAIN) -> windows_core::Result<()>; - fn CreateMasteringVoice(&self, ppmasteringvoice: *mut Option, inputchannels: u32, inputsamplerate: u32, flags: u32, szdeviceid: &windows_core::PCWSTR, peffectchain: *const XAUDIO2_EFFECT_CHAIN, streamcategory: super::AUDIO_STREAM_CATEGORY) -> windows_core::Result<()>; + fn RegisterForCallbacks(&self, pcallback: windows_core::Ref<'_, IXAudio2EngineCallback>) -> windows_core::Result<()>; + fn UnregisterForCallbacks(&self, pcallback: windows_core::Ref<'_, IXAudio2EngineCallback>); + fn CreateSourceVoice(&self, ppsourcevoice: windows_core::OutRef<'_, IXAudio2SourceVoice>, psourceformat: *const super::WAVEFORMATEX, flags: u32, maxfrequencyratio: f32, pcallback: windows_core::Ref<'_, IXAudio2VoiceCallback>, psendlist: *const XAUDIO2_VOICE_SENDS, peffectchain: *const XAUDIO2_EFFECT_CHAIN) -> windows_core::Result<()>; + fn CreateSubmixVoice(&self, ppsubmixvoice: windows_core::OutRef<'_, IXAudio2SubmixVoice>, inputchannels: u32, inputsamplerate: u32, flags: u32, processingstage: u32, psendlist: *const XAUDIO2_VOICE_SENDS, peffectchain: *const XAUDIO2_EFFECT_CHAIN) -> windows_core::Result<()>; + fn CreateMasteringVoice(&self, ppmasteringvoice: windows_core::OutRef<'_, IXAudio2MasteringVoice>, inputchannels: u32, inputsamplerate: u32, flags: u32, szdeviceid: &windows_core::PCWSTR, peffectchain: *const XAUDIO2_EFFECT_CHAIN, streamcategory: super::AUDIO_STREAM_CATEGORY) -> windows_core::Result<()>; fn StartEngine(&self) -> windows_core::Result<()>; fn StopEngine(&self); fn CommitChanges(&self, operationset: u32) -> windows_core::Result<()>; @@ -542,15 +542,15 @@ impl IXAudio2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterForCallbacks(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXAudio2_Impl::RegisterForCallbacks(this, windows_core::from_raw_borrowed(&pcallback)).into() + IXAudio2_Impl::RegisterForCallbacks(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn UnregisterForCallbacks(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXAudio2_Impl::UnregisterForCallbacks(this, windows_core::from_raw_borrowed(&pcallback)) + IXAudio2_Impl::UnregisterForCallbacks(this, core::mem::transmute_copy(&pcallback)) } unsafe extern "system" fn CreateSourceVoice(this: *mut core::ffi::c_void, ppsourcevoice: *mut *mut core::ffi::c_void, psourceformat: *const super::WAVEFORMATEX, flags: u32, maxfrequencyratio: f32, pcallback: *mut core::ffi::c_void, psendlist: *const XAUDIO2_VOICE_SENDS, peffectchain: *const XAUDIO2_EFFECT_CHAIN) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXAudio2_Impl::CreateSourceVoice(this, core::mem::transmute_copy(&ppsourcevoice), core::mem::transmute_copy(&psourceformat), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&maxfrequencyratio), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&psendlist), core::mem::transmute_copy(&peffectchain)).into() + IXAudio2_Impl::CreateSourceVoice(this, core::mem::transmute_copy(&ppsourcevoice), core::mem::transmute_copy(&psourceformat), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&maxfrequencyratio), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&psendlist), core::mem::transmute_copy(&peffectchain)).into() } unsafe extern "system" fn CreateSubmixVoice(this: *mut core::ffi::c_void, ppsubmixvoice: *mut *mut core::ffi::c_void, inputchannels: u32, inputsamplerate: u32, flags: u32, processingstage: u32, psendlist: *const XAUDIO2_VOICE_SENDS, peffectchain: *const XAUDIO2_EFFECT_CHAIN) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1039,14 +1039,14 @@ pub trait IXAudio2Voice_Impl { fn GetEffectParameters(&self, effectindex: u32, pparameters: *mut core::ffi::c_void, parametersbytesize: u32) -> windows_core::Result<()>; fn SetFilterParameters(&self, pparameters: *const XAUDIO2_FILTER_PARAMETERS, operationset: u32) -> windows_core::Result<()>; fn GetFilterParameters(&self, pparameters: *mut XAUDIO2_FILTER_PARAMETERS); - fn SetOutputFilterParameters(&self, pdestinationvoice: Option<&IXAudio2Voice>, pparameters: *const XAUDIO2_FILTER_PARAMETERS, operationset: u32) -> windows_core::Result<()>; - fn GetOutputFilterParameters(&self, pdestinationvoice: Option<&IXAudio2Voice>, pparameters: *mut XAUDIO2_FILTER_PARAMETERS); + fn SetOutputFilterParameters(&self, pdestinationvoice: windows_core::Ref<'_, IXAudio2Voice>, pparameters: *const XAUDIO2_FILTER_PARAMETERS, operationset: u32) -> windows_core::Result<()>; + fn GetOutputFilterParameters(&self, pdestinationvoice: windows_core::Ref<'_, IXAudio2Voice>, pparameters: *mut XAUDIO2_FILTER_PARAMETERS); fn SetVolume(&self, volume: f32, operationset: u32) -> windows_core::Result<()>; fn GetVolume(&self, pvolume: *mut f32); fn SetChannelVolumes(&self, channels: u32, pvolumes: *const f32, operationset: u32) -> windows_core::Result<()>; fn GetChannelVolumes(&self, channels: u32, pvolumes: *mut f32); - fn SetOutputMatrix(&self, pdestinationvoice: Option<&IXAudio2Voice>, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *const f32, operationset: u32) -> windows_core::Result<()>; - fn GetOutputMatrix(&self, pdestinationvoice: Option<&IXAudio2Voice>, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *mut f32); + fn SetOutputMatrix(&self, pdestinationvoice: windows_core::Ref<'_, IXAudio2Voice>, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *const f32, operationset: u32) -> windows_core::Result<()>; + fn GetOutputMatrix(&self, pdestinationvoice: windows_core::Ref<'_, IXAudio2Voice>, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *mut f32); fn DestroyVoice(&self); } impl IXAudio2Voice_Vtbl { @@ -1104,12 +1104,12 @@ impl IXAudio2Voice_Vtbl { unsafe extern "system" fn SetOutputFilterParameters(this: *mut core::ffi::c_void, pdestinationvoice: *mut core::ffi::c_void, pparameters: *const XAUDIO2_FILTER_PARAMETERS, operationset: u32) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - IXAudio2Voice_Impl::SetOutputFilterParameters(this, windows_core::from_raw_borrowed(&pdestinationvoice), core::mem::transmute_copy(&pparameters), core::mem::transmute_copy(&operationset)).into() + IXAudio2Voice_Impl::SetOutputFilterParameters(this, core::mem::transmute_copy(&pdestinationvoice), core::mem::transmute_copy(&pparameters), core::mem::transmute_copy(&operationset)).into() } unsafe extern "system" fn GetOutputFilterParameters(this: *mut core::ffi::c_void, pdestinationvoice: *mut core::ffi::c_void, pparameters: *mut XAUDIO2_FILTER_PARAMETERS) { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - IXAudio2Voice_Impl::GetOutputFilterParameters(this, windows_core::from_raw_borrowed(&pdestinationvoice), core::mem::transmute_copy(&pparameters)) + IXAudio2Voice_Impl::GetOutputFilterParameters(this, core::mem::transmute_copy(&pdestinationvoice), core::mem::transmute_copy(&pparameters)) } unsafe extern "system" fn SetVolume(this: *mut core::ffi::c_void, volume: f32, operationset: u32) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; @@ -1134,12 +1134,12 @@ impl IXAudio2Voice_Vtbl { unsafe extern "system" fn SetOutputMatrix(this: *mut core::ffi::c_void, pdestinationvoice: *mut core::ffi::c_void, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *const f32, operationset: u32) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - IXAudio2Voice_Impl::SetOutputMatrix(this, windows_core::from_raw_borrowed(&pdestinationvoice), core::mem::transmute_copy(&sourcechannels), core::mem::transmute_copy(&destinationchannels), core::mem::transmute_copy(&plevelmatrix), core::mem::transmute_copy(&operationset)).into() + IXAudio2Voice_Impl::SetOutputMatrix(this, core::mem::transmute_copy(&pdestinationvoice), core::mem::transmute_copy(&sourcechannels), core::mem::transmute_copy(&destinationchannels), core::mem::transmute_copy(&plevelmatrix), core::mem::transmute_copy(&operationset)).into() } unsafe extern "system" fn GetOutputMatrix(this: *mut core::ffi::c_void, pdestinationvoice: *mut core::ffi::c_void, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *mut f32) { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - IXAudio2Voice_Impl::GetOutputMatrix(this, windows_core::from_raw_borrowed(&pdestinationvoice), core::mem::transmute_copy(&sourcechannels), core::mem::transmute_copy(&destinationchannels), core::mem::transmute_copy(&plevelmatrix)) + IXAudio2Voice_Impl::GetOutputMatrix(this, core::mem::transmute_copy(&pdestinationvoice), core::mem::transmute_copy(&sourcechannels), core::mem::transmute_copy(&destinationchannels), core::mem::transmute_copy(&plevelmatrix)) } unsafe extern "system" fn DestroyVoice(this: *mut core::ffi::c_void) { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs index a4cef68e06..d00bd0249f 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs @@ -2235,7 +2235,7 @@ pub struct IActivateAudioInterfaceAsyncOperation_Vtbl { pub GetActivateResult: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::HRESULT, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IActivateAudioInterfaceAsyncOperation_Impl: windows_core::IUnknownImpl { - fn GetActivateResult(&self, activateresult: *mut windows_core::HRESULT, activatedinterface: *mut Option) -> windows_core::Result<()>; + fn GetActivateResult(&self, activateresult: *mut windows_core::HRESULT, activatedinterface: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IActivateAudioInterfaceAsyncOperation_Vtbl { pub const fn new() -> Self { @@ -2266,13 +2266,13 @@ pub struct IActivateAudioInterfaceCompletionHandler_Vtbl { pub ActivateCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IActivateAudioInterfaceCompletionHandler_Impl: windows_core::IUnknownImpl { - fn ActivateCompleted(&self, activateoperation: Option<&IActivateAudioInterfaceAsyncOperation>) -> windows_core::Result<()>; + fn ActivateCompleted(&self, activateoperation: windows_core::Ref<'_, IActivateAudioInterfaceAsyncOperation>) -> windows_core::Result<()>; } impl IActivateAudioInterfaceCompletionHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ActivateCompleted(this: *mut core::ffi::c_void, activateoperation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActivateAudioInterfaceCompletionHandler_Impl::ActivateCompleted(this, windows_core::from_raw_borrowed(&activateoperation)).into() + IActivateAudioInterfaceCompletionHandler_Impl::ActivateCompleted(this, core::mem::transmute_copy(&activateoperation)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ActivateCompleted: ActivateCompleted:: } } @@ -3030,8 +3030,8 @@ pub struct IAudioEffectsManager_Vtbl { pub SetAudioEffectState: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, AUDIO_EFFECT_STATE) -> windows_core::HRESULT, } pub trait IAudioEffectsManager_Impl: windows_core::IUnknownImpl { - fn RegisterAudioEffectsChangedNotificationCallback(&self, client: Option<&IAudioEffectsChangedNotificationClient>) -> windows_core::Result<()>; - fn UnregisterAudioEffectsChangedNotificationCallback(&self, client: Option<&IAudioEffectsChangedNotificationClient>) -> windows_core::Result<()>; + fn RegisterAudioEffectsChangedNotificationCallback(&self, client: windows_core::Ref<'_, IAudioEffectsChangedNotificationClient>) -> windows_core::Result<()>; + fn UnregisterAudioEffectsChangedNotificationCallback(&self, client: windows_core::Ref<'_, IAudioEffectsChangedNotificationClient>) -> windows_core::Result<()>; fn GetAudioEffects(&self, effects: *mut *mut AUDIO_EFFECT, numeffects: *mut u32) -> windows_core::Result<()>; fn SetAudioEffectState(&self, effectid: &windows_core::GUID, state: AUDIO_EFFECT_STATE) -> windows_core::Result<()>; } @@ -3039,11 +3039,11 @@ impl IAudioEffectsManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterAudioEffectsChangedNotificationCallback(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioEffectsManager_Impl::RegisterAudioEffectsChangedNotificationCallback(this, windows_core::from_raw_borrowed(&client)).into() + IAudioEffectsManager_Impl::RegisterAudioEffectsChangedNotificationCallback(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn UnregisterAudioEffectsChangedNotificationCallback(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioEffectsManager_Impl::UnregisterAudioEffectsChangedNotificationCallback(this, windows_core::from_raw_borrowed(&client)).into() + IAudioEffectsManager_Impl::UnregisterAudioEffectsChangedNotificationCallback(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn GetAudioEffects(this: *mut core::ffi::c_void, effects: *mut *mut AUDIO_EFFECT, numeffects: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3498,8 +3498,8 @@ pub trait IAudioSessionControl_Impl: windows_core::IUnknownImpl { fn SetIconPath(&self, value: &windows_core::PCWSTR, eventcontext: *const windows_core::GUID) -> windows_core::Result<()>; fn GetGroupingParam(&self) -> windows_core::Result; fn SetGroupingParam(&self, r#override: *const windows_core::GUID, eventcontext: *const windows_core::GUID) -> windows_core::Result<()>; - fn RegisterAudioSessionNotification(&self, newnotifications: Option<&IAudioSessionEvents>) -> windows_core::Result<()>; - fn UnregisterAudioSessionNotification(&self, newnotifications: Option<&IAudioSessionEvents>) -> windows_core::Result<()>; + fn RegisterAudioSessionNotification(&self, newnotifications: windows_core::Ref<'_, IAudioSessionEvents>) -> windows_core::Result<()>; + fn UnregisterAudioSessionNotification(&self, newnotifications: windows_core::Ref<'_, IAudioSessionEvents>) -> windows_core::Result<()>; } impl IAudioSessionControl_Vtbl { pub const fn new() -> Self { @@ -3557,11 +3557,11 @@ impl IAudioSessionControl_Vtbl { } unsafe extern "system" fn RegisterAudioSessionNotification(this: *mut core::ffi::c_void, newnotifications: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioSessionControl_Impl::RegisterAudioSessionNotification(this, windows_core::from_raw_borrowed(&newnotifications)).into() + IAudioSessionControl_Impl::RegisterAudioSessionNotification(this, core::mem::transmute_copy(&newnotifications)).into() } unsafe extern "system" fn UnregisterAudioSessionNotification(this: *mut core::ffi::c_void, newnotifications: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioSessionControl_Impl::UnregisterAudioSessionNotification(this, windows_core::from_raw_borrowed(&newnotifications)).into() + IAudioSessionControl_Impl::UnregisterAudioSessionNotification(this, core::mem::transmute_copy(&newnotifications)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3936,10 +3936,10 @@ pub struct IAudioSessionManager2_Vtbl { } pub trait IAudioSessionManager2_Impl: IAudioSessionManager_Impl { fn GetSessionEnumerator(&self) -> windows_core::Result; - fn RegisterSessionNotification(&self, sessionnotification: Option<&IAudioSessionNotification>) -> windows_core::Result<()>; - fn UnregisterSessionNotification(&self, sessionnotification: Option<&IAudioSessionNotification>) -> windows_core::Result<()>; - fn RegisterDuckNotification(&self, sessionid: &windows_core::PCWSTR, ducknotification: Option<&IAudioVolumeDuckNotification>) -> windows_core::Result<()>; - fn UnregisterDuckNotification(&self, ducknotification: Option<&IAudioVolumeDuckNotification>) -> windows_core::Result<()>; + fn RegisterSessionNotification(&self, sessionnotification: windows_core::Ref<'_, IAudioSessionNotification>) -> windows_core::Result<()>; + fn UnregisterSessionNotification(&self, sessionnotification: windows_core::Ref<'_, IAudioSessionNotification>) -> windows_core::Result<()>; + fn RegisterDuckNotification(&self, sessionid: &windows_core::PCWSTR, ducknotification: windows_core::Ref<'_, IAudioVolumeDuckNotification>) -> windows_core::Result<()>; + fn UnregisterDuckNotification(&self, ducknotification: windows_core::Ref<'_, IAudioVolumeDuckNotification>) -> windows_core::Result<()>; } impl IAudioSessionManager2_Vtbl { pub const fn new() -> Self { @@ -3955,19 +3955,19 @@ impl IAudioSessionManager2_Vtbl { } unsafe extern "system" fn RegisterSessionNotification(this: *mut core::ffi::c_void, sessionnotification: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioSessionManager2_Impl::RegisterSessionNotification(this, windows_core::from_raw_borrowed(&sessionnotification)).into() + IAudioSessionManager2_Impl::RegisterSessionNotification(this, core::mem::transmute_copy(&sessionnotification)).into() } unsafe extern "system" fn UnregisterSessionNotification(this: *mut core::ffi::c_void, sessionnotification: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioSessionManager2_Impl::UnregisterSessionNotification(this, windows_core::from_raw_borrowed(&sessionnotification)).into() + IAudioSessionManager2_Impl::UnregisterSessionNotification(this, core::mem::transmute_copy(&sessionnotification)).into() } unsafe extern "system" fn RegisterDuckNotification(this: *mut core::ffi::c_void, sessionid: windows_core::PCWSTR, ducknotification: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioSessionManager2_Impl::RegisterDuckNotification(this, core::mem::transmute(&sessionid), windows_core::from_raw_borrowed(&ducknotification)).into() + IAudioSessionManager2_Impl::RegisterDuckNotification(this, core::mem::transmute(&sessionid), core::mem::transmute_copy(&ducknotification)).into() } unsafe extern "system" fn UnregisterDuckNotification(this: *mut core::ffi::c_void, ducknotification: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioSessionManager2_Impl::UnregisterDuckNotification(this, windows_core::from_raw_borrowed(&ducknotification)).into() + IAudioSessionManager2_Impl::UnregisterDuckNotification(this, core::mem::transmute_copy(&ducknotification)).into() } Self { base__: IAudioSessionManager_Vtbl::new::(), @@ -3999,13 +3999,13 @@ pub struct IAudioSessionNotification_Vtbl { pub OnSessionCreated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAudioSessionNotification_Impl: windows_core::IUnknownImpl { - fn OnSessionCreated(&self, newsession: Option<&IAudioSessionControl>) -> windows_core::Result<()>; + fn OnSessionCreated(&self, newsession: windows_core::Ref<'_, IAudioSessionControl>) -> windows_core::Result<()>; } impl IAudioSessionNotification_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSessionCreated(this: *mut core::ffi::c_void, newsession: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioSessionNotification_Impl::OnSessionCreated(this, windows_core::from_raw_borrowed(&newsession)).into() + IAudioSessionNotification_Impl::OnSessionCreated(this, core::mem::transmute_copy(&newsession)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnSessionCreated: OnSessionCreated:: } } @@ -4249,8 +4249,8 @@ pub trait IAudioSystemEffectsPropertyStore_Impl: windows_core::IUnknownImpl { fn OpenVolatilePropertyStore(&self, stgmaccess: u32) -> windows_core::Result; fn ResetUserPropertyStore(&self) -> windows_core::Result<()>; fn ResetVolatilePropertyStore(&self) -> windows_core::Result<()>; - fn RegisterPropertyChangeNotification(&self, callback: Option<&IAudioSystemEffectsPropertyChangeNotificationClient>) -> windows_core::Result<()>; - fn UnregisterPropertyChangeNotification(&self, callback: Option<&IAudioSystemEffectsPropertyChangeNotificationClient>) -> windows_core::Result<()>; + fn RegisterPropertyChangeNotification(&self, callback: windows_core::Ref<'_, IAudioSystemEffectsPropertyChangeNotificationClient>) -> windows_core::Result<()>; + fn UnregisterPropertyChangeNotification(&self, callback: windows_core::Ref<'_, IAudioSystemEffectsPropertyChangeNotificationClient>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] impl IAudioSystemEffectsPropertyStore_Vtbl { @@ -4295,11 +4295,11 @@ impl IAudioSystemEffectsPropertyStore_Vtbl { } unsafe extern "system" fn RegisterPropertyChangeNotification(this: *mut core::ffi::c_void, callback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioSystemEffectsPropertyStore_Impl::RegisterPropertyChangeNotification(this, windows_core::from_raw_borrowed(&callback)).into() + IAudioSystemEffectsPropertyStore_Impl::RegisterPropertyChangeNotification(this, core::mem::transmute_copy(&callback)).into() } unsafe extern "system" fn UnregisterPropertyChangeNotification(this: *mut core::ffi::c_void, callback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioSystemEffectsPropertyStore_Impl::UnregisterPropertyChangeNotification(this, windows_core::from_raw_borrowed(&callback)).into() + IAudioSystemEffectsPropertyStore_Impl::UnregisterPropertyChangeNotification(this, core::mem::transmute_copy(&callback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4574,7 +4574,7 @@ pub struct IConnector_Vtbl { pub trait IConnector_Impl: windows_core::IUnknownImpl { fn GetType(&self) -> windows_core::Result; fn GetDataFlow(&self) -> windows_core::Result; - fn ConnectTo(&self, pconnectto: Option<&IConnector>) -> windows_core::Result<()>; + fn ConnectTo(&self, pconnectto: windows_core::Ref<'_, IConnector>) -> windows_core::Result<()>; fn Disconnect(&self) -> windows_core::Result<()>; fn IsConnected(&self) -> windows_core::Result; fn GetConnectedTo(&self) -> windows_core::Result; @@ -4605,7 +4605,7 @@ impl IConnector_Vtbl { } unsafe extern "system" fn ConnectTo(this: *mut core::ffi::c_void, pconnectto: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConnector_Impl::ConnectTo(this, windows_core::from_raw_borrowed(&pconnectto)).into() + IConnector_Impl::ConnectTo(this, core::mem::transmute_copy(&pconnectto)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4869,7 +4869,7 @@ pub trait IDeviceTopology_Impl: windows_core::IUnknownImpl { fn GetSubunit(&self, nindex: u32) -> windows_core::Result; fn GetPartById(&self, nid: u32) -> windows_core::Result; fn GetDeviceId(&self) -> windows_core::Result; - fn GetSignalPath(&self, pipartfrom: Option<&IPart>, pipartto: Option<&IPart>, brejectmixedpaths: super::super::Foundation::BOOL) -> windows_core::Result; + fn GetSignalPath(&self, pipartfrom: windows_core::Ref<'_, IPart>, pipartto: windows_core::Ref<'_, IPart>, brejectmixedpaths: super::super::Foundation::BOOL) -> windows_core::Result; } impl IDeviceTopology_Vtbl { pub const fn new() -> Self { @@ -4935,7 +4935,7 @@ impl IDeviceTopology_Vtbl { } unsafe extern "system" fn GetSignalPath(this: *mut core::ffi::c_void, pipartfrom: *mut core::ffi::c_void, pipartto: *mut core::ffi::c_void, brejectmixedpaths: super::super::Foundation::BOOL, ppparts: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDeviceTopology_Impl::GetSignalPath(this, windows_core::from_raw_borrowed(&pipartfrom), windows_core::from_raw_borrowed(&pipartto), core::mem::transmute_copy(&brejectmixedpaths)) { + match IDeviceTopology_Impl::GetSignalPath(this, core::mem::transmute_copy(&pipartfrom), core::mem::transmute_copy(&pipartto), core::mem::transmute_copy(&brejectmixedpaths)) { Ok(ok__) => { ppparts.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5077,14 +5077,14 @@ pub struct IMMDeviceActivator_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMMDeviceActivator_Impl: windows_core::IUnknownImpl { - fn Activate(&self, iid: *const windows_core::GUID, pdevice: Option<&IMMDevice>, pactivationparams: *const super::super::System::Com::StructuredStorage::PROPVARIANT, ppinterface: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn Activate(&self, iid: *const windows_core::GUID, pdevice: windows_core::Ref<'_, IMMDevice>, pactivationparams: *const super::super::System::Com::StructuredStorage::PROPVARIANT, ppinterface: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMMDeviceActivator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Activate(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, pdevice: *mut core::ffi::c_void, pactivationparams: *const super::super::System::Com::StructuredStorage::PROPVARIANT, ppinterface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMMDeviceActivator_Impl::Activate(this, core::mem::transmute_copy(&iid), windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&pactivationparams), core::mem::transmute_copy(&ppinterface)).into() + IMMDeviceActivator_Impl::Activate(this, core::mem::transmute_copy(&iid), core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&pactivationparams), core::mem::transmute_copy(&ppinterface)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Activate: Activate:: } } @@ -5189,8 +5189,8 @@ pub trait IMMDeviceEnumerator_Impl: windows_core::IUnknownImpl { fn EnumAudioEndpoints(&self, dataflow: EDataFlow, dwstatemask: DEVICE_STATE) -> windows_core::Result; fn GetDefaultAudioEndpoint(&self, dataflow: EDataFlow, role: ERole) -> windows_core::Result; fn GetDevice(&self, pwstrid: &windows_core::PCWSTR) -> windows_core::Result; - fn RegisterEndpointNotificationCallback(&self, pclient: Option<&IMMNotificationClient>) -> windows_core::Result<()>; - fn UnregisterEndpointNotificationCallback(&self, pclient: Option<&IMMNotificationClient>) -> windows_core::Result<()>; + fn RegisterEndpointNotificationCallback(&self, pclient: windows_core::Ref<'_, IMMNotificationClient>) -> windows_core::Result<()>; + fn UnregisterEndpointNotificationCallback(&self, pclient: windows_core::Ref<'_, IMMNotificationClient>) -> windows_core::Result<()>; } impl IMMDeviceEnumerator_Vtbl { pub const fn new() -> Self { @@ -5226,11 +5226,11 @@ impl IMMDeviceEnumerator_Vtbl { } unsafe extern "system" fn RegisterEndpointNotificationCallback(this: *mut core::ffi::c_void, pclient: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMMDeviceEnumerator_Impl::RegisterEndpointNotificationCallback(this, windows_core::from_raw_borrowed(&pclient)).into() + IMMDeviceEnumerator_Impl::RegisterEndpointNotificationCallback(this, core::mem::transmute_copy(&pclient)).into() } unsafe extern "system" fn UnregisterEndpointNotificationCallback(this: *mut core::ffi::c_void, pclient: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMMDeviceEnumerator_Impl::UnregisterEndpointNotificationCallback(this, windows_core::from_raw_borrowed(&pclient)).into() + IMMDeviceEnumerator_Impl::UnregisterEndpointNotificationCallback(this, core::mem::transmute_copy(&pclient)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5513,8 +5513,8 @@ pub trait IPart_Impl: windows_core::IUnknownImpl { fn EnumPartsOutgoing(&self) -> windows_core::Result; fn GetTopologyObject(&self) -> windows_core::Result; fn Activate(&self, dwclscontext: u32, refiid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RegisterControlChangeCallback(&self, riid: *const windows_core::GUID, pnotify: Option<&IControlChangeNotify>) -> windows_core::Result<()>; - fn UnregisterControlChangeCallback(&self, pnotify: Option<&IControlChangeNotify>) -> windows_core::Result<()>; + fn RegisterControlChangeCallback(&self, riid: *const windows_core::GUID, pnotify: windows_core::Ref<'_, IControlChangeNotify>) -> windows_core::Result<()>; + fn UnregisterControlChangeCallback(&self, pnotify: windows_core::Ref<'_, IControlChangeNotify>) -> windows_core::Result<()>; } impl IPart_Vtbl { pub const fn new() -> Self { @@ -5624,11 +5624,11 @@ impl IPart_Vtbl { } unsafe extern "system" fn RegisterControlChangeCallback(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPart_Impl::RegisterControlChangeCallback(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&pnotify)).into() + IPart_Impl::RegisterControlChangeCallback(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pnotify)).into() } unsafe extern "system" fn UnregisterControlChangeCallback(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPart_Impl::UnregisterControlChangeCallback(this, windows_core::from_raw_borrowed(&pnotify)).into() + IPart_Impl::UnregisterControlChangeCallback(this, core::mem::transmute_copy(&pnotify)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6114,7 +6114,7 @@ pub struct ISpatialAudioMetadataClient_Vtbl { pub ActivateSpatialAudioMetadataReader: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISpatialAudioMetadataClient_Impl: windows_core::IUnknownImpl { - fn ActivateSpatialAudioMetadataItems(&self, maxitemcount: u16, framecount: u16, metadataitemsbuffer: *mut Option, metadataitems: *mut Option) -> windows_core::Result<()>; + fn ActivateSpatialAudioMetadataItems(&self, maxitemcount: u16, framecount: u16, metadataitemsbuffer: windows_core::OutRef<'_, ISpatialAudioMetadataItemsBuffer>, metadataitems: windows_core::OutRef<'_, ISpatialAudioMetadataItems>) -> windows_core::Result<()>; fn GetSpatialAudioMetadataItemsBufferLength(&self, maxitemcount: u16) -> windows_core::Result; fn ActivateSpatialAudioMetadataWriter(&self, overflowmode: SpatialAudioMetadataWriterOverflowMode) -> windows_core::Result; fn ActivateSpatialAudioMetadataCopier(&self) -> windows_core::Result; @@ -6208,19 +6208,19 @@ pub struct ISpatialAudioMetadataCopier_Vtbl { pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISpatialAudioMetadataCopier_Impl: windows_core::IUnknownImpl { - fn Open(&self, metadataitems: Option<&ISpatialAudioMetadataItems>) -> windows_core::Result<()>; - fn CopyMetadataForFrames(&self, copyframecount: u16, copymode: SpatialAudioMetadataCopyMode, dstmetadataitems: Option<&ISpatialAudioMetadataItems>) -> windows_core::Result; + fn Open(&self, metadataitems: windows_core::Ref<'_, ISpatialAudioMetadataItems>) -> windows_core::Result<()>; + fn CopyMetadataForFrames(&self, copyframecount: u16, copymode: SpatialAudioMetadataCopyMode, dstmetadataitems: windows_core::Ref<'_, ISpatialAudioMetadataItems>) -> windows_core::Result; fn Close(&self) -> windows_core::Result<()>; } impl ISpatialAudioMetadataCopier_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, metadataitems: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpatialAudioMetadataCopier_Impl::Open(this, windows_core::from_raw_borrowed(&metadataitems)).into() + ISpatialAudioMetadataCopier_Impl::Open(this, core::mem::transmute_copy(&metadataitems)).into() } unsafe extern "system" fn CopyMetadataForFrames(this: *mut core::ffi::c_void, copyframecount: u16, copymode: SpatialAudioMetadataCopyMode, dstmetadataitems: *mut core::ffi::c_void, itemscopied: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpatialAudioMetadataCopier_Impl::CopyMetadataForFrames(this, core::mem::transmute_copy(©framecount), core::mem::transmute_copy(©mode), windows_core::from_raw_borrowed(&dstmetadataitems)) { + match ISpatialAudioMetadataCopier_Impl::CopyMetadataForFrames(this, core::mem::transmute_copy(©framecount), core::mem::transmute_copy(©mode), core::mem::transmute_copy(&dstmetadataitems)) { Ok(ok__) => { itemscopied.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6429,7 +6429,7 @@ pub struct ISpatialAudioMetadataReader_Vtbl { pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISpatialAudioMetadataReader_Impl: windows_core::IUnknownImpl { - fn Open(&self, metadataitems: Option<&ISpatialAudioMetadataItems>) -> windows_core::Result<()>; + fn Open(&self, metadataitems: windows_core::Ref<'_, ISpatialAudioMetadataItems>) -> windows_core::Result<()>; fn ReadNextItem(&self, commandcount: *mut u8, frameoffset: *mut u16) -> windows_core::Result<()>; fn ReadNextItemCommand(&self, commandid: *mut u8, valuebuffer: *mut core::ffi::c_void, maxvaluebufferlength: u32, valuebufferlength: *mut u32) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; @@ -6438,7 +6438,7 @@ impl ISpatialAudioMetadataReader_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, metadataitems: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpatialAudioMetadataReader_Impl::Open(this, windows_core::from_raw_borrowed(&metadataitems)).into() + ISpatialAudioMetadataReader_Impl::Open(this, core::mem::transmute_copy(&metadataitems)).into() } unsafe extern "system" fn ReadNextItem(this: *mut core::ffi::c_void, commandcount: *mut u8, frameoffset: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6493,7 +6493,7 @@ pub struct ISpatialAudioMetadataWriter_Vtbl { pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISpatialAudioMetadataWriter_Impl: windows_core::IUnknownImpl { - fn Open(&self, metadataitems: Option<&ISpatialAudioMetadataItems>) -> windows_core::Result<()>; + fn Open(&self, metadataitems: windows_core::Ref<'_, ISpatialAudioMetadataItems>) -> windows_core::Result<()>; fn WriteNextItem(&self, frameoffset: u16) -> windows_core::Result<()>; fn WriteNextItemCommand(&self, commandid: u8, valuebuffer: *const core::ffi::c_void, valuebufferlength: u32) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; @@ -6502,7 +6502,7 @@ impl ISpatialAudioMetadataWriter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, metadataitems: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpatialAudioMetadataWriter_Impl::Open(this, windows_core::from_raw_borrowed(&metadataitems)).into() + ISpatialAudioMetadataWriter_Impl::Open(this, core::mem::transmute_copy(&metadataitems)).into() } unsafe extern "system" fn WriteNextItem(this: *mut core::ffi::c_void, frameoffset: u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7080,13 +7080,13 @@ pub struct ISpatialAudioObjectRenderStreamNotify_Vtbl { pub OnAvailableDynamicObjectCountChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i64, u32) -> windows_core::HRESULT, } pub trait ISpatialAudioObjectRenderStreamNotify_Impl: windows_core::IUnknownImpl { - fn OnAvailableDynamicObjectCountChange(&self, sender: Option<&ISpatialAudioObjectRenderStreamBase>, hnscompliancedeadlinetime: i64, availabledynamicobjectcountchange: u32) -> windows_core::Result<()>; + fn OnAvailableDynamicObjectCountChange(&self, sender: windows_core::Ref<'_, ISpatialAudioObjectRenderStreamBase>, hnscompliancedeadlinetime: i64, availabledynamicobjectcountchange: u32) -> windows_core::Result<()>; } impl ISpatialAudioObjectRenderStreamNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnAvailableDynamicObjectCountChange(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, hnscompliancedeadlinetime: i64, availabledynamicobjectcountchange: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpatialAudioObjectRenderStreamNotify_Impl::OnAvailableDynamicObjectCountChange(this, windows_core::from_raw_borrowed(&sender), core::mem::transmute_copy(&hnscompliancedeadlinetime), core::mem::transmute_copy(&availabledynamicobjectcountchange)).into() + ISpatialAudioObjectRenderStreamNotify_Impl::OnAvailableDynamicObjectCountChange(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&hnscompliancedeadlinetime), core::mem::transmute_copy(&availabledynamicobjectcountchange)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs index fea284b11b..4b64ca8771 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs @@ -264,7 +264,7 @@ pub struct IMDSPDevice2_Vtbl { pub trait IMDSPDevice2_Impl: IMDSPDevice_Impl { fn GetStorage(&self, pszstoragename: &windows_core::PCWSTR) -> windows_core::Result; fn GetFormatSupport2(&self, dwflags: u32, ppaudioformatex: *mut *mut super::Audio::WAVEFORMATEX, pnaudioformatcount: *mut u32, ppvideoformatex: *mut *mut super::MediaFoundation::VIDEOINFOHEADER, pnvideoformatcount: *mut u32, ppfiletype: *mut *mut WMFILECAPABILITIES, pnfiletypecount: *mut u32) -> windows_core::Result<()>; - fn GetSpecifyPropertyPages(&self, ppspecifyproppages: *mut Option, pppunknowns: *mut *mut Option, pcunks: *mut u32) -> windows_core::Result<()>; + fn GetSpecifyPropertyPages(&self, ppspecifyproppages: windows_core::OutRef<'_, super::super::System::Ole::ISpecifyPropertyPages>, pppunknowns: *mut *mut Option, pcunks: *mut u32) -> windows_core::Result<()>; fn GetCanonicalName(&self, pwszpnpname: windows_core::PWSTR, nmaxchars: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Ole"))] @@ -571,13 +571,13 @@ pub struct IMDSPDirectTransfer_Vtbl { pub TransferToDevice: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void, u32, windows_core::PCWSTR, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMDSPDirectTransfer_Impl: windows_core::IUnknownImpl { - fn TransferToDevice(&self, pwszsourcefilepath: &windows_core::PCWSTR, psourceoperation: Option<&IWMDMOperation>, fuflags: u32, pwszdestinationname: &windows_core::PCWSTR, psourcemetadata: Option<&IWMDMMetaData>, ptransferprogress: Option<&IWMDMProgress>) -> windows_core::Result; + fn TransferToDevice(&self, pwszsourcefilepath: &windows_core::PCWSTR, psourceoperation: windows_core::Ref<'_, IWMDMOperation>, fuflags: u32, pwszdestinationname: &windows_core::PCWSTR, psourcemetadata: windows_core::Ref<'_, IWMDMMetaData>, ptransferprogress: windows_core::Ref<'_, IWMDMProgress>) -> windows_core::Result; } impl IMDSPDirectTransfer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TransferToDevice(this: *mut core::ffi::c_void, pwszsourcefilepath: windows_core::PCWSTR, psourceoperation: *mut core::ffi::c_void, fuflags: u32, pwszdestinationname: windows_core::PCWSTR, psourcemetadata: *mut core::ffi::c_void, ptransferprogress: *mut core::ffi::c_void, ppnewobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMDSPDirectTransfer_Impl::TransferToDevice(this, core::mem::transmute(&pwszsourcefilepath), windows_core::from_raw_borrowed(&psourceoperation), core::mem::transmute_copy(&fuflags), core::mem::transmute(&pwszdestinationname), windows_core::from_raw_borrowed(&psourcemetadata), windows_core::from_raw_borrowed(&ptransferprogress)) { + match IMDSPDirectTransfer_Impl::TransferToDevice(this, core::mem::transmute(&pwszsourcefilepath), core::mem::transmute_copy(&psourceoperation), core::mem::transmute_copy(&fuflags), core::mem::transmute(&pwszdestinationname), core::mem::transmute_copy(&psourcemetadata), core::mem::transmute_copy(&ptransferprogress)) { Ok(ok__) => { ppnewobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -619,7 +619,7 @@ pub struct IMDSPEnumDevice_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMDSPEnumDevice_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppdevice: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppdevice: windows_core::OutRef<'_, IMDSPDevice>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -694,7 +694,7 @@ pub struct IMDSPEnumStorage_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMDSPEnumStorage_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppstorage: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppstorage: windows_core::OutRef<'_, IMDSPStorage>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -797,10 +797,10 @@ pub trait IMDSPObject_Impl: windows_core::IUnknownImpl { fn Open(&self, fumode: u32) -> windows_core::Result<()>; fn Read(&self, pdata: *mut u8, pdwsize: *mut u32, abmac: *mut u8) -> windows_core::Result<()>; fn Write(&self, pdata: *const u8, pdwsize: *mut u32, abmac: *mut u8) -> windows_core::Result<()>; - fn Delete(&self, fumode: u32, pprogress: Option<&IWMDMProgress>) -> windows_core::Result<()>; + fn Delete(&self, fumode: u32, pprogress: windows_core::Ref<'_, IWMDMProgress>) -> windows_core::Result<()>; fn Seek(&self, fuflags: u32, dwoffset: u32) -> windows_core::Result<()>; - fn Rename(&self, pwsznewname: &windows_core::PCWSTR, pprogress: Option<&IWMDMProgress>) -> windows_core::Result<()>; - fn Move(&self, fumode: u32, pprogress: Option<&IWMDMProgress>, ptarget: Option<&IMDSPStorage>) -> windows_core::Result<()>; + fn Rename(&self, pwsznewname: &windows_core::PCWSTR, pprogress: windows_core::Ref<'_, IWMDMProgress>) -> windows_core::Result<()>; + fn Move(&self, fumode: u32, pprogress: windows_core::Ref<'_, IWMDMProgress>, ptarget: windows_core::Ref<'_, IMDSPStorage>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } impl IMDSPObject_Vtbl { @@ -819,7 +819,7 @@ impl IMDSPObject_Vtbl { } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, fumode: u32, pprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMDSPObject_Impl::Delete(this, core::mem::transmute_copy(&fumode), windows_core::from_raw_borrowed(&pprogress)).into() + IMDSPObject_Impl::Delete(this, core::mem::transmute_copy(&fumode), core::mem::transmute_copy(&pprogress)).into() } unsafe extern "system" fn Seek(this: *mut core::ffi::c_void, fuflags: u32, dwoffset: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -827,11 +827,11 @@ impl IMDSPObject_Vtbl { } unsafe extern "system" fn Rename(this: *mut core::ffi::c_void, pwsznewname: windows_core::PCWSTR, pprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMDSPObject_Impl::Rename(this, core::mem::transmute(&pwsznewname), windows_core::from_raw_borrowed(&pprogress)).into() + IMDSPObject_Impl::Rename(this, core::mem::transmute(&pwsznewname), core::mem::transmute_copy(&pprogress)).into() } unsafe extern "system" fn Move(this: *mut core::ffi::c_void, fumode: u32, pprogress: *mut core::ffi::c_void, ptarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMDSPObject_Impl::Move(this, core::mem::transmute_copy(&fumode), windows_core::from_raw_borrowed(&pprogress), windows_core::from_raw_borrowed(&ptarget)).into() + IMDSPObject_Impl::Move(this, core::mem::transmute_copy(&fumode), core::mem::transmute_copy(&pprogress), core::mem::transmute_copy(&ptarget)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1354,19 +1354,19 @@ pub struct IMDSPStorage3_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub trait IMDSPStorage3_Impl: IMDSPStorage2_Impl { - fn GetMetadata(&self, pmetadata: Option<&IWMDMMetaData>) -> windows_core::Result<()>; - fn SetMetadata(&self, pmetadata: Option<&IWMDMMetaData>) -> windows_core::Result<()>; + fn GetMetadata(&self, pmetadata: windows_core::Ref<'_, IWMDMMetaData>) -> windows_core::Result<()>; + fn SetMetadata(&self, pmetadata: windows_core::Ref<'_, IWMDMMetaData>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] impl IMDSPStorage3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetMetadata(this: *mut core::ffi::c_void, pmetadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMDSPStorage3_Impl::GetMetadata(this, windows_core::from_raw_borrowed(&pmetadata)).into() + IMDSPStorage3_Impl::GetMetadata(this, core::mem::transmute_copy(&pmetadata)).into() } unsafe extern "system" fn SetMetadata(this: *mut core::ffi::c_void, pmetadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMDSPStorage3_Impl::SetMetadata(this, windows_core::from_raw_borrowed(&pmetadata)).into() + IMDSPStorage3_Impl::SetMetadata(this, core::mem::transmute_copy(&pmetadata)).into() } Self { base__: IMDSPStorage2_Vtbl::new::(), @@ -1435,8 +1435,8 @@ pub struct IMDSPStorage4_Vtbl { pub trait IMDSPStorage4_Impl: IMDSPStorage3_Impl { fn SetReferences(&self, dwrefs: u32, ppispstorage: *const Option) -> windows_core::Result<()>; fn GetReferences(&self, pdwrefs: *mut u32, pppispstorage: *mut *mut Option) -> windows_core::Result<()>; - fn CreateStorageWithMetadata(&self, dwattributes: u32, pwszname: &windows_core::PCWSTR, pmetadata: Option<&IWMDMMetaData>, qwfilesize: u64) -> windows_core::Result; - fn GetSpecifiedMetadata(&self, cproperties: u32, ppwszpropnames: *const windows_core::PCWSTR, pmetadata: Option<&IWMDMMetaData>) -> windows_core::Result<()>; + fn CreateStorageWithMetadata(&self, dwattributes: u32, pwszname: &windows_core::PCWSTR, pmetadata: windows_core::Ref<'_, IWMDMMetaData>, qwfilesize: u64) -> windows_core::Result; + fn GetSpecifiedMetadata(&self, cproperties: u32, ppwszpropnames: *const windows_core::PCWSTR, pmetadata: windows_core::Ref<'_, IWMDMMetaData>) -> windows_core::Result<()>; fn FindStorage(&self, findscope: WMDM_FIND_SCOPE, pwszuniqueid: &windows_core::PCWSTR) -> windows_core::Result; fn GetParent(&self) -> windows_core::Result; } @@ -1453,7 +1453,7 @@ impl IMDSPStorage4_Vtbl { } unsafe extern "system" fn CreateStorageWithMetadata(this: *mut core::ffi::c_void, dwattributes: u32, pwszname: windows_core::PCWSTR, pmetadata: *mut core::ffi::c_void, qwfilesize: u64, ppnewstorage: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMDSPStorage4_Impl::CreateStorageWithMetadata(this, core::mem::transmute_copy(&dwattributes), core::mem::transmute(&pwszname), windows_core::from_raw_borrowed(&pmetadata), core::mem::transmute_copy(&qwfilesize)) { + match IMDSPStorage4_Impl::CreateStorageWithMetadata(this, core::mem::transmute_copy(&dwattributes), core::mem::transmute(&pwszname), core::mem::transmute_copy(&pmetadata), core::mem::transmute_copy(&qwfilesize)) { Ok(ok__) => { ppnewstorage.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1463,7 +1463,7 @@ impl IMDSPStorage4_Vtbl { } unsafe extern "system" fn GetSpecifiedMetadata(this: *mut core::ffi::c_void, cproperties: u32, ppwszpropnames: *const windows_core::PCWSTR, pmetadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMDSPStorage4_Impl::GetSpecifiedMetadata(this, core::mem::transmute_copy(&cproperties), core::mem::transmute_copy(&ppwszpropnames), windows_core::from_raw_borrowed(&pmetadata)).into() + IMDSPStorage4_Impl::GetSpecifiedMetadata(this, core::mem::transmute_copy(&cproperties), core::mem::transmute_copy(&ppwszpropnames), core::mem::transmute_copy(&pmetadata)).into() } unsafe extern "system" fn FindStorage(this: *mut core::ffi::c_void, findscope: WMDM_FIND_SCOPE, pwszuniqueid: windows_core::PCWSTR, ppstorage: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1559,7 +1559,7 @@ pub trait IMDSPStorageGlobals_Impl: windows_core::IUnknownImpl { fn GetTotalFree(&self, pdwfreelow: *mut u32, pdwfreehigh: *mut u32) -> windows_core::Result<()>; fn GetTotalBad(&self, pdwbadlow: *mut u32, pdwbadhigh: *mut u32) -> windows_core::Result<()>; fn GetStatus(&self) -> windows_core::Result; - fn Initialize(&self, fumode: u32, pprogress: Option<&IWMDMProgress>) -> windows_core::Result<()>; + fn Initialize(&self, fumode: u32, pprogress: windows_core::Ref<'_, IWMDMProgress>) -> windows_core::Result<()>; fn GetDevice(&self) -> windows_core::Result; fn GetRootStorage(&self) -> windows_core::Result; } @@ -1603,7 +1603,7 @@ impl IMDSPStorageGlobals_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, fumode: u32, pprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMDSPStorageGlobals_Impl::Initialize(this, core::mem::transmute_copy(&fumode), windows_core::from_raw_borrowed(&pprogress)).into() + IMDSPStorageGlobals_Impl::Initialize(this, core::mem::transmute_copy(&fumode), core::mem::transmute_copy(&pprogress)).into() } unsafe extern "system" fn GetDevice(this: *mut core::ffi::c_void, ppdevice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1919,13 +1919,13 @@ pub struct ISCPSecureExchange2_Vtbl { pub TransferContainerData2: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *mut core::ffi::c_void, *mut u32, *mut u8) -> windows_core::HRESULT, } pub trait ISCPSecureExchange2_Impl: ISCPSecureExchange_Impl { - fn TransferContainerData2(&self, pdata: *const u8, dwsize: u32, pprogresscallback: Option<&IWMDMProgress3>, pfureadyflags: *mut u32, abmac: *mut u8) -> windows_core::Result<()>; + fn TransferContainerData2(&self, pdata: *const u8, dwsize: u32, pprogresscallback: windows_core::Ref<'_, IWMDMProgress3>, pfureadyflags: *mut u32, abmac: *mut u8) -> windows_core::Result<()>; } impl ISCPSecureExchange2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TransferContainerData2(this: *mut core::ffi::c_void, pdata: *const u8, dwsize: u32, pprogresscallback: *mut core::ffi::c_void, pfureadyflags: *mut u32, abmac: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISCPSecureExchange2_Impl::TransferContainerData2(this, core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), windows_core::from_raw_borrowed(&pprogresscallback), core::mem::transmute_copy(&pfureadyflags), core::mem::transmute_copy(&abmac)).into() + ISCPSecureExchange2_Impl::TransferContainerData2(this, core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), core::mem::transmute_copy(&pprogresscallback), core::mem::transmute_copy(&pfureadyflags), core::mem::transmute_copy(&abmac)).into() } Self { base__: ISCPSecureExchange_Vtbl::new::(), TransferContainerData2: TransferContainerData2:: } } @@ -1972,15 +1972,15 @@ pub struct ISCPSecureExchange3_Vtbl { pub TransferCompleteForDevice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISCPSecureExchange3_Impl: ISCPSecureExchange2_Impl { - fn TransferContainerDataOnClearChannel(&self, pdevice: Option<&IMDSPDevice>, pdata: *const u8, dwsize: u32, pprogresscallback: Option<&IWMDMProgress3>) -> windows_core::Result; - fn GetObjectDataOnClearChannel(&self, pdevice: Option<&IMDSPDevice>, pdata: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()>; - fn TransferCompleteForDevice(&self, pdevice: Option<&IMDSPDevice>) -> windows_core::Result<()>; + fn TransferContainerDataOnClearChannel(&self, pdevice: windows_core::Ref<'_, IMDSPDevice>, pdata: *const u8, dwsize: u32, pprogresscallback: windows_core::Ref<'_, IWMDMProgress3>) -> windows_core::Result; + fn GetObjectDataOnClearChannel(&self, pdevice: windows_core::Ref<'_, IMDSPDevice>, pdata: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()>; + fn TransferCompleteForDevice(&self, pdevice: windows_core::Ref<'_, IMDSPDevice>) -> windows_core::Result<()>; } impl ISCPSecureExchange3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TransferContainerDataOnClearChannel(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, pdata: *const u8, dwsize: u32, pprogresscallback: *mut core::ffi::c_void, pfureadyflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISCPSecureExchange3_Impl::TransferContainerDataOnClearChannel(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), windows_core::from_raw_borrowed(&pprogresscallback)) { + match ISCPSecureExchange3_Impl::TransferContainerDataOnClearChannel(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), core::mem::transmute_copy(&pprogresscallback)) { Ok(ok__) => { pfureadyflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1990,11 +1990,11 @@ impl ISCPSecureExchange3_Vtbl { } unsafe extern "system" fn GetObjectDataOnClearChannel(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, pdata: *mut u8, pdwsize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISCPSecureExchange3_Impl::GetObjectDataOnClearChannel(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&pdwsize)).into() + ISCPSecureExchange3_Impl::GetObjectDataOnClearChannel(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&pdwsize)).into() } unsafe extern "system" fn TransferCompleteForDevice(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISCPSecureExchange3_Impl::TransferCompleteForDevice(this, windows_core::from_raw_borrowed(&pdevice)).into() + ISCPSecureExchange3_Impl::TransferCompleteForDevice(this, core::mem::transmute_copy(&pdevice)).into() } Self { base__: ISCPSecureExchange2_Vtbl::new::(), @@ -2044,8 +2044,8 @@ pub struct ISCPSecureQuery_Vtbl { pub trait ISCPSecureQuery_Impl: windows_core::IUnknownImpl { fn GetDataDemands(&self, pfuflags: *mut u32, pdwminrightsdata: *mut u32, pdwminexaminedata: *mut u32, pdwmindecidedata: *mut u32, abmac: *mut u8) -> windows_core::Result<()>; fn ExamineData(&self, fuflags: u32, pwszextension: &windows_core::PCWSTR, pdata: *const u8, dwsize: u32, abmac: *mut u8) -> windows_core::Result<()>; - fn MakeDecision(&self, fuflags: u32, pdata: *const u8, dwsize: u32, dwappsec: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstorageglobals: Option<&IMDSPStorageGlobals>, ppexchange: *mut Option, abmac: *mut u8) -> windows_core::Result<()>; - fn GetRights(&self, pdata: *const u8, dwsize: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstgglobals: Option<&IMDSPStorageGlobals>, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32, abmac: *mut u8) -> windows_core::Result<()>; + fn MakeDecision(&self, fuflags: u32, pdata: *const u8, dwsize: u32, dwappsec: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstorageglobals: windows_core::Ref<'_, IMDSPStorageGlobals>, ppexchange: windows_core::OutRef<'_, ISCPSecureExchange>, abmac: *mut u8) -> windows_core::Result<()>; + fn GetRights(&self, pdata: *const u8, dwsize: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstgglobals: windows_core::Ref<'_, IMDSPStorageGlobals>, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32, abmac: *mut u8) -> windows_core::Result<()>; } impl ISCPSecureQuery_Vtbl { pub const fn new() -> Self { @@ -2059,11 +2059,11 @@ impl ISCPSecureQuery_Vtbl { } unsafe extern "system" fn MakeDecision(this: *mut core::ffi::c_void, fuflags: u32, pdata: *const u8, dwsize: u32, dwappsec: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstorageglobals: *mut core::ffi::c_void, ppexchange: *mut *mut core::ffi::c_void, abmac: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISCPSecureQuery_Impl::MakeDecision(this, core::mem::transmute_copy(&fuflags), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), core::mem::transmute_copy(&dwappsec), core::mem::transmute_copy(&pbspsessionkey), core::mem::transmute_copy(&dwsessionkeylen), windows_core::from_raw_borrowed(&pstorageglobals), core::mem::transmute_copy(&ppexchange), core::mem::transmute_copy(&abmac)).into() + ISCPSecureQuery_Impl::MakeDecision(this, core::mem::transmute_copy(&fuflags), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), core::mem::transmute_copy(&dwappsec), core::mem::transmute_copy(&pbspsessionkey), core::mem::transmute_copy(&dwsessionkeylen), core::mem::transmute_copy(&pstorageglobals), core::mem::transmute_copy(&ppexchange), core::mem::transmute_copy(&abmac)).into() } unsafe extern "system" fn GetRights(this: *mut core::ffi::c_void, pdata: *const u8, dwsize: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstgglobals: *mut core::ffi::c_void, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32, abmac: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISCPSecureQuery_Impl::GetRights(this, core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), core::mem::transmute_copy(&pbspsessionkey), core::mem::transmute_copy(&dwsessionkeylen), windows_core::from_raw_borrowed(&pstgglobals), core::mem::transmute_copy(&pprights), core::mem::transmute_copy(&pnrightscount), core::mem::transmute_copy(&abmac)).into() + ISCPSecureQuery_Impl::GetRights(this, core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), core::mem::transmute_copy(&pbspsessionkey), core::mem::transmute_copy(&dwsessionkeylen), core::mem::transmute_copy(&pstgglobals), core::mem::transmute_copy(&pprights), core::mem::transmute_copy(&pnrightscount), core::mem::transmute_copy(&abmac)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2122,7 +2122,7 @@ pub struct ISCPSecureQuery2_Vtbl { pub MakeDecision2: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, u32, u32, *const u8, u32, *mut core::ffi::c_void, *const u8, u32, *const u8, u32, *mut windows_core::PWSTR, *mut u32, *mut u32, *mut u64, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut u8) -> windows_core::HRESULT, } pub trait ISCPSecureQuery2_Impl: ISCPSecureQuery_Impl { - fn MakeDecision2(&self, fuflags: u32, pdata: *const u8, dwsize: u32, dwappsec: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstorageglobals: Option<&IMDSPStorageGlobals>, pappcertapp: *const u8, dwappcertapplen: u32, pappcertsp: *const u8, dwappcertsplen: u32, pszrevocationurl: *mut windows_core::PWSTR, pdwrevocationurllen: *mut u32, pdwrevocationbitflag: *mut u32, pqwfilesize: *mut u64, punknown: Option<&windows_core::IUnknown>, ppexchange: *mut Option, abmac: *mut u8) -> windows_core::Result<()>; + fn MakeDecision2(&self, fuflags: u32, pdata: *const u8, dwsize: u32, dwappsec: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstorageglobals: windows_core::Ref<'_, IMDSPStorageGlobals>, pappcertapp: *const u8, dwappcertapplen: u32, pappcertsp: *const u8, dwappcertsplen: u32, pszrevocationurl: *mut windows_core::PWSTR, pdwrevocationurllen: *mut u32, pdwrevocationbitflag: *mut u32, pqwfilesize: *mut u64, punknown: windows_core::Ref<'_, windows_core::IUnknown>, ppexchange: windows_core::OutRef<'_, ISCPSecureExchange>, abmac: *mut u8) -> windows_core::Result<()>; } impl ISCPSecureQuery2_Vtbl { pub const fn new() -> Self { @@ -2136,7 +2136,7 @@ impl ISCPSecureQuery2_Vtbl { core::mem::transmute_copy(&dwappsec), core::mem::transmute_copy(&pbspsessionkey), core::mem::transmute_copy(&dwsessionkeylen), - windows_core::from_raw_borrowed(&pstorageglobals), + core::mem::transmute_copy(&pstorageglobals), core::mem::transmute_copy(&pappcertapp), core::mem::transmute_copy(&dwappcertapplen), core::mem::transmute_copy(&pappcertsp), @@ -2145,7 +2145,7 @@ impl ISCPSecureQuery2_Vtbl { core::mem::transmute_copy(&pdwrevocationurllen), core::mem::transmute_copy(&pdwrevocationbitflag), core::mem::transmute_copy(&pqwfilesize), - windows_core::from_raw_borrowed(&punknown), + core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&ppexchange), core::mem::transmute_copy(&abmac), ) @@ -2211,14 +2211,14 @@ pub struct ISCPSecureQuery3_Vtbl { pub MakeDecisionOnClearChannel: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, u32, u32, *const u8, u32, *mut core::ffi::c_void, *mut core::ffi::c_void, *const u8, u32, *const u8, u32, *mut windows_core::PWSTR, *mut u32, *mut u32, *mut u64, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISCPSecureQuery3_Impl: ISCPSecureQuery2_Impl { - fn GetRightsOnClearChannel(&self, pdata: *const u8, dwsize: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstgglobals: Option<&IMDSPStorageGlobals>, pprogresscallback: Option<&IWMDMProgress3>, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32) -> windows_core::Result<()>; - fn MakeDecisionOnClearChannel(&self, fuflags: u32, pdata: *const u8, dwsize: u32, dwappsec: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstorageglobals: Option<&IMDSPStorageGlobals>, pprogresscallback: Option<&IWMDMProgress3>, pappcertapp: *const u8, dwappcertapplen: u32, pappcertsp: *const u8, dwappcertsplen: u32, pszrevocationurl: *mut windows_core::PWSTR, pdwrevocationurllen: *mut u32, pdwrevocationbitflag: *mut u32, pqwfilesize: *mut u64, punknown: Option<&windows_core::IUnknown>, ppexchange: *mut Option) -> windows_core::Result<()>; + fn GetRightsOnClearChannel(&self, pdata: *const u8, dwsize: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstgglobals: windows_core::Ref<'_, IMDSPStorageGlobals>, pprogresscallback: windows_core::Ref<'_, IWMDMProgress3>, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32) -> windows_core::Result<()>; + fn MakeDecisionOnClearChannel(&self, fuflags: u32, pdata: *const u8, dwsize: u32, dwappsec: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstorageglobals: windows_core::Ref<'_, IMDSPStorageGlobals>, pprogresscallback: windows_core::Ref<'_, IWMDMProgress3>, pappcertapp: *const u8, dwappcertapplen: u32, pappcertsp: *const u8, dwappcertsplen: u32, pszrevocationurl: *mut windows_core::PWSTR, pdwrevocationurllen: *mut u32, pdwrevocationbitflag: *mut u32, pqwfilesize: *mut u64, punknown: windows_core::Ref<'_, windows_core::IUnknown>, ppexchange: windows_core::OutRef<'_, ISCPSecureExchange>) -> windows_core::Result<()>; } impl ISCPSecureQuery3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetRightsOnClearChannel(this: *mut core::ffi::c_void, pdata: *const u8, dwsize: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstgglobals: *mut core::ffi::c_void, pprogresscallback: *mut core::ffi::c_void, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISCPSecureQuery3_Impl::GetRightsOnClearChannel(this, core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), core::mem::transmute_copy(&pbspsessionkey), core::mem::transmute_copy(&dwsessionkeylen), windows_core::from_raw_borrowed(&pstgglobals), windows_core::from_raw_borrowed(&pprogresscallback), core::mem::transmute_copy(&pprights), core::mem::transmute_copy(&pnrightscount)).into() + ISCPSecureQuery3_Impl::GetRightsOnClearChannel(this, core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&dwsize), core::mem::transmute_copy(&pbspsessionkey), core::mem::transmute_copy(&dwsessionkeylen), core::mem::transmute_copy(&pstgglobals), core::mem::transmute_copy(&pprogresscallback), core::mem::transmute_copy(&pprights), core::mem::transmute_copy(&pnrightscount)).into() } unsafe extern "system" fn MakeDecisionOnClearChannel(this: *mut core::ffi::c_void, fuflags: u32, pdata: *const u8, dwsize: u32, dwappsec: u32, pbspsessionkey: *const u8, dwsessionkeylen: u32, pstorageglobals: *mut core::ffi::c_void, pprogresscallback: *mut core::ffi::c_void, pappcertapp: *const u8, dwappcertapplen: u32, pappcertsp: *const u8, dwappcertsplen: u32, pszrevocationurl: *mut windows_core::PWSTR, pdwrevocationurllen: *mut u32, pdwrevocationbitflag: *mut u32, pqwfilesize: *mut u64, punknown: *mut core::ffi::c_void, ppexchange: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2230,8 +2230,8 @@ impl ISCPSecureQuery3_Vtbl { core::mem::transmute_copy(&dwappsec), core::mem::transmute_copy(&pbspsessionkey), core::mem::transmute_copy(&dwsessionkeylen), - windows_core::from_raw_borrowed(&pstorageglobals), - windows_core::from_raw_borrowed(&pprogresscallback), + core::mem::transmute_copy(&pstorageglobals), + core::mem::transmute_copy(&pprogresscallback), core::mem::transmute_copy(&pappcertapp), core::mem::transmute_copy(&dwappcertapplen), core::mem::transmute_copy(&pappcertsp), @@ -2240,7 +2240,7 @@ impl ISCPSecureQuery3_Vtbl { core::mem::transmute_copy(&pdwrevocationurllen), core::mem::transmute_copy(&pdwrevocationbitflag), core::mem::transmute_copy(&pqwfilesize), - windows_core::from_raw_borrowed(&punknown), + core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&ppexchange), ) .into() @@ -2281,7 +2281,7 @@ pub struct ISCPSession_Vtbl { pub GetSecureQuery: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISCPSession_Impl: windows_core::IUnknownImpl { - fn BeginSession(&self, pidevice: Option<&IMDSPDevice>, pctx: *const u8, dwsizectx: u32) -> windows_core::Result<()>; + fn BeginSession(&self, pidevice: windows_core::Ref<'_, IMDSPDevice>, pctx: *const u8, dwsizectx: u32) -> windows_core::Result<()>; fn EndSession(&self, pctx: *const u8, dwsizectx: u32) -> windows_core::Result<()>; fn GetSecureQuery(&self) -> windows_core::Result; } @@ -2289,7 +2289,7 @@ impl ISCPSession_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginSession(this: *mut core::ffi::c_void, pidevice: *mut core::ffi::c_void, pctx: *const u8, dwsizectx: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISCPSession_Impl::BeginSession(this, windows_core::from_raw_borrowed(&pidevice), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&dwsizectx)).into() + ISCPSession_Impl::BeginSession(this, core::mem::transmute_copy(&pidevice), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&dwsizectx)).into() } unsafe extern "system" fn EndSession(this: *mut core::ffi::c_void, pctx: *const u8, dwsizectx: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2536,7 +2536,7 @@ pub struct IWMDMDevice2_Vtbl { pub trait IWMDMDevice2_Impl: IWMDMDevice_Impl { fn GetStorage(&self, pszstoragename: &windows_core::PCWSTR) -> windows_core::Result; fn GetFormatSupport2(&self, dwflags: u32, ppaudioformatex: *mut *mut super::Audio::WAVEFORMATEX, pnaudioformatcount: *mut u32, ppvideoformatex: *mut *mut super::MediaFoundation::VIDEOINFOHEADER, pnvideoformatcount: *mut u32, ppfiletype: *mut *mut WMFILECAPABILITIES, pnfiletypecount: *mut u32) -> windows_core::Result<()>; - fn GetSpecifyPropertyPages(&self, ppspecifyproppages: *mut Option, pppunknowns: *mut *mut Option, pcunks: *mut u32) -> windows_core::Result<()>; + fn GetSpecifyPropertyPages(&self, ppspecifyproppages: windows_core::OutRef<'_, super::super::System::Ole::ISpecifyPropertyPages>, pppunknowns: *mut *mut Option, pcunks: *mut u32) -> windows_core::Result<()>; fn GetCanonicalName(&self, pwszpnpname: windows_core::PWSTR, nmaxchars: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Ole"))] @@ -2890,7 +2890,7 @@ pub struct IWMDMEnumDevice_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMDMEnumDevice_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppdevice: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppdevice: windows_core::OutRef<'_, IWMDMDevice>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2965,7 +2965,7 @@ pub struct IWMDMEnumStorage_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMDMEnumStorage_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppstorage: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppstorage: windows_core::OutRef<'_, IWMDMStorage>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3443,7 +3443,7 @@ pub trait IWMDMOperation_Impl: windows_core::IUnknownImpl { fn GetObjectTotalSize(&self, pdwsize: *mut u32, pdwsizehigh: *mut u32) -> windows_core::Result<()>; fn SetObjectTotalSize(&self, dwsize: u32, dwsizehigh: u32) -> windows_core::Result<()>; fn TransferObjectData(&self, pdata: *mut u8, pdwsize: *mut u32, abmac: *mut u8) -> windows_core::Result<()>; - fn End(&self, phcompletioncode: *const windows_core::HRESULT, pnewobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn End(&self, phcompletioncode: *const windows_core::HRESULT, pnewobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_Audio")] impl IWMDMOperation_Vtbl { @@ -3486,7 +3486,7 @@ impl IWMDMOperation_Vtbl { } unsafe extern "system" fn End(this: *mut core::ffi::c_void, phcompletioncode: *const windows_core::HRESULT, pnewobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMOperation_Impl::End(this, core::mem::transmute_copy(&phcompletioncode), windows_core::from_raw_borrowed(&pnewobject)).into() + IWMDMOperation_Impl::End(this, core::mem::transmute_copy(&phcompletioncode), core::mem::transmute_copy(&pnewobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4032,7 +4032,7 @@ pub struct IWMDMStorage3_Vtbl { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub trait IWMDMStorage3_Impl: IWMDMStorage2_Impl { fn GetMetadata(&self) -> windows_core::Result; - fn SetMetadata(&self, pmetadata: Option<&IWMDMMetaData>) -> windows_core::Result<()>; + fn SetMetadata(&self, pmetadata: windows_core::Ref<'_, IWMDMMetaData>) -> windows_core::Result<()>; fn CreateEmptyMetadataObject(&self) -> windows_core::Result; fn SetEnumPreference(&self, pmode: *mut WMDM_STORAGE_ENUM_MODE, nviews: u32, pviews: *const WMDMMetadataView) -> windows_core::Result<()>; } @@ -4051,7 +4051,7 @@ impl IWMDMStorage3_Vtbl { } unsafe extern "system" fn SetMetadata(this: *mut core::ffi::c_void, pmetadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMStorage3_Impl::SetMetadata(this, windows_core::from_raw_borrowed(&pmetadata)).into() + IWMDMStorage3_Impl::SetMetadata(this, core::mem::transmute_copy(&pmetadata)).into() } unsafe extern "system" fn CreateEmptyMetadataObject(this: *mut core::ffi::c_void, ppmetadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4132,7 +4132,7 @@ pub struct IWMDMStorage4_Vtbl { pub trait IWMDMStorage4_Impl: IWMDMStorage3_Impl { fn SetReferences(&self, dwrefs: u32, ppiwmdmstorage: *const Option) -> windows_core::Result<()>; fn GetReferences(&self, pdwrefs: *mut u32, pppiwmdmstorage: *mut *mut Option) -> windows_core::Result<()>; - fn GetRightsWithProgress(&self, piprogresscallback: Option<&IWMDMProgress3>, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32) -> windows_core::Result<()>; + fn GetRightsWithProgress(&self, piprogresscallback: windows_core::Ref<'_, IWMDMProgress3>, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32) -> windows_core::Result<()>; fn GetSpecifiedMetadata(&self, cproperties: u32, ppwszpropnames: *const windows_core::PCWSTR) -> windows_core::Result; fn FindStorage(&self, findscope: WMDM_FIND_SCOPE, pwszuniqueid: &windows_core::PCWSTR) -> windows_core::Result; fn GetParent(&self) -> windows_core::Result; @@ -4150,7 +4150,7 @@ impl IWMDMStorage4_Vtbl { } unsafe extern "system" fn GetRightsWithProgress(this: *mut core::ffi::c_void, piprogresscallback: *mut core::ffi::c_void, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMStorage4_Impl::GetRightsWithProgress(this, windows_core::from_raw_borrowed(&piprogresscallback), core::mem::transmute_copy(&pprights), core::mem::transmute_copy(&pnrightscount)).into() + IWMDMStorage4_Impl::GetRightsWithProgress(this, core::mem::transmute_copy(&piprogresscallback), core::mem::transmute_copy(&pprights), core::mem::transmute_copy(&pnrightscount)).into() } unsafe extern "system" fn GetSpecifiedMetadata(this: *mut core::ffi::c_void, cproperties: u32, ppwszpropnames: *const windows_core::PCWSTR, ppmetadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4249,17 +4249,17 @@ pub struct IWMDMStorageControl_Vtbl { pub Move: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMDMStorageControl_Impl: windows_core::IUnknownImpl { - fn Insert(&self, fumode: u32, pwszfile: &windows_core::PCWSTR, poperation: Option<&IWMDMOperation>, pprogress: Option<&IWMDMProgress>) -> windows_core::Result; - fn Delete(&self, fumode: u32, pprogress: Option<&IWMDMProgress>) -> windows_core::Result<()>; - fn Rename(&self, fumode: u32, pwsznewname: &windows_core::PCWSTR, pprogress: Option<&IWMDMProgress>) -> windows_core::Result<()>; - fn Read(&self, fumode: u32, pwszfile: &windows_core::PCWSTR, pprogress: Option<&IWMDMProgress>, poperation: Option<&IWMDMOperation>) -> windows_core::Result<()>; - fn Move(&self, fumode: u32, ptargetobject: Option<&IWMDMStorage>, pprogress: Option<&IWMDMProgress>) -> windows_core::Result<()>; + fn Insert(&self, fumode: u32, pwszfile: &windows_core::PCWSTR, poperation: windows_core::Ref<'_, IWMDMOperation>, pprogress: windows_core::Ref<'_, IWMDMProgress>) -> windows_core::Result; + fn Delete(&self, fumode: u32, pprogress: windows_core::Ref<'_, IWMDMProgress>) -> windows_core::Result<()>; + fn Rename(&self, fumode: u32, pwsznewname: &windows_core::PCWSTR, pprogress: windows_core::Ref<'_, IWMDMProgress>) -> windows_core::Result<()>; + fn Read(&self, fumode: u32, pwszfile: &windows_core::PCWSTR, pprogress: windows_core::Ref<'_, IWMDMProgress>, poperation: windows_core::Ref<'_, IWMDMOperation>) -> windows_core::Result<()>; + fn Move(&self, fumode: u32, ptargetobject: windows_core::Ref<'_, IWMDMStorage>, pprogress: windows_core::Ref<'_, IWMDMProgress>) -> windows_core::Result<()>; } impl IWMDMStorageControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Insert(this: *mut core::ffi::c_void, fumode: u32, pwszfile: windows_core::PCWSTR, poperation: *mut core::ffi::c_void, pprogress: *mut core::ffi::c_void, ppnewobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWMDMStorageControl_Impl::Insert(this, core::mem::transmute_copy(&fumode), core::mem::transmute(&pwszfile), windows_core::from_raw_borrowed(&poperation), windows_core::from_raw_borrowed(&pprogress)) { + match IWMDMStorageControl_Impl::Insert(this, core::mem::transmute_copy(&fumode), core::mem::transmute(&pwszfile), core::mem::transmute_copy(&poperation), core::mem::transmute_copy(&pprogress)) { Ok(ok__) => { ppnewobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4269,19 +4269,19 @@ impl IWMDMStorageControl_Vtbl { } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, fumode: u32, pprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMStorageControl_Impl::Delete(this, core::mem::transmute_copy(&fumode), windows_core::from_raw_borrowed(&pprogress)).into() + IWMDMStorageControl_Impl::Delete(this, core::mem::transmute_copy(&fumode), core::mem::transmute_copy(&pprogress)).into() } unsafe extern "system" fn Rename(this: *mut core::ffi::c_void, fumode: u32, pwsznewname: windows_core::PCWSTR, pprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMStorageControl_Impl::Rename(this, core::mem::transmute_copy(&fumode), core::mem::transmute(&pwsznewname), windows_core::from_raw_borrowed(&pprogress)).into() + IWMDMStorageControl_Impl::Rename(this, core::mem::transmute_copy(&fumode), core::mem::transmute(&pwsznewname), core::mem::transmute_copy(&pprogress)).into() } unsafe extern "system" fn Read(this: *mut core::ffi::c_void, fumode: u32, pwszfile: windows_core::PCWSTR, pprogress: *mut core::ffi::c_void, poperation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMStorageControl_Impl::Read(this, core::mem::transmute_copy(&fumode), core::mem::transmute(&pwszfile), windows_core::from_raw_borrowed(&pprogress), windows_core::from_raw_borrowed(&poperation)).into() + IWMDMStorageControl_Impl::Read(this, core::mem::transmute_copy(&fumode), core::mem::transmute(&pwszfile), core::mem::transmute_copy(&pprogress), core::mem::transmute_copy(&poperation)).into() } unsafe extern "system" fn Move(this: *mut core::ffi::c_void, fumode: u32, ptargetobject: *mut core::ffi::c_void, pprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMStorageControl_Impl::Move(this, core::mem::transmute_copy(&fumode), windows_core::from_raw_borrowed(&ptargetobject), windows_core::from_raw_borrowed(&pprogress)).into() + IWMDMStorageControl_Impl::Move(this, core::mem::transmute_copy(&fumode), core::mem::transmute_copy(&ptargetobject), core::mem::transmute_copy(&pprogress)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4323,13 +4323,13 @@ pub struct IWMDMStorageControl2_Vtbl { pub Insert2: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::PCWSTR, windows_core::PCWSTR, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMDMStorageControl2_Impl: IWMDMStorageControl_Impl { - fn Insert2(&self, fumode: u32, pwszfilesource: &windows_core::PCWSTR, pwszfiledest: &windows_core::PCWSTR, poperation: Option<&IWMDMOperation>, pprogress: Option<&IWMDMProgress>, punknown: Option<&windows_core::IUnknown>, ppnewobject: *mut Option) -> windows_core::Result<()>; + fn Insert2(&self, fumode: u32, pwszfilesource: &windows_core::PCWSTR, pwszfiledest: &windows_core::PCWSTR, poperation: windows_core::Ref<'_, IWMDMOperation>, pprogress: windows_core::Ref<'_, IWMDMProgress>, punknown: windows_core::Ref<'_, windows_core::IUnknown>, ppnewobject: windows_core::OutRef<'_, IWMDMStorage>) -> windows_core::Result<()>; } impl IWMDMStorageControl2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Insert2(this: *mut core::ffi::c_void, fumode: u32, pwszfilesource: windows_core::PCWSTR, pwszfiledest: windows_core::PCWSTR, poperation: *mut core::ffi::c_void, pprogress: *mut core::ffi::c_void, punknown: *mut core::ffi::c_void, ppnewobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMStorageControl2_Impl::Insert2(this, core::mem::transmute_copy(&fumode), core::mem::transmute(&pwszfilesource), core::mem::transmute(&pwszfiledest), windows_core::from_raw_borrowed(&poperation), windows_core::from_raw_borrowed(&pprogress), windows_core::from_raw_borrowed(&punknown), core::mem::transmute_copy(&ppnewobject)).into() + IWMDMStorageControl2_Impl::Insert2(this, core::mem::transmute_copy(&fumode), core::mem::transmute(&pwszfilesource), core::mem::transmute(&pwszfiledest), core::mem::transmute_copy(&poperation), core::mem::transmute_copy(&pprogress), core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&ppnewobject)).into() } Self { base__: IWMDMStorageControl_Vtbl::new::(), Insert2: Insert2:: } } @@ -4365,13 +4365,13 @@ pub struct IWMDMStorageControl3_Vtbl { pub Insert3: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, windows_core::PCWSTR, windows_core::PCWSTR, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMDMStorageControl3_Impl: IWMDMStorageControl2_Impl { - fn Insert3(&self, fumode: u32, futype: u32, pwszfilesource: &windows_core::PCWSTR, pwszfiledest: &windows_core::PCWSTR, poperation: Option<&IWMDMOperation>, pprogress: Option<&IWMDMProgress>, pmetadata: Option<&IWMDMMetaData>, punknown: Option<&windows_core::IUnknown>, ppnewobject: *mut Option) -> windows_core::Result<()>; + fn Insert3(&self, fumode: u32, futype: u32, pwszfilesource: &windows_core::PCWSTR, pwszfiledest: &windows_core::PCWSTR, poperation: windows_core::Ref<'_, IWMDMOperation>, pprogress: windows_core::Ref<'_, IWMDMProgress>, pmetadata: windows_core::Ref<'_, IWMDMMetaData>, punknown: windows_core::Ref<'_, windows_core::IUnknown>, ppnewobject: windows_core::OutRef<'_, IWMDMStorage>) -> windows_core::Result<()>; } impl IWMDMStorageControl3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Insert3(this: *mut core::ffi::c_void, fumode: u32, futype: u32, pwszfilesource: windows_core::PCWSTR, pwszfiledest: windows_core::PCWSTR, poperation: *mut core::ffi::c_void, pprogress: *mut core::ffi::c_void, pmetadata: *mut core::ffi::c_void, punknown: *mut core::ffi::c_void, ppnewobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMStorageControl3_Impl::Insert3(this, core::mem::transmute_copy(&fumode), core::mem::transmute_copy(&futype), core::mem::transmute(&pwszfilesource), core::mem::transmute(&pwszfiledest), windows_core::from_raw_borrowed(&poperation), windows_core::from_raw_borrowed(&pprogress), windows_core::from_raw_borrowed(&pmetadata), windows_core::from_raw_borrowed(&punknown), core::mem::transmute_copy(&ppnewobject)).into() + IWMDMStorageControl3_Impl::Insert3(this, core::mem::transmute_copy(&fumode), core::mem::transmute_copy(&futype), core::mem::transmute(&pwszfilesource), core::mem::transmute(&pwszfiledest), core::mem::transmute_copy(&poperation), core::mem::transmute_copy(&pprogress), core::mem::transmute_copy(&pmetadata), core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&ppnewobject)).into() } Self { base__: IWMDMStorageControl2_Vtbl::new::(), Insert3: Insert3:: } } @@ -4428,7 +4428,7 @@ pub trait IWMDMStorageGlobals_Impl: windows_core::IUnknownImpl { fn GetTotalFree(&self, pdwfreelow: *mut u32, pdwfreehigh: *mut u32) -> windows_core::Result<()>; fn GetTotalBad(&self, pdwbadlow: *mut u32, pdwbadhigh: *mut u32) -> windows_core::Result<()>; fn GetStatus(&self) -> windows_core::Result; - fn Initialize(&self, fumode: u32, pprogress: Option<&IWMDMProgress>) -> windows_core::Result<()>; + fn Initialize(&self, fumode: u32, pprogress: windows_core::Ref<'_, IWMDMProgress>) -> windows_core::Result<()>; } impl IWMDMStorageGlobals_Vtbl { pub const fn new() -> Self { @@ -4470,7 +4470,7 @@ impl IWMDMStorageGlobals_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, fumode: u32, pprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDMStorageGlobals_Impl::Initialize(this, core::mem::transmute_copy(&fumode), windows_core::from_raw_borrowed(&pprogress)).into() + IWMDMStorageGlobals_Impl::Initialize(this, core::mem::transmute_copy(&fumode), core::mem::transmute_copy(&pprogress)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs index e98b652aa3..bbc1c50557 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs @@ -1357,7 +1357,7 @@ pub struct IATSC_EIT_Vtbl { pub GetRecordDescriptorByTag: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u8, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IATSC_EIT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetSourceId(&self) -> windows_core::Result; fn GetProtocolVersion(&self) -> windows_core::Result; @@ -1369,13 +1369,13 @@ pub trait IATSC_EIT_Impl: windows_core::IUnknownImpl { fn GetRecordTitleText(&self, dwrecordindex: u32, pdwlength: *mut u32, pptext: *mut *mut u8) -> windows_core::Result<()>; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; } impl IATSC_EIT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IATSC_EIT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IATSC_EIT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1543,7 +1543,7 @@ pub struct IATSC_ETT_Vtbl { pub GetExtendedMessageText: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut u8) -> windows_core::HRESULT, } pub trait IATSC_ETT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetProtocolVersion(&self) -> windows_core::Result; fn GetEtmId(&self) -> windows_core::Result; @@ -1553,7 +1553,7 @@ impl IATSC_ETT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IATSC_ETT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IATSC_ETT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1677,7 +1677,7 @@ pub struct IATSC_MGT_Vtbl { pub GetTableDescriptorByTag: unsafe extern "system" fn(*mut core::ffi::c_void, u8, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IATSC_MGT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetProtocolVersion(&self) -> windows_core::Result; fn GetCountOfRecords(&self) -> windows_core::Result; @@ -1686,16 +1686,16 @@ pub trait IATSC_MGT_Impl: windows_core::IUnknownImpl { fn GetRecordVersionNumber(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetCountOfTableDescriptors(&self, pdwval: *const u32) -> windows_core::Result<()>; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; } impl IATSC_MGT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IATSC_MGT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IATSC_MGT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1872,20 +1872,20 @@ pub struct IATSC_STT_Vtbl { pub GetTableDescriptorByTag: unsafe extern "system" fn(*mut core::ffi::c_void, u8, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IATSC_STT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetProtocolVersion(&self) -> windows_core::Result; fn GetSystemTime(&self) -> windows_core::Result; fn GetGpsUtcOffset(&self) -> windows_core::Result; fn GetDaylightSavings(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; } impl IATSC_STT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IATSC_STT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IATSC_STT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetProtocolVersion(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2107,7 +2107,7 @@ pub struct IATSC_VCT_Vtbl { pub GetTableDescriptorByTag: unsafe extern "system" fn(*mut core::ffi::c_void, u8, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IATSC_VCT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetTransportStreamId(&self) -> windows_core::Result; fn GetProtocolVersion(&self) -> windows_core::Result; @@ -2129,16 +2129,16 @@ pub trait IATSC_VCT_Impl: windows_core::IUnknownImpl { fn GetRecordSourceId(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetCountOfTableDescriptors(&self, pdwval: *const u32) -> windows_core::Result<()>; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; } impl IATSC_VCT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IATSC_VCT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IATSC_VCT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3068,7 +3068,7 @@ pub struct IAtscPsipParser_Vtbl { pub GetEAS: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAtscPsipParser_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, punkmpeg2data: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, punkmpeg2data: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetPAT(&self) -> windows_core::Result; fn GetCAT(&self, dwtimeout: u32) -> windows_core::Result; fn GetPMT(&self, pid: u16, pwprogramnumber: *const u16) -> windows_core::Result; @@ -3084,7 +3084,7 @@ impl IAtscPsipParser_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, punkmpeg2data: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAtscPsipParser_Impl::Initialize(this, windows_core::from_raw_borrowed(&punkmpeg2data)).into() + IAtscPsipParser_Impl::Initialize(this, core::mem::transmute_copy(&punkmpeg2data)).into() } unsafe extern "system" fn GetPAT(this: *mut core::ffi::c_void, pppat: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3437,8 +3437,8 @@ pub struct IBDAComparable_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IBDAComparable_Impl: windows_core::IUnknownImpl { - fn CompareExact(&self, compareto: Option<&super::super::super::System::Com::IDispatch>) -> windows_core::Result; - fn CompareEquivalent(&self, compareto: Option<&super::super::super::System::Com::IDispatch>, dwflags: u32) -> windows_core::Result; + fn CompareExact(&self, compareto: windows_core::Ref<'_, super::super::super::System::Com::IDispatch>) -> windows_core::Result; + fn CompareEquivalent(&self, compareto: windows_core::Ref<'_, super::super::super::System::Com::IDispatch>, dwflags: u32) -> windows_core::Result; fn HashExact(&self) -> windows_core::Result; fn HashExactIncremental(&self, partialresult: i64) -> windows_core::Result; fn HashEquivalent(&self, dwflags: u32) -> windows_core::Result; @@ -3449,7 +3449,7 @@ impl IBDAComparable_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CompareExact(this: *mut core::ffi::c_void, compareto: *mut core::ffi::c_void, result: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBDAComparable_Impl::CompareExact(this, windows_core::from_raw_borrowed(&compareto)) { + match IBDAComparable_Impl::CompareExact(this, core::mem::transmute_copy(&compareto)) { Ok(ok__) => { result.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3459,7 +3459,7 @@ impl IBDAComparable_Vtbl { } unsafe extern "system" fn CompareEquivalent(this: *mut core::ffi::c_void, compareto: *mut core::ffi::c_void, dwflags: u32, result: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBDAComparable_Impl::CompareEquivalent(this, windows_core::from_raw_borrowed(&compareto), core::mem::transmute_copy(&dwflags)) { + match IBDAComparable_Impl::CompareEquivalent(this, core::mem::transmute_copy(&compareto), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { result.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3585,14 +3585,14 @@ pub struct IBDA_TIF_REGISTRATION_Vtbl { pub UnregisterTIF: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IBDA_TIF_REGISTRATION_Impl: windows_core::IUnknownImpl { - fn RegisterTIFEx(&self, ptifinputpin: Option<&super::IPin>, ppvregistrationcontext: *mut u32, ppmpeg2datacontrol: *mut Option) -> windows_core::Result<()>; + fn RegisterTIFEx(&self, ptifinputpin: windows_core::Ref<'_, super::IPin>, ppvregistrationcontext: *mut u32, ppmpeg2datacontrol: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn UnregisterTIF(&self, pvregistrationcontext: u32) -> windows_core::Result<()>; } impl IBDA_TIF_REGISTRATION_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterTIFEx(this: *mut core::ffi::c_void, ptifinputpin: *mut core::ffi::c_void, ppvregistrationcontext: *mut u32, ppmpeg2datacontrol: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBDA_TIF_REGISTRATION_Impl::RegisterTIFEx(this, windows_core::from_raw_borrowed(&ptifinputpin), core::mem::transmute_copy(&ppvregistrationcontext), core::mem::transmute_copy(&ppmpeg2datacontrol)).into() + IBDA_TIF_REGISTRATION_Impl::RegisterTIFEx(this, core::mem::transmute_copy(&ptifinputpin), core::mem::transmute_copy(&ppvregistrationcontext), core::mem::transmute_copy(&ppmpeg2datacontrol)).into() } unsafe extern "system" fn UnregisterTIF(this: *mut core::ffi::c_void, pvregistrationcontext: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3662,11 +3662,11 @@ pub struct ICAT_Vtbl { pub ConvertNextToCurrent: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICAT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn GetNextTable(&self, dwtimeout: u32) -> windows_core::Result; fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; @@ -3676,7 +3676,7 @@ impl ICAT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICAT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + ICAT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4050,7 +4050,7 @@ pub struct IComponent_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IComponent_Impl: super::super::super::System::Com::IDispatch_Impl { fn Type(&self) -> windows_core::Result; - fn SetType(&self, ct: Option<&IComponentType>) -> windows_core::Result<()>; + fn SetType(&self, ct: windows_core::Ref<'_, IComponentType>) -> windows_core::Result<()>; fn DescLangID(&self) -> windows_core::Result; fn SetDescLangID(&self, langid: i32) -> windows_core::Result<()>; fn Status(&self) -> windows_core::Result; @@ -4074,7 +4074,7 @@ impl IComponent_Vtbl { } unsafe extern "system" fn SetType(this: *mut core::ffi::c_void, ct: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComponent_Impl::SetType(this, windows_core::from_raw_borrowed(&ct)).into() + IComponent_Impl::SetType(this, core::mem::transmute_copy(&ct)).into() } unsafe extern "system" fn DescLangID(this: *mut core::ffi::c_void, langid: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4512,8 +4512,8 @@ pub trait IComponentTypes_Impl: super::super::super::System::Com::IDispatch_Impl fn _NewEnum(&self) -> windows_core::Result; fn EnumComponentTypes(&self) -> windows_core::Result; fn get_Item(&self, index: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn put_Item(&self, index: &super::super::super::System::Variant::VARIANT, componenttype: Option<&IComponentType>) -> windows_core::Result<()>; - fn Add(&self, componenttype: Option<&IComponentType>) -> windows_core::Result; + fn put_Item(&self, index: &super::super::super::System::Variant::VARIANT, componenttype: windows_core::Ref<'_, IComponentType>) -> windows_core::Result<()>; + fn Add(&self, componenttype: windows_core::Ref<'_, IComponentType>) -> windows_core::Result; fn Remove(&self, index: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } @@ -4562,11 +4562,11 @@ impl IComponentTypes_Vtbl { } unsafe extern "system" fn put_Item(this: *mut core::ffi::c_void, index: super::super::super::System::Variant::VARIANT, componenttype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComponentTypes_Impl::put_Item(this, core::mem::transmute(&index), windows_core::from_raw_borrowed(&componenttype)).into() + IComponentTypes_Impl::put_Item(this, core::mem::transmute(&index), core::mem::transmute_copy(&componenttype)).into() } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, componenttype: *mut core::ffi::c_void, newindex: *mut super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IComponentTypes_Impl::Add(this, windows_core::from_raw_borrowed(&componenttype)) { + match IComponentTypes_Impl::Add(this, core::mem::transmute_copy(&componenttype)) { Ok(ok__) => { newindex.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4695,10 +4695,10 @@ pub trait IComponents_Impl: super::super::super::System::Com::IDispatch_Impl { fn _NewEnum(&self) -> windows_core::Result; fn EnumComponents(&self) -> windows_core::Result; fn get_Item(&self, index: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn Add(&self, component: Option<&IComponent>) -> windows_core::Result; + fn Add(&self, component: windows_core::Ref<'_, IComponent>) -> windows_core::Result; fn Remove(&self, index: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; - fn put_Item(&self, index: &super::super::super::System::Variant::VARIANT, ppcomponent: Option<&IComponent>) -> windows_core::Result<()>; + fn put_Item(&self, index: &super::super::super::System::Variant::VARIANT, ppcomponent: windows_core::Ref<'_, IComponent>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IComponents_Vtbl { @@ -4745,7 +4745,7 @@ impl IComponents_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, component: *mut core::ffi::c_void, newindex: *mut super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IComponents_Impl::Add(this, windows_core::from_raw_borrowed(&component)) { + match IComponents_Impl::Add(this, core::mem::transmute_copy(&component)) { Ok(ok__) => { newindex.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4769,7 +4769,7 @@ impl IComponents_Vtbl { } unsafe extern "system" fn put_Item(this: *mut core::ffi::c_void, index: super::super::super::System::Variant::VARIANT, ppcomponent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComponents_Impl::put_Item(this, core::mem::transmute(&index), windows_core::from_raw_borrowed(&ppcomponent)).into() + IComponents_Impl::put_Item(this, core::mem::transmute(&index), core::mem::transmute_copy(&ppcomponent)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -4867,7 +4867,7 @@ pub trait IComponentsOld_Impl: super::super::super::System::Com::IDispatch_Impl fn _NewEnum(&self) -> windows_core::Result; fn EnumComponents(&self) -> windows_core::Result; fn get_Item(&self, index: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn Add(&self, component: Option<&IComponent>) -> windows_core::Result; + fn Add(&self, component: windows_core::Ref<'_, IComponent>) -> windows_core::Result; fn Remove(&self, index: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } @@ -4916,7 +4916,7 @@ impl IComponentsOld_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, component: *mut core::ffi::c_void, newindex: *mut super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IComponentsOld_Impl::Add(this, windows_core::from_raw_borrowed(&component)) { + match IComponentsOld_Impl::Add(this, core::mem::transmute_copy(&component)) { Ok(ok__) => { newindex.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6561,18 +6561,18 @@ pub struct IDVB_BAT_Vtbl { pub ConvertNextToCurrent: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDVB_BAT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetBouquetId(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32, ppdescriptor: *const Option) -> windows_core::Result<()>; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetCountOfRecords(&self) -> windows_core::Result; fn GetRecordTransportStreamId(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordOriginalNetworkId(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn GetNextTable(&self) -> windows_core::Result; fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; @@ -6582,7 +6582,7 @@ impl IDVB_BAT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_BAT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IDVB_BAT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6744,14 +6744,14 @@ pub struct IDVB_DIT_Vtbl { pub GetTransitionFlag: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IDVB_DIT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>) -> windows_core::Result<()>; fn GetTransitionFlag(&self) -> windows_core::Result; } impl IDVB_DIT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_DIT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist)).into() + IDVB_DIT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist)).into() } unsafe extern "system" fn GetTransitionFlag(this: *mut core::ffi::c_void, pfval: *mut super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6887,7 +6887,7 @@ pub struct IDVB_EIT_Vtbl { pub GetVersionHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IDVB_EIT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetServiceId(&self) -> windows_core::Result; fn GetTransportStreamId(&self) -> windows_core::Result; @@ -6902,7 +6902,7 @@ pub trait IDVB_EIT_Impl: windows_core::IUnknownImpl { fn GetRecordFreeCAMode(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn GetNextTable(&self) -> windows_core::Result; fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; @@ -6913,7 +6913,7 @@ impl IDVB_EIT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_EIT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IDVB_EIT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7267,18 +7267,18 @@ pub struct IDVB_NIT_Vtbl { pub GetVersionHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IDVB_NIT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetNetworkId(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetCountOfRecords(&self) -> windows_core::Result; fn GetRecordTransportStreamId(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordOriginalNetworkId(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn GetNextTable(&self) -> windows_core::Result; fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; @@ -7289,7 +7289,7 @@ impl IDVB_NIT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_NIT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IDVB_NIT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7493,7 +7493,7 @@ pub struct IDVB_RST_Vtbl { pub GetRecordRunningStatus: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u8) -> windows_core::HRESULT, } pub trait IDVB_RST_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>) -> windows_core::Result<()>; fn GetCountOfRecords(&self) -> windows_core::Result; fn GetRecordTransportStreamId(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordOriginalNetworkId(&self, dwrecordindex: u32) -> windows_core::Result; @@ -7505,7 +7505,7 @@ impl IDVB_RST_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_RST_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist)).into() + IDVB_RST_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist)).into() } unsafe extern "system" fn GetCountOfRecords(this: *mut core::ffi::c_void, pdwval: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7681,7 +7681,7 @@ pub struct IDVB_SDT_Vtbl { pub GetVersionHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IDVB_SDT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetTransportStreamId(&self) -> windows_core::Result; fn GetOriginalNetworkId(&self) -> windows_core::Result; @@ -7693,7 +7693,7 @@ pub trait IDVB_SDT_Impl: windows_core::IUnknownImpl { fn GetRecordFreeCAMode(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn GetNextTable(&self) -> windows_core::Result; fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; @@ -7704,7 +7704,7 @@ impl IDVB_SDT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_SDT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IDVB_SDT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7961,17 +7961,17 @@ pub struct IDVB_SIT_Vtbl { pub ConvertNextToCurrent: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDVB_SIT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetCountOfRecords(&self) -> windows_core::Result; fn GetRecordServiceId(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordRunningStatus(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn GetNextTable(&self, dwtimeout: u32) -> windows_core::Result; fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; @@ -7981,7 +7981,7 @@ impl IDVB_SIT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_SIT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IDVB_SIT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8143,7 +8143,7 @@ pub struct IDVB_ST_Vtbl { pub GetData: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8) -> windows_core::HRESULT, } pub trait IDVB_ST_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>) -> windows_core::Result<()>; fn GetDataLength(&self) -> windows_core::Result; fn GetData(&self) -> windows_core::Result<*mut u8>; } @@ -8151,7 +8151,7 @@ impl IDVB_ST_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_ST_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist)).into() + IDVB_ST_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist)).into() } unsafe extern "system" fn GetDataLength(this: *mut core::ffi::c_void, pwval: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8206,14 +8206,14 @@ pub struct IDVB_TDT_Vtbl { pub GetUTCTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut MPEG_DATE_AND_TIME) -> windows_core::HRESULT, } pub trait IDVB_TDT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>) -> windows_core::Result<()>; fn GetUTCTime(&self) -> windows_core::Result; } impl IDVB_TDT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_TDT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist)).into() + IDVB_TDT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist)).into() } unsafe extern "system" fn GetUTCTime(this: *mut core::ffi::c_void, pmdtval: *mut MPEG_DATE_AND_TIME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8271,17 +8271,17 @@ pub struct IDVB_TOT_Vtbl { pub GetTableDescriptorByTag: unsafe extern "system" fn(*mut core::ffi::c_void, u8, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDVB_TOT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>) -> windows_core::Result<()>; fn GetUTCTime(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; } impl IDVB_TOT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDVB_TOT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist)).into() + IDVB_TOT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist)).into() } unsafe extern "system" fn GetUTCTime(this: *mut core::ffi::c_void, pmdtval: *mut MPEG_DATE_AND_TIME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9448,9 +9448,9 @@ pub trait IDvbExtendedEventDescriptor_Impl: windows_core::IUnknownImpl { fn GetLanguageCode(&self, pszcode: *mut u8) -> windows_core::Result<()>; fn GetCountOfRecords(&self) -> windows_core::Result; fn GetRecordItemW(&self, brecordindex: u8, convmode: DVB_STRCONV_MODE, pbstrdesc: *mut windows_core::BSTR, pbstritem: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn GetConcatenatedItemW(&self, pfollowingdescriptor: Option<&IDvbExtendedEventDescriptor>, convmode: DVB_STRCONV_MODE, pbstrdesc: *mut windows_core::BSTR, pbstritem: *mut windows_core::BSTR) -> windows_core::Result<()>; + fn GetConcatenatedItemW(&self, pfollowingdescriptor: windows_core::Ref<'_, IDvbExtendedEventDescriptor>, convmode: DVB_STRCONV_MODE, pbstrdesc: *mut windows_core::BSTR, pbstritem: *mut windows_core::BSTR) -> windows_core::Result<()>; fn GetTextW(&self, convmode: DVB_STRCONV_MODE) -> windows_core::Result; - fn GetConcatenatedTextW(&self, followingdescriptor: Option<&IDvbExtendedEventDescriptor>, convmode: DVB_STRCONV_MODE) -> windows_core::Result; + fn GetConcatenatedTextW(&self, followingdescriptor: windows_core::Ref<'_, IDvbExtendedEventDescriptor>, convmode: DVB_STRCONV_MODE) -> windows_core::Result; fn GetRecordItemRawBytes(&self, brecordindex: u8, ppbrawitem: *mut *mut u8, pbitemlength: *mut u8) -> windows_core::Result<()>; } impl IDvbExtendedEventDescriptor_Vtbl { @@ -9515,7 +9515,7 @@ impl IDvbExtendedEventDescriptor_Vtbl { } unsafe extern "system" fn GetConcatenatedItemW(this: *mut core::ffi::c_void, pfollowingdescriptor: *mut core::ffi::c_void, convmode: DVB_STRCONV_MODE, pbstrdesc: *mut *mut core::ffi::c_void, pbstritem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDvbExtendedEventDescriptor_Impl::GetConcatenatedItemW(this, windows_core::from_raw_borrowed(&pfollowingdescriptor), core::mem::transmute_copy(&convmode), core::mem::transmute_copy(&pbstrdesc), core::mem::transmute_copy(&pbstritem)).into() + IDvbExtendedEventDescriptor_Impl::GetConcatenatedItemW(this, core::mem::transmute_copy(&pfollowingdescriptor), core::mem::transmute_copy(&convmode), core::mem::transmute_copy(&pbstrdesc), core::mem::transmute_copy(&pbstritem)).into() } unsafe extern "system" fn GetTextW(this: *mut core::ffi::c_void, convmode: DVB_STRCONV_MODE, pbstrtext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9529,7 +9529,7 @@ impl IDvbExtendedEventDescriptor_Vtbl { } unsafe extern "system" fn GetConcatenatedTextW(this: *mut core::ffi::c_void, followingdescriptor: *mut core::ffi::c_void, convmode: DVB_STRCONV_MODE, pbstrtext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDvbExtendedEventDescriptor_Impl::GetConcatenatedTextW(this, windows_core::from_raw_borrowed(&followingdescriptor), core::mem::transmute_copy(&convmode)) { + match IDvbExtendedEventDescriptor_Impl::GetConcatenatedTextW(this, core::mem::transmute_copy(&followingdescriptor), core::mem::transmute_copy(&convmode)) { Ok(ok__) => { pbstrtext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11317,7 +11317,7 @@ pub struct IDvbSiParser_Vtbl { pub GetSIT: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDvbSiParser_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, punkmpeg2data: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, punkmpeg2data: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetPAT(&self) -> windows_core::Result; fn GetCAT(&self, dwtimeout: u32) -> windows_core::Result; fn GetPMT(&self, pid: u16, pwprogramnumber: *const u16) -> windows_core::Result; @@ -11337,7 +11337,7 @@ impl IDvbSiParser_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, punkmpeg2data: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDvbSiParser_Impl::Initialize(this, windows_core::from_raw_borrowed(&punkmpeg2data)).into() + IDvbSiParser_Impl::Initialize(this, core::mem::transmute_copy(&punkmpeg2data)).into() } unsafe extern "system" fn GetPAT(this: *mut core::ffi::c_void, pppat: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12336,13 +12336,13 @@ pub struct IESEventFactory_Vtbl { pub CreateESEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, windows_core::GUID, u32, *const u8, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IESEventFactory_Impl: windows_core::IUnknownImpl { - fn CreateESEvent(&self, pserviceprovider: Option<&windows_core::IUnknown>, dweventid: u32, guideventtype: &windows_core::GUID, dweventdatalength: u32, peventdata: *const u8, bstrbaseurl: &windows_core::BSTR, pinitcontext: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateESEvent(&self, pserviceprovider: windows_core::Ref<'_, windows_core::IUnknown>, dweventid: u32, guideventtype: &windows_core::GUID, dweventdatalength: u32, peventdata: *const u8, bstrbaseurl: &windows_core::BSTR, pinitcontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } impl IESEventFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateESEvent(this: *mut core::ffi::c_void, pserviceprovider: *mut core::ffi::c_void, dweventid: u32, guideventtype: windows_core::GUID, dweventdatalength: u32, peventdata: *const u8, bstrbaseurl: *mut core::ffi::c_void, pinitcontext: *mut core::ffi::c_void, ppesevent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IESEventFactory_Impl::CreateESEvent(this, windows_core::from_raw_borrowed(&pserviceprovider), core::mem::transmute_copy(&dweventid), core::mem::transmute(&guideventtype), core::mem::transmute_copy(&dweventdatalength), core::mem::transmute_copy(&peventdata), core::mem::transmute(&bstrbaseurl), windows_core::from_raw_borrowed(&pinitcontext)) { + match IESEventFactory_Impl::CreateESEvent(this, core::mem::transmute_copy(&pserviceprovider), core::mem::transmute_copy(&dweventid), core::mem::transmute(&guideventtype), core::mem::transmute_copy(&dweventdatalength), core::mem::transmute_copy(&peventdata), core::mem::transmute(&bstrbaseurl), core::mem::transmute_copy(&pinitcontext)) { Ok(ok__) => { ppesevent.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12373,13 +12373,13 @@ pub struct IESEventService_Vtbl { pub FireESEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IESEventService_Impl: windows_core::IUnknownImpl { - fn FireESEvent(&self, pesevent: Option<&super::IESEvent>) -> windows_core::Result<()>; + fn FireESEvent(&self, pesevent: windows_core::Ref<'_, super::IESEvent>) -> windows_core::Result<()>; } impl IESEventService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FireESEvent(this: *mut core::ffi::c_void, pesevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IESEventService_Impl::FireESEvent(this, windows_core::from_raw_borrowed(&pesevent)).into() + IESEventService_Impl::FireESEvent(this, core::mem::transmute_copy(&pesevent)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), FireESEvent: FireESEvent:: } } @@ -12433,18 +12433,18 @@ pub struct IESEventServiceConfiguration_Vtbl { pub RemoveGraph: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IESEventServiceConfiguration_Impl: windows_core::IUnknownImpl { - fn SetParent(&self, peventservice: Option<&IESEventService>) -> windows_core::Result<()>; + fn SetParent(&self, peventservice: windows_core::Ref<'_, IESEventService>) -> windows_core::Result<()>; fn RemoveParent(&self) -> windows_core::Result<()>; - fn SetOwner(&self, pesevents: Option<&super::IESEvents>) -> windows_core::Result<()>; + fn SetOwner(&self, pesevents: windows_core::Ref<'_, super::IESEvents>) -> windows_core::Result<()>; fn RemoveOwner(&self) -> windows_core::Result<()>; - fn SetGraph(&self, pgraph: Option<&super::IFilterGraph>) -> windows_core::Result<()>; - fn RemoveGraph(&self, pgraph: Option<&super::IFilterGraph>) -> windows_core::Result<()>; + fn SetGraph(&self, pgraph: windows_core::Ref<'_, super::IFilterGraph>) -> windows_core::Result<()>; + fn RemoveGraph(&self, pgraph: windows_core::Ref<'_, super::IFilterGraph>) -> windows_core::Result<()>; } impl IESEventServiceConfiguration_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetParent(this: *mut core::ffi::c_void, peventservice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IESEventServiceConfiguration_Impl::SetParent(this, windows_core::from_raw_borrowed(&peventservice)).into() + IESEventServiceConfiguration_Impl::SetParent(this, core::mem::transmute_copy(&peventservice)).into() } unsafe extern "system" fn RemoveParent(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12452,7 +12452,7 @@ impl IESEventServiceConfiguration_Vtbl { } unsafe extern "system" fn SetOwner(this: *mut core::ffi::c_void, pesevents: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IESEventServiceConfiguration_Impl::SetOwner(this, windows_core::from_raw_borrowed(&pesevents)).into() + IESEventServiceConfiguration_Impl::SetOwner(this, core::mem::transmute_copy(&pesevents)).into() } unsafe extern "system" fn RemoveOwner(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12460,11 +12460,11 @@ impl IESEventServiceConfiguration_Vtbl { } unsafe extern "system" fn SetGraph(this: *mut core::ffi::c_void, pgraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IESEventServiceConfiguration_Impl::SetGraph(this, windows_core::from_raw_borrowed(&pgraph)).into() + IESEventServiceConfiguration_Impl::SetGraph(this, core::mem::transmute_copy(&pgraph)).into() } unsafe extern "system" fn RemoveGraph(this: *mut core::ffi::c_void, pgraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IESEventServiceConfiguration_Impl::RemoveGraph(this, windows_core::from_raw_borrowed(&pgraph)).into() + IESEventServiceConfiguration_Impl::RemoveGraph(this, core::mem::transmute_copy(&pgraph)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -13377,7 +13377,7 @@ pub struct IEnumComponentTypes_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumComponentTypes_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IComponentType>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -13452,7 +13452,7 @@ pub struct IEnumComponents_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumComponents_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IComponent>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -13522,7 +13522,7 @@ pub struct IEnumGuideDataProperties_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumGuideDataProperties_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppprop: *mut Option, pcelt: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppprop: windows_core::OutRef<'_, IGuideDataProperty>, pcelt: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -13595,7 +13595,7 @@ pub struct IEnumMSVidGraphSegment_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumMSVidGraphSegment_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IMSVidGraphSegment>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -13738,7 +13738,7 @@ pub struct IEnumTuneRequests_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumTuneRequests_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppprop: *mut Option, pcelt: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppprop: windows_core::OutRef<'_, ITuneRequest>, pcelt: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -13813,7 +13813,7 @@ pub struct IEnumTuningSpaces_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumTuningSpaces_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, ITuningSpace>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -14197,7 +14197,7 @@ pub struct IGuideData_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IGuideData_Impl: windows_core::IUnknownImpl { fn GetServices(&self) -> windows_core::Result; - fn GetServiceProperties(&self, ptunerequest: Option<&ITuneRequest>) -> windows_core::Result; + fn GetServiceProperties(&self, ptunerequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result; fn GetGuideProgramIDs(&self) -> windows_core::Result; fn GetProgramProperties(&self, varprogramdescriptionid: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; fn GetScheduleEntryIDs(&self) -> windows_core::Result; @@ -14218,7 +14218,7 @@ impl IGuideData_Vtbl { } unsafe extern "system" fn GetServiceProperties(this: *mut core::ffi::c_void, ptunerequest: *mut core::ffi::c_void, ppenumproperties: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGuideData_Impl::GetServiceProperties(this, windows_core::from_raw_borrowed(&ptunerequest)) { + match IGuideData_Impl::GetServiceProperties(this, core::mem::transmute_copy(&ptunerequest)) { Ok(ok__) => { ppenumproperties.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -14420,14 +14420,14 @@ pub struct IGuideDataLoader_Vtbl { pub Terminate: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IGuideDataLoader_Impl: windows_core::IUnknownImpl { - fn Init(&self, pguidestore: Option<&IGuideData>) -> windows_core::Result<()>; + fn Init(&self, pguidestore: windows_core::Ref<'_, IGuideData>) -> windows_core::Result<()>; fn Terminate(&self) -> windows_core::Result<()>; } impl IGuideDataLoader_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, pguidestore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGuideDataLoader_Impl::Init(this, windows_core::from_raw_borrowed(&pguidestore)).into() + IGuideDataLoader_Impl::Init(this, core::mem::transmute_copy(&pguidestore)).into() } unsafe extern "system" fn Terminate(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14623,25 +14623,25 @@ pub struct IISDB_BIT_Vtbl { pub GetVersionHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IISDB_BIT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetOriginalNetworkId(&self) -> windows_core::Result; fn GetBroadcastViewPropriety(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetCountOfRecords(&self) -> windows_core::Result; fn GetRecordBroadcasterId(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetVersionHash(&self) -> windows_core::Result; } impl IISDB_BIT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IISDB_BIT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IISDB_BIT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14844,7 +14844,7 @@ pub struct IISDB_CDT_Vtbl { pub GetVersionHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IISDB_CDT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>, bsectionnumber: u8) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>, bsectionnumber: u8) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetDownloadDataId(&self) -> windows_core::Result; fn GetSectionNumber(&self) -> windows_core::Result; @@ -14852,7 +14852,7 @@ pub trait IISDB_CDT_Impl: windows_core::IUnknownImpl { fn GetDataType(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetSizeOfDataModule(&self) -> windows_core::Result; fn GetDataModule(&self) -> windows_core::Result<*mut u8>; fn GetVersionHash(&self) -> windows_core::Result; @@ -14861,7 +14861,7 @@ impl IISDB_CDT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void, bsectionnumber: u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IISDB_CDT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata), core::mem::transmute_copy(&bsectionnumber)).into() + IISDB_CDT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata), core::mem::transmute_copy(&bsectionnumber)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15035,19 +15035,19 @@ pub struct IISDB_EMM_Vtbl { pub GetVersionHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IISDB_EMM_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetTableIdExtension(&self) -> windows_core::Result; fn GetDataBytes(&self, pwbufferlength: *mut u16, pbbuffer: *mut u8) -> windows_core::Result<()>; fn GetSharedEmmMessage(&self, pwlength: *mut u16, ppbmessage: *mut *mut u8) -> windows_core::Result<()>; - fn GetIndividualEmmMessage(&self, punknown: Option<&windows_core::IUnknown>, pwlength: *mut u16, ppbmessage: *mut *mut u8) -> windows_core::Result<()>; + fn GetIndividualEmmMessage(&self, punknown: windows_core::Ref<'_, windows_core::IUnknown>, pwlength: *mut u16, ppbmessage: *mut *mut u8) -> windows_core::Result<()>; fn GetVersionHash(&self) -> windows_core::Result; } impl IISDB_EMM_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IISDB_EMM_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IISDB_EMM_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15079,7 +15079,7 @@ impl IISDB_EMM_Vtbl { } unsafe extern "system" fn GetIndividualEmmMessage(this: *mut core::ffi::c_void, punknown: *mut core::ffi::c_void, pwlength: *mut u16, ppbmessage: *mut *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IISDB_EMM_Impl::GetIndividualEmmMessage(this, windows_core::from_raw_borrowed(&punknown), core::mem::transmute_copy(&pwlength), core::mem::transmute_copy(&ppbmessage)).into() + IISDB_EMM_Impl::GetIndividualEmmMessage(this, core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&pwlength), core::mem::transmute_copy(&ppbmessage)).into() } unsafe extern "system" fn GetVersionHash(this: *mut core::ffi::c_void, pdwversionhash: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15173,7 +15173,7 @@ pub struct IISDB_LDT_Vtbl { pub GetVersionHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IISDB_LDT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetOriginalServiceId(&self) -> windows_core::Result; fn GetTransportStreamId(&self) -> windows_core::Result; @@ -15182,14 +15182,14 @@ pub trait IISDB_LDT_Impl: windows_core::IUnknownImpl { fn GetRecordDescriptionId(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetVersionHash(&self) -> windows_core::Result; } impl IISDB_LDT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IISDB_LDT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IISDB_LDT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15391,7 +15391,7 @@ pub struct IISDB_NBIT_Vtbl { pub GetVersionHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IISDB_NBIT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetOriginalNetworkId(&self) -> windows_core::Result; fn GetCountOfRecords(&self) -> windows_core::Result; @@ -15404,14 +15404,14 @@ pub trait IISDB_NBIT_Impl: windows_core::IUnknownImpl { fn GetRecordKeys(&self, dwrecordindex: u32) -> windows_core::Result<*mut u8>; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetVersionHash(&self) -> windows_core::Result; } impl IISDB_NBIT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IISDB_NBIT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IISDB_NBIT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15723,7 +15723,7 @@ pub struct IISDB_SDTT_Vtbl { pub GetVersionHash: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IISDB_SDTT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetTableIdExt(&self) -> windows_core::Result; fn GetTransportStreamId(&self) -> windows_core::Result; @@ -15741,14 +15741,14 @@ pub trait IISDB_SDTT_Impl: windows_core::IUnknownImpl { fn GetRecordDurationByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetVersionHash(&self) -> windows_core::Result; } impl IISDB_SDTT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IISDB_SDTT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IISDB_SDTT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19271,14 +19271,14 @@ pub struct IMPEG2TuneRequestFactory_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMPEG2TuneRequestFactory_Impl: super::super::super::System::Com::IDispatch_Impl { - fn CreateTuneRequest(&self, tuningspace: Option<&ITuningSpace>) -> windows_core::Result; + fn CreateTuneRequest(&self, tuningspace: windows_core::Ref<'_, ITuningSpace>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMPEG2TuneRequestFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateTuneRequest(this: *mut core::ffi::c_void, tuningspace: *mut core::ffi::c_void, tunerequest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMPEG2TuneRequestFactory_Impl::CreateTuneRequest(this, windows_core::from_raw_borrowed(&tuningspace)) { + match IMPEG2TuneRequestFactory_Impl::CreateTuneRequest(this, core::mem::transmute_copy(&tuningspace)) { Ok(ok__) => { tunerequest.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19347,7 +19347,7 @@ pub struct IMPEG2_TIF_CONTROL_Vtbl { pub GetPIDs: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut u32) -> windows_core::HRESULT, } pub trait IMPEG2_TIF_CONTROL_Impl: windows_core::IUnknownImpl { - fn RegisterTIF(&self, punktif: Option<&windows_core::IUnknown>, ppvregistrationcontext: *mut u32) -> windows_core::Result<()>; + fn RegisterTIF(&self, punktif: windows_core::Ref<'_, windows_core::IUnknown>, ppvregistrationcontext: *mut u32) -> windows_core::Result<()>; fn UnregisterTIF(&self, pvregistrationcontext: u32) -> windows_core::Result<()>; fn AddPIDs(&self, ulcpids: u32, pulpids: *const u32) -> windows_core::Result<()>; fn DeletePIDs(&self, ulcpids: u32, pulpids: *const u32) -> windows_core::Result<()>; @@ -19358,7 +19358,7 @@ impl IMPEG2_TIF_CONTROL_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterTIF(this: *mut core::ffi::c_void, punktif: *mut core::ffi::c_void, ppvregistrationcontext: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMPEG2_TIF_CONTROL_Impl::RegisterTIF(this, windows_core::from_raw_borrowed(&punktif), core::mem::transmute_copy(&ppvregistrationcontext)).into() + IMPEG2_TIF_CONTROL_Impl::RegisterTIF(this, core::mem::transmute_copy(&punktif), core::mem::transmute_copy(&ppvregistrationcontext)).into() } unsafe extern "system" fn UnregisterTIF(this: *mut core::ffi::c_void, pvregistrationcontext: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19434,7 +19434,7 @@ pub struct IMSEventBinder_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMSEventBinder_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Bind(&self, peventobject: Option<&super::super::super::System::Com::IDispatch>, eventname: &windows_core::BSTR, eventhandler: &windows_core::BSTR) -> windows_core::Result; + fn Bind(&self, peventobject: windows_core::Ref<'_, super::super::super::System::Com::IDispatch>, eventname: &windows_core::BSTR, eventhandler: &windows_core::BSTR) -> windows_core::Result; fn Unbind(&self, cancelcookie: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -19442,7 +19442,7 @@ impl IMSEventBinder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Bind(this: *mut core::ffi::c_void, peventobject: *mut core::ffi::c_void, eventname: *mut core::ffi::c_void, eventhandler: *mut core::ffi::c_void, cancelid: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMSEventBinder_Impl::Bind(this, windows_core::from_raw_borrowed(&peventobject), core::mem::transmute(&eventname), core::mem::transmute(&eventhandler)) { + match IMSEventBinder_Impl::Bind(this, core::mem::transmute_copy(&peventobject), core::mem::transmute(&eventname), core::mem::transmute(&eventhandler)) { Ok(ok__) => { cancelid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19899,7 +19899,7 @@ pub trait IMSVidAudioRendererDevices_Impl: super::super::super::System::Com::IDi fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; fn get_Item(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn Add(&self, pdb: Option<&IMSVidAudioRenderer>) -> windows_core::Result<()>; + fn Add(&self, pdb: windows_core::Ref<'_, IMSVidAudioRenderer>) -> windows_core::Result<()>; fn Remove(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -19937,7 +19937,7 @@ impl IMSVidAudioRendererDevices_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pdb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidAudioRendererDevices_Impl::Add(this, windows_core::from_raw_borrowed(&pdb)).into() + IMSVidAudioRendererDevices_Impl::Add(this, core::mem::transmute_copy(&pdb)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, v: super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20306,7 +20306,7 @@ pub struct IMSVidCompositionSegment_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IMSVidCompositionSegment_Impl: IMSVidGraphSegment_Impl { - fn Compose(&self, upstream: Option<&IMSVidGraphSegment>, downstream: Option<&IMSVidGraphSegment>) -> windows_core::Result<()>; + fn Compose(&self, upstream: windows_core::Ref<'_, IMSVidGraphSegment>, downstream: windows_core::Ref<'_, IMSVidGraphSegment>) -> windows_core::Result<()>; fn Up(&self) -> windows_core::Result; fn Down(&self) -> windows_core::Result; } @@ -20315,7 +20315,7 @@ impl IMSVidCompositionSegment_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Compose(this: *mut core::ffi::c_void, upstream: *mut core::ffi::c_void, downstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidCompositionSegment_Impl::Compose(this, windows_core::from_raw_borrowed(&upstream), windows_core::from_raw_borrowed(&downstream)).into() + IMSVidCompositionSegment_Impl::Compose(this, core::mem::transmute_copy(&upstream), core::mem::transmute_copy(&downstream)).into() } unsafe extern "system" fn Up(this: *mut core::ffi::c_void, upstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20611,15 +20611,15 @@ pub trait IMSVidCtl_Impl: super::super::super::System::Com::IDispatch_Impl { fn AudioRenderersAvailable(&self) -> windows_core::Result; fn FeaturesAvailable(&self) -> windows_core::Result; fn InputActive(&self) -> windows_core::Result; - fn SetInputActive(&self, pval: Option<&IMSVidInputDevice>) -> windows_core::Result<()>; + fn SetInputActive(&self, pval: windows_core::Ref<'_, IMSVidInputDevice>) -> windows_core::Result<()>; fn OutputsActive(&self) -> windows_core::Result; - fn SetOutputsActive(&self, pval: Option<&IMSVidOutputDevices>) -> windows_core::Result<()>; + fn SetOutputsActive(&self, pval: windows_core::Ref<'_, IMSVidOutputDevices>) -> windows_core::Result<()>; fn VideoRendererActive(&self) -> windows_core::Result; - fn SetVideoRendererActive(&self, pval: Option<&IMSVidVideoRenderer>) -> windows_core::Result<()>; + fn SetVideoRendererActive(&self, pval: windows_core::Ref<'_, IMSVidVideoRenderer>) -> windows_core::Result<()>; fn AudioRendererActive(&self) -> windows_core::Result; - fn SetAudioRendererActive(&self, pval: Option<&IMSVidAudioRenderer>) -> windows_core::Result<()>; + fn SetAudioRendererActive(&self, pval: windows_core::Ref<'_, IMSVidAudioRenderer>) -> windows_core::Result<()>; fn FeaturesActive(&self) -> windows_core::Result; - fn SetFeaturesActive(&self, pval: Option<&IMSVidFeatures>) -> windows_core::Result<()>; + fn SetFeaturesActive(&self, pval: windows_core::Ref<'_, IMSVidFeatures>) -> windows_core::Result<()>; fn State(&self) -> windows_core::Result; fn View(&self, v: *const super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn Build(&self) -> windows_core::Result<()>; @@ -20828,7 +20828,7 @@ impl IMSVidCtl_Vtbl { } unsafe extern "system" fn SetInputActive(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidCtl_Impl::SetInputActive(this, windows_core::from_raw_borrowed(&pval)).into() + IMSVidCtl_Impl::SetInputActive(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn OutputsActive(this: *mut core::ffi::c_void, pval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20842,7 +20842,7 @@ impl IMSVidCtl_Vtbl { } unsafe extern "system" fn SetOutputsActive(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidCtl_Impl::SetOutputsActive(this, windows_core::from_raw_borrowed(&pval)).into() + IMSVidCtl_Impl::SetOutputsActive(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn VideoRendererActive(this: *mut core::ffi::c_void, pval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20856,7 +20856,7 @@ impl IMSVidCtl_Vtbl { } unsafe extern "system" fn SetVideoRendererActive(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidCtl_Impl::SetVideoRendererActive(this, windows_core::from_raw_borrowed(&pval)).into() + IMSVidCtl_Impl::SetVideoRendererActive(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn AudioRendererActive(this: *mut core::ffi::c_void, pval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20870,7 +20870,7 @@ impl IMSVidCtl_Vtbl { } unsafe extern "system" fn SetAudioRendererActive(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidCtl_Impl::SetAudioRendererActive(this, windows_core::from_raw_borrowed(&pval)).into() + IMSVidCtl_Impl::SetAudioRendererActive(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn FeaturesActive(this: *mut core::ffi::c_void, pval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20884,7 +20884,7 @@ impl IMSVidCtl_Vtbl { } unsafe extern "system" fn SetFeaturesActive(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidCtl_Impl::SetFeaturesActive(this, windows_core::from_raw_borrowed(&pval)).into() + IMSVidCtl_Impl::SetFeaturesActive(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn State(this: *mut core::ffi::c_void, lstate: *mut MSVidCtlStateList) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21119,7 +21119,7 @@ pub trait IMSVidDevice_Impl: super::super::super::System::Com::IDispatch_Impl { fn ClassID(&self) -> windows_core::Result; fn _Category(&self) -> windows_core::Result; fn _ClassID(&self) -> windows_core::Result; - fn IsEqualDevice(&self, device: Option<&IMSVidDevice>) -> windows_core::Result; + fn IsEqualDevice(&self, device: windows_core::Ref<'_, IMSVidDevice>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMSVidDevice_Vtbl { @@ -21200,7 +21200,7 @@ impl IMSVidDevice_Vtbl { } unsafe extern "system" fn IsEqualDevice(this: *mut core::ffi::c_void, device: *mut core::ffi::c_void, isequal: *mut super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMSVidDevice_Impl::IsEqualDevice(this, windows_core::from_raw_borrowed(&device)) { + match IMSVidDevice_Impl::IsEqualDevice(this, core::mem::transmute_copy(&device)) { Ok(ok__) => { isequal.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -21290,14 +21290,14 @@ pub struct IMSVidDeviceEvent_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMSVidDeviceEvent_Impl: super::super::super::System::Com::IDispatch_Impl { - fn StateChange(&self, lpd: Option<&IMSVidDevice>, oldstate: i32, newstate: i32) -> windows_core::Result<()>; + fn StateChange(&self, lpd: windows_core::Ref<'_, IMSVidDevice>, oldstate: i32, newstate: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMSVidDeviceEvent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StateChange(this: *mut core::ffi::c_void, lpd: *mut core::ffi::c_void, oldstate: i32, newstate: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidDeviceEvent_Impl::StateChange(this, windows_core::from_raw_borrowed(&lpd), core::mem::transmute_copy(&oldstate), core::mem::transmute_copy(&newstate)).into() + IMSVidDeviceEvent_Impl::StateChange(this, core::mem::transmute_copy(&lpd), core::mem::transmute_copy(&oldstate), core::mem::transmute_copy(&newstate)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), StateChange: StateChange:: } } @@ -21358,7 +21358,7 @@ pub struct IMSVidEVR_Vtbl { #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi", feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMSVidEVR_Impl: IMSVidVideoRenderer_Impl { fn Presenter(&self) -> windows_core::Result; - fn SetPresenter(&self, pallocpresent: Option<&super::super::MediaFoundation::IMFVideoPresenter>) -> windows_core::Result<()>; + fn SetPresenter(&self, pallocpresent: windows_core::Ref<'_, super::super::MediaFoundation::IMFVideoPresenter>) -> windows_core::Result<()>; fn SetSuppressEffects(&self, bsuppress: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SuppressEffects(&self) -> windows_core::Result; } @@ -21377,7 +21377,7 @@ impl IMSVidEVR_Vtbl { } unsafe extern "system" fn SetPresenter(this: *mut core::ffi::c_void, pallocpresent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidEVR_Impl::SetPresenter(this, windows_core::from_raw_borrowed(&pallocpresent)).into() + IMSVidEVR_Impl::SetPresenter(this, core::mem::transmute_copy(&pallocpresent)).into() } unsafe extern "system" fn SetSuppressEffects(this: *mut core::ffi::c_void, bsuppress: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21638,7 +21638,7 @@ pub trait IMSVidFeatures_Impl: super::super::super::System::Com::IDispatch_Impl fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; fn get_Item(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn Add(&self, pdb: Option<&IMSVidFeature>) -> windows_core::Result<()>; + fn Add(&self, pdb: windows_core::Ref<'_, IMSVidFeature>) -> windows_core::Result<()>; fn Remove(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -21676,7 +21676,7 @@ impl IMSVidFeatures_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pdb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidFeatures_Impl::Add(this, windows_core::from_raw_borrowed(&pdb)).into() + IMSVidFeatures_Impl::Add(this, core::mem::transmute_copy(&pdb)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, v: super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22059,10 +22059,10 @@ pub struct IMSVidGraphSegment_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IMSVidGraphSegment_Impl: super::super::super::System::Com::IPersist_Impl { fn Init(&self) -> windows_core::Result; - fn SetInit(&self, pinit: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetInit(&self, pinit: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumFilters(&self) -> windows_core::Result; fn Container(&self) -> windows_core::Result; - fn SetContainer(&self, pctl: Option<&IMSVidGraphSegmentContainer>) -> windows_core::Result<()>; + fn SetContainer(&self, pctl: windows_core::Ref<'_, IMSVidGraphSegmentContainer>) -> windows_core::Result<()>; fn Type(&self) -> windows_core::Result; fn Category(&self) -> windows_core::Result; fn Build(&self) -> windows_core::Result<()>; @@ -22089,7 +22089,7 @@ impl IMSVidGraphSegment_Vtbl { } unsafe extern "system" fn SetInit(this: *mut core::ffi::c_void, pinit: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidGraphSegment_Impl::SetInit(this, windows_core::from_raw_borrowed(&pinit)).into() + IMSVidGraphSegment_Impl::SetInit(this, core::mem::transmute_copy(&pinit)).into() } unsafe extern "system" fn EnumFilters(this: *mut core::ffi::c_void, pnewenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22113,7 +22113,7 @@ impl IMSVidGraphSegment_Vtbl { } unsafe extern "system" fn SetContainer(this: *mut core::ffi::c_void, pctl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidGraphSegment_Impl::SetContainer(this, windows_core::from_raw_borrowed(&pctl)).into() + IMSVidGraphSegment_Impl::SetContainer(this, core::mem::transmute_copy(&pctl)).into() } unsafe extern "system" fn Type(this: *mut core::ffi::c_void, ptype: *mut MSVidSegmentType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22281,7 +22281,7 @@ pub trait IMSVidGraphSegmentContainer_Impl: windows_core::IUnknownImpl { fn Features(&self) -> windows_core::Result; fn Composites(&self) -> windows_core::Result; fn ParentContainer(&self) -> windows_core::Result; - fn Decompose(&self, psegment: Option<&IMSVidGraphSegment>) -> windows_core::Result<()>; + fn Decompose(&self, psegment: windows_core::Ref<'_, IMSVidGraphSegment>) -> windows_core::Result<()>; fn IsWindowless(&self) -> windows_core::Result<()>; fn GetFocus(&self) -> windows_core::Result<()>; } @@ -22370,7 +22370,7 @@ impl IMSVidGraphSegmentContainer_Vtbl { } unsafe extern "system" fn Decompose(this: *mut core::ffi::c_void, psegment: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidGraphSegmentContainer_Impl::Decompose(this, windows_core::from_raw_borrowed(&psegment)).into() + IMSVidGraphSegmentContainer_Impl::Decompose(this, core::mem::transmute_copy(&psegment)).into() } unsafe extern "system" fn IsWindowless(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22659,7 +22659,7 @@ pub trait IMSVidInputDevices_Impl: super::super::super::System::Com::IDispatch_I fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; fn get_Item(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn Add(&self, pdb: Option<&IMSVidInputDevice>) -> windows_core::Result<()>; + fn Add(&self, pdb: windows_core::Ref<'_, IMSVidInputDevice>) -> windows_core::Result<()>; fn Remove(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -22697,7 +22697,7 @@ impl IMSVidInputDevices_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pdb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidInputDevices_Impl::Add(this, windows_core::from_raw_borrowed(&pdb)).into() + IMSVidInputDevices_Impl::Add(this, core::mem::transmute_copy(&pdb)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, v: super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22838,7 +22838,7 @@ pub trait IMSVidOutputDevices_Impl: super::super::super::System::Com::IDispatch_ fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; fn get_Item(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn Add(&self, pdb: Option<&IMSVidOutputDevice>) -> windows_core::Result<()>; + fn Add(&self, pdb: windows_core::Ref<'_, IMSVidOutputDevice>) -> windows_core::Result<()>; fn Remove(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -22876,7 +22876,7 @@ impl IMSVidOutputDevices_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pdb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidOutputDevices_Impl::Add(this, windows_core::from_raw_borrowed(&pdb)).into() + IMSVidOutputDevices_Impl::Add(this, core::mem::transmute_copy(&pdb)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, v: super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -23142,14 +23142,14 @@ pub struct IMSVidPlaybackEvent_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMSVidPlaybackEvent_Impl: IMSVidInputDeviceEvent_Impl { - fn EndOfMedia(&self, lpd: Option<&IMSVidPlayback>) -> windows_core::Result<()>; + fn EndOfMedia(&self, lpd: windows_core::Ref<'_, IMSVidPlayback>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMSVidPlaybackEvent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EndOfMedia(this: *mut core::ffi::c_void, lpd: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidPlaybackEvent_Impl::EndOfMedia(this, windows_core::from_raw_borrowed(&lpd)).into() + IMSVidPlaybackEvent_Impl::EndOfMedia(this, core::mem::transmute_copy(&lpd)).into() } Self { base__: IMSVidInputDeviceEvent_Vtbl::new::(), EndOfMedia: EndOfMedia:: } } @@ -23242,7 +23242,7 @@ pub trait IMSVidRect_Impl: super::super::super::System::Com::IDispatch_Impl { fn SetHeight(&self, heightval: i32) -> windows_core::Result<()>; fn HWnd(&self) -> windows_core::Result; fn SetHWnd(&self, hwndval: super::super::super::Foundation::HWND) -> windows_core::Result<()>; - fn SetRect(&self, rectval: Option<&IMSVidRect>) -> windows_core::Result<()>; + fn SetRect(&self, rectval: windows_core::Ref<'_, IMSVidRect>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMSVidRect_Vtbl { @@ -23319,7 +23319,7 @@ impl IMSVidRect_Vtbl { } unsafe extern "system" fn SetRect(this: *mut core::ffi::c_void, rectval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidRect_Impl::SetRect(this, windows_core::from_raw_borrowed(&rectval)).into() + IMSVidRect_Impl::SetRect(this, core::mem::transmute_copy(&rectval)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -24829,9 +24829,9 @@ pub struct IMSVidTuner_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMSVidTuner_Impl: IMSVidVideoInputDevice_Impl { fn Tune(&self) -> windows_core::Result; - fn SetTune(&self, ptr: Option<&ITuneRequest>) -> windows_core::Result<()>; + fn SetTune(&self, ptr: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result<()>; fn TuningSpace(&self) -> windows_core::Result; - fn SetTuningSpace(&self, plts: Option<&ITuningSpace>) -> windows_core::Result<()>; + fn SetTuningSpace(&self, plts: windows_core::Ref<'_, ITuningSpace>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMSVidTuner_Vtbl { @@ -24848,7 +24848,7 @@ impl IMSVidTuner_Vtbl { } unsafe extern "system" fn SetTune(this: *mut core::ffi::c_void, ptr: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidTuner_Impl::SetTune(this, windows_core::from_raw_borrowed(&ptr)).into() + IMSVidTuner_Impl::SetTune(this, core::mem::transmute_copy(&ptr)).into() } unsafe extern "system" fn TuningSpace(this: *mut core::ffi::c_void, plts: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24862,7 +24862,7 @@ impl IMSVidTuner_Vtbl { } unsafe extern "system" fn SetTuningSpace(this: *mut core::ffi::c_void, plts: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidTuner_Impl::SetTuningSpace(this, windows_core::from_raw_borrowed(&plts)).into() + IMSVidTuner_Impl::SetTuningSpace(this, core::mem::transmute_copy(&plts)).into() } Self { base__: IMSVidVideoInputDevice_Vtbl::new::(), @@ -24906,14 +24906,14 @@ pub struct IMSVidTunerEvent_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMSVidTunerEvent_Impl: IMSVidInputDeviceEvent_Impl { - fn TuneChanged(&self, lpd: Option<&IMSVidTuner>) -> windows_core::Result<()>; + fn TuneChanged(&self, lpd: windows_core::Ref<'_, IMSVidTuner>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMSVidTunerEvent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TuneChanged(this: *mut core::ffi::c_void, lpd: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidTunerEvent_Impl::TuneChanged(this, windows_core::from_raw_borrowed(&lpd)).into() + IMSVidTunerEvent_Impl::TuneChanged(this, core::mem::transmute_copy(&lpd)).into() } Self { base__: IMSVidInputDeviceEvent_Vtbl::new::(), TuneChanged: TuneChanged:: } } @@ -24971,7 +24971,7 @@ pub struct IMSVidVMR9_Vtbl { #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMSVidVMR9_Impl: IMSVidVideoRenderer_Impl { fn Allocator_ID(&self) -> windows_core::Result; - fn SetAllocator(&self, allocpresent: Option<&windows_core::IUnknown>, id: i32) -> windows_core::Result<()>; + fn SetAllocator(&self, allocpresent: windows_core::Ref<'_, windows_core::IUnknown>, id: i32) -> windows_core::Result<()>; fn SetSuppressEffects(&self, bsuppress: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SuppressEffects(&self) -> windows_core::Result; fn Allocator(&self) -> windows_core::Result; @@ -24991,7 +24991,7 @@ impl IMSVidVMR9_Vtbl { } unsafe extern "system" fn SetAllocator(this: *mut core::ffi::c_void, allocpresent: *mut core::ffi::c_void, id: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidVMR9_Impl::SetAllocator(this, windows_core::from_raw_borrowed(&allocpresent), core::mem::transmute_copy(&id)).into() + IMSVidVMR9_Impl::SetAllocator(this, core::mem::transmute_copy(&allocpresent), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn SetSuppressEffects(this: *mut core::ffi::c_void, bsuppress: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25565,16 +25565,16 @@ pub trait IMSVidVideoRenderer_Impl: IMSVidOutputDevice_Impl { fn _CustomCompositorClass(&self) -> windows_core::Result; fn Set_CustomCompositorClass(&self, compositorclsid: *const windows_core::GUID) -> windows_core::Result<()>; fn _CustomCompositor(&self) -> windows_core::Result; - fn Set_CustomCompositor(&self, compositor: Option<&super::IVMRImageCompositor>) -> windows_core::Result<()>; + fn Set_CustomCompositor(&self, compositor: windows_core::Ref<'_, super::IVMRImageCompositor>) -> windows_core::Result<()>; fn MixerBitmap(&self) -> windows_core::Result; fn _MixerBitmap(&self) -> windows_core::Result; - fn SetMixerBitmap(&self, mixerpicturedisp: Option<&super::super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn SetMixerBitmap(&self, mixerpicturedisp: windows_core::Ref<'_, super::super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; fn Set_MixerBitmap(&self, mixerpicture: *const super::VMRALPHABITMAP) -> windows_core::Result<()>; fn MixerBitmapPositionRect(&self) -> windows_core::Result; - fn SetMixerBitmapPositionRect(&self, rdest: Option<&IMSVidRect>) -> windows_core::Result<()>; + fn SetMixerBitmapPositionRect(&self, rdest: windows_core::Ref<'_, IMSVidRect>) -> windows_core::Result<()>; fn MixerBitmapOpacity(&self) -> windows_core::Result; fn SetMixerBitmapOpacity(&self, opacity: i32) -> windows_core::Result<()>; - fn SetupMixerBitmap(&self, mixerpicturedisp: Option<&super::super::super::System::Ole::IPictureDisp>, opacity: i32, rdest: Option<&IMSVidRect>) -> windows_core::Result<()>; + fn SetupMixerBitmap(&self, mixerpicturedisp: windows_core::Ref<'_, super::super::super::System::Ole::IPictureDisp>, opacity: i32, rdest: windows_core::Ref<'_, IMSVidRect>) -> windows_core::Result<()>; fn SourceSize(&self) -> windows_core::Result; fn SetSourceSize(&self, newsize: SourceSizeList) -> windows_core::Result<()>; fn OverScan(&self) -> windows_core::Result; @@ -25583,7 +25583,7 @@ pub trait IMSVidVideoRenderer_Impl: IMSVidOutputDevice_Impl { fn MaxVidRect(&self) -> windows_core::Result; fn MinVidRect(&self) -> windows_core::Result; fn ClippedSourceRect(&self) -> windows_core::Result; - fn SetClippedSourceRect(&self, prect: Option<&IMSVidRect>) -> windows_core::Result<()>; + fn SetClippedSourceRect(&self, prect: windows_core::Ref<'_, IMSVidRect>) -> windows_core::Result<()>; fn UsingOverlay(&self) -> windows_core::Result; fn SetUsingOverlay(&self, useoverlayval: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn Capture(&self) -> windows_core::Result; @@ -25634,7 +25634,7 @@ impl IMSVidVideoRenderer_Vtbl { } unsafe extern "system" fn Set_CustomCompositor(this: *mut core::ffi::c_void, compositor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidVideoRenderer_Impl::Set_CustomCompositor(this, windows_core::from_raw_borrowed(&compositor)).into() + IMSVidVideoRenderer_Impl::Set_CustomCompositor(this, core::mem::transmute_copy(&compositor)).into() } unsafe extern "system" fn MixerBitmap(this: *mut core::ffi::c_void, mixerpicturedisp: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25658,7 +25658,7 @@ impl IMSVidVideoRenderer_Vtbl { } unsafe extern "system" fn SetMixerBitmap(this: *mut core::ffi::c_void, mixerpicturedisp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidVideoRenderer_Impl::SetMixerBitmap(this, windows_core::from_raw_borrowed(&mixerpicturedisp)).into() + IMSVidVideoRenderer_Impl::SetMixerBitmap(this, core::mem::transmute_copy(&mixerpicturedisp)).into() } unsafe extern "system" fn Set_MixerBitmap(this: *mut core::ffi::c_void, mixerpicture: *const super::VMRALPHABITMAP) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25676,7 +25676,7 @@ impl IMSVidVideoRenderer_Vtbl { } unsafe extern "system" fn SetMixerBitmapPositionRect(this: *mut core::ffi::c_void, rdest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidVideoRenderer_Impl::SetMixerBitmapPositionRect(this, windows_core::from_raw_borrowed(&rdest)).into() + IMSVidVideoRenderer_Impl::SetMixerBitmapPositionRect(this, core::mem::transmute_copy(&rdest)).into() } unsafe extern "system" fn MixerBitmapOpacity(this: *mut core::ffi::c_void, opacity: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25694,7 +25694,7 @@ impl IMSVidVideoRenderer_Vtbl { } unsafe extern "system" fn SetupMixerBitmap(this: *mut core::ffi::c_void, mixerpicturedisp: *mut core::ffi::c_void, opacity: i32, rdest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidVideoRenderer_Impl::SetupMixerBitmap(this, windows_core::from_raw_borrowed(&mixerpicturedisp), core::mem::transmute_copy(&opacity), windows_core::from_raw_borrowed(&rdest)).into() + IMSVidVideoRenderer_Impl::SetupMixerBitmap(this, core::mem::transmute_copy(&mixerpicturedisp), core::mem::transmute_copy(&opacity), core::mem::transmute_copy(&rdest)).into() } unsafe extern "system" fn SourceSize(this: *mut core::ffi::c_void, currentsize: *mut SourceSizeList) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25766,7 +25766,7 @@ impl IMSVidVideoRenderer_Vtbl { } unsafe extern "system" fn SetClippedSourceRect(this: *mut core::ffi::c_void, prect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidVideoRenderer_Impl::SetClippedSourceRect(this, windows_core::from_raw_borrowed(&prect)).into() + IMSVidVideoRenderer_Impl::SetClippedSourceRect(this, core::mem::transmute_copy(&prect)).into() } unsafe extern "system" fn UsingOverlay(this: *mut core::ffi::c_void, useoverlayval: *mut super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25918,8 +25918,8 @@ pub trait IMSVidVideoRenderer2_Impl: IMSVidVideoRenderer_Impl { fn Allocator(&self) -> windows_core::Result; fn _Allocator(&self) -> windows_core::Result; fn Allocator_ID(&self) -> windows_core::Result; - fn SetAllocator(&self, allocpresent: Option<&windows_core::IUnknown>, id: i32) -> windows_core::Result<()>; - fn _SetAllocator2(&self, allocpresent: Option<&super::IVMRSurfaceAllocator>, id: i32) -> windows_core::Result<()>; + fn SetAllocator(&self, allocpresent: windows_core::Ref<'_, windows_core::IUnknown>, id: i32) -> windows_core::Result<()>; + fn _SetAllocator2(&self, allocpresent: windows_core::Ref<'_, super::IVMRSurfaceAllocator>, id: i32) -> windows_core::Result<()>; fn SetSuppressEffects(&self, bsuppress: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SuppressEffects(&self) -> windows_core::Result; } @@ -25958,11 +25958,11 @@ impl IMSVidVideoRenderer2_Vtbl { } unsafe extern "system" fn SetAllocator(this: *mut core::ffi::c_void, allocpresent: *mut core::ffi::c_void, id: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidVideoRenderer2_Impl::SetAllocator(this, windows_core::from_raw_borrowed(&allocpresent), core::mem::transmute_copy(&id)).into() + IMSVidVideoRenderer2_Impl::SetAllocator(this, core::mem::transmute_copy(&allocpresent), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn _SetAllocator2(this: *mut core::ffi::c_void, allocpresent: *mut core::ffi::c_void, id: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidVideoRenderer2_Impl::_SetAllocator2(this, windows_core::from_raw_borrowed(&allocpresent), core::mem::transmute_copy(&id)).into() + IMSVidVideoRenderer2_Impl::_SetAllocator2(this, core::mem::transmute_copy(&allocpresent), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn SetSuppressEffects(this: *mut core::ffi::c_void, bsuppress: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -26057,7 +26057,7 @@ pub trait IMSVidVideoRendererDevices_Impl: super::super::super::System::Com::IDi fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; fn get_Item(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn Add(&self, pdb: Option<&IMSVidVideoRenderer>) -> windows_core::Result<()>; + fn Add(&self, pdb: windows_core::Ref<'_, IMSVidVideoRenderer>) -> windows_core::Result<()>; fn Remove(&self, v: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -26095,7 +26095,7 @@ impl IMSVidVideoRendererDevices_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pdb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidVideoRendererDevices_Impl::Add(this, windows_core::from_raw_borrowed(&pdb)).into() + IMSVidVideoRendererDevices_Impl::Add(this, core::mem::transmute_copy(&pdb)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, v: super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -26749,7 +26749,7 @@ pub trait IMSVidWebDVD_Impl: IMSVidPlayback_Impl { fn RestorePreferredSettings(&self) -> windows_core::Result<()>; fn get_ButtonRect(&self, lbutton: i32) -> windows_core::Result; fn DVDScreenInMouseCoordinates(&self) -> windows_core::Result; - fn SetDVDScreenInMouseCoordinates(&self, prect: Option<&IMSVidRect>) -> windows_core::Result<()>; + fn SetDVDScreenInMouseCoordinates(&self, prect: windows_core::Ref<'_, IMSVidRect>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMSVidWebDVD_Vtbl { @@ -27438,7 +27438,7 @@ impl IMSVidWebDVD_Vtbl { } unsafe extern "system" fn SetDVDScreenInMouseCoordinates(this: *mut core::ffi::c_void, prect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSVidWebDVD_Impl::SetDVDScreenInMouseCoordinates(this, windows_core::from_raw_borrowed(&prect)).into() + IMSVidWebDVD_Impl::SetDVDScreenInMouseCoordinates(this, core::mem::transmute_copy(&prect)).into() } Self { base__: IMSVidPlayback_Vtbl::new::(), @@ -28304,14 +28304,14 @@ pub struct IMpeg2Stream_Vtbl { pub SupplyDataBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *const MPEG_STREAM_BUFFER) -> windows_core::HRESULT, } pub trait IMpeg2Stream_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: Option<&IMpeg2Data>, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, hdatareadyevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn Initialize(&self, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: windows_core::Ref<'_, IMpeg2Data>, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, hdatareadyevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn SupplyDataBuffer(&self, pstreambuffer: *const MPEG_STREAM_BUFFER) -> windows_core::Result<()>; } impl IMpeg2Stream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: *mut core::ffi::c_void, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, hdatareadyevent: super::super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMpeg2Stream_Impl::Initialize(this, core::mem::transmute_copy(&requesttype), windows_core::from_raw_borrowed(&pmpeg2data), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pid), core::mem::transmute_copy(&tid), core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&hdatareadyevent)).into() + IMpeg2Stream_Impl::Initialize(this, core::mem::transmute_copy(&requesttype), core::mem::transmute_copy(&pmpeg2data), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pid), core::mem::transmute_copy(&tid), core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&hdatareadyevent)).into() } unsafe extern "system" fn SupplyDataBuffer(this: *mut core::ffi::c_void, pstreambuffer: *const MPEG_STREAM_BUFFER) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28473,7 +28473,7 @@ pub struct IPAT_Vtbl { pub ConvertNextToCurrent: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPAT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetTransportStreamId(&self) -> windows_core::Result; fn GetVersionNumber(&self) -> windows_core::Result; fn GetCountOfRecords(&self) -> windows_core::Result; @@ -28489,7 +28489,7 @@ impl IPAT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPAT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IPAT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetTransportStreamId(this: *mut core::ffi::c_void, pwval: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28749,7 +28749,7 @@ pub struct IPBDASiParser_Vtbl { pub GetServices: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPBDASiParser_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetEIT(&self, dwsize: u32, pbuffer: *const u8) -> windows_core::Result; fn GetServices(&self, dwsize: u32, pbuffer: *const u8) -> windows_core::Result; } @@ -28757,7 +28757,7 @@ impl IPBDASiParser_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPBDASiParser_Impl::Initialize(this, windows_core::from_raw_borrowed(&punk)).into() + IPBDASiParser_Impl::Initialize(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn GetEIT(this: *mut core::ffi::c_void, dwsize: u32, pbuffer: *const u8, ppeit: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28863,7 +28863,7 @@ pub trait IPBDA_EIT_Impl: windows_core::IUnknownImpl { fn GetRecordDuration(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; } impl IPBDA_EIT_Vtbl { pub const fn new() -> Self { @@ -29150,19 +29150,19 @@ pub struct IPMT_Vtbl { pub ConvertNextToCurrent: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPMT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetProgramNumber(&self) -> windows_core::Result; fn GetVersionNumber(&self) -> windows_core::Result; fn GetPcrPid(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn GetCountOfRecords(&self) -> windows_core::Result; fn GetRecordStreamType(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordElementaryPid(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordCountOfDescriptors(&self, dwrecordindex: u32) -> windows_core::Result; fn GetRecordDescriptorByIndex(&self, dwrecordindex: u32, dwdescindex: u32) -> windows_core::Result; - fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn QueryServiceGatewayInfo(&self, ppdsmcclist: *mut *mut DSMCC_ELEMENT, puicount: *mut u32) -> windows_core::Result<()>; fn QueryMPEInfo(&self, ppmpelist: *mut *mut MPE_ELEMENT, puicount: *mut u32) -> windows_core::Result<()>; fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; @@ -29174,7 +29174,7 @@ impl IPMT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPMT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + IPMT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetProgramNumber(this: *mut core::ffi::c_void, pwval: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29572,14 +29572,14 @@ pub struct IPersistTuneXmlUtility2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPersistTuneXmlUtility2_Impl: IPersistTuneXmlUtility_Impl { - fn Serialize(&self, pitunerequest: Option<&ITuneRequest>) -> windows_core::Result; + fn Serialize(&self, pitunerequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IPersistTuneXmlUtility2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Serialize(this: *mut core::ffi::c_void, pitunerequest: *mut core::ffi::c_void, pstring: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPersistTuneXmlUtility2_Impl::Serialize(this, windows_core::from_raw_borrowed(&pitunerequest)) { + match IPersistTuneXmlUtility2_Impl::Serialize(this, core::mem::transmute_copy(&pitunerequest)) { Ok(ok__) => { pstring.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -29616,14 +29616,14 @@ pub struct IRegisterTuner_Vtbl { pub Unregister: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRegisterTuner_Impl: windows_core::IUnknownImpl { - fn Register(&self, ptuner: Option<&ITuner>, pgraph: Option<&super::IGraphBuilder>) -> windows_core::Result<()>; + fn Register(&self, ptuner: windows_core::Ref<'_, ITuner>, pgraph: windows_core::Ref<'_, super::IGraphBuilder>) -> windows_core::Result<()>; fn Unregister(&self) -> windows_core::Result<()>; } impl IRegisterTuner_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Register(this: *mut core::ffi::c_void, ptuner: *mut core::ffi::c_void, pgraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRegisterTuner_Impl::Register(this, windows_core::from_raw_borrowed(&ptuner), windows_core::from_raw_borrowed(&pgraph)).into() + IRegisterTuner_Impl::Register(this, core::mem::transmute_copy(&ptuner), core::mem::transmute_copy(&pgraph)).into() } unsafe extern "system" fn Unregister(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29672,7 +29672,7 @@ pub struct ISBE2Crossbar_Vtbl { pub trait ISBE2Crossbar_Impl: windows_core::IUnknownImpl { fn EnableDefaultMode(&self, defaultflags: u32) -> windows_core::Result<()>; fn GetInitialProfile(&self) -> windows_core::Result; - fn SetOutputProfile(&self, pprofile: Option<&ISBE2MediaTypeProfile>, pcoutputpins: *mut u32, ppoutputpins: *mut Option) -> windows_core::Result<()>; + fn SetOutputProfile(&self, pprofile: windows_core::Ref<'_, ISBE2MediaTypeProfile>, pcoutputpins: *mut u32, ppoutputpins: windows_core::OutRef<'_, super::IPin>) -> windows_core::Result<()>; fn EnumStreams(&self) -> windows_core::Result; } impl ISBE2Crossbar_Vtbl { @@ -29693,7 +29693,7 @@ impl ISBE2Crossbar_Vtbl { } unsafe extern "system" fn SetOutputProfile(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void, pcoutputpins: *mut u32, ppoutputpins: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISBE2Crossbar_Impl::SetOutputProfile(this, windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&pcoutputpins), core::mem::transmute_copy(&ppoutputpins)).into() + ISBE2Crossbar_Impl::SetOutputProfile(this, core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&pcoutputpins), core::mem::transmute_copy(&ppoutputpins)).into() } unsafe extern "system" fn EnumStreams(this: *mut core::ffi::c_void, ppstreams: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30205,7 +30205,7 @@ pub struct ISCTE_EAS_Vtbl { pub GetTableDescriptorByTag: unsafe extern "system" fn(*mut core::ffi::c_void, u8, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISCTE_EAS_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetSequencyNumber(&self) -> windows_core::Result; fn GetProtocolVersion(&self) -> windows_core::Result; @@ -30233,13 +30233,13 @@ pub trait ISCTE_EAS_Impl: windows_core::IUnknownImpl { fn GetExceptionService(&self, bindex: u8, pbibref: *mut u8, pwfirst: *mut u16, pwsecond: *mut u16) -> windows_core::Result<()>; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; } impl ISCTE_EAS_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISCTE_EAS_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + ISCTE_EAS_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30635,13 +30635,13 @@ pub struct ISIInbandEPGEvent_Vtbl { pub SIObjectEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait ISIInbandEPGEvent_Impl: windows_core::IUnknownImpl { - fn SIObjectEvent(&self, pidvb_eit: Option<&IDVB_EIT2>, dwtable_id: u32, dwservice_id: u32) -> windows_core::Result<()>; + fn SIObjectEvent(&self, pidvb_eit: windows_core::Ref<'_, IDVB_EIT2>, dwtable_id: u32, dwservice_id: u32) -> windows_core::Result<()>; } impl ISIInbandEPGEvent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SIObjectEvent(this: *mut core::ffi::c_void, pidvb_eit: *mut core::ffi::c_void, dwtable_id: u32, dwservice_id: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISIInbandEPGEvent_Impl::SIObjectEvent(this, windows_core::from_raw_borrowed(&pidvb_eit), core::mem::transmute_copy(&dwtable_id), core::mem::transmute_copy(&dwservice_id)).into() + ISIInbandEPGEvent_Impl::SIObjectEvent(this, core::mem::transmute_copy(&pidvb_eit), core::mem::transmute_copy(&dwtable_id), core::mem::transmute_copy(&dwservice_id)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SIObjectEvent: SIObjectEvent:: } } @@ -30892,7 +30892,7 @@ pub struct ISectionList_Vtbl { pub GetTableIdentifier: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8) -> windows_core::HRESULT, } pub trait ISectionList_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: Option<&IMpeg2Data>, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, timeout: u32, hdoneevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn Initialize(&self, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: windows_core::Ref<'_, IMpeg2Data>, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, timeout: u32, hdoneevent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn InitializeWithRawSections(&self, pmplsections: *const MPEG_PACKET_LIST) -> windows_core::Result<()>; fn CancelPendingRequest(&self) -> windows_core::Result<()>; fn GetNumberOfSections(&self) -> windows_core::Result; @@ -30904,7 +30904,7 @@ impl ISectionList_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, requesttype: MPEG_REQUEST_TYPE, pmpeg2data: *mut core::ffi::c_void, pcontext: *const MPEG_CONTEXT, pid: u16, tid: u8, pfilter: *const MPEG2_FILTER, timeout: u32, hdoneevent: super::super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISectionList_Impl::Initialize(this, core::mem::transmute_copy(&requesttype), windows_core::from_raw_borrowed(&pmpeg2data), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pid), core::mem::transmute_copy(&tid), core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&timeout), core::mem::transmute_copy(&hdoneevent)).into() + ISectionList_Impl::Initialize(this, core::mem::transmute_copy(&requesttype), core::mem::transmute_copy(&pmpeg2data), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pid), core::mem::transmute_copy(&tid), core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&timeout), core::mem::transmute_copy(&hdoneevent)).into() } unsafe extern "system" fn InitializeWithRawSections(this: *mut core::ffi::c_void, pmplsections: *const MPEG_PACKET_LIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31836,13 +31836,13 @@ pub struct IStreamBufferSource_Vtbl { pub SetStreamSink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IStreamBufferSource_Impl: windows_core::IUnknownImpl { - fn SetStreamSink(&self, pistreambuffersink: Option<&IStreamBufferSink>) -> windows_core::Result<()>; + fn SetStreamSink(&self, pistreambuffersink: windows_core::Ref<'_, IStreamBufferSink>) -> windows_core::Result<()>; } impl IStreamBufferSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetStreamSink(this: *mut core::ffi::c_void, pistreambuffersink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStreamBufferSource_Impl::SetStreamSink(this, windows_core::from_raw_borrowed(&pistreambuffersink)).into() + IStreamBufferSource_Impl::SetStreamSink(this, core::mem::transmute_copy(&pistreambuffersink)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetStreamSink: SetStreamSink:: } } @@ -31904,11 +31904,11 @@ pub struct ITSDT_Vtbl { pub ConvertNextToCurrent: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITSDT_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psectionlist: Option<&ISectionList>, pmpegdata: Option<&IMpeg2Data>) -> windows_core::Result<()>; + fn Initialize(&self, psectionlist: windows_core::Ref<'_, ISectionList>, pmpegdata: windows_core::Ref<'_, IMpeg2Data>) -> windows_core::Result<()>; fn GetVersionNumber(&self) -> windows_core::Result; fn GetCountOfTableDescriptors(&self) -> windows_core::Result; fn GetTableDescriptorByIndex(&self, dwindex: u32) -> windows_core::Result; - fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: *mut u32, ppdescriptor: windows_core::OutRef<'_, IGenericDescriptor>) -> windows_core::Result<()>; fn RegisterForNextTable(&self, hnexttableavailable: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn GetNextTable(&self) -> windows_core::Result; fn RegisterForWhenCurrent(&self, hnexttableiscurrent: super::super::super::Foundation::HANDLE) -> windows_core::Result<()>; @@ -31918,7 +31918,7 @@ impl ITSDT_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psectionlist: *mut core::ffi::c_void, pmpegdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITSDT_Impl::Initialize(this, windows_core::from_raw_borrowed(&psectionlist), windows_core::from_raw_borrowed(&pmpegdata)).into() + ITSDT_Impl::Initialize(this, core::mem::transmute_copy(&psectionlist), core::mem::transmute_copy(&pmpegdata)).into() } unsafe extern "system" fn GetVersionNumber(this: *mut core::ffi::c_void, pbval: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32046,7 +32046,7 @@ pub trait ITuneRequest_Impl: super::super::super::System::Com::IDispatch_Impl { fn Components(&self) -> windows_core::Result; fn Clone(&self) -> windows_core::Result; fn Locator(&self) -> windows_core::Result; - fn SetLocator(&self, locator: Option<&ILocator>) -> windows_core::Result<()>; + fn SetLocator(&self, locator: windows_core::Ref<'_, ILocator>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITuneRequest_Vtbl { @@ -32093,7 +32093,7 @@ impl ITuneRequest_Vtbl { } unsafe extern "system" fn SetLocator(this: *mut core::ffi::c_void, locator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuneRequest_Impl::SetLocator(this, windows_core::from_raw_borrowed(&locator)).into() + ITuneRequest_Impl::SetLocator(this, core::mem::transmute_copy(&locator)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -32201,32 +32201,32 @@ pub struct ITuneRequestInfo_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITuneRequestInfo_Impl: windows_core::IUnknownImpl { - fn GetLocatorData(&self, request: Option<&ITuneRequest>) -> windows_core::Result<()>; - fn GetComponentData(&self, currentrequest: Option<&ITuneRequest>) -> windows_core::Result<()>; - fn CreateComponentList(&self, currentrequest: Option<&ITuneRequest>) -> windows_core::Result<()>; - fn GetNextProgram(&self, currentrequest: Option<&ITuneRequest>) -> windows_core::Result; - fn GetPreviousProgram(&self, currentrequest: Option<&ITuneRequest>) -> windows_core::Result; - fn GetNextLocator(&self, currentrequest: Option<&ITuneRequest>) -> windows_core::Result; - fn GetPreviousLocator(&self, currentrequest: Option<&ITuneRequest>) -> windows_core::Result; + fn GetLocatorData(&self, request: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result<()>; + fn GetComponentData(&self, currentrequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result<()>; + fn CreateComponentList(&self, currentrequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result<()>; + fn GetNextProgram(&self, currentrequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result; + fn GetPreviousProgram(&self, currentrequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result; + fn GetNextLocator(&self, currentrequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result; + fn GetPreviousLocator(&self, currentrequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl ITuneRequestInfo_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetLocatorData(this: *mut core::ffi::c_void, request: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuneRequestInfo_Impl::GetLocatorData(this, windows_core::from_raw_borrowed(&request)).into() + ITuneRequestInfo_Impl::GetLocatorData(this, core::mem::transmute_copy(&request)).into() } unsafe extern "system" fn GetComponentData(this: *mut core::ffi::c_void, currentrequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuneRequestInfo_Impl::GetComponentData(this, windows_core::from_raw_borrowed(¤trequest)).into() + ITuneRequestInfo_Impl::GetComponentData(this, core::mem::transmute_copy(¤trequest)).into() } unsafe extern "system" fn CreateComponentList(this: *mut core::ffi::c_void, currentrequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuneRequestInfo_Impl::CreateComponentList(this, windows_core::from_raw_borrowed(¤trequest)).into() + ITuneRequestInfo_Impl::CreateComponentList(this, core::mem::transmute_copy(¤trequest)).into() } unsafe extern "system" fn GetNextProgram(this: *mut core::ffi::c_void, currentrequest: *mut core::ffi::c_void, tunerequest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITuneRequestInfo_Impl::GetNextProgram(this, windows_core::from_raw_borrowed(¤trequest)) { + match ITuneRequestInfo_Impl::GetNextProgram(this, core::mem::transmute_copy(¤trequest)) { Ok(ok__) => { tunerequest.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32236,7 +32236,7 @@ impl ITuneRequestInfo_Vtbl { } unsafe extern "system" fn GetPreviousProgram(this: *mut core::ffi::c_void, currentrequest: *mut core::ffi::c_void, tunerequest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITuneRequestInfo_Impl::GetPreviousProgram(this, windows_core::from_raw_borrowed(¤trequest)) { + match ITuneRequestInfo_Impl::GetPreviousProgram(this, core::mem::transmute_copy(¤trequest)) { Ok(ok__) => { tunerequest.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32246,7 +32246,7 @@ impl ITuneRequestInfo_Vtbl { } unsafe extern "system" fn GetNextLocator(this: *mut core::ffi::c_void, currentrequest: *mut core::ffi::c_void, tunerequest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITuneRequestInfo_Impl::GetNextLocator(this, windows_core::from_raw_borrowed(¤trequest)) { + match ITuneRequestInfo_Impl::GetNextLocator(this, core::mem::transmute_copy(¤trequest)) { Ok(ok__) => { tunerequest.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32256,7 +32256,7 @@ impl ITuneRequestInfo_Vtbl { } unsafe extern "system" fn GetPreviousLocator(this: *mut core::ffi::c_void, currentrequest: *mut core::ffi::c_void, tunerequest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITuneRequestInfo_Impl::GetPreviousLocator(this, windows_core::from_raw_borrowed(¤trequest)) { + match ITuneRequestInfo_Impl::GetPreviousLocator(this, core::mem::transmute_copy(¤trequest)) { Ok(ok__) => { tunerequest.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32309,14 +32309,14 @@ pub struct ITuneRequestInfoEx_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITuneRequestInfoEx_Impl: ITuneRequestInfo_Impl { - fn CreateComponentListEx(&self, currentrequest: Option<&ITuneRequest>) -> windows_core::Result; + fn CreateComponentListEx(&self, currentrequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl ITuneRequestInfoEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateComponentListEx(this: *mut core::ffi::c_void, currentrequest: *mut core::ffi::c_void, ppcurpmt: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITuneRequestInfoEx_Impl::CreateComponentListEx(this, windows_core::from_raw_borrowed(¤trequest)) { + match ITuneRequestInfoEx_Impl::CreateComponentListEx(this, core::mem::transmute_copy(¤trequest)) { Ok(ok__) => { ppcurpmt.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32428,13 +32428,13 @@ pub struct ITuner_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait ITuner_Impl: windows_core::IUnknownImpl { fn TuningSpace(&self) -> windows_core::Result; - fn SetTuningSpace(&self, tuningspace: Option<&ITuningSpace>) -> windows_core::Result<()>; + fn SetTuningSpace(&self, tuningspace: windows_core::Ref<'_, ITuningSpace>) -> windows_core::Result<()>; fn EnumTuningSpaces(&self) -> windows_core::Result; fn TuneRequest(&self) -> windows_core::Result; - fn SetTuneRequest(&self, tunerequest: Option<&ITuneRequest>) -> windows_core::Result<()>; - fn Validate(&self, tunerequest: Option<&ITuneRequest>) -> windows_core::Result<()>; + fn SetTuneRequest(&self, tunerequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result<()>; + fn Validate(&self, tunerequest: windows_core::Ref<'_, ITuneRequest>) -> windows_core::Result<()>; fn PreferredComponentTypes(&self) -> windows_core::Result; - fn SetPreferredComponentTypes(&self, componenttypes: Option<&IComponentTypes>) -> windows_core::Result<()>; + fn SetPreferredComponentTypes(&self, componenttypes: windows_core::Ref<'_, IComponentTypes>) -> windows_core::Result<()>; fn SignalStrength(&self) -> windows_core::Result; fn TriggerSignalEvents(&self, interval: i32) -> windows_core::Result<()>; } @@ -32453,7 +32453,7 @@ impl ITuner_Vtbl { } unsafe extern "system" fn SetTuningSpace(this: *mut core::ffi::c_void, tuningspace: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuner_Impl::SetTuningSpace(this, windows_core::from_raw_borrowed(&tuningspace)).into() + ITuner_Impl::SetTuningSpace(this, core::mem::transmute_copy(&tuningspace)).into() } unsafe extern "system" fn EnumTuningSpaces(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32477,11 +32477,11 @@ impl ITuner_Vtbl { } unsafe extern "system" fn SetTuneRequest(this: *mut core::ffi::c_void, tunerequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuner_Impl::SetTuneRequest(this, windows_core::from_raw_borrowed(&tunerequest)).into() + ITuner_Impl::SetTuneRequest(this, core::mem::transmute_copy(&tunerequest)).into() } unsafe extern "system" fn Validate(this: *mut core::ffi::c_void, tunerequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuner_Impl::Validate(this, windows_core::from_raw_borrowed(&tunerequest)).into() + ITuner_Impl::Validate(this, core::mem::transmute_copy(&tunerequest)).into() } unsafe extern "system" fn PreferredComponentTypes(this: *mut core::ffi::c_void, componenttypes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32495,7 +32495,7 @@ impl ITuner_Vtbl { } unsafe extern "system" fn SetPreferredComponentTypes(this: *mut core::ffi::c_void, componenttypes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuner_Impl::SetPreferredComponentTypes(this, windows_core::from_raw_borrowed(&componenttypes)).into() + ITuner_Impl::SetPreferredComponentTypes(this, core::mem::transmute_copy(&componenttypes)).into() } unsafe extern "system" fn SignalStrength(this: *mut core::ffi::c_void, strength: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32753,11 +32753,11 @@ pub trait ITuningSpace_Impl: super::super::super::System::Com::IDispatch_Impl { fn EnumCategoryGUIDs(&self) -> windows_core::Result; fn EnumDeviceMonikers(&self) -> windows_core::Result; fn DefaultPreferredComponentTypes(&self) -> windows_core::Result; - fn SetDefaultPreferredComponentTypes(&self, newcomponenttypes: Option<&IComponentTypes>) -> windows_core::Result<()>; + fn SetDefaultPreferredComponentTypes(&self, newcomponenttypes: windows_core::Ref<'_, IComponentTypes>) -> windows_core::Result<()>; fn FrequencyMapping(&self) -> windows_core::Result; fn SetFrequencyMapping(&self, mapping: &windows_core::BSTR) -> windows_core::Result<()>; fn DefaultLocator(&self) -> windows_core::Result; - fn SetDefaultLocator(&self, locatorval: Option<&ILocator>) -> windows_core::Result<()>; + fn SetDefaultLocator(&self, locatorval: windows_core::Ref<'_, ILocator>) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -32871,7 +32871,7 @@ impl ITuningSpace_Vtbl { } unsafe extern "system" fn SetDefaultPreferredComponentTypes(this: *mut core::ffi::c_void, newcomponenttypes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuningSpace_Impl::SetDefaultPreferredComponentTypes(this, windows_core::from_raw_borrowed(&newcomponenttypes)).into() + ITuningSpace_Impl::SetDefaultPreferredComponentTypes(this, core::mem::transmute_copy(&newcomponenttypes)).into() } unsafe extern "system" fn FrequencyMapping(this: *mut core::ffi::c_void, pmapping: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32899,7 +32899,7 @@ impl ITuningSpace_Vtbl { } unsafe extern "system" fn SetDefaultLocator(this: *mut core::ffi::c_void, locatorval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuningSpace_Impl::SetDefaultLocator(this, windows_core::from_raw_borrowed(&locatorval)).into() + ITuningSpace_Impl::SetDefaultLocator(this, core::mem::transmute_copy(&locatorval)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, newts: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33055,12 +33055,12 @@ pub trait ITuningSpaceContainer_Impl: super::super::super::System::Com::IDispatc fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; fn get_Item(&self, varindex: &super::super::super::System::Variant::VARIANT) -> windows_core::Result; - fn put_Item(&self, varindex: &super::super::super::System::Variant::VARIANT, tuningspace: Option<&ITuningSpace>) -> windows_core::Result<()>; + fn put_Item(&self, varindex: &super::super::super::System::Variant::VARIANT, tuningspace: windows_core::Ref<'_, ITuningSpace>) -> windows_core::Result<()>; fn TuningSpacesForCLSID(&self, spaceclsid: &windows_core::BSTR) -> windows_core::Result; fn _TuningSpacesForCLSID2(&self, spaceclsid: *const windows_core::GUID) -> windows_core::Result; fn TuningSpacesForName(&self, name: &windows_core::BSTR) -> windows_core::Result; - fn FindID(&self, tuningspace: Option<&ITuningSpace>) -> windows_core::Result; - fn Add(&self, tuningspace: Option<&ITuningSpace>) -> windows_core::Result; + fn FindID(&self, tuningspace: windows_core::Ref<'_, ITuningSpace>) -> windows_core::Result; + fn Add(&self, tuningspace: windows_core::Ref<'_, ITuningSpace>) -> windows_core::Result; fn EnumTuningSpaces(&self) -> windows_core::Result; fn Remove(&self, index: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn MaxCount(&self) -> windows_core::Result; @@ -33101,7 +33101,7 @@ impl ITuningSpaceContainer_Vtbl { } unsafe extern "system" fn put_Item(this: *mut core::ffi::c_void, varindex: super::super::super::System::Variant::VARIANT, tuningspace: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITuningSpaceContainer_Impl::put_Item(this, core::mem::transmute(&varindex), windows_core::from_raw_borrowed(&tuningspace)).into() + ITuningSpaceContainer_Impl::put_Item(this, core::mem::transmute(&varindex), core::mem::transmute_copy(&tuningspace)).into() } unsafe extern "system" fn TuningSpacesForCLSID(this: *mut core::ffi::c_void, spaceclsid: *mut core::ffi::c_void, newcoll: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33135,7 +33135,7 @@ impl ITuningSpaceContainer_Vtbl { } unsafe extern "system" fn FindID(this: *mut core::ffi::c_void, tuningspace: *mut core::ffi::c_void, id: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITuningSpaceContainer_Impl::FindID(this, windows_core::from_raw_borrowed(&tuningspace)) { + match ITuningSpaceContainer_Impl::FindID(this, core::mem::transmute_copy(&tuningspace)) { Ok(ok__) => { id.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -33145,7 +33145,7 @@ impl ITuningSpaceContainer_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, tuningspace: *mut core::ffi::c_void, newindex: *mut super::super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITuningSpaceContainer_Impl::Add(this, windows_core::from_raw_borrowed(&tuningspace)) { + match ITuningSpaceContainer_Impl::Add(this, core::mem::transmute_copy(&tuningspace)) { Ok(ok__) => { newindex.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Xml/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Xml/mod.rs index 1e2ddbc86a..ac40cf5a06 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Xml/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Xml/mod.rs @@ -37,24 +37,24 @@ pub struct IXMLGraphBuilder_Vtbl { } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] pub trait IXMLGraphBuilder_Impl: windows_core::IUnknownImpl { - fn BuildFromXML(&self, pgraph: Option<&super::IGraphBuilder>, pxml: Option<&super::super::super::Data::Xml::MsXml::IXMLElement>) -> windows_core::Result<()>; - fn SaveToXML(&self, pgraph: Option<&super::IGraphBuilder>, pbstrxml: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn BuildFromXMLFile(&self, pgraph: Option<&super::IGraphBuilder>, wszfilename: &windows_core::PCWSTR, wszbaseurl: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn BuildFromXML(&self, pgraph: windows_core::Ref<'_, super::IGraphBuilder>, pxml: windows_core::Ref<'_, super::super::super::Data::Xml::MsXml::IXMLElement>) -> windows_core::Result<()>; + fn SaveToXML(&self, pgraph: windows_core::Ref<'_, super::IGraphBuilder>, pbstrxml: *mut windows_core::BSTR) -> windows_core::Result<()>; + fn BuildFromXMLFile(&self, pgraph: windows_core::Ref<'_, super::IGraphBuilder>, wszfilename: &windows_core::PCWSTR, wszbaseurl: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] impl IXMLGraphBuilder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BuildFromXML(this: *mut core::ffi::c_void, pgraph: *mut core::ffi::c_void, pxml: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLGraphBuilder_Impl::BuildFromXML(this, windows_core::from_raw_borrowed(&pgraph), windows_core::from_raw_borrowed(&pxml)).into() + IXMLGraphBuilder_Impl::BuildFromXML(this, core::mem::transmute_copy(&pgraph), core::mem::transmute_copy(&pxml)).into() } unsafe extern "system" fn SaveToXML(this: *mut core::ffi::c_void, pgraph: *mut core::ffi::c_void, pbstrxml: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLGraphBuilder_Impl::SaveToXML(this, windows_core::from_raw_borrowed(&pgraph), core::mem::transmute_copy(&pbstrxml)).into() + IXMLGraphBuilder_Impl::SaveToXML(this, core::mem::transmute_copy(&pgraph), core::mem::transmute_copy(&pbstrxml)).into() } unsafe extern "system" fn BuildFromXMLFile(this: *mut core::ffi::c_void, pgraph: *mut core::ffi::c_void, wszfilename: windows_core::PCWSTR, wszbaseurl: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXMLGraphBuilder_Impl::BuildFromXMLFile(this, windows_core::from_raw_borrowed(&pgraph), core::mem::transmute(&wszfilename), core::mem::transmute(&wszbaseurl)).into() + IXMLGraphBuilder_Impl::BuildFromXMLFile(this, core::mem::transmute_copy(&pgraph), core::mem::transmute(&wszfilename), core::mem::transmute(&wszbaseurl)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs index 5fb1f4158a..5ee49334dd 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs @@ -5274,7 +5274,7 @@ pub trait IAMDevMemoryAllocator_Impl: windows_core::IUnknownImpl { fn CheckMemory(&self, pbuffer: *const u8) -> windows_core::Result<()>; fn Alloc(&self, ppbuffer: *mut *mut u8, pdwcbbuffer: *mut u32) -> windows_core::Result<()>; fn Free(&self, pbuffer: *const u8) -> windows_core::Result<()>; - fn GetDevMemoryObject(&self, ppunkinnner: *mut Option, punkouter: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetDevMemoryObject(&self, ppunkinnner: windows_core::OutRef<'_, windows_core::IUnknown>, punkouter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IAMDevMemoryAllocator_Vtbl { pub const fn new() -> Self { @@ -5296,7 +5296,7 @@ impl IAMDevMemoryAllocator_Vtbl { } unsafe extern "system" fn GetDevMemoryObject(this: *mut core::ffi::c_void, ppunkinnner: *mut *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMDevMemoryAllocator_Impl::GetDevMemoryObject(this, core::mem::transmute_copy(&ppunkinnner), windows_core::from_raw_borrowed(&punkouter)).into() + IAMDevMemoryAllocator_Impl::GetDevMemoryObject(this, core::mem::transmute_copy(&ppunkinnner), core::mem::transmute_copy(&punkouter)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5502,9 +5502,9 @@ pub trait IAMDirectSound_Impl: windows_core::IUnknownImpl { fn GetDirectSoundInterface(&self) -> windows_core::Result; fn GetPrimaryBufferInterface(&self) -> windows_core::Result; fn GetSecondaryBufferInterface(&self) -> windows_core::Result; - fn ReleaseDirectSoundInterface(&self, lpds: Option<&super::Audio::DirectSound::IDirectSound>) -> windows_core::Result<()>; - fn ReleasePrimaryBufferInterface(&self, lpdsb: Option<&super::Audio::DirectSound::IDirectSoundBuffer>) -> windows_core::Result<()>; - fn ReleaseSecondaryBufferInterface(&self, lpdsb: Option<&super::Audio::DirectSound::IDirectSoundBuffer>) -> windows_core::Result<()>; + fn ReleaseDirectSoundInterface(&self, lpds: windows_core::Ref<'_, super::Audio::DirectSound::IDirectSound>) -> windows_core::Result<()>; + fn ReleasePrimaryBufferInterface(&self, lpdsb: windows_core::Ref<'_, super::Audio::DirectSound::IDirectSoundBuffer>) -> windows_core::Result<()>; + fn ReleaseSecondaryBufferInterface(&self, lpdsb: windows_core::Ref<'_, super::Audio::DirectSound::IDirectSoundBuffer>) -> windows_core::Result<()>; fn SetFocusWindow(&self, param0: super::super::Foundation::HWND, param1: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetFocusWindow(&self, param0: *mut super::super::Foundation::HWND, param1: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; } @@ -5543,15 +5543,15 @@ impl IAMDirectSound_Vtbl { } unsafe extern "system" fn ReleaseDirectSoundInterface(this: *mut core::ffi::c_void, lpds: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMDirectSound_Impl::ReleaseDirectSoundInterface(this, windows_core::from_raw_borrowed(&lpds)).into() + IAMDirectSound_Impl::ReleaseDirectSoundInterface(this, core::mem::transmute_copy(&lpds)).into() } unsafe extern "system" fn ReleasePrimaryBufferInterface(this: *mut core::ffi::c_void, lpdsb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMDirectSound_Impl::ReleasePrimaryBufferInterface(this, windows_core::from_raw_borrowed(&lpdsb)).into() + IAMDirectSound_Impl::ReleasePrimaryBufferInterface(this, core::mem::transmute_copy(&lpdsb)).into() } unsafe extern "system" fn ReleaseSecondaryBufferInterface(this: *mut core::ffi::c_void, lpdsb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMDirectSound_Impl::ReleaseSecondaryBufferInterface(this, windows_core::from_raw_borrowed(&lpdsb)).into() + IAMDirectSound_Impl::ReleaseSecondaryBufferInterface(this, core::mem::transmute_copy(&lpdsb)).into() } unsafe extern "system" fn SetFocusWindow(this: *mut core::ffi::c_void, param0: super::super::Foundation::HWND, param1: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6364,13 +6364,13 @@ pub struct IAMFilterGraphCallback_Vtbl { pub UnableToRender: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAMFilterGraphCallback_Impl: windows_core::IUnknownImpl { - fn UnableToRender(&self, ppin: Option<&IPin>) -> windows_core::Result<()>; + fn UnableToRender(&self, ppin: windows_core::Ref<'_, IPin>) -> windows_core::Result<()>; } impl IAMFilterGraphCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UnableToRender(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMFilterGraphCallback_Impl::UnableToRender(this, windows_core::from_raw_borrowed(&ppin)).into() + IAMFilterGraphCallback_Impl::UnableToRender(this, core::mem::transmute_copy(&ppin)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), UnableToRender: UnableToRender:: } } @@ -6439,19 +6439,19 @@ pub struct IAMGraphBuilderCallback_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAMGraphBuilderCallback_Impl: windows_core::IUnknownImpl { - fn SelectedFilter(&self, pmon: Option<&super::super::System::Com::IMoniker>) -> windows_core::Result<()>; - fn CreatedFilter(&self, pfil: Option<&IBaseFilter>) -> windows_core::Result<()>; + fn SelectedFilter(&self, pmon: windows_core::Ref<'_, super::super::System::Com::IMoniker>) -> windows_core::Result<()>; + fn CreatedFilter(&self, pfil: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAMGraphBuilderCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SelectedFilter(this: *mut core::ffi::c_void, pmon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMGraphBuilderCallback_Impl::SelectedFilter(this, windows_core::from_raw_borrowed(&pmon)).into() + IAMGraphBuilderCallback_Impl::SelectedFilter(this, core::mem::transmute_copy(&pmon)).into() } unsafe extern "system" fn CreatedFilter(this: *mut core::ffi::c_void, pfil: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMGraphBuilderCallback_Impl::CreatedFilter(this, windows_core::from_raw_borrowed(&pfil)).into() + IAMGraphBuilderCallback_Impl::CreatedFilter(this, core::mem::transmute_copy(&pfil)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6489,7 +6489,7 @@ pub struct IAMGraphStreams_Vtbl { pub SetMaxGraphLatency: unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT, } pub trait IAMGraphStreams_Impl: windows_core::IUnknownImpl { - fn FindUpstreamInterface(&self, ppin: Option<&IPin>, riid: *const windows_core::GUID, ppvinterface: *mut *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()>; + fn FindUpstreamInterface(&self, ppin: windows_core::Ref<'_, IPin>, riid: *const windows_core::GUID, ppvinterface: *mut *mut core::ffi::c_void, dwflags: u32) -> windows_core::Result<()>; fn SyncUsingStreamOffset(&self, busestreamoffset: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetMaxGraphLatency(&self, rtmaxgraphlatency: i64) -> windows_core::Result<()>; } @@ -6497,7 +6497,7 @@ impl IAMGraphStreams_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FindUpstreamInterface(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvinterface: *mut *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMGraphStreams_Impl::FindUpstreamInterface(this, windows_core::from_raw_borrowed(&ppin), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvinterface), core::mem::transmute_copy(&dwflags)).into() + IAMGraphStreams_Impl::FindUpstreamInterface(this, core::mem::transmute_copy(&ppin), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvinterface), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn SyncUsingStreamOffset(this: *mut core::ffi::c_void, busestreamoffset: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6998,18 +6998,18 @@ pub struct IAMMediaStream_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAMMediaStream_Impl: IMediaStream_Impl { - fn Initialize(&self, psourceobject: Option<&windows_core::IUnknown>, dwflags: u32, purposeid: *const windows_core::GUID, streamtype: STREAM_TYPE) -> windows_core::Result<()>; + fn Initialize(&self, psourceobject: windows_core::Ref<'_, windows_core::IUnknown>, dwflags: u32, purposeid: *const windows_core::GUID, streamtype: STREAM_TYPE) -> windows_core::Result<()>; fn SetState(&self, state: FILTER_STATE) -> windows_core::Result<()>; - fn JoinAMMultiMediaStream(&self, pammultimediastream: Option<&IAMMultiMediaStream>) -> windows_core::Result<()>; - fn JoinFilter(&self, pmediastreamfilter: Option<&IMediaStreamFilter>) -> windows_core::Result<()>; - fn JoinFilterGraph(&self, pfiltergraph: Option<&IFilterGraph>) -> windows_core::Result<()>; + fn JoinAMMultiMediaStream(&self, pammultimediastream: windows_core::Ref<'_, IAMMultiMediaStream>) -> windows_core::Result<()>; + fn JoinFilter(&self, pmediastreamfilter: windows_core::Ref<'_, IMediaStreamFilter>) -> windows_core::Result<()>; + fn JoinFilterGraph(&self, pfiltergraph: windows_core::Ref<'_, IFilterGraph>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAMMediaStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psourceobject: *mut core::ffi::c_void, dwflags: u32, purposeid: *const windows_core::GUID, streamtype: STREAM_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMMediaStream_Impl::Initialize(this, windows_core::from_raw_borrowed(&psourceobject), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&purposeid), core::mem::transmute_copy(&streamtype)).into() + IAMMediaStream_Impl::Initialize(this, core::mem::transmute_copy(&psourceobject), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&purposeid), core::mem::transmute_copy(&streamtype)).into() } unsafe extern "system" fn SetState(this: *mut core::ffi::c_void, state: FILTER_STATE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7017,15 +7017,15 @@ impl IAMMediaStream_Vtbl { } unsafe extern "system" fn JoinAMMultiMediaStream(this: *mut core::ffi::c_void, pammultimediastream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMMediaStream_Impl::JoinAMMultiMediaStream(this, windows_core::from_raw_borrowed(&pammultimediastream)).into() + IAMMediaStream_Impl::JoinAMMultiMediaStream(this, core::mem::transmute_copy(&pammultimediastream)).into() } unsafe extern "system" fn JoinFilter(this: *mut core::ffi::c_void, pmediastreamfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMMediaStream_Impl::JoinFilter(this, windows_core::from_raw_borrowed(&pmediastreamfilter)).into() + IAMMediaStream_Impl::JoinFilter(this, core::mem::transmute_copy(&pmediastreamfilter)).into() } unsafe extern "system" fn JoinFilterGraph(this: *mut core::ffi::c_void, pfiltergraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMMediaStream_Impl::JoinFilterGraph(this, windows_core::from_raw_borrowed(&pfiltergraph)).into() + IAMMediaStream_Impl::JoinFilterGraph(this, core::mem::transmute_copy(&pfiltergraph)).into() } Self { base__: IMediaStream_Vtbl::new::(), @@ -7315,7 +7315,7 @@ pub struct IAMMediaTypeStream_Vtbl { pub trait IAMMediaTypeStream_Impl: IMediaStream_Impl { fn GetFormat(&self, pmediatype: *mut super::MediaFoundation::AM_MEDIA_TYPE, dwflags: u32) -> windows_core::Result<()>; fn SetFormat(&self, pmediatype: *const super::MediaFoundation::AM_MEDIA_TYPE, dwflags: u32) -> windows_core::Result<()>; - fn CreateSample(&self, lsamplesize: i32, pbbuffer: *const u8, dwflags: u32, punkouter: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateSample(&self, lsamplesize: i32, pbbuffer: *const u8, dwflags: u32, punkouter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn GetStreamAllocatorRequirements(&self) -> windows_core::Result; fn SetStreamAllocatorRequirements(&self, pprops: *const ALLOCATOR_PROPERTIES) -> windows_core::Result<()>; } @@ -7332,7 +7332,7 @@ impl IAMMediaTypeStream_Vtbl { } unsafe extern "system" fn CreateSample(this: *mut core::ffi::c_void, lsamplesize: i32, pbbuffer: *const u8, dwflags: u32, punkouter: *mut core::ffi::c_void, ppammediatypesample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAMMediaTypeStream_Impl::CreateSample(this, core::mem::transmute_copy(&lsamplesize), core::mem::transmute_copy(&pbbuffer), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&punkouter)) { + match IAMMediaTypeStream_Impl::CreateSample(this, core::mem::transmute_copy(&lsamplesize), core::mem::transmute_copy(&pbbuffer), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&punkouter)) { Ok(ok__) => { ppammediatypesample.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7437,12 +7437,12 @@ pub struct IAMMultiMediaStream_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAMMultiMediaStream_Impl: IMultiMediaStream_Impl { - fn Initialize(&self, streamtype: STREAM_TYPE, dwflags: &AMMSF_MMS_INIT_FLAGS, pfiltergraph: Option<&IGraphBuilder>) -> windows_core::Result<()>; + fn Initialize(&self, streamtype: STREAM_TYPE, dwflags: &AMMSF_MMS_INIT_FLAGS, pfiltergraph: windows_core::Ref<'_, IGraphBuilder>) -> windows_core::Result<()>; fn GetFilterGraph(&self) -> windows_core::Result; fn GetFilter(&self) -> windows_core::Result; - fn AddMediaStream(&self, pstreamobject: Option<&windows_core::IUnknown>, purposeid: *const windows_core::GUID, dwflags: &AMMSF_MS_FLAGS) -> windows_core::Result; + fn AddMediaStream(&self, pstreamobject: windows_core::Ref<'_, windows_core::IUnknown>, purposeid: *const windows_core::GUID, dwflags: &AMMSF_MS_FLAGS) -> windows_core::Result; fn OpenFile(&self, pszfilename: &windows_core::PCWSTR, dwflags: u32) -> windows_core::Result<()>; - fn OpenMoniker(&self, pctx: Option<&super::super::System::Com::IBindCtx>, pmoniker: Option<&super::super::System::Com::IMoniker>, dwflags: u32) -> windows_core::Result<()>; + fn OpenMoniker(&self, pctx: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, pmoniker: windows_core::Ref<'_, super::super::System::Com::IMoniker>, dwflags: u32) -> windows_core::Result<()>; fn Render(&self, dwflags: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -7450,7 +7450,7 @@ impl IAMMultiMediaStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, streamtype: STREAM_TYPE, dwflags: u32, pfiltergraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMMultiMediaStream_Impl::Initialize(this, core::mem::transmute_copy(&streamtype), core::mem::transmute(&dwflags), windows_core::from_raw_borrowed(&pfiltergraph)).into() + IAMMultiMediaStream_Impl::Initialize(this, core::mem::transmute_copy(&streamtype), core::mem::transmute(&dwflags), core::mem::transmute_copy(&pfiltergraph)).into() } unsafe extern "system" fn GetFilterGraph(this: *mut core::ffi::c_void, ppgraphbuilder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7474,7 +7474,7 @@ impl IAMMultiMediaStream_Vtbl { } unsafe extern "system" fn AddMediaStream(this: *mut core::ffi::c_void, pstreamobject: *mut core::ffi::c_void, purposeid: *const windows_core::GUID, dwflags: u32, ppnewstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAMMultiMediaStream_Impl::AddMediaStream(this, windows_core::from_raw_borrowed(&pstreamobject), core::mem::transmute_copy(&purposeid), core::mem::transmute(&dwflags)) { + match IAMMultiMediaStream_Impl::AddMediaStream(this, core::mem::transmute_copy(&pstreamobject), core::mem::transmute_copy(&purposeid), core::mem::transmute(&dwflags)) { Ok(ok__) => { ppnewstream.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7488,7 +7488,7 @@ impl IAMMultiMediaStream_Vtbl { } unsafe extern "system" fn OpenMoniker(this: *mut core::ffi::c_void, pctx: *mut core::ffi::c_void, pmoniker: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMMultiMediaStream_Impl::OpenMoniker(this, windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&pmoniker), core::mem::transmute_copy(&dwflags)).into() + IAMMultiMediaStream_Impl::OpenMoniker(this, core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&pmoniker), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn Render(this: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8281,7 +8281,7 @@ pub trait IAMPlayList_Impl: windows_core::IUnknownImpl { fn GetFlags(&self) -> windows_core::Result; fn GetItemCount(&self) -> windows_core::Result; fn GetItem(&self, dwitemindex: u32) -> windows_core::Result; - fn GetNamedEvent(&self, pwszeventname: &windows_core::PCWSTR, dwitemindex: u32, ppitem: *mut Option, pdwflags: *mut u32) -> windows_core::Result<()>; + fn GetNamedEvent(&self, pwszeventname: &windows_core::PCWSTR, dwitemindex: u32, ppitem: windows_core::OutRef<'_, IAMPlayListItem>, pdwflags: *mut u32) -> windows_core::Result<()>; fn GetRepeatInfo(&self, pdwrepeatcount: *mut u32, pdwrepeatstart: *mut u32, pdwrepeatend: *mut u32) -> windows_core::Result<()>; } impl IAMPlayList_Vtbl { @@ -9089,7 +9089,7 @@ pub struct IAMStreamSelect_Vtbl { #[cfg(feature = "Win32_Media_MediaFoundation")] pub trait IAMStreamSelect_Impl: windows_core::IUnknownImpl { fn Count(&self) -> windows_core::Result; - fn Info(&self, lindex: i32, ppmt: *mut *mut super::MediaFoundation::AM_MEDIA_TYPE, pdwflags: *mut u32, plcid: *mut u32, pdwgroup: *mut u32, ppszname: *mut windows_core::PWSTR, ppobject: *mut Option, ppunk: *mut Option) -> windows_core::Result<()>; + fn Info(&self, lindex: i32, ppmt: *mut *mut super::MediaFoundation::AM_MEDIA_TYPE, pdwflags: *mut u32, plcid: *mut u32, pdwgroup: *mut u32, ppszname: *mut windows_core::PWSTR, ppobject: windows_core::OutRef<'_, windows_core::IUnknown>, ppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Enable(&self, lindex: i32, dwflags: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_MediaFoundation")] @@ -9172,8 +9172,8 @@ pub trait IAMTVAudio_Impl: windows_core::IUnknownImpl { fn GetAvailableTVAudioModes(&self) -> windows_core::Result; fn TVAudioMode(&self) -> windows_core::Result; fn SetTVAudioMode(&self, lmode: i32) -> windows_core::Result<()>; - fn RegisterNotificationCallBack(&self, pnotify: Option<&IAMTunerNotification>, levents: i32) -> windows_core::Result<()>; - fn UnRegisterNotificationCallBack(&self, pnotify: Option<&IAMTunerNotification>) -> windows_core::Result<()>; + fn RegisterNotificationCallBack(&self, pnotify: windows_core::Ref<'_, IAMTunerNotification>, levents: i32) -> windows_core::Result<()>; + fn UnRegisterNotificationCallBack(&self, pnotify: windows_core::Ref<'_, IAMTunerNotification>) -> windows_core::Result<()>; } impl IAMTVAudio_Vtbl { pub const fn new() -> Self { @@ -9213,11 +9213,11 @@ impl IAMTVAudio_Vtbl { } unsafe extern "system" fn RegisterNotificationCallBack(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void, levents: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMTVAudio_Impl::RegisterNotificationCallBack(this, windows_core::from_raw_borrowed(&pnotify), core::mem::transmute_copy(&levents)).into() + IAMTVAudio_Impl::RegisterNotificationCallBack(this, core::mem::transmute_copy(&pnotify), core::mem::transmute_copy(&levents)).into() } unsafe extern "system" fn UnRegisterNotificationCallBack(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMTVAudio_Impl::UnRegisterNotificationCallBack(this, windows_core::from_raw_borrowed(&pnotify)).into() + IAMTVAudio_Impl::UnRegisterNotificationCallBack(this, core::mem::transmute_copy(&pnotify)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -9803,8 +9803,8 @@ pub trait IAMTuner_Impl: windows_core::IUnknownImpl { fn SetMode(&self, lmode: AMTunerModeType) -> windows_core::Result<()>; fn Mode(&self) -> windows_core::Result; fn GetAvailableModes(&self) -> windows_core::Result; - fn RegisterNotificationCallBack(&self, pnotify: Option<&IAMTunerNotification>, levents: i32) -> windows_core::Result<()>; - fn UnRegisterNotificationCallBack(&self, pnotify: Option<&IAMTunerNotification>) -> windows_core::Result<()>; + fn RegisterNotificationCallBack(&self, pnotify: windows_core::Ref<'_, IAMTunerNotification>, levents: i32) -> windows_core::Result<()>; + fn UnRegisterNotificationCallBack(&self, pnotify: windows_core::Ref<'_, IAMTunerNotification>) -> windows_core::Result<()>; } impl IAMTuner_Vtbl { pub const fn new() -> Self { @@ -9892,11 +9892,11 @@ impl IAMTuner_Vtbl { } unsafe extern "system" fn RegisterNotificationCallBack(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void, levents: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMTuner_Impl::RegisterNotificationCallBack(this, windows_core::from_raw_borrowed(&pnotify), core::mem::transmute_copy(&levents)).into() + IAMTuner_Impl::RegisterNotificationCallBack(this, core::mem::transmute_copy(&pnotify), core::mem::transmute_copy(&levents)).into() } unsafe extern "system" fn UnRegisterNotificationCallBack(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMTuner_Impl::UnRegisterNotificationCallBack(this, windows_core::from_raw_borrowed(&pnotify)).into() + IAMTuner_Impl::UnRegisterNotificationCallBack(this, core::mem::transmute_copy(&pnotify)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10150,7 +10150,7 @@ pub trait IAMVideoAccelerator_Impl: windows_core::IUnknownImpl { fn ReleaseBuffer(&self, dwtypeindex: u32, dwbufferindex: u32) -> windows_core::Result<()>; fn Execute(&self, dwfunction: u32, lpprivateinputdata: *const core::ffi::c_void, cbprivateinputdata: u32, lpprivateoutputdat: *const core::ffi::c_void, cbprivateoutputdata: u32, dwnumbuffers: u32, pamvabufferinfo: *const AMVABUFFERINFO) -> windows_core::Result<()>; fn QueryRenderStatus(&self, dwtypeindex: u32, dwbufferindex: u32, dwflags: u32) -> windows_core::Result<()>; - fn DisplayFrame(&self, dwfliptoindex: u32, pmediasample: Option<&IMediaSample>) -> windows_core::Result<()>; + fn DisplayFrame(&self, dwfliptoindex: u32, pmediasample: windows_core::Ref<'_, IMediaSample>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_DirectDraw")] impl IAMVideoAccelerator_Vtbl { @@ -10201,7 +10201,7 @@ impl IAMVideoAccelerator_Vtbl { } unsafe extern "system" fn DisplayFrame(this: *mut core::ffi::c_void, dwfliptoindex: u32, pmediasample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMVideoAccelerator_Impl::DisplayFrame(this, core::mem::transmute_copy(&dwfliptoindex), windows_core::from_raw_borrowed(&pmediasample)).into() + IAMVideoAccelerator_Impl::DisplayFrame(this, core::mem::transmute_copy(&dwfliptoindex), core::mem::transmute_copy(&pmediasample)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10508,18 +10508,18 @@ pub struct IAMVideoControl_Vtbl { pub GetFrameRateList: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i32, super::super::Foundation::SIZE, *mut i32, *mut *mut i64) -> windows_core::HRESULT, } pub trait IAMVideoControl_Impl: windows_core::IUnknownImpl { - fn GetCaps(&self, ppin: Option<&IPin>) -> windows_core::Result; - fn SetMode(&self, ppin: Option<&IPin>, mode: i32) -> windows_core::Result<()>; - fn GetMode(&self, ppin: Option<&IPin>) -> windows_core::Result; - fn GetCurrentActualFrameRate(&self, ppin: Option<&IPin>) -> windows_core::Result; - fn GetMaxAvailableFrameRate(&self, ppin: Option<&IPin>, iindex: i32, dimensions: &super::super::Foundation::SIZE) -> windows_core::Result; - fn GetFrameRateList(&self, ppin: Option<&IPin>, iindex: i32, dimensions: &super::super::Foundation::SIZE, listsize: *mut i32, framerates: *mut *mut i64) -> windows_core::Result<()>; + fn GetCaps(&self, ppin: windows_core::Ref<'_, IPin>) -> windows_core::Result; + fn SetMode(&self, ppin: windows_core::Ref<'_, IPin>, mode: i32) -> windows_core::Result<()>; + fn GetMode(&self, ppin: windows_core::Ref<'_, IPin>) -> windows_core::Result; + fn GetCurrentActualFrameRate(&self, ppin: windows_core::Ref<'_, IPin>) -> windows_core::Result; + fn GetMaxAvailableFrameRate(&self, ppin: windows_core::Ref<'_, IPin>, iindex: i32, dimensions: &super::super::Foundation::SIZE) -> windows_core::Result; + fn GetFrameRateList(&self, ppin: windows_core::Ref<'_, IPin>, iindex: i32, dimensions: &super::super::Foundation::SIZE, listsize: *mut i32, framerates: *mut *mut i64) -> windows_core::Result<()>; } impl IAMVideoControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetCaps(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, pcapsflags: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAMVideoControl_Impl::GetCaps(this, windows_core::from_raw_borrowed(&ppin)) { + match IAMVideoControl_Impl::GetCaps(this, core::mem::transmute_copy(&ppin)) { Ok(ok__) => { pcapsflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10529,11 +10529,11 @@ impl IAMVideoControl_Vtbl { } unsafe extern "system" fn SetMode(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, mode: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMVideoControl_Impl::SetMode(this, windows_core::from_raw_borrowed(&ppin), core::mem::transmute_copy(&mode)).into() + IAMVideoControl_Impl::SetMode(this, core::mem::transmute_copy(&ppin), core::mem::transmute_copy(&mode)).into() } unsafe extern "system" fn GetMode(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, mode: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAMVideoControl_Impl::GetMode(this, windows_core::from_raw_borrowed(&ppin)) { + match IAMVideoControl_Impl::GetMode(this, core::mem::transmute_copy(&ppin)) { Ok(ok__) => { mode.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10543,7 +10543,7 @@ impl IAMVideoControl_Vtbl { } unsafe extern "system" fn GetCurrentActualFrameRate(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, actualframerate: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAMVideoControl_Impl::GetCurrentActualFrameRate(this, windows_core::from_raw_borrowed(&ppin)) { + match IAMVideoControl_Impl::GetCurrentActualFrameRate(this, core::mem::transmute_copy(&ppin)) { Ok(ok__) => { actualframerate.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10553,7 +10553,7 @@ impl IAMVideoControl_Vtbl { } unsafe extern "system" fn GetMaxAvailableFrameRate(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, iindex: i32, dimensions: super::super::Foundation::SIZE, maxavailableframerate: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAMVideoControl_Impl::GetMaxAvailableFrameRate(this, windows_core::from_raw_borrowed(&ppin), core::mem::transmute_copy(&iindex), core::mem::transmute(&dimensions)) { + match IAMVideoControl_Impl::GetMaxAvailableFrameRate(this, core::mem::transmute_copy(&ppin), core::mem::transmute_copy(&iindex), core::mem::transmute(&dimensions)) { Ok(ok__) => { maxavailableframerate.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10563,7 +10563,7 @@ impl IAMVideoControl_Vtbl { } unsafe extern "system" fn GetFrameRateList(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, iindex: i32, dimensions: super::super::Foundation::SIZE, listsize: *mut i32, framerates: *mut *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMVideoControl_Impl::GetFrameRateList(this, windows_core::from_raw_borrowed(&ppin), core::mem::transmute_copy(&iindex), core::mem::transmute(&dimensions), core::mem::transmute_copy(&listsize), core::mem::transmute_copy(&framerates)).into() + IAMVideoControl_Impl::GetFrameRateList(this, core::mem::transmute_copy(&ppin), core::mem::transmute_copy(&iindex), core::mem::transmute(&dimensions), core::mem::transmute_copy(&listsize), core::mem::transmute_copy(&framerates)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10695,13 +10695,13 @@ pub struct IAMWMBufferPass_Vtbl { pub SetNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAMWMBufferPass_Impl: windows_core::IUnknownImpl { - fn SetNotify(&self, pcallback: Option<&IAMWMBufferPassCallback>) -> windows_core::Result<()>; + fn SetNotify(&self, pcallback: windows_core::Ref<'_, IAMWMBufferPassCallback>) -> windows_core::Result<()>; } impl IAMWMBufferPass_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetNotify(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMWMBufferPass_Impl::SetNotify(this, windows_core::from_raw_borrowed(&pcallback)).into() + IAMWMBufferPass_Impl::SetNotify(this, core::mem::transmute_copy(&pcallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetNotify: SetNotify:: } } @@ -10732,14 +10732,14 @@ pub struct IAMWMBufferPassCallback_Vtbl { } #[cfg(feature = "Win32_Media_WindowsMediaFormat")] pub trait IAMWMBufferPassCallback_Impl: windows_core::IUnknownImpl { - fn Notify(&self, pnssbuffer3: Option<&super::WindowsMediaFormat::INSSBuffer3>, ppin: Option<&IPin>, prtstart: *const i64, prtend: *const i64) -> windows_core::Result<()>; + fn Notify(&self, pnssbuffer3: windows_core::Ref<'_, super::WindowsMediaFormat::INSSBuffer3>, ppin: windows_core::Ref<'_, IPin>, prtstart: *const i64, prtend: *const i64) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_WindowsMediaFormat")] impl IAMWMBufferPassCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Notify(this: *mut core::ffi::c_void, pnssbuffer3: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, prtstart: *const i64, prtend: *const i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAMWMBufferPassCallback_Impl::Notify(this, windows_core::from_raw_borrowed(&pnssbuffer3), windows_core::from_raw_borrowed(&ppin), core::mem::transmute_copy(&prtstart), core::mem::transmute_copy(&prtend)).into() + IAMWMBufferPassCallback_Impl::Notify(this, core::mem::transmute_copy(&pnssbuffer3), core::mem::transmute_copy(&ppin), core::mem::transmute_copy(&prtstart), core::mem::transmute_copy(&prtend)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Notify: Notify:: } } @@ -11053,10 +11053,10 @@ pub struct IAsyncReader_Vtbl { pub EndFlush: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAsyncReader_Impl: windows_core::IUnknownImpl { - fn RequestAllocator(&self, ppreferred: Option<&IMemAllocator>, pprops: *const ALLOCATOR_PROPERTIES) -> windows_core::Result; - fn Request(&self, psample: Option<&IMediaSample>, dwuser: usize) -> windows_core::Result<()>; - fn WaitForNext(&self, dwtimeout: u32, ppsample: *mut Option, pdwuser: *mut usize) -> windows_core::Result<()>; - fn SyncReadAligned(&self, psample: Option<&IMediaSample>) -> windows_core::Result<()>; + fn RequestAllocator(&self, ppreferred: windows_core::Ref<'_, IMemAllocator>, pprops: *const ALLOCATOR_PROPERTIES) -> windows_core::Result; + fn Request(&self, psample: windows_core::Ref<'_, IMediaSample>, dwuser: usize) -> windows_core::Result<()>; + fn WaitForNext(&self, dwtimeout: u32, ppsample: windows_core::OutRef<'_, IMediaSample>, pdwuser: *mut usize) -> windows_core::Result<()>; + fn SyncReadAligned(&self, psample: windows_core::Ref<'_, IMediaSample>) -> windows_core::Result<()>; fn SyncRead(&self, llposition: i64, llength: i32, pbuffer: *mut u8) -> windows_core::Result<()>; fn Length(&self, ptotal: *mut i64, pavailable: *mut i64) -> windows_core::Result<()>; fn BeginFlush(&self) -> windows_core::Result<()>; @@ -11066,7 +11066,7 @@ impl IAsyncReader_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RequestAllocator(this: *mut core::ffi::c_void, ppreferred: *mut core::ffi::c_void, pprops: *const ALLOCATOR_PROPERTIES, ppactual: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAsyncReader_Impl::RequestAllocator(this, windows_core::from_raw_borrowed(&ppreferred), core::mem::transmute_copy(&pprops)) { + match IAsyncReader_Impl::RequestAllocator(this, core::mem::transmute_copy(&ppreferred), core::mem::transmute_copy(&pprops)) { Ok(ok__) => { ppactual.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11076,7 +11076,7 @@ impl IAsyncReader_Vtbl { } unsafe extern "system" fn Request(this: *mut core::ffi::c_void, psample: *mut core::ffi::c_void, dwuser: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncReader_Impl::Request(this, windows_core::from_raw_borrowed(&psample), core::mem::transmute_copy(&dwuser)).into() + IAsyncReader_Impl::Request(this, core::mem::transmute_copy(&psample), core::mem::transmute_copy(&dwuser)).into() } unsafe extern "system" fn WaitForNext(this: *mut core::ffi::c_void, dwtimeout: u32, ppsample: *mut *mut core::ffi::c_void, pdwuser: *mut usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11084,7 +11084,7 @@ impl IAsyncReader_Vtbl { } unsafe extern "system" fn SyncReadAligned(this: *mut core::ffi::c_void, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncReader_Impl::SyncReadAligned(this, windows_core::from_raw_borrowed(&psample)).into() + IAsyncReader_Impl::SyncReadAligned(this, core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn SyncRead(this: *mut core::ffi::c_void, llposition: i64, llength: i32, pbuffer: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11215,7 +11215,7 @@ pub struct IAudioMediaStream_Vtbl { pub trait IAudioMediaStream_Impl: IMediaStream_Impl { fn GetFormat(&self, pwaveformatcurrent: *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()>; fn SetFormat(&self, lpwaveformat: *const super::Audio::WAVEFORMATEX) -> windows_core::Result<()>; - fn CreateSample(&self, paudiodata: Option<&IAudioData>, dwflags: u32) -> windows_core::Result; + fn CreateSample(&self, paudiodata: windows_core::Ref<'_, IAudioData>, dwflags: u32) -> windows_core::Result; } #[cfg(feature = "Win32_Media_Audio")] impl IAudioMediaStream_Vtbl { @@ -11230,7 +11230,7 @@ impl IAudioMediaStream_Vtbl { } unsafe extern "system" fn CreateSample(this: *mut core::ffi::c_void, paudiodata: *mut core::ffi::c_void, dwflags: u32, ppsample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAudioMediaStream_Impl::CreateSample(this, windows_core::from_raw_borrowed(&paudiodata), core::mem::transmute_copy(&dwflags)) { + match IAudioMediaStream_Impl::CreateSample(this, core::mem::transmute_copy(&paudiodata), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppsample.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12395,7 +12395,7 @@ pub struct IBDA_EasMessage_Vtbl { pub get_EasMessage: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IBDA_EasMessage_Impl: windows_core::IUnknownImpl { - fn get_EasMessage(&self, uleventid: u32, ppeasobject: *mut Option) -> windows_core::Result<()>; + fn get_EasMessage(&self, uleventid: u32, ppeasobject: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IBDA_EasMessage_Vtbl { pub const fn new() -> Self { @@ -13501,7 +13501,7 @@ pub trait IBDA_NetworkProvider_Impl: windows_core::IUnknownImpl { fn GetNetworkType(&self, pguidnetworktype: *mut windows_core::GUID) -> windows_core::Result<()>; fn PutTuningSpace(&self, guidtuningspace: *const windows_core::GUID) -> windows_core::Result<()>; fn GetTuningSpace(&self, pguidtuingspace: *mut windows_core::GUID) -> windows_core::Result<()>; - fn RegisterDeviceFilter(&self, punkfiltercontrol: Option<&windows_core::IUnknown>, ppvregisitrationcontext: *mut u32) -> windows_core::Result<()>; + fn RegisterDeviceFilter(&self, punkfiltercontrol: windows_core::Ref<'_, windows_core::IUnknown>, ppvregisitrationcontext: *mut u32) -> windows_core::Result<()>; fn UnRegisterDeviceFilter(&self, pvregistrationcontext: u32) -> windows_core::Result<()>; } impl IBDA_NetworkProvider_Vtbl { @@ -13528,7 +13528,7 @@ impl IBDA_NetworkProvider_Vtbl { } unsafe extern "system" fn RegisterDeviceFilter(this: *mut core::ffi::c_void, punkfiltercontrol: *mut core::ffi::c_void, ppvregisitrationcontext: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBDA_NetworkProvider_Impl::RegisterDeviceFilter(this, windows_core::from_raw_borrowed(&punkfiltercontrol), core::mem::transmute_copy(&ppvregisitrationcontext)).into() + IBDA_NetworkProvider_Impl::RegisterDeviceFilter(this, core::mem::transmute_copy(&punkfiltercontrol), core::mem::transmute_copy(&ppvregisitrationcontext)).into() } unsafe extern "system" fn UnRegisterDeviceFilter(this: *mut core::ffi::c_void, pvregistrationcontext: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13908,7 +13908,7 @@ pub trait IBDA_Topology_Impl: windows_core::IUnknownImpl { fn SetMediaType(&self, ulpinid: u32, pmediatype: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; fn SetMedium(&self, ulpinid: u32, pmedium: *const REGPINMEDIUM) -> windows_core::Result<()>; fn CreateTopology(&self, ulinputpinid: u32, uloutputpinid: u32) -> windows_core::Result<()>; - fn GetControlNode(&self, ulinputpinid: u32, uloutputpinid: u32, ulnodetype: u32, ppcontrolnode: *mut Option) -> windows_core::Result<()>; + fn GetControlNode(&self, ulinputpinid: u32, uloutputpinid: u32, ulnodetype: u32, ppcontrolnode: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_MediaFoundation")] impl IBDA_Topology_Vtbl { @@ -14449,7 +14449,7 @@ pub trait IBaseFilter_Impl: IMediaFilter_Impl { fn EnumPins(&self) -> windows_core::Result; fn FindPin(&self, id: &windows_core::PCWSTR) -> windows_core::Result; fn QueryFilterInfo(&self, pinfo: *mut FILTER_INFO) -> windows_core::Result<()>; - fn JoinFilterGraph(&self, pgraph: Option<&IFilterGraph>, pname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn JoinFilterGraph(&self, pgraph: windows_core::Ref<'_, IFilterGraph>, pname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn QueryVendorInfo(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -14481,7 +14481,7 @@ impl IBaseFilter_Vtbl { } unsafe extern "system" fn JoinFilterGraph(this: *mut core::ffi::c_void, pgraph: *mut core::ffi::c_void, pname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBaseFilter_Impl::JoinFilterGraph(this, windows_core::from_raw_borrowed(&pgraph), core::mem::transmute(&pname)).into() + IBaseFilter_Impl::JoinFilterGraph(this, core::mem::transmute_copy(&pgraph), core::mem::transmute(&pname)).into() } unsafe extern "system" fn QueryVendorInfo(this: *mut core::ffi::c_void, pvendorinfo: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15970,21 +15970,21 @@ pub struct ICaptureGraphBuilder_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ICaptureGraphBuilder_Impl: windows_core::IUnknownImpl { - fn SetFiltergraph(&self, pfg: Option<&IGraphBuilder>) -> windows_core::Result<()>; + fn SetFiltergraph(&self, pfg: windows_core::Ref<'_, IGraphBuilder>) -> windows_core::Result<()>; fn GetFiltergraph(&self) -> windows_core::Result; - fn SetOutputFileName(&self, ptype: *const windows_core::GUID, lpstrfile: &windows_core::PCWSTR, ppf: *mut Option, ppsink: *mut Option) -> windows_core::Result<()>; - fn FindInterface(&self, pcategory: *const windows_core::GUID, pf: Option<&IBaseFilter>, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RenderStream(&self, pcategory: *const windows_core::GUID, psource: Option<&windows_core::IUnknown>, pfcompressor: Option<&IBaseFilter>, pfrenderer: Option<&IBaseFilter>) -> windows_core::Result<()>; - fn ControlStream(&self, pcategory: *const windows_core::GUID, pfilter: Option<&IBaseFilter>, pstart: *const i64, pstop: *const i64, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()>; + fn SetOutputFileName(&self, ptype: *const windows_core::GUID, lpstrfile: &windows_core::PCWSTR, ppf: windows_core::OutRef<'_, IBaseFilter>, ppsink: windows_core::OutRef<'_, IFileSinkFilter>) -> windows_core::Result<()>; + fn FindInterface(&self, pcategory: *const windows_core::GUID, pf: windows_core::Ref<'_, IBaseFilter>, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RenderStream(&self, pcategory: *const windows_core::GUID, psource: windows_core::Ref<'_, windows_core::IUnknown>, pfcompressor: windows_core::Ref<'_, IBaseFilter>, pfrenderer: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; + fn ControlStream(&self, pcategory: *const windows_core::GUID, pfilter: windows_core::Ref<'_, IBaseFilter>, pstart: *const i64, pstop: *const i64, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()>; fn AllocCapFile(&self, lpstr: &windows_core::PCWSTR, dwlsize: u64) -> windows_core::Result<()>; - fn CopyCaptureFile(&self, lpwstrold: &windows_core::PCWSTR, lpwstrnew: &windows_core::PCWSTR, fallowescabort: i32, pcallback: Option<&IAMCopyCaptureFileProgress>) -> windows_core::Result<()>; + fn CopyCaptureFile(&self, lpwstrold: &windows_core::PCWSTR, lpwstrnew: &windows_core::PCWSTR, fallowescabort: i32, pcallback: windows_core::Ref<'_, IAMCopyCaptureFileProgress>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ICaptureGraphBuilder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetFiltergraph(this: *mut core::ffi::c_void, pfg: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder_Impl::SetFiltergraph(this, windows_core::from_raw_borrowed(&pfg)).into() + ICaptureGraphBuilder_Impl::SetFiltergraph(this, core::mem::transmute_copy(&pfg)).into() } unsafe extern "system" fn GetFiltergraph(this: *mut core::ffi::c_void, ppfg: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16002,15 +16002,15 @@ impl ICaptureGraphBuilder_Vtbl { } unsafe extern "system" fn FindInterface(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, pf: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder_Impl::FindInterface(this, core::mem::transmute_copy(&pcategory), windows_core::from_raw_borrowed(&pf), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppint)).into() + ICaptureGraphBuilder_Impl::FindInterface(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&pf), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppint)).into() } unsafe extern "system" fn RenderStream(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, psource: *mut core::ffi::c_void, pfcompressor: *mut core::ffi::c_void, pfrenderer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder_Impl::RenderStream(this, core::mem::transmute_copy(&pcategory), windows_core::from_raw_borrowed(&psource), windows_core::from_raw_borrowed(&pfcompressor), windows_core::from_raw_borrowed(&pfrenderer)).into() + ICaptureGraphBuilder_Impl::RenderStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&psource), core::mem::transmute_copy(&pfcompressor), core::mem::transmute_copy(&pfrenderer)).into() } unsafe extern "system" fn ControlStream(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, pfilter: *mut core::ffi::c_void, pstart: *const i64, pstop: *const i64, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder_Impl::ControlStream(this, core::mem::transmute_copy(&pcategory), windows_core::from_raw_borrowed(&pfilter), core::mem::transmute_copy(&pstart), core::mem::transmute_copy(&pstop), core::mem::transmute_copy(&wstartcookie), core::mem::transmute_copy(&wstopcookie)).into() + ICaptureGraphBuilder_Impl::ControlStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&pstart), core::mem::transmute_copy(&pstop), core::mem::transmute_copy(&wstartcookie), core::mem::transmute_copy(&wstopcookie)).into() } unsafe extern "system" fn AllocCapFile(this: *mut core::ffi::c_void, lpstr: windows_core::PCWSTR, dwlsize: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16018,7 +16018,7 @@ impl ICaptureGraphBuilder_Vtbl { } unsafe extern "system" fn CopyCaptureFile(this: *mut core::ffi::c_void, lpwstrold: windows_core::PCWSTR, lpwstrnew: windows_core::PCWSTR, fallowescabort: i32, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder_Impl::CopyCaptureFile(this, core::mem::transmute(&lpwstrold), core::mem::transmute(&lpwstrnew), core::mem::transmute_copy(&fallowescabort), windows_core::from_raw_borrowed(&pcallback)).into() + ICaptureGraphBuilder_Impl::CopyCaptureFile(this, core::mem::transmute(&lpwstrold), core::mem::transmute(&lpwstrnew), core::mem::transmute_copy(&fallowescabort), core::mem::transmute_copy(&pcallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -16130,22 +16130,22 @@ pub struct ICaptureGraphBuilder2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ICaptureGraphBuilder2_Impl: windows_core::IUnknownImpl { - fn SetFiltergraph(&self, pfg: Option<&IGraphBuilder>) -> windows_core::Result<()>; + fn SetFiltergraph(&self, pfg: windows_core::Ref<'_, IGraphBuilder>) -> windows_core::Result<()>; fn GetFiltergraph(&self) -> windows_core::Result; - fn SetOutputFileName(&self, ptype: *const windows_core::GUID, lpstrfile: &windows_core::PCWSTR, ppf: *mut Option, ppsink: *mut Option) -> windows_core::Result<()>; - fn FindInterface(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pf: Option<&IBaseFilter>, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RenderStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, psource: Option<&windows_core::IUnknown>, pfcompressor: Option<&IBaseFilter>, pfrenderer: Option<&IBaseFilter>) -> windows_core::Result<()>; - fn ControlStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: Option<&IBaseFilter>, pstart: *const i64, pstop: *const i64, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()>; + fn SetOutputFileName(&self, ptype: *const windows_core::GUID, lpstrfile: &windows_core::PCWSTR, ppf: windows_core::OutRef<'_, IBaseFilter>, ppsink: windows_core::OutRef<'_, IFileSinkFilter>) -> windows_core::Result<()>; + fn FindInterface(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pf: windows_core::Ref<'_, IBaseFilter>, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RenderStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, psource: windows_core::Ref<'_, windows_core::IUnknown>, pfcompressor: windows_core::Ref<'_, IBaseFilter>, pfrenderer: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; + fn ControlStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: windows_core::Ref<'_, IBaseFilter>, pstart: *const i64, pstop: *const i64, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()>; fn AllocCapFile(&self, lpstr: &windows_core::PCWSTR, dwlsize: u64) -> windows_core::Result<()>; - fn CopyCaptureFile(&self, lpwstrold: &windows_core::PCWSTR, lpwstrnew: &windows_core::PCWSTR, fallowescabort: i32, pcallback: Option<&IAMCopyCaptureFileProgress>) -> windows_core::Result<()>; - fn FindPin(&self, psource: Option<&windows_core::IUnknown>, pindir: PIN_DIRECTION, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, funconnected: super::super::Foundation::BOOL, num: i32) -> windows_core::Result; + fn CopyCaptureFile(&self, lpwstrold: &windows_core::PCWSTR, lpwstrnew: &windows_core::PCWSTR, fallowescabort: i32, pcallback: windows_core::Ref<'_, IAMCopyCaptureFileProgress>) -> windows_core::Result<()>; + fn FindPin(&self, psource: windows_core::Ref<'_, windows_core::IUnknown>, pindir: PIN_DIRECTION, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, funconnected: super::super::Foundation::BOOL, num: i32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl ICaptureGraphBuilder2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetFiltergraph(this: *mut core::ffi::c_void, pfg: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder2_Impl::SetFiltergraph(this, windows_core::from_raw_borrowed(&pfg)).into() + ICaptureGraphBuilder2_Impl::SetFiltergraph(this, core::mem::transmute_copy(&pfg)).into() } unsafe extern "system" fn GetFiltergraph(this: *mut core::ffi::c_void, ppfg: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16163,15 +16163,15 @@ impl ICaptureGraphBuilder2_Vtbl { } unsafe extern "system" fn FindInterface(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pf: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder2_Impl::FindInterface(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), windows_core::from_raw_borrowed(&pf), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppint)).into() + ICaptureGraphBuilder2_Impl::FindInterface(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&pf), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppint)).into() } unsafe extern "system" fn RenderStream(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, psource: *mut core::ffi::c_void, pfcompressor: *mut core::ffi::c_void, pfrenderer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder2_Impl::RenderStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), windows_core::from_raw_borrowed(&psource), windows_core::from_raw_borrowed(&pfcompressor), windows_core::from_raw_borrowed(&pfrenderer)).into() + ICaptureGraphBuilder2_Impl::RenderStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&psource), core::mem::transmute_copy(&pfcompressor), core::mem::transmute_copy(&pfrenderer)).into() } unsafe extern "system" fn ControlStream(this: *mut core::ffi::c_void, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: *mut core::ffi::c_void, pstart: *const i64, pstop: *const i64, wstartcookie: u16, wstopcookie: u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder2_Impl::ControlStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), windows_core::from_raw_borrowed(&pfilter), core::mem::transmute_copy(&pstart), core::mem::transmute_copy(&pstop), core::mem::transmute_copy(&wstartcookie), core::mem::transmute_copy(&wstopcookie)).into() + ICaptureGraphBuilder2_Impl::ControlStream(this, core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&pstart), core::mem::transmute_copy(&pstop), core::mem::transmute_copy(&wstartcookie), core::mem::transmute_copy(&wstopcookie)).into() } unsafe extern "system" fn AllocCapFile(this: *mut core::ffi::c_void, lpstr: windows_core::PCWSTR, dwlsize: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16179,11 +16179,11 @@ impl ICaptureGraphBuilder2_Vtbl { } unsafe extern "system" fn CopyCaptureFile(this: *mut core::ffi::c_void, lpwstrold: windows_core::PCWSTR, lpwstrnew: windows_core::PCWSTR, fallowescabort: i32, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICaptureGraphBuilder2_Impl::CopyCaptureFile(this, core::mem::transmute(&lpwstrold), core::mem::transmute(&lpwstrnew), core::mem::transmute_copy(&fallowescabort), windows_core::from_raw_borrowed(&pcallback)).into() + ICaptureGraphBuilder2_Impl::CopyCaptureFile(this, core::mem::transmute(&lpwstrold), core::mem::transmute(&lpwstrnew), core::mem::transmute_copy(&fallowescabort), core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn FindPin(this: *mut core::ffi::c_void, psource: *mut core::ffi::c_void, pindir: PIN_DIRECTION, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, funconnected: super::super::Foundation::BOOL, num: i32, pppin: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICaptureGraphBuilder2_Impl::FindPin(this, windows_core::from_raw_borrowed(&psource), core::mem::transmute_copy(&pindir), core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&funconnected), core::mem::transmute_copy(&num)) { + match ICaptureGraphBuilder2_Impl::FindPin(this, core::mem::transmute_copy(&psource), core::mem::transmute_copy(&pindir), core::mem::transmute_copy(&pcategory), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&funconnected), core::mem::transmute_copy(&num)) { Ok(ok__) => { pppin.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -16271,7 +16271,7 @@ pub trait IConfigAsfWriter_Impl: windows_core::IUnknownImpl { fn GetCurrentProfileId(&self) -> windows_core::Result; fn ConfigureFilterUsingProfileGuid(&self, guidprofile: *const windows_core::GUID) -> windows_core::Result<()>; fn GetCurrentProfileGuid(&self) -> windows_core::Result; - fn ConfigureFilterUsingProfile(&self, pprofile: Option<&super::WindowsMediaFormat::IWMProfile>) -> windows_core::Result<()>; + fn ConfigureFilterUsingProfile(&self, pprofile: windows_core::Ref<'_, super::WindowsMediaFormat::IWMProfile>) -> windows_core::Result<()>; fn GetCurrentProfile(&self) -> windows_core::Result; fn SetIndexMode(&self, bindexfile: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetIndexMode(&self) -> windows_core::Result; @@ -16309,7 +16309,7 @@ impl IConfigAsfWriter_Vtbl { } unsafe extern "system" fn ConfigureFilterUsingProfile(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConfigAsfWriter_Impl::ConfigureFilterUsingProfile(this, windows_core::from_raw_borrowed(&pprofile)).into() + IConfigAsfWriter_Impl::ConfigureFilterUsingProfile(this, core::mem::transmute_copy(&pprofile)).into() } unsafe extern "system" fn GetCurrentProfile(this: *mut core::ffi::c_void, ppprofile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16389,7 +16389,7 @@ pub struct IConfigAsfWriter2_Vtbl { } #[cfg(feature = "Win32_Media_WindowsMediaFormat")] pub trait IConfigAsfWriter2_Impl: IConfigAsfWriter_Impl { - fn StreamNumFromPin(&self, ppin: Option<&IPin>) -> windows_core::Result; + fn StreamNumFromPin(&self, ppin: windows_core::Ref<'_, IPin>) -> windows_core::Result; fn SetParam(&self, dwparam: u32, dwparam1: u32, dwparam2: u32) -> windows_core::Result<()>; fn GetParam(&self, dwparam: u32, pdwparam1: *mut u32, pdwparam2: *mut u32) -> windows_core::Result<()>; fn ResetMultiPassState(&self) -> windows_core::Result<()>; @@ -16399,7 +16399,7 @@ impl IConfigAsfWriter2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StreamNumFromPin(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, pwstreamnum: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IConfigAsfWriter2_Impl::StreamNumFromPin(this, windows_core::from_raw_borrowed(&ppin)) { + match IConfigAsfWriter2_Impl::StreamNumFromPin(this, core::mem::transmute_copy(&ppin)) { Ok(ok__) => { pwstreamnum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -16594,7 +16594,7 @@ pub struct ICreateDevEnum_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ICreateDevEnum_Impl: windows_core::IUnknownImpl { - fn CreateClassEnumerator(&self, clsiddeviceclass: *const windows_core::GUID, ppenummoniker: *mut Option, dwflags: u32) -> windows_core::Result<()>; + fn CreateClassEnumerator(&self, clsiddeviceclass: *const windows_core::GUID, ppenummoniker: windows_core::OutRef<'_, super::super::System::Com::IEnumMoniker>, dwflags: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ICreateDevEnum_Vtbl { @@ -16674,20 +16674,20 @@ pub struct IDDrawExclModeVideo_Vtbl { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub trait IDDrawExclModeVideo_Impl: windows_core::IUnknownImpl { - fn SetDDrawObject(&self, pddrawobject: Option<&super::super::Graphics::DirectDraw::IDirectDraw>) -> windows_core::Result<()>; - fn GetDDrawObject(&self, ppddrawobject: *mut Option, pbusingexternal: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetDDrawSurface(&self, pddrawsurface: Option<&super::super::Graphics::DirectDraw::IDirectDrawSurface>) -> windows_core::Result<()>; - fn GetDDrawSurface(&self, ppddrawsurface: *mut Option, pbusingexternal: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetDDrawObject(&self, pddrawobject: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDraw>) -> windows_core::Result<()>; + fn GetDDrawObject(&self, ppddrawobject: windows_core::OutRef<'_, super::super::Graphics::DirectDraw::IDirectDraw>, pbusingexternal: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetDDrawSurface(&self, pddrawsurface: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface>) -> windows_core::Result<()>; + fn GetDDrawSurface(&self, ppddrawsurface: windows_core::OutRef<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface>, pbusingexternal: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetDrawParameters(&self, prcsource: *const super::super::Foundation::RECT, prctarget: *const super::super::Foundation::RECT) -> windows_core::Result<()>; fn GetNativeVideoProps(&self, pdwvideowidth: *mut u32, pdwvideoheight: *mut u32, pdwpictaspectratiox: *mut u32, pdwpictaspectratioy: *mut u32) -> windows_core::Result<()>; - fn SetCallbackInterface(&self, pcallback: Option<&IDDrawExclModeVideoCallback>, dwflags: u32) -> windows_core::Result<()>; + fn SetCallbackInterface(&self, pcallback: windows_core::Ref<'_, IDDrawExclModeVideoCallback>, dwflags: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_DirectDraw")] impl IDDrawExclModeVideo_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDDrawObject(this: *mut core::ffi::c_void, pddrawobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDDrawExclModeVideo_Impl::SetDDrawObject(this, windows_core::from_raw_borrowed(&pddrawobject)).into() + IDDrawExclModeVideo_Impl::SetDDrawObject(this, core::mem::transmute_copy(&pddrawobject)).into() } unsafe extern "system" fn GetDDrawObject(this: *mut core::ffi::c_void, ppddrawobject: *mut *mut core::ffi::c_void, pbusingexternal: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16695,7 +16695,7 @@ impl IDDrawExclModeVideo_Vtbl { } unsafe extern "system" fn SetDDrawSurface(this: *mut core::ffi::c_void, pddrawsurface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDDrawExclModeVideo_Impl::SetDDrawSurface(this, windows_core::from_raw_borrowed(&pddrawsurface)).into() + IDDrawExclModeVideo_Impl::SetDDrawSurface(this, core::mem::transmute_copy(&pddrawsurface)).into() } unsafe extern "system" fn GetDDrawSurface(this: *mut core::ffi::c_void, ppddrawsurface: *mut *mut core::ffi::c_void, pbusingexternal: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16711,7 +16711,7 @@ impl IDDrawExclModeVideo_Vtbl { } unsafe extern "system" fn SetCallbackInterface(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDDrawExclModeVideo_Impl::SetCallbackInterface(this, windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&dwflags)).into() + IDDrawExclModeVideo_Impl::SetCallbackInterface(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&dwflags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -17081,7 +17081,7 @@ pub struct IDirectDrawMediaSample_Vtbl { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub trait IDirectDrawMediaSample_Impl: windows_core::IUnknownImpl { - fn GetSurfaceAndReleaseLock(&self, ppdirectdrawsurface: *mut Option, prect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; + fn GetSurfaceAndReleaseLock(&self, ppdirectdrawsurface: windows_core::OutRef<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface>, prect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; fn LockMediaSamplePointer(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_DirectDraw")] @@ -17221,11 +17221,11 @@ pub struct IDirectDrawMediaStream_Vtbl { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub trait IDirectDrawMediaStream_Impl: IMediaStream_Impl { - fn GetFormat(&self, pddsdcurrent: *mut super::super::Graphics::DirectDraw::DDSURFACEDESC, ppdirectdrawpalette: *mut Option, pddsddesired: *mut super::super::Graphics::DirectDraw::DDSURFACEDESC, pdwflags: *mut u32) -> windows_core::Result<()>; - fn SetFormat(&self, pddsurfacedesc: *const super::super::Graphics::DirectDraw::DDSURFACEDESC, pdirectdrawpalette: Option<&super::super::Graphics::DirectDraw::IDirectDrawPalette>) -> windows_core::Result<()>; + fn GetFormat(&self, pddsdcurrent: *mut super::super::Graphics::DirectDraw::DDSURFACEDESC, ppdirectdrawpalette: windows_core::OutRef<'_, super::super::Graphics::DirectDraw::IDirectDrawPalette>, pddsddesired: *mut super::super::Graphics::DirectDraw::DDSURFACEDESC, pdwflags: *mut u32) -> windows_core::Result<()>; + fn SetFormat(&self, pddsurfacedesc: *const super::super::Graphics::DirectDraw::DDSURFACEDESC, pdirectdrawpalette: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDrawPalette>) -> windows_core::Result<()>; fn GetDirectDraw(&self) -> windows_core::Result; - fn SetDirectDraw(&self, pdirectdraw: Option<&super::super::Graphics::DirectDraw::IDirectDraw>) -> windows_core::Result<()>; - fn CreateSample(&self, psurface: Option<&super::super::Graphics::DirectDraw::IDirectDrawSurface>, prect: *const super::super::Foundation::RECT, dwflags: u32) -> windows_core::Result; + fn SetDirectDraw(&self, pdirectdraw: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDraw>) -> windows_core::Result<()>; + fn CreateSample(&self, psurface: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface>, prect: *const super::super::Foundation::RECT, dwflags: u32) -> windows_core::Result; fn GetTimePerFrame(&self) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_DirectDraw")] @@ -17237,7 +17237,7 @@ impl IDirectDrawMediaStream_Vtbl { } unsafe extern "system" fn SetFormat(this: *mut core::ffi::c_void, pddsurfacedesc: *const super::super::Graphics::DirectDraw::DDSURFACEDESC, pdirectdrawpalette: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawMediaStream_Impl::SetFormat(this, core::mem::transmute_copy(&pddsurfacedesc), windows_core::from_raw_borrowed(&pdirectdrawpalette)).into() + IDirectDrawMediaStream_Impl::SetFormat(this, core::mem::transmute_copy(&pddsurfacedesc), core::mem::transmute_copy(&pdirectdrawpalette)).into() } unsafe extern "system" fn GetDirectDraw(this: *mut core::ffi::c_void, ppdirectdraw: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17251,11 +17251,11 @@ impl IDirectDrawMediaStream_Vtbl { } unsafe extern "system" fn SetDirectDraw(this: *mut core::ffi::c_void, pdirectdraw: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawMediaStream_Impl::SetDirectDraw(this, windows_core::from_raw_borrowed(&pdirectdraw)).into() + IDirectDrawMediaStream_Impl::SetDirectDraw(this, core::mem::transmute_copy(&pdirectdraw)).into() } unsafe extern "system" fn CreateSample(this: *mut core::ffi::c_void, psurface: *mut core::ffi::c_void, prect: *const super::super::Foundation::RECT, dwflags: u32, ppsample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDirectDrawMediaStream_Impl::CreateSample(this, windows_core::from_raw_borrowed(&psurface), core::mem::transmute_copy(&prect), core::mem::transmute_copy(&dwflags)) { + match IDirectDrawMediaStream_Impl::CreateSample(this, core::mem::transmute_copy(&psurface), core::mem::transmute_copy(&prect), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppsample.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -17317,7 +17317,7 @@ pub struct IDirectDrawStreamSample_Vtbl { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub trait IDirectDrawStreamSample_Impl: IStreamSample_Impl { - fn GetSurface(&self, ppdirectdrawsurface: *mut Option, prect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; + fn GetSurface(&self, ppdirectdrawsurface: windows_core::OutRef<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface>, prect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; fn SetRect(&self, prect: *const super::super::Foundation::RECT) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_DirectDraw")] @@ -17448,7 +17448,7 @@ pub trait IDirectDrawVideo_Impl: windows_core::IUnknownImpl { fn GetEmulatedCaps(&self, pcaps: *mut super::super::Graphics::DirectDraw::DDCAPS_DX7) -> windows_core::Result<()>; fn GetSurfaceDesc(&self, psurfacedesc: *mut super::super::Graphics::DirectDraw::DDSURFACEDESC) -> windows_core::Result<()>; fn GetFourCCCodes(&self, pcount: *mut u32, pcodes: *mut u32) -> windows_core::Result<()>; - fn SetDirectDraw(&self, pdirectdraw: Option<&super::super::Graphics::DirectDraw::IDirectDraw>) -> windows_core::Result<()>; + fn SetDirectDraw(&self, pdirectdraw: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDraw>) -> windows_core::Result<()>; fn GetDirectDraw(&self) -> windows_core::Result; fn GetSurfaceType(&self) -> windows_core::Result; fn SetDefault(&self) -> windows_core::Result<()>; @@ -17494,7 +17494,7 @@ impl IDirectDrawVideo_Vtbl { } unsafe extern "system" fn SetDirectDraw(this: *mut core::ffi::c_void, pdirectdraw: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectDrawVideo_Impl::SetDirectDraw(this, windows_core::from_raw_borrowed(&pdirectdraw)).into() + IDirectDrawVideo_Impl::SetDirectDraw(this, core::mem::transmute_copy(&pdirectdraw)).into() } unsafe extern "system" fn GetDirectDraw(this: *mut core::ffi::c_void, ppdirectdraw: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17623,7 +17623,7 @@ pub trait IDistributorNotify_Impl: windows_core::IUnknownImpl { fn Stop(&self) -> windows_core::Result<()>; fn Pause(&self) -> windows_core::Result<()>; fn Run(&self, tstart: i64) -> windows_core::Result<()>; - fn SetSyncSource(&self, pclock: Option<&super::IReferenceClock>) -> windows_core::Result<()>; + fn SetSyncSource(&self, pclock: windows_core::Ref<'_, super::IReferenceClock>) -> windows_core::Result<()>; fn NotifyGraphChange(&self) -> windows_core::Result<()>; } impl IDistributorNotify_Vtbl { @@ -17642,7 +17642,7 @@ impl IDistributorNotify_Vtbl { } unsafe extern "system" fn SetSyncSource(this: *mut core::ffi::c_void, pclock: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDistributorNotify_Impl::SetSyncSource(this, windows_core::from_raw_borrowed(&pclock)).into() + IDistributorNotify_Impl::SetSyncSource(this, core::mem::transmute_copy(&pclock)).into() } unsafe extern "system" fn NotifyGraphChange(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18365,7 +18365,7 @@ pub trait IDvdControl2_Impl: windows_core::IUnknownImpl { fn PlayChaptersAutoStop(&self, ultitle: u32, ulchapter: u32, ulchapterstoplay: u32, dwflags: u32) -> windows_core::Result; fn AcceptParentalLevelChange(&self, baccept: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetOption(&self, flag: DVD_OPTION_FLAG, fstate: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetState(&self, pstate: Option<&IDvdState>, dwflags: u32) -> windows_core::Result; + fn SetState(&self, pstate: windows_core::Ref<'_, IDvdState>, dwflags: u32) -> windows_core::Result; fn PlayPeriodInTitleAutoStop(&self, ultitle: u32, pstarttime: *const DVD_HMSF_TIMECODE, pendtime: *const DVD_HMSF_TIMECODE, dwflags: u32) -> windows_core::Result; fn SetGPRM(&self, ulindex: u32, wvalue: u16, dwflags: u32) -> windows_core::Result; fn SelectDefaultMenuLanguage(&self, language: u32) -> windows_core::Result<()>; @@ -18620,7 +18620,7 @@ impl IDvdControl2_Vtbl { } unsafe extern "system" fn SetState(this: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void, dwflags: u32, ppcmd: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDvdControl2_Impl::SetState(this, windows_core::from_raw_borrowed(&pstate), core::mem::transmute_copy(&dwflags)) { + match IDvdControl2_Impl::SetState(this, core::mem::transmute_copy(&pstate), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppcmd.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19836,13 +19836,13 @@ pub struct IESEvents_Vtbl { pub OnESEventReceived: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IESEvents_Impl: windows_core::IUnknownImpl { - fn OnESEventReceived(&self, guideventtype: &windows_core::GUID, pesevent: Option<&IESEvent>) -> windows_core::Result<()>; + fn OnESEventReceived(&self, guideventtype: &windows_core::GUID, pesevent: windows_core::Ref<'_, IESEvent>) -> windows_core::Result<()>; } impl IESEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnESEventReceived(this: *mut core::ffi::c_void, guideventtype: windows_core::GUID, pesevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IESEvents_Impl::OnESEventReceived(this, core::mem::transmute(&guideventtype), windows_core::from_raw_borrowed(&pesevent)).into() + IESEvents_Impl::OnESEventReceived(this, core::mem::transmute(&guideventtype), core::mem::transmute_copy(&pesevent)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnESEventReceived: OnESEventReceived:: } } @@ -20010,7 +20010,7 @@ pub struct IEnumFilters_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumFilters_Impl: windows_core::IUnknownImpl { - fn Next(&self, cfilters: u32, ppfilter: *mut Option, pcfetched: *mut u32) -> windows_core::HRESULT; + fn Next(&self, cfilters: u32, ppfilter: windows_core::OutRef<'_, IBaseFilter>, pcfetched: *mut u32) -> windows_core::HRESULT; fn Skip(&self, cfilters: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -20223,7 +20223,7 @@ pub struct IEnumPins_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumPins_Impl: windows_core::IUnknownImpl { - fn Next(&self, cpins: u32, pppins: *mut Option, pcfetched: *mut u32) -> windows_core::HRESULT; + fn Next(&self, cpins: u32, pppins: windows_core::OutRef<'_, IPin>, pcfetched: *mut u32) -> windows_core::HRESULT; fn Skip(&self, cpins: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -20621,29 +20621,29 @@ pub struct IFilterChain_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IFilterChain_Impl: windows_core::IUnknownImpl { - fn StartChain(&self, pstartfilter: Option<&IBaseFilter>, pendfilter: Option<&IBaseFilter>) -> windows_core::Result<()>; - fn PauseChain(&self, pstartfilter: Option<&IBaseFilter>, pendfilter: Option<&IBaseFilter>) -> windows_core::Result<()>; - fn StopChain(&self, pstartfilter: Option<&IBaseFilter>, pendfilter: Option<&IBaseFilter>) -> windows_core::Result<()>; - fn RemoveChain(&self, pstartfilter: Option<&IBaseFilter>, pendfilter: Option<&IBaseFilter>) -> windows_core::Result<()>; + fn StartChain(&self, pstartfilter: windows_core::Ref<'_, IBaseFilter>, pendfilter: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; + fn PauseChain(&self, pstartfilter: windows_core::Ref<'_, IBaseFilter>, pendfilter: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; + fn StopChain(&self, pstartfilter: windows_core::Ref<'_, IBaseFilter>, pendfilter: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; + fn RemoveChain(&self, pstartfilter: windows_core::Ref<'_, IBaseFilter>, pendfilter: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IFilterChain_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartChain(this: *mut core::ffi::c_void, pstartfilter: *mut core::ffi::c_void, pendfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterChain_Impl::StartChain(this, windows_core::from_raw_borrowed(&pstartfilter), windows_core::from_raw_borrowed(&pendfilter)).into() + IFilterChain_Impl::StartChain(this, core::mem::transmute_copy(&pstartfilter), core::mem::transmute_copy(&pendfilter)).into() } unsafe extern "system" fn PauseChain(this: *mut core::ffi::c_void, pstartfilter: *mut core::ffi::c_void, pendfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterChain_Impl::PauseChain(this, windows_core::from_raw_borrowed(&pstartfilter), windows_core::from_raw_borrowed(&pendfilter)).into() + IFilterChain_Impl::PauseChain(this, core::mem::transmute_copy(&pstartfilter), core::mem::transmute_copy(&pendfilter)).into() } unsafe extern "system" fn StopChain(this: *mut core::ffi::c_void, pstartfilter: *mut core::ffi::c_void, pendfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterChain_Impl::StopChain(this, windows_core::from_raw_borrowed(&pstartfilter), windows_core::from_raw_borrowed(&pendfilter)).into() + IFilterChain_Impl::StopChain(this, core::mem::transmute_copy(&pstartfilter), core::mem::transmute_copy(&pendfilter)).into() } unsafe extern "system" fn RemoveChain(this: *mut core::ffi::c_void, pstartfilter: *mut core::ffi::c_void, pendfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterChain_Impl::RemoveChain(this, windows_core::from_raw_borrowed(&pstartfilter), windows_core::from_raw_borrowed(&pendfilter)).into() + IFilterChain_Impl::RemoveChain(this, core::mem::transmute_copy(&pstartfilter), core::mem::transmute_copy(&pendfilter)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -20739,13 +20739,13 @@ pub struct IFilterGraph_Vtbl { } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] pub trait IFilterGraph_Impl: windows_core::IUnknownImpl { - fn AddFilter(&self, pfilter: Option<&IBaseFilter>, pname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn RemoveFilter(&self, pfilter: Option<&IBaseFilter>) -> windows_core::Result<()>; + fn AddFilter(&self, pfilter: windows_core::Ref<'_, IBaseFilter>, pname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn RemoveFilter(&self, pfilter: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; fn EnumFilters(&self) -> windows_core::Result; fn FindFilterByName(&self, pname: &windows_core::PCWSTR) -> windows_core::Result; - fn ConnectDirect(&self, ppinout: Option<&IPin>, ppinin: Option<&IPin>, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; - fn Reconnect(&self, ppin: Option<&IPin>) -> windows_core::Result<()>; - fn Disconnect(&self, ppin: Option<&IPin>) -> windows_core::Result<()>; + fn ConnectDirect(&self, ppinout: windows_core::Ref<'_, IPin>, ppinin: windows_core::Ref<'_, IPin>, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; + fn Reconnect(&self, ppin: windows_core::Ref<'_, IPin>) -> windows_core::Result<()>; + fn Disconnect(&self, ppin: windows_core::Ref<'_, IPin>) -> windows_core::Result<()>; fn SetDefaultSyncSource(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] @@ -20753,11 +20753,11 @@ impl IFilterGraph_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddFilter(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void, pname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterGraph_Impl::AddFilter(this, windows_core::from_raw_borrowed(&pfilter), core::mem::transmute(&pname)).into() + IFilterGraph_Impl::AddFilter(this, core::mem::transmute_copy(&pfilter), core::mem::transmute(&pname)).into() } unsafe extern "system" fn RemoveFilter(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterGraph_Impl::RemoveFilter(this, windows_core::from_raw_borrowed(&pfilter)).into() + IFilterGraph_Impl::RemoveFilter(this, core::mem::transmute_copy(&pfilter)).into() } unsafe extern "system" fn EnumFilters(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20781,15 +20781,15 @@ impl IFilterGraph_Vtbl { } unsafe extern "system" fn ConnectDirect(this: *mut core::ffi::c_void, ppinout: *mut core::ffi::c_void, ppinin: *mut core::ffi::c_void, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterGraph_Impl::ConnectDirect(this, windows_core::from_raw_borrowed(&ppinout), windows_core::from_raw_borrowed(&ppinin), core::mem::transmute_copy(&pmt)).into() + IFilterGraph_Impl::ConnectDirect(this, core::mem::transmute_copy(&ppinout), core::mem::transmute_copy(&ppinin), core::mem::transmute_copy(&pmt)).into() } unsafe extern "system" fn Reconnect(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterGraph_Impl::Reconnect(this, windows_core::from_raw_borrowed(&ppin)).into() + IFilterGraph_Impl::Reconnect(this, core::mem::transmute_copy(&ppin)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterGraph_Impl::Disconnect(this, windows_core::from_raw_borrowed(&ppin)).into() + IFilterGraph_Impl::Disconnect(this, core::mem::transmute_copy(&ppin)).into() } unsafe extern "system" fn SetDefaultSyncSource(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20861,16 +20861,16 @@ pub struct IFilterGraph2_Vtbl { } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] pub trait IFilterGraph2_Impl: IGraphBuilder_Impl { - fn AddSourceFilterForMoniker(&self, pmoniker: Option<&super::super::System::Com::IMoniker>, pctx: Option<&super::super::System::Com::IBindCtx>, lpcwstrfiltername: &windows_core::PCWSTR) -> windows_core::Result; - fn ReconnectEx(&self, ppin: Option<&IPin>, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; - fn RenderEx(&self, ppinout: Option<&IPin>, dwflags: u32, pvcontext: *const u32) -> windows_core::Result<()>; + fn AddSourceFilterForMoniker(&self, pmoniker: windows_core::Ref<'_, super::super::System::Com::IMoniker>, pctx: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, lpcwstrfiltername: &windows_core::PCWSTR) -> windows_core::Result; + fn ReconnectEx(&self, ppin: windows_core::Ref<'_, IPin>, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; + fn RenderEx(&self, ppinout: windows_core::Ref<'_, IPin>, dwflags: u32, pvcontext: *const u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] impl IFilterGraph2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddSourceFilterForMoniker(this: *mut core::ffi::c_void, pmoniker: *mut core::ffi::c_void, pctx: *mut core::ffi::c_void, lpcwstrfiltername: windows_core::PCWSTR, ppfilter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFilterGraph2_Impl::AddSourceFilterForMoniker(this, windows_core::from_raw_borrowed(&pmoniker), windows_core::from_raw_borrowed(&pctx), core::mem::transmute(&lpcwstrfiltername)) { + match IFilterGraph2_Impl::AddSourceFilterForMoniker(this, core::mem::transmute_copy(&pmoniker), core::mem::transmute_copy(&pctx), core::mem::transmute(&lpcwstrfiltername)) { Ok(ok__) => { ppfilter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -20880,11 +20880,11 @@ impl IFilterGraph2_Vtbl { } unsafe extern "system" fn ReconnectEx(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterGraph2_Impl::ReconnectEx(this, windows_core::from_raw_borrowed(&ppin), core::mem::transmute_copy(&pmt)).into() + IFilterGraph2_Impl::ReconnectEx(this, core::mem::transmute_copy(&ppin), core::mem::transmute_copy(&pmt)).into() } unsafe extern "system" fn RenderEx(this: *mut core::ffi::c_void, ppinout: *mut core::ffi::c_void, dwflags: u32, pvcontext: *const u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterGraph2_Impl::RenderEx(this, windows_core::from_raw_borrowed(&ppinout), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pvcontext)).into() + IFilterGraph2_Impl::RenderEx(this, core::mem::transmute_copy(&ppinout), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pvcontext)).into() } Self { base__: IGraphBuilder_Vtbl::new::(), @@ -20928,14 +20928,14 @@ pub struct IFilterGraph3_Vtbl { } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] pub trait IFilterGraph3_Impl: IFilterGraph2_Impl { - fn SetSyncSourceEx(&self, pclockformostoffiltergraph: Option<&super::IReferenceClock>, pclockforfilter: Option<&super::IReferenceClock>, pfilter: Option<&IBaseFilter>) -> windows_core::Result<()>; + fn SetSyncSourceEx(&self, pclockformostoffiltergraph: windows_core::Ref<'_, super::IReferenceClock>, pclockforfilter: windows_core::Ref<'_, super::IReferenceClock>, pfilter: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] impl IFilterGraph3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSyncSourceEx(this: *mut core::ffi::c_void, pclockformostoffiltergraph: *mut core::ffi::c_void, pclockforfilter: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterGraph3_Impl::SetSyncSourceEx(this, windows_core::from_raw_borrowed(&pclockformostoffiltergraph), windows_core::from_raw_borrowed(&pclockforfilter), windows_core::from_raw_borrowed(&pfilter)).into() + IFilterGraph3_Impl::SetSyncSourceEx(this, core::mem::transmute_copy(&pclockformostoffiltergraph), core::mem::transmute_copy(&pclockforfilter), core::mem::transmute_copy(&pfilter)).into() } Self { base__: IFilterGraph2_Vtbl::new::(), SetSyncSourceEx: SetSyncSourceEx:: } } @@ -21174,7 +21174,7 @@ pub trait IFilterMapper_Impl: windows_core::IUnknownImpl { fn UnregisterFilter(&self, filter: &windows_core::GUID) -> windows_core::Result<()>; fn UnregisterFilterInstance(&self, mrid: &windows_core::GUID) -> windows_core::Result<()>; fn UnregisterPin(&self, filter: &windows_core::GUID, name: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn EnumMatchingFilters(&self, ppenum: *mut Option, dwmerit: u32, binputneeded: super::super::Foundation::BOOL, clsinmaj: &windows_core::GUID, clsinsub: &windows_core::GUID, brender: super::super::Foundation::BOOL, boututneeded: super::super::Foundation::BOOL, clsoutmaj: &windows_core::GUID, clsoutsub: &windows_core::GUID) -> windows_core::Result<()>; + fn EnumMatchingFilters(&self, ppenum: windows_core::OutRef<'_, IEnumRegFilters>, dwmerit: u32, binputneeded: super::super::Foundation::BOOL, clsinmaj: &windows_core::GUID, clsinsub: &windows_core::GUID, brender: super::super::Foundation::BOOL, boututneeded: super::super::Foundation::BOOL, clsoutmaj: &windows_core::GUID, clsoutsub: &windows_core::GUID) -> windows_core::Result<()>; } impl IFilterMapper_Vtbl { pub const fn new() -> Self { @@ -21297,8 +21297,8 @@ pub struct IFilterMapper2_Vtbl { pub trait IFilterMapper2_Impl: windows_core::IUnknownImpl { fn CreateCategory(&self, clsidcategory: *const windows_core::GUID, dwcategorymerit: u32, description: &windows_core::PCWSTR) -> windows_core::Result<()>; fn UnregisterFilter(&self, pclsidcategory: *const windows_core::GUID, szinstance: &windows_core::PCWSTR, filter: *const windows_core::GUID) -> windows_core::Result<()>; - fn RegisterFilter(&self, clsidfilter: *const windows_core::GUID, name: &windows_core::PCWSTR, ppmoniker: *mut Option, pclsidcategory: *const windows_core::GUID, szinstance: &windows_core::PCWSTR, prf2: *const REGFILTER2) -> windows_core::Result<()>; - fn EnumMatchingFilters(&self, ppenum: *mut Option, dwflags: u32, bexactmatch: super::super::Foundation::BOOL, dwmerit: u32, binputneeded: super::super::Foundation::BOOL, cinputtypes: u32, pinputtypes: *const windows_core::GUID, pmedin: *const REGPINMEDIUM, ppincategoryin: *const windows_core::GUID, brender: super::super::Foundation::BOOL, boutputneeded: super::super::Foundation::BOOL, coutputtypes: u32, poutputtypes: *const windows_core::GUID, pmedout: *const REGPINMEDIUM, ppincategoryout: *const windows_core::GUID) -> windows_core::Result<()>; + fn RegisterFilter(&self, clsidfilter: *const windows_core::GUID, name: &windows_core::PCWSTR, ppmoniker: windows_core::OutRef<'_, super::super::System::Com::IMoniker>, pclsidcategory: *const windows_core::GUID, szinstance: &windows_core::PCWSTR, prf2: *const REGFILTER2) -> windows_core::Result<()>; + fn EnumMatchingFilters(&self, ppenum: windows_core::OutRef<'_, super::super::System::Com::IEnumMoniker>, dwflags: u32, bexactmatch: super::super::Foundation::BOOL, dwmerit: u32, binputneeded: super::super::Foundation::BOOL, cinputtypes: u32, pinputtypes: *const windows_core::GUID, pmedin: *const REGPINMEDIUM, ppincategoryin: *const windows_core::GUID, brender: super::super::Foundation::BOOL, boutputneeded: super::super::Foundation::BOOL, coutputtypes: u32, poutputtypes: *const windows_core::GUID, pmedout: *const REGPINMEDIUM, ppincategoryout: *const windows_core::GUID) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IFilterMapper2_Vtbl { @@ -21907,8 +21907,8 @@ pub struct IGraphBuilder_Vtbl { } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] pub trait IGraphBuilder_Impl: IFilterGraph_Impl { - fn Connect(&self, ppinout: Option<&IPin>, ppinin: Option<&IPin>) -> windows_core::Result<()>; - fn Render(&self, ppinout: Option<&IPin>) -> windows_core::Result<()>; + fn Connect(&self, ppinout: windows_core::Ref<'_, IPin>, ppinin: windows_core::Ref<'_, IPin>) -> windows_core::Result<()>; + fn Render(&self, ppinout: windows_core::Ref<'_, IPin>) -> windows_core::Result<()>; fn RenderFile(&self, lpcwstrfile: &windows_core::PCWSTR, lpcwstrplaylist: &windows_core::PCWSTR) -> windows_core::Result<()>; fn AddSourceFilter(&self, lpcwstrfilename: &windows_core::PCWSTR, lpcwstrfiltername: &windows_core::PCWSTR) -> windows_core::Result; fn SetLogFile(&self, hfile: usize) -> windows_core::Result<()>; @@ -21920,11 +21920,11 @@ impl IGraphBuilder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, ppinout: *mut core::ffi::c_void, ppinin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGraphBuilder_Impl::Connect(this, windows_core::from_raw_borrowed(&ppinout), windows_core::from_raw_borrowed(&ppinin)).into() + IGraphBuilder_Impl::Connect(this, core::mem::transmute_copy(&ppinout), core::mem::transmute_copy(&ppinin)).into() } unsafe extern "system" fn Render(this: *mut core::ffi::c_void, ppinout: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGraphBuilder_Impl::Render(this, windows_core::from_raw_borrowed(&ppinout)).into() + IGraphBuilder_Impl::Render(this, core::mem::transmute_copy(&ppinout)).into() } unsafe extern "system" fn RenderFile(this: *mut core::ffi::c_void, lpcwstrfile: windows_core::PCWSTR, lpcwstrplaylist: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22073,31 +22073,31 @@ pub struct IGraphConfig_Vtbl { } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] pub trait IGraphConfig_Impl: windows_core::IUnknownImpl { - fn Reconnect(&self, poutputpin: Option<&IPin>, pinputpin: Option<&IPin>, pmtfirstconnection: *const super::MediaFoundation::AM_MEDIA_TYPE, pusingfilter: Option<&IBaseFilter>, habortevent: super::super::Foundation::HANDLE, dwflags: u32) -> windows_core::Result<()>; - fn Reconfigure(&self, pcallback: Option<&IGraphConfigCallback>, pvcontext: *const core::ffi::c_void, dwflags: u32, habortevent: super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn AddFilterToCache(&self, pfilter: Option<&IBaseFilter>) -> windows_core::Result<()>; + fn Reconnect(&self, poutputpin: windows_core::Ref<'_, IPin>, pinputpin: windows_core::Ref<'_, IPin>, pmtfirstconnection: *const super::MediaFoundation::AM_MEDIA_TYPE, pusingfilter: windows_core::Ref<'_, IBaseFilter>, habortevent: super::super::Foundation::HANDLE, dwflags: u32) -> windows_core::Result<()>; + fn Reconfigure(&self, pcallback: windows_core::Ref<'_, IGraphConfigCallback>, pvcontext: *const core::ffi::c_void, dwflags: u32, habortevent: super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn AddFilterToCache(&self, pfilter: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; fn EnumCacheFilter(&self) -> windows_core::Result; - fn RemoveFilterFromCache(&self, pfilter: Option<&IBaseFilter>) -> windows_core::Result<()>; + fn RemoveFilterFromCache(&self, pfilter: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result<()>; fn GetStartTime(&self) -> windows_core::Result; - fn PushThroughData(&self, poutputpin: Option<&IPin>, pconnection: Option<&IPinConnection>, heventabort: super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn SetFilterFlags(&self, pfilter: Option<&IBaseFilter>, dwflags: u32) -> windows_core::Result<()>; - fn GetFilterFlags(&self, pfilter: Option<&IBaseFilter>) -> windows_core::Result; - fn RemoveFilterEx(&self, pfilter: Option<&IBaseFilter>, flags: u32) -> windows_core::Result<()>; + fn PushThroughData(&self, poutputpin: windows_core::Ref<'_, IPin>, pconnection: windows_core::Ref<'_, IPinConnection>, heventabort: super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn SetFilterFlags(&self, pfilter: windows_core::Ref<'_, IBaseFilter>, dwflags: u32) -> windows_core::Result<()>; + fn GetFilterFlags(&self, pfilter: windows_core::Ref<'_, IBaseFilter>) -> windows_core::Result; + fn RemoveFilterEx(&self, pfilter: windows_core::Ref<'_, IBaseFilter>, flags: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] impl IGraphConfig_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Reconnect(this: *mut core::ffi::c_void, poutputpin: *mut core::ffi::c_void, pinputpin: *mut core::ffi::c_void, pmtfirstconnection: *const super::MediaFoundation::AM_MEDIA_TYPE, pusingfilter: *mut core::ffi::c_void, habortevent: super::super::Foundation::HANDLE, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGraphConfig_Impl::Reconnect(this, windows_core::from_raw_borrowed(&poutputpin), windows_core::from_raw_borrowed(&pinputpin), core::mem::transmute_copy(&pmtfirstconnection), windows_core::from_raw_borrowed(&pusingfilter), core::mem::transmute_copy(&habortevent), core::mem::transmute_copy(&dwflags)).into() + IGraphConfig_Impl::Reconnect(this, core::mem::transmute_copy(&poutputpin), core::mem::transmute_copy(&pinputpin), core::mem::transmute_copy(&pmtfirstconnection), core::mem::transmute_copy(&pusingfilter), core::mem::transmute_copy(&habortevent), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn Reconfigure(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void, dwflags: u32, habortevent: super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGraphConfig_Impl::Reconfigure(this, windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&habortevent)).into() + IGraphConfig_Impl::Reconfigure(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&habortevent)).into() } unsafe extern "system" fn AddFilterToCache(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGraphConfig_Impl::AddFilterToCache(this, windows_core::from_raw_borrowed(&pfilter)).into() + IGraphConfig_Impl::AddFilterToCache(this, core::mem::transmute_copy(&pfilter)).into() } unsafe extern "system" fn EnumCacheFilter(this: *mut core::ffi::c_void, penum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22111,7 +22111,7 @@ impl IGraphConfig_Vtbl { } unsafe extern "system" fn RemoveFilterFromCache(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGraphConfig_Impl::RemoveFilterFromCache(this, windows_core::from_raw_borrowed(&pfilter)).into() + IGraphConfig_Impl::RemoveFilterFromCache(this, core::mem::transmute_copy(&pfilter)).into() } unsafe extern "system" fn GetStartTime(this: *mut core::ffi::c_void, prtstart: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22125,15 +22125,15 @@ impl IGraphConfig_Vtbl { } unsafe extern "system" fn PushThroughData(this: *mut core::ffi::c_void, poutputpin: *mut core::ffi::c_void, pconnection: *mut core::ffi::c_void, heventabort: super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGraphConfig_Impl::PushThroughData(this, windows_core::from_raw_borrowed(&poutputpin), windows_core::from_raw_borrowed(&pconnection), core::mem::transmute_copy(&heventabort)).into() + IGraphConfig_Impl::PushThroughData(this, core::mem::transmute_copy(&poutputpin), core::mem::transmute_copy(&pconnection), core::mem::transmute_copy(&heventabort)).into() } unsafe extern "system" fn SetFilterFlags(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGraphConfig_Impl::SetFilterFlags(this, windows_core::from_raw_borrowed(&pfilter), core::mem::transmute_copy(&dwflags)).into() + IGraphConfig_Impl::SetFilterFlags(this, core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn GetFilterFlags(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGraphConfig_Impl::GetFilterFlags(this, windows_core::from_raw_borrowed(&pfilter)) { + match IGraphConfig_Impl::GetFilterFlags(this, core::mem::transmute_copy(&pfilter)) { Ok(ok__) => { pdwflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -22143,7 +22143,7 @@ impl IGraphConfig_Vtbl { } unsafe extern "system" fn RemoveFilterEx(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void, flags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGraphConfig_Impl::RemoveFilterEx(this, windows_core::from_raw_borrowed(&pfilter), core::mem::transmute_copy(&flags)).into() + IGraphConfig_Impl::RemoveFilterEx(this, core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&flags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -22808,7 +22808,7 @@ pub trait IMediaFilter_Impl: super::super::System::Com::IPersist_Impl { fn Pause(&self) -> windows_core::Result<()>; fn Run(&self, tstart: i64) -> windows_core::Result<()>; fn GetState(&self, dwmillisecstimeout: u32) -> windows_core::Result; - fn SetSyncSource(&self, pclock: Option<&super::IReferenceClock>) -> windows_core::Result<()>; + fn SetSyncSource(&self, pclock: windows_core::Ref<'_, super::IReferenceClock>) -> windows_core::Result<()>; fn GetSyncSource(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -22838,7 +22838,7 @@ impl IMediaFilter_Vtbl { } unsafe extern "system" fn SetSyncSource(this: *mut core::ffi::c_void, pclock: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaFilter_Impl::SetSyncSource(this, windows_core::from_raw_borrowed(&pclock)).into() + IMediaFilter_Impl::SetSyncSource(this, core::mem::transmute_copy(&pclock)).into() } unsafe extern "system" fn GetSyncSource(this: *mut core::ffi::c_void, pclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -23878,9 +23878,9 @@ pub struct IMediaStream_Vtbl { pub trait IMediaStream_Impl: windows_core::IUnknownImpl { fn GetMultiMediaStream(&self) -> windows_core::Result; fn GetInformation(&self, ppurposeid: *mut windows_core::GUID, ptype: *mut STREAM_TYPE) -> windows_core::Result<()>; - fn SetSameFormat(&self, pstreamthathasdesiredformat: Option<&IMediaStream>, dwflags: u32) -> windows_core::Result<()>; + fn SetSameFormat(&self, pstreamthathasdesiredformat: windows_core::Ref<'_, IMediaStream>, dwflags: u32) -> windows_core::Result<()>; fn AllocateSample(&self, dwflags: u32) -> windows_core::Result; - fn CreateSharedSample(&self, pexistingsample: Option<&IStreamSample>, dwflags: u32) -> windows_core::Result; + fn CreateSharedSample(&self, pexistingsample: windows_core::Ref<'_, IStreamSample>, dwflags: u32) -> windows_core::Result; fn SendEndOfStream(&self, dwflags: u32) -> windows_core::Result<()>; } impl IMediaStream_Vtbl { @@ -23901,7 +23901,7 @@ impl IMediaStream_Vtbl { } unsafe extern "system" fn SetSameFormat(this: *mut core::ffi::c_void, pstreamthathasdesiredformat: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaStream_Impl::SetSameFormat(this, windows_core::from_raw_borrowed(&pstreamthathasdesiredformat), core::mem::transmute_copy(&dwflags)).into() + IMediaStream_Impl::SetSameFormat(this, core::mem::transmute_copy(&pstreamthathasdesiredformat), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn AllocateSample(this: *mut core::ffi::c_void, dwflags: u32, ppsample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -23915,7 +23915,7 @@ impl IMediaStream_Vtbl { } unsafe extern "system" fn CreateSharedSample(this: *mut core::ffi::c_void, pexistingsample: *mut core::ffi::c_void, dwflags: u32, ppnewsample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMediaStream_Impl::CreateSharedSample(this, windows_core::from_raw_borrowed(&pexistingsample), core::mem::transmute_copy(&dwflags)) { + match IMediaStream_Impl::CreateSharedSample(this, core::mem::transmute_copy(&pexistingsample), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppnewsample.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24005,7 +24005,7 @@ pub struct IMediaStreamFilter_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IMediaStreamFilter_Impl: IBaseFilter_Impl { - fn AddMediaStream(&self, pammediastream: Option<&IAMMediaStream>) -> windows_core::Result<()>; + fn AddMediaStream(&self, pammediastream: windows_core::Ref<'_, IAMMediaStream>) -> windows_core::Result<()>; fn GetMediaStream(&self, idpurpose: *const windows_core::GUID) -> windows_core::Result; fn EnumMediaStreams(&self, index: i32) -> windows_core::Result; fn SupportSeeking(&self, brenderer: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -24020,7 +24020,7 @@ impl IMediaStreamFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddMediaStream(this: *mut core::ffi::c_void, pammediastream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaStreamFilter_Impl::AddMediaStream(this, windows_core::from_raw_borrowed(&pammediastream)).into() + IMediaStreamFilter_Impl::AddMediaStream(this, core::mem::transmute_copy(&pammediastream)).into() } unsafe extern "system" fn GetMediaStream(this: *mut core::ffi::c_void, idpurpose: *const windows_core::GUID, ppmediastream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24202,8 +24202,8 @@ pub trait IMemAllocator_Impl: windows_core::IUnknownImpl { fn GetProperties(&self) -> windows_core::Result; fn Commit(&self) -> windows_core::Result<()>; fn Decommit(&self) -> windows_core::Result<()>; - fn GetBuffer(&self, ppbuffer: *mut Option, pstarttime: *const i64, pendtime: *const i64, dwflags: u32) -> windows_core::Result<()>; - fn ReleaseBuffer(&self, pbuffer: Option<&IMediaSample>) -> windows_core::Result<()>; + fn GetBuffer(&self, ppbuffer: windows_core::OutRef<'_, IMediaSample>, pstarttime: *const i64, pendtime: *const i64, dwflags: u32) -> windows_core::Result<()>; + fn ReleaseBuffer(&self, pbuffer: windows_core::Ref<'_, IMediaSample>) -> windows_core::Result<()>; } impl IMemAllocator_Vtbl { pub const fn new() -> Self { @@ -24241,7 +24241,7 @@ impl IMemAllocator_Vtbl { } unsafe extern "system" fn ReleaseBuffer(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMemAllocator_Impl::ReleaseBuffer(this, windows_core::from_raw_borrowed(&pbuffer)).into() + IMemAllocator_Impl::ReleaseBuffer(this, core::mem::transmute_copy(&pbuffer)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -24285,14 +24285,14 @@ pub struct IMemAllocatorCallbackTemp_Vtbl { pub GetFreeCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT, } pub trait IMemAllocatorCallbackTemp_Impl: IMemAllocator_Impl { - fn SetNotify(&self, pnotify: Option<&IMemAllocatorNotifyCallbackTemp>) -> windows_core::Result<()>; + fn SetNotify(&self, pnotify: windows_core::Ref<'_, IMemAllocatorNotifyCallbackTemp>) -> windows_core::Result<()>; fn GetFreeCount(&self) -> windows_core::Result; } impl IMemAllocatorCallbackTemp_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetNotify(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMemAllocatorCallbackTemp_Impl::SetNotify(this, windows_core::from_raw_borrowed(&pnotify)).into() + IMemAllocatorCallbackTemp_Impl::SetNotify(this, core::mem::transmute_copy(&pnotify)).into() } unsafe extern "system" fn GetFreeCount(this: *mut core::ffi::c_void, plbuffersfree: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24382,9 +24382,9 @@ pub struct IMemInputPin_Vtbl { } pub trait IMemInputPin_Impl: windows_core::IUnknownImpl { fn GetAllocator(&self) -> windows_core::Result; - fn NotifyAllocator(&self, pallocator: Option<&IMemAllocator>, breadonly: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn NotifyAllocator(&self, pallocator: windows_core::Ref<'_, IMemAllocator>, breadonly: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetAllocatorRequirements(&self) -> windows_core::Result; - fn Receive(&self, psample: Option<&IMediaSample>) -> windows_core::Result<()>; + fn Receive(&self, psample: windows_core::Ref<'_, IMediaSample>) -> windows_core::Result<()>; fn ReceiveMultiple(&self, psamples: *const Option, nsamples: i32) -> windows_core::Result; fn ReceiveCanBlock(&self) -> windows_core::Result<()>; } @@ -24402,7 +24402,7 @@ impl IMemInputPin_Vtbl { } unsafe extern "system" fn NotifyAllocator(this: *mut core::ffi::c_void, pallocator: *mut core::ffi::c_void, breadonly: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMemInputPin_Impl::NotifyAllocator(this, windows_core::from_raw_borrowed(&pallocator), core::mem::transmute_copy(&breadonly)).into() + IMemInputPin_Impl::NotifyAllocator(this, core::mem::transmute_copy(&pallocator), core::mem::transmute_copy(&breadonly)).into() } unsafe extern "system" fn GetAllocatorRequirements(this: *mut core::ffi::c_void, pprops: *mut ALLOCATOR_PROPERTIES) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24416,7 +24416,7 @@ impl IMemInputPin_Vtbl { } unsafe extern "system" fn Receive(this: *mut core::ffi::c_void, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMemInputPin_Impl::Receive(this, windows_core::from_raw_borrowed(&psample)).into() + IMemInputPin_Impl::Receive(this, core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn ReceiveMultiple(this: *mut core::ffi::c_void, psamples: *const *mut core::ffi::c_void, nsamples: i32, nsamplesprocessed: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24554,7 +24554,7 @@ pub trait IMixerOCX_Impl: windows_core::IUnknownImpl { fn GetStatus(&self) -> windows_core::Result<*mut u32>; fn OnDraw(&self, hdcdraw: super::super::Graphics::Gdi::HDC, prcdraw: *const super::super::Foundation::RECT) -> windows_core::Result<()>; fn SetDrawRegion(&self, lppttopleftsc: *const super::super::Foundation::POINT, prcdrawcc: *const super::super::Foundation::RECT, lprcclip: *const super::super::Foundation::RECT) -> windows_core::Result<()>; - fn Advise(&self, pmdns: Option<&IMixerOCXNotify>) -> windows_core::Result<()>; + fn Advise(&self, pmdns: windows_core::Ref<'_, IMixerOCXNotify>) -> windows_core::Result<()>; fn UnAdvise(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -24592,7 +24592,7 @@ impl IMixerOCX_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pmdns: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMixerOCX_Impl::Advise(this, windows_core::from_raw_borrowed(&pmdns)).into() + IMixerOCX_Impl::Advise(this, core::mem::transmute_copy(&pmdns)).into() } unsafe extern "system" fn UnAdvise(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25370,7 +25370,7 @@ pub trait IOverlay_Impl: windows_core::IUnknownImpl { fn GetWindowHandle(&self) -> windows_core::Result; fn GetClipList(&self, psourcerect: *mut super::super::Foundation::RECT, pdestinationrect: *mut super::super::Foundation::RECT, pprgndata: *mut *mut super::super::Graphics::Gdi::RGNDATA) -> windows_core::Result<()>; fn GetVideoPosition(&self, psourcerect: *mut super::super::Foundation::RECT, pdestinationrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; - fn Advise(&self, poverlaynotify: Option<&IOverlayNotify>, dwinterests: u32) -> windows_core::Result<()>; + fn Advise(&self, poverlaynotify: windows_core::Ref<'_, IOverlayNotify>, dwinterests: u32) -> windows_core::Result<()>; fn Unadvise(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -25428,7 +25428,7 @@ impl IOverlay_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, poverlaynotify: *mut core::ffi::c_void, dwinterests: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOverlay_Impl::Advise(this, windows_core::from_raw_borrowed(&poverlaynotify), core::mem::transmute_copy(&dwinterests)).into() + IOverlay_Impl::Advise(this, core::mem::transmute_copy(&poverlaynotify), core::mem::transmute_copy(&dwinterests)).into() } unsafe extern "system" fn Unadvise(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25616,8 +25616,8 @@ pub struct IPersistMediaPropertyBag_Vtbl { #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait IPersistMediaPropertyBag_Impl: super::super::System::Com::IPersist_Impl { fn InitNew(&self) -> windows_core::Result<()>; - fn Load(&self, ppropbag: Option<&IMediaPropertyBag>, perrorlog: Option<&super::super::System::Com::IErrorLog>) -> windows_core::Result<()>; - fn Save(&self, ppropbag: Option<&IMediaPropertyBag>, fcleardirty: super::super::Foundation::BOOL, fsaveallproperties: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Load(&self, ppropbag: windows_core::Ref<'_, IMediaPropertyBag>, perrorlog: windows_core::Ref<'_, super::super::System::Com::IErrorLog>) -> windows_core::Result<()>; + fn Save(&self, ppropbag: windows_core::Ref<'_, IMediaPropertyBag>, fcleardirty: super::super::Foundation::BOOL, fsaveallproperties: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl IPersistMediaPropertyBag_Vtbl { @@ -25628,11 +25628,11 @@ impl IPersistMediaPropertyBag_Vtbl { } unsafe extern "system" fn Load(this: *mut core::ffi::c_void, ppropbag: *mut core::ffi::c_void, perrorlog: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistMediaPropertyBag_Impl::Load(this, windows_core::from_raw_borrowed(&ppropbag), windows_core::from_raw_borrowed(&perrorlog)).into() + IPersistMediaPropertyBag_Impl::Load(this, core::mem::transmute_copy(&ppropbag), core::mem::transmute_copy(&perrorlog)).into() } unsafe extern "system" fn Save(this: *mut core::ffi::c_void, ppropbag: *mut core::ffi::c_void, fcleardirty: super::super::Foundation::BOOL, fsaveallproperties: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistMediaPropertyBag_Impl::Save(this, windows_core::from_raw_borrowed(&ppropbag), core::mem::transmute_copy(&fcleardirty), core::mem::transmute_copy(&fsaveallproperties)).into() + IPersistMediaPropertyBag_Impl::Save(this, core::mem::transmute_copy(&ppropbag), core::mem::transmute_copy(&fcleardirty), core::mem::transmute_copy(&fsaveallproperties)).into() } Self { base__: super::super::System::Com::IPersist_Vtbl::new::(), @@ -25747,8 +25747,8 @@ pub struct IPin_Vtbl { } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_System_Com"))] pub trait IPin_Impl: windows_core::IUnknownImpl { - fn Connect(&self, preceivepin: Option<&IPin>, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; - fn ReceiveConnection(&self, pconnector: Option<&IPin>, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; + fn Connect(&self, preceivepin: windows_core::Ref<'_, IPin>, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; + fn ReceiveConnection(&self, pconnector: windows_core::Ref<'_, IPin>, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; fn Disconnect(&self) -> windows_core::Result<()>; fn ConnectedTo(&self) -> windows_core::Result; fn ConnectionMediaType(&self, pmt: *mut super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; @@ -25757,7 +25757,7 @@ pub trait IPin_Impl: windows_core::IUnknownImpl { fn QueryId(&self) -> windows_core::Result; fn QueryAccept(&self, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::HRESULT; fn EnumMediaTypes(&self) -> windows_core::Result; - fn QueryInternalConnections(&self, appin: *mut Option, npin: *mut u32) -> windows_core::Result<()>; + fn QueryInternalConnections(&self, appin: windows_core::OutRef<'_, IPin>, npin: *mut u32) -> windows_core::Result<()>; fn EndOfStream(&self) -> windows_core::Result<()>; fn BeginFlush(&self) -> windows_core::Result<()>; fn EndFlush(&self) -> windows_core::Result<()>; @@ -25768,11 +25768,11 @@ impl IPin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, preceivepin: *mut core::ffi::c_void, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPin_Impl::Connect(this, windows_core::from_raw_borrowed(&preceivepin), core::mem::transmute_copy(&pmt)).into() + IPin_Impl::Connect(this, core::mem::transmute_copy(&preceivepin), core::mem::transmute_copy(&pmt)).into() } unsafe extern "system" fn ReceiveConnection(this: *mut core::ffi::c_void, pconnector: *mut core::ffi::c_void, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPin_Impl::ReceiveConnection(this, windows_core::from_raw_borrowed(&pconnector), core::mem::transmute_copy(&pmt)).into() + IPin_Impl::ReceiveConnection(this, core::mem::transmute_copy(&pconnector), core::mem::transmute_copy(&pmt)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -26070,9 +26070,9 @@ pub trait IPinInfo_Impl: super::super::System::Com::IDispatch_Impl { fn Direction(&self) -> windows_core::Result; fn PinID(&self) -> windows_core::Result; fn MediaTypes(&self) -> windows_core::Result; - fn Connect(&self, ppin: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn ConnectDirect(&self, ppin: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn ConnectWithType(&self, ppin: Option<&windows_core::IUnknown>, pmediatype: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn Connect(&self, ppin: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn ConnectDirect(&self, ppin: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn ConnectWithType(&self, ppin: windows_core::Ref<'_, windows_core::IUnknown>, pmediatype: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn Disconnect(&self) -> windows_core::Result<()>; fn Render(&self) -> windows_core::Result<()>; } @@ -26161,15 +26161,15 @@ impl IPinInfo_Vtbl { } unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPinInfo_Impl::Connect(this, windows_core::from_raw_borrowed(&ppin)).into() + IPinInfo_Impl::Connect(this, core::mem::transmute_copy(&ppin)).into() } unsafe extern "system" fn ConnectDirect(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPinInfo_Impl::ConnectDirect(this, windows_core::from_raw_borrowed(&ppin)).into() + IPinInfo_Impl::ConnectDirect(this, core::mem::transmute_copy(&ppin)).into() } unsafe extern "system" fn ConnectWithType(this: *mut core::ffi::c_void, ppin: *mut core::ffi::c_void, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPinInfo_Impl::ConnectWithType(this, windows_core::from_raw_borrowed(&ppin), windows_core::from_raw_borrowed(&pmediatype)).into() + IPinInfo_Impl::ConnectWithType(this, core::mem::transmute_copy(&ppin), core::mem::transmute_copy(&pmediatype)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -26353,19 +26353,19 @@ pub struct IQualityControl_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IQualityControl_Impl: windows_core::IUnknownImpl { - fn Notify(&self, pself: Option<&IBaseFilter>, q: &Quality) -> windows_core::Result<()>; - fn SetSink(&self, piqc: Option<&IQualityControl>) -> windows_core::Result<()>; + fn Notify(&self, pself: windows_core::Ref<'_, IBaseFilter>, q: &Quality) -> windows_core::Result<()>; + fn SetSink(&self, piqc: windows_core::Ref<'_, IQualityControl>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IQualityControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Notify(this: *mut core::ffi::c_void, pself: *mut core::ffi::c_void, q: Quality) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IQualityControl_Impl::Notify(this, windows_core::from_raw_borrowed(&pself), core::mem::transmute(&q)).into() + IQualityControl_Impl::Notify(this, core::mem::transmute_copy(&pself), core::mem::transmute(&q)).into() } unsafe extern "system" fn SetSink(this: *mut core::ffi::c_void, piqc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IQualityControl_Impl::SetSink(this, windows_core::from_raw_borrowed(&piqc)).into() + IQualityControl_Impl::SetSink(this, core::mem::transmute_copy(&piqc)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Notify: Notify::, SetSink: SetSink:: } } @@ -26401,8 +26401,8 @@ pub struct IQueueCommand_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IQueueCommand_Impl: windows_core::IUnknownImpl { - fn InvokeAtStreamTime(&self, pcmd: *mut Option, time: f64, iid: *const windows_core::GUID, dispidmethod: i32, wflags: i16, cargs: i32, pdispparams: *const super::super::System::Variant::VARIANT, pvarresult: *mut super::super::System::Variant::VARIANT, puargerr: *mut i16) -> windows_core::Result<()>; - fn InvokeAtPresentationTime(&self, pcmd: *mut Option, time: f64, iid: *const windows_core::GUID, dispidmethod: i32, wflags: i16, cargs: i32, pdispparams: *const super::super::System::Variant::VARIANT, pvarresult: *mut super::super::System::Variant::VARIANT, puargerr: *mut i16) -> windows_core::Result<()>; + fn InvokeAtStreamTime(&self, pcmd: windows_core::OutRef<'_, IDeferredCommand>, time: f64, iid: *const windows_core::GUID, dispidmethod: i32, wflags: i16, cargs: i32, pdispparams: *const super::super::System::Variant::VARIANT, pvarresult: *mut super::super::System::Variant::VARIANT, puargerr: *mut i16) -> windows_core::Result<()>; + fn InvokeAtPresentationTime(&self, pcmd: windows_core::OutRef<'_, IDeferredCommand>, time: f64, iid: *const windows_core::GUID, dispidmethod: i32, wflags: i16, cargs: i32, pdispparams: *const super::super::System::Variant::VARIANT, pvarresult: *mut super::super::System::Variant::VARIANT, puargerr: *mut i16) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IQueueCommand_Vtbl { @@ -26509,13 +26509,13 @@ pub struct IRegisterServiceProvider_Vtbl { pub RegisterService: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRegisterServiceProvider_Impl: windows_core::IUnknownImpl { - fn RegisterService(&self, guidservice: *const windows_core::GUID, punkobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn RegisterService(&self, guidservice: *const windows_core::GUID, punkobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IRegisterServiceProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterService(this: *mut core::ffi::c_void, guidservice: *const windows_core::GUID, punkobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRegisterServiceProvider_Impl::RegisterService(this, core::mem::transmute_copy(&guidservice), windows_core::from_raw_borrowed(&punkobject)).into() + IRegisterServiceProvider_Impl::RegisterService(this, core::mem::transmute_copy(&guidservice), core::mem::transmute_copy(&punkobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), RegisterService: RegisterService:: } } @@ -26635,12 +26635,12 @@ pub struct IResourceManager_Vtbl { pub trait IResourceManager_Impl: windows_core::IUnknownImpl { fn Register(&self, pname: &windows_core::PCWSTR, cresource: i32) -> windows_core::Result; fn RegisterGroup(&self, pname: &windows_core::PCWSTR, cresource: i32, paltokens: *const i32) -> windows_core::Result; - fn RequestResource(&self, idresource: i32, pfocusobject: Option<&windows_core::IUnknown>, pconsumer: Option<&IResourceConsumer>) -> windows_core::Result<()>; - fn NotifyAcquire(&self, idresource: i32, pconsumer: Option<&IResourceConsumer>, hr: windows_core::HRESULT) -> windows_core::Result<()>; - fn NotifyRelease(&self, idresource: i32, pconsumer: Option<&IResourceConsumer>, bstillwant: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn CancelRequest(&self, idresource: i32, pconsumer: Option<&IResourceConsumer>) -> windows_core::Result<()>; - fn SetFocus(&self, pfocusobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn ReleaseFocus(&self, pfocusobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn RequestResource(&self, idresource: i32, pfocusobject: windows_core::Ref<'_, windows_core::IUnknown>, pconsumer: windows_core::Ref<'_, IResourceConsumer>) -> windows_core::Result<()>; + fn NotifyAcquire(&self, idresource: i32, pconsumer: windows_core::Ref<'_, IResourceConsumer>, hr: windows_core::HRESULT) -> windows_core::Result<()>; + fn NotifyRelease(&self, idresource: i32, pconsumer: windows_core::Ref<'_, IResourceConsumer>, bstillwant: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn CancelRequest(&self, idresource: i32, pconsumer: windows_core::Ref<'_, IResourceConsumer>) -> windows_core::Result<()>; + fn SetFocus(&self, pfocusobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn ReleaseFocus(&self, pfocusobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IResourceManager_Vtbl { pub const fn new() -> Self { @@ -26666,27 +26666,27 @@ impl IResourceManager_Vtbl { } unsafe extern "system" fn RequestResource(this: *mut core::ffi::c_void, idresource: i32, pfocusobject: *mut core::ffi::c_void, pconsumer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResourceManager_Impl::RequestResource(this, core::mem::transmute_copy(&idresource), windows_core::from_raw_borrowed(&pfocusobject), windows_core::from_raw_borrowed(&pconsumer)).into() + IResourceManager_Impl::RequestResource(this, core::mem::transmute_copy(&idresource), core::mem::transmute_copy(&pfocusobject), core::mem::transmute_copy(&pconsumer)).into() } unsafe extern "system" fn NotifyAcquire(this: *mut core::ffi::c_void, idresource: i32, pconsumer: *mut core::ffi::c_void, hr: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResourceManager_Impl::NotifyAcquire(this, core::mem::transmute_copy(&idresource), windows_core::from_raw_borrowed(&pconsumer), core::mem::transmute_copy(&hr)).into() + IResourceManager_Impl::NotifyAcquire(this, core::mem::transmute_copy(&idresource), core::mem::transmute_copy(&pconsumer), core::mem::transmute_copy(&hr)).into() } unsafe extern "system" fn NotifyRelease(this: *mut core::ffi::c_void, idresource: i32, pconsumer: *mut core::ffi::c_void, bstillwant: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResourceManager_Impl::NotifyRelease(this, core::mem::transmute_copy(&idresource), windows_core::from_raw_borrowed(&pconsumer), core::mem::transmute_copy(&bstillwant)).into() + IResourceManager_Impl::NotifyRelease(this, core::mem::transmute_copy(&idresource), core::mem::transmute_copy(&pconsumer), core::mem::transmute_copy(&bstillwant)).into() } unsafe extern "system" fn CancelRequest(this: *mut core::ffi::c_void, idresource: i32, pconsumer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResourceManager_Impl::CancelRequest(this, core::mem::transmute_copy(&idresource), windows_core::from_raw_borrowed(&pconsumer)).into() + IResourceManager_Impl::CancelRequest(this, core::mem::transmute_copy(&idresource), core::mem::transmute_copy(&pconsumer)).into() } unsafe extern "system" fn SetFocus(this: *mut core::ffi::c_void, pfocusobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResourceManager_Impl::SetFocus(this, windows_core::from_raw_borrowed(&pfocusobject)).into() + IResourceManager_Impl::SetFocus(this, core::mem::transmute_copy(&pfocusobject)).into() } unsafe extern "system" fn ReleaseFocus(this: *mut core::ffi::c_void, pfocusobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResourceManager_Impl::ReleaseFocus(this, windows_core::from_raw_borrowed(&pfocusobject)).into() + IResourceManager_Impl::ReleaseFocus(this, core::mem::transmute_copy(&pfocusobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -26748,13 +26748,13 @@ pub struct ISeekingPassThru_Vtbl { pub Init: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::BOOL, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISeekingPassThru_Impl: windows_core::IUnknownImpl { - fn Init(&self, bsupportrendering: super::super::Foundation::BOOL, ppin: Option<&IPin>) -> windows_core::Result<()>; + fn Init(&self, bsupportrendering: super::super::Foundation::BOOL, ppin: windows_core::Ref<'_, IPin>) -> windows_core::Result<()>; } impl ISeekingPassThru_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, bsupportrendering: super::super::Foundation::BOOL, ppin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISeekingPassThru_Impl::Init(this, core::mem::transmute_copy(&bsupportrendering), windows_core::from_raw_borrowed(&ppin)).into() + ISeekingPassThru_Impl::Init(this, core::mem::transmute_copy(&bsupportrendering), core::mem::transmute_copy(&ppin)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Init: Init:: } } @@ -26895,18 +26895,18 @@ pub struct IStreamBuilder_Vtbl { pub Backout: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IStreamBuilder_Impl: windows_core::IUnknownImpl { - fn Render(&self, ppinout: Option<&IPin>, pgraph: Option<&IGraphBuilder>) -> windows_core::Result<()>; - fn Backout(&self, ppinout: Option<&IPin>, pgraph: Option<&IGraphBuilder>) -> windows_core::Result<()>; + fn Render(&self, ppinout: windows_core::Ref<'_, IPin>, pgraph: windows_core::Ref<'_, IGraphBuilder>) -> windows_core::Result<()>; + fn Backout(&self, ppinout: windows_core::Ref<'_, IPin>, pgraph: windows_core::Ref<'_, IGraphBuilder>) -> windows_core::Result<()>; } impl IStreamBuilder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Render(this: *mut core::ffi::c_void, ppinout: *mut core::ffi::c_void, pgraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStreamBuilder_Impl::Render(this, windows_core::from_raw_borrowed(&ppinout), windows_core::from_raw_borrowed(&pgraph)).into() + IStreamBuilder_Impl::Render(this, core::mem::transmute_copy(&ppinout), core::mem::transmute_copy(&pgraph)).into() } unsafe extern "system" fn Backout(this: *mut core::ffi::c_void, ppinout: *mut core::ffi::c_void, pgraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStreamBuilder_Impl::Backout(this, windows_core::from_raw_borrowed(&ppinout), windows_core::from_raw_borrowed(&pgraph)).into() + IStreamBuilder_Impl::Backout(this, core::mem::transmute_copy(&ppinout), core::mem::transmute_copy(&pgraph)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Render: Render::, Backout: Backout:: } } @@ -27351,7 +27351,7 @@ pub struct IVMRFilterConfig_Vtbl { pub GetRenderingMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IVMRFilterConfig_Impl: windows_core::IUnknownImpl { - fn SetImageCompositor(&self, lpvmrimgcompositor: Option<&IVMRImageCompositor>) -> windows_core::Result<()>; + fn SetImageCompositor(&self, lpvmrimgcompositor: windows_core::Ref<'_, IVMRImageCompositor>) -> windows_core::Result<()>; fn SetNumberOfStreams(&self, dwmaxstreams: u32) -> windows_core::Result<()>; fn GetNumberOfStreams(&self) -> windows_core::Result; fn SetRenderingPrefs(&self, dwrenderflags: u32) -> windows_core::Result<()>; @@ -27363,7 +27363,7 @@ impl IVMRFilterConfig_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetImageCompositor(this: *mut core::ffi::c_void, lpvmrimgcompositor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRFilterConfig_Impl::SetImageCompositor(this, windows_core::from_raw_borrowed(&lpvmrimgcompositor)).into() + IVMRFilterConfig_Impl::SetImageCompositor(this, core::mem::transmute_copy(&lpvmrimgcompositor)).into() } unsafe extern "system" fn SetNumberOfStreams(this: *mut core::ffi::c_void, dwmaxstreams: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -27466,7 +27466,7 @@ pub struct IVMRFilterConfig9_Vtbl { pub GetRenderingMode: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IVMRFilterConfig9_Impl: windows_core::IUnknownImpl { - fn SetImageCompositor(&self, lpvmrimgcompositor: Option<&IVMRImageCompositor9>) -> windows_core::Result<()>; + fn SetImageCompositor(&self, lpvmrimgcompositor: windows_core::Ref<'_, IVMRImageCompositor9>) -> windows_core::Result<()>; fn SetNumberOfStreams(&self, dwmaxstreams: u32) -> windows_core::Result<()>; fn GetNumberOfStreams(&self) -> windows_core::Result; fn SetRenderingPrefs(&self, dwrenderflags: u32) -> windows_core::Result<()>; @@ -27478,7 +27478,7 @@ impl IVMRFilterConfig9_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetImageCompositor(this: *mut core::ffi::c_void, lpvmrimgcompositor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRFilterConfig9_Impl::SetImageCompositor(this, windows_core::from_raw_borrowed(&lpvmrimgcompositor)).into() + IVMRFilterConfig9_Impl::SetImageCompositor(this, core::mem::transmute_copy(&lpvmrimgcompositor)).into() } unsafe extern "system" fn SetNumberOfStreams(this: *mut core::ffi::c_void, dwmaxstreams: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -27592,21 +27592,21 @@ pub struct IVMRImageCompositor_Vtbl { } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Media_MediaFoundation"))] pub trait IVMRImageCompositor_Impl: windows_core::IUnknownImpl { - fn InitCompositionTarget(&self, pd3ddevice: Option<&windows_core::IUnknown>, pddsrendertarget: Option<&super::super::Graphics::DirectDraw::IDirectDrawSurface7>) -> windows_core::Result<()>; - fn TermCompositionTarget(&self, pd3ddevice: Option<&windows_core::IUnknown>, pddsrendertarget: Option<&super::super::Graphics::DirectDraw::IDirectDrawSurface7>) -> windows_core::Result<()>; + fn InitCompositionTarget(&self, pd3ddevice: windows_core::Ref<'_, windows_core::IUnknown>, pddsrendertarget: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface7>) -> windows_core::Result<()>; + fn TermCompositionTarget(&self, pd3ddevice: windows_core::Ref<'_, windows_core::IUnknown>, pddsrendertarget: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface7>) -> windows_core::Result<()>; fn SetStreamMediaType(&self, dwstrmid: u32, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE, ftexture: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn CompositeImage(&self, pd3ddevice: Option<&windows_core::IUnknown>, pddsrendertarget: Option<&super::super::Graphics::DirectDraw::IDirectDrawSurface7>, pmtrendertarget: *const super::MediaFoundation::AM_MEDIA_TYPE, rtstart: i64, rtend: i64, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::Result<()>; + fn CompositeImage(&self, pd3ddevice: windows_core::Ref<'_, windows_core::IUnknown>, pddsrendertarget: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface7>, pmtrendertarget: *const super::MediaFoundation::AM_MEDIA_TYPE, rtstart: i64, rtend: i64, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Media_MediaFoundation"))] impl IVMRImageCompositor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitCompositionTarget(this: *mut core::ffi::c_void, pd3ddevice: *mut core::ffi::c_void, pddsrendertarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRImageCompositor_Impl::InitCompositionTarget(this, windows_core::from_raw_borrowed(&pd3ddevice), windows_core::from_raw_borrowed(&pddsrendertarget)).into() + IVMRImageCompositor_Impl::InitCompositionTarget(this, core::mem::transmute_copy(&pd3ddevice), core::mem::transmute_copy(&pddsrendertarget)).into() } unsafe extern "system" fn TermCompositionTarget(this: *mut core::ffi::c_void, pd3ddevice: *mut core::ffi::c_void, pddsrendertarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRImageCompositor_Impl::TermCompositionTarget(this, windows_core::from_raw_borrowed(&pd3ddevice), windows_core::from_raw_borrowed(&pddsrendertarget)).into() + IVMRImageCompositor_Impl::TermCompositionTarget(this, core::mem::transmute_copy(&pd3ddevice), core::mem::transmute_copy(&pddsrendertarget)).into() } unsafe extern "system" fn SetStreamMediaType(this: *mut core::ffi::c_void, dwstrmid: u32, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE, ftexture: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -27614,7 +27614,7 @@ impl IVMRImageCompositor_Vtbl { } unsafe extern "system" fn CompositeImage(this: *mut core::ffi::c_void, pd3ddevice: *mut core::ffi::c_void, pddsrendertarget: *mut core::ffi::c_void, pmtrendertarget: *const super::MediaFoundation::AM_MEDIA_TYPE, rtstart: i64, rtend: i64, dwclrbkgnd: u32, pvideostreaminfo: *const VMRVIDEOSTREAMINFO, cstreams: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRImageCompositor_Impl::CompositeImage(this, windows_core::from_raw_borrowed(&pd3ddevice), windows_core::from_raw_borrowed(&pddsrendertarget), core::mem::transmute_copy(&pmtrendertarget), core::mem::transmute_copy(&rtstart), core::mem::transmute_copy(&rtend), core::mem::transmute_copy(&dwclrbkgnd), core::mem::transmute_copy(&pvideostreaminfo), core::mem::transmute_copy(&cstreams)).into() + IVMRImageCompositor_Impl::CompositeImage(this, core::mem::transmute_copy(&pd3ddevice), core::mem::transmute_copy(&pddsrendertarget), core::mem::transmute_copy(&pmtrendertarget), core::mem::transmute_copy(&rtstart), core::mem::transmute_copy(&rtend), core::mem::transmute_copy(&dwclrbkgnd), core::mem::transmute_copy(&pvideostreaminfo), core::mem::transmute_copy(&cstreams)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -27674,21 +27674,21 @@ pub struct IVMRImageCompositor9_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Media_MediaFoundation"))] pub trait IVMRImageCompositor9_Impl: windows_core::IUnknownImpl { - fn InitCompositionDevice(&self, pd3ddevice: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn TermCompositionDevice(&self, pd3ddevice: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn InitCompositionDevice(&self, pd3ddevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn TermCompositionDevice(&self, pd3ddevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetStreamMediaType(&self, dwstrmid: u32, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE, ftexture: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn CompositeImage(&self, pd3ddevice: Option<&windows_core::IUnknown>, pddsrendertarget: Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, pmtrendertarget: *const super::MediaFoundation::AM_MEDIA_TYPE, rtstart: i64, rtend: i64, dwclrbkgnd: u32, pvideostreaminfo: *const VMR9VideoStreamInfo, cstreams: u32) -> windows_core::Result<()>; + fn CompositeImage(&self, pd3ddevice: windows_core::Ref<'_, windows_core::IUnknown>, pddsrendertarget: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, pmtrendertarget: *const super::MediaFoundation::AM_MEDIA_TYPE, rtstart: i64, rtend: i64, dwclrbkgnd: u32, pvideostreaminfo: *const VMR9VideoStreamInfo, cstreams: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Media_MediaFoundation"))] impl IVMRImageCompositor9_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitCompositionDevice(this: *mut core::ffi::c_void, pd3ddevice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRImageCompositor9_Impl::InitCompositionDevice(this, windows_core::from_raw_borrowed(&pd3ddevice)).into() + IVMRImageCompositor9_Impl::InitCompositionDevice(this, core::mem::transmute_copy(&pd3ddevice)).into() } unsafe extern "system" fn TermCompositionDevice(this: *mut core::ffi::c_void, pd3ddevice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRImageCompositor9_Impl::TermCompositionDevice(this, windows_core::from_raw_borrowed(&pd3ddevice)).into() + IVMRImageCompositor9_Impl::TermCompositionDevice(this, core::mem::transmute_copy(&pd3ddevice)).into() } unsafe extern "system" fn SetStreamMediaType(this: *mut core::ffi::c_void, dwstrmid: u32, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE, ftexture: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -27696,7 +27696,7 @@ impl IVMRImageCompositor9_Vtbl { } unsafe extern "system" fn CompositeImage(this: *mut core::ffi::c_void, pd3ddevice: *mut core::ffi::c_void, pddsrendertarget: *mut core::ffi::c_void, pmtrendertarget: *const super::MediaFoundation::AM_MEDIA_TYPE, rtstart: i64, rtend: i64, dwclrbkgnd: u32, pvideostreaminfo: *const VMR9VideoStreamInfo, cstreams: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRImageCompositor9_Impl::CompositeImage(this, windows_core::from_raw_borrowed(&pd3ddevice), windows_core::from_raw_borrowed(&pddsrendertarget), core::mem::transmute_copy(&pmtrendertarget), core::mem::transmute_copy(&rtstart), core::mem::transmute_copy(&rtend), core::mem::transmute_copy(&dwclrbkgnd), core::mem::transmute_copy(&pvideostreaminfo), core::mem::transmute_copy(&cstreams)).into() + IVMRImageCompositor9_Impl::CompositeImage(this, core::mem::transmute_copy(&pd3ddevice), core::mem::transmute_copy(&pddsrendertarget), core::mem::transmute_copy(&pmtrendertarget), core::mem::transmute_copy(&rtstart), core::mem::transmute_copy(&rtend), core::mem::transmute_copy(&dwclrbkgnd), core::mem::transmute_copy(&pvideostreaminfo), core::mem::transmute_copy(&cstreams)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -27960,15 +27960,15 @@ pub struct IVMRImagePresenterExclModeConfig_Vtbl { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub trait IVMRImagePresenterExclModeConfig_Impl: IVMRImagePresenterConfig_Impl { - fn SetXlcModeDDObjAndPrimarySurface(&self, lpddobj: Option<&super::super::Graphics::DirectDraw::IDirectDraw7>, lpprimarysurf: Option<&super::super::Graphics::DirectDraw::IDirectDrawSurface7>) -> windows_core::Result<()>; - fn GetXlcModeDDObjAndPrimarySurface(&self, lpddobj: *mut Option, lpprimarysurf: *mut Option) -> windows_core::Result<()>; + fn SetXlcModeDDObjAndPrimarySurface(&self, lpddobj: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDraw7>, lpprimarysurf: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface7>) -> windows_core::Result<()>; + fn GetXlcModeDDObjAndPrimarySurface(&self, lpddobj: windows_core::OutRef<'_, super::super::Graphics::DirectDraw::IDirectDraw7>, lpprimarysurf: windows_core::OutRef<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface7>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_DirectDraw")] impl IVMRImagePresenterExclModeConfig_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetXlcModeDDObjAndPrimarySurface(this: *mut core::ffi::c_void, lpddobj: *mut core::ffi::c_void, lpprimarysurf: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRImagePresenterExclModeConfig_Impl::SetXlcModeDDObjAndPrimarySurface(this, windows_core::from_raw_borrowed(&lpddobj), windows_core::from_raw_borrowed(&lpprimarysurf)).into() + IVMRImagePresenterExclModeConfig_Impl::SetXlcModeDDObjAndPrimarySurface(this, core::mem::transmute_copy(&lpddobj), core::mem::transmute_copy(&lpprimarysurf)).into() } unsafe extern "system" fn GetXlcModeDDObjAndPrimarySurface(this: *mut core::ffi::c_void, lpddobj: *mut *mut core::ffi::c_void, lpprimarysurf: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28820,10 +28820,10 @@ pub struct IVMRSurfaceAllocator_Vtbl { } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi"))] pub trait IVMRSurfaceAllocator_Impl: windows_core::IUnknownImpl { - fn AllocateSurface(&self, dwuserid: usize, lpallocinfo: *const VMRALLOCATIONINFO, lpdwactualbuffers: *mut u32, lplpsurface: *mut Option) -> windows_core::Result<()>; + fn AllocateSurface(&self, dwuserid: usize, lpallocinfo: *const VMRALLOCATIONINFO, lpdwactualbuffers: *mut u32, lplpsurface: windows_core::OutRef<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface7>) -> windows_core::Result<()>; fn FreeSurface(&self, dwid: usize) -> windows_core::Result<()>; - fn PrepareSurface(&self, dwuserid: usize, lpsurface: Option<&super::super::Graphics::DirectDraw::IDirectDrawSurface7>, dwsurfaceflags: u32) -> windows_core::Result<()>; - fn AdviseNotify(&self, lpivmrsurfallocnotify: Option<&IVMRSurfaceAllocatorNotify>) -> windows_core::Result<()>; + fn PrepareSurface(&self, dwuserid: usize, lpsurface: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDrawSurface7>, dwsurfaceflags: u32) -> windows_core::Result<()>; + fn AdviseNotify(&self, lpivmrsurfallocnotify: windows_core::Ref<'_, IVMRSurfaceAllocatorNotify>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi"))] impl IVMRSurfaceAllocator_Vtbl { @@ -28838,11 +28838,11 @@ impl IVMRSurfaceAllocator_Vtbl { } unsafe extern "system" fn PrepareSurface(this: *mut core::ffi::c_void, dwuserid: usize, lpsurface: *mut core::ffi::c_void, dwsurfaceflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRSurfaceAllocator_Impl::PrepareSurface(this, core::mem::transmute_copy(&dwuserid), windows_core::from_raw_borrowed(&lpsurface), core::mem::transmute_copy(&dwsurfaceflags)).into() + IVMRSurfaceAllocator_Impl::PrepareSurface(this, core::mem::transmute_copy(&dwuserid), core::mem::transmute_copy(&lpsurface), core::mem::transmute_copy(&dwsurfaceflags)).into() } unsafe extern "system" fn AdviseNotify(this: *mut core::ffi::c_void, lpivmrsurfallocnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRSurfaceAllocator_Impl::AdviseNotify(this, windows_core::from_raw_borrowed(&lpivmrsurfallocnotify)).into() + IVMRSurfaceAllocator_Impl::AdviseNotify(this, core::mem::transmute_copy(&lpivmrsurfallocnotify)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -28899,7 +28899,7 @@ pub trait IVMRSurfaceAllocator9_Impl: windows_core::IUnknownImpl { fn InitializeDevice(&self, dwuserid: usize, lpallocinfo: *const VMR9AllocationInfo, lpnumbuffers: *mut u32) -> windows_core::Result<()>; fn TerminateDevice(&self, dwid: usize) -> windows_core::Result<()>; fn GetSurface(&self, dwuserid: usize, surfaceindex: u32, surfaceflags: u32) -> windows_core::Result; - fn AdviseNotify(&self, lpivmrsurfallocnotify: Option<&IVMRSurfaceAllocatorNotify9>) -> windows_core::Result<()>; + fn AdviseNotify(&self, lpivmrsurfallocnotify: windows_core::Ref<'_, IVMRSurfaceAllocatorNotify9>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D9")] impl IVMRSurfaceAllocator9_Vtbl { @@ -28924,7 +28924,7 @@ impl IVMRSurfaceAllocator9_Vtbl { } unsafe extern "system" fn AdviseNotify(this: *mut core::ffi::c_void, lpivmrsurfallocnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRSurfaceAllocator9_Impl::AdviseNotify(this, windows_core::from_raw_borrowed(&lpivmrsurfallocnotify)).into() + IVMRSurfaceAllocator9_Impl::AdviseNotify(this, core::mem::transmute_copy(&lpivmrsurfallocnotify)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -28964,7 +28964,7 @@ pub struct IVMRSurfaceAllocatorEx9_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub trait IVMRSurfaceAllocatorEx9_Impl: IVMRSurfaceAllocator9_Impl { - fn GetSurfaceEx(&self, dwuserid: usize, surfaceindex: u32, surfaceflags: u32, lplpsurface: *mut Option, lprcdst: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; + fn GetSurfaceEx(&self, dwuserid: usize, surfaceindex: u32, surfaceflags: u32, lplpsurface: windows_core::OutRef<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, lprcdst: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D9")] impl IVMRSurfaceAllocatorEx9_Vtbl { @@ -29032,9 +29032,9 @@ pub struct IVMRSurfaceAllocatorNotify_Vtbl { } #[cfg(all(feature = "Win32_Graphics_DirectDraw", feature = "Win32_Graphics_Gdi"))] pub trait IVMRSurfaceAllocatorNotify_Impl: windows_core::IUnknownImpl { - fn AdviseSurfaceAllocator(&self, dwuserid: usize, lpivrmsurfaceallocator: Option<&IVMRSurfaceAllocator>) -> windows_core::Result<()>; - fn SetDDrawDevice(&self, lpddrawdevice: Option<&super::super::Graphics::DirectDraw::IDirectDraw7>, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()>; - fn ChangeDDrawDevice(&self, lpddrawdevice: Option<&super::super::Graphics::DirectDraw::IDirectDraw7>, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()>; + fn AdviseSurfaceAllocator(&self, dwuserid: usize, lpivrmsurfaceallocator: windows_core::Ref<'_, IVMRSurfaceAllocator>) -> windows_core::Result<()>; + fn SetDDrawDevice(&self, lpddrawdevice: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDraw7>, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()>; + fn ChangeDDrawDevice(&self, lpddrawdevice: windows_core::Ref<'_, super::super::Graphics::DirectDraw::IDirectDraw7>, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()>; fn RestoreDDrawSurfaces(&self) -> windows_core::Result<()>; fn NotifyEvent(&self, eventcode: i32, param1: isize, param2: isize) -> windows_core::Result<()>; fn SetBorderColor(&self, clrborder: super::super::Foundation::COLORREF) -> windows_core::Result<()>; @@ -29044,15 +29044,15 @@ impl IVMRSurfaceAllocatorNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseSurfaceAllocator(this: *mut core::ffi::c_void, dwuserid: usize, lpivrmsurfaceallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRSurfaceAllocatorNotify_Impl::AdviseSurfaceAllocator(this, core::mem::transmute_copy(&dwuserid), windows_core::from_raw_borrowed(&lpivrmsurfaceallocator)).into() + IVMRSurfaceAllocatorNotify_Impl::AdviseSurfaceAllocator(this, core::mem::transmute_copy(&dwuserid), core::mem::transmute_copy(&lpivrmsurfaceallocator)).into() } unsafe extern "system" fn SetDDrawDevice(this: *mut core::ffi::c_void, lpddrawdevice: *mut core::ffi::c_void, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRSurfaceAllocatorNotify_Impl::SetDDrawDevice(this, windows_core::from_raw_borrowed(&lpddrawdevice), core::mem::transmute_copy(&hmonitor)).into() + IVMRSurfaceAllocatorNotify_Impl::SetDDrawDevice(this, core::mem::transmute_copy(&lpddrawdevice), core::mem::transmute_copy(&hmonitor)).into() } unsafe extern "system" fn ChangeDDrawDevice(this: *mut core::ffi::c_void, lpddrawdevice: *mut core::ffi::c_void, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRSurfaceAllocatorNotify_Impl::ChangeDDrawDevice(this, windows_core::from_raw_borrowed(&lpddrawdevice), core::mem::transmute_copy(&hmonitor)).into() + IVMRSurfaceAllocatorNotify_Impl::ChangeDDrawDevice(this, core::mem::transmute_copy(&lpddrawdevice), core::mem::transmute_copy(&hmonitor)).into() } unsafe extern "system" fn RestoreDDrawSurfaces(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29133,10 +29133,10 @@ pub struct IVMRSurfaceAllocatorNotify9_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))] pub trait IVMRSurfaceAllocatorNotify9_Impl: windows_core::IUnknownImpl { - fn AdviseSurfaceAllocator(&self, dwuserid: usize, lpivrmsurfaceallocator: Option<&IVMRSurfaceAllocator9>) -> windows_core::Result<()>; - fn SetD3DDevice(&self, lpd3ddevice: Option<&super::super::Graphics::Direct3D9::IDirect3DDevice9>, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()>; - fn ChangeD3DDevice(&self, lpd3ddevice: Option<&super::super::Graphics::Direct3D9::IDirect3DDevice9>, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()>; - fn AllocateSurfaceHelper(&self, lpallocinfo: *const VMR9AllocationInfo, lpnumbuffers: *mut u32, lplpsurface: *mut Option) -> windows_core::Result<()>; + fn AdviseSurfaceAllocator(&self, dwuserid: usize, lpivrmsurfaceallocator: windows_core::Ref<'_, IVMRSurfaceAllocator9>) -> windows_core::Result<()>; + fn SetD3DDevice(&self, lpd3ddevice: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DDevice9>, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()>; + fn ChangeD3DDevice(&self, lpd3ddevice: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DDevice9>, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result<()>; + fn AllocateSurfaceHelper(&self, lpallocinfo: *const VMR9AllocationInfo, lpnumbuffers: *mut u32, lplpsurface: windows_core::OutRef<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>) -> windows_core::Result<()>; fn NotifyEvent(&self, eventcode: i32, param1: isize, param2: isize) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D9", feature = "Win32_Graphics_Gdi"))] @@ -29144,15 +29144,15 @@ impl IVMRSurfaceAllocatorNotify9_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseSurfaceAllocator(this: *mut core::ffi::c_void, dwuserid: usize, lpivrmsurfaceallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRSurfaceAllocatorNotify9_Impl::AdviseSurfaceAllocator(this, core::mem::transmute_copy(&dwuserid), windows_core::from_raw_borrowed(&lpivrmsurfaceallocator)).into() + IVMRSurfaceAllocatorNotify9_Impl::AdviseSurfaceAllocator(this, core::mem::transmute_copy(&dwuserid), core::mem::transmute_copy(&lpivrmsurfaceallocator)).into() } unsafe extern "system" fn SetD3DDevice(this: *mut core::ffi::c_void, lpd3ddevice: *mut core::ffi::c_void, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRSurfaceAllocatorNotify9_Impl::SetD3DDevice(this, windows_core::from_raw_borrowed(&lpd3ddevice), core::mem::transmute_copy(&hmonitor)).into() + IVMRSurfaceAllocatorNotify9_Impl::SetD3DDevice(this, core::mem::transmute_copy(&lpd3ddevice), core::mem::transmute_copy(&hmonitor)).into() } unsafe extern "system" fn ChangeD3DDevice(this: *mut core::ffi::c_void, lpd3ddevice: *mut core::ffi::c_void, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVMRSurfaceAllocatorNotify9_Impl::ChangeD3DDevice(this, windows_core::from_raw_borrowed(&lpd3ddevice), core::mem::transmute_copy(&hmonitor)).into() + IVMRSurfaceAllocatorNotify9_Impl::ChangeD3DDevice(this, core::mem::transmute_copy(&lpd3ddevice), core::mem::transmute_copy(&hmonitor)).into() } unsafe extern "system" fn AllocateSurfaceHelper(this: *mut core::ffi::c_void, lpallocinfo: *const VMR9AllocationInfo, lpnumbuffers: *mut u32, lplpsurface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30192,19 +30192,19 @@ pub struct IVideoFrameStep_Vtbl { pub CancelStep: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IVideoFrameStep_Impl: windows_core::IUnknownImpl { - fn Step(&self, dwframes: u32, pstepobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CanStep(&self, bmultiple: i32, pstepobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Step(&self, dwframes: u32, pstepobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CanStep(&self, bmultiple: i32, pstepobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn CancelStep(&self) -> windows_core::Result<()>; } impl IVideoFrameStep_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Step(this: *mut core::ffi::c_void, dwframes: u32, pstepobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVideoFrameStep_Impl::Step(this, core::mem::transmute_copy(&dwframes), windows_core::from_raw_borrowed(&pstepobject)).into() + IVideoFrameStep_Impl::Step(this, core::mem::transmute_copy(&dwframes), core::mem::transmute_copy(&pstepobject)).into() } unsafe extern "system" fn CanStep(this: *mut core::ffi::c_void, bmultiple: i32, pstepobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVideoFrameStep_Impl::CanStep(this, core::mem::transmute_copy(&bmultiple), windows_core::from_raw_borrowed(&pstepobject)).into() + IVideoFrameStep_Impl::CanStep(this, core::mem::transmute_copy(&bmultiple), core::mem::transmute_copy(&pstepobject)).into() } unsafe extern "system" fn CancelStep(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31210,16 +31210,16 @@ pub struct IWMCodecAMVideoAccelerator_Vtbl { } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_Media_WindowsMediaFormat"))] pub trait IWMCodecAMVideoAccelerator_Impl: windows_core::IUnknownImpl { - fn SetAcceleratorInterface(&self, piamva: Option<&IAMVideoAccelerator>) -> windows_core::Result<()>; + fn SetAcceleratorInterface(&self, piamva: windows_core::Ref<'_, IAMVideoAccelerator>) -> windows_core::Result<()>; fn NegotiateConnection(&self, pmediatype: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; - fn SetPlayerNotify(&self, phook: Option<&super::WindowsMediaFormat::IWMPlayerTimestampHook>) -> windows_core::Result<()>; + fn SetPlayerNotify(&self, phook: windows_core::Ref<'_, super::WindowsMediaFormat::IWMPlayerTimestampHook>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_Media_WindowsMediaFormat"))] impl IWMCodecAMVideoAccelerator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetAcceleratorInterface(this: *mut core::ffi::c_void, piamva: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMCodecAMVideoAccelerator_Impl::SetAcceleratorInterface(this, windows_core::from_raw_borrowed(&piamva)).into() + IWMCodecAMVideoAccelerator_Impl::SetAcceleratorInterface(this, core::mem::transmute_copy(&piamva)).into() } unsafe extern "system" fn NegotiateConnection(this: *mut core::ffi::c_void, pmediatype: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31227,7 +31227,7 @@ impl IWMCodecAMVideoAccelerator_Vtbl { } unsafe extern "system" fn SetPlayerNotify(this: *mut core::ffi::c_void, phook: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMCodecAMVideoAccelerator_Impl::SetPlayerNotify(this, windows_core::from_raw_borrowed(&phook)).into() + IWMCodecAMVideoAccelerator_Impl::SetPlayerNotify(this, core::mem::transmute_copy(&phook)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -31274,19 +31274,19 @@ pub struct IWMCodecVideoAccelerator_Vtbl { } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_Media_WindowsMediaFormat"))] pub trait IWMCodecVideoAccelerator_Impl: windows_core::IUnknownImpl { - fn NegotiateConnection(&self, piamva: Option<&IAMVideoAccelerator>, pmediatype: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; - fn SetPlayerNotify(&self, phook: Option<&super::WindowsMediaFormat::IWMPlayerTimestampHook>) -> windows_core::Result<()>; + fn NegotiateConnection(&self, piamva: windows_core::Ref<'_, IAMVideoAccelerator>, pmediatype: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; + fn SetPlayerNotify(&self, phook: windows_core::Ref<'_, super::WindowsMediaFormat::IWMPlayerTimestampHook>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Media_MediaFoundation", feature = "Win32_Media_WindowsMediaFormat"))] impl IWMCodecVideoAccelerator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn NegotiateConnection(this: *mut core::ffi::c_void, piamva: *mut core::ffi::c_void, pmediatype: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMCodecVideoAccelerator_Impl::NegotiateConnection(this, windows_core::from_raw_borrowed(&piamva), core::mem::transmute_copy(&pmediatype)).into() + IWMCodecVideoAccelerator_Impl::NegotiateConnection(this, core::mem::transmute_copy(&piamva), core::mem::transmute_copy(&pmediatype)).into() } unsafe extern "system" fn SetPlayerNotify(this: *mut core::ffi::c_void, phook: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMCodecVideoAccelerator_Impl::SetPlayerNotify(this, windows_core::from_raw_borrowed(&phook)).into() + IWMCodecVideoAccelerator_Impl::SetPlayerNotify(this, core::mem::transmute_copy(&phook)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs index fe363cd4fa..13bf12ff0b 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs @@ -533,7 +533,7 @@ pub trait IMediaObject_Impl: windows_core::IUnknownImpl { fn AllocateStreamingResources(&self) -> windows_core::Result<()>; fn FreeStreamingResources(&self) -> windows_core::Result<()>; fn GetInputStatus(&self, dwinputstreamindex: u32) -> windows_core::Result; - fn ProcessInput(&self, dwinputstreamindex: u32, pbuffer: Option<&IMediaBuffer>, dwflags: u32, rttimestamp: i64, rttimelength: i64) -> windows_core::Result<()>; + fn ProcessInput(&self, dwinputstreamindex: u32, pbuffer: windows_core::Ref<'_, IMediaBuffer>, dwflags: u32, rttimestamp: i64, rttimelength: i64) -> windows_core::Result<()>; fn ProcessOutput(&self, dwflags: u32, coutputbuffercount: u32, poutputbuffers: *mut DMO_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::Result<()>; fn Lock(&self, block: i32) -> windows_core::Result<()>; } @@ -637,7 +637,7 @@ impl IMediaObject_Vtbl { } unsafe extern "system" fn ProcessInput(this: *mut core::ffi::c_void, dwinputstreamindex: u32, pbuffer: *mut core::ffi::c_void, dwflags: u32, rttimestamp: i64, rttimelength: i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMediaObject_Impl::ProcessInput(this, core::mem::transmute_copy(&dwinputstreamindex), windows_core::from_raw_borrowed(&pbuffer), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&rttimestamp), core::mem::transmute_copy(&rttimelength)).into() + IMediaObject_Impl::ProcessInput(this, core::mem::transmute_copy(&dwinputstreamindex), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&rttimestamp), core::mem::transmute_copy(&rttimelength)).into() } unsafe extern "system" fn ProcessOutput(this: *mut core::ffi::c_void, dwflags: u32, coutputbuffercount: u32, poutputbuffers: *mut DMO_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs index c0250ea4e6..d91993b216 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs @@ -469,7 +469,7 @@ pub trait IKsAllocatorEx_Impl: IKsAllocator_Impl { fn KsGetProperties(&self) -> *mut ALLOCATOR_PROPERTIES_EX; fn KsSetProperties(&self, param0: *const ALLOCATOR_PROPERTIES_EX); fn KsSetAllocatorHandle(&self, allocatorhandle: super::super::Foundation::HANDLE); - fn KsCreateAllocatorAndGetHandle(&self, kspin: Option<&IKsPin>) -> super::super::Foundation::HANDLE; + fn KsCreateAllocatorAndGetHandle(&self, kspin: windows_core::Ref<'_, IKsPin>) -> super::super::Foundation::HANDLE; } impl IKsAllocatorEx_Vtbl { pub const fn new() -> Self { @@ -487,7 +487,7 @@ impl IKsAllocatorEx_Vtbl { } unsafe extern "system" fn KsCreateAllocatorAndGetHandle(this: *mut core::ffi::c_void, kspin: *mut core::ffi::c_void) -> super::super::Foundation::HANDLE { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsAllocatorEx_Impl::KsCreateAllocatorAndGetHandle(this, windows_core::from_raw_borrowed(&kspin)) + IKsAllocatorEx_Impl::KsCreateAllocatorAndGetHandle(this, core::mem::transmute_copy(&kspin)) } Self { base__: IKsAllocator_Vtbl::new::(), @@ -800,9 +800,9 @@ pub struct IKsDataTypeHandler_Vtbl { } #[cfg(all(feature = "Win32_Media_DirectShow", feature = "Win32_Media_MediaFoundation"))] pub trait IKsDataTypeHandler_Impl: windows_core::IUnknownImpl { - fn KsCompleteIoOperation(&self, sample: Option<&super::DirectShow::IMediaSample>, streamheader: *mut core::ffi::c_void, iooperation: KSIOOPERATION, cancelled: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn KsCompleteIoOperation(&self, sample: windows_core::Ref<'_, super::DirectShow::IMediaSample>, streamheader: *mut core::ffi::c_void, iooperation: KSIOOPERATION, cancelled: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn KsIsMediaTypeInRanges(&self, dataranges: *const core::ffi::c_void) -> windows_core::Result<()>; - fn KsPrepareIoOperation(&self, sample: Option<&super::DirectShow::IMediaSample>, streamheader: *mut core::ffi::c_void, iooperation: KSIOOPERATION) -> windows_core::Result<()>; + fn KsPrepareIoOperation(&self, sample: windows_core::Ref<'_, super::DirectShow::IMediaSample>, streamheader: *mut core::ffi::c_void, iooperation: KSIOOPERATION) -> windows_core::Result<()>; fn KsQueryExtendedSize(&self) -> windows_core::Result; fn KsSetMediaType(&self, ammediatype: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()>; } @@ -811,7 +811,7 @@ impl IKsDataTypeHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn KsCompleteIoOperation(this: *mut core::ffi::c_void, sample: *mut core::ffi::c_void, streamheader: *mut core::ffi::c_void, iooperation: KSIOOPERATION, cancelled: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsDataTypeHandler_Impl::KsCompleteIoOperation(this, windows_core::from_raw_borrowed(&sample), core::mem::transmute_copy(&streamheader), core::mem::transmute_copy(&iooperation), core::mem::transmute_copy(&cancelled)).into() + IKsDataTypeHandler_Impl::KsCompleteIoOperation(this, core::mem::transmute_copy(&sample), core::mem::transmute_copy(&streamheader), core::mem::transmute_copy(&iooperation), core::mem::transmute_copy(&cancelled)).into() } unsafe extern "system" fn KsIsMediaTypeInRanges(this: *mut core::ffi::c_void, dataranges: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -819,7 +819,7 @@ impl IKsDataTypeHandler_Vtbl { } unsafe extern "system" fn KsPrepareIoOperation(this: *mut core::ffi::c_void, sample: *mut core::ffi::c_void, streamheader: *mut core::ffi::c_void, iooperation: KSIOOPERATION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsDataTypeHandler_Impl::KsPrepareIoOperation(this, windows_core::from_raw_borrowed(&sample), core::mem::transmute_copy(&streamheader), core::mem::transmute_copy(&iooperation)).into() + IKsDataTypeHandler_Impl::KsPrepareIoOperation(this, core::mem::transmute_copy(&sample), core::mem::transmute_copy(&streamheader), core::mem::transmute_copy(&iooperation)).into() } unsafe extern "system" fn KsQueryExtendedSize(this: *mut core::ffi::c_void, extendedsize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -930,8 +930,8 @@ pub struct IKsInterfaceHandler_Vtbl { } #[cfg(feature = "Win32_Media_DirectShow")] pub trait IKsInterfaceHandler_Impl: windows_core::IUnknownImpl { - fn KsSetPin(&self, kspin: Option<&IKsPin>) -> windows_core::Result<()>; - fn KsProcessMediaSamples(&self, ksdatatypehandler: Option<&IKsDataTypeHandler>, samplelist: *const Option, samplecount: *mut i32, iooperation: KSIOOPERATION, streamsegment: *mut *mut KSSTREAM_SEGMENT) -> windows_core::Result<()>; + fn KsSetPin(&self, kspin: windows_core::Ref<'_, IKsPin>) -> windows_core::Result<()>; + fn KsProcessMediaSamples(&self, ksdatatypehandler: windows_core::Ref<'_, IKsDataTypeHandler>, samplelist: *const Option, samplecount: *mut i32, iooperation: KSIOOPERATION, streamsegment: *mut *mut KSSTREAM_SEGMENT) -> windows_core::Result<()>; fn KsCompleteIo(&self, streamsegment: *mut KSSTREAM_SEGMENT) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_DirectShow")] @@ -939,11 +939,11 @@ impl IKsInterfaceHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn KsSetPin(this: *mut core::ffi::c_void, kspin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsInterfaceHandler_Impl::KsSetPin(this, windows_core::from_raw_borrowed(&kspin)).into() + IKsInterfaceHandler_Impl::KsSetPin(this, core::mem::transmute_copy(&kspin)).into() } unsafe extern "system" fn KsProcessMediaSamples(this: *mut core::ffi::c_void, ksdatatypehandler: *mut core::ffi::c_void, samplelist: *const *mut core::ffi::c_void, samplecount: *mut i32, iooperation: KSIOOPERATION, streamsegment: *mut *mut KSSTREAM_SEGMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsInterfaceHandler_Impl::KsProcessMediaSamples(this, windows_core::from_raw_borrowed(&ksdatatypehandler), core::mem::transmute_copy(&samplelist), core::mem::transmute_copy(&samplecount), core::mem::transmute_copy(&iooperation), core::mem::transmute_copy(&streamsegment)).into() + IKsInterfaceHandler_Impl::KsProcessMediaSamples(this, core::mem::transmute_copy(&ksdatatypehandler), core::mem::transmute_copy(&samplelist), core::mem::transmute_copy(&samplecount), core::mem::transmute_copy(&iooperation), core::mem::transmute_copy(&streamsegment)).into() } unsafe extern "system" fn KsCompleteIo(this: *mut core::ffi::c_void, streamsegment: *mut KSSTREAM_SEGMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1367,10 +1367,10 @@ pub trait IKsPin_Impl: windows_core::IUnknownImpl { fn KsCreateSinkPinHandle(&self, interface: *const KSIDENTIFIER, medium: *const KSIDENTIFIER) -> windows_core::Result<()>; fn KsGetCurrentCommunication(&self, communication: *mut KSPIN_COMMUNICATION, interface: *mut KSIDENTIFIER, medium: *mut KSIDENTIFIER) -> windows_core::Result<()>; fn KsPropagateAcquire(&self) -> windows_core::Result<()>; - fn KsDeliver(&self, sample: Option<&super::DirectShow::IMediaSample>, flags: u32) -> windows_core::Result<()>; + fn KsDeliver(&self, sample: windows_core::Ref<'_, super::DirectShow::IMediaSample>, flags: u32) -> windows_core::Result<()>; fn KsMediaSamplesCompleted(&self, streamsegment: *const KSSTREAM_SEGMENT) -> windows_core::Result<()>; fn KsPeekAllocator(&self, operation: KSPEEKOPERATION) -> Option; - fn KsReceiveAllocator(&self, memallocator: Option<&super::DirectShow::IMemAllocator>) -> windows_core::Result<()>; + fn KsReceiveAllocator(&self, memallocator: windows_core::Ref<'_, super::DirectShow::IMemAllocator>) -> windows_core::Result<()>; fn KsRenegotiateAllocator(&self) -> windows_core::Result<()>; fn KsIncrementPendingIoCount(&self) -> i32; fn KsDecrementPendingIoCount(&self) -> i32; @@ -1413,7 +1413,7 @@ impl IKsPin_Vtbl { } unsafe extern "system" fn KsDeliver(this: *mut core::ffi::c_void, sample: *mut core::ffi::c_void, flags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsPin_Impl::KsDeliver(this, windows_core::from_raw_borrowed(&sample), core::mem::transmute_copy(&flags)).into() + IKsPin_Impl::KsDeliver(this, core::mem::transmute_copy(&sample), core::mem::transmute_copy(&flags)).into() } unsafe extern "system" fn KsMediaSamplesCompleted(this: *mut core::ffi::c_void, streamsegment: *const KSSTREAM_SEGMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1425,7 +1425,7 @@ impl IKsPin_Vtbl { } unsafe extern "system" fn KsReceiveAllocator(this: *mut core::ffi::c_void, memallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsPin_Impl::KsReceiveAllocator(this, windows_core::from_raw_borrowed(&memallocator)).into() + IKsPin_Impl::KsReceiveAllocator(this, core::mem::transmute_copy(&memallocator)).into() } unsafe extern "system" fn KsRenegotiateAllocator(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1493,14 +1493,14 @@ pub struct IKsPinEx_Vtbl { } #[cfg(feature = "Win32_Media_DirectShow")] pub trait IKsPinEx_Impl: IKsPin_Impl { - fn KsNotifyError(&self, sample: Option<&super::DirectShow::IMediaSample>, hr: windows_core::HRESULT); + fn KsNotifyError(&self, sample: windows_core::Ref<'_, super::DirectShow::IMediaSample>, hr: windows_core::HRESULT); } #[cfg(feature = "Win32_Media_DirectShow")] impl IKsPinEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn KsNotifyError(this: *mut core::ffi::c_void, sample: *mut core::ffi::c_void, hr: windows_core::HRESULT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsPinEx_Impl::KsNotifyError(this, windows_core::from_raw_borrowed(&sample), core::mem::transmute_copy(&hr)) + IKsPinEx_Impl::KsNotifyError(this, core::mem::transmute_copy(&sample), core::mem::transmute_copy(&hr)) } Self { base__: IKsPin_Vtbl::new::(), KsNotifyError: KsNotifyError:: } } @@ -1612,7 +1612,7 @@ pub trait IKsPinPipe_Impl: windows_core::IUnknownImpl { fn KsSetPinFramingCache(&self, framingex: *const KSALLOCATOR_FRAMING_EX, framingprop: *const FRAMING_PROP, option: FRAMING_CACHE_OPS) -> windows_core::Result<()>; fn KsGetConnectedPin(&self) -> Option; fn KsGetPipe(&self, operation: KSPEEKOPERATION) -> Option; - fn KsSetPipe(&self, ksallocator: Option<&IKsAllocatorEx>) -> windows_core::Result<()>; + fn KsSetPipe(&self, ksallocator: windows_core::Ref<'_, IKsAllocatorEx>) -> windows_core::Result<()>; fn KsGetPipeAllocatorFlag(&self) -> u32; fn KsSetPipeAllocatorFlag(&self, flag: u32) -> windows_core::Result<()>; fn KsGetPinBusCache(&self) -> windows_core::GUID; @@ -1641,7 +1641,7 @@ impl IKsPinPipe_Vtbl { } unsafe extern "system" fn KsSetPipe(this: *mut core::ffi::c_void, ksallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsPinPipe_Impl::KsSetPipe(this, windows_core::from_raw_borrowed(&ksallocator)).into() + IKsPinPipe_Impl::KsSetPipe(this, core::mem::transmute_copy(&ksallocator)).into() } unsafe extern "system" fn KsGetPipeAllocatorFlag(this: *mut core::ffi::c_void) -> u32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1768,13 +1768,13 @@ pub struct IKsQualityForwarder_Vtbl { pub KsFlushClient: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void), } pub trait IKsQualityForwarder_Impl: IKsObject_Impl { - fn KsFlushClient(&self, pin: Option<&IKsPin>); + fn KsFlushClient(&self, pin: windows_core::Ref<'_, IKsPin>); } impl IKsQualityForwarder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn KsFlushClient(this: *mut core::ffi::c_void, pin: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsQualityForwarder_Impl::KsFlushClient(this, windows_core::from_raw_borrowed(&pin)) + IKsQualityForwarder_Impl::KsFlushClient(this, core::mem::transmute_copy(&pin)) } Self { base__: IKsObject_Vtbl::new::(), KsFlushClient: KsFlushClient:: } } @@ -1799,13 +1799,13 @@ pub struct IKsTopology_Vtbl { pub CreateNodeInstance: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, u32, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IKsTopology_Impl: windows_core::IUnknownImpl { - fn CreateNodeInstance(&self, nodeid: u32, flags: u32, desiredaccess: u32, unkouter: Option<&windows_core::IUnknown>, interfaceid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateNodeInstance(&self, nodeid: u32, flags: u32, desiredaccess: u32, unkouter: windows_core::Ref<'_, windows_core::IUnknown>, interfaceid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IKsTopology_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateNodeInstance(this: *mut core::ffi::c_void, nodeid: u32, flags: u32, desiredaccess: u32, unkouter: *mut core::ffi::c_void, interfaceid: *const windows_core::GUID, interface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKsTopology_Impl::CreateNodeInstance(this, core::mem::transmute_copy(&nodeid), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&desiredaccess), windows_core::from_raw_borrowed(&unkouter), core::mem::transmute_copy(&interfaceid), core::mem::transmute_copy(&interface)).into() + IKsTopology_Impl::CreateNodeInstance(this, core::mem::transmute_copy(&nodeid), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&desiredaccess), core::mem::transmute_copy(&unkouter), core::mem::transmute_copy(&interfaceid), core::mem::transmute_copy(&interface)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreateNodeInstance: CreateNodeInstance:: } } diff --git a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs index e2a4e67918..fcf32a378f 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs @@ -9369,13 +9369,13 @@ pub struct IAdvancedMediaCaptureInitializationSettings_Vtbl { pub SetDirectxDeviceManager: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAdvancedMediaCaptureInitializationSettings_Impl: windows_core::IUnknownImpl { - fn SetDirectxDeviceManager(&self, value: Option<&IMFDXGIDeviceManager>) -> windows_core::Result<()>; + fn SetDirectxDeviceManager(&self, value: windows_core::Ref<'_, IMFDXGIDeviceManager>) -> windows_core::Result<()>; } impl IAdvancedMediaCaptureInitializationSettings_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDirectxDeviceManager(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAdvancedMediaCaptureInitializationSettings_Impl::SetDirectxDeviceManager(this, windows_core::from_raw_borrowed(&value)).into() + IAdvancedMediaCaptureInitializationSettings_Impl::SetDirectxDeviceManager(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetDirectxDeviceManager: SetDirectxDeviceManager:: } } @@ -9469,7 +9469,7 @@ pub struct IClusterDetector_Vtbl { } pub trait IClusterDetector_Impl: windows_core::IUnknownImpl { fn Initialize(&self, wbaseentrylevel: u16, wclusterentrylevel: u16) -> windows_core::Result<()>; - fn Detect(&self, dwmaxnumclusters: u32, fminclusterduration: f32, fmaxclusterduration: f32, psrctoc: Option<&IToc>) -> windows_core::Result; + fn Detect(&self, dwmaxnumclusters: u32, fminclusterduration: f32, fmaxclusterduration: f32, psrctoc: windows_core::Ref<'_, IToc>) -> windows_core::Result; } impl IClusterDetector_Vtbl { pub const fn new() -> Self { @@ -9479,7 +9479,7 @@ impl IClusterDetector_Vtbl { } unsafe extern "system" fn Detect(this: *mut core::ffi::c_void, dwmaxnumclusters: u32, fminclusterduration: f32, fmaxclusterduration: f32, psrctoc: *mut core::ffi::c_void, ppdsttoc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IClusterDetector_Impl::Detect(this, core::mem::transmute_copy(&dwmaxnumclusters), core::mem::transmute_copy(&fminclusterduration), core::mem::transmute_copy(&fmaxclusterduration), windows_core::from_raw_borrowed(&psrctoc)) { + match IClusterDetector_Impl::Detect(this, core::mem::transmute_copy(&dwmaxnumclusters), core::mem::transmute_copy(&fminclusterduration), core::mem::transmute_copy(&fmaxclusterduration), core::mem::transmute_copy(&psrctoc)) { Ok(ok__) => { ppdsttoc.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9623,9 +9623,9 @@ pub trait ICodecAPI_Impl: windows_core::IUnknownImpl { fn SetAllDefaults(&self) -> windows_core::Result<()>; fn SetValueWithNotify(&self, api: *const windows_core::GUID, value: *const super::super::System::Variant::VARIANT, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()>; fn SetAllDefaultsWithNotify(&self, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()>; - fn GetAllSettings(&self, __midl__icodecapi0000: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn SetAllSettings(&self, __midl__icodecapi0001: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn SetAllSettingsWithNotify(&self, __midl__icodecapi0002: Option<&super::super::System::Com::IStream>, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()>; + fn GetAllSettings(&self, __midl__icodecapi0000: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SetAllSettings(&self, __midl__icodecapi0001: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SetAllSettingsWithNotify(&self, __midl__icodecapi0002: windows_core::Ref<'_, super::super::System::Com::IStream>, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ICodecAPI_Vtbl { @@ -9692,15 +9692,15 @@ impl ICodecAPI_Vtbl { } unsafe extern "system" fn GetAllSettings(this: *mut core::ffi::c_void, __midl__icodecapi0000: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICodecAPI_Impl::GetAllSettings(this, windows_core::from_raw_borrowed(&__midl__icodecapi0000)).into() + ICodecAPI_Impl::GetAllSettings(this, core::mem::transmute_copy(&__midl__icodecapi0000)).into() } unsafe extern "system" fn SetAllSettings(this: *mut core::ffi::c_void, __midl__icodecapi0001: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICodecAPI_Impl::SetAllSettings(this, windows_core::from_raw_borrowed(&__midl__icodecapi0001)).into() + ICodecAPI_Impl::SetAllSettings(this, core::mem::transmute_copy(&__midl__icodecapi0001)).into() } unsafe extern "system" fn SetAllSettingsWithNotify(this: *mut core::ffi::c_void, __midl__icodecapi0002: *mut core::ffi::c_void, changedparam: *mut *mut windows_core::GUID, changedparamcount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICodecAPI_Impl::SetAllSettingsWithNotify(this, windows_core::from_raw_borrowed(&__midl__icodecapi0002), core::mem::transmute_copy(&changedparam), core::mem::transmute_copy(&changedparamcount)).into() + ICodecAPI_Impl::SetAllSettingsWithNotify(this, core::mem::transmute_copy(&__midl__icodecapi0002), core::mem::transmute_copy(&changedparam), core::mem::transmute_copy(&changedparamcount)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -9863,18 +9863,18 @@ pub struct ID3D12VideoDecodeCommandList_Vtbl { #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12VideoDecodeCommandList_Impl: super::super::Graphics::Direct3D12::ID3D12CommandList_Impl { fn Close(&self) -> windows_core::Result<()>; - fn Reset(&self, pallocator: Option<&super::super::Graphics::Direct3D12::ID3D12CommandAllocator>) -> windows_core::Result<()>; + fn Reset(&self, pallocator: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12CommandAllocator>) -> windows_core::Result<()>; fn ClearState(&self); fn ResourceBarrier(&self, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER); - fn DiscardResource(&self, presource: Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION); - fn BeginQuery(&self, pqueryheap: Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); - fn EndQuery(&self, pqueryheap: Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); - fn ResolveQueryData(&self, pqueryheap: Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64); - fn SetPredication(&self, pbuffer: Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP); + fn DiscardResource(&self, presource: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION); + fn BeginQuery(&self, pqueryheap: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); + fn EndQuery(&self, pqueryheap: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); + fn ResolveQueryData(&self, pqueryheap: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64); + fn SetPredication(&self, pbuffer: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12Resource>, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP); fn SetMarker(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn BeginEvent(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn EndEvent(&self); - fn DecodeFrame(&self, pdecoder: Option<&ID3D12VideoDecoder>, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS); + fn DecodeFrame(&self, pdecoder: windows_core::Ref<'_, ID3D12VideoDecoder>, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS); fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE); } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] @@ -9886,7 +9886,7 @@ impl ID3D12VideoDecodeCommandList_Vtbl { } unsafe extern "system" fn Reset(this: *mut core::ffi::c_void, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList_Impl::Reset(this, windows_core::from_raw_borrowed(&pallocator)).into() + ID3D12VideoDecodeCommandList_Impl::Reset(this, core::mem::transmute_copy(&pallocator)).into() } unsafe extern "system" fn ClearState(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9898,23 +9898,23 @@ impl ID3D12VideoDecodeCommandList_Vtbl { } unsafe extern "system" fn DiscardResource(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList_Impl::DiscardResource(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pregion)) + ID3D12VideoDecodeCommandList_Impl::DiscardResource(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pregion)) } unsafe extern "system" fn BeginQuery(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList_Impl::BeginQuery(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) + ID3D12VideoDecodeCommandList_Impl::BeginQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) } unsafe extern "system" fn EndQuery(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList_Impl::EndQuery(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) + ID3D12VideoDecodeCommandList_Impl::EndQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) } unsafe extern "system" fn ResolveQueryData(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: *mut core::ffi::c_void, aligneddestinationbufferoffset: u64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList_Impl::ResolveQueryData(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), windows_core::from_raw_borrowed(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset)) + ID3D12VideoDecodeCommandList_Impl::ResolveQueryData(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), core::mem::transmute_copy(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset)) } unsafe extern "system" fn SetPredication(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList_Impl::SetPredication(this, windows_core::from_raw_borrowed(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation)) + ID3D12VideoDecodeCommandList_Impl::SetPredication(this, core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation)) } unsafe extern "system" fn SetMarker(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9930,7 +9930,7 @@ impl ID3D12VideoDecodeCommandList_Vtbl { } unsafe extern "system" fn DecodeFrame(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList_Impl::DecodeFrame(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments)) + ID3D12VideoDecodeCommandList_Impl::DecodeFrame(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments)) } unsafe extern "system" fn WriteBufferImmediate(this: *mut core::ffi::c_void, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9996,14 +9996,14 @@ pub struct ID3D12VideoDecodeCommandList1_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12VideoDecodeCommandList1_Impl: ID3D12VideoDecodeCommandList_Impl { - fn DecodeFrame1(&self, pdecoder: Option<&ID3D12VideoDecoder>, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS); + fn DecodeFrame1(&self, pdecoder: windows_core::Ref<'_, ID3D12VideoDecoder>, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS); } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D12VideoDecodeCommandList1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DecodeFrame1(this: *mut core::ffi::c_void, pdecoder: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1, pinputarguments: *const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList1_Impl::DecodeFrame1(this, windows_core::from_raw_borrowed(&pdecoder), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments)) + ID3D12VideoDecodeCommandList1_Impl::DecodeFrame1(this, core::mem::transmute_copy(&pdecoder), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments)) } Self { base__: ID3D12VideoDecodeCommandList_Vtbl::new::(), DecodeFrame1: DecodeFrame1:: } } @@ -10071,24 +10071,24 @@ pub struct ID3D12VideoDecodeCommandList2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12VideoDecodeCommandList2_Impl: ID3D12VideoDecodeCommandList1_Impl { - fn SetProtectedResourceSession(&self, pprotectedresourcesession: Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>); - fn InitializeExtensionCommand(&self, pextensioncommand: Option<&ID3D12VideoExtensionCommand>, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize); - fn ExecuteExtensionCommand(&self, pextensioncommand: Option<&ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize); + fn SetProtectedResourceSession(&self, pprotectedresourcesession: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>); + fn InitializeExtensionCommand(&self, pextensioncommand: windows_core::Ref<'_, ID3D12VideoExtensionCommand>, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize); + fn ExecuteExtensionCommand(&self, pextensioncommand: windows_core::Ref<'_, ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize); } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D12VideoDecodeCommandList2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetProtectedResourceSession(this: *mut core::ffi::c_void, pprotectedresourcesession: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList2_Impl::SetProtectedResourceSession(this, windows_core::from_raw_borrowed(&pprotectedresourcesession)) + ID3D12VideoDecodeCommandList2_Impl::SetProtectedResourceSession(this, core::mem::transmute_copy(&pprotectedresourcesession)) } unsafe extern "system" fn InitializeExtensionCommand(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList2_Impl::InitializeExtensionCommand(this, windows_core::from_raw_borrowed(&pextensioncommand), core::mem::transmute_copy(&pinitializationparameters), core::mem::transmute_copy(&initializationparameterssizeinbytes)) + ID3D12VideoDecodeCommandList2_Impl::InitializeExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pinitializationparameters), core::mem::transmute_copy(&initializationparameterssizeinbytes)) } unsafe extern "system" fn ExecuteExtensionCommand(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDecodeCommandList2_Impl::ExecuteExtensionCommand(this, windows_core::from_raw_borrowed(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes)) + ID3D12VideoDecodeCommandList2_Impl::ExecuteExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes)) } Self { base__: ID3D12VideoDecodeCommandList1_Vtbl::new::(), @@ -10485,19 +10485,19 @@ pub struct ID3D12VideoDevice1_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12VideoDevice1_Impl: ID3D12VideoDevice_Impl { - fn CreateVideoMotionEstimator(&self, pdesc: *const D3D12_VIDEO_MOTION_ESTIMATOR_DESC, pprotectedresourcesession: Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideomotionestimator: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateVideoMotionVectorHeap(&self, pdesc: *const D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC, pprotectedresourcesession: Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideomotionvectorheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateVideoMotionEstimator(&self, pdesc: *const D3D12_VIDEO_MOTION_ESTIMATOR_DESC, pprotectedresourcesession: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideomotionestimator: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateVideoMotionVectorHeap(&self, pdesc: *const D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC, pprotectedresourcesession: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideomotionvectorheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D12VideoDevice1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateVideoMotionEstimator(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_MOTION_ESTIMATOR_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideomotionestimator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDevice1_Impl::CreateVideoMotionEstimator(this, core::mem::transmute_copy(&pdesc), windows_core::from_raw_borrowed(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideomotionestimator)).into() + ID3D12VideoDevice1_Impl::CreateVideoMotionEstimator(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideomotionestimator)).into() } unsafe extern "system" fn CreateVideoMotionVectorHeap(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_MOTION_VECTOR_HEAP_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideomotionvectorheap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDevice1_Impl::CreateVideoMotionVectorHeap(this, core::mem::transmute_copy(&pdesc), windows_core::from_raw_borrowed(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideomotionvectorheap)).into() + ID3D12VideoDevice1_Impl::CreateVideoMotionVectorHeap(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideomotionvectorheap)).into() } Self { base__: ID3D12VideoDevice_Vtbl::new::(), @@ -10594,34 +10594,34 @@ pub struct ID3D12VideoDevice2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12VideoDevice2_Impl: ID3D12VideoDevice1_Impl { - fn CreateVideoDecoder1(&self, pdesc: *const D3D12_VIDEO_DECODER_DESC, pprotectedresourcesession: Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideodecoder: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateVideoDecoderHeap1(&self, pvideodecoderheapdesc: *const D3D12_VIDEO_DECODER_HEAP_DESC, pprotectedresourcesession: Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideodecoderheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateVideoProcessor1(&self, nodemask: u32, poutputstreamdesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, numinputstreamdescs: u32, pinputstreamdescs: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC, pprotectedresourcesession: Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideoprocessor: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateVideoExtensionCommand(&self, pdesc: *const D3D12_VIDEO_EXTENSION_COMMAND_DESC, pcreationparameters: *const core::ffi::c_void, creationparametersdatasizeinbytes: usize, pprotectedresourcesession: Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideoextensioncommand: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn ExecuteExtensionCommand(&self, pextensioncommand: Option<&ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize, poutputdata: *mut core::ffi::c_void, outputdatasizeinbytes: usize) -> windows_core::Result<()>; + fn CreateVideoDecoder1(&self, pdesc: *const D3D12_VIDEO_DECODER_DESC, pprotectedresourcesession: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideodecoder: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateVideoDecoderHeap1(&self, pvideodecoderheapdesc: *const D3D12_VIDEO_DECODER_HEAP_DESC, pprotectedresourcesession: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideodecoderheap: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateVideoProcessor1(&self, nodemask: u32, poutputstreamdesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, numinputstreamdescs: u32, pinputstreamdescs: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC, pprotectedresourcesession: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideoprocessor: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateVideoExtensionCommand(&self, pdesc: *const D3D12_VIDEO_EXTENSION_COMMAND_DESC, pcreationparameters: *const core::ffi::c_void, creationparametersdatasizeinbytes: usize, pprotectedresourcesession: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>, riid: *const windows_core::GUID, ppvideoextensioncommand: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ExecuteExtensionCommand(&self, pextensioncommand: windows_core::Ref<'_, ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize, poutputdata: *mut core::ffi::c_void, outputdatasizeinbytes: usize) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] impl ID3D12VideoDevice2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateVideoDecoder1(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_DECODER_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideodecoder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDevice2_Impl::CreateVideoDecoder1(this, core::mem::transmute_copy(&pdesc), windows_core::from_raw_borrowed(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideodecoder)).into() + ID3D12VideoDevice2_Impl::CreateVideoDecoder1(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideodecoder)).into() } unsafe extern "system" fn CreateVideoDecoderHeap1(this: *mut core::ffi::c_void, pvideodecoderheapdesc: *const D3D12_VIDEO_DECODER_HEAP_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideodecoderheap: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDevice2_Impl::CreateVideoDecoderHeap1(this, core::mem::transmute_copy(&pvideodecoderheapdesc), windows_core::from_raw_borrowed(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideodecoderheap)).into() + ID3D12VideoDevice2_Impl::CreateVideoDecoderHeap1(this, core::mem::transmute_copy(&pvideodecoderheapdesc), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideodecoderheap)).into() } unsafe extern "system" fn CreateVideoProcessor1(this: *mut core::ffi::c_void, nodemask: u32, poutputstreamdesc: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC, numinputstreamdescs: u32, pinputstreamdescs: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideoprocessor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDevice2_Impl::CreateVideoProcessor1(this, core::mem::transmute_copy(&nodemask), core::mem::transmute_copy(&poutputstreamdesc), core::mem::transmute_copy(&numinputstreamdescs), core::mem::transmute_copy(&pinputstreamdescs), windows_core::from_raw_borrowed(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideoprocessor)).into() + ID3D12VideoDevice2_Impl::CreateVideoProcessor1(this, core::mem::transmute_copy(&nodemask), core::mem::transmute_copy(&poutputstreamdesc), core::mem::transmute_copy(&numinputstreamdescs), core::mem::transmute_copy(&pinputstreamdescs), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideoprocessor)).into() } unsafe extern "system" fn CreateVideoExtensionCommand(this: *mut core::ffi::c_void, pdesc: *const D3D12_VIDEO_EXTENSION_COMMAND_DESC, pcreationparameters: *const core::ffi::c_void, creationparametersdatasizeinbytes: usize, pprotectedresourcesession: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvideoextensioncommand: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDevice2_Impl::CreateVideoExtensionCommand(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pcreationparameters), core::mem::transmute_copy(&creationparametersdatasizeinbytes), windows_core::from_raw_borrowed(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideoextensioncommand)).into() + ID3D12VideoDevice2_Impl::CreateVideoExtensionCommand(this, core::mem::transmute_copy(&pdesc), core::mem::transmute_copy(&pcreationparameters), core::mem::transmute_copy(&creationparametersdatasizeinbytes), core::mem::transmute_copy(&pprotectedresourcesession), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvideoextensioncommand)).into() } unsafe extern "system" fn ExecuteExtensionCommand(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize, poutputdata: *mut core::ffi::c_void, outputdatasizeinbytes: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoDevice2_Impl::ExecuteExtensionCommand(this, windows_core::from_raw_borrowed(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes), core::mem::transmute_copy(&poutputdata), core::mem::transmute_copy(&outputdatasizeinbytes)).into() + ID3D12VideoDevice2_Impl::ExecuteExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes), core::mem::transmute_copy(&poutputdata), core::mem::transmute_copy(&outputdatasizeinbytes)).into() } Self { base__: ID3D12VideoDevice1_Vtbl::new::(), @@ -10863,21 +10863,21 @@ pub struct ID3D12VideoEncodeCommandList_Vtbl { #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait ID3D12VideoEncodeCommandList_Impl: super::super::Graphics::Direct3D12::ID3D12CommandList_Impl { fn Close(&self) -> windows_core::Result<()>; - fn Reset(&self, pallocator: Option<&super::super::Graphics::Direct3D12::ID3D12CommandAllocator>) -> windows_core::Result<()>; + fn Reset(&self, pallocator: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12CommandAllocator>) -> windows_core::Result<()>; fn ClearState(&self); fn ResourceBarrier(&self, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER); - fn DiscardResource(&self, presource: Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION); - fn BeginQuery(&self, pqueryheap: Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); - fn EndQuery(&self, pqueryheap: Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); - fn ResolveQueryData(&self, pqueryheap: Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64); - fn SetPredication(&self, pbuffer: Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP); + fn DiscardResource(&self, presource: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION); + fn BeginQuery(&self, pqueryheap: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); + fn EndQuery(&self, pqueryheap: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); + fn ResolveQueryData(&self, pqueryheap: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64); + fn SetPredication(&self, pbuffer: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12Resource>, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP); fn SetMarker(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn BeginEvent(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn EndEvent(&self); - fn EstimateMotion(&self, pmotionestimator: Option<&ID3D12VideoMotionEstimator>, poutputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_OUTPUT, pinputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_INPUT); + fn EstimateMotion(&self, pmotionestimator: windows_core::Ref<'_, ID3D12VideoMotionEstimator>, poutputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_OUTPUT, pinputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_INPUT); fn ResolveMotionVectorHeap(&self, poutputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_OUTPUT, pinputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_INPUT); fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE); - fn SetProtectedResourceSession(&self, pprotectedresourcesession: Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>); + fn SetProtectedResourceSession(&self, pprotectedresourcesession: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>); } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl ID3D12VideoEncodeCommandList_Vtbl { @@ -10888,7 +10888,7 @@ impl ID3D12VideoEncodeCommandList_Vtbl { } unsafe extern "system" fn Reset(this: *mut core::ffi::c_void, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList_Impl::Reset(this, windows_core::from_raw_borrowed(&pallocator)).into() + ID3D12VideoEncodeCommandList_Impl::Reset(this, core::mem::transmute_copy(&pallocator)).into() } unsafe extern "system" fn ClearState(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10900,23 +10900,23 @@ impl ID3D12VideoEncodeCommandList_Vtbl { } unsafe extern "system" fn DiscardResource(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList_Impl::DiscardResource(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pregion)) + ID3D12VideoEncodeCommandList_Impl::DiscardResource(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pregion)) } unsafe extern "system" fn BeginQuery(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList_Impl::BeginQuery(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) + ID3D12VideoEncodeCommandList_Impl::BeginQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) } unsafe extern "system" fn EndQuery(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList_Impl::EndQuery(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) + ID3D12VideoEncodeCommandList_Impl::EndQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) } unsafe extern "system" fn ResolveQueryData(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: *mut core::ffi::c_void, aligneddestinationbufferoffset: u64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList_Impl::ResolveQueryData(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), windows_core::from_raw_borrowed(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset)) + ID3D12VideoEncodeCommandList_Impl::ResolveQueryData(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), core::mem::transmute_copy(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset)) } unsafe extern "system" fn SetPredication(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList_Impl::SetPredication(this, windows_core::from_raw_borrowed(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation)) + ID3D12VideoEncodeCommandList_Impl::SetPredication(this, core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation)) } unsafe extern "system" fn SetMarker(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10932,7 +10932,7 @@ impl ID3D12VideoEncodeCommandList_Vtbl { } unsafe extern "system" fn EstimateMotion(this: *mut core::ffi::c_void, pmotionestimator: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_OUTPUT, pinputarguments: *const D3D12_VIDEO_MOTION_ESTIMATOR_INPUT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList_Impl::EstimateMotion(this, windows_core::from_raw_borrowed(&pmotionestimator), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments)) + ID3D12VideoEncodeCommandList_Impl::EstimateMotion(this, core::mem::transmute_copy(&pmotionestimator), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&pinputarguments)) } unsafe extern "system" fn ResolveMotionVectorHeap(this: *mut core::ffi::c_void, poutputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_OUTPUT, pinputarguments: *const D3D12_RESOLVE_VIDEO_MOTION_VECTOR_HEAP_INPUT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10944,7 +10944,7 @@ impl ID3D12VideoEncodeCommandList_Vtbl { } unsafe extern "system" fn SetProtectedResourceSession(this: *mut core::ffi::c_void, pprotectedresourcesession: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList_Impl::SetProtectedResourceSession(this, windows_core::from_raw_borrowed(&pprotectedresourcesession)) + ID3D12VideoEncodeCommandList_Impl::SetProtectedResourceSession(this, core::mem::transmute_copy(&pprotectedresourcesession)) } Self { base__: super::super::Graphics::Direct3D12::ID3D12CommandList_Vtbl::new::(), @@ -11019,19 +11019,19 @@ pub struct ID3D12VideoEncodeCommandList1_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait ID3D12VideoEncodeCommandList1_Impl: ID3D12VideoEncodeCommandList_Impl { - fn InitializeExtensionCommand(&self, pextensioncommand: Option<&ID3D12VideoExtensionCommand>, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize); - fn ExecuteExtensionCommand(&self, pextensioncommand: Option<&ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize); + fn InitializeExtensionCommand(&self, pextensioncommand: windows_core::Ref<'_, ID3D12VideoExtensionCommand>, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize); + fn ExecuteExtensionCommand(&self, pextensioncommand: windows_core::Ref<'_, ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize); } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl ID3D12VideoEncodeCommandList1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeExtensionCommand(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList1_Impl::InitializeExtensionCommand(this, windows_core::from_raw_borrowed(&pextensioncommand), core::mem::transmute_copy(&pinitializationparameters), core::mem::transmute_copy(&initializationparameterssizeinbytes)) + ID3D12VideoEncodeCommandList1_Impl::InitializeExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pinitializationparameters), core::mem::transmute_copy(&initializationparameterssizeinbytes)) } unsafe extern "system" fn ExecuteExtensionCommand(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList1_Impl::ExecuteExtensionCommand(this, windows_core::from_raw_borrowed(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes)) + ID3D12VideoEncodeCommandList1_Impl::ExecuteExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes)) } Self { base__: ID3D12VideoEncodeCommandList_Vtbl::new::(), @@ -11090,7 +11090,7 @@ pub struct ID3D12VideoEncodeCommandList2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] pub trait ID3D12VideoEncodeCommandList2_Impl: ID3D12VideoEncodeCommandList1_Impl { - fn EncodeFrame(&self, pencoder: Option<&ID3D12VideoEncoder>, pheap: Option<&ID3D12VideoEncoderHeap>, pinputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_OUTPUT_ARGUMENTS); + fn EncodeFrame(&self, pencoder: windows_core::Ref<'_, ID3D12VideoEncoder>, pheap: windows_core::Ref<'_, ID3D12VideoEncoderHeap>, pinputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_OUTPUT_ARGUMENTS); fn ResolveEncoderOutputMetadata(&self, pinputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_OUTPUT_ARGUMENTS); } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] @@ -11098,7 +11098,7 @@ impl ID3D12VideoEncodeCommandList2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EncodeFrame(this: *mut core::ffi::c_void, pencoder: *mut core::ffi::c_void, pheap: *mut core::ffi::c_void, pinputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_ENCODEFRAME_OUTPUT_ARGUMENTS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoEncodeCommandList2_Impl::EncodeFrame(this, windows_core::from_raw_borrowed(&pencoder), windows_core::from_raw_borrowed(&pheap), core::mem::transmute_copy(&pinputarguments), core::mem::transmute_copy(&poutputarguments)) + ID3D12VideoEncodeCommandList2_Impl::EncodeFrame(this, core::mem::transmute_copy(&pencoder), core::mem::transmute_copy(&pheap), core::mem::transmute_copy(&pinputarguments), core::mem::transmute_copy(&poutputarguments)) } unsafe extern "system" fn ResolveEncoderOutputMetadata(this: *mut core::ffi::c_void, pinputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_INPUT_ARGUMENTS, poutputarguments: *const D3D12_VIDEO_ENCODER_RESOLVE_METADATA_OUTPUT_ARGUMENTS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11728,18 +11728,18 @@ pub struct ID3D12VideoProcessCommandList_Vtbl { #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait ID3D12VideoProcessCommandList_Impl: super::super::Graphics::Direct3D12::ID3D12CommandList_Impl { fn Close(&self) -> windows_core::Result<()>; - fn Reset(&self, pallocator: Option<&super::super::Graphics::Direct3D12::ID3D12CommandAllocator>) -> windows_core::Result<()>; + fn Reset(&self, pallocator: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12CommandAllocator>) -> windows_core::Result<()>; fn ClearState(&self); fn ResourceBarrier(&self, numbarriers: u32, pbarriers: *const super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER); - fn DiscardResource(&self, presource: Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION); - fn BeginQuery(&self, pqueryheap: Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); - fn EndQuery(&self, pqueryheap: Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); - fn ResolveQueryData(&self, pqueryheap: Option<&super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64); - fn SetPredication(&self, pbuffer: Option<&super::super::Graphics::Direct3D12::ID3D12Resource>, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP); + fn DiscardResource(&self, presource: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12Resource>, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION); + fn BeginQuery(&self, pqueryheap: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); + fn EndQuery(&self, pqueryheap: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32); + fn ResolveQueryData(&self, pqueryheap: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12QueryHeap>, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12Resource>, aligneddestinationbufferoffset: u64); + fn SetPredication(&self, pbuffer: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12Resource>, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP); fn SetMarker(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn BeginEvent(&self, metadata: u32, pdata: *const core::ffi::c_void, size: u32); fn EndEvent(&self); - fn ProcessFrames(&self, pvideoprocessor: Option<&ID3D12VideoProcessor>, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS); + fn ProcessFrames(&self, pvideoprocessor: windows_core::Ref<'_, ID3D12VideoProcessor>, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS); fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE); } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -11751,7 +11751,7 @@ impl ID3D12VideoProcessCommandList_Vtbl { } unsafe extern "system" fn Reset(this: *mut core::ffi::c_void, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList_Impl::Reset(this, windows_core::from_raw_borrowed(&pallocator)).into() + ID3D12VideoProcessCommandList_Impl::Reset(this, core::mem::transmute_copy(&pallocator)).into() } unsafe extern "system" fn ClearState(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11763,23 +11763,23 @@ impl ID3D12VideoProcessCommandList_Vtbl { } unsafe extern "system" fn DiscardResource(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pregion: *const super::super::Graphics::Direct3D12::D3D12_DISCARD_REGION) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList_Impl::DiscardResource(this, windows_core::from_raw_borrowed(&presource), core::mem::transmute_copy(&pregion)) + ID3D12VideoProcessCommandList_Impl::DiscardResource(this, core::mem::transmute_copy(&presource), core::mem::transmute_copy(&pregion)) } unsafe extern "system" fn BeginQuery(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList_Impl::BeginQuery(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) + ID3D12VideoProcessCommandList_Impl::BeginQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) } unsafe extern "system" fn EndQuery(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList_Impl::EndQuery(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) + ID3D12VideoProcessCommandList_Impl::EndQuery(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&index)) } unsafe extern "system" fn ResolveQueryData(this: *mut core::ffi::c_void, pqueryheap: *mut core::ffi::c_void, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, startindex: u32, numqueries: u32, pdestinationbuffer: *mut core::ffi::c_void, aligneddestinationbufferoffset: u64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList_Impl::ResolveQueryData(this, windows_core::from_raw_borrowed(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), windows_core::from_raw_borrowed(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset)) + ID3D12VideoProcessCommandList_Impl::ResolveQueryData(this, core::mem::transmute_copy(&pqueryheap), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&startindex), core::mem::transmute_copy(&numqueries), core::mem::transmute_copy(&pdestinationbuffer), core::mem::transmute_copy(&aligneddestinationbufferoffset)) } unsafe extern "system" fn SetPredication(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void, alignedbufferoffset: u64, operation: super::super::Graphics::Direct3D12::D3D12_PREDICATION_OP) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList_Impl::SetPredication(this, windows_core::from_raw_borrowed(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation)) + ID3D12VideoProcessCommandList_Impl::SetPredication(this, core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&alignedbufferoffset), core::mem::transmute_copy(&operation)) } unsafe extern "system" fn SetMarker(this: *mut core::ffi::c_void, metadata: u32, pdata: *const core::ffi::c_void, size: u32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11795,7 +11795,7 @@ impl ID3D12VideoProcessCommandList_Vtbl { } unsafe extern "system" fn ProcessFrames(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList_Impl::ProcessFrames(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&numinputstreams), core::mem::transmute_copy(&pinputarguments)) + ID3D12VideoProcessCommandList_Impl::ProcessFrames(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&numinputstreams), core::mem::transmute_copy(&pinputarguments)) } unsafe extern "system" fn WriteBufferImmediate(this: *mut core::ffi::c_void, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11861,14 +11861,14 @@ pub struct ID3D12VideoProcessCommandList1_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait ID3D12VideoProcessCommandList1_Impl: ID3D12VideoProcessCommandList_Impl { - fn ProcessFrames1(&self, pvideoprocessor: Option<&ID3D12VideoProcessor>, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1); + fn ProcessFrames1(&self, pvideoprocessor: windows_core::Ref<'_, ID3D12VideoProcessor>, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1); } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl ID3D12VideoProcessCommandList1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ProcessFrames1(this: *mut core::ffi::c_void, pvideoprocessor: *mut core::ffi::c_void, poutputarguments: *const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS, numinputstreams: u32, pinputarguments: *const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList1_Impl::ProcessFrames1(this, windows_core::from_raw_borrowed(&pvideoprocessor), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&numinputstreams), core::mem::transmute_copy(&pinputarguments)) + ID3D12VideoProcessCommandList1_Impl::ProcessFrames1(this, core::mem::transmute_copy(&pvideoprocessor), core::mem::transmute_copy(&poutputarguments), core::mem::transmute_copy(&numinputstreams), core::mem::transmute_copy(&pinputarguments)) } Self { base__: ID3D12VideoProcessCommandList_Vtbl::new::(), ProcessFrames1: ProcessFrames1:: } } @@ -11936,24 +11936,24 @@ pub struct ID3D12VideoProcessCommandList2_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait ID3D12VideoProcessCommandList2_Impl: ID3D12VideoProcessCommandList1_Impl { - fn SetProtectedResourceSession(&self, pprotectedresourcesession: Option<&super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>); - fn InitializeExtensionCommand(&self, pextensioncommand: Option<&ID3D12VideoExtensionCommand>, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize); - fn ExecuteExtensionCommand(&self, pextensioncommand: Option<&ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize); + fn SetProtectedResourceSession(&self, pprotectedresourcesession: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>); + fn InitializeExtensionCommand(&self, pextensioncommand: windows_core::Ref<'_, ID3D12VideoExtensionCommand>, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize); + fn ExecuteExtensionCommand(&self, pextensioncommand: windows_core::Ref<'_, ID3D12VideoExtensionCommand>, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize); } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl ID3D12VideoProcessCommandList2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetProtectedResourceSession(this: *mut core::ffi::c_void, pprotectedresourcesession: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList2_Impl::SetProtectedResourceSession(this, windows_core::from_raw_borrowed(&pprotectedresourcesession)) + ID3D12VideoProcessCommandList2_Impl::SetProtectedResourceSession(this, core::mem::transmute_copy(&pprotectedresourcesession)) } unsafe extern "system" fn InitializeExtensionCommand(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pinitializationparameters: *const core::ffi::c_void, initializationparameterssizeinbytes: usize) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList2_Impl::InitializeExtensionCommand(this, windows_core::from_raw_borrowed(&pextensioncommand), core::mem::transmute_copy(&pinitializationparameters), core::mem::transmute_copy(&initializationparameterssizeinbytes)) + ID3D12VideoProcessCommandList2_Impl::InitializeExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pinitializationparameters), core::mem::transmute_copy(&initializationparameterssizeinbytes)) } unsafe extern "system" fn ExecuteExtensionCommand(this: *mut core::ffi::c_void, pextensioncommand: *mut core::ffi::c_void, pexecutionparameters: *const core::ffi::c_void, executionparameterssizeinbytes: usize) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ID3D12VideoProcessCommandList2_Impl::ExecuteExtensionCommand(this, windows_core::from_raw_borrowed(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes)) + ID3D12VideoProcessCommandList2_Impl::ExecuteExtensionCommand(this, core::mem::transmute_copy(&pextensioncommand), core::mem::transmute_copy(&pexecutionparameters), core::mem::transmute_copy(&executionparameterssizeinbytes)) } Self { base__: ID3D12VideoProcessCommandList1_Vtbl::new::(), @@ -12220,7 +12220,7 @@ pub struct IDXVAHD_Device_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub trait IDXVAHD_Device_Impl: windows_core::IUnknownImpl { - fn CreateVideoSurface(&self, width: u32, height: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, r#type: DXVAHD_SURFACE_TYPE, numsurfaces: u32, ppsurfaces: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateVideoSurface(&self, width: u32, height: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, r#type: DXVAHD_SURFACE_TYPE, numsurfaces: u32, ppsurfaces: windows_core::OutRef<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn GetVideoProcessorDeviceCaps(&self, pcaps: *mut DXVAHD_VPDEVCAPS) -> windows_core::Result<()>; fn GetVideoProcessorOutputFormats(&self, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()>; fn GetVideoProcessorInputFormats(&self, count: u32, pformats: *mut super::super::Graphics::Direct3D9::D3DFORMAT) -> windows_core::Result<()>; @@ -12335,7 +12335,7 @@ pub trait IDXVAHD_VideoProcessor_Impl: windows_core::IUnknownImpl { fn GetVideoProcessBltState(&self, state: DXVAHD_BLT_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetVideoProcessStreamState(&self, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *const core::ffi::c_void) -> windows_core::Result<()>; fn GetVideoProcessStreamState(&self, streamnumber: u32, state: DXVAHD_STREAM_STATE, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn VideoProcessBltHD(&self, poutputsurface: Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, outputframe: u32, streamcount: u32, pstreams: *const DXVAHD_STREAM_DATA) -> windows_core::Result<()>; + fn VideoProcessBltHD(&self, poutputsurface: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, outputframe: u32, streamcount: u32, pstreams: *const DXVAHD_STREAM_DATA) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D9")] impl IDXVAHD_VideoProcessor_Vtbl { @@ -12358,7 +12358,7 @@ impl IDXVAHD_VideoProcessor_Vtbl { } unsafe extern "system" fn VideoProcessBltHD(this: *mut core::ffi::c_void, poutputsurface: *mut core::ffi::c_void, outputframe: u32, streamcount: u32, pstreams: *const DXVAHD_STREAM_DATA) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDXVAHD_VideoProcessor_Impl::VideoProcessBltHD(this, windows_core::from_raw_borrowed(&poutputsurface), core::mem::transmute_copy(&outputframe), core::mem::transmute_copy(&streamcount), core::mem::transmute_copy(&pstreams)).into() + IDXVAHD_VideoProcessor_Impl::VideoProcessBltHD(this, core::mem::transmute_copy(&poutputsurface), core::mem::transmute_copy(&outputframe), core::mem::transmute_copy(&streamcount), core::mem::transmute_copy(&pstreams)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -12560,9 +12560,9 @@ pub trait IDirect3DCryptoSession9_Impl: windows_core::IUnknownImpl { fn GetCertificateSize(&self, pcertificatesize: *mut u32) -> windows_core::Result<()>; fn GetCertificate(&self, certifactesize: u32, ppcertificate: *mut u8) -> windows_core::Result<()>; fn NegotiateKeyExchange(&self, datasize: u32, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn EncryptionBlt(&self, psrcsurface: Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, pdstsurface: Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, dstsurfacesize: u32, piv: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn DecryptionBlt(&self, psrcsurface: Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, pdstsurface: Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, srcsurfacesize: u32, pencryptedblockinfo: *mut super::super::Graphics::Direct3D9::D3DENCRYPTED_BLOCK_INFO, pcontentkey: *mut core::ffi::c_void, piv: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn GetSurfacePitch(&self, psrcsurface: Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, psurfacepitch: *mut u32) -> windows_core::Result<()>; + fn EncryptionBlt(&self, psrcsurface: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, pdstsurface: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, dstsurfacesize: u32, piv: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn DecryptionBlt(&self, psrcsurface: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, pdstsurface: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, srcsurfacesize: u32, pencryptedblockinfo: *mut super::super::Graphics::Direct3D9::D3DENCRYPTED_BLOCK_INFO, pcontentkey: *mut core::ffi::c_void, piv: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn GetSurfacePitch(&self, psrcsurface: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, psurfacepitch: *mut u32) -> windows_core::Result<()>; fn StartSessionKeyRefresh(&self, prandomnumber: *mut core::ffi::c_void, randomnumbersize: u32) -> windows_core::Result<()>; fn FinishSessionKeyRefresh(&self) -> windows_core::Result<()>; fn GetEncryptionBltKey(&self, preadbackkey: *mut core::ffi::c_void, keysize: u32) -> windows_core::Result<()>; @@ -12584,15 +12584,15 @@ impl IDirect3DCryptoSession9_Vtbl { } unsafe extern "system" fn EncryptionBlt(this: *mut core::ffi::c_void, psrcsurface: *mut core::ffi::c_void, pdstsurface: *mut core::ffi::c_void, dstsurfacesize: u32, piv: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DCryptoSession9_Impl::EncryptionBlt(this, windows_core::from_raw_borrowed(&psrcsurface), windows_core::from_raw_borrowed(&pdstsurface), core::mem::transmute_copy(&dstsurfacesize), core::mem::transmute_copy(&piv)).into() + IDirect3DCryptoSession9_Impl::EncryptionBlt(this, core::mem::transmute_copy(&psrcsurface), core::mem::transmute_copy(&pdstsurface), core::mem::transmute_copy(&dstsurfacesize), core::mem::transmute_copy(&piv)).into() } unsafe extern "system" fn DecryptionBlt(this: *mut core::ffi::c_void, psrcsurface: *mut core::ffi::c_void, pdstsurface: *mut core::ffi::c_void, srcsurfacesize: u32, pencryptedblockinfo: *mut super::super::Graphics::Direct3D9::D3DENCRYPTED_BLOCK_INFO, pcontentkey: *mut core::ffi::c_void, piv: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DCryptoSession9_Impl::DecryptionBlt(this, windows_core::from_raw_borrowed(&psrcsurface), windows_core::from_raw_borrowed(&pdstsurface), core::mem::transmute_copy(&srcsurfacesize), core::mem::transmute_copy(&pencryptedblockinfo), core::mem::transmute_copy(&pcontentkey), core::mem::transmute_copy(&piv)).into() + IDirect3DCryptoSession9_Impl::DecryptionBlt(this, core::mem::transmute_copy(&psrcsurface), core::mem::transmute_copy(&pdstsurface), core::mem::transmute_copy(&srcsurfacesize), core::mem::transmute_copy(&pencryptedblockinfo), core::mem::transmute_copy(&pcontentkey), core::mem::transmute_copy(&piv)).into() } unsafe extern "system" fn GetSurfacePitch(this: *mut core::ffi::c_void, psrcsurface: *mut core::ffi::c_void, psurfacepitch: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DCryptoSession9_Impl::GetSurfacePitch(this, windows_core::from_raw_borrowed(&psrcsurface), core::mem::transmute_copy(&psurfacepitch)).into() + IDirect3DCryptoSession9_Impl::GetSurfacePitch(this, core::mem::transmute_copy(&psrcsurface), core::mem::transmute_copy(&psurfacepitch)).into() } unsafe extern "system" fn StartSessionKeyRefresh(this: *mut core::ffi::c_void, prandomnumber: *mut core::ffi::c_void, randomnumbersize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12652,8 +12652,8 @@ pub struct IDirect3DDevice9Video_Vtbl { #[cfg(feature = "Win32_Graphics_Direct3D9")] pub trait IDirect3DDevice9Video_Impl: windows_core::IUnknownImpl { fn GetContentProtectionCaps(&self, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, pcaps: *mut D3DCONTENTPROTECTIONCAPS) -> windows_core::Result<()>; - fn CreateAuthenticatedChannel(&self, channeltype: super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNELTYPE, ppauthenticatedchannel: *mut Option, pchannelhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn CreateCryptoSession(&self, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, ppcryptosession: *mut Option, pcryptohandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateAuthenticatedChannel(&self, channeltype: super::super::Graphics::Direct3D9::D3DAUTHENTICATEDCHANNELTYPE, ppauthenticatedchannel: windows_core::OutRef<'_, IDirect3DAuthenticatedChannel9>, pchannelhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateCryptoSession(&self, pcryptotype: *const windows_core::GUID, pdecodeprofile: *const windows_core::GUID, ppcryptosession: windows_core::OutRef<'_, IDirect3DCryptoSession9>, pcryptohandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D9")] impl IDirect3DDevice9Video_Vtbl { @@ -12733,11 +12733,11 @@ pub struct IDirect3DDeviceManager9_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub trait IDirect3DDeviceManager9_Impl: windows_core::IUnknownImpl { - fn ResetDevice(&self, pdevice: Option<&super::super::Graphics::Direct3D9::IDirect3DDevice9>, resettoken: u32) -> windows_core::Result<()>; + fn ResetDevice(&self, pdevice: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DDevice9>, resettoken: u32) -> windows_core::Result<()>; fn OpenDeviceHandle(&self) -> windows_core::Result; fn CloseDeviceHandle(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn TestDevice(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, ppdevice: *mut Option, fblock: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, ppdevice: windows_core::OutRef<'_, super::super::Graphics::Direct3D9::IDirect3DDevice9>, fblock: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } @@ -12746,7 +12746,7 @@ impl IDirect3DDeviceManager9_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ResetDevice(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, resettoken: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirect3DDeviceManager9_Impl::ResetDevice(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&resettoken)).into() + IDirect3DDeviceManager9_Impl::ResetDevice(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&resettoken)).into() } unsafe extern "system" fn OpenDeviceHandle(this: *mut core::ffi::c_void, phdevice: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12813,7 +12813,7 @@ pub struct IDirectXVideoAccelerationService_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub trait IDirectXVideoAccelerationService_Impl: windows_core::IUnknownImpl { - fn CreateSurface(&self, width: u32, height: u32, backbuffers: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, dxvatype: &DXVA2_VideoRenderTargetType, ppsurface: *mut Option, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn CreateSurface(&self, width: u32, height: u32, backbuffers: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, dxvatype: &DXVA2_VideoRenderTargetType, ppsurface: windows_core::OutRef<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, psharedhandle: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D9")] impl IDirectXVideoAccelerationService_Vtbl { @@ -12884,7 +12884,7 @@ pub trait IDirectXVideoDecoder_Impl: windows_core::IUnknownImpl { fn GetCreationParameters(&self, pdeviceguid: *mut windows_core::GUID, pvideodesc: *mut DXVA2_VideoDesc, pconfig: *mut DXVA2_ConfigPictureDecode, pdecoderrendertargets: *mut *mut Option, pnumsurfaces: *mut u32) -> windows_core::Result<()>; fn GetBuffer(&self, buffertype: &DXVA2_BufferfType, ppbuffer: *mut *mut core::ffi::c_void, pbuffersize: *mut u32) -> windows_core::Result<()>; fn ReleaseBuffer(&self, buffertype: u32) -> windows_core::Result<()>; - fn BeginFrame(&self, prendertarget: Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, pvpvpdata: *const core::ffi::c_void) -> windows_core::Result<()>; + fn BeginFrame(&self, prendertarget: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, pvpvpdata: *const core::ffi::c_void) -> windows_core::Result<()>; fn EndFrame(&self, phandlecomplete: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn Execute(&self, pexecuteparams: *const DXVA2_DecodeExecuteParams) -> windows_core::Result<()>; } @@ -12915,7 +12915,7 @@ impl IDirectXVideoDecoder_Vtbl { } unsafe extern "system" fn BeginFrame(this: *mut core::ffi::c_void, prendertarget: *mut core::ffi::c_void, pvpvpdata: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectXVideoDecoder_Impl::BeginFrame(this, windows_core::from_raw_borrowed(&prendertarget), core::mem::transmute_copy(&pvpvpdata)).into() + IDirectXVideoDecoder_Impl::BeginFrame(this, core::mem::transmute_copy(&prendertarget), core::mem::transmute_copy(&pvpvpdata)).into() } unsafe extern "system" fn EndFrame(this: *mut core::ffi::c_void, phandlecomplete: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13136,7 +13136,7 @@ pub trait IDirectXVideoProcessor_Impl: windows_core::IUnknownImpl { fn GetVideoProcessorCaps(&self, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()>; fn GetProcAmpRange(&self, procampcap: u32) -> windows_core::Result; fn GetFilterPropertyRange(&self, filtersetting: u32) -> windows_core::Result; - fn VideoProcessBlt(&self, prendertarget: Option<&super::super::Graphics::Direct3D9::IDirect3DSurface9>, pbltparams: *const DXVA2_VideoProcessBltParams, psamples: *const DXVA2_VideoSample, numsamples: u32, phandlecomplete: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; + fn VideoProcessBlt(&self, prendertarget: windows_core::Ref<'_, super::super::Graphics::Direct3D9::IDirect3DSurface9>, pbltparams: *const DXVA2_VideoProcessBltParams, psamples: *const DXVA2_VideoSample, numsamples: u32, phandlecomplete: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D9")] impl IDirectXVideoProcessor_Vtbl { @@ -13181,7 +13181,7 @@ impl IDirectXVideoProcessor_Vtbl { } unsafe extern "system" fn VideoProcessBlt(this: *mut core::ffi::c_void, prendertarget: *mut core::ffi::c_void, pbltparams: *const DXVA2_VideoProcessBltParams, psamples: *const DXVA2_VideoSample, numsamples: u32, phandlecomplete: *mut super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDirectXVideoProcessor_Impl::VideoProcessBlt(this, windows_core::from_raw_borrowed(&prendertarget), core::mem::transmute_copy(&pbltparams), core::mem::transmute_copy(&psamples), core::mem::transmute_copy(&numsamples), core::mem::transmute_copy(&phandlecomplete)).into() + IDirectXVideoProcessor_Impl::VideoProcessBlt(this, core::mem::transmute_copy(&prendertarget), core::mem::transmute_copy(&pbltparams), core::mem::transmute_copy(&psamples), core::mem::transmute_copy(&numsamples), core::mem::transmute_copy(&phandlecomplete)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -13611,8 +13611,8 @@ pub struct IFileClient_Vtbl { } pub trait IFileClient_Impl: windows_core::IUnknownImpl { fn GetObjectDiskSize(&self, pqwsize: *mut u64) -> windows_core::Result<()>; - fn Write(&self, pfio: Option<&IFileIo>) -> windows_core::Result<()>; - fn Read(&self, pfio: Option<&IFileIo>) -> windows_core::Result<()>; + fn Write(&self, pfio: windows_core::Ref<'_, IFileIo>) -> windows_core::Result<()>; + fn Read(&self, pfio: windows_core::Ref<'_, IFileIo>) -> windows_core::Result<()>; } impl IFileClient_Vtbl { pub const fn new() -> Self { @@ -13622,11 +13622,11 @@ impl IFileClient_Vtbl { } unsafe extern "system" fn Write(this: *mut core::ffi::c_void, pfio: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileClient_Impl::Write(this, windows_core::from_raw_borrowed(&pfio)).into() + IFileClient_Impl::Write(this, core::mem::transmute_copy(&pfio)).into() } unsafe extern "system" fn Read(this: *mut core::ffi::c_void, pfio: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileClient_Impl::Read(this, windows_core::from_raw_borrowed(&pfio)).into() + IFileClient_Impl::Read(this, core::mem::transmute_copy(&pfio)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -13896,7 +13896,7 @@ pub struct IMF2DBuffer2_Vtbl { } pub trait IMF2DBuffer2_Impl: IMF2DBuffer_Impl { fn Lock2DSize(&self, lockflags: MF2DBuffer_LockFlags, ppbscanline0: *mut *mut u8, plpitch: *mut i32, ppbbufferstart: *mut *mut u8, pcbbufferlength: *mut u32) -> windows_core::Result<()>; - fn Copy2DTo(&self, pdestbuffer: Option<&IMF2DBuffer2>) -> windows_core::Result<()>; + fn Copy2DTo(&self, pdestbuffer: windows_core::Ref<'_, IMF2DBuffer2>) -> windows_core::Result<()>; } impl IMF2DBuffer2_Vtbl { pub const fn new() -> Self { @@ -13906,7 +13906,7 @@ impl IMF2DBuffer2_Vtbl { } unsafe extern "system" fn Copy2DTo(this: *mut core::ffi::c_void, pdestbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMF2DBuffer2_Impl::Copy2DTo(this, windows_core::from_raw_borrowed(&pdestbuffer)).into() + IMF2DBuffer2_Impl::Copy2DTo(this, core::mem::transmute_copy(&pdestbuffer)).into() } Self { base__: IMF2DBuffer_Vtbl::new::(), Lock2DSize: Lock2DSize::, Copy2DTo: Copy2DTo:: } } @@ -13974,11 +13974,11 @@ pub struct IMFASFContentInfo_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IMFASFContentInfo_Impl: windows_core::IUnknownImpl { - fn GetHeaderSize(&self, pistartofcontent: Option<&IMFMediaBuffer>) -> windows_core::Result; - fn ParseHeader(&self, piheaderbuffer: Option<&IMFMediaBuffer>, cboffsetwithinheader: u64) -> windows_core::Result<()>; - fn GenerateHeader(&self, piheader: Option<&IMFMediaBuffer>) -> windows_core::Result; + fn GetHeaderSize(&self, pistartofcontent: windows_core::Ref<'_, IMFMediaBuffer>) -> windows_core::Result; + fn ParseHeader(&self, piheaderbuffer: windows_core::Ref<'_, IMFMediaBuffer>, cboffsetwithinheader: u64) -> windows_core::Result<()>; + fn GenerateHeader(&self, piheader: windows_core::Ref<'_, IMFMediaBuffer>) -> windows_core::Result; fn GetProfile(&self) -> windows_core::Result; - fn SetProfile(&self, piprofile: Option<&IMFASFProfile>) -> windows_core::Result<()>; + fn SetProfile(&self, piprofile: windows_core::Ref<'_, IMFASFProfile>) -> windows_core::Result<()>; fn GeneratePresentationDescriptor(&self) -> windows_core::Result; fn GetEncodingConfigurationPropertyStore(&self, wstreamnumber: u16) -> windows_core::Result; } @@ -13987,7 +13987,7 @@ impl IMFASFContentInfo_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetHeaderSize(this: *mut core::ffi::c_void, pistartofcontent: *mut core::ffi::c_void, cbheadersize: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFASFContentInfo_Impl::GetHeaderSize(this, windows_core::from_raw_borrowed(&pistartofcontent)) { + match IMFASFContentInfo_Impl::GetHeaderSize(this, core::mem::transmute_copy(&pistartofcontent)) { Ok(ok__) => { cbheadersize.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -13997,11 +13997,11 @@ impl IMFASFContentInfo_Vtbl { } unsafe extern "system" fn ParseHeader(this: *mut core::ffi::c_void, piheaderbuffer: *mut core::ffi::c_void, cboffsetwithinheader: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFContentInfo_Impl::ParseHeader(this, windows_core::from_raw_borrowed(&piheaderbuffer), core::mem::transmute_copy(&cboffsetwithinheader)).into() + IMFASFContentInfo_Impl::ParseHeader(this, core::mem::transmute_copy(&piheaderbuffer), core::mem::transmute_copy(&cboffsetwithinheader)).into() } unsafe extern "system" fn GenerateHeader(this: *mut core::ffi::c_void, piheader: *mut core::ffi::c_void, pcbheader: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFASFContentInfo_Impl::GenerateHeader(this, windows_core::from_raw_borrowed(&piheader)) { + match IMFASFContentInfo_Impl::GenerateHeader(this, core::mem::transmute_copy(&piheader)) { Ok(ok__) => { pcbheader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -14021,7 +14021,7 @@ impl IMFASFContentInfo_Vtbl { } unsafe extern "system" fn SetProfile(this: *mut core::ffi::c_void, piprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFContentInfo_Impl::SetProfile(this, windows_core::from_raw_borrowed(&piprofile)).into() + IMFASFContentInfo_Impl::SetProfile(this, core::mem::transmute_copy(&piprofile)).into() } unsafe extern "system" fn GeneratePresentationDescriptor(this: *mut core::ffi::c_void, ppipresentationdescriptor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14147,17 +14147,17 @@ pub struct IMFASFIndexer_Vtbl { pub trait IMFASFIndexer_Impl: windows_core::IUnknownImpl { fn SetFlags(&self, dwflags: u32) -> windows_core::Result<()>; fn GetFlags(&self) -> windows_core::Result; - fn Initialize(&self, picontentinfo: Option<&IMFASFContentInfo>) -> windows_core::Result<()>; - fn GetIndexPosition(&self, picontentinfo: Option<&IMFASFContentInfo>) -> windows_core::Result; + fn Initialize(&self, picontentinfo: windows_core::Ref<'_, IMFASFContentInfo>) -> windows_core::Result<()>; + fn GetIndexPosition(&self, picontentinfo: windows_core::Ref<'_, IMFASFContentInfo>) -> windows_core::Result; fn SetIndexByteStreams(&self, ppibytestreams: *const Option, cbytestreams: u32) -> windows_core::Result<()>; fn GetIndexByteStreamCount(&self) -> windows_core::Result; fn GetIndexStatus(&self, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pfisindexed: *mut super::super::Foundation::BOOL, pbindexdescriptor: *mut u8, pcbindexdescriptor: *mut u32) -> windows_core::Result<()>; fn SetIndexStatus(&self, pbindexdescriptor: *const u8, cbindexdescriptor: u32, fgenerateindex: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetSeekPositionForValue(&self, pvarvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pindexidentifier: *const ASF_INDEX_IDENTIFIER, pcboffsetwithindata: *mut u64, phnsapproxtime: *mut i64, pdwpayloadnumberofstreamwithinpacket: *mut u32) -> windows_core::Result<()>; - fn GenerateIndexEntries(&self, piasfpacketsample: Option<&IMFSample>) -> windows_core::Result<()>; - fn CommitIndex(&self, picontentinfo: Option<&IMFASFContentInfo>) -> windows_core::Result<()>; + fn GenerateIndexEntries(&self, piasfpacketsample: windows_core::Ref<'_, IMFSample>) -> windows_core::Result<()>; + fn CommitIndex(&self, picontentinfo: windows_core::Ref<'_, IMFASFContentInfo>) -> windows_core::Result<()>; fn GetIndexWriteSpace(&self) -> windows_core::Result; - fn GetCompletedIndex(&self, piindexbuffer: Option<&IMFMediaBuffer>, cboffsetwithinindex: u64) -> windows_core::Result<()>; + fn GetCompletedIndex(&self, piindexbuffer: windows_core::Ref<'_, IMFMediaBuffer>, cboffsetwithinindex: u64) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMFASFIndexer_Vtbl { @@ -14178,11 +14178,11 @@ impl IMFASFIndexer_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFIndexer_Impl::Initialize(this, windows_core::from_raw_borrowed(&picontentinfo)).into() + IMFASFIndexer_Impl::Initialize(this, core::mem::transmute_copy(&picontentinfo)).into() } unsafe extern "system" fn GetIndexPosition(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void, pcbindexoffset: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFASFIndexer_Impl::GetIndexPosition(this, windows_core::from_raw_borrowed(&picontentinfo)) { + match IMFASFIndexer_Impl::GetIndexPosition(this, core::mem::transmute_copy(&picontentinfo)) { Ok(ok__) => { pcbindexoffset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -14218,11 +14218,11 @@ impl IMFASFIndexer_Vtbl { } unsafe extern "system" fn GenerateIndexEntries(this: *mut core::ffi::c_void, piasfpacketsample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFIndexer_Impl::GenerateIndexEntries(this, windows_core::from_raw_borrowed(&piasfpacketsample)).into() + IMFASFIndexer_Impl::GenerateIndexEntries(this, core::mem::transmute_copy(&piasfpacketsample)).into() } unsafe extern "system" fn CommitIndex(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFIndexer_Impl::CommitIndex(this, windows_core::from_raw_borrowed(&picontentinfo)).into() + IMFASFIndexer_Impl::CommitIndex(this, core::mem::transmute_copy(&picontentinfo)).into() } unsafe extern "system" fn GetIndexWriteSpace(this: *mut core::ffi::c_void, pcbindexwritespace: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14236,7 +14236,7 @@ impl IMFASFIndexer_Vtbl { } unsafe extern "system" fn GetCompletedIndex(this: *mut core::ffi::c_void, piindexbuffer: *mut core::ffi::c_void, cboffsetwithinindex: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFIndexer_Impl::GetCompletedIndex(this, windows_core::from_raw_borrowed(&piindexbuffer), core::mem::transmute_copy(&cboffsetwithinindex)).into() + IMFASFIndexer_Impl::GetCompletedIndex(this, core::mem::transmute_copy(&piindexbuffer), core::mem::transmute_copy(&cboffsetwithinindex)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -14317,13 +14317,13 @@ pub struct IMFASFMultiplexer_Vtbl { pub SetSyncTolerance: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IMFASFMultiplexer_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, picontentinfo: Option<&IMFASFContentInfo>) -> windows_core::Result<()>; + fn Initialize(&self, picontentinfo: windows_core::Ref<'_, IMFASFContentInfo>) -> windows_core::Result<()>; fn SetFlags(&self, dwflags: u32) -> windows_core::Result<()>; fn GetFlags(&self) -> windows_core::Result; - fn ProcessSample(&self, wstreamnumber: u16, pisample: Option<&IMFSample>, hnstimestampadjust: i64) -> windows_core::Result<()>; - fn GetNextPacket(&self, pdwstatusflags: *mut u32, ppipacket: *mut Option) -> windows_core::Result<()>; + fn ProcessSample(&self, wstreamnumber: u16, pisample: windows_core::Ref<'_, IMFSample>, hnstimestampadjust: i64) -> windows_core::Result<()>; + fn GetNextPacket(&self, pdwstatusflags: *mut u32, ppipacket: windows_core::OutRef<'_, IMFSample>) -> windows_core::Result<()>; fn Flush(&self) -> windows_core::Result<()>; - fn End(&self, picontentinfo: Option<&IMFASFContentInfo>) -> windows_core::Result<()>; + fn End(&self, picontentinfo: windows_core::Ref<'_, IMFASFContentInfo>) -> windows_core::Result<()>; fn GetStatistics(&self, wstreamnumber: u16) -> windows_core::Result; fn SetSyncTolerance(&self, mssynctolerance: u32) -> windows_core::Result<()>; } @@ -14331,7 +14331,7 @@ impl IMFASFMultiplexer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFMultiplexer_Impl::Initialize(this, windows_core::from_raw_borrowed(&picontentinfo)).into() + IMFASFMultiplexer_Impl::Initialize(this, core::mem::transmute_copy(&picontentinfo)).into() } unsafe extern "system" fn SetFlags(this: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14349,7 +14349,7 @@ impl IMFASFMultiplexer_Vtbl { } unsafe extern "system" fn ProcessSample(this: *mut core::ffi::c_void, wstreamnumber: u16, pisample: *mut core::ffi::c_void, hnstimestampadjust: i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFMultiplexer_Impl::ProcessSample(this, core::mem::transmute_copy(&wstreamnumber), windows_core::from_raw_borrowed(&pisample), core::mem::transmute_copy(&hnstimestampadjust)).into() + IMFASFMultiplexer_Impl::ProcessSample(this, core::mem::transmute_copy(&wstreamnumber), core::mem::transmute_copy(&pisample), core::mem::transmute_copy(&hnstimestampadjust)).into() } unsafe extern "system" fn GetNextPacket(this: *mut core::ffi::c_void, pdwstatusflags: *mut u32, ppipacket: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14361,7 +14361,7 @@ impl IMFASFMultiplexer_Vtbl { } unsafe extern "system" fn End(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFMultiplexer_Impl::End(this, windows_core::from_raw_borrowed(&picontentinfo)).into() + IMFASFMultiplexer_Impl::End(this, core::mem::transmute_copy(&picontentinfo)).into() } unsafe extern "system" fn GetStatistics(this: *mut core::ffi::c_void, wstreamnumber: u16, pmuxstats: *mut ASF_MUX_STATISTICS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14636,18 +14636,18 @@ pub struct IMFASFProfile_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFASFProfile_Impl: IMFAttributes_Impl { fn GetStreamCount(&self) -> windows_core::Result; - fn GetStream(&self, dwstreamindex: u32, pwstreamnumber: *mut u16, ppistream: *mut Option) -> windows_core::Result<()>; + fn GetStream(&self, dwstreamindex: u32, pwstreamnumber: *mut u16, ppistream: windows_core::OutRef<'_, IMFASFStreamConfig>) -> windows_core::Result<()>; fn GetStreamByNumber(&self, wstreamnumber: u16) -> windows_core::Result; - fn SetStream(&self, pistream: Option<&IMFASFStreamConfig>) -> windows_core::Result<()>; + fn SetStream(&self, pistream: windows_core::Ref<'_, IMFASFStreamConfig>) -> windows_core::Result<()>; fn RemoveStream(&self, wstreamnumber: u16) -> windows_core::Result<()>; - fn CreateStream(&self, pimediatype: Option<&IMFMediaType>) -> windows_core::Result; + fn CreateStream(&self, pimediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result; fn GetMutualExclusionCount(&self) -> windows_core::Result; fn GetMutualExclusion(&self, dwmutexindex: u32) -> windows_core::Result; - fn AddMutualExclusion(&self, pimutex: Option<&IMFASFMutualExclusion>) -> windows_core::Result<()>; + fn AddMutualExclusion(&self, pimutex: windows_core::Ref<'_, IMFASFMutualExclusion>) -> windows_core::Result<()>; fn RemoveMutualExclusion(&self, dwmutexindex: u32) -> windows_core::Result<()>; fn CreateMutualExclusion(&self) -> windows_core::Result; fn GetStreamPrioritization(&self) -> windows_core::Result; - fn AddStreamPrioritization(&self, pistreamprioritization: Option<&IMFASFStreamPrioritization>) -> windows_core::Result<()>; + fn AddStreamPrioritization(&self, pistreamprioritization: windows_core::Ref<'_, IMFASFStreamPrioritization>) -> windows_core::Result<()>; fn RemoveStreamPrioritization(&self) -> windows_core::Result<()>; fn CreateStreamPrioritization(&self) -> windows_core::Result; fn Clone(&self) -> windows_core::Result; @@ -14681,7 +14681,7 @@ impl IMFASFProfile_Vtbl { } unsafe extern "system" fn SetStream(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFProfile_Impl::SetStream(this, windows_core::from_raw_borrowed(&pistream)).into() + IMFASFProfile_Impl::SetStream(this, core::mem::transmute_copy(&pistream)).into() } unsafe extern "system" fn RemoveStream(this: *mut core::ffi::c_void, wstreamnumber: u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14689,7 +14689,7 @@ impl IMFASFProfile_Vtbl { } unsafe extern "system" fn CreateStream(this: *mut core::ffi::c_void, pimediatype: *mut core::ffi::c_void, ppistream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFASFProfile_Impl::CreateStream(this, windows_core::from_raw_borrowed(&pimediatype)) { + match IMFASFProfile_Impl::CreateStream(this, core::mem::transmute_copy(&pimediatype)) { Ok(ok__) => { ppistream.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -14719,7 +14719,7 @@ impl IMFASFProfile_Vtbl { } unsafe extern "system" fn AddMutualExclusion(this: *mut core::ffi::c_void, pimutex: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFProfile_Impl::AddMutualExclusion(this, windows_core::from_raw_borrowed(&pimutex)).into() + IMFASFProfile_Impl::AddMutualExclusion(this, core::mem::transmute_copy(&pimutex)).into() } unsafe extern "system" fn RemoveMutualExclusion(this: *mut core::ffi::c_void, dwmutexindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14747,7 +14747,7 @@ impl IMFASFProfile_Vtbl { } unsafe extern "system" fn AddStreamPrioritization(this: *mut core::ffi::c_void, pistreamprioritization: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFProfile_Impl::AddStreamPrioritization(this, windows_core::from_raw_borrowed(&pistreamprioritization)).into() + IMFASFProfile_Impl::AddStreamPrioritization(this, core::mem::transmute_copy(&pistreamprioritization)).into() } unsafe extern "system" fn RemoveStreamPrioritization(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14852,13 +14852,13 @@ pub struct IMFASFSplitter_Vtbl { pub GetLastSendTime: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IMFASFSplitter_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, picontentinfo: Option<&IMFASFContentInfo>) -> windows_core::Result<()>; + fn Initialize(&self, picontentinfo: windows_core::Ref<'_, IMFASFContentInfo>) -> windows_core::Result<()>; fn SetFlags(&self, dwflags: u32) -> windows_core::Result<()>; fn GetFlags(&self) -> windows_core::Result; fn SelectStreams(&self, pwstreamnumbers: *const u16, wnumstreams: u16) -> windows_core::Result<()>; fn GetSelectedStreams(&self, pwstreamnumbers: *mut u16, pwnumstreams: *mut u16) -> windows_core::Result<()>; - fn ParseData(&self, pibuffer: Option<&IMFMediaBuffer>, cbbufferoffset: u32, cblength: u32) -> windows_core::Result<()>; - fn GetNextSample(&self, pdwstatusflags: *mut ASF_STATUSFLAGS, pwstreamnumber: *mut u16, ppisample: *mut Option) -> windows_core::Result<()>; + fn ParseData(&self, pibuffer: windows_core::Ref<'_, IMFMediaBuffer>, cbbufferoffset: u32, cblength: u32) -> windows_core::Result<()>; + fn GetNextSample(&self, pdwstatusflags: *mut ASF_STATUSFLAGS, pwstreamnumber: *mut u16, ppisample: windows_core::OutRef<'_, IMFSample>) -> windows_core::Result<()>; fn Flush(&self) -> windows_core::Result<()>; fn GetLastSendTime(&self) -> windows_core::Result; } @@ -14866,7 +14866,7 @@ impl IMFASFSplitter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, picontentinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFSplitter_Impl::Initialize(this, windows_core::from_raw_borrowed(&picontentinfo)).into() + IMFASFSplitter_Impl::Initialize(this, core::mem::transmute_copy(&picontentinfo)).into() } unsafe extern "system" fn SetFlags(this: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14892,7 +14892,7 @@ impl IMFASFSplitter_Vtbl { } unsafe extern "system" fn ParseData(this: *mut core::ffi::c_void, pibuffer: *mut core::ffi::c_void, cbbufferoffset: u32, cblength: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFSplitter_Impl::ParseData(this, windows_core::from_raw_borrowed(&pibuffer), core::mem::transmute_copy(&cbbufferoffset), core::mem::transmute_copy(&cblength)).into() + IMFASFSplitter_Impl::ParseData(this, core::mem::transmute_copy(&pibuffer), core::mem::transmute_copy(&cbbufferoffset), core::mem::transmute_copy(&cblength)).into() } unsafe extern "system" fn GetNextSample(this: *mut core::ffi::c_void, pdwstatusflags: *mut ASF_STATUSFLAGS, pwstreamnumber: *mut u16, ppisample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14997,7 +14997,7 @@ pub trait IMFASFStreamConfig_Impl: IMFAttributes_Impl { fn GetStreamNumber(&self) -> u16; fn SetStreamNumber(&self, wstreamnum: u16) -> windows_core::Result<()>; fn GetMediaType(&self) -> windows_core::Result; - fn SetMediaType(&self, pimediatype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn SetMediaType(&self, pimediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; fn GetPayloadExtensionCount(&self) -> windows_core::Result; fn GetPayloadExtension(&self, wpayloadextensionnumber: u16, pguidextensionsystemid: *mut windows_core::GUID, pcbextensiondatasize: *mut u16, pbextensionsysteminfo: *mut u8, pcbextensionsysteminfo: *mut u32) -> windows_core::Result<()>; fn AddPayloadExtension(&self, guidextensionsystemid: &windows_core::GUID, cbextensiondatasize: u16, pbextensionsysteminfo: *const u8, cbextensionsysteminfo: u32) -> windows_core::Result<()>; @@ -15037,7 +15037,7 @@ impl IMFASFStreamConfig_Vtbl { } unsafe extern "system" fn SetMediaType(this: *mut core::ffi::c_void, pimediatype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFASFStreamConfig_Impl::SetMediaType(this, windows_core::from_raw_borrowed(&pimediatype)).into() + IMFASFStreamConfig_Impl::SetMediaType(this, core::mem::transmute_copy(&pimediatype)).into() } unsafe extern "system" fn GetPayloadExtensionCount(this: *mut core::ffi::c_void, pcpayloadextensions: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15492,7 +15492,7 @@ pub struct IMFAsyncCallback_Vtbl { } pub trait IMFAsyncCallback_Impl: windows_core::IUnknownImpl { fn GetParameters(&self, pdwflags: *mut u32, pdwqueue: *mut u32) -> windows_core::Result<()>; - fn Invoke(&self, pasyncresult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; + fn Invoke(&self, pasyncresult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; } impl IMFAsyncCallback_Vtbl { pub const fn new() -> Self { @@ -15502,7 +15502,7 @@ impl IMFAsyncCallback_Vtbl { } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, pasyncresult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFAsyncCallback_Impl::Invoke(this, windows_core::from_raw_borrowed(&pasyncresult)).into() + IMFAsyncCallback_Impl::Invoke(this, core::mem::transmute_copy(&pasyncresult)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -15822,7 +15822,7 @@ pub trait IMFAttributes_Impl: windows_core::IUnknownImpl { fn GetItem(&self, guidkey: *const windows_core::GUID, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn GetItemType(&self, guidkey: *const windows_core::GUID) -> windows_core::Result; fn CompareItem(&self, guidkey: *const windows_core::GUID, value: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result; - fn Compare(&self, ptheirs: Option<&IMFAttributes>, matchtype: MF_ATTRIBUTES_MATCH_TYPE) -> windows_core::Result; + fn Compare(&self, ptheirs: windows_core::Ref<'_, IMFAttributes>, matchtype: MF_ATTRIBUTES_MATCH_TYPE) -> windows_core::Result; fn GetUINT32(&self, guidkey: *const windows_core::GUID) -> windows_core::Result; fn GetUINT64(&self, guidkey: *const windows_core::GUID) -> windows_core::Result; fn GetDouble(&self, guidkey: *const windows_core::GUID) -> windows_core::Result; @@ -15843,12 +15843,12 @@ pub trait IMFAttributes_Impl: windows_core::IUnknownImpl { fn SetGUID(&self, guidkey: *const windows_core::GUID, guidvalue: *const windows_core::GUID) -> windows_core::Result<()>; fn SetString(&self, guidkey: *const windows_core::GUID, wszvalue: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetBlob(&self, guidkey: *const windows_core::GUID, pbuf: *const u8, cbbufsize: u32) -> windows_core::Result<()>; - fn SetUnknown(&self, guidkey: *const windows_core::GUID, punknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetUnknown(&self, guidkey: *const windows_core::GUID, punknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn LockStore(&self) -> windows_core::Result<()>; fn UnlockStore(&self) -> windows_core::Result<()>; fn GetCount(&self) -> windows_core::Result; fn GetItemByIndex(&self, unindex: u32, pguidkey: *mut windows_core::GUID, pvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; - fn CopyAllItems(&self, pdest: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn CopyAllItems(&self, pdest: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMFAttributes_Vtbl { @@ -15879,7 +15879,7 @@ impl IMFAttributes_Vtbl { } unsafe extern "system" fn Compare(this: *mut core::ffi::c_void, ptheirs: *mut core::ffi::c_void, matchtype: MF_ATTRIBUTES_MATCH_TYPE, pbresult: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFAttributes_Impl::Compare(this, windows_core::from_raw_borrowed(&ptheirs), core::mem::transmute_copy(&matchtype)) { + match IMFAttributes_Impl::Compare(this, core::mem::transmute_copy(&ptheirs), core::mem::transmute_copy(&matchtype)) { Ok(ok__) => { pbresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -16005,7 +16005,7 @@ impl IMFAttributes_Vtbl { } unsafe extern "system" fn SetUnknown(this: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFAttributes_Impl::SetUnknown(this, core::mem::transmute_copy(&guidkey), windows_core::from_raw_borrowed(&punknown)).into() + IMFAttributes_Impl::SetUnknown(this, core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&punknown)).into() } unsafe extern "system" fn LockStore(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16031,7 +16031,7 @@ impl IMFAttributes_Vtbl { } unsafe extern "system" fn CopyAllItems(this: *mut core::ffi::c_void, pdest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFAttributes_Impl::CopyAllItems(this, windows_core::from_raw_borrowed(&pdest)).into() + IMFAttributes_Impl::CopyAllItems(this, core::mem::transmute_copy(&pdest)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -16446,11 +16446,11 @@ pub trait IMFByteStream_Impl: windows_core::IUnknownImpl { fn SetCurrentPosition(&self, qwposition: u64) -> windows_core::Result<()>; fn IsEndOfStream(&self) -> windows_core::Result; fn Read(&self, pb: *mut u8, cb: u32, pcbread: *mut u32) -> windows_core::Result<()>; - fn BeginRead(&self, pb: *mut u8, cb: u32, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndRead(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; + fn BeginRead(&self, pb: *mut u8, cb: u32, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndRead(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; fn Write(&self, pb: *const u8, cb: u32) -> windows_core::Result; - fn BeginWrite(&self, pb: *const u8, cb: u32, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndWrite(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; + fn BeginWrite(&self, pb: *const u8, cb: u32, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndWrite(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; fn Seek(&self, seekorigin: MFBYTESTREAM_SEEK_ORIGIN, llseekoffset: i64, dwseekflags: u32) -> windows_core::Result; fn Flush(&self) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; @@ -16511,11 +16511,11 @@ impl IMFByteStream_Vtbl { } unsafe extern "system" fn BeginRead(this: *mut core::ffi::c_void, pb: *mut u8, cb: u32, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFByteStream_Impl::BeginRead(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFByteStream_Impl::BeginRead(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndRead(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pcbread: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFByteStream_Impl::EndRead(this, windows_core::from_raw_borrowed(&presult)) { + match IMFByteStream_Impl::EndRead(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { pcbread.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -16535,11 +16535,11 @@ impl IMFByteStream_Vtbl { } unsafe extern "system" fn BeginWrite(this: *mut core::ffi::c_void, pb: *const u8, cb: u32, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFByteStream_Impl::BeginWrite(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFByteStream_Impl::BeginWrite(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndWrite(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pcbwritten: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFByteStream_Impl::EndWrite(this, windows_core::from_raw_borrowed(&presult)) { + match IMFByteStream_Impl::EndWrite(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { pcbwritten.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -16776,9 +16776,9 @@ pub struct IMFByteStreamHandler_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IMFByteStreamHandler_Impl: windows_core::IUnknownImpl { - fn BeginCreateObject(&self, pbytestream: Option<&IMFByteStream>, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: *mut Option, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndCreateObject(&self, presult: Option<&IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()>; - fn CancelObjectCreation(&self, piunknowncancelcookie: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn BeginCreateObject(&self, pbytestream: windows_core::Ref<'_, IMFByteStream>, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: windows_core::OutRef<'_, windows_core::IUnknown>, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndCreateObject(&self, presult: windows_core::Ref<'_, IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CancelObjectCreation(&self, piunknowncancelcookie: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetMaxNumberOfBytesRequiredForResolution(&self) -> windows_core::Result; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -16786,15 +16786,15 @@ impl IMFByteStreamHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginCreateObject(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFByteStreamHandler_Impl::BeginCreateObject(this, windows_core::from_raw_borrowed(&pbytestream), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFByteStreamHandler_Impl::BeginCreateObject(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndCreateObject(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFByteStreamHandler_Impl::EndCreateObject(this, windows_core::from_raw_borrowed(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() + IMFByteStreamHandler_Impl::EndCreateObject(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() } unsafe extern "system" fn CancelObjectCreation(this: *mut core::ffi::c_void, piunknowncancelcookie: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFByteStreamHandler_Impl::CancelObjectCreation(this, windows_core::from_raw_borrowed(&piunknowncancelcookie)).into() + IMFByteStreamHandler_Impl::CancelObjectCreation(this, core::mem::transmute_copy(&piunknowncancelcookie)).into() } unsafe extern "system" fn GetMaxNumberOfBytesRequiredForResolution(this: *mut core::ffi::c_void, pqwbytes: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16839,13 +16839,13 @@ pub struct IMFByteStreamProxyClassFactory_Vtbl { pub CreateByteStreamProxy: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFByteStreamProxyClassFactory_Impl: windows_core::IUnknownImpl { - fn CreateByteStreamProxy(&self, pbytestream: Option<&IMFByteStream>, pattributes: Option<&IMFAttributes>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateByteStreamProxy(&self, pbytestream: windows_core::Ref<'_, IMFByteStream>, pattributes: windows_core::Ref<'_, IMFAttributes>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IMFByteStreamProxyClassFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateByteStreamProxy(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFByteStreamProxyClassFactory_Impl::CreateByteStreamProxy(this, windows_core::from_raw_borrowed(&pbytestream), windows_core::from_raw_borrowed(&pattributes), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() + IMFByteStreamProxyClassFactory_Impl::CreateByteStreamProxy(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreateByteStreamProxy: CreateByteStreamProxy:: } } @@ -16940,15 +16940,15 @@ pub struct IMFCameraConfigurationManager_Vtbl { pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void), } pub trait IMFCameraConfigurationManager_Impl: windows_core::IUnknownImpl { - fn LoadDefaults(&self, cameraattributes: Option<&IMFAttributes>) -> windows_core::Result; - fn SaveDefaults(&self, configurations: Option<&IMFCameraControlDefaultsCollection>) -> windows_core::Result<()>; + fn LoadDefaults(&self, cameraattributes: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result; + fn SaveDefaults(&self, configurations: windows_core::Ref<'_, IMFCameraControlDefaultsCollection>) -> windows_core::Result<()>; fn Shutdown(&self); } impl IMFCameraConfigurationManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn LoadDefaults(this: *mut core::ffi::c_void, cameraattributes: *mut core::ffi::c_void, configurations: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFCameraConfigurationManager_Impl::LoadDefaults(this, windows_core::from_raw_borrowed(&cameraattributes)) { + match IMFCameraConfigurationManager_Impl::LoadDefaults(this, core::mem::transmute_copy(&cameraattributes)) { Ok(ok__) => { configurations.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -16958,7 +16958,7 @@ impl IMFCameraConfigurationManager_Vtbl { } unsafe extern "system" fn SaveDefaults(this: *mut core::ffi::c_void, configurations: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCameraConfigurationManager_Impl::SaveDefaults(this, windows_core::from_raw_borrowed(&configurations)).into() + IMFCameraConfigurationManager_Impl::SaveDefaults(this, core::mem::transmute_copy(&configurations)).into() } unsafe extern "system" fn Shutdown(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17365,13 +17365,13 @@ pub struct IMFCameraOcclusionStateReportCallback_Vtbl { pub OnOcclusionStateReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFCameraOcclusionStateReportCallback_Impl: windows_core::IUnknownImpl { - fn OnOcclusionStateReport(&self, occlusionstatereport: Option<&IMFCameraOcclusionStateReport>) -> windows_core::Result<()>; + fn OnOcclusionStateReport(&self, occlusionstatereport: windows_core::Ref<'_, IMFCameraOcclusionStateReport>) -> windows_core::Result<()>; } impl IMFCameraOcclusionStateReportCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnOcclusionStateReport(this: *mut core::ffi::c_void, occlusionstatereport: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCameraOcclusionStateReportCallback_Impl::OnOcclusionStateReport(this, windows_core::from_raw_borrowed(&occlusionstatereport)).into() + IMFCameraOcclusionStateReportCallback_Impl::OnOcclusionStateReport(this, core::mem::transmute_copy(&occlusionstatereport)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnOcclusionStateReport: OnOcclusionStateReport:: } } @@ -17470,7 +17470,7 @@ pub struct IMFCaptureEngine_Vtbl { pub GetSource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFCaptureEngine_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, peventcallback: Option<&IMFCaptureEngineOnEventCallback>, pattributes: Option<&IMFAttributes>, paudiosource: Option<&windows_core::IUnknown>, pvideosource: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, peventcallback: windows_core::Ref<'_, IMFCaptureEngineOnEventCallback>, pattributes: windows_core::Ref<'_, IMFAttributes>, paudiosource: windows_core::Ref<'_, windows_core::IUnknown>, pvideosource: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn StartPreview(&self) -> windows_core::Result<()>; fn StopPreview(&self) -> windows_core::Result<()>; fn StartRecord(&self) -> windows_core::Result<()>; @@ -17483,7 +17483,7 @@ impl IMFCaptureEngine_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, peventcallback: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void, paudiosource: *mut core::ffi::c_void, pvideosource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureEngine_Impl::Initialize(this, windows_core::from_raw_borrowed(&peventcallback), windows_core::from_raw_borrowed(&pattributes), windows_core::from_raw_borrowed(&paudiosource), windows_core::from_raw_borrowed(&pvideosource)).into() + IMFCaptureEngine_Impl::Initialize(this, core::mem::transmute_copy(&peventcallback), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&paudiosource), core::mem::transmute_copy(&pvideosource)).into() } unsafe extern "system" fn StartPreview(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17590,13 +17590,13 @@ pub struct IMFCaptureEngineOnEventCallback_Vtbl { pub OnEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFCaptureEngineOnEventCallback_Impl: windows_core::IUnknownImpl { - fn OnEvent(&self, pevent: Option<&IMFMediaEvent>) -> windows_core::Result<()>; + fn OnEvent(&self, pevent: windows_core::Ref<'_, IMFMediaEvent>) -> windows_core::Result<()>; } impl IMFCaptureEngineOnEventCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnEvent(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureEngineOnEventCallback_Impl::OnEvent(this, windows_core::from_raw_borrowed(&pevent)).into() + IMFCaptureEngineOnEventCallback_Impl::OnEvent(this, core::mem::transmute_copy(&pevent)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnEvent: OnEvent:: } } @@ -17621,13 +17621,13 @@ pub struct IMFCaptureEngineOnSampleCallback_Vtbl { pub OnSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFCaptureEngineOnSampleCallback_Impl: windows_core::IUnknownImpl { - fn OnSample(&self, psample: Option<&IMFSample>) -> windows_core::Result<()>; + fn OnSample(&self, psample: windows_core::Ref<'_, IMFSample>) -> windows_core::Result<()>; } impl IMFCaptureEngineOnSampleCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSample(this: *mut core::ffi::c_void, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureEngineOnSampleCallback_Impl::OnSample(this, windows_core::from_raw_borrowed(&psample)).into() + IMFCaptureEngineOnSampleCallback_Impl::OnSample(this, core::mem::transmute_copy(&psample)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnSample: OnSample:: } } @@ -17658,13 +17658,13 @@ pub struct IMFCaptureEngineOnSampleCallback2_Vtbl { pub OnSynchronizedEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFCaptureEngineOnSampleCallback2_Impl: IMFCaptureEngineOnSampleCallback_Impl { - fn OnSynchronizedEvent(&self, pevent: Option<&IMFMediaEvent>) -> windows_core::Result<()>; + fn OnSynchronizedEvent(&self, pevent: windows_core::Ref<'_, IMFMediaEvent>) -> windows_core::Result<()>; } impl IMFCaptureEngineOnSampleCallback2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSynchronizedEvent(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureEngineOnSampleCallback2_Impl::OnSynchronizedEvent(this, windows_core::from_raw_borrowed(&pevent)).into() + IMFCaptureEngineOnSampleCallback2_Impl::OnSynchronizedEvent(this, core::mem::transmute_copy(&pevent)).into() } Self { base__: IMFCaptureEngineOnSampleCallback_Vtbl::new::(), OnSynchronizedEvent: OnSynchronizedEvent:: } } @@ -17698,7 +17698,7 @@ pub struct IMFCapturePhotoConfirmation_Vtbl { pub GetPixelFormat: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT, } pub trait IMFCapturePhotoConfirmation_Impl: windows_core::IUnknownImpl { - fn SetPhotoConfirmationCallback(&self, pnotificationcallback: Option<&IMFAsyncCallback>) -> windows_core::Result<()>; + fn SetPhotoConfirmationCallback(&self, pnotificationcallback: windows_core::Ref<'_, IMFAsyncCallback>) -> windows_core::Result<()>; fn SetPixelFormat(&self, subtype: &windows_core::GUID) -> windows_core::Result<()>; fn GetPixelFormat(&self) -> windows_core::Result; } @@ -17706,7 +17706,7 @@ impl IMFCapturePhotoConfirmation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPhotoConfirmationCallback(this: *mut core::ffi::c_void, pnotificationcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCapturePhotoConfirmation_Impl::SetPhotoConfirmationCallback(this, windows_core::from_raw_borrowed(&pnotificationcallback)).into() + IMFCapturePhotoConfirmation_Impl::SetPhotoConfirmationCallback(this, core::mem::transmute_copy(&pnotificationcallback)).into() } unsafe extern "system" fn SetPixelFormat(this: *mut core::ffi::c_void, subtype: windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17771,8 +17771,8 @@ pub struct IMFCapturePhotoSink_Vtbl { } pub trait IMFCapturePhotoSink_Impl: IMFCaptureSink_Impl { fn SetOutputFileName(&self, filename: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetSampleCallback(&self, pcallback: Option<&IMFCaptureEngineOnSampleCallback>) -> windows_core::Result<()>; - fn SetOutputByteStream(&self, pbytestream: Option<&IMFByteStream>) -> windows_core::Result<()>; + fn SetSampleCallback(&self, pcallback: windows_core::Ref<'_, IMFCaptureEngineOnSampleCallback>) -> windows_core::Result<()>; + fn SetOutputByteStream(&self, pbytestream: windows_core::Ref<'_, IMFByteStream>) -> windows_core::Result<()>; } impl IMFCapturePhotoSink_Vtbl { pub const fn new() -> Self { @@ -17782,11 +17782,11 @@ impl IMFCapturePhotoSink_Vtbl { } unsafe extern "system" fn SetSampleCallback(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCapturePhotoSink_Impl::SetSampleCallback(this, windows_core::from_raw_borrowed(&pcallback)).into() + IMFCapturePhotoSink_Impl::SetSampleCallback(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn SetOutputByteStream(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCapturePhotoSink_Impl::SetOutputByteStream(this, windows_core::from_raw_borrowed(&pbytestream)).into() + IMFCapturePhotoSink_Impl::SetOutputByteStream(this, core::mem::transmute_copy(&pbytestream)).into() } Self { base__: IMFCaptureSink_Vtbl::new::(), @@ -17863,14 +17863,14 @@ pub struct IMFCapturePreviewSink_Vtbl { } pub trait IMFCapturePreviewSink_Impl: IMFCaptureSink_Impl { fn SetRenderHandle(&self, handle: super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn SetRenderSurface(&self, psurface: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetRenderSurface(&self, psurface: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn UpdateVideo(&self, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const super::super::Foundation::COLORREF) -> windows_core::Result<()>; - fn SetSampleCallback(&self, dwstreamsinkindex: u32, pcallback: Option<&IMFCaptureEngineOnSampleCallback>) -> windows_core::Result<()>; + fn SetSampleCallback(&self, dwstreamsinkindex: u32, pcallback: windows_core::Ref<'_, IMFCaptureEngineOnSampleCallback>) -> windows_core::Result<()>; fn GetMirrorState(&self) -> windows_core::Result; fn SetMirrorState(&self, fmirrorstate: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetRotation(&self, dwstreamindex: u32) -> windows_core::Result; fn SetRotation(&self, dwstreamindex: u32, dwrotationvalue: u32) -> windows_core::Result<()>; - fn SetCustomSink(&self, pmediasink: Option<&IMFMediaSink>) -> windows_core::Result<()>; + fn SetCustomSink(&self, pmediasink: windows_core::Ref<'_, IMFMediaSink>) -> windows_core::Result<()>; } impl IMFCapturePreviewSink_Vtbl { pub const fn new() -> Self { @@ -17880,7 +17880,7 @@ impl IMFCapturePreviewSink_Vtbl { } unsafe extern "system" fn SetRenderSurface(this: *mut core::ffi::c_void, psurface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCapturePreviewSink_Impl::SetRenderSurface(this, windows_core::from_raw_borrowed(&psurface)).into() + IMFCapturePreviewSink_Impl::SetRenderSurface(this, core::mem::transmute_copy(&psurface)).into() } unsafe extern "system" fn UpdateVideo(this: *mut core::ffi::c_void, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const super::super::Foundation::COLORREF) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17888,7 +17888,7 @@ impl IMFCapturePreviewSink_Vtbl { } unsafe extern "system" fn SetSampleCallback(this: *mut core::ffi::c_void, dwstreamsinkindex: u32, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCapturePreviewSink_Impl::SetSampleCallback(this, core::mem::transmute_copy(&dwstreamsinkindex), windows_core::from_raw_borrowed(&pcallback)).into() + IMFCapturePreviewSink_Impl::SetSampleCallback(this, core::mem::transmute_copy(&dwstreamsinkindex), core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn GetMirrorState(this: *mut core::ffi::c_void, pfmirrorstate: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17920,7 +17920,7 @@ impl IMFCapturePreviewSink_Vtbl { } unsafe extern "system" fn SetCustomSink(this: *mut core::ffi::c_void, pmediasink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCapturePreviewSink_Impl::SetCustomSink(this, windows_core::from_raw_borrowed(&pmediasink)).into() + IMFCapturePreviewSink_Impl::SetCustomSink(this, core::mem::transmute_copy(&pmediasink)).into() } Self { base__: IMFCaptureSink_Vtbl::new::(), @@ -17992,10 +17992,10 @@ pub struct IMFCaptureRecordSink_Vtbl { pub SetRotation: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait IMFCaptureRecordSink_Impl: IMFCaptureSink_Impl { - fn SetOutputByteStream(&self, pbytestream: Option<&IMFByteStream>, guidcontainertype: *const windows_core::GUID) -> windows_core::Result<()>; + fn SetOutputByteStream(&self, pbytestream: windows_core::Ref<'_, IMFByteStream>, guidcontainertype: *const windows_core::GUID) -> windows_core::Result<()>; fn SetOutputFileName(&self, filename: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetSampleCallback(&self, dwstreamsinkindex: u32, pcallback: Option<&IMFCaptureEngineOnSampleCallback>) -> windows_core::Result<()>; - fn SetCustomSink(&self, pmediasink: Option<&IMFMediaSink>) -> windows_core::Result<()>; + fn SetSampleCallback(&self, dwstreamsinkindex: u32, pcallback: windows_core::Ref<'_, IMFCaptureEngineOnSampleCallback>) -> windows_core::Result<()>; + fn SetCustomSink(&self, pmediasink: windows_core::Ref<'_, IMFMediaSink>) -> windows_core::Result<()>; fn GetRotation(&self, dwstreamindex: u32) -> windows_core::Result; fn SetRotation(&self, dwstreamindex: u32, dwrotationvalue: u32) -> windows_core::Result<()>; } @@ -18003,7 +18003,7 @@ impl IMFCaptureRecordSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOutputByteStream(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, guidcontainertype: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureRecordSink_Impl::SetOutputByteStream(this, windows_core::from_raw_borrowed(&pbytestream), core::mem::transmute_copy(&guidcontainertype)).into() + IMFCaptureRecordSink_Impl::SetOutputByteStream(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&guidcontainertype)).into() } unsafe extern "system" fn SetOutputFileName(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18011,11 +18011,11 @@ impl IMFCaptureRecordSink_Vtbl { } unsafe extern "system" fn SetSampleCallback(this: *mut core::ffi::c_void, dwstreamsinkindex: u32, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureRecordSink_Impl::SetSampleCallback(this, core::mem::transmute_copy(&dwstreamsinkindex), windows_core::from_raw_borrowed(&pcallback)).into() + IMFCaptureRecordSink_Impl::SetSampleCallback(this, core::mem::transmute_copy(&dwstreamsinkindex), core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn SetCustomSink(this: *mut core::ffi::c_void, pmediasink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureRecordSink_Impl::SetCustomSink(this, windows_core::from_raw_borrowed(&pmediasink)).into() + IMFCaptureRecordSink_Impl::SetCustomSink(this, core::mem::transmute_copy(&pmediasink)).into() } unsafe extern "system" fn GetRotation(this: *mut core::ffi::c_void, dwstreamindex: u32, pdwrotationvalue: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18079,9 +18079,9 @@ pub struct IMFCaptureSink_Vtbl { pub RemoveAllStreams: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFCaptureSink_Impl: windows_core::IUnknownImpl { - fn GetOutputMediaType(&self, dwsinkstreamindex: u32, ppmediatype: *mut Option) -> windows_core::Result<()>; - fn GetService(&self, dwsinkstreamindex: u32, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: *mut Option) -> windows_core::Result<()>; - fn AddStream(&self, dwsourcestreamindex: u32, pmediatype: Option<&IMFMediaType>, pattributes: Option<&IMFAttributes>, pdwsinkstreamindex: *mut u32) -> windows_core::Result<()>; + fn GetOutputMediaType(&self, dwsinkstreamindex: u32, ppmediatype: windows_core::OutRef<'_, IMFMediaType>) -> windows_core::Result<()>; + fn GetService(&self, dwsinkstreamindex: u32, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddStream(&self, dwsourcestreamindex: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>, pattributes: windows_core::Ref<'_, IMFAttributes>, pdwsinkstreamindex: *mut u32) -> windows_core::Result<()>; fn Prepare(&self) -> windows_core::Result<()>; fn RemoveAllStreams(&self) -> windows_core::Result<()>; } @@ -18097,7 +18097,7 @@ impl IMFCaptureSink_Vtbl { } unsafe extern "system" fn AddStream(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, pmediatype: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void, pdwsinkstreamindex: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureSink_Impl::AddStream(this, core::mem::transmute_copy(&dwsourcestreamindex), windows_core::from_raw_borrowed(&pmediatype), windows_core::from_raw_borrowed(&pattributes), core::mem::transmute_copy(&pdwsinkstreamindex)).into() + IMFCaptureSink_Impl::AddStream(this, core::mem::transmute_copy(&dwsourcestreamindex), core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&pdwsinkstreamindex)).into() } unsafe extern "system" fn Prepare(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18144,13 +18144,13 @@ pub struct IMFCaptureSink2_Vtbl { pub SetOutputMediaType: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFCaptureSink2_Impl: IMFCaptureSink_Impl { - fn SetOutputMediaType(&self, dwstreamindex: u32, pmediatype: Option<&IMFMediaType>, pencodingattributes: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn SetOutputMediaType(&self, dwstreamindex: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>, pencodingattributes: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; } impl IMFCaptureSink2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOutputMediaType(this: *mut core::ffi::c_void, dwstreamindex: u32, pmediatype: *mut core::ffi::c_void, pencodingattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureSink2_Impl::SetOutputMediaType(this, core::mem::transmute_copy(&dwstreamindex), windows_core::from_raw_borrowed(&pmediatype), windows_core::from_raw_borrowed(&pencodingattributes)).into() + IMFCaptureSink2_Impl::SetOutputMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&pencodingattributes)).into() } Self { base__: IMFCaptureSink_Vtbl::new::(), SetOutputMediaType: SetOutputMediaType:: } } @@ -18238,14 +18238,14 @@ pub struct IMFCaptureSource_Vtbl { pub GetStreamIndexFromFriendlyName: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT, } pub trait IMFCaptureSource_Impl: windows_core::IUnknownImpl { - fn GetCaptureDeviceSource(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppmediasource: *mut Option) -> windows_core::Result<()>; - fn GetCaptureDeviceActivate(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppactivate: *mut Option) -> windows_core::Result<()>; - fn GetService(&self, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: *mut Option) -> windows_core::Result<()>; - fn AddEffect(&self, dwsourcestreamindex: u32, punknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn RemoveEffect(&self, dwsourcestreamindex: u32, punknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetCaptureDeviceSource(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppmediasource: windows_core::OutRef<'_, IMFMediaSource>) -> windows_core::Result<()>; + fn GetCaptureDeviceActivate(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppactivate: windows_core::OutRef<'_, IMFActivate>) -> windows_core::Result<()>; + fn GetService(&self, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddEffect(&self, dwsourcestreamindex: u32, punknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn RemoveEffect(&self, dwsourcestreamindex: u32, punknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RemoveAllEffects(&self, dwsourcestreamindex: u32) -> windows_core::Result<()>; - fn GetAvailableDeviceMediaType(&self, dwsourcestreamindex: u32, dwmediatypeindex: u32, ppmediatype: *mut Option) -> windows_core::Result<()>; - fn SetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32, pmediatype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn GetAvailableDeviceMediaType(&self, dwsourcestreamindex: u32, dwmediatypeindex: u32, ppmediatype: windows_core::OutRef<'_, IMFMediaType>) -> windows_core::Result<()>; + fn SetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; fn GetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32) -> windows_core::Result; fn GetDeviceStreamCount(&self) -> windows_core::Result; fn GetDeviceStreamCategory(&self, dwsourcestreamindex: u32) -> windows_core::Result; @@ -18269,11 +18269,11 @@ impl IMFCaptureSource_Vtbl { } unsafe extern "system" fn AddEffect(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureSource_Impl::AddEffect(this, core::mem::transmute_copy(&dwsourcestreamindex), windows_core::from_raw_borrowed(&punknown)).into() + IMFCaptureSource_Impl::AddEffect(this, core::mem::transmute_copy(&dwsourcestreamindex), core::mem::transmute_copy(&punknown)).into() } unsafe extern "system" fn RemoveEffect(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureSource_Impl::RemoveEffect(this, core::mem::transmute_copy(&dwsourcestreamindex), windows_core::from_raw_borrowed(&punknown)).into() + IMFCaptureSource_Impl::RemoveEffect(this, core::mem::transmute_copy(&dwsourcestreamindex), core::mem::transmute_copy(&punknown)).into() } unsafe extern "system" fn RemoveAllEffects(this: *mut core::ffi::c_void, dwsourcestreamindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18285,7 +18285,7 @@ impl IMFCaptureSource_Vtbl { } unsafe extern "system" fn SetCurrentDeviceMediaType(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCaptureSource_Impl::SetCurrentDeviceMediaType(this, core::mem::transmute_copy(&dwsourcestreamindex), windows_core::from_raw_borrowed(&pmediatype)).into() + IMFCaptureSource_Impl::SetCurrentDeviceMediaType(this, core::mem::transmute_copy(&dwsourcestreamindex), core::mem::transmute_copy(&pmediatype)).into() } unsafe extern "system" fn GetCurrentDeviceMediaType(this: *mut core::ffi::c_void, dwsourcestreamindex: u32, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18514,14 +18514,14 @@ pub struct IMFClockConsumer_Vtbl { pub GetPresentationClock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFClockConsumer_Impl: windows_core::IUnknownImpl { - fn SetPresentationClock(&self, ppresentationclock: Option<&IMFPresentationClock>) -> windows_core::Result<()>; + fn SetPresentationClock(&self, ppresentationclock: windows_core::Ref<'_, IMFPresentationClock>) -> windows_core::Result<()>; fn GetPresentationClock(&self) -> windows_core::Result; } impl IMFClockConsumer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPresentationClock(this: *mut core::ffi::c_void, ppresentationclock: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFClockConsumer_Impl::SetPresentationClock(this, windows_core::from_raw_borrowed(&ppresentationclock)).into() + IMFClockConsumer_Impl::SetPresentationClock(this, core::mem::transmute_copy(&ppresentationclock)).into() } unsafe extern "system" fn GetPresentationClock(this: *mut core::ffi::c_void, pppresentationclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18659,9 +18659,9 @@ pub struct IMFCollection_Vtbl { pub trait IMFCollection_Impl: windows_core::IUnknownImpl { fn GetElementCount(&self) -> windows_core::Result; fn GetElement(&self, dwelementindex: u32) -> windows_core::Result; - fn AddElement(&self, punkelement: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddElement(&self, punkelement: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RemoveElement(&self, dwelementindex: u32) -> windows_core::Result; - fn InsertElementAt(&self, dwindex: u32, punknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn InsertElementAt(&self, dwindex: u32, punknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RemoveAllElements(&self) -> windows_core::Result<()>; } impl IMFCollection_Vtbl { @@ -18688,7 +18688,7 @@ impl IMFCollection_Vtbl { } unsafe extern "system" fn AddElement(this: *mut core::ffi::c_void, punkelement: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCollection_Impl::AddElement(this, windows_core::from_raw_borrowed(&punkelement)).into() + IMFCollection_Impl::AddElement(this, core::mem::transmute_copy(&punkelement)).into() } unsafe extern "system" fn RemoveElement(this: *mut core::ffi::c_void, dwelementindex: u32, ppunkelement: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18702,7 +18702,7 @@ impl IMFCollection_Vtbl { } unsafe extern "system" fn InsertElementAt(this: *mut core::ffi::c_void, dwindex: u32, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFCollection_Impl::InsertElementAt(this, core::mem::transmute_copy(&dwindex), windows_core::from_raw_borrowed(&punknown)).into() + IMFCollection_Impl::InsertElementAt(this, core::mem::transmute_copy(&dwindex), core::mem::transmute_copy(&punknown)).into() } unsafe extern "system" fn RemoveAllElements(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18773,10 +18773,10 @@ pub struct IMFContentDecryptionModule_Vtbl { pub GetProtectionSystemIds: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut windows_core::GUID, *mut u32) -> windows_core::HRESULT, } pub trait IMFContentDecryptionModule_Impl: windows_core::IUnknownImpl { - fn SetContentEnabler(&self, contentenabler: Option<&IMFContentEnabler>, result: Option<&IMFAsyncResult>) -> windows_core::Result<()>; + fn SetContentEnabler(&self, contentenabler: windows_core::Ref<'_, IMFContentEnabler>, result: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; fn GetSuspendNotify(&self) -> windows_core::Result; - fn SetPMPHostApp(&self, pmphostapp: Option<&IMFPMPHostApp>) -> windows_core::Result<()>; - fn CreateSession(&self, sessiontype: MF_MEDIAKEYSESSION_TYPE, callbacks: Option<&IMFContentDecryptionModuleSessionCallbacks>) -> windows_core::Result; + fn SetPMPHostApp(&self, pmphostapp: windows_core::Ref<'_, IMFPMPHostApp>) -> windows_core::Result<()>; + fn CreateSession(&self, sessiontype: MF_MEDIAKEYSESSION_TYPE, callbacks: windows_core::Ref<'_, IMFContentDecryptionModuleSessionCallbacks>) -> windows_core::Result; fn SetServerCertificate(&self, certificate: *const u8, certificatesize: u32) -> windows_core::Result<()>; fn CreateTrustedInput(&self, contentinitdata: *const u8, contentinitdatasize: u32) -> windows_core::Result; fn GetProtectionSystemIds(&self, systemids: *mut *mut windows_core::GUID, count: *mut u32) -> windows_core::Result<()>; @@ -18785,7 +18785,7 @@ impl IMFContentDecryptionModule_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetContentEnabler(this: *mut core::ffi::c_void, contentenabler: *mut core::ffi::c_void, result: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFContentDecryptionModule_Impl::SetContentEnabler(this, windows_core::from_raw_borrowed(&contentenabler), windows_core::from_raw_borrowed(&result)).into() + IMFContentDecryptionModule_Impl::SetContentEnabler(this, core::mem::transmute_copy(&contentenabler), core::mem::transmute_copy(&result)).into() } unsafe extern "system" fn GetSuspendNotify(this: *mut core::ffi::c_void, notify: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18799,11 +18799,11 @@ impl IMFContentDecryptionModule_Vtbl { } unsafe extern "system" fn SetPMPHostApp(this: *mut core::ffi::c_void, pmphostapp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFContentDecryptionModule_Impl::SetPMPHostApp(this, windows_core::from_raw_borrowed(&pmphostapp)).into() + IMFContentDecryptionModule_Impl::SetPMPHostApp(this, core::mem::transmute_copy(&pmphostapp)).into() } unsafe extern "system" fn CreateSession(this: *mut core::ffi::c_void, sessiontype: MF_MEDIAKEYSESSION_TYPE, callbacks: *mut core::ffi::c_void, session: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFContentDecryptionModule_Impl::CreateSession(this, core::mem::transmute_copy(&sessiontype), windows_core::from_raw_borrowed(&callbacks)) { + match IMFContentDecryptionModule_Impl::CreateSession(this, core::mem::transmute_copy(&sessiontype), core::mem::transmute_copy(&callbacks)) { Ok(ok__) => { session.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -18881,7 +18881,7 @@ pub struct IMFContentDecryptionModuleAccess_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IMFContentDecryptionModuleAccess_Impl: windows_core::IUnknownImpl { - fn CreateContentDecryptionModule(&self, contentdecryptionmoduleproperties: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result; + fn CreateContentDecryptionModule(&self, contentdecryptionmoduleproperties: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result; fn GetConfiguration(&self) -> windows_core::Result; fn GetKeySystem(&self) -> windows_core::Result; } @@ -18890,7 +18890,7 @@ impl IMFContentDecryptionModuleAccess_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateContentDecryptionModule(this: *mut core::ffi::c_void, contentdecryptionmoduleproperties: *mut core::ffi::c_void, contentdecryptionmodule: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFContentDecryptionModuleAccess_Impl::CreateContentDecryptionModule(this, windows_core::from_raw_borrowed(&contentdecryptionmoduleproperties)) { + match IMFContentDecryptionModuleAccess_Impl::CreateContentDecryptionModule(this, core::mem::transmute_copy(&contentdecryptionmoduleproperties)) { Ok(ok__) => { contentdecryptionmodule.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19372,18 +19372,18 @@ pub struct IMFContentProtectionManager_Vtbl { pub EndEnableContent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFContentProtectionManager_Impl: windows_core::IUnknownImpl { - fn BeginEnableContent(&self, penableractivate: Option<&IMFActivate>, ptopo: Option<&IMFTopology>, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndEnableContent(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; + fn BeginEnableContent(&self, penableractivate: windows_core::Ref<'_, IMFActivate>, ptopo: windows_core::Ref<'_, IMFTopology>, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndEnableContent(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; } impl IMFContentProtectionManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginEnableContent(this: *mut core::ffi::c_void, penableractivate: *mut core::ffi::c_void, ptopo: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFContentProtectionManager_Impl::BeginEnableContent(this, windows_core::from_raw_borrowed(&penableractivate), windows_core::from_raw_borrowed(&ptopo), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFContentProtectionManager_Impl::BeginEnableContent(this, core::mem::transmute_copy(&penableractivate), core::mem::transmute_copy(&ptopo), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndEnableContent(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFContentProtectionManager_Impl::EndEnableContent(this, windows_core::from_raw_borrowed(&presult)).into() + IMFContentProtectionManager_Impl::EndEnableContent(this, core::mem::transmute_copy(&presult)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -19484,21 +19484,21 @@ pub struct IMFD3D12SynchronizationObjectCommands_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait IMFD3D12SynchronizationObjectCommands_Impl: windows_core::IUnknownImpl { - fn EnqueueResourceReady(&self, pproducercommandqueue: Option<&super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; - fn EnqueueResourceReadyWait(&self, pconsumercommandqueue: Option<&super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; + fn EnqueueResourceReady(&self, pproducercommandqueue: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; + fn EnqueueResourceReadyWait(&self, pconsumercommandqueue: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; fn SignalEventOnResourceReady(&self, hevent: super::super::Foundation::HANDLE) -> windows_core::Result<()>; - fn EnqueueResourceRelease(&self, pconsumercommandqueue: Option<&super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; + fn EnqueueResourceRelease(&self, pconsumercommandqueue: windows_core::Ref<'_, super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl IMFD3D12SynchronizationObjectCommands_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EnqueueResourceReady(this: *mut core::ffi::c_void, pproducercommandqueue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFD3D12SynchronizationObjectCommands_Impl::EnqueueResourceReady(this, windows_core::from_raw_borrowed(&pproducercommandqueue)).into() + IMFD3D12SynchronizationObjectCommands_Impl::EnqueueResourceReady(this, core::mem::transmute_copy(&pproducercommandqueue)).into() } unsafe extern "system" fn EnqueueResourceReadyWait(this: *mut core::ffi::c_void, pconsumercommandqueue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFD3D12SynchronizationObjectCommands_Impl::EnqueueResourceReadyWait(this, windows_core::from_raw_borrowed(&pconsumercommandqueue)).into() + IMFD3D12SynchronizationObjectCommands_Impl::EnqueueResourceReadyWait(this, core::mem::transmute_copy(&pconsumercommandqueue)).into() } unsafe extern "system" fn SignalEventOnResourceReady(this: *mut core::ffi::c_void, hevent: super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19506,7 +19506,7 @@ impl IMFD3D12SynchronizationObjectCommands_Vtbl { } unsafe extern "system" fn EnqueueResourceRelease(this: *mut core::ffi::c_void, pconsumercommandqueue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFD3D12SynchronizationObjectCommands_Impl::EnqueueResourceRelease(this, windows_core::from_raw_borrowed(&pconsumercommandqueue)).into() + IMFD3D12SynchronizationObjectCommands_Impl::EnqueueResourceRelease(this, core::mem::transmute_copy(&pconsumercommandqueue)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -19538,13 +19538,13 @@ pub struct IMFDLNASinkInit_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IMFDLNASinkInit_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pbytestream: Option<&IMFByteStream>, fpal: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Initialize(&self, pbytestream: windows_core::Ref<'_, IMFByteStream>, fpal: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IMFDLNASinkInit_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, fpal: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFDLNASinkInit_Impl::Initialize(this, windows_core::from_raw_borrowed(&pbytestream), core::mem::transmute_copy(&fpal)).into() + IMFDLNASinkInit_Impl::Initialize(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&fpal)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -19626,7 +19626,7 @@ pub trait IMFDXGIBuffer_Impl: windows_core::IUnknownImpl { fn GetResource(&self, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetSubresourceIndex(&self) -> windows_core::Result; fn GetUnknown(&self, guid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn SetUnknown(&self, guid: *const windows_core::GUID, punkdata: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetUnknown(&self, guid: *const windows_core::GUID, punkdata: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IMFDXGIBuffer_Vtbl { pub const fn new() -> Self { @@ -19650,7 +19650,7 @@ impl IMFDXGIBuffer_Vtbl { } unsafe extern "system" fn SetUnknown(this: *mut core::ffi::c_void, guid: *const windows_core::GUID, punkdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFDXGIBuffer_Impl::SetUnknown(this, core::mem::transmute_copy(&guid), windows_core::from_raw_borrowed(&punkdata)).into() + IMFDXGIBuffer_Impl::SetUnknown(this, core::mem::transmute_copy(&guid), core::mem::transmute_copy(&punkdata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -19710,7 +19710,7 @@ pub trait IMFDXGIDeviceManager_Impl: windows_core::IUnknownImpl { fn GetVideoService(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppservice: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn LockDevice(&self, hdevice: super::super::Foundation::HANDLE, riid: *const windows_core::GUID, ppunkdevice: *mut *mut core::ffi::c_void, fblock: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn OpenDeviceHandle(&self) -> windows_core::Result; - fn ResetDevice(&self, punkdevice: Option<&windows_core::IUnknown>, resettoken: u32) -> windows_core::Result<()>; + fn ResetDevice(&self, punkdevice: windows_core::Ref<'_, windows_core::IUnknown>, resettoken: u32) -> windows_core::Result<()>; fn TestDevice(&self, hdevice: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn UnlockDevice(&self, hdevice: super::super::Foundation::HANDLE, fsavestate: super::super::Foundation::BOOL) -> windows_core::Result<()>; } @@ -19740,7 +19740,7 @@ impl IMFDXGIDeviceManager_Vtbl { } unsafe extern "system" fn ResetDevice(this: *mut core::ffi::c_void, punkdevice: *mut core::ffi::c_void, resettoken: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFDXGIDeviceManager_Impl::ResetDevice(this, windows_core::from_raw_borrowed(&punkdevice), core::mem::transmute_copy(&resettoken)).into() + IMFDXGIDeviceManager_Impl::ResetDevice(this, core::mem::transmute_copy(&punkdevice), core::mem::transmute_copy(&resettoken)).into() } unsafe extern "system" fn TestDevice(this: *mut core::ffi::c_void, hdevice: super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19964,7 +19964,7 @@ pub struct IMFDeviceTransform_Vtbl { pub FlushOutputStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait IMFDeviceTransform_Impl: windows_core::IUnknownImpl { - fn InitializeTransform(&self, pattributes: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn InitializeTransform(&self, pattributes: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; fn GetInputAvailableType(&self, dwinputstreamid: u32, dwtypeindex: u32) -> windows_core::Result; fn GetInputCurrentType(&self, dwinputstreamid: u32) -> windows_core::Result; fn GetInputStreamAttributes(&self, dwinputstreamid: u32) -> windows_core::Result; @@ -19973,15 +19973,15 @@ pub trait IMFDeviceTransform_Impl: windows_core::IUnknownImpl { fn GetOutputStreamAttributes(&self, dwoutputstreamid: u32) -> windows_core::Result; fn GetStreamCount(&self, pcinputstreams: *mut u32, pcoutputstreams: *mut u32) -> windows_core::Result<()>; fn GetStreamIDs(&self, dwinputidarraysize: u32, pdwinputstreamids: *mut u32, dwoutputidarraysize: u32, pdwoutputstreamids: *mut u32) -> windows_core::Result<()>; - fn ProcessEvent(&self, dwinputstreamid: u32, pevent: Option<&IMFMediaEvent>) -> windows_core::Result<()>; - fn ProcessInput(&self, dwinputstreamid: u32, psample: Option<&IMFSample>, dwflags: u32) -> windows_core::Result<()>; + fn ProcessEvent(&self, dwinputstreamid: u32, pevent: windows_core::Ref<'_, IMFMediaEvent>) -> windows_core::Result<()>; + fn ProcessInput(&self, dwinputstreamid: u32, psample: windows_core::Ref<'_, IMFSample>, dwflags: u32) -> windows_core::Result<()>; fn ProcessMessage(&self, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::Result<()>; fn ProcessOutput(&self, dwflags: u32, coutputbuffercount: u32, poutputsample: *mut MFT_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::Result<()>; - fn SetInputStreamState(&self, dwstreamid: u32, pmediatype: Option<&IMFMediaType>, value: DeviceStreamState, dwflags: u32) -> windows_core::Result<()>; + fn SetInputStreamState(&self, dwstreamid: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>, value: DeviceStreamState, dwflags: u32) -> windows_core::Result<()>; fn GetInputStreamState(&self, dwstreamid: u32) -> windows_core::Result; - fn SetOutputStreamState(&self, dwstreamid: u32, pmediatype: Option<&IMFMediaType>, value: DeviceStreamState, dwflags: u32) -> windows_core::Result<()>; + fn SetOutputStreamState(&self, dwstreamid: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>, value: DeviceStreamState, dwflags: u32) -> windows_core::Result<()>; fn GetOutputStreamState(&self, dwstreamid: u32) -> windows_core::Result; - fn GetInputStreamPreferredState(&self, dwstreamid: u32, value: *mut DeviceStreamState, ppmediatype: *mut Option) -> windows_core::Result<()>; + fn GetInputStreamPreferredState(&self, dwstreamid: u32, value: *mut DeviceStreamState, ppmediatype: windows_core::OutRef<'_, IMFMediaType>) -> windows_core::Result<()>; fn FlushInputStream(&self, dwstreamindex: u32, dwflags: u32) -> windows_core::Result<()>; fn FlushOutputStream(&self, dwstreamindex: u32, dwflags: u32) -> windows_core::Result<()>; } @@ -19989,7 +19989,7 @@ impl IMFDeviceTransform_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeTransform(this: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFDeviceTransform_Impl::InitializeTransform(this, windows_core::from_raw_borrowed(&pattributes)).into() + IMFDeviceTransform_Impl::InitializeTransform(this, core::mem::transmute_copy(&pattributes)).into() } unsafe extern "system" fn GetInputAvailableType(this: *mut core::ffi::c_void, dwinputstreamid: u32, dwtypeindex: u32, pmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20061,11 +20061,11 @@ impl IMFDeviceTransform_Vtbl { } unsafe extern "system" fn ProcessEvent(this: *mut core::ffi::c_void, dwinputstreamid: u32, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFDeviceTransform_Impl::ProcessEvent(this, core::mem::transmute_copy(&dwinputstreamid), windows_core::from_raw_borrowed(&pevent)).into() + IMFDeviceTransform_Impl::ProcessEvent(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&pevent)).into() } unsafe extern "system" fn ProcessInput(this: *mut core::ffi::c_void, dwinputstreamid: u32, psample: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFDeviceTransform_Impl::ProcessInput(this, core::mem::transmute_copy(&dwinputstreamid), windows_core::from_raw_borrowed(&psample), core::mem::transmute_copy(&dwflags)).into() + IMFDeviceTransform_Impl::ProcessInput(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&psample), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn ProcessMessage(this: *mut core::ffi::c_void, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20077,7 +20077,7 @@ impl IMFDeviceTransform_Vtbl { } unsafe extern "system" fn SetInputStreamState(this: *mut core::ffi::c_void, dwstreamid: u32, pmediatype: *mut core::ffi::c_void, value: DeviceStreamState, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFDeviceTransform_Impl::SetInputStreamState(this, core::mem::transmute_copy(&dwstreamid), windows_core::from_raw_borrowed(&pmediatype), core::mem::transmute_copy(&value), core::mem::transmute_copy(&dwflags)).into() + IMFDeviceTransform_Impl::SetInputStreamState(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&value), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn GetInputStreamState(this: *mut core::ffi::c_void, dwstreamid: u32, value: *mut DeviceStreamState) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20091,7 +20091,7 @@ impl IMFDeviceTransform_Vtbl { } unsafe extern "system" fn SetOutputStreamState(this: *mut core::ffi::c_void, dwstreamid: u32, pmediatype: *mut core::ffi::c_void, value: DeviceStreamState, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFDeviceTransform_Impl::SetOutputStreamState(this, core::mem::transmute_copy(&dwstreamid), windows_core::from_raw_borrowed(&pmediatype), core::mem::transmute_copy(&value), core::mem::transmute_copy(&dwflags)).into() + IMFDeviceTransform_Impl::SetOutputStreamState(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&value), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn GetOutputStreamState(this: *mut core::ffi::c_void, dwstreamid: u32, value: *mut DeviceStreamState) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20160,13 +20160,13 @@ pub struct IMFDeviceTransformCallback_Vtbl { pub OnBufferSent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IMFDeviceTransformCallback_Impl: windows_core::IUnknownImpl { - fn OnBufferSent(&self, pcallbackattributes: Option<&IMFAttributes>, pinid: u32) -> windows_core::Result<()>; + fn OnBufferSent(&self, pcallbackattributes: windows_core::Ref<'_, IMFAttributes>, pinid: u32) -> windows_core::Result<()>; } impl IMFDeviceTransformCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnBufferSent(this: *mut core::ffi::c_void, pcallbackattributes: *mut core::ffi::c_void, pinid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFDeviceTransformCallback_Impl::OnBufferSent(this, windows_core::from_raw_borrowed(&pcallbackattributes), core::mem::transmute_copy(&pinid)).into() + IMFDeviceTransformCallback_Impl::OnBufferSent(this, core::mem::transmute_copy(&pcallbackattributes), core::mem::transmute_copy(&pinid)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnBufferSent: OnBufferSent:: } } @@ -20393,7 +20393,7 @@ pub trait IMFExtendedCameraIntrinsics_Impl: windows_core::IUnknownImpl { fn SerializeToBuffer(&self, pbbuffer: *mut u8, pdwbuffersize: *mut u32) -> windows_core::Result<()>; fn GetIntrinsicModelCount(&self) -> windows_core::Result; fn GetIntrinsicModelByIndex(&self, dwindex: u32) -> windows_core::Result; - fn AddIntrinsicModel(&self, pintrinsicmodel: Option<&IMFExtendedCameraIntrinsicModel>) -> windows_core::Result<()>; + fn AddIntrinsicModel(&self, pintrinsicmodel: windows_core::Ref<'_, IMFExtendedCameraIntrinsicModel>) -> windows_core::Result<()>; } impl IMFExtendedCameraIntrinsics_Vtbl { pub const fn new() -> Self { @@ -20437,7 +20437,7 @@ impl IMFExtendedCameraIntrinsics_Vtbl { } unsafe extern "system" fn AddIntrinsicModel(this: *mut core::ffi::c_void, pintrinsicmodel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFExtendedCameraIntrinsics_Impl::AddIntrinsicModel(this, windows_core::from_raw_borrowed(&pintrinsicmodel)).into() + IMFExtendedCameraIntrinsics_Impl::AddIntrinsicModel(this, core::mem::transmute_copy(&pintrinsicmodel)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -20587,13 +20587,13 @@ pub struct IMFFieldOfUseMFTUnlock_Vtbl { pub Unlock: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFFieldOfUseMFTUnlock_Impl: windows_core::IUnknownImpl { - fn Unlock(&self, punkmft: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Unlock(&self, punkmft: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IMFFieldOfUseMFTUnlock_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Unlock(this: *mut core::ffi::c_void, punkmft: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFFieldOfUseMFTUnlock_Impl::Unlock(this, windows_core::from_raw_borrowed(&punkmft)).into() + IMFFieldOfUseMFTUnlock_Impl::Unlock(this, core::mem::transmute_copy(&punkmft)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Unlock: Unlock:: } } @@ -20632,18 +20632,18 @@ pub struct IMFFinalizableMediaSink_Vtbl { pub EndFinalize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFFinalizableMediaSink_Impl: IMFMediaSink_Impl { - fn BeginFinalize(&self, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndFinalize(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; + fn BeginFinalize(&self, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndFinalize(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; } impl IMFFinalizableMediaSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginFinalize(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFFinalizableMediaSink_Impl::BeginFinalize(this, windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFFinalizableMediaSink_Impl::BeginFinalize(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndFinalize(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFFinalizableMediaSink_Impl::EndFinalize(this, windows_core::from_raw_borrowed(&presult)).into() + IMFFinalizableMediaSink_Impl::EndFinalize(this, core::mem::transmute_copy(&presult)).into() } Self { base__: IMFMediaSink_Vtbl::new::(), @@ -20833,12 +20833,12 @@ pub struct IMFHttpDownloadRequest_Vtbl { } pub trait IMFHttpDownloadRequest_Impl: windows_core::IUnknownImpl { fn AddHeader(&self, szheader: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn BeginSendRequest(&self, pbpayload: *const u8, cbpayload: u32, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndSendRequest(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; - fn BeginReceiveResponse(&self, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndReceiveResponse(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; - fn BeginReadPayload(&self, pb: *mut u8, cb: u32, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndReadPayload(&self, presult: Option<&IMFAsyncResult>, pqwoffset: *mut u64, pcbread: *mut u32) -> windows_core::Result<()>; + fn BeginSendRequest(&self, pbpayload: *const u8, cbpayload: u32, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndSendRequest(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; + fn BeginReceiveResponse(&self, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndReceiveResponse(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; + fn BeginReadPayload(&self, pb: *mut u8, cb: u32, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndReadPayload(&self, presult: windows_core::Ref<'_, IMFAsyncResult>, pqwoffset: *mut u64, pcbread: *mut u32) -> windows_core::Result<()>; fn QueryHeader(&self, szheadername: &windows_core::PCWSTR, dwindex: u32) -> windows_core::Result; fn GetURL(&self) -> windows_core::Result; fn HasNullSourceOrigin(&self) -> windows_core::Result; @@ -20857,27 +20857,27 @@ impl IMFHttpDownloadRequest_Vtbl { } unsafe extern "system" fn BeginSendRequest(this: *mut core::ffi::c_void, pbpayload: *const u8, cbpayload: u32, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFHttpDownloadRequest_Impl::BeginSendRequest(this, core::mem::transmute_copy(&pbpayload), core::mem::transmute_copy(&cbpayload), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFHttpDownloadRequest_Impl::BeginSendRequest(this, core::mem::transmute_copy(&pbpayload), core::mem::transmute_copy(&cbpayload), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndSendRequest(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFHttpDownloadRequest_Impl::EndSendRequest(this, windows_core::from_raw_borrowed(&presult)).into() + IMFHttpDownloadRequest_Impl::EndSendRequest(this, core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn BeginReceiveResponse(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFHttpDownloadRequest_Impl::BeginReceiveResponse(this, windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFHttpDownloadRequest_Impl::BeginReceiveResponse(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndReceiveResponse(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFHttpDownloadRequest_Impl::EndReceiveResponse(this, windows_core::from_raw_borrowed(&presult)).into() + IMFHttpDownloadRequest_Impl::EndReceiveResponse(this, core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn BeginReadPayload(this: *mut core::ffi::c_void, pb: *mut u8, cb: u32, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFHttpDownloadRequest_Impl::BeginReadPayload(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFHttpDownloadRequest_Impl::BeginReadPayload(this, core::mem::transmute_copy(&pb), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndReadPayload(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pqwoffset: *mut u64, pcbread: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFHttpDownloadRequest_Impl::EndReadPayload(this, windows_core::from_raw_borrowed(&presult), core::mem::transmute_copy(&pqwoffset), core::mem::transmute_copy(&pcbread)).into() + IMFHttpDownloadRequest_Impl::EndReadPayload(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pqwoffset), core::mem::transmute_copy(&pcbread)).into() } unsafe extern "system" fn QueryHeader(this: *mut core::ffi::c_void, szheadername: windows_core::PCWSTR, dwindex: u32, ppszheadervalue: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21110,7 +21110,7 @@ pub struct IMFImageSharingEngine_Vtbl { pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFImageSharingEngine_Impl: windows_core::IUnknownImpl { - fn SetSource(&self, pstream: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetSource(&self, pstream: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetDevice(&self, pdevice: *mut DEVICE_INFO) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; } @@ -21118,7 +21118,7 @@ impl IMFImageSharingEngine_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSource(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFImageSharingEngine_Impl::SetSource(this, windows_core::from_raw_borrowed(&pstream)).into() + IMFImageSharingEngine_Impl::SetSource(this, core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn GetDevice(this: *mut core::ffi::c_void, pdevice: *mut DEVICE_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21575,7 +21575,7 @@ pub struct IMFMediaEngine_Vtbl { pub trait IMFMediaEngine_Impl: windows_core::IUnknownImpl { fn GetError(&self) -> windows_core::Result; fn SetErrorCode(&self, error: MF_MEDIA_ENGINE_ERR) -> windows_core::Result<()>; - fn SetSourceElements(&self, psrcelements: Option<&IMFMediaEngineSrcElements>) -> windows_core::Result<()>; + fn SetSourceElements(&self, psrcelements: windows_core::Ref<'_, IMFMediaEngineSrcElements>) -> windows_core::Result<()>; fn SetSource(&self, purl: &windows_core::BSTR) -> windows_core::Result<()>; fn GetCurrentSource(&self) -> windows_core::Result; fn GetNetworkState(&self) -> u16; @@ -21613,7 +21613,7 @@ pub trait IMFMediaEngine_Impl: windows_core::IUnknownImpl { fn GetNativeVideoSize(&self, cx: *mut u32, cy: *mut u32) -> windows_core::Result<()>; fn GetVideoAspectRatio(&self, cx: *mut u32, cy: *mut u32) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; - fn TransferVideoFrame(&self, pdstsurf: Option<&windows_core::IUnknown>, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::Result<()>; + fn TransferVideoFrame(&self, pdstsurf: windows_core::Ref<'_, windows_core::IUnknown>, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::Result<()>; fn OnVideoStreamTick(&self) -> windows_core::Result; } impl IMFMediaEngine_Vtbl { @@ -21634,7 +21634,7 @@ impl IMFMediaEngine_Vtbl { } unsafe extern "system" fn SetSourceElements(this: *mut core::ffi::c_void, psrcelements: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngine_Impl::SetSourceElements(this, windows_core::from_raw_borrowed(&psrcelements)).into() + IMFMediaEngine_Impl::SetSourceElements(this, core::mem::transmute_copy(&psrcelements)).into() } unsafe extern "system" fn SetSource(this: *mut core::ffi::c_void, purl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21816,7 +21816,7 @@ impl IMFMediaEngine_Vtbl { } unsafe extern "system" fn TransferVideoFrame(this: *mut core::ffi::c_void, pdstsurf: *mut core::ffi::c_void, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngine_Impl::TransferVideoFrame(this, windows_core::from_raw_borrowed(&pdstsurf), core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst), core::mem::transmute_copy(&pborderclr)).into() + IMFMediaEngine_Impl::TransferVideoFrame(this, core::mem::transmute_copy(&pdstsurf), core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst), core::mem::transmute_copy(&pborderclr)).into() } unsafe extern "system" fn OnVideoStreamTick(this: *mut core::ffi::c_void, ppts: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21957,7 +21957,7 @@ pub struct IMFMediaEngineClassFactory_Vtbl { pub CreateError: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFMediaEngineClassFactory_Impl: windows_core::IUnknownImpl { - fn CreateInstance(&self, dwflags: u32, pattr: Option<&IMFAttributes>) -> windows_core::Result; + fn CreateInstance(&self, dwflags: u32, pattr: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result; fn CreateTimeRange(&self) -> windows_core::Result; fn CreateError(&self) -> windows_core::Result; } @@ -21965,7 +21965,7 @@ impl IMFMediaEngineClassFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, dwflags: u32, pattr: *mut core::ffi::c_void, ppplayer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pattr)) { + match IMFMediaEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pattr)) { Ok(ok__) => { ppplayer.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -22149,7 +22149,7 @@ pub struct IMFMediaEngineClassFactoryEx_Vtbl { pub IsTypeSupported: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IMFMediaEngineClassFactoryEx_Impl: IMFMediaEngineClassFactory_Impl { - fn CreateMediaSourceExtension(&self, dwflags: u32, pattr: Option<&IMFAttributes>) -> windows_core::Result; + fn CreateMediaSourceExtension(&self, dwflags: u32, pattr: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result; fn CreateMediaKeys(&self, keysystem: &windows_core::BSTR, cdmstorepath: &windows_core::BSTR) -> windows_core::Result; fn IsTypeSupported(&self, r#type: &windows_core::BSTR, keysystem: &windows_core::BSTR) -> windows_core::Result; } @@ -22157,7 +22157,7 @@ impl IMFMediaEngineClassFactoryEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateMediaSourceExtension(this: *mut core::ffi::c_void, dwflags: u32, pattr: *mut core::ffi::c_void, ppmse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaEngineClassFactoryEx_Impl::CreateMediaSourceExtension(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pattr)) { + match IMFMediaEngineClassFactoryEx_Impl::CreateMediaSourceExtension(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pattr)) { Ok(ok__) => { ppmse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -22219,7 +22219,7 @@ pub struct IMFMediaEngineEME_Vtbl { } pub trait IMFMediaEngineEME_Impl: windows_core::IUnknownImpl { fn Keys(&self) -> windows_core::Result; - fn SetMediaKeys(&self, keys: Option<&IMFMediaKeys>) -> windows_core::Result<()>; + fn SetMediaKeys(&self, keys: windows_core::Ref<'_, IMFMediaKeys>) -> windows_core::Result<()>; } impl IMFMediaEngineEME_Vtbl { pub const fn new() -> Self { @@ -22235,7 +22235,7 @@ impl IMFMediaEngineEME_Vtbl { } unsafe extern "system" fn SetMediaKeys(this: *mut core::ffi::c_void, keys: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineEME_Impl::SetMediaKeys(this, windows_core::from_raw_borrowed(&keys)).into() + IMFMediaEngineEME_Impl::SetMediaKeys(this, core::mem::transmute_copy(&keys)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Keys: Keys::, SetMediaKeys: SetMediaKeys:: } } @@ -22484,7 +22484,7 @@ pub struct IMFMediaEngineEx_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFMediaEngineEx_Impl: IMFMediaEngine_Impl { - fn SetSourceFromByteStream(&self, pbytestream: Option<&IMFByteStream>, purl: &windows_core::BSTR) -> windows_core::Result<()>; + fn SetSourceFromByteStream(&self, pbytestream: windows_core::Ref<'_, IMFByteStream>, purl: &windows_core::BSTR) -> windows_core::Result<()>; fn GetStatistics(&self, statisticid: MF_MEDIA_ENGINE_STATISTIC) -> windows_core::Result; fn UpdateVideoStream(&self, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::Result<()>; fn GetBalance(&self) -> f64; @@ -22499,8 +22499,8 @@ pub trait IMFMediaEngineEx_Impl: IMFMediaEngine_Impl { fn SetStreamSelection(&self, dwstreamindex: u32, enabled: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn ApplyStreamSelections(&self) -> windows_core::Result<()>; fn IsProtected(&self) -> windows_core::Result; - fn InsertVideoEffect(&self, peffect: Option<&windows_core::IUnknown>, foptional: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn InsertAudioEffect(&self, peffect: Option<&windows_core::IUnknown>, foptional: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn InsertVideoEffect(&self, peffect: windows_core::Ref<'_, windows_core::IUnknown>, foptional: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn InsertAudioEffect(&self, peffect: windows_core::Ref<'_, windows_core::IUnknown>, foptional: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn RemoveAllEffects(&self) -> windows_core::Result<()>; fn SetTimelineMarkerTimer(&self, timetofire: f64) -> windows_core::Result<()>; fn GetTimelineMarkerTimer(&self) -> windows_core::Result; @@ -22527,7 +22527,7 @@ impl IMFMediaEngineEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSourceFromByteStream(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, purl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineEx_Impl::SetSourceFromByteStream(this, windows_core::from_raw_borrowed(&pbytestream), core::mem::transmute(&purl)).into() + IMFMediaEngineEx_Impl::SetSourceFromByteStream(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute(&purl)).into() } unsafe extern "system" fn GetStatistics(this: *mut core::ffi::c_void, statisticid: MF_MEDIA_ENGINE_STATISTIC, pstatistic: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22629,11 +22629,11 @@ impl IMFMediaEngineEx_Vtbl { } unsafe extern "system" fn InsertVideoEffect(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void, foptional: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineEx_Impl::InsertVideoEffect(this, windows_core::from_raw_borrowed(&peffect), core::mem::transmute_copy(&foptional)).into() + IMFMediaEngineEx_Impl::InsertVideoEffect(this, core::mem::transmute_copy(&peffect), core::mem::transmute_copy(&foptional)).into() } unsafe extern "system" fn InsertAudioEffect(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void, foptional: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineEx_Impl::InsertAudioEffect(this, windows_core::from_raw_borrowed(&peffect), core::mem::transmute_copy(&foptional)).into() + IMFMediaEngineEx_Impl::InsertAudioEffect(this, core::mem::transmute_copy(&peffect), core::mem::transmute_copy(&foptional)).into() } unsafe extern "system" fn RemoveAllEffects(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22843,9 +22843,9 @@ pub struct IMFMediaEngineExtension_Vtbl { } pub trait IMFMediaEngineExtension_Impl: windows_core::IUnknownImpl { fn CanPlayType(&self, audioonly: super::super::Foundation::BOOL, mimetype: &windows_core::BSTR) -> windows_core::Result; - fn BeginCreateObject(&self, bstrurl: &windows_core::BSTR, pbytestream: Option<&IMFByteStream>, r#type: MF_OBJECT_TYPE, ppiunknowncancelcookie: *mut Option, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn CancelObjectCreation(&self, piunknowncancelcookie: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndCreateObject(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; + fn BeginCreateObject(&self, bstrurl: &windows_core::BSTR, pbytestream: windows_core::Ref<'_, IMFByteStream>, r#type: MF_OBJECT_TYPE, ppiunknowncancelcookie: windows_core::OutRef<'_, windows_core::IUnknown>, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CancelObjectCreation(&self, piunknowncancelcookie: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndCreateObject(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; } impl IMFMediaEngineExtension_Vtbl { pub const fn new() -> Self { @@ -22861,15 +22861,15 @@ impl IMFMediaEngineExtension_Vtbl { } unsafe extern "system" fn BeginCreateObject(this: *mut core::ffi::c_void, bstrurl: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, r#type: MF_OBJECT_TYPE, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineExtension_Impl::BeginCreateObject(this, core::mem::transmute(&bstrurl), windows_core::from_raw_borrowed(&pbytestream), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&ppiunknowncancelcookie), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFMediaEngineExtension_Impl::BeginCreateObject(this, core::mem::transmute(&bstrurl), core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn CancelObjectCreation(this: *mut core::ffi::c_void, piunknowncancelcookie: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineExtension_Impl::CancelObjectCreation(this, windows_core::from_raw_borrowed(&piunknowncancelcookie)).into() + IMFMediaEngineExtension_Impl::CancelObjectCreation(this, core::mem::transmute_copy(&piunknowncancelcookie)).into() } unsafe extern "system" fn EndCreateObject(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaEngineExtension_Impl::EndCreateObject(this, windows_core::from_raw_borrowed(&presult)) { + match IMFMediaEngineExtension_Impl::EndCreateObject(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { ppobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -23018,18 +23018,18 @@ pub struct IMFMediaEngineProtectedContent_Vtbl { pub SetApplicationCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32) -> windows_core::HRESULT, } pub trait IMFMediaEngineProtectedContent_Impl: windows_core::IUnknownImpl { - fn ShareResources(&self, punkdevicecontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ShareResources(&self, punkdevicecontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetRequiredProtections(&self) -> windows_core::Result; fn SetOPMWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; - fn TransferVideoFrame(&self, pdstsurf: Option<&windows_core::IUnknown>, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::Result; - fn SetContentProtectionManager(&self, pcpm: Option<&IMFContentProtectionManager>) -> windows_core::Result<()>; + fn TransferVideoFrame(&self, pdstsurf: windows_core::Ref<'_, windows_core::IUnknown>, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB) -> windows_core::Result; + fn SetContentProtectionManager(&self, pcpm: windows_core::Ref<'_, IMFContentProtectionManager>) -> windows_core::Result<()>; fn SetApplicationCertificate(&self, pbblob: *const u8, cbblob: u32) -> windows_core::Result<()>; } impl IMFMediaEngineProtectedContent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ShareResources(this: *mut core::ffi::c_void, punkdevicecontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineProtectedContent_Impl::ShareResources(this, windows_core::from_raw_borrowed(&punkdevicecontext)).into() + IMFMediaEngineProtectedContent_Impl::ShareResources(this, core::mem::transmute_copy(&punkdevicecontext)).into() } unsafe extern "system" fn GetRequiredProtections(this: *mut core::ffi::c_void, pframeprotectionflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -23047,7 +23047,7 @@ impl IMFMediaEngineProtectedContent_Vtbl { } unsafe extern "system" fn TransferVideoFrame(this: *mut core::ffi::c_void, pdstsurf: *mut core::ffi::c_void, psrc: *const MFVideoNormalizedRect, pdst: *const super::super::Foundation::RECT, pborderclr: *const MFARGB, pframeprotectionflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaEngineProtectedContent_Impl::TransferVideoFrame(this, windows_core::from_raw_borrowed(&pdstsurf), core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst), core::mem::transmute_copy(&pborderclr)) { + match IMFMediaEngineProtectedContent_Impl::TransferVideoFrame(this, core::mem::transmute_copy(&pdstsurf), core::mem::transmute_copy(&psrc), core::mem::transmute_copy(&pdst), core::mem::transmute_copy(&pborderclr)) { Ok(ok__) => { pframeprotectionflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -23057,7 +23057,7 @@ impl IMFMediaEngineProtectedContent_Vtbl { } unsafe extern "system" fn SetContentProtectionManager(this: *mut core::ffi::c_void, pcpm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineProtectedContent_Impl::SetContentProtectionManager(this, windows_core::from_raw_borrowed(&pcpm)).into() + IMFMediaEngineProtectedContent_Impl::SetContentProtectionManager(this, core::mem::transmute_copy(&pcpm)).into() } unsafe extern "system" fn SetApplicationCertificate(this: *mut core::ffi::c_void, pbblob: *const u8, cbblob: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -23262,8 +23262,8 @@ pub struct IMFMediaEngineSupportsSourceTransfer_Vtbl { } pub trait IMFMediaEngineSupportsSourceTransfer_Impl: windows_core::IUnknownImpl { fn ShouldTransferSource(&self) -> windows_core::Result; - fn DetachMediaSource(&self, ppbytestream: *mut Option, ppmediasource: *mut Option, ppmse: *mut Option) -> windows_core::Result<()>; - fn AttachMediaSource(&self, pbytestream: Option<&IMFByteStream>, pmediasource: Option<&IMFMediaSource>, pmse: Option<&IMFMediaSourceExtension>) -> windows_core::Result<()>; + fn DetachMediaSource(&self, ppbytestream: windows_core::OutRef<'_, IMFByteStream>, ppmediasource: windows_core::OutRef<'_, IMFMediaSource>, ppmse: windows_core::OutRef<'_, IMFMediaSourceExtension>) -> windows_core::Result<()>; + fn AttachMediaSource(&self, pbytestream: windows_core::Ref<'_, IMFByteStream>, pmediasource: windows_core::Ref<'_, IMFMediaSource>, pmse: windows_core::Ref<'_, IMFMediaSourceExtension>) -> windows_core::Result<()>; } impl IMFMediaEngineSupportsSourceTransfer_Vtbl { pub const fn new() -> Self { @@ -23283,7 +23283,7 @@ impl IMFMediaEngineSupportsSourceTransfer_Vtbl { } unsafe extern "system" fn AttachMediaSource(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pmediasource: *mut core::ffi::c_void, pmse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineSupportsSourceTransfer_Impl::AttachMediaSource(this, windows_core::from_raw_borrowed(&pbytestream), windows_core::from_raw_borrowed(&pmediasource), windows_core::from_raw_borrowed(&pmse)).into() + IMFMediaEngineSupportsSourceTransfer_Impl::AttachMediaSource(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute_copy(&pmediasource), core::mem::transmute_copy(&pmse)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -23313,13 +23313,13 @@ pub struct IMFMediaEngineTransferSource_Vtbl { pub TransferSourceToMediaEngine: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFMediaEngineTransferSource_Impl: windows_core::IUnknownImpl { - fn TransferSourceToMediaEngine(&self, destination: Option<&IMFMediaEngine>) -> windows_core::Result<()>; + fn TransferSourceToMediaEngine(&self, destination: windows_core::Ref<'_, IMFMediaEngine>) -> windows_core::Result<()>; } impl IMFMediaEngineTransferSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TransferSourceToMediaEngine(this: *mut core::ffi::c_void, destination: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEngineTransferSource_Impl::TransferSourceToMediaEngine(this, windows_core::from_raw_borrowed(&destination)).into() + IMFMediaEngineTransferSource_Impl::TransferSourceToMediaEngine(this, core::mem::transmute_copy(&destination)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), TransferSourceToMediaEngine: TransferSourceToMediaEngine:: } } @@ -23589,8 +23589,8 @@ pub struct IMFMediaEventGenerator_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFMediaEventGenerator_Impl: windows_core::IUnknownImpl { fn GetEvent(&self, dwflags: MEDIA_EVENT_GENERATOR_GET_EVENT_FLAGS) -> windows_core::Result; - fn BeginGetEvent(&self, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndGetEvent(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; + fn BeginGetEvent(&self, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndGetEvent(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; fn QueueEvent(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -23608,11 +23608,11 @@ impl IMFMediaEventGenerator_Vtbl { } unsafe extern "system" fn BeginGetEvent(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEventGenerator_Impl::BeginGetEvent(this, windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFMediaEventGenerator_Impl::BeginGetEvent(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndGetEvent(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppevent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaEventGenerator_Impl::EndGetEvent(this, windows_core::from_raw_borrowed(&presult)) { + match IMFMediaEventGenerator_Impl::EndGetEvent(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { ppevent.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -23696,11 +23696,11 @@ pub struct IMFMediaEventQueue_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFMediaEventQueue_Impl: windows_core::IUnknownImpl { fn GetEvent(&self, dwflags: u32) -> windows_core::Result; - fn BeginGetEvent(&self, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndGetEvent(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; - fn QueueEvent(&self, pevent: Option<&IMFMediaEvent>) -> windows_core::Result<()>; + fn BeginGetEvent(&self, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndGetEvent(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; + fn QueueEvent(&self, pevent: windows_core::Ref<'_, IMFMediaEvent>) -> windows_core::Result<()>; fn QueueEventParamVar(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; - fn QueueEventParamUnk(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn QueueEventParamUnk(&self, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -23718,11 +23718,11 @@ impl IMFMediaEventQueue_Vtbl { } unsafe extern "system" fn BeginGetEvent(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEventQueue_Impl::BeginGetEvent(this, windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFMediaEventQueue_Impl::BeginGetEvent(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndGetEvent(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppevent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaEventQueue_Impl::EndGetEvent(this, windows_core::from_raw_borrowed(&presult)) { + match IMFMediaEventQueue_Impl::EndGetEvent(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { ppevent.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -23732,7 +23732,7 @@ impl IMFMediaEventQueue_Vtbl { } unsafe extern "system" fn QueueEvent(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEventQueue_Impl::QueueEvent(this, windows_core::from_raw_borrowed(&pevent)).into() + IMFMediaEventQueue_Impl::QueueEvent(this, core::mem::transmute_copy(&pevent)).into() } unsafe extern "system" fn QueueEventParamVar(this: *mut core::ffi::c_void, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -23740,7 +23740,7 @@ impl IMFMediaEventQueue_Vtbl { } unsafe extern "system" fn QueueEventParamUnk(this: *mut core::ffi::c_void, met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaEventQueue_Impl::QueueEventParamUnk(this, core::mem::transmute_copy(&met), core::mem::transmute_copy(&guidextendedtype), core::mem::transmute_copy(&hrstatus), windows_core::from_raw_borrowed(&punk)).into() + IMFMediaEventQueue_Impl::QueueEventParamUnk(this, core::mem::transmute_copy(&met), core::mem::transmute_copy(&guidextendedtype), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn Shutdown(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24083,7 +24083,7 @@ pub struct IMFMediaKeySystemAccess_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IMFMediaKeySystemAccess_Impl: windows_core::IUnknownImpl { - fn CreateMediaKeys(&self, pcdmcustomconfig: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result; + fn CreateMediaKeys(&self, pcdmcustomconfig: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result; fn SupportedConfiguration(&self) -> windows_core::Result; fn KeySystem(&self) -> windows_core::Result; } @@ -24092,7 +24092,7 @@ impl IMFMediaKeySystemAccess_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateMediaKeys(this: *mut core::ffi::c_void, pcdmcustomconfig: *mut core::ffi::c_void, ppkeys: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaKeySystemAccess_Impl::CreateMediaKeys(this, windows_core::from_raw_borrowed(&pcdmcustomconfig)) { + match IMFMediaKeySystemAccess_Impl::CreateMediaKeys(this, core::mem::transmute_copy(&pcdmcustomconfig)) { Ok(ok__) => { ppkeys.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24164,7 +24164,7 @@ pub struct IMFMediaKeys_Vtbl { pub GetSuspendNotify: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFMediaKeys_Impl: windows_core::IUnknownImpl { - fn CreateSession(&self, mimetype: &windows_core::BSTR, initdata: *const u8, cb: u32, customdata: *const u8, cbcustomdata: u32, notify: Option<&IMFMediaKeySessionNotify>) -> windows_core::Result; + fn CreateSession(&self, mimetype: &windows_core::BSTR, initdata: *const u8, cb: u32, customdata: *const u8, cbcustomdata: u32, notify: windows_core::Ref<'_, IMFMediaKeySessionNotify>) -> windows_core::Result; fn KeySystem(&self) -> windows_core::Result; fn Shutdown(&self) -> windows_core::Result<()>; fn GetSuspendNotify(&self) -> windows_core::Result; @@ -24173,7 +24173,7 @@ impl IMFMediaKeys_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateSession(this: *mut core::ffi::c_void, mimetype: *mut core::ffi::c_void, initdata: *const u8, cb: u32, customdata: *const u8, cbcustomdata: u32, notify: *mut core::ffi::c_void, ppsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaKeys_Impl::CreateSession(this, core::mem::transmute(&mimetype), core::mem::transmute_copy(&initdata), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&customdata), core::mem::transmute_copy(&cbcustomdata), windows_core::from_raw_borrowed(¬ify)) { + match IMFMediaKeys_Impl::CreateSession(this, core::mem::transmute(&mimetype), core::mem::transmute_copy(&initdata), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&customdata), core::mem::transmute_copy(&cbcustomdata), core::mem::transmute_copy(¬ify)) { Ok(ok__) => { ppsession.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24250,7 +24250,7 @@ pub struct IMFMediaKeys2_Vtbl { pub GetDOMException: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT, *mut windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IMFMediaKeys2_Impl: IMFMediaKeys_Impl { - fn CreateSession2(&self, esessiontype: MF_MEDIAKEYSESSION_TYPE, pmfmediakeysessionnotify2: Option<&IMFMediaKeySessionNotify2>) -> windows_core::Result; + fn CreateSession2(&self, esessiontype: MF_MEDIAKEYSESSION_TYPE, pmfmediakeysessionnotify2: windows_core::Ref<'_, IMFMediaKeySessionNotify2>) -> windows_core::Result; fn SetServerCertificate(&self, pbservercertificate: *const u8, cb: u32) -> windows_core::Result<()>; fn GetDOMException(&self, systemcode: windows_core::HRESULT) -> windows_core::Result; } @@ -24258,7 +24258,7 @@ impl IMFMediaKeys2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateSession2(this: *mut core::ffi::c_void, esessiontype: MF_MEDIAKEYSESSION_TYPE, pmfmediakeysessionnotify2: *mut core::ffi::c_void, ppsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaKeys2_Impl::CreateSession2(this, core::mem::transmute_copy(&esessiontype), windows_core::from_raw_borrowed(&pmfmediakeysessionnotify2)) { + match IMFMediaKeys2_Impl::CreateSession2(this, core::mem::transmute_copy(&esessiontype), core::mem::transmute_copy(&pmfmediakeysessionnotify2)) { Ok(ok__) => { ppsession.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24358,7 +24358,7 @@ pub struct IMFMediaSession_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFMediaSession_Impl: IMFMediaEventGenerator_Impl { - fn SetTopology(&self, dwsettopologyflags: u32, ptopology: Option<&IMFTopology>) -> windows_core::Result<()>; + fn SetTopology(&self, dwsettopologyflags: u32, ptopology: windows_core::Ref<'_, IMFTopology>) -> windows_core::Result<()>; fn ClearTopologies(&self) -> windows_core::Result<()>; fn Start(&self, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn Pause(&self) -> windows_core::Result<()>; @@ -24374,7 +24374,7 @@ impl IMFMediaSession_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetTopology(this: *mut core::ffi::c_void, dwsettopologyflags: u32, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaSession_Impl::SetTopology(this, core::mem::transmute_copy(&dwsettopologyflags), windows_core::from_raw_borrowed(&ptopology)).into() + IMFMediaSession_Impl::SetTopology(this, core::mem::transmute_copy(&dwsettopologyflags), core::mem::transmute_copy(&ptopology)).into() } unsafe extern "system" fn ClearTopologies(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24501,13 +24501,13 @@ pub struct IMFMediaSharingEngineClassFactory_Vtbl { pub CreateInstance: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFMediaSharingEngineClassFactory_Impl: windows_core::IUnknownImpl { - fn CreateInstance(&self, dwflags: u32, pattr: Option<&IMFAttributes>) -> windows_core::Result; + fn CreateInstance(&self, dwflags: u32, pattr: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result; } impl IMFMediaSharingEngineClassFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, dwflags: u32, pattr: *mut core::ffi::c_void, ppengine: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaSharingEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pattr)) { + match IMFMediaSharingEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pattr)) { Ok(ok__) => { ppengine.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24580,12 +24580,12 @@ pub struct IMFMediaSink_Vtbl { } pub trait IMFMediaSink_Impl: windows_core::IUnknownImpl { fn GetCharacteristics(&self) -> windows_core::Result; - fn AddStreamSink(&self, dwstreamsinkidentifier: u32, pmediatype: Option<&IMFMediaType>) -> windows_core::Result; + fn AddStreamSink(&self, dwstreamsinkidentifier: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result; fn RemoveStreamSink(&self, dwstreamsinkidentifier: u32) -> windows_core::Result<()>; fn GetStreamSinkCount(&self) -> windows_core::Result; fn GetStreamSinkByIndex(&self, dwindex: u32) -> windows_core::Result; fn GetStreamSinkById(&self, dwstreamsinkidentifier: u32) -> windows_core::Result; - fn SetPresentationClock(&self, ppresentationclock: Option<&IMFPresentationClock>) -> windows_core::Result<()>; + fn SetPresentationClock(&self, ppresentationclock: windows_core::Ref<'_, IMFPresentationClock>) -> windows_core::Result<()>; fn GetPresentationClock(&self) -> windows_core::Result; fn Shutdown(&self) -> windows_core::Result<()>; } @@ -24603,7 +24603,7 @@ impl IMFMediaSink_Vtbl { } unsafe extern "system" fn AddStreamSink(this: *mut core::ffi::c_void, dwstreamsinkidentifier: u32, pmediatype: *mut core::ffi::c_void, ppstreamsink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaSink_Impl::AddStreamSink(this, core::mem::transmute_copy(&dwstreamsinkidentifier), windows_core::from_raw_borrowed(&pmediatype)) { + match IMFMediaSink_Impl::AddStreamSink(this, core::mem::transmute_copy(&dwstreamsinkidentifier), core::mem::transmute_copy(&pmediatype)) { Ok(ok__) => { ppstreamsink.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24647,7 +24647,7 @@ impl IMFMediaSink_Vtbl { } unsafe extern "system" fn SetPresentationClock(this: *mut core::ffi::c_void, ppresentationclock: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaSink_Impl::SetPresentationClock(this, windows_core::from_raw_borrowed(&ppresentationclock)).into() + IMFMediaSink_Impl::SetPresentationClock(this, core::mem::transmute_copy(&ppresentationclock)).into() } unsafe extern "system" fn GetPresentationClock(this: *mut core::ffi::c_void, pppresentationclock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24760,7 +24760,7 @@ pub struct IMFMediaSource_Vtbl { pub trait IMFMediaSource_Impl: IMFMediaEventGenerator_Impl { fn GetCharacteristics(&self) -> windows_core::Result; fn CreatePresentationDescriptor(&self) -> windows_core::Result; - fn Start(&self, ppresentationdescriptor: Option<&IMFPresentationDescriptor>, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; + fn Start(&self, ppresentationdescriptor: windows_core::Ref<'_, IMFPresentationDescriptor>, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; fn Pause(&self) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; @@ -24790,7 +24790,7 @@ impl IMFMediaSource_Vtbl { } unsafe extern "system" fn Start(this: *mut core::ffi::c_void, ppresentationdescriptor: *mut core::ffi::c_void, pguidtimeformat: *const windows_core::GUID, pvarstartposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaSource_Impl::Start(this, windows_core::from_raw_borrowed(&ppresentationdescriptor), core::mem::transmute_copy(&pguidtimeformat), core::mem::transmute_copy(&pvarstartposition)).into() + IMFMediaSource_Impl::Start(this, core::mem::transmute_copy(&ppresentationdescriptor), core::mem::transmute_copy(&pguidtimeformat), core::mem::transmute_copy(&pvarstartposition)).into() } unsafe extern "system" fn Stop(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24843,14 +24843,14 @@ pub struct IMFMediaSource2_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFMediaSource2_Impl: IMFMediaSourceEx_Impl { - fn SetMediaType(&self, dwstreamid: u32, pmediatype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn SetMediaType(&self, dwstreamid: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMFMediaSource2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetMediaType(this: *mut core::ffi::c_void, dwstreamid: u32, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaSource2_Impl::SetMediaType(this, core::mem::transmute_copy(&dwstreamid), windows_core::from_raw_borrowed(&pmediatype)).into() + IMFMediaSource2_Impl::SetMediaType(this, core::mem::transmute_copy(&dwstreamid), core::mem::transmute_copy(&pmediatype)).into() } Self { base__: IMFMediaSourceEx_Vtbl::new::(), SetMediaType: SetMediaType:: } } @@ -24895,7 +24895,7 @@ pub struct IMFMediaSourceEx_Vtbl { pub trait IMFMediaSourceEx_Impl: IMFMediaSource_Impl { fn GetSourceAttributes(&self) -> windows_core::Result; fn GetStreamAttributes(&self, dwstreamidentifier: u32) -> windows_core::Result; - fn SetD3DManager(&self, pmanager: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetD3DManager(&self, pmanager: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMFMediaSourceEx_Vtbl { @@ -24922,7 +24922,7 @@ impl IMFMediaSourceEx_Vtbl { } unsafe extern "system" fn SetD3DManager(this: *mut core::ffi::c_void, pmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaSourceEx_Impl::SetD3DManager(this, windows_core::from_raw_borrowed(&pmanager)).into() + IMFMediaSourceEx_Impl::SetD3DManager(this, core::mem::transmute_copy(&pmanager)).into() } Self { base__: IMFMediaSource_Vtbl::new::(), @@ -24998,8 +24998,8 @@ pub trait IMFMediaSourceExtension_Impl: windows_core::IUnknownImpl { fn GetReadyState(&self) -> MF_MSE_READY; fn GetDuration(&self) -> f64; fn SetDuration(&self, duration: f64) -> windows_core::Result<()>; - fn AddSourceBuffer(&self, r#type: &windows_core::BSTR, pnotify: Option<&IMFSourceBufferNotify>) -> windows_core::Result; - fn RemoveSourceBuffer(&self, psourcebuffer: Option<&IMFSourceBuffer>) -> windows_core::Result<()>; + fn AddSourceBuffer(&self, r#type: &windows_core::BSTR, pnotify: windows_core::Ref<'_, IMFSourceBufferNotify>) -> windows_core::Result; + fn RemoveSourceBuffer(&self, psourcebuffer: windows_core::Ref<'_, IMFSourceBuffer>) -> windows_core::Result<()>; fn SetEndOfStream(&self, error: MF_MSE_ERROR) -> windows_core::Result<()>; fn IsTypeSupported(&self, r#type: &windows_core::BSTR) -> super::super::Foundation::BOOL; fn GetSourceBuffer(&self, dwstreamindex: u32) -> Option; @@ -25028,7 +25028,7 @@ impl IMFMediaSourceExtension_Vtbl { } unsafe extern "system" fn AddSourceBuffer(this: *mut core::ffi::c_void, r#type: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void, ppsourcebuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaSourceExtension_Impl::AddSourceBuffer(this, core::mem::transmute(&r#type), windows_core::from_raw_borrowed(&pnotify)) { + match IMFMediaSourceExtension_Impl::AddSourceBuffer(this, core::mem::transmute(&r#type), core::mem::transmute_copy(&pnotify)) { Ok(ok__) => { ppsourcebuffer.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -25038,7 +25038,7 @@ impl IMFMediaSourceExtension_Vtbl { } unsafe extern "system" fn RemoveSourceBuffer(this: *mut core::ffi::c_void, psourcebuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaSourceExtension_Impl::RemoveSourceBuffer(this, windows_core::from_raw_borrowed(&psourcebuffer)).into() + IMFMediaSourceExtension_Impl::RemoveSourceBuffer(this, core::mem::transmute_copy(&psourcebuffer)).into() } unsafe extern "system" fn SetEndOfStream(this: *mut core::ffi::c_void, error: MF_MSE_ERROR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25179,13 +25179,13 @@ pub struct IMFMediaSourcePresentationProvider_Vtbl { pub ForceEndOfPresentation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFMediaSourcePresentationProvider_Impl: windows_core::IUnknownImpl { - fn ForceEndOfPresentation(&self, ppresentationdescriptor: Option<&IMFPresentationDescriptor>) -> windows_core::Result<()>; + fn ForceEndOfPresentation(&self, ppresentationdescriptor: windows_core::Ref<'_, IMFPresentationDescriptor>) -> windows_core::Result<()>; } impl IMFMediaSourcePresentationProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ForceEndOfPresentation(this: *mut core::ffi::c_void, ppresentationdescriptor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaSourcePresentationProvider_Impl::ForceEndOfPresentation(this, windows_core::from_raw_borrowed(&ppresentationdescriptor)).into() + IMFMediaSourcePresentationProvider_Impl::ForceEndOfPresentation(this, core::mem::transmute_copy(&ppresentationdescriptor)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ForceEndOfPresentation: ForceEndOfPresentation:: } } @@ -25211,13 +25211,13 @@ pub struct IMFMediaSourceTopologyProvider_Vtbl { pub GetMediaSourceTopology: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFMediaSourceTopologyProvider_Impl: windows_core::IUnknownImpl { - fn GetMediaSourceTopology(&self, ppresentationdescriptor: Option<&IMFPresentationDescriptor>) -> windows_core::Result; + fn GetMediaSourceTopology(&self, ppresentationdescriptor: windows_core::Ref<'_, IMFPresentationDescriptor>) -> windows_core::Result; } impl IMFMediaSourceTopologyProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetMediaSourceTopology(this: *mut core::ffi::c_void, ppresentationdescriptor: *mut core::ffi::c_void, pptopology: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaSourceTopologyProvider_Impl::GetMediaSourceTopology(this, windows_core::from_raw_borrowed(&ppresentationdescriptor)) { + match IMFMediaSourceTopologyProvider_Impl::GetMediaSourceTopology(this, core::mem::transmute_copy(&ppresentationdescriptor)) { Ok(ok__) => { pptopology.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -25267,7 +25267,7 @@ pub struct IMFMediaStream_Vtbl { pub trait IMFMediaStream_Impl: IMFMediaEventGenerator_Impl { fn GetMediaSource(&self) -> windows_core::Result; fn GetStreamDescriptor(&self) -> windows_core::Result; - fn RequestSample(&self, ptoken: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn RequestSample(&self, ptoken: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMFMediaStream_Vtbl { @@ -25294,7 +25294,7 @@ impl IMFMediaStream_Vtbl { } unsafe extern "system" fn RequestSample(this: *mut core::ffi::c_void, ptoken: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaStream_Impl::RequestSample(this, windows_core::from_raw_borrowed(&ptoken)).into() + IMFMediaStream_Impl::RequestSample(this, core::mem::transmute_copy(&ptoken)).into() } Self { base__: IMFMediaEventGenerator_Vtbl::new::(), @@ -25382,13 +25382,13 @@ pub struct IMFMediaStreamSourceSampleRequest_Vtbl { pub SetSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFMediaStreamSourceSampleRequest_Impl: windows_core::IUnknownImpl { - fn SetSample(&self, value: Option<&IMFSample>) -> windows_core::Result<()>; + fn SetSample(&self, value: windows_core::Ref<'_, IMFSample>) -> windows_core::Result<()>; } impl IMFMediaStreamSourceSampleRequest_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSample(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaStreamSourceSampleRequest_Impl::SetSample(this, windows_core::from_raw_borrowed(&value)).into() + IMFMediaStreamSourceSampleRequest_Impl::SetSample(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetSample: SetSample:: } } @@ -25536,7 +25536,7 @@ pub struct IMFMediaType_Vtbl { pub trait IMFMediaType_Impl: IMFAttributes_Impl { fn GetMajorType(&self) -> windows_core::Result; fn IsCompressedFormat(&self) -> windows_core::Result; - fn IsEqual(&self, pimediatype: Option<&IMFMediaType>) -> windows_core::Result; + fn IsEqual(&self, pimediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result; fn GetRepresentation(&self, guidrepresentation: &windows_core::GUID, ppvrepresentation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn FreeRepresentation(&self, guidrepresentation: &windows_core::GUID, pvrepresentation: *const core::ffi::c_void) -> windows_core::Result<()>; } @@ -25565,7 +25565,7 @@ impl IMFMediaType_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, pimediatype: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMediaType_Impl::IsEqual(this, windows_core::from_raw_borrowed(&pimediatype)) { + match IMFMediaType_Impl::IsEqual(this, core::mem::transmute_copy(&pimediatype)) { Ok(ok__) => { pdwflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -25639,10 +25639,10 @@ pub struct IMFMediaTypeHandler_Vtbl { pub GetMajorType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::GUID) -> windows_core::HRESULT, } pub trait IMFMediaTypeHandler_Impl: windows_core::IUnknownImpl { - fn IsMediaTypeSupported(&self, pmediatype: Option<&IMFMediaType>, ppmediatype: *mut Option) -> windows_core::Result<()>; + fn IsMediaTypeSupported(&self, pmediatype: windows_core::Ref<'_, IMFMediaType>, ppmediatype: windows_core::OutRef<'_, IMFMediaType>) -> windows_core::Result<()>; fn GetMediaTypeCount(&self) -> windows_core::Result; fn GetMediaTypeByIndex(&self, dwindex: u32) -> windows_core::Result; - fn SetCurrentMediaType(&self, pmediatype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn SetCurrentMediaType(&self, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; fn GetCurrentMediaType(&self) -> windows_core::Result; fn GetMajorType(&self) -> windows_core::Result; } @@ -25650,7 +25650,7 @@ impl IMFMediaTypeHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsMediaTypeSupported(this: *mut core::ffi::c_void, pmediatype: *mut core::ffi::c_void, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaTypeHandler_Impl::IsMediaTypeSupported(this, windows_core::from_raw_borrowed(&pmediatype), core::mem::transmute_copy(&ppmediatype)).into() + IMFMediaTypeHandler_Impl::IsMediaTypeSupported(this, core::mem::transmute_copy(&pmediatype), core::mem::transmute_copy(&ppmediatype)).into() } unsafe extern "system" fn GetMediaTypeCount(this: *mut core::ffi::c_void, pdwtypecount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25674,7 +25674,7 @@ impl IMFMediaTypeHandler_Vtbl { } unsafe extern "system" fn SetCurrentMediaType(this: *mut core::ffi::c_void, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFMediaTypeHandler_Impl::SetCurrentMediaType(this, windows_core::from_raw_borrowed(&pmediatype)).into() + IMFMediaTypeHandler_Impl::SetCurrentMediaType(this, core::mem::transmute_copy(&pmediatype)).into() } unsafe extern "system" fn GetCurrentMediaType(this: *mut core::ffi::c_void, ppmediatype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25878,13 +25878,13 @@ pub struct IMFMetadataProvider_Vtbl { pub GetMFMetadata: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFMetadataProvider_Impl: windows_core::IUnknownImpl { - fn GetMFMetadata(&self, ppresentationdescriptor: Option<&IMFPresentationDescriptor>, dwstreamidentifier: u32, dwflags: u32) -> windows_core::Result; + fn GetMFMetadata(&self, ppresentationdescriptor: windows_core::Ref<'_, IMFPresentationDescriptor>, dwstreamidentifier: u32, dwflags: u32) -> windows_core::Result; } impl IMFMetadataProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetMFMetadata(this: *mut core::ffi::c_void, ppresentationdescriptor: *mut core::ffi::c_void, dwstreamidentifier: u32, dwflags: u32, ppmfmetadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFMetadataProvider_Impl::GetMFMetadata(this, windows_core::from_raw_borrowed(&ppresentationdescriptor), core::mem::transmute_copy(&dwstreamidentifier), core::mem::transmute_copy(&dwflags)) { + match IMFMetadataProvider_Impl::GetMFMetadata(this, core::mem::transmute_copy(&ppresentationdescriptor), core::mem::transmute_copy(&dwstreamidentifier), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppmfmetadata.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -26237,9 +26237,9 @@ pub struct IMFNetCredentialCache_Vtbl { pub SetUserOptions: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IMFNetCredentialCache_Impl: windows_core::IUnknownImpl { - fn GetCredential(&self, pszurl: &windows_core::PCWSTR, pszrealm: &windows_core::PCWSTR, dwauthenticationflags: u32, ppcred: *mut Option, pdwrequirementsflags: *mut u32) -> windows_core::Result<()>; - fn SetGood(&self, pcred: Option<&IMFNetCredential>, fgood: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetUserOptions(&self, pcred: Option<&IMFNetCredential>, dwoptionsflags: u32) -> windows_core::Result<()>; + fn GetCredential(&self, pszurl: &windows_core::PCWSTR, pszrealm: &windows_core::PCWSTR, dwauthenticationflags: u32, ppcred: windows_core::OutRef<'_, IMFNetCredential>, pdwrequirementsflags: *mut u32) -> windows_core::Result<()>; + fn SetGood(&self, pcred: windows_core::Ref<'_, IMFNetCredential>, fgood: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetUserOptions(&self, pcred: windows_core::Ref<'_, IMFNetCredential>, dwoptionsflags: u32) -> windows_core::Result<()>; } impl IMFNetCredentialCache_Vtbl { pub const fn new() -> Self { @@ -26249,11 +26249,11 @@ impl IMFNetCredentialCache_Vtbl { } unsafe extern "system" fn SetGood(this: *mut core::ffi::c_void, pcred: *mut core::ffi::c_void, fgood: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFNetCredentialCache_Impl::SetGood(this, windows_core::from_raw_borrowed(&pcred), core::mem::transmute_copy(&fgood)).into() + IMFNetCredentialCache_Impl::SetGood(this, core::mem::transmute_copy(&pcred), core::mem::transmute_copy(&fgood)).into() } unsafe extern "system" fn SetUserOptions(this: *mut core::ffi::c_void, pcred: *mut core::ffi::c_void, dwoptionsflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFNetCredentialCache_Impl::SetUserOptions(this, windows_core::from_raw_borrowed(&pcred), core::mem::transmute_copy(&dwoptionsflags)).into() + IMFNetCredentialCache_Impl::SetUserOptions(this, core::mem::transmute_copy(&pcred), core::mem::transmute_copy(&dwoptionsflags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -26299,19 +26299,19 @@ pub struct IMFNetCredentialManager_Vtbl { pub SetGood: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IMFNetCredentialManager_Impl: windows_core::IUnknownImpl { - fn BeginGetCredentials(&self, pparam: *const MFNetCredentialManagerGetParam, pcallback: Option<&IMFAsyncCallback>, pstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndGetCredentials(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; - fn SetGood(&self, pcred: Option<&IMFNetCredential>, fgood: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn BeginGetCredentials(&self, pparam: *const MFNetCredentialManagerGetParam, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, pstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndGetCredentials(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; + fn SetGood(&self, pcred: windows_core::Ref<'_, IMFNetCredential>, fgood: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IMFNetCredentialManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginGetCredentials(this: *mut core::ffi::c_void, pparam: *const MFNetCredentialManagerGetParam, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFNetCredentialManager_Impl::BeginGetCredentials(this, core::mem::transmute_copy(&pparam), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pstate)).into() + IMFNetCredentialManager_Impl::BeginGetCredentials(this, core::mem::transmute_copy(&pparam), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into() } unsafe extern "system" fn EndGetCredentials(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppcred: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFNetCredentialManager_Impl::EndGetCredentials(this, windows_core::from_raw_borrowed(&presult)) { + match IMFNetCredentialManager_Impl::EndGetCredentials(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { ppcred.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -26321,7 +26321,7 @@ impl IMFNetCredentialManager_Vtbl { } unsafe extern "system" fn SetGood(this: *mut core::ffi::c_void, pcred: *mut core::ffi::c_void, fgood: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFNetCredentialManager_Impl::SetGood(this, windows_core::from_raw_borrowed(&pcred), core::mem::transmute_copy(&fgood)).into() + IMFNetCredentialManager_Impl::SetGood(this, core::mem::transmute_copy(&pcred), core::mem::transmute_copy(&fgood)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -26669,14 +26669,14 @@ pub struct IMFObjectReferenceStream_Vtbl { pub LoadReference: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFObjectReferenceStream_Impl: windows_core::IUnknownImpl { - fn SaveReference(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SaveReference(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn LoadReference(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IMFObjectReferenceStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SaveReference(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFObjectReferenceStream_Impl::SaveReference(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)).into() + IMFObjectReferenceStream_Impl::SaveReference(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn LoadReference(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -26919,13 +26919,13 @@ pub struct IMFPMPClient_Vtbl { pub SetPMPHost: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFPMPClient_Impl: windows_core::IUnknownImpl { - fn SetPMPHost(&self, ppmphost: Option<&IMFPMPHost>) -> windows_core::Result<()>; + fn SetPMPHost(&self, ppmphost: windows_core::Ref<'_, IMFPMPHost>) -> windows_core::Result<()>; } impl IMFPMPClient_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPMPHost(this: *mut core::ffi::c_void, ppmphost: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPMPClient_Impl::SetPMPHost(this, windows_core::from_raw_borrowed(&ppmphost)).into() + IMFPMPClient_Impl::SetPMPHost(this, core::mem::transmute_copy(&ppmphost)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetPMPHost: SetPMPHost:: } } @@ -26950,13 +26950,13 @@ pub struct IMFPMPClientApp_Vtbl { pub SetPMPHost: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFPMPClientApp_Impl: windows_core::IUnknownImpl { - fn SetPMPHost(&self, ppmphost: Option<&IMFPMPHostApp>) -> windows_core::Result<()>; + fn SetPMPHost(&self, ppmphost: windows_core::Ref<'_, IMFPMPHostApp>) -> windows_core::Result<()>; } impl IMFPMPClientApp_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPMPHost(this: *mut core::ffi::c_void, ppmphost: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPMPClientApp_Impl::SetPMPHost(this, windows_core::from_raw_borrowed(&ppmphost)).into() + IMFPMPClientApp_Impl::SetPMPHost(this, core::mem::transmute_copy(&ppmphost)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetPMPHost: SetPMPHost:: } } @@ -26998,7 +26998,7 @@ pub struct IMFPMPHost_Vtbl { pub trait IMFPMPHost_Impl: windows_core::IUnknownImpl { fn LockProcess(&self) -> windows_core::Result<()>; fn UnlockProcess(&self) -> windows_core::Result<()>; - fn CreateObjectByCLSID(&self, clsid: *const windows_core::GUID, pstream: Option<&super::super::System::Com::IStream>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateObjectByCLSID(&self, clsid: *const windows_core::GUID, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IMFPMPHost_Vtbl { @@ -27013,7 +27013,7 @@ impl IMFPMPHost_Vtbl { } unsafe extern "system" fn CreateObjectByCLSID(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, pstream: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPMPHost_Impl::CreateObjectByCLSID(this, core::mem::transmute_copy(&clsid), windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IMFPMPHost_Impl::CreateObjectByCLSID(this, core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -27062,7 +27062,7 @@ pub struct IMFPMPHostApp_Vtbl { pub trait IMFPMPHostApp_Impl: windows_core::IUnknownImpl { fn LockProcess(&self) -> windows_core::Result<()>; fn UnlockProcess(&self) -> windows_core::Result<()>; - fn ActivateClassById(&self, id: &windows_core::PCWSTR, pstream: Option<&super::super::System::Com::IStream>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ActivateClassById(&self, id: &windows_core::PCWSTR, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IMFPMPHostApp_Vtbl { @@ -27077,7 +27077,7 @@ impl IMFPMPHostApp_Vtbl { } unsafe extern "system" fn ActivateClassById(this: *mut core::ffi::c_void, id: windows_core::PCWSTR, pstream: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPMPHostApp_Impl::ActivateClassById(this, core::mem::transmute(&id), windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IMFPMPHostApp_Impl::ActivateClassById(this, core::mem::transmute(&id), core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -27289,7 +27289,7 @@ pub trait IMFPMediaItem_Impl: windows_core::IUnknownImpl { fn GetStreamAttribute(&self, dwstreamindex: u32, guidmfattribute: *const windows_core::GUID) -> windows_core::Result; fn GetPresentationAttribute(&self, guidmfattribute: *const windows_core::GUID) -> windows_core::Result; fn GetCharacteristics(&self) -> windows_core::Result; - fn SetStreamSink(&self, dwstreamindex: u32, pmediasink: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetStreamSink(&self, dwstreamindex: u32, pmediasink: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetMetadata(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] @@ -27431,7 +27431,7 @@ impl IMFPMediaItem_Vtbl { } unsafe extern "system" fn SetStreamSink(this: *mut core::ffi::c_void, dwstreamindex: u32, pmediasink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPMediaItem_Impl::SetStreamSink(this, core::mem::transmute_copy(&dwstreamindex), windows_core::from_raw_borrowed(&pmediasink)).into() + IMFPMediaItem_Impl::SetStreamSink(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pmediasink)).into() } unsafe extern "system" fn GetMetadata(this: *mut core::ffi::c_void, ppmetadatastore: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -27676,9 +27676,9 @@ pub trait IMFPMediaPlayer_Impl: windows_core::IUnknownImpl { fn GetRate(&self) -> windows_core::Result; fn GetSupportedRates(&self, fforwarddirection: super::super::Foundation::BOOL, pflslowestrate: *mut f32, pflfastestrate: *mut f32) -> windows_core::Result<()>; fn GetState(&self) -> windows_core::Result; - fn CreateMediaItemFromURL(&self, pwszurl: &windows_core::PCWSTR, fsync: super::super::Foundation::BOOL, dwuserdata: usize, ppmediaitem: *mut Option) -> windows_core::Result<()>; - fn CreateMediaItemFromObject(&self, piunknownobj: Option<&windows_core::IUnknown>, fsync: super::super::Foundation::BOOL, dwuserdata: usize, ppmediaitem: *mut Option) -> windows_core::Result<()>; - fn SetMediaItem(&self, pimfpmediaitem: Option<&IMFPMediaItem>) -> windows_core::Result<()>; + fn CreateMediaItemFromURL(&self, pwszurl: &windows_core::PCWSTR, fsync: super::super::Foundation::BOOL, dwuserdata: usize, ppmediaitem: windows_core::OutRef<'_, IMFPMediaItem>) -> windows_core::Result<()>; + fn CreateMediaItemFromObject(&self, piunknownobj: windows_core::Ref<'_, windows_core::IUnknown>, fsync: super::super::Foundation::BOOL, dwuserdata: usize, ppmediaitem: windows_core::OutRef<'_, IMFPMediaItem>) -> windows_core::Result<()>; + fn SetMediaItem(&self, pimfpmediaitem: windows_core::Ref<'_, IMFPMediaItem>) -> windows_core::Result<()>; fn ClearMediaItem(&self) -> windows_core::Result<()>; fn GetMediaItem(&self) -> windows_core::Result; fn GetVolume(&self) -> windows_core::Result; @@ -27697,8 +27697,8 @@ pub trait IMFPMediaPlayer_Impl: windows_core::IUnknownImpl { fn UpdateVideo(&self) -> windows_core::Result<()>; fn SetBorderColor(&self, clr: super::super::Foundation::COLORREF) -> windows_core::Result<()>; fn GetBorderColor(&self) -> windows_core::Result; - fn InsertEffect(&self, peffect: Option<&windows_core::IUnknown>, foptional: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn RemoveEffect(&self, peffect: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn InsertEffect(&self, peffect: windows_core::Ref<'_, windows_core::IUnknown>, foptional: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn RemoveEffect(&self, peffect: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RemoveAllEffects(&self) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; } @@ -27779,11 +27779,11 @@ impl IMFPMediaPlayer_Vtbl { } unsafe extern "system" fn CreateMediaItemFromObject(this: *mut core::ffi::c_void, piunknownobj: *mut core::ffi::c_void, fsync: super::super::Foundation::BOOL, dwuserdata: usize, ppmediaitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPMediaPlayer_Impl::CreateMediaItemFromObject(this, windows_core::from_raw_borrowed(&piunknownobj), core::mem::transmute_copy(&fsync), core::mem::transmute_copy(&dwuserdata), core::mem::transmute_copy(&ppmediaitem)).into() + IMFPMediaPlayer_Impl::CreateMediaItemFromObject(this, core::mem::transmute_copy(&piunknownobj), core::mem::transmute_copy(&fsync), core::mem::transmute_copy(&dwuserdata), core::mem::transmute_copy(&ppmediaitem)).into() } unsafe extern "system" fn SetMediaItem(this: *mut core::ffi::c_void, pimfpmediaitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPMediaPlayer_Impl::SetMediaItem(this, windows_core::from_raw_borrowed(&pimfpmediaitem)).into() + IMFPMediaPlayer_Impl::SetMediaItem(this, core::mem::transmute_copy(&pimfpmediaitem)).into() } unsafe extern "system" fn ClearMediaItem(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -27907,11 +27907,11 @@ impl IMFPMediaPlayer_Vtbl { } unsafe extern "system" fn InsertEffect(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void, foptional: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPMediaPlayer_Impl::InsertEffect(this, windows_core::from_raw_borrowed(&peffect), core::mem::transmute_copy(&foptional)).into() + IMFPMediaPlayer_Impl::InsertEffect(this, core::mem::transmute_copy(&peffect), core::mem::transmute_copy(&foptional)).into() } unsafe extern "system" fn RemoveEffect(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPMediaPlayer_Impl::RemoveEffect(this, windows_core::from_raw_borrowed(&peffect)).into() + IMFPMediaPlayer_Impl::RemoveEffect(this, core::mem::transmute_copy(&peffect)).into() } unsafe extern "system" fn RemoveAllEffects(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28195,11 +28195,11 @@ pub struct IMFPresentationClock_Vtbl { pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFPresentationClock_Impl: IMFClock_Impl { - fn SetTimeSource(&self, ptimesource: Option<&IMFPresentationTimeSource>) -> windows_core::Result<()>; + fn SetTimeSource(&self, ptimesource: windows_core::Ref<'_, IMFPresentationTimeSource>) -> windows_core::Result<()>; fn GetTimeSource(&self) -> windows_core::Result; fn GetTime(&self) -> windows_core::Result; - fn AddClockStateSink(&self, pstatesink: Option<&IMFClockStateSink>) -> windows_core::Result<()>; - fn RemoveClockStateSink(&self, pstatesink: Option<&IMFClockStateSink>) -> windows_core::Result<()>; + fn AddClockStateSink(&self, pstatesink: windows_core::Ref<'_, IMFClockStateSink>) -> windows_core::Result<()>; + fn RemoveClockStateSink(&self, pstatesink: windows_core::Ref<'_, IMFClockStateSink>) -> windows_core::Result<()>; fn Start(&self, llclockstartoffset: i64) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; fn Pause(&self) -> windows_core::Result<()>; @@ -28208,7 +28208,7 @@ impl IMFPresentationClock_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetTimeSource(this: *mut core::ffi::c_void, ptimesource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPresentationClock_Impl::SetTimeSource(this, windows_core::from_raw_borrowed(&ptimesource)).into() + IMFPresentationClock_Impl::SetTimeSource(this, core::mem::transmute_copy(&ptimesource)).into() } unsafe extern "system" fn GetTimeSource(this: *mut core::ffi::c_void, pptimesource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28232,11 +28232,11 @@ impl IMFPresentationClock_Vtbl { } unsafe extern "system" fn AddClockStateSink(this: *mut core::ffi::c_void, pstatesink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPresentationClock_Impl::AddClockStateSink(this, windows_core::from_raw_borrowed(&pstatesink)).into() + IMFPresentationClock_Impl::AddClockStateSink(this, core::mem::transmute_copy(&pstatesink)).into() } unsafe extern "system" fn RemoveClockStateSink(this: *mut core::ffi::c_void, pstatesink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFPresentationClock_Impl::RemoveClockStateSink(this, windows_core::from_raw_borrowed(&pstatesink)).into() + IMFPresentationClock_Impl::RemoveClockStateSink(this, core::mem::transmute_copy(&pstatesink)).into() } unsafe extern "system" fn Start(this: *mut core::ffi::c_void, llclockstartoffset: i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28306,7 +28306,7 @@ pub struct IMFPresentationDescriptor_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFPresentationDescriptor_Impl: IMFAttributes_Impl { fn GetStreamDescriptorCount(&self) -> windows_core::Result; - fn GetStreamDescriptorByIndex(&self, dwindex: u32, pfselected: *mut super::super::Foundation::BOOL, ppdescriptor: *mut Option) -> windows_core::Result<()>; + fn GetStreamDescriptorByIndex(&self, dwindex: u32, pfselected: *mut super::super::Foundation::BOOL, ppdescriptor: windows_core::OutRef<'_, IMFStreamDescriptor>) -> windows_core::Result<()>; fn SelectStream(&self, dwdescriptorindex: u32) -> windows_core::Result<()>; fn DeselectStream(&self, dwdescriptorindex: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -28547,13 +28547,13 @@ pub struct IMFQualityAdvise2_Vtbl { pub NotifyQualityEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IMFQualityAdvise2_Impl: IMFQualityAdvise_Impl { - fn NotifyQualityEvent(&self, pevent: Option<&IMFMediaEvent>) -> windows_core::Result; + fn NotifyQualityEvent(&self, pevent: windows_core::Ref<'_, IMFMediaEvent>) -> windows_core::Result; } impl IMFQualityAdvise2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn NotifyQualityEvent(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFQualityAdvise2_Impl::NotifyQualityEvent(this, windows_core::from_raw_borrowed(&pevent)) { + match IMFQualityAdvise2_Impl::NotifyQualityEvent(this, core::mem::transmute_copy(&pevent)) { Ok(ok__) => { pdwflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -28674,34 +28674,34 @@ pub struct IMFQualityManager_Vtbl { pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFQualityManager_Impl: windows_core::IUnknownImpl { - fn NotifyTopology(&self, ptopology: Option<&IMFTopology>) -> windows_core::Result<()>; - fn NotifyPresentationClock(&self, pclock: Option<&IMFPresentationClock>) -> windows_core::Result<()>; - fn NotifyProcessInput(&self, pnode: Option<&IMFTopologyNode>, linputindex: i32, psample: Option<&IMFSample>) -> windows_core::Result<()>; - fn NotifyProcessOutput(&self, pnode: Option<&IMFTopologyNode>, loutputindex: i32, psample: Option<&IMFSample>) -> windows_core::Result<()>; - fn NotifyQualityEvent(&self, pobject: Option<&windows_core::IUnknown>, pevent: Option<&IMFMediaEvent>) -> windows_core::Result<()>; + fn NotifyTopology(&self, ptopology: windows_core::Ref<'_, IMFTopology>) -> windows_core::Result<()>; + fn NotifyPresentationClock(&self, pclock: windows_core::Ref<'_, IMFPresentationClock>) -> windows_core::Result<()>; + fn NotifyProcessInput(&self, pnode: windows_core::Ref<'_, IMFTopologyNode>, linputindex: i32, psample: windows_core::Ref<'_, IMFSample>) -> windows_core::Result<()>; + fn NotifyProcessOutput(&self, pnode: windows_core::Ref<'_, IMFTopologyNode>, loutputindex: i32, psample: windows_core::Ref<'_, IMFSample>) -> windows_core::Result<()>; + fn NotifyQualityEvent(&self, pobject: windows_core::Ref<'_, windows_core::IUnknown>, pevent: windows_core::Ref<'_, IMFMediaEvent>) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; } impl IMFQualityManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn NotifyTopology(this: *mut core::ffi::c_void, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFQualityManager_Impl::NotifyTopology(this, windows_core::from_raw_borrowed(&ptopology)).into() + IMFQualityManager_Impl::NotifyTopology(this, core::mem::transmute_copy(&ptopology)).into() } unsafe extern "system" fn NotifyPresentationClock(this: *mut core::ffi::c_void, pclock: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFQualityManager_Impl::NotifyPresentationClock(this, windows_core::from_raw_borrowed(&pclock)).into() + IMFQualityManager_Impl::NotifyPresentationClock(this, core::mem::transmute_copy(&pclock)).into() } unsafe extern "system" fn NotifyProcessInput(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, linputindex: i32, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFQualityManager_Impl::NotifyProcessInput(this, windows_core::from_raw_borrowed(&pnode), core::mem::transmute_copy(&linputindex), windows_core::from_raw_borrowed(&psample)).into() + IMFQualityManager_Impl::NotifyProcessInput(this, core::mem::transmute_copy(&pnode), core::mem::transmute_copy(&linputindex), core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn NotifyProcessOutput(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, loutputindex: i32, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFQualityManager_Impl::NotifyProcessOutput(this, windows_core::from_raw_borrowed(&pnode), core::mem::transmute_copy(&loutputindex), windows_core::from_raw_borrowed(&psample)).into() + IMFQualityManager_Impl::NotifyProcessOutput(this, core::mem::transmute_copy(&pnode), core::mem::transmute_copy(&loutputindex), core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn NotifyQualityEvent(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFQualityManager_Impl::NotifyQualityEvent(this, windows_core::from_raw_borrowed(&pobject), windows_core::from_raw_borrowed(&pevent)).into() + IMFQualityManager_Impl::NotifyQualityEvent(this, core::mem::transmute_copy(&pobject), core::mem::transmute_copy(&pevent)).into() } unsafe extern "system" fn Shutdown(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28853,18 +28853,18 @@ pub struct IMFReadWriteClassFactory_Vtbl { pub CreateInstanceFromObject: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFReadWriteClassFactory_Impl: windows_core::IUnknownImpl { - fn CreateInstanceFromURL(&self, clsid: *const windows_core::GUID, pwszurl: &windows_core::PCWSTR, pattributes: Option<&IMFAttributes>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateInstanceFromObject(&self, clsid: *const windows_core::GUID, punkobject: Option<&windows_core::IUnknown>, pattributes: Option<&IMFAttributes>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateInstanceFromURL(&self, clsid: *const windows_core::GUID, pwszurl: &windows_core::PCWSTR, pattributes: windows_core::Ref<'_, IMFAttributes>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateInstanceFromObject(&self, clsid: *const windows_core::GUID, punkobject: windows_core::Ref<'_, windows_core::IUnknown>, pattributes: windows_core::Ref<'_, IMFAttributes>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IMFReadWriteClassFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateInstanceFromURL(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, pwszurl: windows_core::PCWSTR, pattributes: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFReadWriteClassFactory_Impl::CreateInstanceFromURL(this, core::mem::transmute_copy(&clsid), core::mem::transmute(&pwszurl), windows_core::from_raw_borrowed(&pattributes), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() + IMFReadWriteClassFactory_Impl::CreateInstanceFromURL(this, core::mem::transmute_copy(&clsid), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() } unsafe extern "system" fn CreateInstanceFromObject(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, punkobject: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFReadWriteClassFactory_Impl::CreateInstanceFromObject(this, core::mem::transmute_copy(&clsid), windows_core::from_raw_borrowed(&punkobject), windows_core::from_raw_borrowed(&pattributes), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() + IMFReadWriteClassFactory_Impl::CreateInstanceFromObject(this, core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&punkobject), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -29056,19 +29056,19 @@ pub struct IMFRelativePanelWatcher_Vtbl { pub GetReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFRelativePanelWatcher_Impl: IMFShutdown_Impl { - fn BeginGetReport(&self, pcallback: Option<&IMFAsyncCallback>, pstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndGetReport(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; + fn BeginGetReport(&self, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, pstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndGetReport(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; fn GetReport(&self) -> windows_core::Result; } impl IMFRelativePanelWatcher_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginGetReport(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFRelativePanelWatcher_Impl::BeginGetReport(this, windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pstate)).into() + IMFRelativePanelWatcher_Impl::BeginGetReport(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into() } unsafe extern "system" fn EndGetReport(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pprelativepanelreport: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFRelativePanelWatcher_Impl::EndGetReport(this, windows_core::from_raw_borrowed(&presult)) { + match IMFRelativePanelWatcher_Impl::EndGetReport(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { pprelativepanelreport.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -29114,13 +29114,13 @@ pub struct IMFRemoteAsyncCallback_Vtbl { pub Invoke: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFRemoteAsyncCallback_Impl: windows_core::IUnknownImpl { - fn Invoke(&self, hr: windows_core::HRESULT, premoteresult: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Invoke(&self, hr: windows_core::HRESULT, premoteresult: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IMFRemoteAsyncCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, hr: windows_core::HRESULT, premoteresult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFRemoteAsyncCallback_Impl::Invoke(this, core::mem::transmute_copy(&hr), windows_core::from_raw_borrowed(&premoteresult)).into() + IMFRemoteAsyncCallback_Impl::Invoke(this, core::mem::transmute_copy(&hr), core::mem::transmute_copy(&premoteresult)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Invoke: Invoke:: } } @@ -29145,13 +29145,13 @@ pub struct IMFRemoteDesktopPlugin_Vtbl { pub UpdateTopology: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFRemoteDesktopPlugin_Impl: windows_core::IUnknownImpl { - fn UpdateTopology(&self, ptopology: Option<&IMFTopology>) -> windows_core::Result<()>; + fn UpdateTopology(&self, ptopology: windows_core::Ref<'_, IMFTopology>) -> windows_core::Result<()>; } impl IMFRemoteDesktopPlugin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UpdateTopology(this: *mut core::ffi::c_void, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFRemoteDesktopPlugin_Impl::UpdateTopology(this, windows_core::from_raw_borrowed(&ptopology)).into() + IMFRemoteDesktopPlugin_Impl::UpdateTopology(this, core::mem::transmute_copy(&ptopology)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), UpdateTopology: UpdateTopology:: } } @@ -29341,8 +29341,8 @@ pub struct IMFSSLCertificateManager_Vtbl { } pub trait IMFSSLCertificateManager_Impl: windows_core::IUnknownImpl { fn GetClientCertificate(&self, pszurl: &windows_core::PCWSTR, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>; - fn BeginGetClientCertificate(&self, pszurl: &windows_core::PCWSTR, pcallback: Option<&IMFAsyncCallback>, pstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndGetClientCertificate(&self, presult: Option<&IMFAsyncResult>, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>; + fn BeginGetClientCertificate(&self, pszurl: &windows_core::PCWSTR, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, pstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndGetClientCertificate(&self, presult: windows_core::Ref<'_, IMFAsyncResult>, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()>; fn GetCertificatePolicy(&self, pszurl: &windows_core::PCWSTR, pfoverrideautomaticcheck: *mut super::super::Foundation::BOOL, pfclientcertificateavailable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn OnServerCertificate(&self, pszurl: &windows_core::PCWSTR, pbdata: *const u8, cbdata: u32) -> windows_core::Result; } @@ -29354,11 +29354,11 @@ impl IMFSSLCertificateManager_Vtbl { } unsafe extern "system" fn BeginGetClientCertificate(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSSLCertificateManager_Impl::BeginGetClientCertificate(this, core::mem::transmute(&pszurl), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pstate)).into() + IMFSSLCertificateManager_Impl::BeginGetClientCertificate(this, core::mem::transmute(&pszurl), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into() } unsafe extern "system" fn EndGetClientCertificate(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSSLCertificateManager_Impl::EndGetClientCertificate(this, windows_core::from_raw_borrowed(&presult), core::mem::transmute_copy(&ppbdata), core::mem::transmute_copy(&pcbdata)).into() + IMFSSLCertificateManager_Impl::EndGetClientCertificate(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&ppbdata), core::mem::transmute_copy(&pcbdata)).into() } unsafe extern "system" fn GetCertificatePolicy(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR, pfoverrideautomaticcheck: *mut super::super::Foundation::BOOL, pfclientcertificateavailable: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29482,11 +29482,11 @@ pub trait IMFSample_Impl: IMFAttributes_Impl { fn GetBufferCount(&self) -> windows_core::Result; fn GetBufferByIndex(&self, dwindex: u32) -> windows_core::Result; fn ConvertToContiguousBuffer(&self) -> windows_core::Result; - fn AddBuffer(&self, pbuffer: Option<&IMFMediaBuffer>) -> windows_core::Result<()>; + fn AddBuffer(&self, pbuffer: windows_core::Ref<'_, IMFMediaBuffer>) -> windows_core::Result<()>; fn RemoveBufferByIndex(&self, dwindex: u32) -> windows_core::Result<()>; fn RemoveAllBuffers(&self) -> windows_core::Result<()>; fn GetTotalLength(&self) -> windows_core::Result; - fn CopyToBuffer(&self, pbuffer: Option<&IMFMediaBuffer>) -> windows_core::Result<()>; + fn CopyToBuffer(&self, pbuffer: windows_core::Ref<'_, IMFMediaBuffer>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMFSample_Vtbl { @@ -29565,7 +29565,7 @@ impl IMFSample_Vtbl { } unsafe extern "system" fn AddBuffer(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSample_Impl::AddBuffer(this, windows_core::from_raw_borrowed(&pbuffer)).into() + IMFSample_Impl::AddBuffer(this, core::mem::transmute_copy(&pbuffer)).into() } unsafe extern "system" fn RemoveBufferByIndex(this: *mut core::ffi::c_void, dwindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29587,7 +29587,7 @@ impl IMFSample_Vtbl { } unsafe extern "system" fn CopyToBuffer(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSample_Impl::CopyToBuffer(this, windows_core::from_raw_borrowed(&pbuffer)).into() + IMFSample_Impl::CopyToBuffer(this, core::mem::transmute_copy(&pbuffer)).into() } Self { base__: IMFAttributes_Vtbl::new::(), @@ -29633,14 +29633,14 @@ pub struct IMFSampleAllocatorControl_Vtbl { pub GetAllocatorUsage: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32, *mut MFSampleAllocatorUsage) -> windows_core::HRESULT, } pub trait IMFSampleAllocatorControl_Impl: windows_core::IUnknownImpl { - fn SetDefaultAllocator(&self, dwoutputstreamid: u32, pallocator: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetDefaultAllocator(&self, dwoutputstreamid: u32, pallocator: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetAllocatorUsage(&self, dwoutputstreamid: u32, pdwinputstreamid: *mut u32, peusage: *mut MFSampleAllocatorUsage) -> windows_core::Result<()>; } impl IMFSampleAllocatorControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDefaultAllocator(this: *mut core::ffi::c_void, dwoutputstreamid: u32, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSampleAllocatorControl_Impl::SetDefaultAllocator(this, core::mem::transmute_copy(&dwoutputstreamid), windows_core::from_raw_borrowed(&pallocator)).into() + IMFSampleAllocatorControl_Impl::SetDefaultAllocator(this, core::mem::transmute_copy(&dwoutputstreamid), core::mem::transmute_copy(&pallocator)).into() } unsafe extern "system" fn GetAllocatorUsage(this: *mut core::ffi::c_void, dwoutputstreamid: u32, pdwinputstreamid: *mut u32, peusage: *mut MFSampleAllocatorUsage) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29687,7 +29687,7 @@ pub struct IMFSampleGrabberSinkCallback_Vtbl { pub OnShutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFSampleGrabberSinkCallback_Impl: IMFClockStateSink_Impl { - fn OnSetPresentationClock(&self, ppresentationclock: Option<&IMFPresentationClock>) -> windows_core::Result<()>; + fn OnSetPresentationClock(&self, ppresentationclock: windows_core::Ref<'_, IMFPresentationClock>) -> windows_core::Result<()>; fn OnProcessSample(&self, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32) -> windows_core::Result<()>; fn OnShutdown(&self) -> windows_core::Result<()>; } @@ -29695,7 +29695,7 @@ impl IMFSampleGrabberSinkCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSetPresentationClock(this: *mut core::ffi::c_void, ppresentationclock: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSampleGrabberSinkCallback_Impl::OnSetPresentationClock(this, windows_core::from_raw_borrowed(&ppresentationclock)).into() + IMFSampleGrabberSinkCallback_Impl::OnSetPresentationClock(this, core::mem::transmute_copy(&ppresentationclock)).into() } unsafe extern "system" fn OnProcessSample(this: *mut core::ffi::c_void, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29739,13 +29739,13 @@ pub struct IMFSampleGrabberSinkCallback2_Vtbl { pub OnProcessSampleEx: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, u32, i64, i64, *const u8, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFSampleGrabberSinkCallback2_Impl: IMFSampleGrabberSinkCallback_Impl { - fn OnProcessSampleEx(&self, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32, pattributes: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn OnProcessSampleEx(&self, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32, pattributes: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; } impl IMFSampleGrabberSinkCallback2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnProcessSampleEx(this: *mut core::ffi::c_void, guidmajormediatype: *const windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: *const u8, dwsamplesize: u32, pattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSampleGrabberSinkCallback2_Impl::OnProcessSampleEx(this, core::mem::transmute_copy(&guidmajormediatype), core::mem::transmute_copy(&dwsampleflags), core::mem::transmute_copy(&llsampletime), core::mem::transmute_copy(&llsampleduration), core::mem::transmute_copy(&psamplebuffer), core::mem::transmute_copy(&dwsamplesize), windows_core::from_raw_borrowed(&pattributes)).into() + IMFSampleGrabberSinkCallback2_Impl::OnProcessSampleEx(this, core::mem::transmute_copy(&guidmajormediatype), core::mem::transmute_copy(&dwsampleflags), core::mem::transmute_copy(&llsampletime), core::mem::transmute_copy(&llsampleduration), core::mem::transmute_copy(&psamplebuffer), core::mem::transmute_copy(&dwsamplesize), core::mem::transmute_copy(&pattributes)).into() } Self { base__: IMFSampleGrabberSinkCallback_Vtbl::new::(), OnProcessSampleEx: OnProcessSampleEx:: } } @@ -29783,19 +29783,19 @@ pub struct IMFSampleOutputStream_Vtbl { pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFSampleOutputStream_Impl: windows_core::IUnknownImpl { - fn BeginWriteSample(&self, psample: Option<&IMFSample>, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndWriteSample(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; + fn BeginWriteSample(&self, psample: windows_core::Ref<'_, IMFSample>, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndWriteSample(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } impl IMFSampleOutputStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginWriteSample(this: *mut core::ffi::c_void, psample: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSampleOutputStream_Impl::BeginWriteSample(this, windows_core::from_raw_borrowed(&psample), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFSampleOutputStream_Impl::BeginWriteSample(this, core::mem::transmute_copy(&psample), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndWriteSample(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSampleOutputStream_Impl::EndWriteSample(this, windows_core::from_raw_borrowed(&presult)).into() + IMFSampleOutputStream_Impl::EndWriteSample(this, core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29932,8 +29932,8 @@ pub struct IMFSaveJob_Vtbl { pub GetProgress: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IMFSaveJob_Impl: windows_core::IUnknownImpl { - fn BeginSave(&self, pstream: Option<&IMFByteStream>, pcallback: Option<&IMFAsyncCallback>, pstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndSave(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; + fn BeginSave(&self, pstream: windows_core::Ref<'_, IMFByteStream>, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, pstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndSave(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; fn CancelSave(&self) -> windows_core::Result<()>; fn GetProgress(&self) -> windows_core::Result; } @@ -29941,11 +29941,11 @@ impl IMFSaveJob_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginSave(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSaveJob_Impl::BeginSave(this, windows_core::from_raw_borrowed(&pstream), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pstate)).into() + IMFSaveJob_Impl::BeginSave(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into() } unsafe extern "system" fn EndSave(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSaveJob_Impl::EndSave(this, windows_core::from_raw_borrowed(&presult)).into() + IMFSaveJob_Impl::EndSave(this, core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn CancelSave(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30012,24 +30012,24 @@ pub struct IMFSchemeHandler_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IMFSchemeHandler_Impl: windows_core::IUnknownImpl { - fn BeginCreateObject(&self, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: *mut Option, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndCreateObject(&self, presult: Option<&IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()>; - fn CancelObjectCreation(&self, piunknowncancelcookie: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn BeginCreateObject(&self, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: windows_core::OutRef<'_, windows_core::IUnknown>, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndCreateObject(&self, presult: windows_core::Ref<'_, IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CancelObjectCreation(&self, piunknowncancelcookie: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] impl IMFSchemeHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginCreateObject(this: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSchemeHandler_Impl::BeginCreateObject(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFSchemeHandler_Impl::BeginCreateObject(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndCreateObject(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSchemeHandler_Impl::EndCreateObject(this, windows_core::from_raw_borrowed(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() + IMFSchemeHandler_Impl::EndCreateObject(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() } unsafe extern "system" fn CancelObjectCreation(this: *mut core::ffi::c_void, piunknowncancelcookie: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSchemeHandler_Impl::CancelObjectCreation(this, windows_core::from_raw_borrowed(&piunknowncancelcookie)).into() + IMFSchemeHandler_Impl::CancelObjectCreation(this, core::mem::transmute_copy(&piunknowncancelcookie)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -30246,13 +30246,13 @@ pub struct IMFSensorActivitiesReportCallback_Vtbl { pub OnActivitiesReport: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFSensorActivitiesReportCallback_Impl: windows_core::IUnknownImpl { - fn OnActivitiesReport(&self, sensoractivitiesreport: Option<&IMFSensorActivitiesReport>) -> windows_core::Result<()>; + fn OnActivitiesReport(&self, sensoractivitiesreport: windows_core::Ref<'_, IMFSensorActivitiesReport>) -> windows_core::Result<()>; } impl IMFSensorActivitiesReportCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnActivitiesReport(this: *mut core::ffi::c_void, sensoractivitiesreport: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSensorActivitiesReportCallback_Impl::OnActivitiesReport(this, windows_core::from_raw_borrowed(&sensoractivitiesreport)).into() + IMFSensorActivitiesReportCallback_Impl::OnActivitiesReport(this, core::mem::transmute_copy(&sensoractivitiesreport)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnActivitiesReport: OnActivitiesReport:: } } @@ -30802,7 +30802,7 @@ pub struct IMFSensorProfile_Vtbl { pub trait IMFSensorProfile_Impl: windows_core::IUnknownImpl { fn GetProfileId(&self, pid: *mut SENSORPROFILEID) -> windows_core::Result<()>; fn AddProfileFilter(&self, streamid: u32, wzfiltersetstring: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn IsMediaTypeSupported(&self, streamid: u32, pmediatype: Option<&IMFMediaType>) -> windows_core::Result; + fn IsMediaTypeSupported(&self, streamid: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result; fn AddBlockedControl(&self, wzblockedcontrol: &windows_core::PCWSTR) -> windows_core::Result<()>; } impl IMFSensorProfile_Vtbl { @@ -30817,7 +30817,7 @@ impl IMFSensorProfile_Vtbl { } unsafe extern "system" fn IsMediaTypeSupported(this: *mut core::ffi::c_void, streamid: u32, pmediatype: *mut core::ffi::c_void, pfsupported: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFSensorProfile_Impl::IsMediaTypeSupported(this, core::mem::transmute_copy(&streamid), windows_core::from_raw_borrowed(&pmediatype)) { + match IMFSensorProfile_Impl::IsMediaTypeSupported(this, core::mem::transmute_copy(&streamid), core::mem::transmute_copy(&pmediatype)) { Ok(ok__) => { pfsupported.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -30882,7 +30882,7 @@ pub struct IMFSensorProfileCollection_Vtbl { pub trait IMFSensorProfileCollection_Impl: windows_core::IUnknownImpl { fn GetProfileCount(&self) -> u32; fn GetProfile(&self, index: u32) -> windows_core::Result; - fn AddProfile(&self, pprofile: Option<&IMFSensorProfile>) -> windows_core::Result<()>; + fn AddProfile(&self, pprofile: windows_core::Ref<'_, IMFSensorProfile>) -> windows_core::Result<()>; fn FindProfile(&self, profileid: *const SENSORPROFILEID) -> windows_core::Result; fn RemoveProfileByIndex(&self, index: u32); fn RemoveProfile(&self, profileid: *const SENSORPROFILEID); @@ -30905,7 +30905,7 @@ impl IMFSensorProfileCollection_Vtbl { } unsafe extern "system" fn AddProfile(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSensorProfileCollection_Impl::AddProfile(this, windows_core::from_raw_borrowed(&pprofile)).into() + IMFSensorProfileCollection_Impl::AddProfile(this, core::mem::transmute_copy(&pprofile)).into() } unsafe extern "system" fn FindProfile(this: *mut core::ffi::c_void, profileid: *const SENSORPROFILEID, ppprofile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31061,10 +31061,10 @@ pub struct IMFSensorTransformFactory_Vtbl { } pub trait IMFSensorTransformFactory_Impl: windows_core::IUnknownImpl { fn GetFactoryAttributes(&self) -> windows_core::Result; - fn InitializeFactory(&self, dwmaxtransformcount: u32, psensordevices: Option<&IMFCollection>, pattributes: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn InitializeFactory(&self, dwmaxtransformcount: u32, psensordevices: windows_core::Ref<'_, IMFCollection>, pattributes: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; fn GetTransformCount(&self) -> windows_core::Result; - fn GetTransformInformation(&self, transformindex: u32, pguidtransformid: *mut windows_core::GUID, ppattributes: *mut Option, ppstreaminformation: *mut Option) -> windows_core::Result<()>; - fn CreateTransform(&self, guidsensortransformid: *const windows_core::GUID, pattributes: Option<&IMFAttributes>) -> windows_core::Result; + fn GetTransformInformation(&self, transformindex: u32, pguidtransformid: *mut windows_core::GUID, ppattributes: windows_core::OutRef<'_, IMFAttributes>, ppstreaminformation: windows_core::OutRef<'_, IMFCollection>) -> windows_core::Result<()>; + fn CreateTransform(&self, guidsensortransformid: *const windows_core::GUID, pattributes: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result; } impl IMFSensorTransformFactory_Vtbl { pub const fn new() -> Self { @@ -31080,7 +31080,7 @@ impl IMFSensorTransformFactory_Vtbl { } unsafe extern "system" fn InitializeFactory(this: *mut core::ffi::c_void, dwmaxtransformcount: u32, psensordevices: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSensorTransformFactory_Impl::InitializeFactory(this, core::mem::transmute_copy(&dwmaxtransformcount), windows_core::from_raw_borrowed(&psensordevices), windows_core::from_raw_borrowed(&pattributes)).into() + IMFSensorTransformFactory_Impl::InitializeFactory(this, core::mem::transmute_copy(&dwmaxtransformcount), core::mem::transmute_copy(&psensordevices), core::mem::transmute_copy(&pattributes)).into() } unsafe extern "system" fn GetTransformCount(this: *mut core::ffi::c_void, pdwcount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31098,7 +31098,7 @@ impl IMFSensorTransformFactory_Vtbl { } unsafe extern "system" fn CreateTransform(this: *mut core::ffi::c_void, guidsensortransformid: *const windows_core::GUID, pattributes: *mut core::ffi::c_void, ppdevicemft: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFSensorTransformFactory_Impl::CreateTransform(this, core::mem::transmute_copy(&guidsensortransformid), windows_core::from_raw_borrowed(&pattributes)) { + match IMFSensorTransformFactory_Impl::CreateTransform(this, core::mem::transmute_copy(&guidsensortransformid), core::mem::transmute_copy(&pattributes)) { Ok(ok__) => { ppdevicemft.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -31159,17 +31159,17 @@ pub struct IMFSequencerSource_Vtbl { pub UpdateTopologyFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait IMFSequencerSource_Impl: windows_core::IUnknownImpl { - fn AppendTopology(&self, ptopology: Option<&IMFTopology>, dwflags: u32) -> windows_core::Result; + fn AppendTopology(&self, ptopology: windows_core::Ref<'_, IMFTopology>, dwflags: u32) -> windows_core::Result; fn DeleteTopology(&self, dwid: u32) -> windows_core::Result<()>; - fn GetPresentationContext(&self, ppd: Option<&IMFPresentationDescriptor>, pid: *mut u32, pptopology: *mut Option) -> windows_core::Result<()>; - fn UpdateTopology(&self, dwid: u32, ptopology: Option<&IMFTopology>) -> windows_core::Result<()>; + fn GetPresentationContext(&self, ppd: windows_core::Ref<'_, IMFPresentationDescriptor>, pid: *mut u32, pptopology: windows_core::OutRef<'_, IMFTopology>) -> windows_core::Result<()>; + fn UpdateTopology(&self, dwid: u32, ptopology: windows_core::Ref<'_, IMFTopology>) -> windows_core::Result<()>; fn UpdateTopologyFlags(&self, dwid: u32, dwflags: u32) -> windows_core::Result<()>; } impl IMFSequencerSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AppendTopology(this: *mut core::ffi::c_void, ptopology: *mut core::ffi::c_void, dwflags: u32, pdwid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFSequencerSource_Impl::AppendTopology(this, windows_core::from_raw_borrowed(&ptopology), core::mem::transmute_copy(&dwflags)) { + match IMFSequencerSource_Impl::AppendTopology(this, core::mem::transmute_copy(&ptopology), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { pdwid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -31183,11 +31183,11 @@ impl IMFSequencerSource_Vtbl { } unsafe extern "system" fn GetPresentationContext(this: *mut core::ffi::c_void, ppd: *mut core::ffi::c_void, pid: *mut u32, pptopology: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSequencerSource_Impl::GetPresentationContext(this, windows_core::from_raw_borrowed(&ppd), core::mem::transmute_copy(&pid), core::mem::transmute_copy(&pptopology)).into() + IMFSequencerSource_Impl::GetPresentationContext(this, core::mem::transmute_copy(&ppd), core::mem::transmute_copy(&pid), core::mem::transmute_copy(&pptopology)).into() } unsafe extern "system" fn UpdateTopology(this: *mut core::ffi::c_void, dwid: u32, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSequencerSource_Impl::UpdateTopology(this, core::mem::transmute_copy(&dwid), windows_core::from_raw_borrowed(&ptopology)).into() + IMFSequencerSource_Impl::UpdateTopology(this, core::mem::transmute_copy(&dwid), core::mem::transmute_copy(&ptopology)).into() } unsafe extern "system" fn UpdateTopologyFlags(this: *mut core::ffi::c_void, dwid: u32, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31224,13 +31224,13 @@ pub struct IMFSharingEngineClassFactory_Vtbl { pub CreateInstance: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFSharingEngineClassFactory_Impl: windows_core::IUnknownImpl { - fn CreateInstance(&self, dwflags: u32, pattr: Option<&IMFAttributes>) -> windows_core::Result; + fn CreateInstance(&self, dwflags: u32, pattr: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result; } impl IMFSharingEngineClassFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, dwflags: u32, pattr: *mut core::ffi::c_void, ppengine: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFSharingEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pattr)) { + match IMFSharingEngineClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pattr)) { Ok(ok__) => { ppengine.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -31463,10 +31463,10 @@ pub struct IMFSinkWriter_Vtbl { pub GetStatistics: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut MF_SINK_WRITER_STATISTICS) -> windows_core::HRESULT, } pub trait IMFSinkWriter_Impl: windows_core::IUnknownImpl { - fn AddStream(&self, ptargetmediatype: Option<&IMFMediaType>) -> windows_core::Result; - fn SetInputMediaType(&self, dwstreamindex: u32, pinputmediatype: Option<&IMFMediaType>, pencodingparameters: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn AddStream(&self, ptargetmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result; + fn SetInputMediaType(&self, dwstreamindex: u32, pinputmediatype: windows_core::Ref<'_, IMFMediaType>, pencodingparameters: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; fn BeginWriting(&self) -> windows_core::Result<()>; - fn WriteSample(&self, dwstreamindex: u32, psample: Option<&IMFSample>) -> windows_core::Result<()>; + fn WriteSample(&self, dwstreamindex: u32, psample: windows_core::Ref<'_, IMFSample>) -> windows_core::Result<()>; fn SendStreamTick(&self, dwstreamindex: u32, lltimestamp: i64) -> windows_core::Result<()>; fn PlaceMarker(&self, dwstreamindex: u32, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; fn NotifyEndOfSegment(&self, dwstreamindex: u32) -> windows_core::Result<()>; @@ -31479,7 +31479,7 @@ impl IMFSinkWriter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddStream(this: *mut core::ffi::c_void, ptargetmediatype: *mut core::ffi::c_void, pdwstreamindex: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFSinkWriter_Impl::AddStream(this, windows_core::from_raw_borrowed(&ptargetmediatype)) { + match IMFSinkWriter_Impl::AddStream(this, core::mem::transmute_copy(&ptargetmediatype)) { Ok(ok__) => { pdwstreamindex.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -31489,7 +31489,7 @@ impl IMFSinkWriter_Vtbl { } unsafe extern "system" fn SetInputMediaType(this: *mut core::ffi::c_void, dwstreamindex: u32, pinputmediatype: *mut core::ffi::c_void, pencodingparameters: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSinkWriter_Impl::SetInputMediaType(this, core::mem::transmute_copy(&dwstreamindex), windows_core::from_raw_borrowed(&pinputmediatype), windows_core::from_raw_borrowed(&pencodingparameters)).into() + IMFSinkWriter_Impl::SetInputMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pinputmediatype), core::mem::transmute_copy(&pencodingparameters)).into() } unsafe extern "system" fn BeginWriting(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31497,7 +31497,7 @@ impl IMFSinkWriter_Vtbl { } unsafe extern "system" fn WriteSample(this: *mut core::ffi::c_void, dwstreamindex: u32, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSinkWriter_Impl::WriteSample(this, core::mem::transmute_copy(&dwstreamindex), windows_core::from_raw_borrowed(&psample)).into() + IMFSinkWriter_Impl::WriteSample(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn SendStreamTick(this: *mut core::ffi::c_void, dwstreamindex: u32, lltimestamp: i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31659,18 +31659,18 @@ pub struct IMFSinkWriterEncoderConfig_Vtbl { pub PlaceEncodingParameters: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFSinkWriterEncoderConfig_Impl: windows_core::IUnknownImpl { - fn SetTargetMediaType(&self, dwstreamindex: u32, ptargetmediatype: Option<&IMFMediaType>, pencodingparameters: Option<&IMFAttributes>) -> windows_core::Result<()>; - fn PlaceEncodingParameters(&self, dwstreamindex: u32, pencodingparameters: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn SetTargetMediaType(&self, dwstreamindex: u32, ptargetmediatype: windows_core::Ref<'_, IMFMediaType>, pencodingparameters: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; + fn PlaceEncodingParameters(&self, dwstreamindex: u32, pencodingparameters: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; } impl IMFSinkWriterEncoderConfig_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetTargetMediaType(this: *mut core::ffi::c_void, dwstreamindex: u32, ptargetmediatype: *mut core::ffi::c_void, pencodingparameters: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSinkWriterEncoderConfig_Impl::SetTargetMediaType(this, core::mem::transmute_copy(&dwstreamindex), windows_core::from_raw_borrowed(&ptargetmediatype), windows_core::from_raw_borrowed(&pencodingparameters)).into() + IMFSinkWriterEncoderConfig_Impl::SetTargetMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&ptargetmediatype), core::mem::transmute_copy(&pencodingparameters)).into() } unsafe extern "system" fn PlaceEncodingParameters(this: *mut core::ffi::c_void, dwstreamindex: u32, pencodingparameters: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSinkWriterEncoderConfig_Impl::PlaceEncodingParameters(this, core::mem::transmute_copy(&dwstreamindex), windows_core::from_raw_borrowed(&pencodingparameters)).into() + IMFSinkWriterEncoderConfig_Impl::PlaceEncodingParameters(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pencodingparameters)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -31702,7 +31702,7 @@ pub struct IMFSinkWriterEx_Vtbl { pub GetTransformForStream: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFSinkWriterEx_Impl: IMFSinkWriter_Impl { - fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: *mut windows_core::GUID, pptransform: *mut Option) -> windows_core::Result<()>; + fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: *mut windows_core::GUID, pptransform: windows_core::OutRef<'_, IMFTransform>) -> windows_core::Result<()>; } impl IMFSinkWriterEx_Vtbl { pub const fn new() -> Self { @@ -31787,7 +31787,7 @@ pub trait IMFSourceBuffer_Impl: windows_core::IUnknownImpl { fn GetAppendWindowEnd(&self) -> f64; fn SetAppendWindowEnd(&self, time: f64) -> windows_core::Result<()>; fn Append(&self, pdata: *const u8, len: u32) -> windows_core::Result<()>; - fn AppendByteStream(&self, pstream: Option<&IMFByteStream>, pmaxlen: *const u64) -> windows_core::Result<()>; + fn AppendByteStream(&self, pstream: windows_core::Ref<'_, IMFByteStream>, pmaxlen: *const u64) -> windows_core::Result<()>; fn Abort(&self) -> windows_core::Result<()>; fn Remove(&self, start: f64, end: f64) -> windows_core::Result<()>; } @@ -31837,7 +31837,7 @@ impl IMFSourceBuffer_Vtbl { } unsafe extern "system" fn AppendByteStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, pmaxlen: *const u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceBuffer_Impl::AppendByteStream(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&pmaxlen)).into() + IMFSourceBuffer_Impl::AppendByteStream(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&pmaxlen)).into() } unsafe extern "system" fn Abort(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32037,13 +32037,13 @@ pub struct IMFSourceOpenMonitor_Vtbl { pub OnSourceEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFSourceOpenMonitor_Impl: windows_core::IUnknownImpl { - fn OnSourceEvent(&self, pevent: Option<&IMFMediaEvent>) -> windows_core::Result<()>; + fn OnSourceEvent(&self, pevent: windows_core::Ref<'_, IMFMediaEvent>) -> windows_core::Result<()>; } impl IMFSourceOpenMonitor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSourceEvent(this: *mut core::ffi::c_void, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceOpenMonitor_Impl::OnSourceEvent(this, windows_core::from_raw_borrowed(&pevent)).into() + IMFSourceOpenMonitor_Impl::OnSourceEvent(this, core::mem::transmute_copy(&pevent)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnSourceEvent: OnSourceEvent:: } } @@ -32121,9 +32121,9 @@ pub trait IMFSourceReader_Impl: windows_core::IUnknownImpl { fn SetStreamSelection(&self, dwstreamindex: u32, fselected: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetNativeMediaType(&self, dwstreamindex: u32, dwmediatypeindex: u32) -> windows_core::Result; fn GetCurrentMediaType(&self, dwstreamindex: u32) -> windows_core::Result; - fn SetCurrentMediaType(&self, dwstreamindex: u32, pdwreserved: *const u32, pmediatype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn SetCurrentMediaType(&self, dwstreamindex: u32, pdwreserved: *const u32, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; fn SetCurrentPosition(&self, guidtimeformat: *const windows_core::GUID, varposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; - fn ReadSample(&self, dwstreamindex: u32, dwcontrolflags: u32, pdwactualstreamindex: *mut u32, pdwstreamflags: *mut u32, plltimestamp: *mut i64, ppsample: *mut Option) -> windows_core::Result<()>; + fn ReadSample(&self, dwstreamindex: u32, dwcontrolflags: u32, pdwactualstreamindex: *mut u32, pdwstreamflags: *mut u32, plltimestamp: *mut i64, ppsample: windows_core::OutRef<'_, IMFSample>) -> windows_core::Result<()>; fn Flush(&self, dwstreamindex: u32) -> windows_core::Result<()>; fn GetServiceForStream(&self, dwstreamindex: u32, guidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetPresentationAttribute(&self, dwstreamindex: u32, guidattribute: *const windows_core::GUID) -> windows_core::Result; @@ -32167,7 +32167,7 @@ impl IMFSourceReader_Vtbl { } unsafe extern "system" fn SetCurrentMediaType(this: *mut core::ffi::c_void, dwstreamindex: u32, pdwreserved: *const u32, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceReader_Impl::SetCurrentMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pdwreserved), windows_core::from_raw_borrowed(&pmediatype)).into() + IMFSourceReader_Impl::SetCurrentMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pdwreserved), core::mem::transmute_copy(&pmediatype)).into() } unsafe extern "system" fn SetCurrentPosition(this: *mut core::ffi::c_void, guidtimeformat: *const windows_core::GUID, varposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32242,15 +32242,15 @@ pub struct IMFSourceReaderCallback_Vtbl { pub OnEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFSourceReaderCallback_Impl: windows_core::IUnknownImpl { - fn OnReadSample(&self, hrstatus: windows_core::HRESULT, dwstreamindex: u32, dwstreamflags: u32, lltimestamp: i64, psample: Option<&IMFSample>) -> windows_core::Result<()>; + fn OnReadSample(&self, hrstatus: windows_core::HRESULT, dwstreamindex: u32, dwstreamflags: u32, lltimestamp: i64, psample: windows_core::Ref<'_, IMFSample>) -> windows_core::Result<()>; fn OnFlush(&self, dwstreamindex: u32) -> windows_core::Result<()>; - fn OnEvent(&self, dwstreamindex: u32, pevent: Option<&IMFMediaEvent>) -> windows_core::Result<()>; + fn OnEvent(&self, dwstreamindex: u32, pevent: windows_core::Ref<'_, IMFMediaEvent>) -> windows_core::Result<()>; } impl IMFSourceReaderCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnReadSample(this: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT, dwstreamindex: u32, dwstreamflags: u32, lltimestamp: i64, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceReaderCallback_Impl::OnReadSample(this, core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwstreamflags), core::mem::transmute_copy(&lltimestamp), windows_core::from_raw_borrowed(&psample)).into() + IMFSourceReaderCallback_Impl::OnReadSample(this, core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&dwstreamflags), core::mem::transmute_copy(&lltimestamp), core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn OnFlush(this: *mut core::ffi::c_void, dwstreamindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32258,7 +32258,7 @@ impl IMFSourceReaderCallback_Vtbl { } unsafe extern "system" fn OnEvent(this: *mut core::ffi::c_void, dwstreamindex: u32, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceReaderCallback_Impl::OnEvent(this, core::mem::transmute_copy(&dwstreamindex), windows_core::from_raw_borrowed(&pevent)).into() + IMFSourceReaderCallback_Impl::OnEvent(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pevent)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -32358,17 +32358,17 @@ pub struct IMFSourceReaderEx_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFSourceReaderEx_Impl: IMFSourceReader_Impl { - fn SetNativeMediaType(&self, dwstreamindex: u32, pmediatype: Option<&IMFMediaType>) -> windows_core::Result; - fn AddTransformForStream(&self, dwstreamindex: u32, ptransformoractivate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetNativeMediaType(&self, dwstreamindex: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result; + fn AddTransformForStream(&self, dwstreamindex: u32, ptransformoractivate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RemoveAllTransformsForStream(&self, dwstreamindex: u32) -> windows_core::Result<()>; - fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: *mut windows_core::GUID, pptransform: *mut Option) -> windows_core::Result<()>; + fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: *mut windows_core::GUID, pptransform: windows_core::OutRef<'_, IMFTransform>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMFSourceReaderEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetNativeMediaType(this: *mut core::ffi::c_void, dwstreamindex: u32, pmediatype: *mut core::ffi::c_void, pdwstreamflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFSourceReaderEx_Impl::SetNativeMediaType(this, core::mem::transmute_copy(&dwstreamindex), windows_core::from_raw_borrowed(&pmediatype)) { + match IMFSourceReaderEx_Impl::SetNativeMediaType(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&pmediatype)) { Ok(ok__) => { pdwstreamflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32378,7 +32378,7 @@ impl IMFSourceReaderEx_Vtbl { } unsafe extern "system" fn AddTransformForStream(this: *mut core::ffi::c_void, dwstreamindex: u32, ptransformoractivate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceReaderEx_Impl::AddTransformForStream(this, core::mem::transmute_copy(&dwstreamindex), windows_core::from_raw_borrowed(&ptransformoractivate)).into() + IMFSourceReaderEx_Impl::AddTransformForStream(this, core::mem::transmute_copy(&dwstreamindex), core::mem::transmute_copy(&ptransformoractivate)).into() } unsafe extern "system" fn RemoveAllTransformsForStream(this: *mut core::ffi::c_void, dwstreamindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32487,44 +32487,44 @@ pub struct IMFSourceResolver_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IMFSourceResolver_Impl: windows_core::IUnknownImpl { - fn CreateObjectFromURL(&self, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()>; - fn CreateObjectFromByteStream(&self, pbytestream: Option<&IMFByteStream>, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()>; - fn BeginCreateObjectFromURL(&self, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: *mut Option, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndCreateObjectFromURL(&self, presult: Option<&IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()>; - fn BeginCreateObjectFromByteStream(&self, pbytestream: Option<&IMFByteStream>, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: *mut Option, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndCreateObjectFromByteStream(&self, presult: Option<&IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()>; - fn CancelObjectCreation(&self, piunknowncancelcookie: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateObjectFromURL(&self, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateObjectFromByteStream(&self, pbytestream: windows_core::Ref<'_, IMFByteStream>, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn BeginCreateObjectFromURL(&self, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: windows_core::OutRef<'_, windows_core::IUnknown>, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndCreateObjectFromURL(&self, presult: windows_core::Ref<'_, IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn BeginCreateObjectFromByteStream(&self, pbytestream: windows_core::Ref<'_, IMFByteStream>, pwszurl: &windows_core::PCWSTR, dwflags: u32, pprops: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>, ppiunknowncancelcookie: windows_core::OutRef<'_, windows_core::IUnknown>, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndCreateObjectFromByteStream(&self, presult: windows_core::Ref<'_, IMFAsyncResult>, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn CancelObjectCreation(&self, piunknowncancelcookie: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] impl IMFSourceResolver_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateObjectFromURL(this: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceResolver_Impl::CreateObjectFromURL(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pprops), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() + IMFSourceResolver_Impl::CreateObjectFromURL(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() } unsafe extern "system" fn CreateObjectFromByteStream(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceResolver_Impl::CreateObjectFromByteStream(this, windows_core::from_raw_borrowed(&pbytestream), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pprops), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() + IMFSourceResolver_Impl::CreateObjectFromByteStream(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() } unsafe extern "system" fn BeginCreateObjectFromURL(this: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceResolver_Impl::BeginCreateObjectFromURL(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFSourceResolver_Impl::BeginCreateObjectFromURL(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndCreateObjectFromURL(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceResolver_Impl::EndCreateObjectFromURL(this, windows_core::from_raw_borrowed(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() + IMFSourceResolver_Impl::EndCreateObjectFromURL(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() } unsafe extern "system" fn BeginCreateObjectFromByteStream(this: *mut core::ffi::c_void, pbytestream: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwflags: u32, pprops: *mut core::ffi::c_void, ppiunknowncancelcookie: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceResolver_Impl::BeginCreateObjectFromByteStream(this, windows_core::from_raw_borrowed(&pbytestream), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFSourceResolver_Impl::BeginCreateObjectFromByteStream(this, core::mem::transmute_copy(&pbytestream), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pprops), core::mem::transmute_copy(&ppiunknowncancelcookie), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndCreateObjectFromByteStream(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceResolver_Impl::EndCreateObjectFromByteStream(this, windows_core::from_raw_borrowed(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() + IMFSourceResolver_Impl::EndCreateObjectFromByteStream(this, core::mem::transmute_copy(&presult), core::mem::transmute_copy(&pobjecttype), core::mem::transmute_copy(&ppobject)).into() } unsafe extern "system" fn CancelObjectCreation(this: *mut core::ffi::c_void, piunknowncancelcookie: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSourceResolver_Impl::CancelObjectCreation(this, windows_core::from_raw_borrowed(&piunknowncancelcookie)).into() + IMFSourceResolver_Impl::CancelObjectCreation(this, core::mem::transmute_copy(&piunknowncancelcookie)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -32690,7 +32690,7 @@ pub struct IMFSpatialAudioSample_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFSpatialAudioSample_Impl: IMFSample_Impl { fn GetObjectCount(&self) -> windows_core::Result; - fn AddSpatialAudioObject(&self, paudioobjbuffer: Option<&IMFSpatialAudioObjectBuffer>) -> windows_core::Result<()>; + fn AddSpatialAudioObject(&self, paudioobjbuffer: windows_core::Ref<'_, IMFSpatialAudioObjectBuffer>) -> windows_core::Result<()>; fn GetSpatialAudioObjectByIndex(&self, dwindex: u32) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -32708,7 +32708,7 @@ impl IMFSpatialAudioSample_Vtbl { } unsafe extern "system" fn AddSpatialAudioObject(this: *mut core::ffi::c_void, paudioobjbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFSpatialAudioSample_Impl::AddSpatialAudioObject(this, windows_core::from_raw_borrowed(&paudioobjbuffer)).into() + IMFSpatialAudioSample_Impl::AddSpatialAudioObject(this, core::mem::transmute_copy(&paudioobjbuffer)).into() } unsafe extern "system" fn GetSpatialAudioObjectByIndex(this: *mut core::ffi::c_void, dwindex: u32, ppaudioobjbuffer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32850,7 +32850,7 @@ pub trait IMFStreamSink_Impl: IMFMediaEventGenerator_Impl { fn GetMediaSink(&self) -> windows_core::Result; fn GetIdentifier(&self) -> windows_core::Result; fn GetMediaTypeHandler(&self) -> windows_core::Result; - fn ProcessSample(&self, psample: Option<&IMFSample>) -> windows_core::Result<()>; + fn ProcessSample(&self, psample: windows_core::Ref<'_, IMFSample>) -> windows_core::Result<()>; fn PlaceMarker(&self, emarkertype: MFSTREAMSINK_MARKER_TYPE, pvarmarkervalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pvarcontextvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn Flush(&self) -> windows_core::Result<()>; } @@ -32889,7 +32889,7 @@ impl IMFStreamSink_Vtbl { } unsafe extern "system" fn ProcessSample(this: *mut core::ffi::c_void, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFStreamSink_Impl::ProcessSample(this, windows_core::from_raw_borrowed(&psample)).into() + IMFStreamSink_Impl::ProcessSample(this, core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn PlaceMarker(this: *mut core::ffi::c_void, emarkertype: MFSTREAMSINK_MARKER_TYPE, pvarmarkervalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pvarcontextvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33030,21 +33030,21 @@ pub struct IMFTimecodeTranslate_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFTimecodeTranslate_Impl: windows_core::IUnknownImpl { - fn BeginConvertTimecodeToHNS(&self, ppropvartimecode: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndConvertTimecodeToHNS(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; - fn BeginConvertHNSToTimecode(&self, hnstime: i64, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndConvertHNSToTimecode(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; + fn BeginConvertTimecodeToHNS(&self, ppropvartimecode: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndConvertTimecodeToHNS(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; + fn BeginConvertHNSToTimecode(&self, hnstime: i64, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndConvertHNSToTimecode(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMFTimecodeTranslate_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginConvertTimecodeToHNS(this: *mut core::ffi::c_void, ppropvartimecode: *const super::super::System::Com::StructuredStorage::PROPVARIANT, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTimecodeTranslate_Impl::BeginConvertTimecodeToHNS(this, core::mem::transmute_copy(&ppropvartimecode), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFTimecodeTranslate_Impl::BeginConvertTimecodeToHNS(this, core::mem::transmute_copy(&ppropvartimecode), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndConvertTimecodeToHNS(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, phnstime: *mut i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFTimecodeTranslate_Impl::EndConvertTimecodeToHNS(this, windows_core::from_raw_borrowed(&presult)) { + match IMFTimecodeTranslate_Impl::EndConvertTimecodeToHNS(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { phnstime.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -33054,11 +33054,11 @@ impl IMFTimecodeTranslate_Vtbl { } unsafe extern "system" fn BeginConvertHNSToTimecode(this: *mut core::ffi::c_void, hnstime: i64, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTimecodeTranslate_Impl::BeginConvertHNSToTimecode(this, core::mem::transmute_copy(&hnstime), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)).into() + IMFTimecodeTranslate_Impl::BeginConvertHNSToTimecode(this, core::mem::transmute_copy(&hnstime), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)).into() } unsafe extern "system" fn EndConvertHNSToTimecode(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, ppropvartimecode: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFTimecodeTranslate_Impl::EndConvertHNSToTimecode(this, windows_core::from_raw_borrowed(&presult)) { + match IMFTimecodeTranslate_Impl::EndConvertHNSToTimecode(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { ppropvartimecode.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -33173,12 +33173,12 @@ pub struct IMFTimedText_Vtbl { pub IsInBandEnabled: unsafe extern "system" fn(*mut core::ffi::c_void) -> super::super::Foundation::BOOL, } pub trait IMFTimedText_Impl: windows_core::IUnknownImpl { - fn RegisterNotifications(&self, notify: Option<&IMFTimedTextNotify>) -> windows_core::Result<()>; + fn RegisterNotifications(&self, notify: windows_core::Ref<'_, IMFTimedTextNotify>) -> windows_core::Result<()>; fn SelectTrack(&self, trackid: u32, selected: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn AddDataSource(&self, bytestream: Option<&IMFByteStream>, label: &windows_core::PCWSTR, language: &windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: super::super::Foundation::BOOL) -> windows_core::Result; + fn AddDataSource(&self, bytestream: windows_core::Ref<'_, IMFByteStream>, label: &windows_core::PCWSTR, language: &windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: super::super::Foundation::BOOL) -> windows_core::Result; fn AddDataSourceFromUrl(&self, url: &windows_core::PCWSTR, label: &windows_core::PCWSTR, language: &windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: super::super::Foundation::BOOL) -> windows_core::Result; fn AddTrack(&self, label: &windows_core::PCWSTR, language: &windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND) -> windows_core::Result; - fn RemoveTrack(&self, track: Option<&IMFTimedTextTrack>) -> windows_core::Result<()>; + fn RemoveTrack(&self, track: windows_core::Ref<'_, IMFTimedTextTrack>) -> windows_core::Result<()>; fn GetCueTimeOffset(&self) -> windows_core::Result; fn SetCueTimeOffset(&self, offset: f64) -> windows_core::Result<()>; fn GetTracks(&self) -> windows_core::Result; @@ -33192,7 +33192,7 @@ impl IMFTimedText_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterNotifications(this: *mut core::ffi::c_void, notify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTimedText_Impl::RegisterNotifications(this, windows_core::from_raw_borrowed(¬ify)).into() + IMFTimedText_Impl::RegisterNotifications(this, core::mem::transmute_copy(¬ify)).into() } unsafe extern "system" fn SelectTrack(this: *mut core::ffi::c_void, trackid: u32, selected: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33200,7 +33200,7 @@ impl IMFTimedText_Vtbl { } unsafe extern "system" fn AddDataSource(this: *mut core::ffi::c_void, bytestream: *mut core::ffi::c_void, label: windows_core::PCWSTR, language: windows_core::PCWSTR, kind: MF_TIMED_TEXT_TRACK_KIND, isdefault: super::super::Foundation::BOOL, trackid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFTimedText_Impl::AddDataSource(this, windows_core::from_raw_borrowed(&bytestream), core::mem::transmute(&label), core::mem::transmute(&language), core::mem::transmute_copy(&kind), core::mem::transmute_copy(&isdefault)) { + match IMFTimedText_Impl::AddDataSource(this, core::mem::transmute_copy(&bytestream), core::mem::transmute(&label), core::mem::transmute(&language), core::mem::transmute_copy(&kind), core::mem::transmute_copy(&isdefault)) { Ok(ok__) => { trackid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -33230,7 +33230,7 @@ impl IMFTimedText_Vtbl { } unsafe extern "system" fn RemoveTrack(this: *mut core::ffi::c_void, track: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTimedText_Impl::RemoveTrack(this, windows_core::from_raw_borrowed(&track)).into() + IMFTimedText_Impl::RemoveTrack(this, core::mem::transmute_copy(&track)).into() } unsafe extern "system" fn GetCueTimeOffset(this: *mut core::ffi::c_void, offset: *mut f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33636,9 +33636,9 @@ pub trait IMFTimedTextCueList_Impl: windows_core::IUnknownImpl { fn GetCueByIndex(&self, index: u32) -> windows_core::Result; fn GetCueById(&self, id: u32) -> windows_core::Result; fn GetCueByOriginalId(&self, originalid: &windows_core::PCWSTR) -> windows_core::Result; - fn AddTextCue(&self, start: f64, duration: f64, text: &windows_core::PCWSTR, cue: *mut Option) -> windows_core::Result<()>; - fn AddDataCue(&self, start: f64, duration: f64, data: *const u8, datasize: u32, cue: *mut Option) -> windows_core::Result<()>; - fn RemoveCue(&self, cue: Option<&IMFTimedTextCue>) -> windows_core::Result<()>; + fn AddTextCue(&self, start: f64, duration: f64, text: &windows_core::PCWSTR, cue: windows_core::OutRef<'_, IMFTimedTextCue>) -> windows_core::Result<()>; + fn AddDataCue(&self, start: f64, duration: f64, data: *const u8, datasize: u32, cue: windows_core::OutRef<'_, IMFTimedTextCue>) -> windows_core::Result<()>; + fn RemoveCue(&self, cue: windows_core::Ref<'_, IMFTimedTextCue>) -> windows_core::Result<()>; } impl IMFTimedTextCueList_Vtbl { pub const fn new() -> Self { @@ -33686,7 +33686,7 @@ impl IMFTimedTextCueList_Vtbl { } unsafe extern "system" fn RemoveCue(this: *mut core::ffi::c_void, cue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTimedTextCueList_Impl::RemoveCue(this, windows_core::from_raw_borrowed(&cue)).into() + IMFTimedTextCueList_Impl::RemoveCue(this, core::mem::transmute_copy(&cue)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -33728,7 +33728,7 @@ pub struct IMFTimedTextFormattedText_Vtbl { pub trait IMFTimedTextFormattedText_Impl: windows_core::IUnknownImpl { fn GetText(&self) -> windows_core::Result; fn GetSubformattingCount(&self) -> u32; - fn GetSubformatting(&self, index: u32, firstchar: *mut u32, charlength: *mut u32, style: *mut Option) -> windows_core::Result<()>; + fn GetSubformatting(&self, index: u32, firstchar: *mut u32, charlength: *mut u32, style: windows_core::OutRef<'_, IMFTimedTextStyle>) -> windows_core::Result<()>; } impl IMFTimedTextFormattedText_Vtbl { pub const fn new() -> Self { @@ -33807,7 +33807,7 @@ pub trait IMFTimedTextNotify_Impl: windows_core::IUnknownImpl { fn TrackSelected(&self, trackid: u32, selected: super::super::Foundation::BOOL); fn TrackReadyStateChanged(&self, trackid: u32); fn Error(&self, errorcode: MF_TIMED_TEXT_ERROR_CODE, extendederrorcode: windows_core::HRESULT, sourcetrackid: u32); - fn Cue(&self, cueevent: MF_TIMED_TEXT_CUE_EVENT, currenttime: f64, cue: Option<&IMFTimedTextCue>); + fn Cue(&self, cueevent: MF_TIMED_TEXT_CUE_EVENT, currenttime: f64, cue: windows_core::Ref<'_, IMFTimedTextCue>); fn Reset(&self); } impl IMFTimedTextNotify_Vtbl { @@ -33834,7 +33834,7 @@ impl IMFTimedTextNotify_Vtbl { } unsafe extern "system" fn Cue(this: *mut core::ffi::c_void, cueevent: MF_TIMED_TEXT_CUE_EVENT, currenttime: f64, cue: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTimedTextNotify_Impl::Cue(this, core::mem::transmute_copy(&cueevent), core::mem::transmute_copy(¤ttime), windows_core::from_raw_borrowed(&cue)) + IMFTimedTextNotify_Impl::Cue(this, core::mem::transmute_copy(&cueevent), core::mem::transmute_copy(¤ttime), core::mem::transmute_copy(&cue)) } unsafe extern "system" fn Reset(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -34731,14 +34731,14 @@ pub struct IMFTimer_Vtbl { pub CancelTimer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFTimer_Impl: windows_core::IUnknownImpl { - fn SetTimer(&self, dwflags: u32, llclocktime: i64, pcallback: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn CancelTimer(&self, punkkey: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetTimer(&self, dwflags: u32, llclocktime: i64, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn CancelTimer(&self, punkkey: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IMFTimer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetTimer(this: *mut core::ffi::c_void, dwflags: u32, llclocktime: i64, pcallback: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void, ppunkkey: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFTimer_Impl::SetTimer(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&llclocktime), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&punkstate)) { + match IMFTimer_Impl::SetTimer(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&llclocktime), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&punkstate)) { Ok(ok__) => { ppunkkey.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -34748,7 +34748,7 @@ impl IMFTimer_Vtbl { } unsafe extern "system" fn CancelTimer(this: *mut core::ffi::c_void, punkkey: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTimer_Impl::CancelTimer(this, windows_core::from_raw_borrowed(&punkkey)).into() + IMFTimer_Impl::CancelTimer(this, core::mem::transmute_copy(&punkkey)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -34778,13 +34778,13 @@ pub struct IMFTopoLoader_Vtbl { pub Load: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFTopoLoader_Impl: windows_core::IUnknownImpl { - fn Load(&self, pinputtopo: Option<&IMFTopology>, ppoutputtopo: *mut Option, pcurrenttopo: Option<&IMFTopology>) -> windows_core::Result<()>; + fn Load(&self, pinputtopo: windows_core::Ref<'_, IMFTopology>, ppoutputtopo: windows_core::OutRef<'_, IMFTopology>, pcurrenttopo: windows_core::Ref<'_, IMFTopology>) -> windows_core::Result<()>; } impl IMFTopoLoader_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Load(this: *mut core::ffi::c_void, pinputtopo: *mut core::ffi::c_void, ppoutputtopo: *mut *mut core::ffi::c_void, pcurrenttopo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopoLoader_Impl::Load(this, windows_core::from_raw_borrowed(&pinputtopo), core::mem::transmute_copy(&ppoutputtopo), windows_core::from_raw_borrowed(&pcurrenttopo)).into() + IMFTopoLoader_Impl::Load(this, core::mem::transmute_copy(&pinputtopo), core::mem::transmute_copy(&ppoutputtopo), core::mem::transmute_copy(&pcurrenttopo)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Load: Load:: } } @@ -34865,12 +34865,12 @@ pub struct IMFTopology_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFTopology_Impl: IMFAttributes_Impl { fn GetTopologyID(&self) -> windows_core::Result; - fn AddNode(&self, pnode: Option<&IMFTopologyNode>) -> windows_core::Result<()>; - fn RemoveNode(&self, pnode: Option<&IMFTopologyNode>) -> windows_core::Result<()>; + fn AddNode(&self, pnode: windows_core::Ref<'_, IMFTopologyNode>) -> windows_core::Result<()>; + fn RemoveNode(&self, pnode: windows_core::Ref<'_, IMFTopologyNode>) -> windows_core::Result<()>; fn GetNodeCount(&self) -> windows_core::Result; fn GetNode(&self, windex: u16) -> windows_core::Result; fn Clear(&self) -> windows_core::Result<()>; - fn CloneFrom(&self, ptopology: Option<&IMFTopology>) -> windows_core::Result<()>; + fn CloneFrom(&self, ptopology: windows_core::Ref<'_, IMFTopology>) -> windows_core::Result<()>; fn GetNodeByID(&self, qwtoponodeid: u64) -> windows_core::Result; fn GetSourceNodeCollection(&self) -> windows_core::Result; fn GetOutputNodeCollection(&self) -> windows_core::Result; @@ -34890,11 +34890,11 @@ impl IMFTopology_Vtbl { } unsafe extern "system" fn AddNode(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopology_Impl::AddNode(this, windows_core::from_raw_borrowed(&pnode)).into() + IMFTopology_Impl::AddNode(this, core::mem::transmute_copy(&pnode)).into() } unsafe extern "system" fn RemoveNode(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopology_Impl::RemoveNode(this, windows_core::from_raw_borrowed(&pnode)).into() + IMFTopology_Impl::RemoveNode(this, core::mem::transmute_copy(&pnode)).into() } unsafe extern "system" fn GetNodeCount(this: *mut core::ffi::c_void, pwnodes: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -34922,7 +34922,7 @@ impl IMFTopology_Vtbl { } unsafe extern "system" fn CloneFrom(this: *mut core::ffi::c_void, ptopology: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopology_Impl::CloneFrom(this, windows_core::from_raw_borrowed(&ptopology)).into() + IMFTopology_Impl::CloneFrom(this, core::mem::transmute_copy(&ptopology)).into() } unsafe extern "system" fn GetNodeByID(this: *mut core::ffi::c_void, qwtoponodeid: u64, ppnode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35076,29 +35076,29 @@ pub struct IMFTopologyNode_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IMFTopologyNode_Impl: IMFAttributes_Impl { - fn SetObject(&self, pobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetObject(&self, pobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetObject(&self) -> windows_core::Result; fn GetNodeType(&self) -> windows_core::Result; fn GetTopoNodeID(&self) -> windows_core::Result; fn SetTopoNodeID(&self, ulltopoid: u64) -> windows_core::Result<()>; fn GetInputCount(&self) -> windows_core::Result; fn GetOutputCount(&self) -> windows_core::Result; - fn ConnectOutput(&self, dwoutputindex: u32, pdownstreamnode: Option<&IMFTopologyNode>, dwinputindexondownstreamnode: u32) -> windows_core::Result<()>; + fn ConnectOutput(&self, dwoutputindex: u32, pdownstreamnode: windows_core::Ref<'_, IMFTopologyNode>, dwinputindexondownstreamnode: u32) -> windows_core::Result<()>; fn DisconnectOutput(&self, dwoutputindex: u32) -> windows_core::Result<()>; - fn GetInput(&self, dwinputindex: u32, ppupstreamnode: *mut Option, pdwoutputindexonupstreamnode: *mut u32) -> windows_core::Result<()>; - fn GetOutput(&self, dwoutputindex: u32, ppdownstreamnode: *mut Option, pdwinputindexondownstreamnode: *mut u32) -> windows_core::Result<()>; - fn SetOutputPrefType(&self, dwoutputindex: u32, ptype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn GetInput(&self, dwinputindex: u32, ppupstreamnode: windows_core::OutRef<'_, IMFTopologyNode>, pdwoutputindexonupstreamnode: *mut u32) -> windows_core::Result<()>; + fn GetOutput(&self, dwoutputindex: u32, ppdownstreamnode: windows_core::OutRef<'_, IMFTopologyNode>, pdwinputindexondownstreamnode: *mut u32) -> windows_core::Result<()>; + fn SetOutputPrefType(&self, dwoutputindex: u32, ptype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; fn GetOutputPrefType(&self, dwoutputindex: u32) -> windows_core::Result; - fn SetInputPrefType(&self, dwinputindex: u32, ptype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn SetInputPrefType(&self, dwinputindex: u32, ptype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; fn GetInputPrefType(&self, dwinputindex: u32) -> windows_core::Result; - fn CloneFrom(&self, pnode: Option<&IMFTopologyNode>) -> windows_core::Result<()>; + fn CloneFrom(&self, pnode: windows_core::Ref<'_, IMFTopologyNode>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IMFTopologyNode_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetObject(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopologyNode_Impl::SetObject(this, windows_core::from_raw_borrowed(&pobject)).into() + IMFTopologyNode_Impl::SetObject(this, core::mem::transmute_copy(&pobject)).into() } unsafe extern "system" fn GetObject(this: *mut core::ffi::c_void, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35156,7 +35156,7 @@ impl IMFTopologyNode_Vtbl { } unsafe extern "system" fn ConnectOutput(this: *mut core::ffi::c_void, dwoutputindex: u32, pdownstreamnode: *mut core::ffi::c_void, dwinputindexondownstreamnode: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopologyNode_Impl::ConnectOutput(this, core::mem::transmute_copy(&dwoutputindex), windows_core::from_raw_borrowed(&pdownstreamnode), core::mem::transmute_copy(&dwinputindexondownstreamnode)).into() + IMFTopologyNode_Impl::ConnectOutput(this, core::mem::transmute_copy(&dwoutputindex), core::mem::transmute_copy(&pdownstreamnode), core::mem::transmute_copy(&dwinputindexondownstreamnode)).into() } unsafe extern "system" fn DisconnectOutput(this: *mut core::ffi::c_void, dwoutputindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35172,7 +35172,7 @@ impl IMFTopologyNode_Vtbl { } unsafe extern "system" fn SetOutputPrefType(this: *mut core::ffi::c_void, dwoutputindex: u32, ptype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopologyNode_Impl::SetOutputPrefType(this, core::mem::transmute_copy(&dwoutputindex), windows_core::from_raw_borrowed(&ptype)).into() + IMFTopologyNode_Impl::SetOutputPrefType(this, core::mem::transmute_copy(&dwoutputindex), core::mem::transmute_copy(&ptype)).into() } unsafe extern "system" fn GetOutputPrefType(this: *mut core::ffi::c_void, dwoutputindex: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35186,7 +35186,7 @@ impl IMFTopologyNode_Vtbl { } unsafe extern "system" fn SetInputPrefType(this: *mut core::ffi::c_void, dwinputindex: u32, ptype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopologyNode_Impl::SetInputPrefType(this, core::mem::transmute_copy(&dwinputindex), windows_core::from_raw_borrowed(&ptype)).into() + IMFTopologyNode_Impl::SetInputPrefType(this, core::mem::transmute_copy(&dwinputindex), core::mem::transmute_copy(&ptype)).into() } unsafe extern "system" fn GetInputPrefType(this: *mut core::ffi::c_void, dwinputindex: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35200,7 +35200,7 @@ impl IMFTopologyNode_Vtbl { } unsafe extern "system" fn CloneFrom(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopologyNode_Impl::CloneFrom(this, windows_core::from_raw_borrowed(&pnode)).into() + IMFTopologyNode_Impl::CloneFrom(this, core::mem::transmute_copy(&pnode)).into() } Self { base__: IMFAttributes_Vtbl::new::(), @@ -35304,14 +35304,14 @@ pub struct IMFTopologyServiceLookupClient_Vtbl { pub ReleaseServicePointers: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFTopologyServiceLookupClient_Impl: windows_core::IUnknownImpl { - fn InitServicePointers(&self, plookup: Option<&IMFTopologyServiceLookup>) -> windows_core::Result<()>; + fn InitServicePointers(&self, plookup: windows_core::Ref<'_, IMFTopologyServiceLookup>) -> windows_core::Result<()>; fn ReleaseServicePointers(&self) -> windows_core::Result<()>; } impl IMFTopologyServiceLookupClient_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitServicePointers(this: *mut core::ffi::c_void, plookup: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTopologyServiceLookupClient_Impl::InitServicePointers(this, windows_core::from_raw_borrowed(&plookup)).into() + IMFTopologyServiceLookupClient_Impl::InitServicePointers(this, core::mem::transmute_copy(&plookup)).into() } unsafe extern "system" fn ReleaseServicePointers(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35345,13 +35345,13 @@ pub struct IMFTrackedSample_Vtbl { pub SetAllocator: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFTrackedSample_Impl: windows_core::IUnknownImpl { - fn SetAllocator(&self, psampleallocator: Option<&IMFAsyncCallback>, punkstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetAllocator(&self, psampleallocator: windows_core::Ref<'_, IMFAsyncCallback>, punkstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IMFTrackedSample_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetAllocator(this: *mut core::ffi::c_void, psampleallocator: *mut core::ffi::c_void, punkstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTrackedSample_Impl::SetAllocator(this, windows_core::from_raw_borrowed(&psampleallocator), windows_core::from_raw_borrowed(&punkstate)).into() + IMFTrackedSample_Impl::SetAllocator(this, core::mem::transmute_copy(&psampleallocator), core::mem::transmute_copy(&punkstate)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetAllocator: SetAllocator:: } } @@ -35405,18 +35405,18 @@ pub struct IMFTranscodeProfile_Vtbl { pub GetContainerAttributes: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFTranscodeProfile_Impl: windows_core::IUnknownImpl { - fn SetAudioAttributes(&self, pattrs: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn SetAudioAttributes(&self, pattrs: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; fn GetAudioAttributes(&self) -> windows_core::Result; - fn SetVideoAttributes(&self, pattrs: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn SetVideoAttributes(&self, pattrs: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; fn GetVideoAttributes(&self) -> windows_core::Result; - fn SetContainerAttributes(&self, pattrs: Option<&IMFAttributes>) -> windows_core::Result<()>; + fn SetContainerAttributes(&self, pattrs: windows_core::Ref<'_, IMFAttributes>) -> windows_core::Result<()>; fn GetContainerAttributes(&self) -> windows_core::Result; } impl IMFTranscodeProfile_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetAudioAttributes(this: *mut core::ffi::c_void, pattrs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTranscodeProfile_Impl::SetAudioAttributes(this, windows_core::from_raw_borrowed(&pattrs)).into() + IMFTranscodeProfile_Impl::SetAudioAttributes(this, core::mem::transmute_copy(&pattrs)).into() } unsafe extern "system" fn GetAudioAttributes(this: *mut core::ffi::c_void, ppattrs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35430,7 +35430,7 @@ impl IMFTranscodeProfile_Vtbl { } unsafe extern "system" fn SetVideoAttributes(this: *mut core::ffi::c_void, pattrs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTranscodeProfile_Impl::SetVideoAttributes(this, windows_core::from_raw_borrowed(&pattrs)).into() + IMFTranscodeProfile_Impl::SetVideoAttributes(this, core::mem::transmute_copy(&pattrs)).into() } unsafe extern "system" fn GetVideoAttributes(this: *mut core::ffi::c_void, ppattrs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35444,7 +35444,7 @@ impl IMFTranscodeProfile_Vtbl { } unsafe extern "system" fn SetContainerAttributes(this: *mut core::ffi::c_void, pattrs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTranscodeProfile_Impl::SetContainerAttributes(this, windows_core::from_raw_borrowed(&pattrs)).into() + IMFTranscodeProfile_Impl::SetContainerAttributes(this, core::mem::transmute_copy(&pattrs)).into() } unsafe extern "system" fn GetContainerAttributes(this: *mut core::ffi::c_void, ppattrs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35507,8 +35507,8 @@ pub struct IMFTranscodeSinkInfoProvider_Vtbl { } pub trait IMFTranscodeSinkInfoProvider_Impl: windows_core::IUnknownImpl { fn SetOutputFile(&self, pwszfilename: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetOutputByteStream(&self, pbytestreamactivate: Option<&IMFActivate>) -> windows_core::Result<()>; - fn SetProfile(&self, pprofile: Option<&IMFTranscodeProfile>) -> windows_core::Result<()>; + fn SetOutputByteStream(&self, pbytestreamactivate: windows_core::Ref<'_, IMFActivate>) -> windows_core::Result<()>; + fn SetProfile(&self, pprofile: windows_core::Ref<'_, IMFTranscodeProfile>) -> windows_core::Result<()>; fn GetSinkInfo(&self) -> windows_core::Result; } impl IMFTranscodeSinkInfoProvider_Vtbl { @@ -35519,11 +35519,11 @@ impl IMFTranscodeSinkInfoProvider_Vtbl { } unsafe extern "system" fn SetOutputByteStream(this: *mut core::ffi::c_void, pbytestreamactivate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTranscodeSinkInfoProvider_Impl::SetOutputByteStream(this, windows_core::from_raw_borrowed(&pbytestreamactivate)).into() + IMFTranscodeSinkInfoProvider_Impl::SetOutputByteStream(this, core::mem::transmute_copy(&pbytestreamactivate)).into() } unsafe extern "system" fn SetProfile(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTranscodeSinkInfoProvider_Impl::SetProfile(this, windows_core::from_raw_borrowed(&pprofile)).into() + IMFTranscodeSinkInfoProvider_Impl::SetProfile(this, core::mem::transmute_copy(&pprofile)).into() } unsafe extern "system" fn GetSinkInfo(this: *mut core::ffi::c_void, psinkinfo: *mut MF_TRANSCODE_SINK_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35683,16 +35683,16 @@ pub trait IMFTransform_Impl: windows_core::IUnknownImpl { fn AddInputStreams(&self, cstreams: u32, adwstreamids: *const u32) -> windows_core::Result<()>; fn GetInputAvailableType(&self, dwinputstreamid: u32, dwtypeindex: u32) -> windows_core::Result; fn GetOutputAvailableType(&self, dwoutputstreamid: u32, dwtypeindex: u32) -> windows_core::Result; - fn SetInputType(&self, dwinputstreamid: u32, ptype: Option<&IMFMediaType>, dwflags: u32) -> windows_core::Result<()>; - fn SetOutputType(&self, dwoutputstreamid: u32, ptype: Option<&IMFMediaType>, dwflags: u32) -> windows_core::Result<()>; + fn SetInputType(&self, dwinputstreamid: u32, ptype: windows_core::Ref<'_, IMFMediaType>, dwflags: u32) -> windows_core::Result<()>; + fn SetOutputType(&self, dwoutputstreamid: u32, ptype: windows_core::Ref<'_, IMFMediaType>, dwflags: u32) -> windows_core::Result<()>; fn GetInputCurrentType(&self, dwinputstreamid: u32) -> windows_core::Result; fn GetOutputCurrentType(&self, dwoutputstreamid: u32) -> windows_core::Result; fn GetInputStatus(&self, dwinputstreamid: u32) -> windows_core::Result; fn GetOutputStatus(&self) -> windows_core::Result; fn SetOutputBounds(&self, hnslowerbound: i64, hnsupperbound: i64) -> windows_core::Result<()>; - fn ProcessEvent(&self, dwinputstreamid: u32, pevent: Option<&IMFMediaEvent>) -> windows_core::Result<()>; + fn ProcessEvent(&self, dwinputstreamid: u32, pevent: windows_core::Ref<'_, IMFMediaEvent>) -> windows_core::Result<()>; fn ProcessMessage(&self, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::Result<()>; - fn ProcessInput(&self, dwinputstreamid: u32, psample: Option<&IMFSample>, dwflags: u32) -> windows_core::Result<()>; + fn ProcessInput(&self, dwinputstreamid: u32, psample: windows_core::Ref<'_, IMFSample>, dwflags: u32) -> windows_core::Result<()>; fn ProcessOutput(&self, dwflags: u32, coutputbuffercount: u32, poutputsamples: *mut MFT_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::Result<()>; } impl IMFTransform_Vtbl { @@ -35783,11 +35783,11 @@ impl IMFTransform_Vtbl { } unsafe extern "system" fn SetInputType(this: *mut core::ffi::c_void, dwinputstreamid: u32, ptype: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTransform_Impl::SetInputType(this, core::mem::transmute_copy(&dwinputstreamid), windows_core::from_raw_borrowed(&ptype), core::mem::transmute_copy(&dwflags)).into() + IMFTransform_Impl::SetInputType(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn SetOutputType(this: *mut core::ffi::c_void, dwoutputstreamid: u32, ptype: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTransform_Impl::SetOutputType(this, core::mem::transmute_copy(&dwoutputstreamid), windows_core::from_raw_borrowed(&ptype), core::mem::transmute_copy(&dwflags)).into() + IMFTransform_Impl::SetOutputType(this, core::mem::transmute_copy(&dwoutputstreamid), core::mem::transmute_copy(&ptype), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn GetInputCurrentType(this: *mut core::ffi::c_void, dwinputstreamid: u32, pptype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35835,7 +35835,7 @@ impl IMFTransform_Vtbl { } unsafe extern "system" fn ProcessEvent(this: *mut core::ffi::c_void, dwinputstreamid: u32, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTransform_Impl::ProcessEvent(this, core::mem::transmute_copy(&dwinputstreamid), windows_core::from_raw_borrowed(&pevent)).into() + IMFTransform_Impl::ProcessEvent(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&pevent)).into() } unsafe extern "system" fn ProcessMessage(this: *mut core::ffi::c_void, emessage: MFT_MESSAGE_TYPE, ulparam: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35843,7 +35843,7 @@ impl IMFTransform_Vtbl { } unsafe extern "system" fn ProcessInput(this: *mut core::ffi::c_void, dwinputstreamid: u32, psample: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFTransform_Impl::ProcessInput(this, core::mem::transmute_copy(&dwinputstreamid), windows_core::from_raw_borrowed(&psample), core::mem::transmute_copy(&dwflags)).into() + IMFTransform_Impl::ProcessInput(this, core::mem::transmute_copy(&dwinputstreamid), core::mem::transmute_copy(&psample), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn ProcessOutput(this: *mut core::ffi::c_void, dwflags: u32, coutputbuffercount: u32, poutputsamples: *mut MFT_OUTPUT_DATA_BUFFER, pdwstatus: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -36011,13 +36011,13 @@ pub struct IMFVideoCaptureSampleAllocator_Vtbl { pub InitializeCaptureSampleAllocator: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, u32, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFVideoCaptureSampleAllocator_Impl: IMFVideoSampleAllocator_Impl { - fn InitializeCaptureSampleAllocator(&self, cbsamplesize: u32, cbcapturemetadatasize: u32, cbalignment: u32, cminimumsamples: u32, pattributes: Option<&IMFAttributes>, pmediatype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn InitializeCaptureSampleAllocator(&self, cbsamplesize: u32, cbcapturemetadatasize: u32, cbalignment: u32, cminimumsamples: u32, pattributes: windows_core::Ref<'_, IMFAttributes>, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; } impl IMFVideoCaptureSampleAllocator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeCaptureSampleAllocator(this: *mut core::ffi::c_void, cbsamplesize: u32, cbcapturemetadatasize: u32, cbalignment: u32, cminimumsamples: u32, pattributes: *mut core::ffi::c_void, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVideoCaptureSampleAllocator_Impl::InitializeCaptureSampleAllocator(this, core::mem::transmute_copy(&cbsamplesize), core::mem::transmute_copy(&cbcapturemetadatasize), core::mem::transmute_copy(&cbalignment), core::mem::transmute_copy(&cminimumsamples), windows_core::from_raw_borrowed(&pattributes), windows_core::from_raw_borrowed(&pmediatype)).into() + IMFVideoCaptureSampleAllocator_Impl::InitializeCaptureSampleAllocator(this, core::mem::transmute_copy(&cbsamplesize), core::mem::transmute_copy(&cbcapturemetadatasize), core::mem::transmute_copy(&cbalignment), core::mem::transmute_copy(&cminimumsamples), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&pmediatype)).into() } Self { base__: IMFVideoSampleAllocator_Vtbl::new::(), @@ -36992,7 +36992,7 @@ pub trait IMFVideoProcessorControl3_Impl: IMFVideoProcessorControl2_Impl { fn GetNaturalOutputType(&self) -> windows_core::Result; fn EnableSphericalVideoProcessing(&self, fenable: super::super::Foundation::BOOL, eformat: MFVideoSphericalFormat, eprojectionmode: MFVideoSphericalProjectionMode) -> windows_core::Result<()>; fn SetSphericalVideoProperties(&self, x: f32, y: f32, z: f32, w: f32, fieldofview: f32) -> windows_core::Result<()>; - fn SetOutputDevice(&self, poutputdevice: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetOutputDevice(&self, poutputdevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IMFVideoProcessorControl3_Vtbl { pub const fn new() -> Self { @@ -37016,7 +37016,7 @@ impl IMFVideoProcessorControl3_Vtbl { } unsafe extern "system" fn SetOutputDevice(this: *mut core::ffi::c_void, poutputdevice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVideoProcessorControl3_Impl::SetOutputDevice(this, windows_core::from_raw_borrowed(&poutputdevice)).into() + IMFVideoProcessorControl3_Impl::SetOutputDevice(this, core::mem::transmute_copy(&poutputdevice)).into() } Self { base__: IMFVideoProcessorControl2_Vtbl::new::(), @@ -37048,13 +37048,13 @@ pub struct IMFVideoRenderer_Vtbl { pub InitializeRenderer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFVideoRenderer_Impl: windows_core::IUnknownImpl { - fn InitializeRenderer(&self, pvideomixer: Option<&IMFTransform>, pvideopresenter: Option<&IMFVideoPresenter>) -> windows_core::Result<()>; + fn InitializeRenderer(&self, pvideomixer: windows_core::Ref<'_, IMFTransform>, pvideopresenter: windows_core::Ref<'_, IMFVideoPresenter>) -> windows_core::Result<()>; } impl IMFVideoRenderer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeRenderer(this: *mut core::ffi::c_void, pvideomixer: *mut core::ffi::c_void, pvideopresenter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVideoRenderer_Impl::InitializeRenderer(this, windows_core::from_raw_borrowed(&pvideomixer), windows_core::from_raw_borrowed(&pvideopresenter)).into() + IMFVideoRenderer_Impl::InitializeRenderer(this, core::mem::transmute_copy(&pvideomixer), core::mem::transmute_copy(&pvideopresenter)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), InitializeRenderer: InitializeRenderer:: } } @@ -37079,13 +37079,13 @@ pub struct IMFVideoRendererEffectControl_Vtbl { pub OnAppServiceConnectionEstablished: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFVideoRendererEffectControl_Impl: windows_core::IUnknownImpl { - fn OnAppServiceConnectionEstablished(&self, pappserviceconnection: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnAppServiceConnectionEstablished(&self, pappserviceconnection: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IMFVideoRendererEffectControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnAppServiceConnectionEstablished(this: *mut core::ffi::c_void, pappserviceconnection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVideoRendererEffectControl_Impl::OnAppServiceConnectionEstablished(this, windows_core::from_raw_borrowed(&pappserviceconnection)).into() + IMFVideoRendererEffectControl_Impl::OnAppServiceConnectionEstablished(this, core::mem::transmute_copy(&pappserviceconnection)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -37129,16 +37129,16 @@ pub struct IMFVideoSampleAllocator_Vtbl { pub AllocateSample: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFVideoSampleAllocator_Impl: windows_core::IUnknownImpl { - fn SetDirectXManager(&self, pmanager: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetDirectXManager(&self, pmanager: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn UninitializeSampleAllocator(&self) -> windows_core::Result<()>; - fn InitializeSampleAllocator(&self, crequestedframes: u32, pmediatype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn InitializeSampleAllocator(&self, crequestedframes: u32, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; fn AllocateSample(&self) -> windows_core::Result; } impl IMFVideoSampleAllocator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDirectXManager(this: *mut core::ffi::c_void, pmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVideoSampleAllocator_Impl::SetDirectXManager(this, windows_core::from_raw_borrowed(&pmanager)).into() + IMFVideoSampleAllocator_Impl::SetDirectXManager(this, core::mem::transmute_copy(&pmanager)).into() } unsafe extern "system" fn UninitializeSampleAllocator(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -37146,7 +37146,7 @@ impl IMFVideoSampleAllocator_Vtbl { } unsafe extern "system" fn InitializeSampleAllocator(this: *mut core::ffi::c_void, crequestedframes: u32, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVideoSampleAllocator_Impl::InitializeSampleAllocator(this, core::mem::transmute_copy(&crequestedframes), windows_core::from_raw_borrowed(&pmediatype)).into() + IMFVideoSampleAllocator_Impl::InitializeSampleAllocator(this, core::mem::transmute_copy(&crequestedframes), core::mem::transmute_copy(&pmediatype)).into() } unsafe extern "system" fn AllocateSample(this: *mut core::ffi::c_void, ppsample: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -37192,14 +37192,14 @@ pub struct IMFVideoSampleAllocatorCallback_Vtbl { pub GetFreeSampleCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT, } pub trait IMFVideoSampleAllocatorCallback_Impl: windows_core::IUnknownImpl { - fn SetCallback(&self, pnotify: Option<&IMFVideoSampleAllocatorNotify>) -> windows_core::Result<()>; + fn SetCallback(&self, pnotify: windows_core::Ref<'_, IMFVideoSampleAllocatorNotify>) -> windows_core::Result<()>; fn GetFreeSampleCount(&self) -> windows_core::Result; } impl IMFVideoSampleAllocatorCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetCallback(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVideoSampleAllocatorCallback_Impl::SetCallback(this, windows_core::from_raw_borrowed(&pnotify)).into() + IMFVideoSampleAllocatorCallback_Impl::SetCallback(this, core::mem::transmute_copy(&pnotify)).into() } unsafe extern "system" fn GetFreeSampleCount(this: *mut core::ffi::c_void, plsamples: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -37245,13 +37245,13 @@ pub struct IMFVideoSampleAllocatorEx_Vtbl { pub InitializeSampleAllocatorEx: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFVideoSampleAllocatorEx_Impl: IMFVideoSampleAllocator_Impl { - fn InitializeSampleAllocatorEx(&self, cinitialsamples: u32, cmaximumsamples: u32, pattributes: Option<&IMFAttributes>, pmediatype: Option<&IMFMediaType>) -> windows_core::Result<()>; + fn InitializeSampleAllocatorEx(&self, cinitialsamples: u32, cmaximumsamples: u32, pattributes: windows_core::Ref<'_, IMFAttributes>, pmediatype: windows_core::Ref<'_, IMFMediaType>) -> windows_core::Result<()>; } impl IMFVideoSampleAllocatorEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeSampleAllocatorEx(this: *mut core::ffi::c_void, cinitialsamples: u32, cmaximumsamples: u32, pattributes: *mut core::ffi::c_void, pmediatype: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVideoSampleAllocatorEx_Impl::InitializeSampleAllocatorEx(this, core::mem::transmute_copy(&cinitialsamples), core::mem::transmute_copy(&cmaximumsamples), windows_core::from_raw_borrowed(&pattributes), windows_core::from_raw_borrowed(&pmediatype)).into() + IMFVideoSampleAllocatorEx_Impl::InitializeSampleAllocatorEx(this, core::mem::transmute_copy(&cinitialsamples), core::mem::transmute_copy(&cmaximumsamples), core::mem::transmute_copy(&pattributes), core::mem::transmute_copy(&pmediatype)).into() } Self { base__: IMFVideoSampleAllocator_Vtbl::new::(), InitializeSampleAllocatorEx: InitializeSampleAllocatorEx:: } } @@ -37310,13 +37310,13 @@ pub struct IMFVideoSampleAllocatorNotifyEx_Vtbl { pub NotifyPrune: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMFVideoSampleAllocatorNotifyEx_Impl: IMFVideoSampleAllocatorNotify_Impl { - fn NotifyPrune(&self, __midl__imfvideosampleallocatornotifyex0000: Option<&IMFSample>) -> windows_core::Result<()>; + fn NotifyPrune(&self, __midl__imfvideosampleallocatornotifyex0000: windows_core::Ref<'_, IMFSample>) -> windows_core::Result<()>; } impl IMFVideoSampleAllocatorNotifyEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn NotifyPrune(this: *mut core::ffi::c_void, __midl__imfvideosampleallocatornotifyex0000: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVideoSampleAllocatorNotifyEx_Impl::NotifyPrune(this, windows_core::from_raw_borrowed(&__midl__imfvideosampleallocatornotifyex0000)).into() + IMFVideoSampleAllocatorNotifyEx_Impl::NotifyPrune(this, core::mem::transmute_copy(&__midl__imfvideosampleallocatornotifyex0000)).into() } Self { base__: IMFVideoSampleAllocatorNotify_Vtbl::new::(), NotifyPrune: NotifyPrune:: } } @@ -37405,7 +37405,7 @@ pub trait IMFVirtualCamera_Impl: IMFAttributes_Impl { fn AddDeviceSourceInfo(&self, devicesourceinfo: &windows_core::PCWSTR) -> windows_core::Result<()>; fn AddProperty(&self, pkey: *const super::super::Foundation::DEVPROPKEY, r#type: super::super::Devices::Properties::DEVPROPTYPE, pbdata: *const u8, cbdata: u32) -> windows_core::Result<()>; fn AddRegistryEntry(&self, entryname: &windows_core::PCWSTR, subkeypath: &windows_core::PCWSTR, dwregtype: u32, pbdata: *const u8, cbdata: u32) -> windows_core::Result<()>; - fn Start(&self, pcallback: Option<&IMFAsyncCallback>) -> windows_core::Result<()>; + fn Start(&self, pcallback: windows_core::Ref<'_, IMFAsyncCallback>) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; fn Remove(&self) -> windows_core::Result<()>; fn GetMediaSource(&self) -> windows_core::Result; @@ -37431,7 +37431,7 @@ impl IMFVirtualCamera_Vtbl { } unsafe extern "system" fn Start(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFVirtualCamera_Impl::Start(this, windows_core::from_raw_borrowed(&pcallback)).into() + IMFVirtualCamera_Impl::Start(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn Stop(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -37589,16 +37589,16 @@ pub struct IMFWorkQueueServices_Vtbl { pub GetPlatformWorkQueueMMCSSTaskId: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut u32) -> windows_core::HRESULT, } pub trait IMFWorkQueueServices_Impl: windows_core::IUnknownImpl { - fn BeginRegisterTopologyWorkQueuesWithMMCSS(&self, pcallback: Option<&IMFAsyncCallback>, pstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndRegisterTopologyWorkQueuesWithMMCSS(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; - fn BeginUnregisterTopologyWorkQueuesWithMMCSS(&self, pcallback: Option<&IMFAsyncCallback>, pstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndUnregisterTopologyWorkQueuesWithMMCSS(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; + fn BeginRegisterTopologyWorkQueuesWithMMCSS(&self, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, pstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndRegisterTopologyWorkQueuesWithMMCSS(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; + fn BeginUnregisterTopologyWorkQueuesWithMMCSS(&self, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, pstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndUnregisterTopologyWorkQueuesWithMMCSS(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; fn GetTopologyWorkQueueMMCSSClass(&self, dwtopologyworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::Result<()>; fn GetTopologyWorkQueueMMCSSTaskId(&self, dwtopologyworkqueueid: u32) -> windows_core::Result; - fn BeginRegisterPlatformWorkQueueWithMMCSS(&self, dwplatformworkqueue: u32, wszclass: &windows_core::PCWSTR, dwtaskid: u32, pcallback: Option<&IMFAsyncCallback>, pstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndRegisterPlatformWorkQueueWithMMCSS(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result; - fn BeginUnregisterPlatformWorkQueueWithMMCSS(&self, dwplatformworkqueue: u32, pcallback: Option<&IMFAsyncCallback>, pstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn EndUnregisterPlatformWorkQueueWithMMCSS(&self, presult: Option<&IMFAsyncResult>) -> windows_core::Result<()>; + fn BeginRegisterPlatformWorkQueueWithMMCSS(&self, dwplatformworkqueue: u32, wszclass: &windows_core::PCWSTR, dwtaskid: u32, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, pstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndRegisterPlatformWorkQueueWithMMCSS(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result; + fn BeginUnregisterPlatformWorkQueueWithMMCSS(&self, dwplatformworkqueue: u32, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, pstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn EndUnregisterPlatformWorkQueueWithMMCSS(&self, presult: windows_core::Ref<'_, IMFAsyncResult>) -> windows_core::Result<()>; fn GetPlaftormWorkQueueMMCSSClass(&self, dwplatformworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::Result<()>; fn GetPlatformWorkQueueMMCSSTaskId(&self, dwplatformworkqueueid: u32) -> windows_core::Result; } @@ -37606,19 +37606,19 @@ impl IMFWorkQueueServices_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginRegisterTopologyWorkQueuesWithMMCSS(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFWorkQueueServices_Impl::BeginRegisterTopologyWorkQueuesWithMMCSS(this, windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pstate)).into() + IMFWorkQueueServices_Impl::BeginRegisterTopologyWorkQueuesWithMMCSS(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into() } unsafe extern "system" fn EndRegisterTopologyWorkQueuesWithMMCSS(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFWorkQueueServices_Impl::EndRegisterTopologyWorkQueuesWithMMCSS(this, windows_core::from_raw_borrowed(&presult)).into() + IMFWorkQueueServices_Impl::EndRegisterTopologyWorkQueuesWithMMCSS(this, core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn BeginUnregisterTopologyWorkQueuesWithMMCSS(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFWorkQueueServices_Impl::BeginUnregisterTopologyWorkQueuesWithMMCSS(this, windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pstate)).into() + IMFWorkQueueServices_Impl::BeginUnregisterTopologyWorkQueuesWithMMCSS(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into() } unsafe extern "system" fn EndUnregisterTopologyWorkQueuesWithMMCSS(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFWorkQueueServices_Impl::EndUnregisterTopologyWorkQueuesWithMMCSS(this, windows_core::from_raw_borrowed(&presult)).into() + IMFWorkQueueServices_Impl::EndUnregisterTopologyWorkQueuesWithMMCSS(this, core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn GetTopologyWorkQueueMMCSSClass(this: *mut core::ffi::c_void, dwtopologyworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -37636,11 +37636,11 @@ impl IMFWorkQueueServices_Vtbl { } unsafe extern "system" fn BeginRegisterPlatformWorkQueueWithMMCSS(this: *mut core::ffi::c_void, dwplatformworkqueue: u32, wszclass: windows_core::PCWSTR, dwtaskid: u32, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFWorkQueueServices_Impl::BeginRegisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&dwplatformworkqueue), core::mem::transmute(&wszclass), core::mem::transmute_copy(&dwtaskid), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pstate)).into() + IMFWorkQueueServices_Impl::BeginRegisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&dwplatformworkqueue), core::mem::transmute(&wszclass), core::mem::transmute_copy(&dwtaskid), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into() } unsafe extern "system" fn EndRegisterPlatformWorkQueueWithMMCSS(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void, pdwtaskid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMFWorkQueueServices_Impl::EndRegisterPlatformWorkQueueWithMMCSS(this, windows_core::from_raw_borrowed(&presult)) { + match IMFWorkQueueServices_Impl::EndRegisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&presult)) { Ok(ok__) => { pdwtaskid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -37650,11 +37650,11 @@ impl IMFWorkQueueServices_Vtbl { } unsafe extern "system" fn BeginUnregisterPlatformWorkQueueWithMMCSS(this: *mut core::ffi::c_void, dwplatformworkqueue: u32, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFWorkQueueServices_Impl::BeginUnregisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&dwplatformworkqueue), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pstate)).into() + IMFWorkQueueServices_Impl::BeginUnregisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&dwplatformworkqueue), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into() } unsafe extern "system" fn EndUnregisterPlatformWorkQueueWithMMCSS(this: *mut core::ffi::c_void, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFWorkQueueServices_Impl::EndUnregisterPlatformWorkQueueWithMMCSS(this, windows_core::from_raw_borrowed(&presult)).into() + IMFWorkQueueServices_Impl::EndUnregisterPlatformWorkQueueWithMMCSS(this, core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn GetPlaftormWorkQueueMMCSSClass(this: *mut core::ffi::c_void, dwplatformworkqueueid: u32, pwszclass: windows_core::PWSTR, pcchclass: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -37726,7 +37726,7 @@ pub struct IMFWorkQueueServicesEx_Vtbl { } pub trait IMFWorkQueueServicesEx_Impl: IMFWorkQueueServices_Impl { fn GetTopologyWorkQueueMMCSSPriority(&self, dwtopologyworkqueueid: u32) -> windows_core::Result; - fn BeginRegisterPlatformWorkQueueWithMMCSSEx(&self, dwplatformworkqueue: u32, wszclass: &windows_core::PCWSTR, dwtaskid: u32, lpriority: i32, pcallback: Option<&IMFAsyncCallback>, pstate: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn BeginRegisterPlatformWorkQueueWithMMCSSEx(&self, dwplatformworkqueue: u32, wszclass: &windows_core::PCWSTR, dwtaskid: u32, lpriority: i32, pcallback: windows_core::Ref<'_, IMFAsyncCallback>, pstate: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetPlatformWorkQueueMMCSSPriority(&self, dwplatformworkqueueid: u32) -> windows_core::Result; } impl IMFWorkQueueServicesEx_Vtbl { @@ -37743,7 +37743,7 @@ impl IMFWorkQueueServicesEx_Vtbl { } unsafe extern "system" fn BeginRegisterPlatformWorkQueueWithMMCSSEx(this: *mut core::ffi::c_void, dwplatformworkqueue: u32, wszclass: windows_core::PCWSTR, dwtaskid: u32, lpriority: i32, pcallback: *mut core::ffi::c_void, pstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMFWorkQueueServicesEx_Impl::BeginRegisterPlatformWorkQueueWithMMCSSEx(this, core::mem::transmute_copy(&dwplatformworkqueue), core::mem::transmute(&wszclass), core::mem::transmute_copy(&dwtaskid), core::mem::transmute_copy(&lpriority), windows_core::from_raw_borrowed(&pcallback), windows_core::from_raw_borrowed(&pstate)).into() + IMFWorkQueueServicesEx_Impl::BeginRegisterPlatformWorkQueueWithMMCSSEx(this, core::mem::transmute_copy(&dwplatformworkqueue), core::mem::transmute(&wszclass), core::mem::transmute_copy(&dwtaskid), core::mem::transmute_copy(&lpriority), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pstate)).into() } unsafe extern "system" fn GetPlatformWorkQueueMMCSSPriority(this: *mut core::ffi::c_void, dwplatformworkqueueid: u32, plpriority: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -37858,14 +37858,14 @@ pub struct IPlayToControl_Vtbl { pub Disconnect: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPlayToControl_Impl: windows_core::IUnknownImpl { - fn Connect(&self, pfactory: Option<&IMFSharingEngineClassFactory>) -> windows_core::Result<()>; + fn Connect(&self, pfactory: windows_core::Ref<'_, IMFSharingEngineClassFactory>) -> windows_core::Result<()>; fn Disconnect(&self) -> windows_core::Result<()>; } impl IPlayToControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, pfactory: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPlayToControl_Impl::Connect(this, windows_core::from_raw_borrowed(&pfactory)).into() + IPlayToControl_Impl::Connect(this, core::mem::transmute_copy(&pfactory)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -37936,13 +37936,13 @@ pub struct IPlayToSourceClassFactory_Vtbl { pub CreateInstance: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPlayToSourceClassFactory_Impl: windows_core::IUnknownImpl { - fn CreateInstance(&self, dwflags: u32, pcontrol: Option<&IPlayToControl>) -> windows_core::Result; + fn CreateInstance(&self, dwflags: u32, pcontrol: windows_core::Ref<'_, IPlayToControl>) -> windows_core::Result; } impl IPlayToSourceClassFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, dwflags: u32, pcontrol: *mut core::ffi::c_void, ppsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPlayToSourceClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pcontrol)) { + match IPlayToSourceClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pcontrol)) { Ok(ok__) => { ppsource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -38028,8 +38028,8 @@ pub trait IToc_Impl: windows_core::IUnknownImpl { fn GetContext(&self, pdwcontextsize: *mut u32, pbtcontext: *mut u8) -> windows_core::Result<()>; fn GetEntryListCount(&self, pwcount: *mut u16) -> windows_core::Result<()>; fn GetEntryListByIndex(&self, wentrylistindex: u16) -> windows_core::Result; - fn AddEntryList(&self, pentrylist: Option<&ITocEntryList>, pwentrylistindex: *mut u16) -> windows_core::Result<()>; - fn AddEntryListByIndex(&self, wentrylistindex: u16, pentrylist: Option<&ITocEntryList>) -> windows_core::Result<()>; + fn AddEntryList(&self, pentrylist: windows_core::Ref<'_, ITocEntryList>, pwentrylistindex: *mut u16) -> windows_core::Result<()>; + fn AddEntryListByIndex(&self, wentrylistindex: u16, pentrylist: windows_core::Ref<'_, ITocEntryList>) -> windows_core::Result<()>; fn RemoveEntryListByIndex(&self, wentrylistindex: u16) -> windows_core::Result<()>; } impl IToc_Vtbl { @@ -38074,11 +38074,11 @@ impl IToc_Vtbl { } unsafe extern "system" fn AddEntryList(this: *mut core::ffi::c_void, pentrylist: *mut core::ffi::c_void, pwentrylistindex: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IToc_Impl::AddEntryList(this, windows_core::from_raw_borrowed(&pentrylist), core::mem::transmute_copy(&pwentrylistindex)).into() + IToc_Impl::AddEntryList(this, core::mem::transmute_copy(&pentrylist), core::mem::transmute_copy(&pwentrylistindex)).into() } unsafe extern "system" fn AddEntryListByIndex(this: *mut core::ffi::c_void, wentrylistindex: u16, pentrylist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IToc_Impl::AddEntryListByIndex(this, core::mem::transmute_copy(&wentrylistindex), windows_core::from_raw_borrowed(&pentrylist)).into() + IToc_Impl::AddEntryListByIndex(this, core::mem::transmute_copy(&wentrylistindex), core::mem::transmute_copy(&pentrylist)).into() } unsafe extern "system" fn RemoveEntryListByIndex(this: *mut core::ffi::c_void, wentrylistindex: u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -38142,8 +38142,8 @@ pub struct ITocCollection_Vtbl { pub trait ITocCollection_Impl: windows_core::IUnknownImpl { fn GetEntryCount(&self, pdwentrycount: *mut u32) -> windows_core::Result<()>; fn GetEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result; - fn AddEntry(&self, ptoc: Option<&IToc>, pdwentryindex: *mut u32) -> windows_core::Result<()>; - fn AddEntryByIndex(&self, dwentryindex: u32, ptoc: Option<&IToc>) -> windows_core::Result<()>; + fn AddEntry(&self, ptoc: windows_core::Ref<'_, IToc>, pdwentryindex: *mut u32) -> windows_core::Result<()>; + fn AddEntryByIndex(&self, dwentryindex: u32, ptoc: windows_core::Ref<'_, IToc>) -> windows_core::Result<()>; fn RemoveEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<()>; } impl ITocCollection_Vtbl { @@ -38164,11 +38164,11 @@ impl ITocCollection_Vtbl { } unsafe extern "system" fn AddEntry(this: *mut core::ffi::c_void, ptoc: *mut core::ffi::c_void, pdwentryindex: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITocCollection_Impl::AddEntry(this, windows_core::from_raw_borrowed(&ptoc), core::mem::transmute_copy(&pdwentryindex)).into() + ITocCollection_Impl::AddEntry(this, core::mem::transmute_copy(&ptoc), core::mem::transmute_copy(&pdwentryindex)).into() } unsafe extern "system" fn AddEntryByIndex(this: *mut core::ffi::c_void, dwentryindex: u32, ptoc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITocCollection_Impl::AddEntryByIndex(this, core::mem::transmute_copy(&dwentryindex), windows_core::from_raw_borrowed(&ptoc)).into() + ITocCollection_Impl::AddEntryByIndex(this, core::mem::transmute_copy(&dwentryindex), core::mem::transmute_copy(&ptoc)).into() } unsafe extern "system" fn RemoveEntryByIndex(this: *mut core::ffi::c_void, dwentryindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -38330,8 +38330,8 @@ pub struct ITocEntryList_Vtbl { pub trait ITocEntryList_Impl: windows_core::IUnknownImpl { fn GetEntryCount(&self, pdwentrycount: *mut u32) -> windows_core::Result<()>; fn GetEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result; - fn AddEntry(&self, pentry: Option<&ITocEntry>, pdwentryindex: *mut u32) -> windows_core::Result<()>; - fn AddEntryByIndex(&self, dwentryindex: u32, pentry: Option<&ITocEntry>) -> windows_core::Result<()>; + fn AddEntry(&self, pentry: windows_core::Ref<'_, ITocEntry>, pdwentryindex: *mut u32) -> windows_core::Result<()>; + fn AddEntryByIndex(&self, dwentryindex: u32, pentry: windows_core::Ref<'_, ITocEntry>) -> windows_core::Result<()>; fn RemoveEntryByIndex(&self, dwentryindex: u32) -> windows_core::Result<()>; } impl ITocEntryList_Vtbl { @@ -38352,11 +38352,11 @@ impl ITocEntryList_Vtbl { } unsafe extern "system" fn AddEntry(this: *mut core::ffi::c_void, pentry: *mut core::ffi::c_void, pdwentryindex: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITocEntryList_Impl::AddEntry(this, windows_core::from_raw_borrowed(&pentry), core::mem::transmute_copy(&pdwentryindex)).into() + ITocEntryList_Impl::AddEntry(this, core::mem::transmute_copy(&pentry), core::mem::transmute_copy(&pdwentryindex)).into() } unsafe extern "system" fn AddEntryByIndex(this: *mut core::ffi::c_void, dwentryindex: u32, pentry: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITocEntryList_Impl::AddEntryByIndex(this, core::mem::transmute_copy(&dwentryindex), windows_core::from_raw_borrowed(&pentry)).into() + ITocEntryList_Impl::AddEntryByIndex(this, core::mem::transmute_copy(&dwentryindex), core::mem::transmute_copy(&pentry)).into() } unsafe extern "system" fn RemoveEntryByIndex(this: *mut core::ffi::c_void, dwentryindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -38429,7 +38429,7 @@ pub trait ITocParser_Impl: windows_core::IUnknownImpl { fn GetTocCount(&self, enumtocpostype: TOC_POS_TYPE, pdwtoccount: *mut u32) -> windows_core::Result<()>; fn GetTocByIndex(&self, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::Result; fn GetTocByType(&self, enumtocpostype: TOC_POS_TYPE, guidtoctype: &windows_core::GUID) -> windows_core::Result; - fn AddToc(&self, enumtocpostype: TOC_POS_TYPE, ptoc: Option<&IToc>, pdwtocindex: *mut u32) -> windows_core::Result<()>; + fn AddToc(&self, enumtocpostype: TOC_POS_TYPE, ptoc: windows_core::Ref<'_, IToc>, pdwtocindex: *mut u32) -> windows_core::Result<()>; fn RemoveTocByIndex(&self, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::Result<()>; fn RemoveTocByType(&self, enumtocpostype: TOC_POS_TYPE, guidtoctype: &windows_core::GUID) -> windows_core::Result<()>; fn Commit(&self) -> windows_core::Result<()>; @@ -38466,7 +38466,7 @@ impl ITocParser_Vtbl { } unsafe extern "system" fn AddToc(this: *mut core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, ptoc: *mut core::ffi::c_void, pdwtocindex: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITocParser_Impl::AddToc(this, core::mem::transmute_copy(&enumtocpostype), windows_core::from_raw_borrowed(&ptoc), core::mem::transmute_copy(&pdwtocindex)).into() + ITocParser_Impl::AddToc(this, core::mem::transmute_copy(&enumtocpostype), core::mem::transmute_copy(&ptoc), core::mem::transmute_copy(&pdwtocindex)).into() } unsafe extern "system" fn RemoveTocByIndex(this: *mut core::ffi::c_void, enumtocpostype: TOC_POS_TYPE, dwtocindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -39195,8 +39195,8 @@ pub struct IWMVideoDecoderReconBuffer_Vtbl { #[cfg(feature = "Win32_Media_DxMediaObjects")] pub trait IWMVideoDecoderReconBuffer_Impl: windows_core::IUnknownImpl { fn GetReconstructedVideoFrameSize(&self, pdwsize: *mut u32) -> windows_core::Result<()>; - fn GetReconstructedVideoFrame(&self, pbuf: Option<&super::DxMediaObjects::IMediaBuffer>) -> windows_core::Result<()>; - fn SetReconstructedVideoFrame(&self, pbuf: Option<&super::DxMediaObjects::IMediaBuffer>) -> windows_core::Result<()>; + fn GetReconstructedVideoFrame(&self, pbuf: windows_core::Ref<'_, super::DxMediaObjects::IMediaBuffer>) -> windows_core::Result<()>; + fn SetReconstructedVideoFrame(&self, pbuf: windows_core::Ref<'_, super::DxMediaObjects::IMediaBuffer>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_DxMediaObjects")] impl IWMVideoDecoderReconBuffer_Vtbl { @@ -39207,11 +39207,11 @@ impl IWMVideoDecoderReconBuffer_Vtbl { } unsafe extern "system" fn GetReconstructedVideoFrame(this: *mut core::ffi::c_void, pbuf: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMVideoDecoderReconBuffer_Impl::GetReconstructedVideoFrame(this, windows_core::from_raw_borrowed(&pbuf)).into() + IWMVideoDecoderReconBuffer_Impl::GetReconstructedVideoFrame(this, core::mem::transmute_copy(&pbuf)).into() } unsafe extern "system" fn SetReconstructedVideoFrame(this: *mut core::ffi::c_void, pbuf: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMVideoDecoderReconBuffer_Impl::SetReconstructedVideoFrame(this, windows_core::from_raw_borrowed(&pbuf)).into() + IWMVideoDecoderReconBuffer_Impl::SetReconstructedVideoFrame(this, core::mem::transmute_copy(&pbuf)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs index bccdda5e3a..681ede5b4a 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs @@ -3166,7 +3166,7 @@ pub trait IWMPCdromBurn_Impl: windows_core::IUnknownImpl { fn burnFormat(&self, pwmpbf: *mut WMPBurnFormat) -> windows_core::Result<()>; fn SetburnFormat(&self, wmpbf: WMPBurnFormat) -> windows_core::Result<()>; fn burnPlaylist(&self) -> windows_core::Result; - fn SetburnPlaylist(&self, pplaylist: Option<&IWMPPlaylist>) -> windows_core::Result<()>; + fn SetburnPlaylist(&self, pplaylist: windows_core::Ref<'_, IWMPPlaylist>) -> windows_core::Result<()>; fn refreshStatus(&self) -> windows_core::Result<()>; fn burnState(&self, pwmpbs: *mut WMPBurnState) -> windows_core::Result<()>; fn burnProgress(&self, plprogress: *mut i32) -> windows_core::Result<()>; @@ -3213,7 +3213,7 @@ impl IWMPCdromBurn_Vtbl { } unsafe extern "system" fn SetburnPlaylist(this: *mut core::ffi::c_void, pplaylist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPCdromBurn_Impl::SetburnPlaylist(this, windows_core::from_raw_borrowed(&pplaylist)).into() + IWMPCdromBurn_Impl::SetburnPlaylist(this, core::mem::transmute_copy(&pplaylist)).into() } unsafe extern "system" fn refreshStatus(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3972,16 +3972,16 @@ pub struct IWMPContentPartner_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IWMPContentPartner_Impl: windows_core::IUnknownImpl { - fn SetCallback(&self, pcallback: Option<&IWMPContentPartnerCallback>) -> windows_core::Result<()>; + fn SetCallback(&self, pcallback: windows_core::Ref<'_, IWMPContentPartnerCallback>) -> windows_core::Result<()>; fn Notify(&self, r#type: WMPPartnerNotification, pcontext: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn GetItemInfo(&self, bstrinfoname: &windows_core::BSTR, pcontext: *const super::super::System::Variant::VARIANT) -> windows_core::Result; fn GetContentPartnerInfo(&self, bstrinfoname: &windows_core::BSTR) -> windows_core::Result; fn GetCommands(&self, location: &windows_core::BSTR, plocationcontext: *const super::super::System::Variant::VARIANT, itemlocation: &windows_core::BSTR, citemids: u32, prgitemids: *const u32, pcitemids: *mut u32, pprgitems: *mut *mut WMPContextMenuInfo) -> windows_core::Result<()>; fn InvokeCommand(&self, dwcommandid: u32, location: &windows_core::BSTR, plocationcontext: *const super::super::System::Variant::VARIANT, itemlocation: &windows_core::BSTR, citemids: u32, rgitemids: *const u32) -> windows_core::Result<()>; - fn CanBuySilent(&self, pinfo: Option<&IWMPContentContainerList>, pbstrtotalprice: *mut windows_core::BSTR, psilentok: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn Buy(&self, pinfo: Option<&IWMPContentContainerList>, cookie: u32) -> windows_core::Result<()>; + fn CanBuySilent(&self, pinfo: windows_core::Ref<'_, IWMPContentContainerList>, pbstrtotalprice: *mut windows_core::BSTR, psilentok: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn Buy(&self, pinfo: windows_core::Ref<'_, IWMPContentContainerList>, cookie: u32) -> windows_core::Result<()>; fn GetStreamingURL(&self, st: WMPStreamingType, pstreamcontext: *const super::super::System::Variant::VARIANT) -> windows_core::Result; - fn Download(&self, pinfo: Option<&IWMPContentContainerList>, cookie: u32) -> windows_core::Result<()>; + fn Download(&self, pinfo: windows_core::Ref<'_, IWMPContentContainerList>, cookie: u32) -> windows_core::Result<()>; fn DownloadTrackComplete(&self, hrresult: windows_core::HRESULT, contentid: u32, downloadtrackparam: &windows_core::BSTR) -> windows_core::Result<()>; fn RefreshLicense(&self, dwcookie: u32, flocal: super::super::Foundation::VARIANT_BOOL, bstrurl: &windows_core::BSTR, r#type: WMPStreamingType, contentid: u32, bstrrefreshreason: &windows_core::BSTR, preasoncontext: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn GetCatalogURL(&self, dwcatalogversion: u32, dwcatalogschemaversion: u32, cataloglcid: u32, pdwnewcatalogversion: *mut u32, pbstrcatalogurl: *mut windows_core::BSTR, pexpirationdate: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()>; @@ -3993,7 +3993,7 @@ pub trait IWMPContentPartner_Impl: windows_core::IUnknownImpl { fn Logout(&self) -> windows_core::Result<()>; fn SendMessage(&self, bstrmsg: &windows_core::BSTR, bstrparam: &windows_core::BSTR) -> windows_core::Result<()>; fn StationEvent(&self, bstrstationeventtype: &windows_core::BSTR, stationid: u32, playlistindex: u32, trackid: u32, trackdata: &windows_core::BSTR, dwsecondsplayed: u32) -> windows_core::Result<()>; - fn CompareContainerListPrices(&self, plistbase: Option<&IWMPContentContainerList>, plistcompare: Option<&IWMPContentContainerList>) -> windows_core::Result; + fn CompareContainerListPrices(&self, plistbase: windows_core::Ref<'_, IWMPContentContainerList>, plistcompare: windows_core::Ref<'_, IWMPContentContainerList>) -> windows_core::Result; fn VerifyPermission(&self, bstrpermission: &windows_core::BSTR, pcontext: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -4001,7 +4001,7 @@ impl IWMPContentPartner_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetCallback(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPContentPartner_Impl::SetCallback(this, windows_core::from_raw_borrowed(&pcallback)).into() + IWMPContentPartner_Impl::SetCallback(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn Notify(this: *mut core::ffi::c_void, r#type: WMPPartnerNotification, pcontext: *const super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4037,11 +4037,11 @@ impl IWMPContentPartner_Vtbl { } unsafe extern "system" fn CanBuySilent(this: *mut core::ffi::c_void, pinfo: *mut core::ffi::c_void, pbstrtotalprice: *mut *mut core::ffi::c_void, psilentok: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPContentPartner_Impl::CanBuySilent(this, windows_core::from_raw_borrowed(&pinfo), core::mem::transmute_copy(&pbstrtotalprice), core::mem::transmute_copy(&psilentok)).into() + IWMPContentPartner_Impl::CanBuySilent(this, core::mem::transmute_copy(&pinfo), core::mem::transmute_copy(&pbstrtotalprice), core::mem::transmute_copy(&psilentok)).into() } unsafe extern "system" fn Buy(this: *mut core::ffi::c_void, pinfo: *mut core::ffi::c_void, cookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPContentPartner_Impl::Buy(this, windows_core::from_raw_borrowed(&pinfo), core::mem::transmute_copy(&cookie)).into() + IWMPContentPartner_Impl::Buy(this, core::mem::transmute_copy(&pinfo), core::mem::transmute_copy(&cookie)).into() } unsafe extern "system" fn GetStreamingURL(this: *mut core::ffi::c_void, st: WMPStreamingType, pstreamcontext: *const super::super::System::Variant::VARIANT, pbstrurl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4055,7 +4055,7 @@ impl IWMPContentPartner_Vtbl { } unsafe extern "system" fn Download(this: *mut core::ffi::c_void, pinfo: *mut core::ffi::c_void, cookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPContentPartner_Impl::Download(this, windows_core::from_raw_borrowed(&pinfo), core::mem::transmute_copy(&cookie)).into() + IWMPContentPartner_Impl::Download(this, core::mem::transmute_copy(&pinfo), core::mem::transmute_copy(&cookie)).into() } unsafe extern "system" fn DownloadTrackComplete(this: *mut core::ffi::c_void, hrresult: windows_core::HRESULT, contentid: u32, downloadtrackparam: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4103,7 +4103,7 @@ impl IWMPContentPartner_Vtbl { } unsafe extern "system" fn CompareContainerListPrices(this: *mut core::ffi::c_void, plistbase: *mut core::ffi::c_void, plistcompare: *mut core::ffi::c_void, presult: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWMPContentPartner_Impl::CompareContainerListPrices(this, windows_core::from_raw_borrowed(&plistbase), windows_core::from_raw_borrowed(&plistcompare)) { + match IWMPContentPartner_Impl::CompareContainerListPrices(this, core::mem::transmute_copy(&plistbase), core::mem::transmute_copy(&plistcompare)) { Ok(ok__) => { presult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4414,10 +4414,10 @@ pub trait IWMPControls_Impl: super::super::System::Com::IDispatch_Impl { fn next(&self) -> windows_core::Result<()>; fn previous(&self) -> windows_core::Result<()>; fn currentItem(&self) -> windows_core::Result; - fn SetcurrentItem(&self, piwmpmedia: Option<&IWMPMedia>) -> windows_core::Result<()>; + fn SetcurrentItem(&self, piwmpmedia: windows_core::Ref<'_, IWMPMedia>) -> windows_core::Result<()>; fn currentMarker(&self, plmarker: *mut i32) -> windows_core::Result<()>; fn SetcurrentMarker(&self, lmarker: i32) -> windows_core::Result<()>; - fn playItem(&self, piwmpmedia: Option<&IWMPMedia>) -> windows_core::Result<()>; + fn playItem(&self, piwmpmedia: windows_core::Ref<'_, IWMPMedia>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IWMPControls_Vtbl { @@ -4478,7 +4478,7 @@ impl IWMPControls_Vtbl { } unsafe extern "system" fn SetcurrentItem(this: *mut core::ffi::c_void, piwmpmedia: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPControls_Impl::SetcurrentItem(this, windows_core::from_raw_borrowed(&piwmpmedia)).into() + IWMPControls_Impl::SetcurrentItem(this, core::mem::transmute_copy(&piwmpmedia)).into() } unsafe extern "system" fn currentMarker(this: *mut core::ffi::c_void, plmarker: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4490,7 +4490,7 @@ impl IWMPControls_Vtbl { } unsafe extern "system" fn playItem(this: *mut core::ffi::c_void, piwmpmedia: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPControls_Impl::playItem(this, windows_core::from_raw_borrowed(&piwmpmedia)).into() + IWMPControls_Impl::playItem(this, core::mem::transmute_copy(&piwmpmedia)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -4865,14 +4865,14 @@ pub trait IWMPCore_Impl: super::super::System::Com::IDispatch_Impl { fn controls(&self) -> windows_core::Result; fn settings(&self) -> windows_core::Result; fn currentMedia(&self) -> windows_core::Result; - fn SetcurrentMedia(&self, pmedia: Option<&IWMPMedia>) -> windows_core::Result<()>; + fn SetcurrentMedia(&self, pmedia: windows_core::Ref<'_, IWMPMedia>) -> windows_core::Result<()>; fn mediaCollection(&self) -> windows_core::Result; fn playlistCollection(&self) -> windows_core::Result; fn versionInfo(&self, pbstrversioninfo: *mut windows_core::BSTR) -> windows_core::Result<()>; fn launchURL(&self, bstrurl: &windows_core::BSTR) -> windows_core::Result<()>; fn network(&self) -> windows_core::Result; fn currentPlaylist(&self) -> windows_core::Result; - fn SetcurrentPlaylist(&self, ppl: Option<&IWMPPlaylist>) -> windows_core::Result<()>; + fn SetcurrentPlaylist(&self, ppl: windows_core::Ref<'_, IWMPPlaylist>) -> windows_core::Result<()>; fn cdromCollection(&self) -> windows_core::Result; fn closedCaption(&self) -> windows_core::Result; fn isOnline(&self, pfonline: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; @@ -4934,7 +4934,7 @@ impl IWMPCore_Vtbl { } unsafe extern "system" fn SetcurrentMedia(this: *mut core::ffi::c_void, pmedia: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPCore_Impl::SetcurrentMedia(this, windows_core::from_raw_borrowed(&pmedia)).into() + IWMPCore_Impl::SetcurrentMedia(this, core::mem::transmute_copy(&pmedia)).into() } unsafe extern "system" fn mediaCollection(this: *mut core::ffi::c_void, ppmediacollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4986,7 +4986,7 @@ impl IWMPCore_Vtbl { } unsafe extern "system" fn SetcurrentPlaylist(this: *mut core::ffi::c_void, ppl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPCore_Impl::SetcurrentPlaylist(this, windows_core::from_raw_borrowed(&ppl)).into() + IWMPCore_Impl::SetcurrentPlaylist(this, core::mem::transmute_copy(&ppl)).into() } unsafe extern "system" fn cdromCollection(this: *mut core::ffi::c_void, ppcdromcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5793,10 +5793,10 @@ pub struct IWMPEffects2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] pub trait IWMPEffects2_Impl: IWMPEffects_Impl { - fn SetCore(&self, pplayer: Option<&IWMPCore>) -> windows_core::Result<()>; + fn SetCore(&self, pplayer: windows_core::Ref<'_, IWMPCore>) -> windows_core::Result<()>; fn Create(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()>; fn Destroy(&self) -> windows_core::Result<()>; - fn NotifyNewMedia(&self, pmedia: Option<&IWMPMedia>) -> windows_core::Result<()>; + fn NotifyNewMedia(&self, pmedia: windows_core::Ref<'_, IWMPMedia>) -> windows_core::Result<()>; fn OnWindowMessage(&self, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plresultparam: *mut super::super::Foundation::LRESULT) -> windows_core::Result<()>; fn RenderWindowed(&self, pdata: *mut TimedLevel, frequiredrender: super::super::Foundation::BOOL) -> windows_core::Result<()>; } @@ -5805,7 +5805,7 @@ impl IWMPEffects2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetCore(this: *mut core::ffi::c_void, pplayer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEffects2_Impl::SetCore(this, windows_core::from_raw_borrowed(&pplayer)).into() + IWMPEffects2_Impl::SetCore(this, core::mem::transmute_copy(&pplayer)).into() } unsafe extern "system" fn Create(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5817,7 +5817,7 @@ impl IWMPEffects2_Vtbl { } unsafe extern "system" fn NotifyNewMedia(this: *mut core::ffi::c_void, pmedia: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEffects2_Impl::NotifyNewMedia(this, windows_core::from_raw_borrowed(&pmedia)).into() + IWMPEffects2_Impl::NotifyNewMedia(this, core::mem::transmute_copy(&pmedia)).into() } unsafe extern "system" fn OnWindowMessage(this: *mut core::ffi::c_void, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plresultparam: *mut super::super::Foundation::LRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6296,12 +6296,12 @@ pub trait IWMPEvents_Impl: windows_core::IUnknownImpl { fn MarkerHit(&self, markernum: i32); fn DurationUnitChange(&self, newdurationunit: i32); fn CdromMediaChange(&self, cdromnum: i32); - fn PlaylistChange(&self, playlist: Option<&super::super::System::Com::IDispatch>, change: WMPPlaylistChangeEventType); + fn PlaylistChange(&self, playlist: windows_core::Ref<'_, super::super::System::Com::IDispatch>, change: WMPPlaylistChangeEventType); fn CurrentPlaylistChange(&self, change: WMPPlaylistChangeEventType); fn CurrentPlaylistItemAvailable(&self, bstritemname: &windows_core::BSTR); - fn MediaChange(&self, item: Option<&super::super::System::Com::IDispatch>); + fn MediaChange(&self, item: windows_core::Ref<'_, super::super::System::Com::IDispatch>); fn CurrentMediaItemAvailable(&self, bstritemname: &windows_core::BSTR); - fn CurrentItemChange(&self, pdispmedia: Option<&super::super::System::Com::IDispatch>); + fn CurrentItemChange(&self, pdispmedia: windows_core::Ref<'_, super::super::System::Com::IDispatch>); fn MediaCollectionChange(&self); fn MediaCollectionAttributeStringAdded(&self, bstrattribname: &windows_core::BSTR, bstrattribval: &windows_core::BSTR); fn MediaCollectionAttributeStringRemoved(&self, bstrattribname: &windows_core::BSTR, bstrattribval: &windows_core::BSTR); @@ -6311,8 +6311,8 @@ pub trait IWMPEvents_Impl: windows_core::IUnknownImpl { fn PlaylistCollectionPlaylistRemoved(&self, bstrplaylistname: &windows_core::BSTR); fn PlaylistCollectionPlaylistSetAsDeleted(&self, bstrplaylistname: &windows_core::BSTR, varfisdeleted: super::super::Foundation::VARIANT_BOOL); fn ModeChange(&self, modename: &windows_core::BSTR, newvalue: super::super::Foundation::VARIANT_BOOL); - fn MediaError(&self, pmediaobject: Option<&super::super::System::Com::IDispatch>); - fn OpenPlaylistSwitch(&self, pitem: Option<&super::super::System::Com::IDispatch>); + fn MediaError(&self, pmediaobject: windows_core::Ref<'_, super::super::System::Com::IDispatch>); + fn OpenPlaylistSwitch(&self, pitem: windows_core::Ref<'_, super::super::System::Com::IDispatch>); fn DomainChange(&self, strdomain: &windows_core::BSTR); fn SwitchedToPlayerApplication(&self); fn SwitchedToControl(&self); @@ -6392,7 +6392,7 @@ impl IWMPEvents_Vtbl { } unsafe extern "system" fn PlaylistChange(this: *mut core::ffi::c_void, playlist: *mut core::ffi::c_void, change: WMPPlaylistChangeEventType) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents_Impl::PlaylistChange(this, windows_core::from_raw_borrowed(&playlist), core::mem::transmute_copy(&change)) + IWMPEvents_Impl::PlaylistChange(this, core::mem::transmute_copy(&playlist), core::mem::transmute_copy(&change)) } unsafe extern "system" fn CurrentPlaylistChange(this: *mut core::ffi::c_void, change: WMPPlaylistChangeEventType) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6404,7 +6404,7 @@ impl IWMPEvents_Vtbl { } unsafe extern "system" fn MediaChange(this: *mut core::ffi::c_void, item: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents_Impl::MediaChange(this, windows_core::from_raw_borrowed(&item)) + IWMPEvents_Impl::MediaChange(this, core::mem::transmute_copy(&item)) } unsafe extern "system" fn CurrentMediaItemAvailable(this: *mut core::ffi::c_void, bstritemname: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6412,7 +6412,7 @@ impl IWMPEvents_Vtbl { } unsafe extern "system" fn CurrentItemChange(this: *mut core::ffi::c_void, pdispmedia: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents_Impl::CurrentItemChange(this, windows_core::from_raw_borrowed(&pdispmedia)) + IWMPEvents_Impl::CurrentItemChange(this, core::mem::transmute_copy(&pdispmedia)) } unsafe extern "system" fn MediaCollectionChange(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6452,11 +6452,11 @@ impl IWMPEvents_Vtbl { } unsafe extern "system" fn MediaError(this: *mut core::ffi::c_void, pmediaobject: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents_Impl::MediaError(this, windows_core::from_raw_borrowed(&pmediaobject)) + IWMPEvents_Impl::MediaError(this, core::mem::transmute_copy(&pmediaobject)) } unsafe extern "system" fn OpenPlaylistSwitch(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents_Impl::OpenPlaylistSwitch(this, windows_core::from_raw_borrowed(&pitem)) + IWMPEvents_Impl::OpenPlaylistSwitch(this, core::mem::transmute_copy(&pitem)) } unsafe extern "system" fn DomainChange(this: *mut core::ffi::c_void, strdomain: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6628,39 +6628,39 @@ pub struct IWMPEvents2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWMPEvents2_Impl: IWMPEvents_Impl { - fn DeviceConnect(&self, pdevice: Option<&IWMPSyncDevice>); - fn DeviceDisconnect(&self, pdevice: Option<&IWMPSyncDevice>); - fn DeviceStatusChange(&self, pdevice: Option<&IWMPSyncDevice>, newstatus: WMPDeviceStatus); - fn DeviceSyncStateChange(&self, pdevice: Option<&IWMPSyncDevice>, newstate: WMPSyncState); - fn DeviceSyncError(&self, pdevice: Option<&IWMPSyncDevice>, pmedia: Option<&super::super::System::Com::IDispatch>); - fn CreatePartnershipComplete(&self, pdevice: Option<&IWMPSyncDevice>, hrresult: windows_core::HRESULT); + fn DeviceConnect(&self, pdevice: windows_core::Ref<'_, IWMPSyncDevice>); + fn DeviceDisconnect(&self, pdevice: windows_core::Ref<'_, IWMPSyncDevice>); + fn DeviceStatusChange(&self, pdevice: windows_core::Ref<'_, IWMPSyncDevice>, newstatus: WMPDeviceStatus); + fn DeviceSyncStateChange(&self, pdevice: windows_core::Ref<'_, IWMPSyncDevice>, newstate: WMPSyncState); + fn DeviceSyncError(&self, pdevice: windows_core::Ref<'_, IWMPSyncDevice>, pmedia: windows_core::Ref<'_, super::super::System::Com::IDispatch>); + fn CreatePartnershipComplete(&self, pdevice: windows_core::Ref<'_, IWMPSyncDevice>, hrresult: windows_core::HRESULT); } #[cfg(feature = "Win32_System_Com")] impl IWMPEvents2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DeviceConnect(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents2_Impl::DeviceConnect(this, windows_core::from_raw_borrowed(&pdevice)) + IWMPEvents2_Impl::DeviceConnect(this, core::mem::transmute_copy(&pdevice)) } unsafe extern "system" fn DeviceDisconnect(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents2_Impl::DeviceDisconnect(this, windows_core::from_raw_borrowed(&pdevice)) + IWMPEvents2_Impl::DeviceDisconnect(this, core::mem::transmute_copy(&pdevice)) } unsafe extern "system" fn DeviceStatusChange(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, newstatus: WMPDeviceStatus) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents2_Impl::DeviceStatusChange(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&newstatus)) + IWMPEvents2_Impl::DeviceStatusChange(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&newstatus)) } unsafe extern "system" fn DeviceSyncStateChange(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, newstate: WMPSyncState) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents2_Impl::DeviceSyncStateChange(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&newstate)) + IWMPEvents2_Impl::DeviceSyncStateChange(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&newstate)) } unsafe extern "system" fn DeviceSyncError(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, pmedia: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents2_Impl::DeviceSyncError(this, windows_core::from_raw_borrowed(&pdevice), windows_core::from_raw_borrowed(&pmedia)) + IWMPEvents2_Impl::DeviceSyncError(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&pmedia)) } unsafe extern "system" fn CreatePartnershipComplete(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, hrresult: windows_core::HRESULT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents2_Impl::CreatePartnershipComplete(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&hrresult)) + IWMPEvents2_Impl::CreatePartnershipComplete(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&hrresult)) } Self { base__: IWMPEvents_Vtbl::new::(), @@ -6790,48 +6790,48 @@ pub struct IWMPEvents3_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWMPEvents3_Impl: IWMPEvents2_Impl { - fn CdromRipStateChange(&self, pcdromrip: Option<&IWMPCdromRip>, wmprs: WMPRipState); - fn CdromRipMediaError(&self, pcdromrip: Option<&IWMPCdromRip>, pmedia: Option<&super::super::System::Com::IDispatch>); - fn CdromBurnStateChange(&self, pcdromburn: Option<&IWMPCdromBurn>, wmpbs: WMPBurnState); - fn CdromBurnMediaError(&self, pcdromburn: Option<&IWMPCdromBurn>, pmedia: Option<&super::super::System::Com::IDispatch>); - fn CdromBurnError(&self, pcdromburn: Option<&IWMPCdromBurn>, hrerror: windows_core::HRESULT); - fn LibraryConnect(&self, plibrary: Option<&IWMPLibrary>); - fn LibraryDisconnect(&self, plibrary: Option<&IWMPLibrary>); + fn CdromRipStateChange(&self, pcdromrip: windows_core::Ref<'_, IWMPCdromRip>, wmprs: WMPRipState); + fn CdromRipMediaError(&self, pcdromrip: windows_core::Ref<'_, IWMPCdromRip>, pmedia: windows_core::Ref<'_, super::super::System::Com::IDispatch>); + fn CdromBurnStateChange(&self, pcdromburn: windows_core::Ref<'_, IWMPCdromBurn>, wmpbs: WMPBurnState); + fn CdromBurnMediaError(&self, pcdromburn: windows_core::Ref<'_, IWMPCdromBurn>, pmedia: windows_core::Ref<'_, super::super::System::Com::IDispatch>); + fn CdromBurnError(&self, pcdromburn: windows_core::Ref<'_, IWMPCdromBurn>, hrerror: windows_core::HRESULT); + fn LibraryConnect(&self, plibrary: windows_core::Ref<'_, IWMPLibrary>); + fn LibraryDisconnect(&self, plibrary: windows_core::Ref<'_, IWMPLibrary>); fn FolderScanStateChange(&self, wmpfss: WMPFolderScanState); - fn StringCollectionChange(&self, pdispstringcollection: Option<&super::super::System::Com::IDispatch>, change: WMPStringCollectionChangeEventType, lcollectionindex: i32); - fn MediaCollectionMediaAdded(&self, pdispmedia: Option<&super::super::System::Com::IDispatch>); - fn MediaCollectionMediaRemoved(&self, pdispmedia: Option<&super::super::System::Com::IDispatch>); + fn StringCollectionChange(&self, pdispstringcollection: windows_core::Ref<'_, super::super::System::Com::IDispatch>, change: WMPStringCollectionChangeEventType, lcollectionindex: i32); + fn MediaCollectionMediaAdded(&self, pdispmedia: windows_core::Ref<'_, super::super::System::Com::IDispatch>); + fn MediaCollectionMediaRemoved(&self, pdispmedia: windows_core::Ref<'_, super::super::System::Com::IDispatch>); } #[cfg(feature = "Win32_System_Com")] impl IWMPEvents3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CdromRipStateChange(this: *mut core::ffi::c_void, pcdromrip: *mut core::ffi::c_void, wmprs: WMPRipState) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::CdromRipStateChange(this, windows_core::from_raw_borrowed(&pcdromrip), core::mem::transmute_copy(&wmprs)) + IWMPEvents3_Impl::CdromRipStateChange(this, core::mem::transmute_copy(&pcdromrip), core::mem::transmute_copy(&wmprs)) } unsafe extern "system" fn CdromRipMediaError(this: *mut core::ffi::c_void, pcdromrip: *mut core::ffi::c_void, pmedia: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::CdromRipMediaError(this, windows_core::from_raw_borrowed(&pcdromrip), windows_core::from_raw_borrowed(&pmedia)) + IWMPEvents3_Impl::CdromRipMediaError(this, core::mem::transmute_copy(&pcdromrip), core::mem::transmute_copy(&pmedia)) } unsafe extern "system" fn CdromBurnStateChange(this: *mut core::ffi::c_void, pcdromburn: *mut core::ffi::c_void, wmpbs: WMPBurnState) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::CdromBurnStateChange(this, windows_core::from_raw_borrowed(&pcdromburn), core::mem::transmute_copy(&wmpbs)) + IWMPEvents3_Impl::CdromBurnStateChange(this, core::mem::transmute_copy(&pcdromburn), core::mem::transmute_copy(&wmpbs)) } unsafe extern "system" fn CdromBurnMediaError(this: *mut core::ffi::c_void, pcdromburn: *mut core::ffi::c_void, pmedia: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::CdromBurnMediaError(this, windows_core::from_raw_borrowed(&pcdromburn), windows_core::from_raw_borrowed(&pmedia)) + IWMPEvents3_Impl::CdromBurnMediaError(this, core::mem::transmute_copy(&pcdromburn), core::mem::transmute_copy(&pmedia)) } unsafe extern "system" fn CdromBurnError(this: *mut core::ffi::c_void, pcdromburn: *mut core::ffi::c_void, hrerror: windows_core::HRESULT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::CdromBurnError(this, windows_core::from_raw_borrowed(&pcdromburn), core::mem::transmute_copy(&hrerror)) + IWMPEvents3_Impl::CdromBurnError(this, core::mem::transmute_copy(&pcdromburn), core::mem::transmute_copy(&hrerror)) } unsafe extern "system" fn LibraryConnect(this: *mut core::ffi::c_void, plibrary: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::LibraryConnect(this, windows_core::from_raw_borrowed(&plibrary)) + IWMPEvents3_Impl::LibraryConnect(this, core::mem::transmute_copy(&plibrary)) } unsafe extern "system" fn LibraryDisconnect(this: *mut core::ffi::c_void, plibrary: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::LibraryDisconnect(this, windows_core::from_raw_borrowed(&plibrary)) + IWMPEvents3_Impl::LibraryDisconnect(this, core::mem::transmute_copy(&plibrary)) } unsafe extern "system" fn FolderScanStateChange(this: *mut core::ffi::c_void, wmpfss: WMPFolderScanState) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6839,15 +6839,15 @@ impl IWMPEvents3_Vtbl { } unsafe extern "system" fn StringCollectionChange(this: *mut core::ffi::c_void, pdispstringcollection: *mut core::ffi::c_void, change: WMPStringCollectionChangeEventType, lcollectionindex: i32) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::StringCollectionChange(this, windows_core::from_raw_borrowed(&pdispstringcollection), core::mem::transmute_copy(&change), core::mem::transmute_copy(&lcollectionindex)) + IWMPEvents3_Impl::StringCollectionChange(this, core::mem::transmute_copy(&pdispstringcollection), core::mem::transmute_copy(&change), core::mem::transmute_copy(&lcollectionindex)) } unsafe extern "system" fn MediaCollectionMediaAdded(this: *mut core::ffi::c_void, pdispmedia: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::MediaCollectionMediaAdded(this, windows_core::from_raw_borrowed(&pdispmedia)) + IWMPEvents3_Impl::MediaCollectionMediaAdded(this, core::mem::transmute_copy(&pdispmedia)) } unsafe extern "system" fn MediaCollectionMediaRemoved(this: *mut core::ffi::c_void, pdispmedia: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents3_Impl::MediaCollectionMediaRemoved(this, windows_core::from_raw_borrowed(&pdispmedia)) + IWMPEvents3_Impl::MediaCollectionMediaRemoved(this, core::mem::transmute_copy(&pdispmedia)) } Self { base__: IWMPEvents2_Vtbl::new::(), @@ -6893,14 +6893,14 @@ pub struct IWMPEvents4_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWMPEvents4_Impl: IWMPEvents3_Impl { - fn DeviceEstimation(&self, pdevice: Option<&IWMPSyncDevice>, hrresult: windows_core::HRESULT, qwestimatedusedspace: i64, qwestimatedspace: i64); + fn DeviceEstimation(&self, pdevice: windows_core::Ref<'_, IWMPSyncDevice>, hrresult: windows_core::HRESULT, qwestimatedusedspace: i64, qwestimatedspace: i64); } #[cfg(feature = "Win32_System_Com")] impl IWMPEvents4_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DeviceEstimation(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, hrresult: windows_core::HRESULT, qwestimatedusedspace: i64, qwestimatedspace: i64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPEvents4_Impl::DeviceEstimation(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&hrresult), core::mem::transmute_copy(&qwestimatedusedspace), core::mem::transmute_copy(&qwestimatedspace)) + IWMPEvents4_Impl::DeviceEstimation(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&hrresult), core::mem::transmute_copy(&qwestimatedusedspace), core::mem::transmute_copy(&qwestimatedspace)) } Self { base__: IWMPEvents3_Vtbl::new::(), DeviceEstimation: DeviceEstimation:: } } @@ -7069,19 +7069,19 @@ pub struct IWMPGraphCreation_Vtbl { pub GetGraphCreationFlags: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IWMPGraphCreation_Impl: windows_core::IUnknownImpl { - fn GraphCreationPreRender(&self, pfiltergraph: Option<&windows_core::IUnknown>, preserved: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn GraphCreationPostRender(&self, pfiltergraph: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn GraphCreationPreRender(&self, pfiltergraph: windows_core::Ref<'_, windows_core::IUnknown>, preserved: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn GraphCreationPostRender(&self, pfiltergraph: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetGraphCreationFlags(&self, pdwflags: *mut u32) -> windows_core::Result<()>; } impl IWMPGraphCreation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GraphCreationPreRender(this: *mut core::ffi::c_void, pfiltergraph: *mut core::ffi::c_void, preserved: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPGraphCreation_Impl::GraphCreationPreRender(this, windows_core::from_raw_borrowed(&pfiltergraph), windows_core::from_raw_borrowed(&preserved)).into() + IWMPGraphCreation_Impl::GraphCreationPreRender(this, core::mem::transmute_copy(&pfiltergraph), core::mem::transmute_copy(&preserved)).into() } unsafe extern "system" fn GraphCreationPostRender(this: *mut core::ffi::c_void, pfiltergraph: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPGraphCreation_Impl::GraphCreationPostRender(this, windows_core::from_raw_borrowed(&pfiltergraph)).into() + IWMPGraphCreation_Impl::GraphCreationPostRender(this, core::mem::transmute_copy(&pfiltergraph)).into() } unsafe extern "system" fn GetGraphCreationFlags(this: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7136,7 +7136,7 @@ pub trait IWMPLibrary_Impl: windows_core::IUnknownImpl { fn name(&self, pbstrname: *mut windows_core::BSTR) -> windows_core::Result<()>; fn r#type(&self, pwmplt: *mut WMPLibraryType) -> windows_core::Result<()>; fn mediaCollection(&self) -> windows_core::Result; - fn isIdentical(&self, piwmplibrary: Option<&IWMPLibrary>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn isIdentical(&self, piwmplibrary: windows_core::Ref<'_, IWMPLibrary>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IWMPLibrary_Vtbl { @@ -7161,7 +7161,7 @@ impl IWMPLibrary_Vtbl { } unsafe extern "system" fn isIdentical(this: *mut core::ffi::c_void, piwmplibrary: *mut core::ffi::c_void, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPLibrary_Impl::isIdentical(this, windows_core::from_raw_borrowed(&piwmplibrary), core::mem::transmute_copy(&pvbool)).into() + IWMPLibrary_Impl::isIdentical(this, core::mem::transmute_copy(&piwmplibrary), core::mem::transmute_copy(&pvbool)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7412,7 +7412,7 @@ pub struct IWMPMedia_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IWMPMedia_Impl: super::super::System::Com::IDispatch_Impl { - fn get_isIdentical(&self, piwmpmedia: Option<&IWMPMedia>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn get_isIdentical(&self, piwmpmedia: windows_core::Ref<'_, IWMPMedia>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn sourceURL(&self, pbstrsourceurl: *mut windows_core::BSTR) -> windows_core::Result<()>; fn name(&self, pbstrname: *mut windows_core::BSTR) -> windows_core::Result<()>; fn Setname(&self, bstrname: &windows_core::BSTR) -> windows_core::Result<()>; @@ -7428,7 +7428,7 @@ pub trait IWMPMedia_Impl: super::super::System::Com::IDispatch_Impl { fn getItemInfo(&self, bstritemname: &windows_core::BSTR, pbstrval: *mut windows_core::BSTR) -> windows_core::Result<()>; fn setItemInfo(&self, bstritemname: &windows_core::BSTR, bstrval: &windows_core::BSTR) -> windows_core::Result<()>; fn getItemInfoByAtom(&self, latom: i32, pbstrval: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn isMemberOf(&self, pplaylist: Option<&IWMPPlaylist>, pvarfismemberof: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn isMemberOf(&self, pplaylist: windows_core::Ref<'_, IWMPPlaylist>, pvarfismemberof: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn isReadOnlyItem(&self, bstritemname: &windows_core::BSTR, pvarfisreadonly: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -7436,7 +7436,7 @@ impl IWMPMedia_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn get_isIdentical(this: *mut core::ffi::c_void, piwmpmedia: *mut core::ffi::c_void, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPMedia_Impl::get_isIdentical(this, windows_core::from_raw_borrowed(&piwmpmedia), core::mem::transmute_copy(&pvbool)).into() + IWMPMedia_Impl::get_isIdentical(this, core::mem::transmute_copy(&piwmpmedia), core::mem::transmute_copy(&pvbool)).into() } unsafe extern "system" fn sourceURL(this: *mut core::ffi::c_void, pbstrsourceurl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7500,7 +7500,7 @@ impl IWMPMedia_Vtbl { } unsafe extern "system" fn isMemberOf(this: *mut core::ffi::c_void, pplaylist: *mut core::ffi::c_void, pvarfismemberof: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPMedia_Impl::isMemberOf(this, windows_core::from_raw_borrowed(&pplaylist), core::mem::transmute_copy(&pvarfismemberof)).into() + IWMPMedia_Impl::isMemberOf(this, core::mem::transmute_copy(&pplaylist), core::mem::transmute_copy(&pvarfismemberof)).into() } unsafe extern "system" fn isReadOnlyItem(this: *mut core::ffi::c_void, bstritemname: *mut core::ffi::c_void, pvarfisreadonly: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7735,11 +7735,11 @@ pub trait IWMPMediaCollection_Impl: super::super::System::Com::IDispatch_Impl { fn getByAuthor(&self, bstrauthor: &windows_core::BSTR) -> windows_core::Result; fn getByAlbum(&self, bstralbum: &windows_core::BSTR) -> windows_core::Result; fn getByAttribute(&self, bstrattribute: &windows_core::BSTR, bstrvalue: &windows_core::BSTR) -> windows_core::Result; - fn remove(&self, pitem: Option<&IWMPMedia>, varfdeletefile: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn remove(&self, pitem: windows_core::Ref<'_, IWMPMedia>, varfdeletefile: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn getAttributeStringCollection(&self, bstrattribute: &windows_core::BSTR, bstrmediatype: &windows_core::BSTR) -> windows_core::Result; fn getMediaAtom(&self, bstritemname: &windows_core::BSTR, platom: *mut i32) -> windows_core::Result<()>; - fn setDeleted(&self, pitem: Option<&IWMPMedia>, varfisdeleted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn isDeleted(&self, pitem: Option<&IWMPMedia>, pvarfisdeleted: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn setDeleted(&self, pitem: windows_core::Ref<'_, IWMPMedia>, varfisdeleted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn isDeleted(&self, pitem: windows_core::Ref<'_, IWMPMedia>, pvarfisdeleted: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IWMPMediaCollection_Vtbl { @@ -7816,7 +7816,7 @@ impl IWMPMediaCollection_Vtbl { } unsafe extern "system" fn remove(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void, varfdeletefile: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPMediaCollection_Impl::remove(this, windows_core::from_raw_borrowed(&pitem), core::mem::transmute_copy(&varfdeletefile)).into() + IWMPMediaCollection_Impl::remove(this, core::mem::transmute_copy(&pitem), core::mem::transmute_copy(&varfdeletefile)).into() } unsafe extern "system" fn getAttributeStringCollection(this: *mut core::ffi::c_void, bstrattribute: *mut core::ffi::c_void, bstrmediatype: *mut core::ffi::c_void, ppstringcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7834,11 +7834,11 @@ impl IWMPMediaCollection_Vtbl { } unsafe extern "system" fn setDeleted(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void, varfisdeleted: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPMediaCollection_Impl::setDeleted(this, windows_core::from_raw_borrowed(&pitem), core::mem::transmute_copy(&varfisdeleted)).into() + IWMPMediaCollection_Impl::setDeleted(this, core::mem::transmute_copy(&pitem), core::mem::transmute_copy(&varfisdeleted)).into() } unsafe extern "system" fn isDeleted(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void, pvarfisdeleted: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPMediaCollection_Impl::isDeleted(this, windows_core::from_raw_borrowed(&pitem), core::mem::transmute_copy(&pvarfisdeleted)).into() + IWMPMediaCollection_Impl::isDeleted(this, core::mem::transmute_copy(&pitem), core::mem::transmute_copy(&pvarfisdeleted)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -7910,8 +7910,8 @@ pub struct IWMPMediaCollection2_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IWMPMediaCollection2_Impl: IWMPMediaCollection_Impl { fn createQuery(&self) -> windows_core::Result; - fn getPlaylistByQuery(&self, pquery: Option<&IWMPQuery>, bstrmediatype: &windows_core::BSTR, bstrsortattribute: &windows_core::BSTR, fsortascending: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; - fn getStringCollectionByQuery(&self, bstrattribute: &windows_core::BSTR, pquery: Option<&IWMPQuery>, bstrmediatype: &windows_core::BSTR, bstrsortattribute: &windows_core::BSTR, fsortascending: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; + fn getPlaylistByQuery(&self, pquery: windows_core::Ref<'_, IWMPQuery>, bstrmediatype: &windows_core::BSTR, bstrsortattribute: &windows_core::BSTR, fsortascending: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; + fn getStringCollectionByQuery(&self, bstrattribute: &windows_core::BSTR, pquery: windows_core::Ref<'_, IWMPQuery>, bstrmediatype: &windows_core::BSTR, bstrsortattribute: &windows_core::BSTR, fsortascending: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; fn getByAttributeAndMediaType(&self, bstrattribute: &windows_core::BSTR, bstrvalue: &windows_core::BSTR, bstrmediatype: &windows_core::BSTR) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -7929,7 +7929,7 @@ impl IWMPMediaCollection2_Vtbl { } unsafe extern "system" fn getPlaylistByQuery(this: *mut core::ffi::c_void, pquery: *mut core::ffi::c_void, bstrmediatype: *mut core::ffi::c_void, bstrsortattribute: *mut core::ffi::c_void, fsortascending: super::super::Foundation::VARIANT_BOOL, ppplaylist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWMPMediaCollection2_Impl::getPlaylistByQuery(this, windows_core::from_raw_borrowed(&pquery), core::mem::transmute(&bstrmediatype), core::mem::transmute(&bstrsortattribute), core::mem::transmute_copy(&fsortascending)) { + match IWMPMediaCollection2_Impl::getPlaylistByQuery(this, core::mem::transmute_copy(&pquery), core::mem::transmute(&bstrmediatype), core::mem::transmute(&bstrsortattribute), core::mem::transmute_copy(&fsortascending)) { Ok(ok__) => { ppplaylist.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7939,7 +7939,7 @@ impl IWMPMediaCollection2_Vtbl { } unsafe extern "system" fn getStringCollectionByQuery(this: *mut core::ffi::c_void, bstrattribute: *mut core::ffi::c_void, pquery: *mut core::ffi::c_void, bstrmediatype: *mut core::ffi::c_void, bstrsortattribute: *mut core::ffi::c_void, fsortascending: super::super::Foundation::VARIANT_BOOL, ppstringcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWMPMediaCollection2_Impl::getStringCollectionByQuery(this, core::mem::transmute(&bstrattribute), windows_core::from_raw_borrowed(&pquery), core::mem::transmute(&bstrmediatype), core::mem::transmute(&bstrsortattribute), core::mem::transmute_copy(&fsortascending)) { + match IWMPMediaCollection2_Impl::getStringCollectionByQuery(this, core::mem::transmute(&bstrattribute), core::mem::transmute_copy(&pquery), core::mem::transmute(&bstrmediatype), core::mem::transmute(&bstrsortattribute), core::mem::transmute_copy(&fsortascending)) { Ok(ok__) => { ppstringcollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9600,11 +9600,11 @@ pub trait IWMPPlaylist_Impl: super::super::System::Com::IDispatch_Impl { fn get_item(&self, lindex: i32) -> windows_core::Result; fn getItemInfo(&self, bstrname: &windows_core::BSTR, pbstrval: *mut windows_core::BSTR) -> windows_core::Result<()>; fn setItemInfo(&self, bstrname: &windows_core::BSTR, bstrvalue: &windows_core::BSTR) -> windows_core::Result<()>; - fn get_isIdentical(&self, piwmpplaylist: Option<&IWMPPlaylist>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn get_isIdentical(&self, piwmpplaylist: windows_core::Ref<'_, IWMPPlaylist>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn clear(&self) -> windows_core::Result<()>; - fn insertItem(&self, lindex: i32, piwmpmedia: Option<&IWMPMedia>) -> windows_core::Result<()>; - fn appendItem(&self, piwmpmedia: Option<&IWMPMedia>) -> windows_core::Result<()>; - fn removeItem(&self, piwmpmedia: Option<&IWMPMedia>) -> windows_core::Result<()>; + fn insertItem(&self, lindex: i32, piwmpmedia: windows_core::Ref<'_, IWMPMedia>) -> windows_core::Result<()>; + fn appendItem(&self, piwmpmedia: windows_core::Ref<'_, IWMPMedia>) -> windows_core::Result<()>; + fn removeItem(&self, piwmpmedia: windows_core::Ref<'_, IWMPMedia>) -> windows_core::Result<()>; fn moveItem(&self, lindexold: i32, lindexnew: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -9650,7 +9650,7 @@ impl IWMPPlaylist_Vtbl { } unsafe extern "system" fn get_isIdentical(this: *mut core::ffi::c_void, piwmpplaylist: *mut core::ffi::c_void, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPPlaylist_Impl::get_isIdentical(this, windows_core::from_raw_borrowed(&piwmpplaylist), core::mem::transmute_copy(&pvbool)).into() + IWMPPlaylist_Impl::get_isIdentical(this, core::mem::transmute_copy(&piwmpplaylist), core::mem::transmute_copy(&pvbool)).into() } unsafe extern "system" fn clear(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9658,15 +9658,15 @@ impl IWMPPlaylist_Vtbl { } unsafe extern "system" fn insertItem(this: *mut core::ffi::c_void, lindex: i32, piwmpmedia: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPPlaylist_Impl::insertItem(this, core::mem::transmute_copy(&lindex), windows_core::from_raw_borrowed(&piwmpmedia)).into() + IWMPPlaylist_Impl::insertItem(this, core::mem::transmute_copy(&lindex), core::mem::transmute_copy(&piwmpmedia)).into() } unsafe extern "system" fn appendItem(this: *mut core::ffi::c_void, piwmpmedia: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPPlaylist_Impl::appendItem(this, windows_core::from_raw_borrowed(&piwmpmedia)).into() + IWMPPlaylist_Impl::appendItem(this, core::mem::transmute_copy(&piwmpmedia)).into() } unsafe extern "system" fn removeItem(this: *mut core::ffi::c_void, piwmpmedia: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPPlaylist_Impl::removeItem(this, windows_core::from_raw_borrowed(&piwmpmedia)).into() + IWMPPlaylist_Impl::removeItem(this, core::mem::transmute_copy(&piwmpmedia)).into() } unsafe extern "system" fn moveItem(this: *mut core::ffi::c_void, lindexold: i32, lindexnew: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9822,10 +9822,10 @@ pub trait IWMPPlaylistCollection_Impl: super::super::System::Com::IDispatch_Impl fn newPlaylist(&self, bstrname: &windows_core::BSTR) -> windows_core::Result; fn getAll(&self) -> windows_core::Result; fn getByName(&self, bstrname: &windows_core::BSTR) -> windows_core::Result; - fn remove(&self, pitem: Option<&IWMPPlaylist>) -> windows_core::Result<()>; - fn setDeleted(&self, pitem: Option<&IWMPPlaylist>, varfisdeleted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn isDeleted(&self, pitem: Option<&IWMPPlaylist>, pvarfisdeleted: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn importPlaylist(&self, pitem: Option<&IWMPPlaylist>) -> windows_core::Result; + fn remove(&self, pitem: windows_core::Ref<'_, IWMPPlaylist>) -> windows_core::Result<()>; + fn setDeleted(&self, pitem: windows_core::Ref<'_, IWMPPlaylist>, varfisdeleted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn isDeleted(&self, pitem: windows_core::Ref<'_, IWMPPlaylist>, pvarfisdeleted: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn importPlaylist(&self, pitem: windows_core::Ref<'_, IWMPPlaylist>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IWMPPlaylistCollection_Vtbl { @@ -9862,19 +9862,19 @@ impl IWMPPlaylistCollection_Vtbl { } unsafe extern "system" fn remove(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPPlaylistCollection_Impl::remove(this, windows_core::from_raw_borrowed(&pitem)).into() + IWMPPlaylistCollection_Impl::remove(this, core::mem::transmute_copy(&pitem)).into() } unsafe extern "system" fn setDeleted(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void, varfisdeleted: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPPlaylistCollection_Impl::setDeleted(this, windows_core::from_raw_borrowed(&pitem), core::mem::transmute_copy(&varfisdeleted)).into() + IWMPPlaylistCollection_Impl::setDeleted(this, core::mem::transmute_copy(&pitem), core::mem::transmute_copy(&varfisdeleted)).into() } unsafe extern "system" fn isDeleted(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void, pvarfisdeleted: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPPlaylistCollection_Impl::isDeleted(this, windows_core::from_raw_borrowed(&pitem), core::mem::transmute_copy(&pvarfisdeleted)).into() + IWMPPlaylistCollection_Impl::isDeleted(this, core::mem::transmute_copy(&pitem), core::mem::transmute_copy(&pvarfisdeleted)).into() } unsafe extern "system" fn importPlaylist(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void, ppimporteditem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWMPPlaylistCollection_Impl::importPlaylist(this, windows_core::from_raw_borrowed(&pitem)) { + match IWMPPlaylistCollection_Impl::importPlaylist(this, core::mem::transmute_copy(&pitem)) { Ok(ok__) => { ppimporteditem.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9939,7 +9939,7 @@ pub trait IWMPPlugin_Impl: windows_core::IUnknownImpl { fn Shutdown(&self) -> windows_core::Result<()>; fn GetID(&self, pguid: *mut windows_core::GUID) -> windows_core::Result<()>; fn GetCaps(&self, pdwflags: *mut u32) -> windows_core::Result<()>; - fn AdviseWMPServices(&self, pwmpservices: Option<&IWMPServices>) -> windows_core::Result<()>; + fn AdviseWMPServices(&self, pwmpservices: windows_core::Ref<'_, IWMPServices>) -> windows_core::Result<()>; fn UnAdviseWMPServices(&self) -> windows_core::Result<()>; } impl IWMPPlugin_Vtbl { @@ -9962,7 +9962,7 @@ impl IWMPPlugin_Vtbl { } unsafe extern "system" fn AdviseWMPServices(this: *mut core::ffi::c_void, pwmpservices: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPPlugin_Impl::AdviseWMPServices(this, windows_core::from_raw_borrowed(&pwmpservices)).into() + IWMPPlugin_Impl::AdviseWMPServices(this, core::mem::transmute_copy(&pwmpservices)).into() } unsafe extern "system" fn UnAdviseWMPServices(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10087,7 +10087,7 @@ pub struct IWMPPluginUI_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IWMPPluginUI_Impl: windows_core::IUnknownImpl { - fn SetCore(&self, pcore: Option<&IWMPCore>) -> windows_core::Result<()>; + fn SetCore(&self, pcore: windows_core::Ref<'_, IWMPCore>) -> windows_core::Result<()>; fn Create(&self, hwndparent: super::super::Foundation::HWND, phwndwindow: *mut super::super::Foundation::HWND) -> windows_core::Result<()>; fn Destroy(&self) -> windows_core::Result<()>; fn DisplayPropertyPage(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()>; @@ -10100,7 +10100,7 @@ impl IWMPPluginUI_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetCore(this: *mut core::ffi::c_void, pcore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPPluginUI_Impl::SetCore(this, windows_core::from_raw_borrowed(&pcore)).into() + IWMPPluginUI_Impl::SetCore(this, core::mem::transmute_copy(&pcore)).into() } unsafe extern "system" fn Create(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, phwndwindow: *mut super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10230,7 +10230,7 @@ pub struct IWMPRemoteMediaServices_Vtbl { pub trait IWMPRemoteMediaServices_Impl: windows_core::IUnknownImpl { fn GetServiceType(&self, pbstrtype: *mut windows_core::BSTR) -> windows_core::Result<()>; fn GetApplicationName(&self, pbstrname: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn GetScriptableObject(&self, pbstrname: *mut windows_core::BSTR, ppdispatch: *mut Option) -> windows_core::Result<()>; + fn GetScriptableObject(&self, pbstrname: *mut windows_core::BSTR, ppdispatch: windows_core::OutRef<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn GetCustomUIMode(&self, pbstrfile: *mut windows_core::BSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -10801,7 +10801,7 @@ pub struct IWMPStringCollection2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IWMPStringCollection2_Impl: IWMPStringCollection_Impl { - fn isIdentical(&self, piwmpstringcollection2: Option<&IWMPStringCollection2>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn isIdentical(&self, piwmpstringcollection2: windows_core::Ref<'_, IWMPStringCollection2>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn getItemInfo(&self, lcollectionindex: i32, bstritemname: &windows_core::BSTR, pbstrvalue: *mut windows_core::BSTR) -> windows_core::Result<()>; fn getAttributeCountByType(&self, lcollectionindex: i32, bstrtype: &windows_core::BSTR, bstrlanguage: &windows_core::BSTR, plcount: *mut i32) -> windows_core::Result<()>; fn getItemInfoByType(&self, lcollectionindex: i32, bstrtype: &windows_core::BSTR, bstrlanguage: &windows_core::BSTR, lattributeindex: i32, pvarvalue: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()>; @@ -10811,7 +10811,7 @@ impl IWMPStringCollection2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn isIdentical(this: *mut core::ffi::c_void, piwmpstringcollection2: *mut core::ffi::c_void, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPStringCollection2_Impl::isIdentical(this, windows_core::from_raw_borrowed(&piwmpstringcollection2), core::mem::transmute_copy(&pvbool)).into() + IWMPStringCollection2_Impl::isIdentical(this, core::mem::transmute_copy(&piwmpstringcollection2), core::mem::transmute_copy(&pvbool)).into() } unsafe extern "system" fn getItemInfo(this: *mut core::ffi::c_void, lcollectionindex: i32, bstritemname: *mut core::ffi::c_void, pbstrvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10886,9 +10886,9 @@ pub struct IWMPSubscriptionService_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWMPSubscriptionService_Impl: windows_core::IUnknownImpl { - fn allowPlay(&self, hwnd: super::super::Foundation::HWND, pmedia: Option<&IWMPMedia>, pfallowplay: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn allowCDBurn(&self, hwnd: super::super::Foundation::HWND, pplaylist: Option<&IWMPPlaylist>, pfallowburn: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn allowPDATransfer(&self, hwnd: super::super::Foundation::HWND, pplaylist: Option<&IWMPPlaylist>, pfallowtransfer: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn allowPlay(&self, hwnd: super::super::Foundation::HWND, pmedia: windows_core::Ref<'_, IWMPMedia>, pfallowplay: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn allowCDBurn(&self, hwnd: super::super::Foundation::HWND, pplaylist: windows_core::Ref<'_, IWMPPlaylist>, pfallowburn: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn allowPDATransfer(&self, hwnd: super::super::Foundation::HWND, pplaylist: windows_core::Ref<'_, IWMPPlaylist>, pfallowtransfer: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn startBackgroundProcessing(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -10896,15 +10896,15 @@ impl IWMPSubscriptionService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn allowPlay(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, pmedia: *mut core::ffi::c_void, pfallowplay: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPSubscriptionService_Impl::allowPlay(this, core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&pmedia), core::mem::transmute_copy(&pfallowplay)).into() + IWMPSubscriptionService_Impl::allowPlay(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&pmedia), core::mem::transmute_copy(&pfallowplay)).into() } unsafe extern "system" fn allowCDBurn(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, pplaylist: *mut core::ffi::c_void, pfallowburn: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPSubscriptionService_Impl::allowCDBurn(this, core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&pplaylist), core::mem::transmute_copy(&pfallowburn)).into() + IWMPSubscriptionService_Impl::allowCDBurn(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&pplaylist), core::mem::transmute_copy(&pfallowburn)).into() } unsafe extern "system" fn allowPDATransfer(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, pplaylist: *mut core::ffi::c_void, pfallowtransfer: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPSubscriptionService_Impl::allowPDATransfer(this, core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&pplaylist), core::mem::transmute_copy(&pfallowtransfer)).into() + IWMPSubscriptionService_Impl::allowPDATransfer(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&pplaylist), core::mem::transmute_copy(&pfallowtransfer)).into() } unsafe extern "system" fn startBackgroundProcessing(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10964,8 +10964,8 @@ pub struct IWMPSubscriptionService2_Vtbl { pub trait IWMPSubscriptionService2_Impl: IWMPSubscriptionService_Impl { fn stopBackgroundProcessing(&self) -> windows_core::Result<()>; fn serviceEvent(&self, event: WMPSubscriptionServiceEvent) -> windows_core::Result<()>; - fn deviceAvailable(&self, bstrdevicename: &windows_core::BSTR, pcb: Option<&IWMPSubscriptionServiceCallback>) -> windows_core::Result<()>; - fn prepareForSync(&self, bstrfilename: &windows_core::BSTR, bstrdevicename: &windows_core::BSTR, pcb: Option<&IWMPSubscriptionServiceCallback>) -> windows_core::Result<()>; + fn deviceAvailable(&self, bstrdevicename: &windows_core::BSTR, pcb: windows_core::Ref<'_, IWMPSubscriptionServiceCallback>) -> windows_core::Result<()>; + fn prepareForSync(&self, bstrfilename: &windows_core::BSTR, bstrdevicename: &windows_core::BSTR, pcb: windows_core::Ref<'_, IWMPSubscriptionServiceCallback>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IWMPSubscriptionService2_Vtbl { @@ -10980,11 +10980,11 @@ impl IWMPSubscriptionService2_Vtbl { } unsafe extern "system" fn deviceAvailable(this: *mut core::ffi::c_void, bstrdevicename: *mut core::ffi::c_void, pcb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPSubscriptionService2_Impl::deviceAvailable(this, core::mem::transmute(&bstrdevicename), windows_core::from_raw_borrowed(&pcb)).into() + IWMPSubscriptionService2_Impl::deviceAvailable(this, core::mem::transmute(&bstrdevicename), core::mem::transmute_copy(&pcb)).into() } unsafe extern "system" fn prepareForSync(this: *mut core::ffi::c_void, bstrfilename: *mut core::ffi::c_void, bstrdevicename: *mut core::ffi::c_void, pcb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPSubscriptionService2_Impl::prepareForSync(this, core::mem::transmute(&bstrfilename), core::mem::transmute(&bstrdevicename), windows_core::from_raw_borrowed(&pcb)).into() + IWMPSubscriptionService2_Impl::prepareForSync(this, core::mem::transmute(&bstrfilename), core::mem::transmute(&bstrdevicename), core::mem::transmute_copy(&pcb)).into() } Self { base__: IWMPSubscriptionService_Vtbl::new::(), @@ -11119,7 +11119,7 @@ pub trait IWMPSyncDevice_Impl: windows_core::IUnknownImpl { fn start(&self) -> windows_core::Result<()>; fn stop(&self) -> windows_core::Result<()>; fn showSettings(&self) -> windows_core::Result<()>; - fn isIdentical(&self, pdevice: Option<&IWMPSyncDevice>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn isIdentical(&self, pdevice: windows_core::Ref<'_, IWMPSyncDevice>, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } impl IWMPSyncDevice_Vtbl { pub const fn new() -> Self { @@ -11185,7 +11185,7 @@ impl IWMPSyncDevice_Vtbl { } unsafe extern "system" fn isIdentical(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, pvbool: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPSyncDevice_Impl::isIdentical(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&pvbool)).into() + IWMPSyncDevice_Impl::isIdentical(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&pvbool)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -11278,7 +11278,7 @@ pub struct IWMPSyncDevice3_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWMPSyncDevice3_Impl: IWMPSyncDevice2_Impl { - fn estimateSyncSize(&self, pnonruleplaylist: Option<&IWMPPlaylist>, prulesplaylist: Option<&IWMPPlaylist>) -> windows_core::Result<()>; + fn estimateSyncSize(&self, pnonruleplaylist: windows_core::Ref<'_, IWMPPlaylist>, prulesplaylist: windows_core::Ref<'_, IWMPPlaylist>) -> windows_core::Result<()>; fn cancelEstimation(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -11286,7 +11286,7 @@ impl IWMPSyncDevice3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn estimateSyncSize(this: *mut core::ffi::c_void, pnonruleplaylist: *mut core::ffi::c_void, prulesplaylist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPSyncDevice3_Impl::estimateSyncSize(this, windows_core::from_raw_borrowed(&pnonruleplaylist), windows_core::from_raw_borrowed(&prulesplaylist)).into() + IWMPSyncDevice3_Impl::estimateSyncSize(this, core::mem::transmute_copy(&pnonruleplaylist), core::mem::transmute_copy(&prulesplaylist)).into() } unsafe extern "system" fn cancelEstimation(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11429,14 +11429,14 @@ pub struct IWMPVideoRenderConfig_Vtbl { } #[cfg(feature = "Win32_Media_MediaFoundation")] pub trait IWMPVideoRenderConfig_Impl: windows_core::IUnknownImpl { - fn SetpresenterActivate(&self, pactivate: Option<&super::MediaFoundation::IMFActivate>) -> windows_core::Result<()>; + fn SetpresenterActivate(&self, pactivate: windows_core::Ref<'_, super::MediaFoundation::IMFActivate>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_MediaFoundation")] impl IWMPVideoRenderConfig_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetpresenterActivate(this: *mut core::ffi::c_void, pactivate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPVideoRenderConfig_Impl::SetpresenterActivate(this, windows_core::from_raw_borrowed(&pactivate)).into() + IWMPVideoRenderConfig_Impl::SetpresenterActivate(this, core::mem::transmute_copy(&pactivate)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetpresenterActivate: SetpresenterActivate:: } } @@ -11750,7 +11750,7 @@ pub trait IXFeed_Impl: windows_core::IUnknownImpl { fn SetDownloadEnclosuresAutomatically(&self, bdownloadenclosuresautomatically: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn DownloadStatus(&self) -> windows_core::Result; fn LastDownloadError(&self) -> windows_core::Result; - fn Merge(&self, pstream: Option<&super::super::System::Com::IStream>, pszurl: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn Merge(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, pszurl: &windows_core::PCWSTR) -> windows_core::Result<()>; fn DownloadUrl(&self) -> windows_core::Result; fn Title(&self) -> windows_core::Result; fn Description(&self) -> windows_core::Result; @@ -11977,7 +11977,7 @@ impl IXFeed_Vtbl { } unsafe extern "system" fn Merge(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXFeed_Impl::Merge(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute(&pszurl)).into() + IXFeed_Impl::Merge(this, core::mem::transmute_copy(&pstream), core::mem::transmute(&pszurl)).into() } unsafe extern "system" fn DownloadUrl(this: *mut core::ffi::c_void, ppszurl: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13675,7 +13675,7 @@ pub trait IXFeedsManager_Impl: windows_core::IUnknownImpl { fn DefaultInterval(&self) -> windows_core::Result; fn SetDefaultInterval(&self, uiinterval: u32) -> windows_core::Result<()>; fn AsyncSyncAll(&self) -> windows_core::Result<()>; - fn Normalize(&self, pstreamin: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn Normalize(&self, pstreamin: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn ItemCountLimit(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -13769,7 +13769,7 @@ impl IXFeedsManager_Vtbl { } unsafe extern "system" fn Normalize(this: *mut core::ffi::c_void, pstreamin: *mut core::ffi::c_void, ppstreamout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXFeedsManager_Impl::Normalize(this, windows_core::from_raw_borrowed(&pstreamin)) { + match IXFeedsManager_Impl::Normalize(this, core::mem::transmute_copy(&pstreamin)) { Ok(ok__) => { ppstreamout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs index 6634f107a6..5d31b4afa6 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs @@ -2024,9 +2024,9 @@ pub struct IAVIEditStream_Vtbl { pub SetInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *const AVISTREAMINFOW, i32) -> windows_core::HRESULT, } pub trait IAVIEditStream_Impl: windows_core::IUnknownImpl { - fn Cut(&self, plstart: *mut i32, pllength: *mut i32, ppresult: *mut Option) -> windows_core::Result<()>; - fn Copy(&self, plstart: *mut i32, pllength: *mut i32, ppresult: *mut Option) -> windows_core::Result<()>; - fn Paste(&self, plpos: *mut i32, pllength: *mut i32, pstream: Option<&IAVIStream>, lstart: i32, lend: i32) -> windows_core::Result<()>; + fn Cut(&self, plstart: *mut i32, pllength: *mut i32, ppresult: windows_core::OutRef<'_, IAVIStream>) -> windows_core::Result<()>; + fn Copy(&self, plstart: *mut i32, pllength: *mut i32, ppresult: windows_core::OutRef<'_, IAVIStream>) -> windows_core::Result<()>; + fn Paste(&self, plpos: *mut i32, pllength: *mut i32, pstream: windows_core::Ref<'_, IAVIStream>, lstart: i32, lend: i32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; fn SetInfo(&self, lpinfo: *const AVISTREAMINFOW, cbinfo: i32) -> windows_core::Result<()>; } @@ -2042,7 +2042,7 @@ impl IAVIEditStream_Vtbl { } unsafe extern "system" fn Paste(this: *mut core::ffi::c_void, plpos: *mut i32, pllength: *mut i32, pstream: *mut core::ffi::c_void, lstart: i32, lend: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAVIEditStream_Impl::Paste(this, core::mem::transmute_copy(&plpos), core::mem::transmute_copy(&pllength), windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&lstart), core::mem::transmute_copy(&lend)).into() + IAVIEditStream_Impl::Paste(this, core::mem::transmute_copy(&plpos), core::mem::transmute_copy(&pllength), core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&lstart), core::mem::transmute_copy(&lend)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2110,8 +2110,8 @@ pub struct IAVIFile_Vtbl { } pub trait IAVIFile_Impl: windows_core::IUnknownImpl { fn Info(&self, pfi: *mut AVIFILEINFOW, lsize: i32) -> windows_core::Result<()>; - fn GetStream(&self, ppstream: *mut Option, fcctype: u32, lparam: i32) -> windows_core::Result<()>; - fn CreateStream(&self, ppstream: *mut Option, psi: *const AVISTREAMINFOW) -> windows_core::Result<()>; + fn GetStream(&self, ppstream: windows_core::OutRef<'_, IAVIStream>, fcctype: u32, lparam: i32) -> windows_core::Result<()>; + fn CreateStream(&self, ppstream: windows_core::OutRef<'_, IAVIStream>, psi: *const AVISTREAMINFOW) -> windows_core::Result<()>; fn WriteData(&self, ckid: u32, lpdata: *const core::ffi::c_void, cbdata: i32) -> windows_core::Result<()>; fn ReadData(&self, ckid: u32, lpdata: *mut core::ffi::c_void, lpcbdata: *mut i32) -> windows_core::Result<()>; fn EndRecord(&self) -> windows_core::Result<()>; diff --git a/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs index 5504023e7e..2242a3c732 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs @@ -61,7 +61,7 @@ pub struct IPhotoAcquire_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IPhotoAcquire_Impl: windows_core::IUnknownImpl { fn CreatePhotoSource(&self, pszdevice: &windows_core::PCWSTR) -> windows_core::Result; - fn Acquire(&self, pphotoacquiresource: Option<&IPhotoAcquireSource>, fshowprogress: super::super::Foundation::BOOL, hwndparent: super::super::Foundation::HWND, pszapplicationname: &windows_core::PCWSTR, pphotoacquireprogresscb: Option<&IPhotoAcquireProgressCB>) -> windows_core::Result<()>; + fn Acquire(&self, pphotoacquiresource: windows_core::Ref<'_, IPhotoAcquireSource>, fshowprogress: super::super::Foundation::BOOL, hwndparent: super::super::Foundation::HWND, pszapplicationname: &windows_core::PCWSTR, pphotoacquireprogresscb: windows_core::Ref<'_, IPhotoAcquireProgressCB>) -> windows_core::Result<()>; fn EnumResults(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -79,7 +79,7 @@ impl IPhotoAcquire_Vtbl { } unsafe extern "system" fn Acquire(this: *mut core::ffi::c_void, pphotoacquiresource: *mut core::ffi::c_void, fshowprogress: super::super::Foundation::BOOL, hwndparent: super::super::Foundation::HWND, pszapplicationname: windows_core::PCWSTR, pphotoacquireprogresscb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquire_Impl::Acquire(this, windows_core::from_raw_borrowed(&pphotoacquiresource), core::mem::transmute_copy(&fshowprogress), core::mem::transmute_copy(&hwndparent), core::mem::transmute(&pszapplicationname), windows_core::from_raw_borrowed(&pphotoacquireprogresscb)).into() + IPhotoAcquire_Impl::Acquire(this, core::mem::transmute_copy(&pphotoacquiresource), core::mem::transmute_copy(&fshowprogress), core::mem::transmute_copy(&hwndparent), core::mem::transmute(&pszapplicationname), core::mem::transmute_copy(&pphotoacquireprogresscb)).into() } unsafe extern "system" fn EnumResults(this: *mut core::ffi::c_void, ppenumfilepaths: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -461,8 +461,8 @@ pub struct IPhotoAcquirePlugin_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_PropertiesSystem"))] pub trait IPhotoAcquirePlugin_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pphotoacquiresource: Option<&IPhotoAcquireSource>, pphotoacquireprogresscb: Option<&IPhotoAcquireProgressCB>) -> windows_core::Result<()>; - fn ProcessItem(&self, dwacquirestage: u32, pphotoacquireitem: Option<&IPhotoAcquireItem>, poriginalitemstream: Option<&super::super::System::Com::IStream>, pszfinalfilename: &windows_core::PCWSTR, ppropertystore: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn Initialize(&self, pphotoacquiresource: windows_core::Ref<'_, IPhotoAcquireSource>, pphotoacquireprogresscb: windows_core::Ref<'_, IPhotoAcquireProgressCB>) -> windows_core::Result<()>; + fn ProcessItem(&self, dwacquirestage: u32, pphotoacquireitem: windows_core::Ref<'_, IPhotoAcquireItem>, poriginalitemstream: windows_core::Ref<'_, super::super::System::Com::IStream>, pszfinalfilename: &windows_core::PCWSTR, ppropertystore: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; fn TransferComplete(&self, hr: windows_core::HRESULT) -> windows_core::Result<()>; fn DisplayConfigureDialog(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()>; } @@ -471,11 +471,11 @@ impl IPhotoAcquirePlugin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pphotoacquiresource: *mut core::ffi::c_void, pphotoacquireprogresscb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquirePlugin_Impl::Initialize(this, windows_core::from_raw_borrowed(&pphotoacquiresource), windows_core::from_raw_borrowed(&pphotoacquireprogresscb)).into() + IPhotoAcquirePlugin_Impl::Initialize(this, core::mem::transmute_copy(&pphotoacquiresource), core::mem::transmute_copy(&pphotoacquireprogresscb)).into() } unsafe extern "system" fn ProcessItem(this: *mut core::ffi::c_void, dwacquirestage: u32, pphotoacquireitem: *mut core::ffi::c_void, poriginalitemstream: *mut core::ffi::c_void, pszfinalfilename: windows_core::PCWSTR, ppropertystore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquirePlugin_Impl::ProcessItem(this, core::mem::transmute_copy(&dwacquirestage), windows_core::from_raw_borrowed(&pphotoacquireitem), windows_core::from_raw_borrowed(&poriginalitemstream), core::mem::transmute(&pszfinalfilename), windows_core::from_raw_borrowed(&ppropertystore)).into() + IPhotoAcquirePlugin_Impl::ProcessItem(this, core::mem::transmute_copy(&dwacquirestage), core::mem::transmute_copy(&pphotoacquireitem), core::mem::transmute_copy(&poriginalitemstream), core::mem::transmute(&pszfinalfilename), core::mem::transmute_copy(&ppropertystore)).into() } unsafe extern "system" fn TransferComplete(this: *mut core::ffi::c_void, hr: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -626,24 +626,24 @@ pub struct IPhotoAcquireProgressCB_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IPhotoAcquireProgressCB_Impl: windows_core::IUnknownImpl { fn Cancelled(&self) -> windows_core::Result; - fn StartEnumeration(&self, pphotoacquiresource: Option<&IPhotoAcquireSource>) -> windows_core::Result<()>; - fn FoundItem(&self, pphotoacquireitem: Option<&IPhotoAcquireItem>) -> windows_core::Result<()>; + fn StartEnumeration(&self, pphotoacquiresource: windows_core::Ref<'_, IPhotoAcquireSource>) -> windows_core::Result<()>; + fn FoundItem(&self, pphotoacquireitem: windows_core::Ref<'_, IPhotoAcquireItem>) -> windows_core::Result<()>; fn EndEnumeration(&self, hr: windows_core::HRESULT) -> windows_core::Result<()>; - fn StartTransfer(&self, pphotoacquiresource: Option<&IPhotoAcquireSource>) -> windows_core::Result<()>; - fn StartItemTransfer(&self, nitemindex: u32, pphotoacquireitem: Option<&IPhotoAcquireItem>) -> windows_core::Result<()>; + fn StartTransfer(&self, pphotoacquiresource: windows_core::Ref<'_, IPhotoAcquireSource>) -> windows_core::Result<()>; + fn StartItemTransfer(&self, nitemindex: u32, pphotoacquireitem: windows_core::Ref<'_, IPhotoAcquireItem>) -> windows_core::Result<()>; fn DirectoryCreated(&self, pszdirectory: &windows_core::PCWSTR) -> windows_core::Result<()>; fn UpdateTransferPercent(&self, foverall: super::super::Foundation::BOOL, npercent: u32) -> windows_core::Result<()>; - fn EndItemTransfer(&self, nitemindex: u32, pphotoacquireitem: Option<&IPhotoAcquireItem>, hr: windows_core::HRESULT) -> windows_core::Result<()>; + fn EndItemTransfer(&self, nitemindex: u32, pphotoacquireitem: windows_core::Ref<'_, IPhotoAcquireItem>, hr: windows_core::HRESULT) -> windows_core::Result<()>; fn EndTransfer(&self, hr: windows_core::HRESULT) -> windows_core::Result<()>; - fn StartDelete(&self, pphotoacquiresource: Option<&IPhotoAcquireSource>) -> windows_core::Result<()>; - fn StartItemDelete(&self, nitemindex: u32, pphotoacquireitem: Option<&IPhotoAcquireItem>) -> windows_core::Result<()>; + fn StartDelete(&self, pphotoacquiresource: windows_core::Ref<'_, IPhotoAcquireSource>) -> windows_core::Result<()>; + fn StartItemDelete(&self, nitemindex: u32, pphotoacquireitem: windows_core::Ref<'_, IPhotoAcquireItem>) -> windows_core::Result<()>; fn UpdateDeletePercent(&self, npercent: u32) -> windows_core::Result<()>; - fn EndItemDelete(&self, nitemindex: u32, pphotoacquireitem: Option<&IPhotoAcquireItem>, hr: windows_core::HRESULT) -> windows_core::Result<()>; + fn EndItemDelete(&self, nitemindex: u32, pphotoacquireitem: windows_core::Ref<'_, IPhotoAcquireItem>, hr: windows_core::HRESULT) -> windows_core::Result<()>; fn EndDelete(&self, hr: windows_core::HRESULT) -> windows_core::Result<()>; fn EndSession(&self, hr: windows_core::HRESULT) -> windows_core::Result<()>; fn GetDeleteAfterAcquire(&self) -> windows_core::Result; fn ErrorAdvise(&self, hr: windows_core::HRESULT, pszerrormessage: &windows_core::PCWSTR, nmessagetype: ERROR_ADVISE_MESSAGE_TYPE) -> windows_core::Result; - fn GetUserInput(&self, riidtype: *const windows_core::GUID, punknown: Option<&windows_core::IUnknown>, ppropvarresult: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, ppropvardefault: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; + fn GetUserInput(&self, riidtype: *const windows_core::GUID, punknown: windows_core::Ref<'_, windows_core::IUnknown>, ppropvarresult: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, ppropvardefault: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IPhotoAcquireProgressCB_Vtbl { @@ -660,11 +660,11 @@ impl IPhotoAcquireProgressCB_Vtbl { } unsafe extern "system" fn StartEnumeration(this: *mut core::ffi::c_void, pphotoacquiresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireProgressCB_Impl::StartEnumeration(this, windows_core::from_raw_borrowed(&pphotoacquiresource)).into() + IPhotoAcquireProgressCB_Impl::StartEnumeration(this, core::mem::transmute_copy(&pphotoacquiresource)).into() } unsafe extern "system" fn FoundItem(this: *mut core::ffi::c_void, pphotoacquireitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireProgressCB_Impl::FoundItem(this, windows_core::from_raw_borrowed(&pphotoacquireitem)).into() + IPhotoAcquireProgressCB_Impl::FoundItem(this, core::mem::transmute_copy(&pphotoacquireitem)).into() } unsafe extern "system" fn EndEnumeration(this: *mut core::ffi::c_void, hr: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -672,11 +672,11 @@ impl IPhotoAcquireProgressCB_Vtbl { } unsafe extern "system" fn StartTransfer(this: *mut core::ffi::c_void, pphotoacquiresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireProgressCB_Impl::StartTransfer(this, windows_core::from_raw_borrowed(&pphotoacquiresource)).into() + IPhotoAcquireProgressCB_Impl::StartTransfer(this, core::mem::transmute_copy(&pphotoacquiresource)).into() } unsafe extern "system" fn StartItemTransfer(this: *mut core::ffi::c_void, nitemindex: u32, pphotoacquireitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireProgressCB_Impl::StartItemTransfer(this, core::mem::transmute_copy(&nitemindex), windows_core::from_raw_borrowed(&pphotoacquireitem)).into() + IPhotoAcquireProgressCB_Impl::StartItemTransfer(this, core::mem::transmute_copy(&nitemindex), core::mem::transmute_copy(&pphotoacquireitem)).into() } unsafe extern "system" fn DirectoryCreated(this: *mut core::ffi::c_void, pszdirectory: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -688,7 +688,7 @@ impl IPhotoAcquireProgressCB_Vtbl { } unsafe extern "system" fn EndItemTransfer(this: *mut core::ffi::c_void, nitemindex: u32, pphotoacquireitem: *mut core::ffi::c_void, hr: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireProgressCB_Impl::EndItemTransfer(this, core::mem::transmute_copy(&nitemindex), windows_core::from_raw_borrowed(&pphotoacquireitem), core::mem::transmute_copy(&hr)).into() + IPhotoAcquireProgressCB_Impl::EndItemTransfer(this, core::mem::transmute_copy(&nitemindex), core::mem::transmute_copy(&pphotoacquireitem), core::mem::transmute_copy(&hr)).into() } unsafe extern "system" fn EndTransfer(this: *mut core::ffi::c_void, hr: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -696,11 +696,11 @@ impl IPhotoAcquireProgressCB_Vtbl { } unsafe extern "system" fn StartDelete(this: *mut core::ffi::c_void, pphotoacquiresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireProgressCB_Impl::StartDelete(this, windows_core::from_raw_borrowed(&pphotoacquiresource)).into() + IPhotoAcquireProgressCB_Impl::StartDelete(this, core::mem::transmute_copy(&pphotoacquiresource)).into() } unsafe extern "system" fn StartItemDelete(this: *mut core::ffi::c_void, nitemindex: u32, pphotoacquireitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireProgressCB_Impl::StartItemDelete(this, core::mem::transmute_copy(&nitemindex), windows_core::from_raw_borrowed(&pphotoacquireitem)).into() + IPhotoAcquireProgressCB_Impl::StartItemDelete(this, core::mem::transmute_copy(&nitemindex), core::mem::transmute_copy(&pphotoacquireitem)).into() } unsafe extern "system" fn UpdateDeletePercent(this: *mut core::ffi::c_void, npercent: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -708,7 +708,7 @@ impl IPhotoAcquireProgressCB_Vtbl { } unsafe extern "system" fn EndItemDelete(this: *mut core::ffi::c_void, nitemindex: u32, pphotoacquireitem: *mut core::ffi::c_void, hr: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireProgressCB_Impl::EndItemDelete(this, core::mem::transmute_copy(&nitemindex), windows_core::from_raw_borrowed(&pphotoacquireitem), core::mem::transmute_copy(&hr)).into() + IPhotoAcquireProgressCB_Impl::EndItemDelete(this, core::mem::transmute_copy(&nitemindex), core::mem::transmute_copy(&pphotoacquireitem), core::mem::transmute_copy(&hr)).into() } unsafe extern "system" fn EndDelete(this: *mut core::ffi::c_void, hr: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -740,7 +740,7 @@ impl IPhotoAcquireProgressCB_Vtbl { } unsafe extern "system" fn GetUserInput(this: *mut core::ffi::c_void, riidtype: *const windows_core::GUID, punknown: *mut core::ffi::c_void, ppropvarresult: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, ppropvardefault: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireProgressCB_Impl::GetUserInput(this, core::mem::transmute_copy(&riidtype), windows_core::from_raw_borrowed(&punknown), core::mem::transmute_copy(&ppropvarresult), core::mem::transmute_copy(&ppropvardefault)).into() + IPhotoAcquireProgressCB_Impl::GetUserInput(this, core::mem::transmute_copy(&riidtype), core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&ppropvarresult), core::mem::transmute_copy(&ppropvardefault)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1029,7 +1029,7 @@ pub struct IPhotoAcquireSource_Vtbl { pub trait IPhotoAcquireSource_Impl: windows_core::IUnknownImpl { fn GetFriendlyName(&self) -> windows_core::Result; fn GetDeviceIcons(&self, nsize: u32, phlargeicon: *mut super::super::UI::WindowsAndMessaging::HICON, phsmallicon: *mut super::super::UI::WindowsAndMessaging::HICON) -> windows_core::Result<()>; - fn InitializeItemList(&self, fforceenumeration: super::super::Foundation::BOOL, pphotoacquireprogresscb: Option<&IPhotoAcquireProgressCB>, pnitemcount: *mut u32) -> windows_core::Result<()>; + fn InitializeItemList(&self, fforceenumeration: super::super::Foundation::BOOL, pphotoacquireprogresscb: windows_core::Ref<'_, IPhotoAcquireProgressCB>, pnitemcount: *mut u32) -> windows_core::Result<()>; fn GetItemCount(&self) -> windows_core::Result; fn GetItemAt(&self, nindex: u32) -> windows_core::Result; fn GetPhotoAcquireSettings(&self) -> windows_core::Result; @@ -1055,7 +1055,7 @@ impl IPhotoAcquireSource_Vtbl { } unsafe extern "system" fn InitializeItemList(this: *mut core::ffi::c_void, fforceenumeration: super::super::Foundation::BOOL, pphotoacquireprogresscb: *mut core::ffi::c_void, pnitemcount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoAcquireSource_Impl::InitializeItemList(this, core::mem::transmute_copy(&fforceenumeration), windows_core::from_raw_borrowed(&pphotoacquireprogresscb), core::mem::transmute_copy(&pnitemcount)).into() + IPhotoAcquireSource_Impl::InitializeItemList(this, core::mem::transmute_copy(&fforceenumeration), core::mem::transmute_copy(&pphotoacquireprogresscb), core::mem::transmute_copy(&pnitemcount)).into() } unsafe extern "system" fn GetItemCount(this: *mut core::ffi::c_void, pnitemcount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1277,11 +1277,11 @@ pub trait IPhotoProgressDialog_Impl: windows_core::IUnknownImpl { fn SetImage(&self, nimagetype: PROGRESS_DIALOG_IMAGE_TYPE, hicon: super::super::UI::WindowsAndMessaging::HICON, hbitmap: super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()>; fn SetPercentComplete(&self, npercent: i32) -> windows_core::Result<()>; fn SetProgressText(&self, pszprogresstext: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetActionLinkCallback(&self, pphotoprogressactioncb: Option<&IPhotoProgressActionCB>) -> windows_core::Result<()>; + fn SetActionLinkCallback(&self, pphotoprogressactioncb: windows_core::Ref<'_, IPhotoProgressActionCB>) -> windows_core::Result<()>; fn SetActionLinkText(&self, pszcaption: &windows_core::PCWSTR) -> windows_core::Result<()>; fn ShowActionLink(&self, fshow: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn IsCancelled(&self) -> windows_core::Result; - fn GetUserInput(&self, riidtype: *const windows_core::GUID, punknown: Option<&windows_core::IUnknown>, ppropvarresult: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, ppropvardefault: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; + fn GetUserInput(&self, riidtype: *const windows_core::GUID, punknown: windows_core::Ref<'_, windows_core::IUnknown>, ppropvarresult: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, ppropvardefault: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_WindowsAndMessaging"))] impl IPhotoProgressDialog_Vtbl { @@ -1352,7 +1352,7 @@ impl IPhotoProgressDialog_Vtbl { } unsafe extern "system" fn SetActionLinkCallback(this: *mut core::ffi::c_void, pphotoprogressactioncb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoProgressDialog_Impl::SetActionLinkCallback(this, windows_core::from_raw_borrowed(&pphotoprogressactioncb)).into() + IPhotoProgressDialog_Impl::SetActionLinkCallback(this, core::mem::transmute_copy(&pphotoprogressactioncb)).into() } unsafe extern "system" fn SetActionLinkText(this: *mut core::ffi::c_void, pszcaption: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1374,7 +1374,7 @@ impl IPhotoProgressDialog_Vtbl { } unsafe extern "system" fn GetUserInput(this: *mut core::ffi::c_void, riidtype: *const windows_core::GUID, punknown: *mut core::ffi::c_void, ppropvarresult: *mut super::super::System::Com::StructuredStorage::PROPVARIANT, ppropvardefault: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPhotoProgressDialog_Impl::GetUserInput(this, core::mem::transmute_copy(&riidtype), windows_core::from_raw_borrowed(&punknown), core::mem::transmute_copy(&ppropvarresult), core::mem::transmute_copy(&ppropvardefault)).into() + IPhotoProgressDialog_Impl::GetUserInput(this, core::mem::transmute_copy(&riidtype), core::mem::transmute_copy(&punknown), core::mem::transmute_copy(&ppropvarresult), core::mem::transmute_copy(&ppropvardefault)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs index b2c6fb7157..b1e369cba5 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs @@ -528,7 +528,7 @@ pub struct IEnumSpObjectTokens_Vtbl { pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IEnumSpObjectTokens_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, pelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, pelt: windows_core::OutRef<'_, ISpObjectToken>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -766,7 +766,7 @@ pub struct ISpCFGInterpreter_Vtbl { } pub trait ISpCFGInterpreter_Impl: windows_core::IUnknownImpl { fn InitGrammar(&self, pszgrammarname: &windows_core::PCWSTR, pvgrammardata: *const *const core::ffi::c_void) -> windows_core::Result<()>; - fn Interpret(&self, pphrase: Option<&ISpPhraseBuilder>, ulfirstelement: u32, ulcountofelements: u32, psite: Option<&ISpCFGInterpreterSite>) -> windows_core::Result<()>; + fn Interpret(&self, pphrase: windows_core::Ref<'_, ISpPhraseBuilder>, ulfirstelement: u32, ulcountofelements: u32, psite: windows_core::Ref<'_, ISpCFGInterpreterSite>) -> windows_core::Result<()>; } impl ISpCFGInterpreter_Vtbl { pub const fn new() -> Self { @@ -776,7 +776,7 @@ impl ISpCFGInterpreter_Vtbl { } unsafe extern "system" fn Interpret(this: *mut core::ffi::c_void, pphrase: *mut core::ffi::c_void, ulfirstelement: u32, ulcountofelements: u32, psite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpCFGInterpreter_Impl::Interpret(this, windows_core::from_raw_borrowed(&pphrase), core::mem::transmute_copy(&ulfirstelement), core::mem::transmute_copy(&ulcountofelements), windows_core::from_raw_borrowed(&psite)).into() + ISpCFGInterpreter_Impl::Interpret(this, core::mem::transmute_copy(&pphrase), core::mem::transmute_copy(&ulfirstelement), core::mem::transmute_copy(&ulcountofelements), core::mem::transmute_copy(&psite)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -879,13 +879,13 @@ pub struct ISpContainerLexicon_Vtbl { pub AddLexicon: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait ISpContainerLexicon_Impl: ISpLexicon_Impl { - fn AddLexicon(&self, paddlexicon: Option<&ISpLexicon>, dwflags: u32) -> windows_core::Result<()>; + fn AddLexicon(&self, paddlexicon: windows_core::Ref<'_, ISpLexicon>, dwflags: u32) -> windows_core::Result<()>; } impl ISpContainerLexicon_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddLexicon(this: *mut core::ffi::c_void, paddlexicon: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpContainerLexicon_Impl::AddLexicon(this, windows_core::from_raw_borrowed(&paddlexicon), core::mem::transmute_copy(&dwflags)).into() + ISpContainerLexicon_Impl::AddLexicon(this, core::mem::transmute_copy(&paddlexicon), core::mem::transmute_copy(&dwflags)).into() } Self { base__: ISpLexicon_Vtbl::new::(), AddLexicon: AddLexicon:: } } @@ -1389,7 +1389,7 @@ pub struct ISpGramCompBackend_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISpGramCompBackend_Impl: ISpGrammarBuilder_Impl { - fn SetSaveObjects(&self, pstream: Option<&super::super::System::Com::IStream>, perrorlog: Option<&ISpErrorLog>) -> windows_core::Result<()>; + fn SetSaveObjects(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, perrorlog: windows_core::Ref<'_, ISpErrorLog>) -> windows_core::Result<()>; fn InitFromBinaryGrammar(&self, pbinarydata: *const SPBINARYGRAMMAR) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -1397,7 +1397,7 @@ impl ISpGramCompBackend_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSaveObjects(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, perrorlog: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpGramCompBackend_Impl::SetSaveObjects(this, windows_core::from_raw_borrowed(&pstream), windows_core::from_raw_borrowed(&perrorlog)).into() + ISpGramCompBackend_Impl::SetSaveObjects(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&perrorlog)).into() } unsafe extern "system" fn InitFromBinaryGrammar(this: *mut core::ffi::c_void, pbinarydata: *const SPBINARYGRAMMAR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1607,14 +1607,14 @@ pub struct ISpGrammarCompiler_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ISpGrammarCompiler_Impl: windows_core::IUnknownImpl { - fn CompileStream(&self, psource: Option<&super::super::System::Com::IStream>, pdest: Option<&super::super::System::Com::IStream>, pheader: Option<&super::super::System::Com::IStream>, preserved: Option<&windows_core::IUnknown>, perrorlog: Option<&ISpErrorLog>, dwflags: u32) -> windows_core::Result<()>; + fn CompileStream(&self, psource: windows_core::Ref<'_, super::super::System::Com::IStream>, pdest: windows_core::Ref<'_, super::super::System::Com::IStream>, pheader: windows_core::Ref<'_, super::super::System::Com::IStream>, preserved: windows_core::Ref<'_, windows_core::IUnknown>, perrorlog: windows_core::Ref<'_, ISpErrorLog>, dwflags: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ISpGrammarCompiler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CompileStream(this: *mut core::ffi::c_void, psource: *mut core::ffi::c_void, pdest: *mut core::ffi::c_void, pheader: *mut core::ffi::c_void, preserved: *mut core::ffi::c_void, perrorlog: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpGrammarCompiler_Impl::CompileStream(this, windows_core::from_raw_borrowed(&psource), windows_core::from_raw_borrowed(&pdest), windows_core::from_raw_borrowed(&pheader), windows_core::from_raw_borrowed(&preserved), windows_core::from_raw_borrowed(&perrorlog), core::mem::transmute_copy(&dwflags)).into() + ISpGrammarCompiler_Impl::CompileStream(this, core::mem::transmute_copy(&psource), core::mem::transmute_copy(&pdest), core::mem::transmute_copy(&pheader), core::mem::transmute_copy(&preserved), core::mem::transmute_copy(&perrorlog), core::mem::transmute_copy(&dwflags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CompileStream: CompileStream:: } } @@ -1648,7 +1648,7 @@ pub struct ISpITNProcessor_Vtbl { } pub trait ISpITNProcessor_Impl: windows_core::IUnknownImpl { fn LoadITNGrammar(&self, pszclsid: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn ITNPhrase(&self, pphrase: Option<&ISpPhraseBuilder>) -> windows_core::Result<()>; + fn ITNPhrase(&self, pphrase: windows_core::Ref<'_, ISpPhraseBuilder>) -> windows_core::Result<()>; } impl ISpITNProcessor_Vtbl { pub const fn new() -> Self { @@ -1658,7 +1658,7 @@ impl ISpITNProcessor_Vtbl { } unsafe extern "system" fn ITNPhrase(this: *mut core::ffi::c_void, pphrase: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpITNProcessor_Impl::ITNPhrase(this, windows_core::from_raw_borrowed(&pphrase)).into() + ISpITNProcessor_Impl::ITNPhrase(this, core::mem::transmute_copy(&pphrase)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1951,10 +1951,10 @@ pub struct ISpNotifySource_Vtbl { pub GetNotifyEventHandle: unsafe extern "system" fn(*mut core::ffi::c_void) -> super::super::Foundation::HANDLE, } pub trait ISpNotifySource_Impl: windows_core::IUnknownImpl { - fn SetNotifySink(&self, pnotifysink: Option<&ISpNotifySink>) -> windows_core::Result<()>; + fn SetNotifySink(&self, pnotifysink: windows_core::Ref<'_, ISpNotifySink>) -> windows_core::Result<()>; fn SetNotifyWindowMessage(&self, hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; fn SetNotifyCallbackFunction(&self, pfncallback: *mut SPNOTIFYCALLBACK, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; - fn SetNotifyCallbackInterface(&self, pspcallback: Option<&ISpNotifyCallback>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; + fn SetNotifyCallbackInterface(&self, pspcallback: windows_core::Ref<'_, ISpNotifyCallback>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; fn SetNotifyWin32Event(&self) -> windows_core::Result<()>; fn WaitForNotifyEvent(&self, dwmilliseconds: u32) -> windows_core::Result<()>; fn GetNotifyEventHandle(&self) -> super::super::Foundation::HANDLE; @@ -1963,7 +1963,7 @@ impl ISpNotifySource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetNotifySink(this: *mut core::ffi::c_void, pnotifysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpNotifySource_Impl::SetNotifySink(this, windows_core::from_raw_borrowed(&pnotifysink)).into() + ISpNotifySource_Impl::SetNotifySink(this, core::mem::transmute_copy(&pnotifysink)).into() } unsafe extern "system" fn SetNotifyWindowMessage(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1975,7 +1975,7 @@ impl ISpNotifySource_Vtbl { } unsafe extern "system" fn SetNotifyCallbackInterface(this: *mut core::ffi::c_void, pspcallback: *mut core::ffi::c_void, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpNotifySource_Impl::SetNotifyCallbackInterface(this, windows_core::from_raw_borrowed(&pspcallback), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() + ISpNotifySource_Impl::SetNotifyCallbackInterface(this, core::mem::transmute_copy(&pspcallback), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() } unsafe extern "system" fn SetNotifyWin32Event(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2049,7 +2049,7 @@ pub struct ISpNotifyTranslator_Vtbl { pub trait ISpNotifyTranslator_Impl: ISpNotifySink_Impl { fn InitWindowMessage(&self, hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; fn InitCallback(&self, pfncallback: *mut SPNOTIFYCALLBACK, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; - fn InitSpNotifyCallback(&self, pspcallback: Option<&ISpNotifyCallback>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; + fn InitSpNotifyCallback(&self, pspcallback: windows_core::Ref<'_, ISpNotifyCallback>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; fn InitWin32Event(&self, hevent: super::super::Foundation::HANDLE, fclosehandleonrelease: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn Wait(&self, dwmilliseconds: u32) -> windows_core::Result<()>; fn GetEventHandle(&self) -> super::super::Foundation::HANDLE; @@ -2066,7 +2066,7 @@ impl ISpNotifyTranslator_Vtbl { } unsafe extern "system" fn InitSpNotifyCallback(this: *mut core::ffi::c_void, pspcallback: *mut core::ffi::c_void, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpNotifyTranslator_Impl::InitSpNotifyCallback(this, windows_core::from_raw_borrowed(&pspcallback), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() + ISpNotifyTranslator_Impl::InitSpNotifyCallback(this, core::mem::transmute_copy(&pspcallback), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() } unsafe extern "system" fn InitWin32Event(this: *mut core::ffi::c_void, hevent: super::super::Foundation::HANDLE, fclosehandleonrelease: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2182,12 +2182,12 @@ pub trait ISpObjectToken_Impl: ISpDataKey_Impl { fn SetId(&self, pszcategoryid: &windows_core::PCWSTR, psztokenid: &windows_core::PCWSTR, fcreateifnotexist: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetId(&self) -> windows_core::Result; fn GetCategory(&self) -> windows_core::Result; - fn CreateInstance(&self, punkouter: Option<&windows_core::IUnknown>, dwclscontext: u32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateInstance(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, dwclscontext: u32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetStorageFileName(&self, clsidcaller: *const windows_core::GUID, pszvaluename: &windows_core::PCWSTR, pszfilenamespecifier: &windows_core::PCWSTR, nfolder: u32) -> windows_core::Result; fn RemoveStorageFileName(&self, clsidcaller: *const windows_core::GUID, pszkeyname: &windows_core::PCWSTR, fdeletefile: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn Remove(&self, pclsidcaller: *const windows_core::GUID) -> windows_core::Result<()>; - fn IsUISupported(&self, psztypeofui: &windows_core::PCWSTR, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: Option<&windows_core::IUnknown>, pfsupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn DisplayUI(&self, hwndparent: super::super::Foundation::HWND, psztitle: &windows_core::PCWSTR, psztypeofui: &windows_core::PCWSTR, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn IsUISupported(&self, psztypeofui: &windows_core::PCWSTR, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: windows_core::Ref<'_, windows_core::IUnknown>, pfsupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn DisplayUI(&self, hwndparent: super::super::Foundation::HWND, psztitle: &windows_core::PCWSTR, psztypeofui: &windows_core::PCWSTR, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn MatchesAttributes(&self, pszattributes: &windows_core::PCWSTR, pfmatches: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl ISpObjectToken_Vtbl { @@ -2218,7 +2218,7 @@ impl ISpObjectToken_Vtbl { } unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, dwclscontext: u32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpObjectToken_Impl::CreateInstance(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() + ISpObjectToken_Impl::CreateInstance(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() } unsafe extern "system" fn GetStorageFileName(this: *mut core::ffi::c_void, clsidcaller: *const windows_core::GUID, pszvaluename: windows_core::PCWSTR, pszfilenamespecifier: windows_core::PCWSTR, nfolder: u32, ppszfilepath: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2240,11 +2240,11 @@ impl ISpObjectToken_Vtbl { } unsafe extern "system" fn IsUISupported(this: *mut core::ffi::c_void, psztypeofui: windows_core::PCWSTR, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: *mut core::ffi::c_void, pfsupported: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpObjectToken_Impl::IsUISupported(this, core::mem::transmute(&psztypeofui), core::mem::transmute_copy(&pvextradata), core::mem::transmute_copy(&cbextradata), windows_core::from_raw_borrowed(&punkobject), core::mem::transmute_copy(&pfsupported)).into() + ISpObjectToken_Impl::IsUISupported(this, core::mem::transmute(&psztypeofui), core::mem::transmute_copy(&pvextradata), core::mem::transmute_copy(&cbextradata), core::mem::transmute_copy(&punkobject), core::mem::transmute_copy(&pfsupported)).into() } unsafe extern "system" fn DisplayUI(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, psztitle: windows_core::PCWSTR, psztypeofui: windows_core::PCWSTR, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpObjectToken_Impl::DisplayUI(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute(&psztitle), core::mem::transmute(&psztypeofui), core::mem::transmute_copy(&pvextradata), core::mem::transmute_copy(&cbextradata), windows_core::from_raw_borrowed(&punkobject)).into() + ISpObjectToken_Impl::DisplayUI(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute(&psztitle), core::mem::transmute(&psztypeofui), core::mem::transmute_copy(&pvextradata), core::mem::transmute_copy(&cbextradata), core::mem::transmute_copy(&punkobject)).into() } unsafe extern "system" fn MatchesAttributes(this: *mut core::ffi::c_void, pszattributes: windows_core::PCWSTR, pfmatches: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2446,8 +2446,8 @@ pub struct ISpObjectTokenEnumBuilder_Vtbl { pub trait ISpObjectTokenEnumBuilder_Impl: IEnumSpObjectTokens_Impl { fn SetAttribs(&self, pszreqattribs: &windows_core::PCWSTR, pszoptattribs: &windows_core::PCWSTR) -> windows_core::Result<()>; fn AddTokens(&self, ctokens: u32, ptoken: *const Option) -> windows_core::Result<()>; - fn AddTokensFromDataKey(&self, pdatakey: Option<&ISpDataKey>, pszsubkey: &windows_core::PCWSTR, pszcategoryid: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn AddTokensFromTokenEnum(&self, ptokenenum: Option<&IEnumSpObjectTokens>) -> windows_core::Result<()>; + fn AddTokensFromDataKey(&self, pdatakey: windows_core::Ref<'_, ISpDataKey>, pszsubkey: &windows_core::PCWSTR, pszcategoryid: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn AddTokensFromTokenEnum(&self, ptokenenum: windows_core::Ref<'_, IEnumSpObjectTokens>) -> windows_core::Result<()>; fn Sort(&self, psztokenidtolistfirst: &windows_core::PCWSTR) -> windows_core::Result<()>; } impl ISpObjectTokenEnumBuilder_Vtbl { @@ -2462,11 +2462,11 @@ impl ISpObjectTokenEnumBuilder_Vtbl { } unsafe extern "system" fn AddTokensFromDataKey(this: *mut core::ffi::c_void, pdatakey: *mut core::ffi::c_void, pszsubkey: windows_core::PCWSTR, pszcategoryid: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpObjectTokenEnumBuilder_Impl::AddTokensFromDataKey(this, windows_core::from_raw_borrowed(&pdatakey), core::mem::transmute(&pszsubkey), core::mem::transmute(&pszcategoryid)).into() + ISpObjectTokenEnumBuilder_Impl::AddTokensFromDataKey(this, core::mem::transmute_copy(&pdatakey), core::mem::transmute(&pszsubkey), core::mem::transmute(&pszcategoryid)).into() } unsafe extern "system" fn AddTokensFromTokenEnum(this: *mut core::ffi::c_void, ptokenenum: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpObjectTokenEnumBuilder_Impl::AddTokensFromTokenEnum(this, windows_core::from_raw_borrowed(&ptokenenum)).into() + ISpObjectTokenEnumBuilder_Impl::AddTokensFromTokenEnum(this, core::mem::transmute_copy(&ptokenenum)).into() } unsafe extern "system" fn Sort(this: *mut core::ffi::c_void, psztokenidtolistfirst: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2510,13 +2510,13 @@ pub struct ISpObjectTokenInit_Vtbl { pub InitFromDataKey: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISpObjectTokenInit_Impl: ISpObjectToken_Impl { - fn InitFromDataKey(&self, pszcategoryid: &windows_core::PCWSTR, psztokenid: &windows_core::PCWSTR, pdatakey: Option<&ISpDataKey>) -> windows_core::Result<()>; + fn InitFromDataKey(&self, pszcategoryid: &windows_core::PCWSTR, psztokenid: &windows_core::PCWSTR, pdatakey: windows_core::Ref<'_, ISpDataKey>) -> windows_core::Result<()>; } impl ISpObjectTokenInit_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitFromDataKey(this: *mut core::ffi::c_void, pszcategoryid: windows_core::PCWSTR, psztokenid: windows_core::PCWSTR, pdatakey: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpObjectTokenInit_Impl::InitFromDataKey(this, core::mem::transmute(&pszcategoryid), core::mem::transmute(&psztokenid), windows_core::from_raw_borrowed(&pdatakey)).into() + ISpObjectTokenInit_Impl::InitFromDataKey(this, core::mem::transmute(&pszcategoryid), core::mem::transmute(&psztokenid), core::mem::transmute_copy(&pdatakey)).into() } Self { base__: ISpObjectToken_Vtbl::new::(), InitFromDataKey: InitFromDataKey:: } } @@ -2546,14 +2546,14 @@ pub struct ISpObjectWithToken_Vtbl { pub GetObjectToken: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISpObjectWithToken_Impl: windows_core::IUnknownImpl { - fn SetObjectToken(&self, ptoken: Option<&ISpObjectToken>) -> windows_core::Result<()>; + fn SetObjectToken(&self, ptoken: windows_core::Ref<'_, ISpObjectToken>) -> windows_core::Result<()>; fn GetObjectToken(&self) -> windows_core::Result; } impl ISpObjectWithToken_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetObjectToken(this: *mut core::ffi::c_void, ptoken: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpObjectWithToken_Impl::SetObjectToken(this, windows_core::from_raw_borrowed(&ptoken)).into() + ISpObjectWithToken_Impl::SetObjectToken(this, core::mem::transmute_copy(&ptoken)).into() } unsafe extern "system" fn GetObjectToken(this: *mut core::ffi::c_void, pptoken: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2939,7 +2939,7 @@ pub struct ISpPhraseAlt_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISpPhraseAlt_Impl: ISpPhrase_Impl { - fn GetAltInfo(&self, ppparent: *mut Option, pulstartelementinparent: *mut u32, pcelementsinparent: *mut u32, pcelementsinalt: *mut u32) -> windows_core::Result<()>; + fn GetAltInfo(&self, ppparent: windows_core::OutRef<'_, ISpPhrase>, pulstartelementinparent: *mut u32, pcelementsinparent: *mut u32, pcelementsinalt: *mut u32) -> windows_core::Result<()>; fn Commit(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -3313,7 +3313,7 @@ pub trait ISpRecoContext_Impl: ISpEventSource_Impl { fn SetAdaptationData(&self, padaptationdata: &windows_core::PCWSTR, cch: u32) -> windows_core::Result<()>; fn Pause(&self, dwreserved: u32) -> windows_core::Result<()>; fn Resume(&self, dwreserved: u32) -> windows_core::Result<()>; - fn SetVoice(&self, pvoice: Option<&ISpVoice>, fallowformatchanges: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetVoice(&self, pvoice: windows_core::Ref<'_, ISpVoice>, fallowformatchanges: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetVoice(&self) -> windows_core::Result; fn SetVoicePurgeEvent(&self, ulleventinterest: u64) -> windows_core::Result<()>; fn GetVoicePurgeEvent(&self, pulleventinterest: *mut u64) -> windows_core::Result<()>; @@ -3391,7 +3391,7 @@ impl ISpRecoContext_Vtbl { } unsafe extern "system" fn SetVoice(this: *mut core::ffi::c_void, pvoice: *mut core::ffi::c_void, fallowformatchanges: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpRecoContext_Impl::SetVoice(this, windows_core::from_raw_borrowed(&pvoice), core::mem::transmute_copy(&fallowformatchanges)).into() + ISpRecoContext_Impl::SetVoice(this, core::mem::transmute_copy(&pvoice), core::mem::transmute_copy(&fallowformatchanges)).into() } unsafe extern "system" fn GetVoice(this: *mut core::ffi::c_void, ppvoice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3636,7 +3636,7 @@ pub trait ISpRecoGrammar_Impl: ISpGrammarBuilder_Impl { fn SetTextSelection(&self, pinfo: *const SPTEXTSELECTIONINFO) -> windows_core::Result<()>; fn IsPronounceable(&self, pszword: &windows_core::PCWSTR, pwordpronounceable: *mut SPWORDPRONOUNCEABLE) -> windows_core::Result<()>; fn SetGrammarState(&self, egrammarstate: SPGRAMMARSTATE) -> windows_core::Result<()>; - fn SaveCmd(&self, pstream: Option<&super::super::System::Com::IStream>, ppszcomemerrortext: *mut windows_core::PWSTR) -> windows_core::Result<()>; + fn SaveCmd(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, ppszcomemerrortext: *mut windows_core::PWSTR) -> windows_core::Result<()>; fn GetGrammarState(&self, pegrammarstate: *mut SPGRAMMARSTATE) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -3714,7 +3714,7 @@ impl ISpRecoGrammar_Vtbl { } unsafe extern "system" fn SaveCmd(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, ppszcomemerrortext: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpRecoGrammar_Impl::SaveCmd(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&ppszcomemerrortext)).into() + ISpRecoGrammar_Impl::SaveCmd(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&ppszcomemerrortext)).into() } unsafe extern "system" fn GetGrammarState(this: *mut core::ffi::c_void, pegrammarstate: *mut SPGRAMMARSTATE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3825,8 +3825,8 @@ pub trait ISpRecoGrammar2_Impl: windows_core::IUnknownImpl { fn SetRulePriority(&self, pszrulename: &windows_core::PCWSTR, ulruleid: u32, nrulepriority: i32) -> windows_core::Result<()>; fn SetRuleWeight(&self, pszrulename: &windows_core::PCWSTR, ulruleid: u32, flweight: f32) -> windows_core::Result<()>; fn SetDictationWeight(&self, flweight: f32) -> windows_core::Result<()>; - fn SetGrammarLoader(&self, ploader: Option<&ISpeechResourceLoader>) -> windows_core::Result<()>; - fn SetSMLSecurityManager(&self, psmlsecuritymanager: Option<&super::super::System::Com::Urlmon::IInternetSecurityManager>) -> windows_core::Result<()>; + fn SetGrammarLoader(&self, ploader: windows_core::Ref<'_, ISpeechResourceLoader>) -> windows_core::Result<()>; + fn SetSMLSecurityManager(&self, psmlsecuritymanager: windows_core::Ref<'_, super::super::System::Com::Urlmon::IInternetSecurityManager>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_Urlmon")] impl ISpRecoGrammar2_Vtbl { @@ -3857,11 +3857,11 @@ impl ISpRecoGrammar2_Vtbl { } unsafe extern "system" fn SetGrammarLoader(this: *mut core::ffi::c_void, ploader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpRecoGrammar2_Impl::SetGrammarLoader(this, windows_core::from_raw_borrowed(&ploader)).into() + ISpRecoGrammar2_Impl::SetGrammarLoader(this, core::mem::transmute_copy(&ploader)).into() } unsafe extern "system" fn SetSMLSecurityManager(this: *mut core::ffi::c_void, psmlsecuritymanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpRecoGrammar2_Impl::SetSMLSecurityManager(this, windows_core::from_raw_borrowed(&psmlsecuritymanager)).into() + ISpRecoGrammar2_Impl::SetSMLSecurityManager(this, core::mem::transmute_copy(&psmlsecuritymanager)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3936,7 +3936,7 @@ pub struct ISpRecoResult_Vtbl { #[cfg(all(feature = "Win32_Media_Audio", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISpRecoResult_Impl: ISpPhrase_Impl { fn GetResultTimes(&self, ptimes: *mut SPRECORESULTTIMES) -> windows_core::Result<()>; - fn GetAlternates(&self, ulstartelement: u32, celements: u32, ulrequestcount: u32, ppphrases: *mut Option, pcphrasesreturned: *mut u32) -> windows_core::Result<()>; + fn GetAlternates(&self, ulstartelement: u32, celements: u32, ulrequestcount: u32, ppphrases: windows_core::OutRef<'_, ISpPhraseAlt>, pcphrasesreturned: *mut u32) -> windows_core::Result<()>; fn GetAudio(&self, ulstartelement: u32, celements: u32) -> windows_core::Result; fn SpeakAudio(&self, ulstartelement: u32, celements: u32, dwflags: u32, pulstreamnumber: *mut u32) -> windows_core::Result<()>; fn Serialize(&self, ppcomemserializedresult: *mut *mut SPSERIALIZEDRESULT) -> windows_core::Result<()>; @@ -4041,7 +4041,7 @@ pub struct ISpRecoResult2_Vtbl { } #[cfg(all(feature = "Win32_Media_Audio", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISpRecoResult2_Impl: ISpRecoResult_Impl { - fn CommitAlternate(&self, pphrasealt: Option<&ISpPhraseAlt>) -> windows_core::Result; + fn CommitAlternate(&self, pphrasealt: windows_core::Ref<'_, ISpPhraseAlt>) -> windows_core::Result; fn CommitText(&self, ulstartelement: u32, celements: u32, pszcorrecteddata: &windows_core::PCWSTR, ecommitflags: u32) -> windows_core::Result<()>; fn SetTextFeedback(&self, pszfeedback: &windows_core::PCWSTR, fsuccessful: super::super::Foundation::BOOL) -> windows_core::Result<()>; } @@ -4050,7 +4050,7 @@ impl ISpRecoResult2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CommitAlternate(this: *mut core::ffi::c_void, pphrasealt: *mut core::ffi::c_void, ppnewresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpRecoResult2_Impl::CommitAlternate(this, windows_core::from_raw_borrowed(&pphrasealt)) { + match ISpRecoResult2_Impl::CommitAlternate(this, core::mem::transmute_copy(&pphrasealt)) { Ok(ok__) => { ppnewresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4191,14 +4191,14 @@ pub struct ISpRecognizer_Vtbl { } #[cfg(all(feature = "Win32_Media_Audio", feature = "Win32_System_Com"))] pub trait ISpRecognizer_Impl: ISpProperties_Impl { - fn SetRecognizer(&self, precognizer: Option<&ISpObjectToken>) -> windows_core::Result<()>; + fn SetRecognizer(&self, precognizer: windows_core::Ref<'_, ISpObjectToken>) -> windows_core::Result<()>; fn GetRecognizer(&self) -> windows_core::Result; - fn SetInput(&self, punkinput: Option<&windows_core::IUnknown>, fallowformatchanges: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetInput(&self, punkinput: windows_core::Ref<'_, windows_core::IUnknown>, fallowformatchanges: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetInputObjectToken(&self) -> windows_core::Result; fn GetInputStream(&self) -> windows_core::Result; fn CreateRecoContext(&self) -> windows_core::Result; fn GetRecoProfile(&self) -> windows_core::Result; - fn SetRecoProfile(&self, ptoken: Option<&ISpObjectToken>) -> windows_core::Result<()>; + fn SetRecoProfile(&self, ptoken: windows_core::Ref<'_, ISpObjectToken>) -> windows_core::Result<()>; fn IsSharedInstance(&self) -> windows_core::Result<()>; fn GetRecoState(&self, pstate: *mut SPRECOSTATE) -> windows_core::Result<()>; fn SetRecoState(&self, newstate: SPRECOSTATE) -> windows_core::Result<()>; @@ -4206,14 +4206,14 @@ pub trait ISpRecognizer_Impl: ISpProperties_Impl { fn GetFormat(&self, waveformattype: SPSTREAMFORMATTYPE, pformatid: *mut windows_core::GUID, ppcomemwfex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()>; fn IsUISupported(&self, psztypeofui: &windows_core::PCWSTR, pvextradata: *mut core::ffi::c_void, cbextradata: u32, pfsupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn DisplayUI(&self, hwndparent: super::super::Foundation::HWND, psztitle: &windows_core::PCWSTR, psztypeofui: &windows_core::PCWSTR, pvextradata: *mut core::ffi::c_void, cbextradata: u32) -> windows_core::Result<()>; - fn EmulateRecognition(&self, pphrase: Option<&ISpPhrase>) -> windows_core::Result<()>; + fn EmulateRecognition(&self, pphrase: windows_core::Ref<'_, ISpPhrase>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Media_Audio", feature = "Win32_System_Com"))] impl ISpRecognizer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRecognizer(this: *mut core::ffi::c_void, precognizer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpRecognizer_Impl::SetRecognizer(this, windows_core::from_raw_borrowed(&precognizer)).into() + ISpRecognizer_Impl::SetRecognizer(this, core::mem::transmute_copy(&precognizer)).into() } unsafe extern "system" fn GetRecognizer(this: *mut core::ffi::c_void, pprecognizer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4227,7 +4227,7 @@ impl ISpRecognizer_Vtbl { } unsafe extern "system" fn SetInput(this: *mut core::ffi::c_void, punkinput: *mut core::ffi::c_void, fallowformatchanges: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpRecognizer_Impl::SetInput(this, windows_core::from_raw_borrowed(&punkinput), core::mem::transmute_copy(&fallowformatchanges)).into() + ISpRecognizer_Impl::SetInput(this, core::mem::transmute_copy(&punkinput), core::mem::transmute_copy(&fallowformatchanges)).into() } unsafe extern "system" fn GetInputObjectToken(this: *mut core::ffi::c_void, pptoken: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4271,7 +4271,7 @@ impl ISpRecognizer_Vtbl { } unsafe extern "system" fn SetRecoProfile(this: *mut core::ffi::c_void, ptoken: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpRecognizer_Impl::SetRecoProfile(this, windows_core::from_raw_borrowed(&ptoken)).into() + ISpRecognizer_Impl::SetRecoProfile(this, core::mem::transmute_copy(&ptoken)).into() } unsafe extern "system" fn IsSharedInstance(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4303,7 +4303,7 @@ impl ISpRecognizer_Vtbl { } unsafe extern "system" fn EmulateRecognition(this: *mut core::ffi::c_void, pphrase: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpRecognizer_Impl::EmulateRecognition(this, windows_core::from_raw_borrowed(&pphrase)).into() + ISpRecognizer_Impl::EmulateRecognition(this, core::mem::transmute_copy(&pphrase)).into() } Self { base__: ISpProperties_Vtbl::new::(), @@ -4355,7 +4355,7 @@ pub struct ISpRecognizer2_Vtbl { pub ResetAcousticModelAdaptation: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISpRecognizer2_Impl: windows_core::IUnknownImpl { - fn EmulateRecognitionEx(&self, pphrase: Option<&ISpPhrase>, dwcompareflags: u32) -> windows_core::Result<()>; + fn EmulateRecognitionEx(&self, pphrase: windows_core::Ref<'_, ISpPhrase>, dwcompareflags: u32) -> windows_core::Result<()>; fn SetTrainingState(&self, fdoingtraining: super::super::Foundation::BOOL, fadaptfromtrainingdata: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn ResetAcousticModelAdaptation(&self) -> windows_core::Result<()>; } @@ -4363,7 +4363,7 @@ impl ISpRecognizer2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EmulateRecognitionEx(this: *mut core::ffi::c_void, pphrase: *mut core::ffi::c_void, dwcompareflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpRecognizer2_Impl::EmulateRecognitionEx(this, windows_core::from_raw_borrowed(&pphrase), core::mem::transmute_copy(&dwcompareflags)).into() + ISpRecognizer2_Impl::EmulateRecognitionEx(this, core::mem::transmute_copy(&pphrase), core::mem::transmute_copy(&dwcompareflags)).into() } unsafe extern "system" fn SetTrainingState(this: *mut core::ffi::c_void, fdoingtraining: super::super::Foundation::BOOL, fadaptfromtrainingdata: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4458,7 +4458,7 @@ pub struct ISpResourceManager_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ISpResourceManager_Impl: super::super::System::Com::IServiceProvider_Impl { - fn SetObject(&self, guidserviceid: *const windows_core::GUID, punkobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetObject(&self, guidserviceid: *const windows_core::GUID, punkobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetObject(&self, guidserviceid: *const windows_core::GUID, objectclsid: *const windows_core::GUID, objectiid: *const windows_core::GUID, freleasewhenlastexternalrefreleased: super::super::Foundation::BOOL, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -4466,7 +4466,7 @@ impl ISpResourceManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetObject(this: *mut core::ffi::c_void, guidserviceid: *const windows_core::GUID, punkobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpResourceManager_Impl::SetObject(this, core::mem::transmute_copy(&guidserviceid), windows_core::from_raw_borrowed(&punkobject)).into() + ISpResourceManager_Impl::SetObject(this, core::mem::transmute_copy(&guidserviceid), core::mem::transmute_copy(&punkobject)).into() } unsafe extern "system" fn GetObject(this: *mut core::ffi::c_void, guidserviceid: *const windows_core::GUID, objectclsid: *const windows_core::GUID, objectiid: *const windows_core::GUID, freleasewhenlastexternalrefreleased: super::super::Foundation::BOOL, ppobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4734,10 +4734,10 @@ pub struct ISpSREngine_Vtbl { } #[cfg(feature = "Win32_Media_Audio")] pub trait ISpSREngine_Impl: windows_core::IUnknownImpl { - fn SetSite(&self, psite: Option<&ISpSREngineSite>) -> windows_core::Result<()>; + fn SetSite(&self, psite: windows_core::Ref<'_, ISpSREngineSite>) -> windows_core::Result<()>; fn GetInputAudioFormat(&self, pguidsourceformatid: *const windows_core::GUID, psourcewaveformatex: *const super::Audio::WAVEFORMATEX, pguiddesiredformatid: *mut windows_core::GUID, ppcomemdesiredwaveformatex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()>; - fn RecognizeStream(&self, rguidfmtid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, hrequestsync: super::super::Foundation::HANDLE, hdataavailable: super::super::Foundation::HANDLE, hexit: super::super::Foundation::HANDLE, fnewaudiostream: super::super::Foundation::BOOL, frealtimeaudio: super::super::Foundation::BOOL, paudioobjecttoken: Option<&ISpObjectToken>) -> windows_core::Result<()>; - fn SetRecoProfile(&self, pprofile: Option<&ISpObjectToken>) -> windows_core::Result<()>; + fn RecognizeStream(&self, rguidfmtid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, hrequestsync: super::super::Foundation::HANDLE, hdataavailable: super::super::Foundation::HANDLE, hexit: super::super::Foundation::HANDLE, fnewaudiostream: super::super::Foundation::BOOL, frealtimeaudio: super::super::Foundation::BOOL, paudioobjecttoken: windows_core::Ref<'_, ISpObjectToken>) -> windows_core::Result<()>; + fn SetRecoProfile(&self, pprofile: windows_core::Ref<'_, ISpObjectToken>) -> windows_core::Result<()>; fn OnCreateGrammar(&self, pvenginerecocontext: *const core::ffi::c_void, hsapigrammar: SPGRAMMARHANDLE, ppvenginegrammarcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn OnDeleteGrammar(&self, pvenginegrammar: *const core::ffi::c_void) -> windows_core::Result<()>; fn LoadProprietaryGrammar(&self, pvenginegrammar: *const core::ffi::c_void, rguidparam: *const windows_core::GUID, pszstringparam: &windows_core::PCWSTR, pvdataparam: *const core::ffi::c_void, uldatasize: u32, options: SPLOADOPTIONS) -> windows_core::Result<()>; @@ -4769,7 +4769,7 @@ impl ISpSREngine_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSite(this: *mut core::ffi::c_void, psite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpSREngine_Impl::SetSite(this, windows_core::from_raw_borrowed(&psite)).into() + ISpSREngine_Impl::SetSite(this, core::mem::transmute_copy(&psite)).into() } unsafe extern "system" fn GetInputAudioFormat(this: *mut core::ffi::c_void, pguidsourceformatid: *const windows_core::GUID, psourcewaveformatex: *const super::Audio::WAVEFORMATEX, pguiddesiredformatid: *mut windows_core::GUID, ppcomemdesiredwaveformatex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4777,11 +4777,11 @@ impl ISpSREngine_Vtbl { } unsafe extern "system" fn RecognizeStream(this: *mut core::ffi::c_void, rguidfmtid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, hrequestsync: super::super::Foundation::HANDLE, hdataavailable: super::super::Foundation::HANDLE, hexit: super::super::Foundation::HANDLE, fnewaudiostream: super::super::Foundation::BOOL, frealtimeaudio: super::super::Foundation::BOOL, paudioobjecttoken: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpSREngine_Impl::RecognizeStream(this, core::mem::transmute_copy(&rguidfmtid), core::mem::transmute_copy(&pwaveformatex), core::mem::transmute_copy(&hrequestsync), core::mem::transmute_copy(&hdataavailable), core::mem::transmute_copy(&hexit), core::mem::transmute_copy(&fnewaudiostream), core::mem::transmute_copy(&frealtimeaudio), windows_core::from_raw_borrowed(&paudioobjecttoken)).into() + ISpSREngine_Impl::RecognizeStream(this, core::mem::transmute_copy(&rguidfmtid), core::mem::transmute_copy(&pwaveformatex), core::mem::transmute_copy(&hrequestsync), core::mem::transmute_copy(&hdataavailable), core::mem::transmute_copy(&hexit), core::mem::transmute_copy(&fnewaudiostream), core::mem::transmute_copy(&frealtimeaudio), core::mem::transmute_copy(&paudioobjecttoken)).into() } unsafe extern "system" fn SetRecoProfile(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpSREngine_Impl::SetRecoProfile(this, windows_core::from_raw_borrowed(&pprofile)).into() + ISpSREngine_Impl::SetRecoProfile(this, core::mem::transmute_copy(&pprofile)).into() } unsafe extern "system" fn OnCreateGrammar(this: *mut core::ffi::c_void, pvenginerecocontext: *const core::ffi::c_void, hsapigrammar: SPGRAMMARHANDLE, ppvenginegrammarcontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5019,7 +5019,7 @@ pub trait ISpSREngine2_Impl: ISpSREngine_Impl { fn SetAdaptationData2(&self, pvenginecontext: *const core::ffi::c_void, padaptationdata: &windows_core::PCWSTR, cch: u32, ptopicname: &windows_core::PCWSTR, esettings: SPADAPTATIONSETTINGS, erelevance: SPADAPTATIONRELEVANCE) -> windows_core::Result<()>; fn SetGrammarPrefix(&self, pvenginegrammar: *const core::ffi::c_void, pszprefix: &windows_core::PCWSTR, fisprefixrequired: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetRulePriority(&self, hrule: SPRULEHANDLE, pvclientrulecontext: *const core::ffi::c_void, nrulepriority: i32) -> windows_core::Result<()>; - fn EmulateRecognition(&self, pphrase: Option<&ISpPhrase>, dwcompareflags: u32) -> windows_core::Result<()>; + fn EmulateRecognition(&self, pphrase: windows_core::Ref<'_, ISpPhrase>, dwcompareflags: u32) -> windows_core::Result<()>; fn SetSLMWeight(&self, pvenginegrammar: *const core::ffi::c_void, flweight: f32) -> windows_core::Result<()>; fn SetRuleWeight(&self, hrule: SPRULEHANDLE, pvclientrulecontext: *const core::ffi::c_void, flweight: f32) -> windows_core::Result<()>; fn SetTrainingState(&self, fdoingtraining: super::super::Foundation::BOOL, fadaptfromtrainingdata: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -5048,7 +5048,7 @@ impl ISpSREngine2_Vtbl { } unsafe extern "system" fn EmulateRecognition(this: *mut core::ffi::c_void, pphrase: *mut core::ffi::c_void, dwcompareflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpSREngine2_Impl::EmulateRecognition(this, windows_core::from_raw_borrowed(&pphrase), core::mem::transmute_copy(&dwcompareflags)).into() + ISpSREngine2_Impl::EmulateRecognition(this, core::mem::transmute_copy(&pphrase), core::mem::transmute_copy(&dwcompareflags)).into() } unsafe extern "system" fn SetSLMWeight(this: *mut core::ffi::c_void, pvenginegrammar: *const core::ffi::c_void, flweight: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5634,7 +5634,7 @@ pub struct ISpStream_Vtbl { } #[cfg(all(feature = "Win32_Media_Audio", feature = "Win32_System_Com"))] pub trait ISpStream_Impl: ISpStreamFormat_Impl { - fn SetBaseStream(&self, pstream: Option<&super::super::System::Com::IStream>, rguidformat: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX) -> windows_core::Result<()>; + fn SetBaseStream(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, rguidformat: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX) -> windows_core::Result<()>; fn GetBaseStream(&self) -> windows_core::Result; fn BindToFile(&self, pszfilename: &windows_core::PCWSTR, emode: SPFILEMODE, pformatid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, ulleventinterest: u64) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; @@ -5644,7 +5644,7 @@ impl ISpStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetBaseStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, rguidformat: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpStream_Impl::SetBaseStream(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&rguidformat), core::mem::transmute_copy(&pwaveformatex)).into() + ISpStream_Impl::SetBaseStream(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&rguidformat), core::mem::transmute_copy(&pwaveformatex)).into() } unsafe extern "system" fn GetBaseStream(this: *mut core::ffi::c_void, ppstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5786,7 +5786,7 @@ pub struct ISpStreamFormatConverter_Vtbl { } #[cfg(all(feature = "Win32_Media_Audio", feature = "Win32_System_Com"))] pub trait ISpStreamFormatConverter_Impl: ISpStreamFormat_Impl { - fn SetBaseStream(&self, pstream: Option<&ISpStreamFormat>, fsetformattobasestreamformat: super::super::Foundation::BOOL, fwritetobasestream: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetBaseStream(&self, pstream: windows_core::Ref<'_, ISpStreamFormat>, fsetformattobasestreamformat: super::super::Foundation::BOOL, fwritetobasestream: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetBaseStream(&self) -> windows_core::Result; fn SetFormat(&self, rguidformatidofconvertedstream: *const windows_core::GUID, pwaveformatexofconvertedstream: *const super::Audio::WAVEFORMATEX) -> windows_core::Result<()>; fn ResetSeekPosition(&self) -> windows_core::Result<()>; @@ -5798,7 +5798,7 @@ impl ISpStreamFormatConverter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetBaseStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, fsetformattobasestreamformat: super::super::Foundation::BOOL, fwritetobasestream: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpStreamFormatConverter_Impl::SetBaseStream(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&fsetformattobasestreamformat), core::mem::transmute_copy(&fwritetobasestream)).into() + ISpStreamFormatConverter_Impl::SetBaseStream(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&fsetformattobasestreamformat), core::mem::transmute_copy(&fwritetobasestream)).into() } unsafe extern "system" fn GetBaseStream(this: *mut core::ffi::c_void, ppstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5883,7 +5883,7 @@ pub struct ISpTTSEngine_Vtbl { } #[cfg(feature = "Win32_Media_Audio")] pub trait ISpTTSEngine_Impl: windows_core::IUnknownImpl { - fn Speak(&self, dwspeakflags: u32, rguidformatid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, ptextfraglist: *const SPVTEXTFRAG, poutputsite: Option<&ISpTTSEngineSite>) -> windows_core::Result<()>; + fn Speak(&self, dwspeakflags: u32, rguidformatid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, ptextfraglist: *const SPVTEXTFRAG, poutputsite: windows_core::Ref<'_, ISpTTSEngineSite>) -> windows_core::Result<()>; fn GetOutputFormat(&self, ptargetfmtid: *const windows_core::GUID, ptargetwaveformatex: *const super::Audio::WAVEFORMATEX, poutputformatid: *mut windows_core::GUID, ppcomemoutputwaveformatex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_Audio")] @@ -5891,7 +5891,7 @@ impl ISpTTSEngine_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Speak(this: *mut core::ffi::c_void, dwspeakflags: u32, rguidformatid: *const windows_core::GUID, pwaveformatex: *const super::Audio::WAVEFORMATEX, ptextfraglist: *const SPVTEXTFRAG, poutputsite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpTTSEngine_Impl::Speak(this, core::mem::transmute_copy(&dwspeakflags), core::mem::transmute_copy(&rguidformatid), core::mem::transmute_copy(&pwaveformatex), core::mem::transmute_copy(&ptextfraglist), windows_core::from_raw_borrowed(&poutputsite)).into() + ISpTTSEngine_Impl::Speak(this, core::mem::transmute_copy(&dwspeakflags), core::mem::transmute_copy(&rguidformatid), core::mem::transmute_copy(&pwaveformatex), core::mem::transmute_copy(&ptextfraglist), core::mem::transmute_copy(&poutputsite)).into() } unsafe extern "system" fn GetOutputFormat(this: *mut core::ffi::c_void, ptargetfmtid: *const windows_core::GUID, ptargetwaveformatex: *const super::Audio::WAVEFORMATEX, poutputformatid: *mut windows_core::GUID, ppcomemoutputwaveformatex: *mut *mut super::Audio::WAVEFORMATEX) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6102,9 +6102,9 @@ pub struct ISpTaskManager_Vtbl { pub trait ISpTaskManager_Impl: windows_core::IUnknownImpl { fn SetThreadPoolInfo(&self, ppoolinfo: *const SPTMTHREADINFO) -> windows_core::Result<()>; fn GetThreadPoolInfo(&self) -> windows_core::Result; - fn QueueTask(&self, ptask: Option<&ISpTask>, pvtaskdata: *const core::ffi::c_void, hcompevent: super::super::Foundation::HANDLE, pdwgroupid: *mut u32, ptaskid: *mut u32) -> windows_core::Result<()>; - fn CreateReoccurringTask(&self, ptask: Option<&ISpTask>, pvtaskdata: *const core::ffi::c_void, hcompevent: super::super::Foundation::HANDLE) -> windows_core::Result; - fn CreateThreadControl(&self, ptask: Option<&ISpThreadTask>, pvtaskdata: *const core::ffi::c_void, npriority: i32) -> windows_core::Result; + fn QueueTask(&self, ptask: windows_core::Ref<'_, ISpTask>, pvtaskdata: *const core::ffi::c_void, hcompevent: super::super::Foundation::HANDLE, pdwgroupid: *mut u32, ptaskid: *mut u32) -> windows_core::Result<()>; + fn CreateReoccurringTask(&self, ptask: windows_core::Ref<'_, ISpTask>, pvtaskdata: *const core::ffi::c_void, hcompevent: super::super::Foundation::HANDLE) -> windows_core::Result; + fn CreateThreadControl(&self, ptask: windows_core::Ref<'_, ISpThreadTask>, pvtaskdata: *const core::ffi::c_void, npriority: i32) -> windows_core::Result; fn TerminateTask(&self, dwtaskid: u32, ulwaitperiod: u32) -> windows_core::Result<()>; fn TerminateTaskGroup(&self, dwgroupid: u32, ulwaitperiod: u32) -> windows_core::Result<()>; } @@ -6126,11 +6126,11 @@ impl ISpTaskManager_Vtbl { } unsafe extern "system" fn QueueTask(this: *mut core::ffi::c_void, ptask: *mut core::ffi::c_void, pvtaskdata: *const core::ffi::c_void, hcompevent: super::super::Foundation::HANDLE, pdwgroupid: *mut u32, ptaskid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpTaskManager_Impl::QueueTask(this, windows_core::from_raw_borrowed(&ptask), core::mem::transmute_copy(&pvtaskdata), core::mem::transmute_copy(&hcompevent), core::mem::transmute_copy(&pdwgroupid), core::mem::transmute_copy(&ptaskid)).into() + ISpTaskManager_Impl::QueueTask(this, core::mem::transmute_copy(&ptask), core::mem::transmute_copy(&pvtaskdata), core::mem::transmute_copy(&hcompevent), core::mem::transmute_copy(&pdwgroupid), core::mem::transmute_copy(&ptaskid)).into() } unsafe extern "system" fn CreateReoccurringTask(this: *mut core::ffi::c_void, ptask: *mut core::ffi::c_void, pvtaskdata: *const core::ffi::c_void, hcompevent: super::super::Foundation::HANDLE, pptaskctrl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpTaskManager_Impl::CreateReoccurringTask(this, windows_core::from_raw_borrowed(&ptask), core::mem::transmute_copy(&pvtaskdata), core::mem::transmute_copy(&hcompevent)) { + match ISpTaskManager_Impl::CreateReoccurringTask(this, core::mem::transmute_copy(&ptask), core::mem::transmute_copy(&pvtaskdata), core::mem::transmute_copy(&hcompevent)) { Ok(ok__) => { pptaskctrl.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6140,7 +6140,7 @@ impl ISpTaskManager_Vtbl { } unsafe extern "system" fn CreateThreadControl(this: *mut core::ffi::c_void, ptask: *mut core::ffi::c_void, pvtaskdata: *const core::ffi::c_void, npriority: i32, pptaskctrl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpTaskManager_Impl::CreateThreadControl(this, windows_core::from_raw_borrowed(&ptask), core::mem::transmute_copy(&pvtaskdata), core::mem::transmute_copy(&npriority)) { + match ISpTaskManager_Impl::CreateThreadControl(this, core::mem::transmute_copy(&ptask), core::mem::transmute_copy(&pvtaskdata), core::mem::transmute_copy(&npriority)) { Ok(ok__) => { pptaskctrl.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6378,14 +6378,14 @@ pub struct ISpTokenUI_Vtbl { pub DisplayUI: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HWND, windows_core::PCWSTR, windows_core::PCWSTR, *const core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISpTokenUI_Impl: windows_core::IUnknownImpl { - fn IsUISupported(&self, psztypeofui: &windows_core::PCWSTR, pvextradata: *const core::ffi::c_void, cbextradata: u32, punkobject: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn DisplayUI(&self, hwndparent: super::super::Foundation::HWND, psztitle: &windows_core::PCWSTR, psztypeofui: &windows_core::PCWSTR, pvextradata: *const core::ffi::c_void, cbextradata: u32, ptoken: Option<&ISpObjectToken>, punkobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn IsUISupported(&self, psztypeofui: &windows_core::PCWSTR, pvextradata: *const core::ffi::c_void, cbextradata: u32, punkobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn DisplayUI(&self, hwndparent: super::super::Foundation::HWND, psztitle: &windows_core::PCWSTR, psztypeofui: &windows_core::PCWSTR, pvextradata: *const core::ffi::c_void, cbextradata: u32, ptoken: windows_core::Ref<'_, ISpObjectToken>, punkobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ISpTokenUI_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsUISupported(this: *mut core::ffi::c_void, psztypeofui: windows_core::PCWSTR, pvextradata: *const core::ffi::c_void, cbextradata: u32, punkobject: *mut core::ffi::c_void, pfsupported: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpTokenUI_Impl::IsUISupported(this, core::mem::transmute(&psztypeofui), core::mem::transmute_copy(&pvextradata), core::mem::transmute_copy(&cbextradata), windows_core::from_raw_borrowed(&punkobject)) { + match ISpTokenUI_Impl::IsUISupported(this, core::mem::transmute(&psztypeofui), core::mem::transmute_copy(&pvextradata), core::mem::transmute_copy(&cbextradata), core::mem::transmute_copy(&punkobject)) { Ok(ok__) => { pfsupported.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6395,7 +6395,7 @@ impl ISpTokenUI_Vtbl { } unsafe extern "system" fn DisplayUI(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, psztitle: windows_core::PCWSTR, psztypeofui: windows_core::PCWSTR, pvextradata: *const core::ffi::c_void, cbextradata: u32, ptoken: *mut core::ffi::c_void, punkobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpTokenUI_Impl::DisplayUI(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute(&psztitle), core::mem::transmute(&psztypeofui), core::mem::transmute_copy(&pvextradata), core::mem::transmute_copy(&cbextradata), windows_core::from_raw_borrowed(&ptoken), windows_core::from_raw_borrowed(&punkobject)).into() + ISpTokenUI_Impl::DisplayUI(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute(&psztitle), core::mem::transmute(&psztypeofui), core::mem::transmute_copy(&pvextradata), core::mem::transmute_copy(&cbextradata), core::mem::transmute_copy(&ptoken), core::mem::transmute_copy(&punkobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6608,15 +6608,15 @@ pub struct ISpVoice_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ISpVoice_Impl: ISpEventSource_Impl { - fn SetOutput(&self, punkoutput: Option<&windows_core::IUnknown>, fallowformatchanges: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetOutput(&self, punkoutput: windows_core::Ref<'_, windows_core::IUnknown>, fallowformatchanges: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetOutputObjectToken(&self) -> windows_core::Result; fn GetOutputStream(&self) -> windows_core::Result; fn Pause(&self) -> windows_core::Result<()>; fn Resume(&self) -> windows_core::Result<()>; - fn SetVoice(&self, ptoken: Option<&ISpObjectToken>) -> windows_core::Result<()>; + fn SetVoice(&self, ptoken: windows_core::Ref<'_, ISpObjectToken>) -> windows_core::Result<()>; fn GetVoice(&self) -> windows_core::Result; fn Speak(&self, pwcs: &windows_core::PCWSTR, dwflags: u32, pulstreamnumber: *mut u32) -> windows_core::Result<()>; - fn SpeakStream(&self, pstream: Option<&super::super::System::Com::IStream>, dwflags: u32, pulstreamnumber: *mut u32) -> windows_core::Result<()>; + fn SpeakStream(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, dwflags: u32, pulstreamnumber: *mut u32) -> windows_core::Result<()>; fn GetStatus(&self, pstatus: *mut SPVOICESTATUS, ppszlastbookmark: *mut windows_core::PWSTR) -> windows_core::Result<()>; fn Skip(&self, pitemtype: &windows_core::PCWSTR, lnumitems: i32, pulnumskipped: *mut u32) -> windows_core::Result<()>; fn SetPriority(&self, epriority: SPVPRIORITY) -> windows_core::Result<()>; @@ -6639,7 +6639,7 @@ impl ISpVoice_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOutput(this: *mut core::ffi::c_void, punkoutput: *mut core::ffi::c_void, fallowformatchanges: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpVoice_Impl::SetOutput(this, windows_core::from_raw_borrowed(&punkoutput), core::mem::transmute_copy(&fallowformatchanges)).into() + ISpVoice_Impl::SetOutput(this, core::mem::transmute_copy(&punkoutput), core::mem::transmute_copy(&fallowformatchanges)).into() } unsafe extern "system" fn GetOutputObjectToken(this: *mut core::ffi::c_void, ppobjecttoken: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6671,7 +6671,7 @@ impl ISpVoice_Vtbl { } unsafe extern "system" fn SetVoice(this: *mut core::ffi::c_void, ptoken: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpVoice_Impl::SetVoice(this, windows_core::from_raw_borrowed(&ptoken)).into() + ISpVoice_Impl::SetVoice(this, core::mem::transmute_copy(&ptoken)).into() } unsafe extern "system" fn GetVoice(this: *mut core::ffi::c_void, pptoken: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6689,7 +6689,7 @@ impl ISpVoice_Vtbl { } unsafe extern "system" fn SpeakStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, dwflags: u32, pulstreamnumber: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpVoice_Impl::SpeakStream(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pulstreamnumber)).into() + ISpVoice_Impl::SpeakStream(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pulstreamnumber)).into() } unsafe extern "system" fn GetStatus(this: *mut core::ffi::c_void, pstatus: *mut SPVOICESTATUS, ppszlastbookmark: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7179,7 +7179,7 @@ pub trait ISpeechAudioFormat_Impl: super::super::System::Com::IDispatch_Impl { fn Guid(&self) -> windows_core::Result; fn SetGuid(&self, guid: &windows_core::BSTR) -> windows_core::Result<()>; fn GetWaveFormatEx(&self) -> windows_core::Result; - fn SetWaveFormatEx(&self, speechwaveformatex: Option<&ISpeechWaveFormatEx>) -> windows_core::Result<()>; + fn SetWaveFormatEx(&self, speechwaveformatex: windows_core::Ref<'_, ISpeechWaveFormatEx>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISpeechAudioFormat_Vtbl { @@ -7224,7 +7224,7 @@ impl ISpeechAudioFormat_Vtbl { } unsafe extern "system" fn SetWaveFormatEx(this: *mut core::ffi::c_void, speechwaveformatex: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechAudioFormat_Impl::SetWaveFormatEx(this, windows_core::from_raw_borrowed(&speechwaveformatex)).into() + ISpeechAudioFormat_Impl::SetWaveFormatEx(this, core::mem::transmute_copy(&speechwaveformatex)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -7430,7 +7430,7 @@ pub struct ISpeechBaseStream_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISpeechBaseStream_Impl: super::super::System::Com::IDispatch_Impl { fn Format(&self) -> windows_core::Result; - fn putref_Format(&self, audioformat: Option<&ISpeechAudioFormat>) -> windows_core::Result<()>; + fn putref_Format(&self, audioformat: windows_core::Ref<'_, ISpeechAudioFormat>) -> windows_core::Result<()>; fn Read(&self, buffer: *mut super::super::System::Variant::VARIANT, numberofbytes: i32, bytesread: *mut i32) -> windows_core::Result<()>; fn Write(&self, buffer: &super::super::System::Variant::VARIANT) -> windows_core::Result; fn Seek(&self, position: &super::super::System::Variant::VARIANT, origin: SpeechStreamSeekPositionType) -> windows_core::Result; @@ -7450,7 +7450,7 @@ impl ISpeechBaseStream_Vtbl { } unsafe extern "system" fn putref_Format(this: *mut core::ffi::c_void, audioformat: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechBaseStream_Impl::putref_Format(this, windows_core::from_raw_borrowed(&audioformat)).into() + ISpeechBaseStream_Impl::putref_Format(this, core::mem::transmute_copy(&audioformat)).into() } unsafe extern "system" fn Read(this: *mut core::ffi::c_void, buffer: *mut super::super::System::Variant::VARIANT, numberofbytes: i32, bytesread: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7525,7 +7525,7 @@ pub struct ISpeechCustomStream_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISpeechCustomStream_Impl: ISpeechBaseStream_Impl { fn BaseStream(&self) -> windows_core::Result; - fn putref_BaseStream(&self, punkstream: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn putref_BaseStream(&self, punkstream: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISpeechCustomStream_Vtbl { @@ -7542,7 +7542,7 @@ impl ISpeechCustomStream_Vtbl { } unsafe extern "system" fn putref_BaseStream(this: *mut core::ffi::c_void, punkstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechCustomStream_Impl::putref_BaseStream(this, windows_core::from_raw_borrowed(&punkstream)).into() + ISpeechCustomStream_Impl::putref_BaseStream(this, core::mem::transmute_copy(&punkstream)).into() } Self { base__: ISpeechBaseStream_Vtbl::new::(), @@ -8026,9 +8026,9 @@ pub struct ISpeechGrammarRuleState_Vtbl { pub trait ISpeechGrammarRuleState_Impl: super::super::System::Com::IDispatch_Impl { fn Rule(&self) -> windows_core::Result; fn Transitions(&self) -> windows_core::Result; - fn AddWordTransition(&self, deststate: Option<&ISpeechGrammarRuleState>, words: &windows_core::BSTR, separators: &windows_core::BSTR, r#type: SpeechGrammarWordType, propertyname: &windows_core::BSTR, propertyid: i32, propertyvalue: *const super::super::System::Variant::VARIANT, weight: f32) -> windows_core::Result<()>; - fn AddRuleTransition(&self, destinationstate: Option<&ISpeechGrammarRuleState>, rule: Option<&ISpeechGrammarRule>, propertyname: &windows_core::BSTR, propertyid: i32, propertyvalue: *const super::super::System::Variant::VARIANT, weight: f32) -> windows_core::Result<()>; - fn AddSpecialTransition(&self, destinationstate: Option<&ISpeechGrammarRuleState>, r#type: SpeechSpecialTransitionType, propertyname: &windows_core::BSTR, propertyid: i32, propertyvalue: *const super::super::System::Variant::VARIANT, weight: f32) -> windows_core::Result<()>; + fn AddWordTransition(&self, deststate: windows_core::Ref<'_, ISpeechGrammarRuleState>, words: &windows_core::BSTR, separators: &windows_core::BSTR, r#type: SpeechGrammarWordType, propertyname: &windows_core::BSTR, propertyid: i32, propertyvalue: *const super::super::System::Variant::VARIANT, weight: f32) -> windows_core::Result<()>; + fn AddRuleTransition(&self, destinationstate: windows_core::Ref<'_, ISpeechGrammarRuleState>, rule: windows_core::Ref<'_, ISpeechGrammarRule>, propertyname: &windows_core::BSTR, propertyid: i32, propertyvalue: *const super::super::System::Variant::VARIANT, weight: f32) -> windows_core::Result<()>; + fn AddSpecialTransition(&self, destinationstate: windows_core::Ref<'_, ISpeechGrammarRuleState>, r#type: SpeechSpecialTransitionType, propertyname: &windows_core::BSTR, propertyid: i32, propertyvalue: *const super::super::System::Variant::VARIANT, weight: f32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISpeechGrammarRuleState_Vtbl { @@ -8055,15 +8055,15 @@ impl ISpeechGrammarRuleState_Vtbl { } unsafe extern "system" fn AddWordTransition(this: *mut core::ffi::c_void, deststate: *mut core::ffi::c_void, words: *mut core::ffi::c_void, separators: *mut core::ffi::c_void, r#type: SpeechGrammarWordType, propertyname: *mut core::ffi::c_void, propertyid: i32, propertyvalue: *const super::super::System::Variant::VARIANT, weight: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechGrammarRuleState_Impl::AddWordTransition(this, windows_core::from_raw_borrowed(&deststate), core::mem::transmute(&words), core::mem::transmute(&separators), core::mem::transmute_copy(&r#type), core::mem::transmute(&propertyname), core::mem::transmute_copy(&propertyid), core::mem::transmute_copy(&propertyvalue), core::mem::transmute_copy(&weight)).into() + ISpeechGrammarRuleState_Impl::AddWordTransition(this, core::mem::transmute_copy(&deststate), core::mem::transmute(&words), core::mem::transmute(&separators), core::mem::transmute_copy(&r#type), core::mem::transmute(&propertyname), core::mem::transmute_copy(&propertyid), core::mem::transmute_copy(&propertyvalue), core::mem::transmute_copy(&weight)).into() } unsafe extern "system" fn AddRuleTransition(this: *mut core::ffi::c_void, destinationstate: *mut core::ffi::c_void, rule: *mut core::ffi::c_void, propertyname: *mut core::ffi::c_void, propertyid: i32, propertyvalue: *const super::super::System::Variant::VARIANT, weight: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechGrammarRuleState_Impl::AddRuleTransition(this, windows_core::from_raw_borrowed(&destinationstate), windows_core::from_raw_borrowed(&rule), core::mem::transmute(&propertyname), core::mem::transmute_copy(&propertyid), core::mem::transmute_copy(&propertyvalue), core::mem::transmute_copy(&weight)).into() + ISpeechGrammarRuleState_Impl::AddRuleTransition(this, core::mem::transmute_copy(&destinationstate), core::mem::transmute_copy(&rule), core::mem::transmute(&propertyname), core::mem::transmute_copy(&propertyid), core::mem::transmute_copy(&propertyvalue), core::mem::transmute_copy(&weight)).into() } unsafe extern "system" fn AddSpecialTransition(this: *mut core::ffi::c_void, destinationstate: *mut core::ffi::c_void, r#type: SpeechSpecialTransitionType, propertyname: *mut core::ffi::c_void, propertyid: i32, propertyvalue: *const super::super::System::Variant::VARIANT, weight: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechGrammarRuleState_Impl::AddSpecialTransition(this, windows_core::from_raw_borrowed(&destinationstate), core::mem::transmute_copy(&r#type), core::mem::transmute(&propertyname), core::mem::transmute_copy(&propertyid), core::mem::transmute_copy(&propertyvalue), core::mem::transmute_copy(&weight)).into() + ISpeechGrammarRuleState_Impl::AddSpecialTransition(this, core::mem::transmute_copy(&destinationstate), core::mem::transmute_copy(&r#type), core::mem::transmute(&propertyname), core::mem::transmute_copy(&propertyid), core::mem::transmute_copy(&propertyvalue), core::mem::transmute_copy(&weight)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -8574,13 +8574,13 @@ pub struct ISpeechLexicon_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISpeechLexicon_Impl: super::super::System::Com::IDispatch_Impl { fn GenerationId(&self) -> windows_core::Result; - fn GetWords(&self, flags: SpeechLexiconType, generationid: *mut i32, words: *mut Option) -> windows_core::Result<()>; + fn GetWords(&self, flags: SpeechLexiconType, generationid: *mut i32, words: windows_core::OutRef<'_, ISpeechLexiconWords>) -> windows_core::Result<()>; fn AddPronunciation(&self, bstrword: &windows_core::BSTR, langid: i32, partofspeech: SpeechPartOfSpeech, bstrpronunciation: &windows_core::BSTR) -> windows_core::Result<()>; fn AddPronunciationByPhoneIds(&self, bstrword: &windows_core::BSTR, langid: i32, partofspeech: SpeechPartOfSpeech, phoneids: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn RemovePronunciation(&self, bstrword: &windows_core::BSTR, langid: i32, partofspeech: SpeechPartOfSpeech, bstrpronunciation: &windows_core::BSTR) -> windows_core::Result<()>; fn RemovePronunciationByPhoneIds(&self, bstrword: &windows_core::BSTR, langid: i32, partofspeech: SpeechPartOfSpeech, phoneids: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn GetPronunciations(&self, bstrword: &windows_core::BSTR, langid: i32, typeflags: SpeechLexiconType) -> windows_core::Result; - fn GetGenerationChange(&self, generationid: *mut i32, ppwords: *mut Option) -> windows_core::Result<()>; + fn GetGenerationChange(&self, generationid: *mut i32, ppwords: windows_core::OutRef<'_, ISpeechLexiconWords>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISpeechLexicon_Vtbl { @@ -9323,12 +9323,12 @@ pub trait ISpeechObjectToken_Impl: super::super::System::Com::IDispatch_Impl { fn GetDescription(&self, locale: i32) -> windows_core::Result; fn SetId(&self, id: &windows_core::BSTR, categoryid: &windows_core::BSTR, createifnotexist: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn GetAttribute(&self, attributename: &windows_core::BSTR) -> windows_core::Result; - fn CreateInstance(&self, punkouter: Option<&windows_core::IUnknown>, clscontext: SpeechTokenContext) -> windows_core::Result; + fn CreateInstance(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, clscontext: SpeechTokenContext) -> windows_core::Result; fn Remove(&self, objectstorageclsid: &windows_core::BSTR) -> windows_core::Result<()>; fn GetStorageFileName(&self, objectstorageclsid: &windows_core::BSTR, keyname: &windows_core::BSTR, filename: &windows_core::BSTR, folder: SpeechTokenShellFolder) -> windows_core::Result; fn RemoveStorageFileName(&self, objectstorageclsid: &windows_core::BSTR, keyname: &windows_core::BSTR, deletefile: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn IsUISupported(&self, typeofui: &windows_core::BSTR, extradata: *const super::super::System::Variant::VARIANT, object: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn DisplayUI(&self, hwnd: i32, title: &windows_core::BSTR, typeofui: &windows_core::BSTR, extradata: *const super::super::System::Variant::VARIANT, object: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn IsUISupported(&self, typeofui: &windows_core::BSTR, extradata: *const super::super::System::Variant::VARIANT, object: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn DisplayUI(&self, hwnd: i32, title: &windows_core::BSTR, typeofui: &windows_core::BSTR, extradata: *const super::super::System::Variant::VARIANT, object: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn MatchesAttributes(&self, attributes: &windows_core::BSTR) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -9390,7 +9390,7 @@ impl ISpeechObjectToken_Vtbl { } unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, clscontext: SpeechTokenContext, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpeechObjectToken_Impl::CreateInstance(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&clscontext)) { + match ISpeechObjectToken_Impl::CreateInstance(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&clscontext)) { Ok(ok__) => { object.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9418,7 +9418,7 @@ impl ISpeechObjectToken_Vtbl { } unsafe extern "system" fn IsUISupported(this: *mut core::ffi::c_void, typeofui: *mut core::ffi::c_void, extradata: *const super::super::System::Variant::VARIANT, object: *mut core::ffi::c_void, supported: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpeechObjectToken_Impl::IsUISupported(this, core::mem::transmute(&typeofui), core::mem::transmute_copy(&extradata), windows_core::from_raw_borrowed(&object)) { + match ISpeechObjectToken_Impl::IsUISupported(this, core::mem::transmute(&typeofui), core::mem::transmute_copy(&extradata), core::mem::transmute_copy(&object)) { Ok(ok__) => { supported.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9428,7 +9428,7 @@ impl ISpeechObjectToken_Vtbl { } unsafe extern "system" fn DisplayUI(this: *mut core::ffi::c_void, hwnd: i32, title: *mut core::ffi::c_void, typeofui: *mut core::ffi::c_void, extradata: *const super::super::System::Variant::VARIANT, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechObjectToken_Impl::DisplayUI(this, core::mem::transmute_copy(&hwnd), core::mem::transmute(&title), core::mem::transmute(&typeofui), core::mem::transmute_copy(&extradata), windows_core::from_raw_borrowed(&object)).into() + ISpeechObjectToken_Impl::DisplayUI(this, core::mem::transmute_copy(&hwnd), core::mem::transmute(&title), core::mem::transmute(&typeofui), core::mem::transmute_copy(&extradata), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn MatchesAttributes(this: *mut core::ffi::c_void, attributes: *mut core::ffi::c_void, matches: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11583,7 +11583,7 @@ pub trait ISpeechRecoContext_Impl: super::super::System::Com::IDispatch_Impl { fn Recognizer(&self) -> windows_core::Result; fn AudioInputInterferenceStatus(&self) -> windows_core::Result; fn RequestedUIType(&self) -> windows_core::Result; - fn putref_Voice(&self, voice: Option<&ISpeechVoice>) -> windows_core::Result<()>; + fn putref_Voice(&self, voice: windows_core::Ref<'_, ISpeechVoice>) -> windows_core::Result<()>; fn Voice(&self) -> windows_core::Result; fn SetAllowVoiceFormatMatchingOnNextSet(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn AllowVoiceFormatMatchingOnNextSet(&self) -> windows_core::Result; @@ -11597,7 +11597,7 @@ pub trait ISpeechRecoContext_Impl: super::super::System::Com::IDispatch_Impl { fn State(&self) -> windows_core::Result; fn SetRetainedAudio(&self, option: SpeechRetainedAudioOptions) -> windows_core::Result<()>; fn RetainedAudio(&self) -> windows_core::Result; - fn putref_RetainedAudioFormat(&self, format: Option<&ISpeechAudioFormat>) -> windows_core::Result<()>; + fn putref_RetainedAudioFormat(&self, format: windows_core::Ref<'_, ISpeechAudioFormat>) -> windows_core::Result<()>; fn RetainedAudioFormat(&self) -> windows_core::Result; fn Pause(&self) -> windows_core::Result<()>; fn Resume(&self) -> windows_core::Result<()>; @@ -11641,7 +11641,7 @@ impl ISpeechRecoContext_Vtbl { } unsafe extern "system" fn putref_Voice(this: *mut core::ffi::c_void, voice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecoContext_Impl::putref_Voice(this, windows_core::from_raw_borrowed(&voice)).into() + ISpeechRecoContext_Impl::putref_Voice(this, core::mem::transmute_copy(&voice)).into() } unsafe extern "system" fn Voice(this: *mut core::ffi::c_void, voice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11739,7 +11739,7 @@ impl ISpeechRecoContext_Vtbl { } unsafe extern "system" fn putref_RetainedAudioFormat(this: *mut core::ffi::c_void, format: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecoContext_Impl::putref_RetainedAudioFormat(this, windows_core::from_raw_borrowed(&format)).into() + ISpeechRecoContext_Impl::putref_RetainedAudioFormat(this, core::mem::transmute_copy(&format)).into() } unsafe extern "system" fn RetainedAudioFormat(this: *mut core::ffi::c_void, format: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11962,8 +11962,8 @@ pub trait ISpeechRecoGrammar_Impl: super::super::System::Com::IDispatch_Impl { fn DictationLoad(&self, topicname: &windows_core::BSTR, loadoption: SpeechLoadOption) -> windows_core::Result<()>; fn DictationUnload(&self) -> windows_core::Result<()>; fn DictationSetState(&self, state: SpeechRuleState) -> windows_core::Result<()>; - fn SetWordSequenceData(&self, text: &windows_core::BSTR, textlength: i32, info: Option<&ISpeechTextSelectionInformation>) -> windows_core::Result<()>; - fn SetTextSelection(&self, info: Option<&ISpeechTextSelectionInformation>) -> windows_core::Result<()>; + fn SetWordSequenceData(&self, text: &windows_core::BSTR, textlength: i32, info: windows_core::Ref<'_, ISpeechTextSelectionInformation>) -> windows_core::Result<()>; + fn SetTextSelection(&self, info: windows_core::Ref<'_, ISpeechTextSelectionInformation>) -> windows_core::Result<()>; fn IsPronounceable(&self, word: &windows_core::BSTR) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -12059,11 +12059,11 @@ impl ISpeechRecoGrammar_Vtbl { } unsafe extern "system" fn SetWordSequenceData(this: *mut core::ffi::c_void, text: *mut core::ffi::c_void, textlength: i32, info: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecoGrammar_Impl::SetWordSequenceData(this, core::mem::transmute(&text), core::mem::transmute_copy(&textlength), windows_core::from_raw_borrowed(&info)).into() + ISpeechRecoGrammar_Impl::SetWordSequenceData(this, core::mem::transmute(&text), core::mem::transmute_copy(&textlength), core::mem::transmute_copy(&info)).into() } unsafe extern "system" fn SetTextSelection(this: *mut core::ffi::c_void, info: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecoGrammar_Impl::SetTextSelection(this, windows_core::from_raw_borrowed(&info)).into() + ISpeechRecoGrammar_Impl::SetTextSelection(this, core::mem::transmute_copy(&info)).into() } unsafe extern "system" fn IsPronounceable(this: *mut core::ffi::c_void, word: *mut core::ffi::c_void, wordpronounceable: *mut SpeechWordPronounceable) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12182,7 +12182,7 @@ pub struct ISpeechRecoResult_Vtbl { pub trait ISpeechRecoResult_Impl: super::super::System::Com::IDispatch_Impl { fn RecoContext(&self) -> windows_core::Result; fn Times(&self) -> windows_core::Result; - fn putref_AudioFormat(&self, format: Option<&ISpeechAudioFormat>) -> windows_core::Result<()>; + fn putref_AudioFormat(&self, format: windows_core::Ref<'_, ISpeechAudioFormat>) -> windows_core::Result<()>; fn AudioFormat(&self) -> windows_core::Result; fn PhraseInfo(&self) -> windows_core::Result; fn Alternates(&self, requestcount: i32, startelement: i32, elements: i32) -> windows_core::Result; @@ -12216,7 +12216,7 @@ impl ISpeechRecoResult_Vtbl { } unsafe extern "system" fn putref_AudioFormat(this: *mut core::ffi::c_void, format: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecoResult_Impl::putref_AudioFormat(this, windows_core::from_raw_borrowed(&format)).into() + ISpeechRecoResult_Impl::putref_AudioFormat(this, core::mem::transmute_copy(&format)).into() } unsafe extern "system" fn AudioFormat(this: *mut core::ffi::c_void, format: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12435,7 +12435,7 @@ pub struct ISpeechRecoResultDispatch_Vtbl { pub trait ISpeechRecoResultDispatch_Impl: super::super::System::Com::IDispatch_Impl { fn RecoContext(&self) -> windows_core::Result; fn Times(&self) -> windows_core::Result; - fn putref_AudioFormat(&self, format: Option<&ISpeechAudioFormat>) -> windows_core::Result<()>; + fn putref_AudioFormat(&self, format: windows_core::Ref<'_, ISpeechAudioFormat>) -> windows_core::Result<()>; fn AudioFormat(&self) -> windows_core::Result; fn PhraseInfo(&self) -> windows_core::Result; fn Alternates(&self, requestcount: i32, startelement: i32, elements: i32) -> windows_core::Result; @@ -12472,7 +12472,7 @@ impl ISpeechRecoResultDispatch_Vtbl { } unsafe extern "system" fn putref_AudioFormat(this: *mut core::ffi::c_void, format: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecoResultDispatch_Impl::putref_AudioFormat(this, windows_core::from_raw_borrowed(&format)).into() + ISpeechRecoResultDispatch_Impl::putref_AudioFormat(this, core::mem::transmute_copy(&format)).into() } unsafe extern "system" fn AudioFormat(this: *mut core::ffi::c_void, format: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12859,19 +12859,19 @@ pub struct ISpeechRecognizer_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISpeechRecognizer_Impl: super::super::System::Com::IDispatch_Impl { - fn putref_Recognizer(&self, recognizer: Option<&ISpeechObjectToken>) -> windows_core::Result<()>; + fn putref_Recognizer(&self, recognizer: windows_core::Ref<'_, ISpeechObjectToken>) -> windows_core::Result<()>; fn Recognizer(&self) -> windows_core::Result; fn SetAllowAudioInputFormatChangesOnNextSet(&self, allow: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn AllowAudioInputFormatChangesOnNextSet(&self) -> windows_core::Result; - fn putref_AudioInput(&self, audioinput: Option<&ISpeechObjectToken>) -> windows_core::Result<()>; + fn putref_AudioInput(&self, audioinput: windows_core::Ref<'_, ISpeechObjectToken>) -> windows_core::Result<()>; fn AudioInput(&self) -> windows_core::Result; - fn putref_AudioInputStream(&self, audioinputstream: Option<&ISpeechBaseStream>) -> windows_core::Result<()>; + fn putref_AudioInputStream(&self, audioinputstream: windows_core::Ref<'_, ISpeechBaseStream>) -> windows_core::Result<()>; fn AudioInputStream(&self) -> windows_core::Result; fn IsShared(&self) -> windows_core::Result; fn SetState(&self, state: SpeechRecognizerState) -> windows_core::Result<()>; fn State(&self) -> windows_core::Result; fn Status(&self) -> windows_core::Result; - fn putref_Profile(&self, profile: Option<&ISpeechObjectToken>) -> windows_core::Result<()>; + fn putref_Profile(&self, profile: windows_core::Ref<'_, ISpeechObjectToken>) -> windows_core::Result<()>; fn Profile(&self) -> windows_core::Result; fn EmulateRecognition(&self, textelements: &super::super::System::Variant::VARIANT, elementdisplayattributes: *const super::super::System::Variant::VARIANT, languageid: i32) -> windows_core::Result<()>; fn CreateRecoContext(&self) -> windows_core::Result; @@ -12891,7 +12891,7 @@ impl ISpeechRecognizer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn putref_Recognizer(this: *mut core::ffi::c_void, recognizer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecognizer_Impl::putref_Recognizer(this, windows_core::from_raw_borrowed(&recognizer)).into() + ISpeechRecognizer_Impl::putref_Recognizer(this, core::mem::transmute_copy(&recognizer)).into() } unsafe extern "system" fn Recognizer(this: *mut core::ffi::c_void, recognizer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12919,7 +12919,7 @@ impl ISpeechRecognizer_Vtbl { } unsafe extern "system" fn putref_AudioInput(this: *mut core::ffi::c_void, audioinput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecognizer_Impl::putref_AudioInput(this, windows_core::from_raw_borrowed(&audioinput)).into() + ISpeechRecognizer_Impl::putref_AudioInput(this, core::mem::transmute_copy(&audioinput)).into() } unsafe extern "system" fn AudioInput(this: *mut core::ffi::c_void, audioinput: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12933,7 +12933,7 @@ impl ISpeechRecognizer_Vtbl { } unsafe extern "system" fn putref_AudioInputStream(this: *mut core::ffi::c_void, audioinputstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecognizer_Impl::putref_AudioInputStream(this, windows_core::from_raw_borrowed(&audioinputstream)).into() + ISpeechRecognizer_Impl::putref_AudioInputStream(this, core::mem::transmute_copy(&audioinputstream)).into() } unsafe extern "system" fn AudioInputStream(this: *mut core::ffi::c_void, audioinputstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12981,7 +12981,7 @@ impl ISpeechRecognizer_Vtbl { } unsafe extern "system" fn putref_Profile(this: *mut core::ffi::c_void, profile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechRecognizer_Impl::putref_Profile(this, windows_core::from_raw_borrowed(&profile)).into() + ISpeechRecognizer_Impl::putref_Profile(this, core::mem::transmute_copy(&profile)).into() } unsafe extern "system" fn Profile(this: *mut core::ffi::c_void, profile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13303,7 +13303,7 @@ pub struct ISpeechResourceLoader_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISpeechResourceLoader_Impl: super::super::System::Com::IDispatch_Impl { - fn LoadResource(&self, bstrresourceuri: &windows_core::BSTR, falwaysreload: super::super::Foundation::VARIANT_BOOL, pstream: *mut Option, pbstrmimetype: *mut windows_core::BSTR, pfmodified: *mut super::super::Foundation::VARIANT_BOOL, pbstrredirecturl: *mut windows_core::BSTR) -> windows_core::Result<()>; + fn LoadResource(&self, bstrresourceuri: &windows_core::BSTR, falwaysreload: super::super::Foundation::VARIANT_BOOL, pstream: windows_core::OutRef<'_, windows_core::IUnknown>, pbstrmimetype: *mut windows_core::BSTR, pfmodified: *mut super::super::Foundation::VARIANT_BOOL, pbstrredirecturl: *mut windows_core::BSTR) -> windows_core::Result<()>; fn GetLocalCopy(&self, bstrresourceuri: &windows_core::BSTR, pbstrlocalpath: *mut windows_core::BSTR, pbstrmimetype: *mut windows_core::BSTR, pbstrredirecturl: *mut windows_core::BSTR) -> windows_core::Result<()>; fn ReleaseLocalCopy(&self, pbstrlocalpath: &windows_core::BSTR) -> windows_core::Result<()>; } @@ -13668,11 +13668,11 @@ pub struct ISpeechVoice_Vtbl { pub trait ISpeechVoice_Impl: super::super::System::Com::IDispatch_Impl { fn Status(&self) -> windows_core::Result; fn Voice(&self) -> windows_core::Result; - fn putref_Voice(&self, voice: Option<&ISpeechObjectToken>) -> windows_core::Result<()>; + fn putref_Voice(&self, voice: windows_core::Ref<'_, ISpeechObjectToken>) -> windows_core::Result<()>; fn AudioOutput(&self) -> windows_core::Result; - fn putref_AudioOutput(&self, audiooutput: Option<&ISpeechObjectToken>) -> windows_core::Result<()>; + fn putref_AudioOutput(&self, audiooutput: windows_core::Ref<'_, ISpeechObjectToken>) -> windows_core::Result<()>; fn AudioOutputStream(&self) -> windows_core::Result; - fn putref_AudioOutputStream(&self, audiooutputstream: Option<&ISpeechBaseStream>) -> windows_core::Result<()>; + fn putref_AudioOutputStream(&self, audiooutputstream: windows_core::Ref<'_, ISpeechBaseStream>) -> windows_core::Result<()>; fn Rate(&self) -> windows_core::Result; fn SetRate(&self, rate: i32) -> windows_core::Result<()>; fn Volume(&self) -> windows_core::Result; @@ -13688,7 +13688,7 @@ pub trait ISpeechVoice_Impl: super::super::System::Com::IDispatch_Impl { fn SetSynchronousSpeakTimeout(&self, mstimeout: i32) -> windows_core::Result<()>; fn SynchronousSpeakTimeout(&self) -> windows_core::Result; fn Speak(&self, text: &windows_core::BSTR, flags: SpeechVoiceSpeakFlags) -> windows_core::Result; - fn SpeakStream(&self, stream: Option<&ISpeechBaseStream>, flags: SpeechVoiceSpeakFlags) -> windows_core::Result; + fn SpeakStream(&self, stream: windows_core::Ref<'_, ISpeechBaseStream>, flags: SpeechVoiceSpeakFlags) -> windows_core::Result; fn Pause(&self) -> windows_core::Result<()>; fn Resume(&self) -> windows_core::Result<()>; fn Skip(&self, r#type: &windows_core::BSTR, numitems: i32) -> windows_core::Result; @@ -13724,7 +13724,7 @@ impl ISpeechVoice_Vtbl { } unsafe extern "system" fn putref_Voice(this: *mut core::ffi::c_void, voice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechVoice_Impl::putref_Voice(this, windows_core::from_raw_borrowed(&voice)).into() + ISpeechVoice_Impl::putref_Voice(this, core::mem::transmute_copy(&voice)).into() } unsafe extern "system" fn AudioOutput(this: *mut core::ffi::c_void, audiooutput: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13738,7 +13738,7 @@ impl ISpeechVoice_Vtbl { } unsafe extern "system" fn putref_AudioOutput(this: *mut core::ffi::c_void, audiooutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechVoice_Impl::putref_AudioOutput(this, windows_core::from_raw_borrowed(&audiooutput)).into() + ISpeechVoice_Impl::putref_AudioOutput(this, core::mem::transmute_copy(&audiooutput)).into() } unsafe extern "system" fn AudioOutputStream(this: *mut core::ffi::c_void, audiooutputstream: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13752,7 +13752,7 @@ impl ISpeechVoice_Vtbl { } unsafe extern "system" fn putref_AudioOutputStream(this: *mut core::ffi::c_void, audiooutputstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISpeechVoice_Impl::putref_AudioOutputStream(this, windows_core::from_raw_borrowed(&audiooutputstream)).into() + ISpeechVoice_Impl::putref_AudioOutputStream(this, core::mem::transmute_copy(&audiooutputstream)).into() } unsafe extern "system" fn Rate(this: *mut core::ffi::c_void, rate: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13864,7 +13864,7 @@ impl ISpeechVoice_Vtbl { } unsafe extern "system" fn SpeakStream(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, flags: SpeechVoiceSpeakFlags, streamnumber: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISpeechVoice_Impl::SpeakStream(this, windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&flags)) { + match ISpeechVoice_Impl::SpeakStream(this, core::mem::transmute_copy(&stream), core::mem::transmute_copy(&flags)) { Ok(ok__) => { streamnumber.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs index 8d281ce622..a56da80434 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs @@ -244,7 +244,7 @@ pub struct INSNetSourceCreator_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait INSNetSourceCreator_Impl: windows_core::IUnknownImpl { fn Initialize(&self) -> windows_core::Result<()>; - fn CreateNetSource(&self, pszstreamname: &windows_core::PCWSTR, pmonitor: Option<&windows_core::IUnknown>, pdata: *const u8, pusercontext: Option<&windows_core::IUnknown>, pcallback: Option<&windows_core::IUnknown>, qwcontext: u64) -> windows_core::Result<()>; + fn CreateNetSource(&self, pszstreamname: &windows_core::PCWSTR, pmonitor: windows_core::Ref<'_, windows_core::IUnknown>, pdata: *const u8, pusercontext: windows_core::Ref<'_, windows_core::IUnknown>, pcallback: windows_core::Ref<'_, windows_core::IUnknown>, qwcontext: u64) -> windows_core::Result<()>; fn GetNetSourceProperties(&self, pszstreamname: &windows_core::PCWSTR) -> windows_core::Result; fn GetNetSourceSharedNamespace(&self) -> windows_core::Result; fn GetNetSourceAdminInterface(&self, pszstreamname: &windows_core::PCWSTR) -> windows_core::Result; @@ -261,7 +261,7 @@ impl INSNetSourceCreator_Vtbl { } unsafe extern "system" fn CreateNetSource(this: *mut core::ffi::c_void, pszstreamname: windows_core::PCWSTR, pmonitor: *mut core::ffi::c_void, pdata: *const u8, pusercontext: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, qwcontext: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INSNetSourceCreator_Impl::CreateNetSource(this, core::mem::transmute(&pszstreamname), windows_core::from_raw_borrowed(&pmonitor), core::mem::transmute_copy(&pdata), windows_core::from_raw_borrowed(&pusercontext), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&qwcontext)).into() + INSNetSourceCreator_Impl::CreateNetSource(this, core::mem::transmute(&pszstreamname), core::mem::transmute_copy(&pmonitor), core::mem::transmute_copy(&pdata), core::mem::transmute_copy(&pusercontext), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&qwcontext)).into() } unsafe extern "system" fn GetNetSourceProperties(this: *mut core::ffi::c_void, pszstreamname: windows_core::PCWSTR, pppropertiesnode: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1122,7 +1122,7 @@ pub struct IWMCodecInfo2_Vtbl { } pub trait IWMCodecInfo2_Impl: IWMCodecInfo_Impl { fn GetCodecName(&self, guidtype: *const windows_core::GUID, dwcodecindex: u32, wszname: windows_core::PWSTR, pcchname: *mut u32) -> windows_core::Result<()>; - fn GetCodecFormatDesc(&self, guidtype: *const windows_core::GUID, dwcodecindex: u32, dwformatindex: u32, ppistreamconfig: *mut Option, wszdesc: windows_core::PWSTR, pcchdesc: *mut u32) -> windows_core::Result<()>; + fn GetCodecFormatDesc(&self, guidtype: *const windows_core::GUID, dwcodecindex: u32, dwformatindex: u32, ppistreamconfig: windows_core::OutRef<'_, IWMStreamConfig>, wszdesc: windows_core::PWSTR, pcchdesc: *mut u32) -> windows_core::Result<()>; } impl IWMCodecInfo2_Vtbl { pub const fn new() -> Self { @@ -1304,8 +1304,8 @@ pub struct IWMDRMMessageParser_Vtbl { pub ParseLicenseRequestMsg: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *mut *mut core::ffi::c_void, *mut DRM_VAL16, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMDRMMessageParser_Impl: windows_core::IUnknownImpl { - fn ParseRegistrationReqMsg(&self, pbregistrationreqmsg: *const u8, cbregistrationreqmsg: u32, ppdevicecert: *mut Option, pdeviceserialnumber: *mut DRM_VAL16) -> windows_core::Result<()>; - fn ParseLicenseRequestMsg(&self, pblicenserequestmsg: *const u8, cblicenserequestmsg: u32, ppdevicecert: *mut Option, pdeviceserialnumber: *mut DRM_VAL16, pbstraction: *mut windows_core::BSTR) -> windows_core::Result<()>; + fn ParseRegistrationReqMsg(&self, pbregistrationreqmsg: *const u8, cbregistrationreqmsg: u32, ppdevicecert: windows_core::OutRef<'_, INSSBuffer>, pdeviceserialnumber: *mut DRM_VAL16) -> windows_core::Result<()>; + fn ParseLicenseRequestMsg(&self, pblicenserequestmsg: *const u8, cblicenserequestmsg: u32, ppdevicecert: windows_core::OutRef<'_, INSSBuffer>, pdeviceserialnumber: *mut DRM_VAL16, pbstraction: *mut windows_core::BSTR) -> windows_core::Result<()>; } impl IWMDRMMessageParser_Vtbl { pub const fn new() -> Self { @@ -1599,7 +1599,7 @@ pub struct IWMDRMTranscryptor_Vtbl { pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMDRMTranscryptor_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, bstrfilename: &windows_core::BSTR, pblicenserequestmsg: *mut u8, cblicenserequestmsg: u32, pplicenseresponsemsg: *mut Option, pcallback: Option<&IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn Initialize(&self, bstrfilename: &windows_core::BSTR, pblicenserequestmsg: *mut u8, cblicenserequestmsg: u32, pplicenseresponsemsg: windows_core::OutRef<'_, INSSBuffer>, pcallback: windows_core::Ref<'_, IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; fn Seek(&self, hnstime: u64) -> windows_core::Result<()>; fn Read(&self, pbdata: *const u8, pcbdata: *const u32) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; @@ -1608,7 +1608,7 @@ impl IWMDRMTranscryptor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, bstrfilename: *mut core::ffi::c_void, pblicenserequestmsg: *mut u8, cblicenserequestmsg: u32, pplicenseresponsemsg: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMDRMTranscryptor_Impl::Initialize(this, core::mem::transmute(&bstrfilename), core::mem::transmute_copy(&pblicenserequestmsg), core::mem::transmute_copy(&cblicenserequestmsg), core::mem::transmute_copy(&pplicenseresponsemsg), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext)).into() + IWMDRMTranscryptor_Impl::Initialize(this, core::mem::transmute(&bstrfilename), core::mem::transmute_copy(&pblicenserequestmsg), core::mem::transmute_copy(&cblicenserequestmsg), core::mem::transmute_copy(&pplicenseresponsemsg), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext)).into() } unsafe extern "system" fn Seek(this: *mut core::ffi::c_void, hnstime: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2442,14 +2442,14 @@ pub struct IWMIndexer_Vtbl { pub Cancel: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMIndexer_Impl: windows_core::IUnknownImpl { - fn StartIndexing(&self, pwszurl: &windows_core::PCWSTR, pcallback: Option<&IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn StartIndexing(&self, pwszurl: &windows_core::PCWSTR, pcallback: windows_core::Ref<'_, IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; fn Cancel(&self) -> windows_core::Result<()>; } impl IWMIndexer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartIndexing(this: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, pcallback: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMIndexer_Impl::StartIndexing(this, core::mem::transmute(&pwszurl), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext)).into() + IWMIndexer_Impl::StartIndexing(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext)).into() } unsafe extern "system" fn Cancel(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2635,14 +2635,14 @@ pub struct IWMLicenseBackup_Vtbl { pub CancelLicenseBackup: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMLicenseBackup_Impl: windows_core::IUnknownImpl { - fn BackupLicenses(&self, dwflags: u32, pcallback: Option<&IWMStatusCallback>) -> windows_core::Result<()>; + fn BackupLicenses(&self, dwflags: u32, pcallback: windows_core::Ref<'_, IWMStatusCallback>) -> windows_core::Result<()>; fn CancelLicenseBackup(&self) -> windows_core::Result<()>; } impl IWMLicenseBackup_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BackupLicenses(this: *mut core::ffi::c_void, dwflags: u32, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMLicenseBackup_Impl::BackupLicenses(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pcallback)).into() + IWMLicenseBackup_Impl::BackupLicenses(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn CancelLicenseBackup(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2679,14 +2679,14 @@ pub struct IWMLicenseRestore_Vtbl { pub CancelLicenseRestore: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMLicenseRestore_Impl: windows_core::IUnknownImpl { - fn RestoreLicenses(&self, dwflags: u32, pcallback: Option<&IWMStatusCallback>) -> windows_core::Result<()>; + fn RestoreLicenses(&self, dwflags: u32, pcallback: windows_core::Ref<'_, IWMStatusCallback>) -> windows_core::Result<()>; fn CancelLicenseRestore(&self) -> windows_core::Result<()>; } impl IWMLicenseRestore_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RestoreLicenses(this: *mut core::ffi::c_void, dwflags: u32, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMLicenseRestore_Impl::RestoreLicenses(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pcallback)).into() + IWMLicenseRestore_Impl::RestoreLicenses(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn CancelLicenseRestore(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3413,15 +3413,15 @@ pub trait IWMProfile_Impl: windows_core::IUnknownImpl { fn GetStreamCount(&self) -> windows_core::Result; fn GetStream(&self, dwstreamindex: u32) -> windows_core::Result; fn GetStreamByNumber(&self, wstreamnum: u16) -> windows_core::Result; - fn RemoveStream(&self, pconfig: Option<&IWMStreamConfig>) -> windows_core::Result<()>; + fn RemoveStream(&self, pconfig: windows_core::Ref<'_, IWMStreamConfig>) -> windows_core::Result<()>; fn RemoveStreamByNumber(&self, wstreamnum: u16) -> windows_core::Result<()>; - fn AddStream(&self, pconfig: Option<&IWMStreamConfig>) -> windows_core::Result<()>; - fn ReconfigStream(&self, pconfig: Option<&IWMStreamConfig>) -> windows_core::Result<()>; + fn AddStream(&self, pconfig: windows_core::Ref<'_, IWMStreamConfig>) -> windows_core::Result<()>; + fn ReconfigStream(&self, pconfig: windows_core::Ref<'_, IWMStreamConfig>) -> windows_core::Result<()>; fn CreateNewStream(&self, guidstreamtype: *const windows_core::GUID) -> windows_core::Result; fn GetMutualExclusionCount(&self) -> windows_core::Result; fn GetMutualExclusion(&self, dwmeindex: u32) -> windows_core::Result; - fn RemoveMutualExclusion(&self, pme: Option<&IWMMutualExclusion>) -> windows_core::Result<()>; - fn AddMutualExclusion(&self, pme: Option<&IWMMutualExclusion>) -> windows_core::Result<()>; + fn RemoveMutualExclusion(&self, pme: windows_core::Ref<'_, IWMMutualExclusion>) -> windows_core::Result<()>; + fn AddMutualExclusion(&self, pme: windows_core::Ref<'_, IWMMutualExclusion>) -> windows_core::Result<()>; fn CreateNewMutualExclusion(&self) -> windows_core::Result; } impl IWMProfile_Vtbl { @@ -3484,7 +3484,7 @@ impl IWMProfile_Vtbl { } unsafe extern "system" fn RemoveStream(this: *mut core::ffi::c_void, pconfig: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProfile_Impl::RemoveStream(this, windows_core::from_raw_borrowed(&pconfig)).into() + IWMProfile_Impl::RemoveStream(this, core::mem::transmute_copy(&pconfig)).into() } unsafe extern "system" fn RemoveStreamByNumber(this: *mut core::ffi::c_void, wstreamnum: u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3492,11 +3492,11 @@ impl IWMProfile_Vtbl { } unsafe extern "system" fn AddStream(this: *mut core::ffi::c_void, pconfig: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProfile_Impl::AddStream(this, windows_core::from_raw_borrowed(&pconfig)).into() + IWMProfile_Impl::AddStream(this, core::mem::transmute_copy(&pconfig)).into() } unsafe extern "system" fn ReconfigStream(this: *mut core::ffi::c_void, pconfig: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProfile_Impl::ReconfigStream(this, windows_core::from_raw_borrowed(&pconfig)).into() + IWMProfile_Impl::ReconfigStream(this, core::mem::transmute_copy(&pconfig)).into() } unsafe extern "system" fn CreateNewStream(this: *mut core::ffi::c_void, guidstreamtype: *const windows_core::GUID, ppconfig: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3530,11 +3530,11 @@ impl IWMProfile_Vtbl { } unsafe extern "system" fn RemoveMutualExclusion(this: *mut core::ffi::c_void, pme: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProfile_Impl::RemoveMutualExclusion(this, windows_core::from_raw_borrowed(&pme)).into() + IWMProfile_Impl::RemoveMutualExclusion(this, core::mem::transmute_copy(&pme)).into() } unsafe extern "system" fn AddMutualExclusion(this: *mut core::ffi::c_void, pme: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProfile_Impl::AddMutualExclusion(this, windows_core::from_raw_borrowed(&pme)).into() + IWMProfile_Impl::AddMutualExclusion(this, core::mem::transmute_copy(&pme)).into() } unsafe extern "system" fn CreateNewMutualExclusion(this: *mut core::ffi::c_void, ppme: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3697,11 +3697,11 @@ pub trait IWMProfile3_Impl: IWMProfile2_Impl { fn SetStorageFormat(&self, nstorageformat: WMT_STORAGE_FORMAT) -> windows_core::Result<()>; fn GetBandwidthSharingCount(&self) -> windows_core::Result; fn GetBandwidthSharing(&self, dwbsindex: u32) -> windows_core::Result; - fn RemoveBandwidthSharing(&self, pbs: Option<&IWMBandwidthSharing>) -> windows_core::Result<()>; - fn AddBandwidthSharing(&self, pbs: Option<&IWMBandwidthSharing>) -> windows_core::Result<()>; + fn RemoveBandwidthSharing(&self, pbs: windows_core::Ref<'_, IWMBandwidthSharing>) -> windows_core::Result<()>; + fn AddBandwidthSharing(&self, pbs: windows_core::Ref<'_, IWMBandwidthSharing>) -> windows_core::Result<()>; fn CreateNewBandwidthSharing(&self) -> windows_core::Result; fn GetStreamPrioritization(&self) -> windows_core::Result; - fn SetStreamPrioritization(&self, psp: Option<&IWMStreamPrioritization>) -> windows_core::Result<()>; + fn SetStreamPrioritization(&self, psp: windows_core::Ref<'_, IWMStreamPrioritization>) -> windows_core::Result<()>; fn RemoveStreamPrioritization(&self) -> windows_core::Result<()>; fn CreateNewStreamPrioritization(&self) -> windows_core::Result; fn GetExpectedPacketCount(&self, msduration: u64) -> windows_core::Result; @@ -3744,11 +3744,11 @@ impl IWMProfile3_Vtbl { } unsafe extern "system" fn RemoveBandwidthSharing(this: *mut core::ffi::c_void, pbs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProfile3_Impl::RemoveBandwidthSharing(this, windows_core::from_raw_borrowed(&pbs)).into() + IWMProfile3_Impl::RemoveBandwidthSharing(this, core::mem::transmute_copy(&pbs)).into() } unsafe extern "system" fn AddBandwidthSharing(this: *mut core::ffi::c_void, pbs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProfile3_Impl::AddBandwidthSharing(this, windows_core::from_raw_borrowed(&pbs)).into() + IWMProfile3_Impl::AddBandwidthSharing(this, core::mem::transmute_copy(&pbs)).into() } unsafe extern "system" fn CreateNewBandwidthSharing(this: *mut core::ffi::c_void, ppbs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3772,7 +3772,7 @@ impl IWMProfile3_Vtbl { } unsafe extern "system" fn SetStreamPrioritization(this: *mut core::ffi::c_void, psp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProfile3_Impl::SetStreamPrioritization(this, windows_core::from_raw_borrowed(&psp)).into() + IWMProfile3_Impl::SetStreamPrioritization(this, core::mem::transmute_copy(&psp)).into() } unsafe extern "system" fn RemoveStreamPrioritization(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3867,7 +3867,7 @@ pub trait IWMProfileManager_Impl: windows_core::IUnknownImpl { fn CreateEmptyProfile(&self, dwversion: WMT_VERSION) -> windows_core::Result; fn LoadProfileByID(&self, guidprofile: *const windows_core::GUID) -> windows_core::Result; fn LoadProfileByData(&self, pwszprofile: &windows_core::PCWSTR) -> windows_core::Result; - fn SaveProfile(&self, piwmprofile: Option<&IWMProfile>, pwszprofile: &windows_core::PCWSTR, pdwlength: *mut u32) -> windows_core::Result<()>; + fn SaveProfile(&self, piwmprofile: windows_core::Ref<'_, IWMProfile>, pwszprofile: &windows_core::PCWSTR, pdwlength: *mut u32) -> windows_core::Result<()>; fn GetSystemProfileCount(&self) -> windows_core::Result; fn LoadSystemProfile(&self, dwprofileindex: u32) -> windows_core::Result; } @@ -3905,7 +3905,7 @@ impl IWMProfileManager_Vtbl { } unsafe extern "system" fn SaveProfile(this: *mut core::ffi::c_void, piwmprofile: *mut core::ffi::c_void, pwszprofile: windows_core::PCWSTR, pdwlength: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProfileManager_Impl::SaveProfile(this, windows_core::from_raw_borrowed(&piwmprofile), core::mem::transmute(&pwszprofile), core::mem::transmute_copy(&pdwlength)).into() + IWMProfileManager_Impl::SaveProfile(this, core::mem::transmute_copy(&piwmprofile), core::mem::transmute(&pwszprofile), core::mem::transmute_copy(&pdwlength)).into() } unsafe extern "system" fn GetSystemProfileCount(this: *mut core::ffi::c_void, pcprofiles: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4076,7 +4076,7 @@ pub trait IWMPropertyVault_Impl: windows_core::IUnknownImpl { fn GetPropertyByName(&self, pszname: &windows_core::PCWSTR, ptype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()>; fn SetProperty(&self, pszname: &windows_core::PCWSTR, ptype: WMT_ATTR_DATATYPE, pvalue: *const u8, dwsize: u32) -> windows_core::Result<()>; fn GetPropertyByIndex(&self, dwindex: u32, pszname: windows_core::PWSTR, pdwnamelen: *mut u32, ptype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> windows_core::Result<()>; - fn CopyPropertiesFrom(&self, piwmpropertyvault: Option<&IWMPropertyVault>) -> windows_core::Result<()>; + fn CopyPropertiesFrom(&self, piwmpropertyvault: windows_core::Ref<'_, IWMPropertyVault>) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } impl IWMPropertyVault_Vtbl { @@ -4099,7 +4099,7 @@ impl IWMPropertyVault_Vtbl { } unsafe extern "system" fn CopyPropertiesFrom(this: *mut core::ffi::c_void, piwmpropertyvault: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMPropertyVault_Impl::CopyPropertiesFrom(this, windows_core::from_raw_borrowed(&piwmpropertyvault)).into() + IWMPropertyVault_Impl::CopyPropertiesFrom(this, core::mem::transmute_copy(&piwmpropertyvault)).into() } unsafe extern "system" fn Clear(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4136,13 +4136,13 @@ pub struct IWMProximityDetection_Vtbl { pub StartDetection: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *const u8, u32, u32, *mut *mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMProximityDetection_Impl: windows_core::IUnknownImpl { - fn StartDetection(&self, pbregistrationmsg: *const u8, cbregistrationmsg: u32, pblocaladdress: *const u8, cblocaladdress: u32, dwextraportsallowed: u32, ppregistrationresponsemsg: *mut Option, pcallback: Option<&IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn StartDetection(&self, pbregistrationmsg: *const u8, cbregistrationmsg: u32, pblocaladdress: *const u8, cblocaladdress: u32, dwextraportsallowed: u32, ppregistrationresponsemsg: windows_core::OutRef<'_, INSSBuffer>, pcallback: windows_core::Ref<'_, IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; } impl IWMProximityDetection_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartDetection(this: *mut core::ffi::c_void, pbregistrationmsg: *const u8, cbregistrationmsg: u32, pblocaladdress: *const u8, cblocaladdress: u32, dwextraportsallowed: u32, ppregistrationresponsemsg: *mut *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMProximityDetection_Impl::StartDetection(this, core::mem::transmute_copy(&pbregistrationmsg), core::mem::transmute_copy(&cbregistrationmsg), core::mem::transmute_copy(&pblocaladdress), core::mem::transmute_copy(&cblocaladdress), core::mem::transmute_copy(&dwextraportsallowed), core::mem::transmute_copy(&ppregistrationresponsemsg), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext)).into() + IWMProximityDetection_Impl::StartDetection(this, core::mem::transmute_copy(&pbregistrationmsg), core::mem::transmute_copy(&cbregistrationmsg), core::mem::transmute_copy(&pblocaladdress), core::mem::transmute_copy(&cblocaladdress), core::mem::transmute_copy(&dwextraportsallowed), core::mem::transmute_copy(&ppregistrationresponsemsg), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), StartDetection: StartDetection:: } } @@ -4215,11 +4215,11 @@ pub struct IWMReader_Vtbl { pub Resume: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMReader_Impl: windows_core::IUnknownImpl { - fn Open(&self, pwszurl: &windows_core::PCWSTR, pcallback: Option<&IWMReaderCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn Open(&self, pwszurl: &windows_core::PCWSTR, pcallback: windows_core::Ref<'_, IWMReaderCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; fn GetOutputCount(&self) -> windows_core::Result; fn GetOutputProps(&self, dwoutputnum: u32) -> windows_core::Result; - fn SetOutputProps(&self, dwoutputnum: u32, poutput: Option<&IWMOutputMediaProps>) -> windows_core::Result<()>; + fn SetOutputProps(&self, dwoutputnum: u32, poutput: windows_core::Ref<'_, IWMOutputMediaProps>) -> windows_core::Result<()>; fn GetOutputFormatCount(&self, dwoutputnumber: u32) -> windows_core::Result; fn GetOutputFormat(&self, dwoutputnumber: u32, dwformatnumber: u32) -> windows_core::Result; fn Start(&self, cnsstart: u64, cnsduration: u64, frate: f32, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; @@ -4231,7 +4231,7 @@ impl IWMReader_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, pcallback: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMReader_Impl::Open(this, core::mem::transmute(&pwszurl), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext)).into() + IWMReader_Impl::Open(this, core::mem::transmute(&pwszurl), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4259,7 +4259,7 @@ impl IWMReader_Vtbl { } unsafe extern "system" fn SetOutputProps(this: *mut core::ffi::c_void, dwoutputnum: u32, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMReader_Impl::SetOutputProps(this, core::mem::transmute_copy(&dwoutputnum), windows_core::from_raw_borrowed(&poutput)).into() + IWMReader_Impl::SetOutputProps(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&poutput)).into() } unsafe extern "system" fn GetOutputFormatCount(this: *mut core::ffi::c_void, dwoutputnumber: u32, pcformats: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4752,7 +4752,7 @@ pub trait IWMReaderAdvanced2_Impl: IWMReaderAdvanced_Impl { fn SetLogClientID(&self, flogclientid: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetLogClientID(&self) -> windows_core::Result; fn StopBuffering(&self) -> windows_core::Result<()>; - fn OpenStream(&self, pstream: Option<&super::super::System::Com::IStream>, pcallback: Option<&IWMReaderCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn OpenStream(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, pcallback: windows_core::Ref<'_, IWMReaderCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IWMReaderAdvanced2_Vtbl { @@ -4833,7 +4833,7 @@ impl IWMReaderAdvanced2_Vtbl { } unsafe extern "system" fn OpenStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMReaderAdvanced2_Impl::OpenStream(this, windows_core::from_raw_borrowed(&pstream), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext)).into() + IWMReaderAdvanced2_Impl::OpenStream(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext)).into() } Self { base__: IWMReaderAdvanced_Vtbl::new::(), @@ -5086,14 +5086,14 @@ pub struct IWMReaderAdvanced5_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IWMReaderAdvanced5_Impl: IWMReaderAdvanced4_Impl { - fn SetPlayerHook(&self, dwoutputnum: u32, phook: Option<&IWMPlayerHook>) -> windows_core::Result<()>; + fn SetPlayerHook(&self, dwoutputnum: u32, phook: windows_core::Ref<'_, IWMPlayerHook>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IWMReaderAdvanced5_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPlayerHook(this: *mut core::ffi::c_void, dwoutputnum: u32, phook: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMReaderAdvanced5_Impl::SetPlayerHook(this, core::mem::transmute_copy(&dwoutputnum), windows_core::from_raw_borrowed(&phook)).into() + IWMReaderAdvanced5_Impl::SetPlayerHook(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&phook)).into() } Self { base__: IWMReaderAdvanced4_Vtbl::new::(), SetPlayerHook: SetPlayerHook:: } } @@ -5157,8 +5157,8 @@ pub struct IWMReaderAllocatorEx_Vtbl { pub AllocateForOutputEx: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void, u32, u64, u64, *const core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMReaderAllocatorEx_Impl: windows_core::IUnknownImpl { - fn AllocateForStreamEx(&self, wstreamnum: u16, cbbuffer: u32, ppbuffer: *mut Option, dwflags: u32, cnssampletime: u64, cnssampleduration: u64, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; - fn AllocateForOutputEx(&self, dwoutputnum: u32, cbbuffer: u32, ppbuffer: *mut Option, dwflags: u32, cnssampletime: u64, cnssampleduration: u64, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn AllocateForStreamEx(&self, wstreamnum: u16, cbbuffer: u32, ppbuffer: windows_core::OutRef<'_, INSSBuffer>, dwflags: u32, cnssampletime: u64, cnssampleduration: u64, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn AllocateForOutputEx(&self, dwoutputnum: u32, cbbuffer: u32, ppbuffer: windows_core::OutRef<'_, INSSBuffer>, dwflags: u32, cnssampletime: u64, cnssampleduration: u64, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; } impl IWMReaderAllocatorEx_Vtbl { pub const fn new() -> Self { @@ -5203,13 +5203,13 @@ pub struct IWMReaderCallback_Vtbl { pub OnSample: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u64, u64, u32, *mut core::ffi::c_void, *const core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMReaderCallback_Impl: IWMStatusCallback_Impl { - fn OnSample(&self, dwoutputnum: u32, cnssampletime: u64, cnssampleduration: u64, dwflags: u32, psample: Option<&INSSBuffer>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn OnSample(&self, dwoutputnum: u32, cnssampletime: u64, cnssampleduration: u64, dwflags: u32, psample: windows_core::Ref<'_, INSSBuffer>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; } impl IWMReaderCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSample(this: *mut core::ffi::c_void, dwoutputnum: u32, cnssampletime: u64, cnssampleduration: u64, dwflags: u32, psample: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMReaderCallback_Impl::OnSample(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&cnssampleduration), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psample), core::mem::transmute_copy(&pvcontext)).into() + IWMReaderCallback_Impl::OnSample(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&cnssampleduration), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psample), core::mem::transmute_copy(&pvcontext)).into() } Self { base__: IWMStatusCallback_Vtbl::new::(), OnSample: OnSample:: } } @@ -5254,18 +5254,18 @@ pub struct IWMReaderCallbackAdvanced_Vtbl { pub AllocateForOutput: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void, *const core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMReaderCallbackAdvanced_Impl: windows_core::IUnknownImpl { - fn OnStreamSample(&self, wstreamnum: u16, cnssampletime: u64, cnssampleduration: u64, dwflags: u32, psample: Option<&INSSBuffer>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn OnStreamSample(&self, wstreamnum: u16, cnssampletime: u64, cnssampleduration: u64, dwflags: u32, psample: windows_core::Ref<'_, INSSBuffer>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; fn OnTime(&self, cnscurrenttime: u64, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; fn OnStreamSelection(&self, wstreamcount: u16, pstreamnumbers: *const u16, pselections: *const WMT_STREAM_SELECTION, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; fn OnOutputPropsChanged(&self, dwoutputnum: u32, pmediatype: *const WM_MEDIA_TYPE, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; - fn AllocateForStream(&self, wstreamnum: u16, cbbuffer: u32, ppbuffer: *mut Option, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; - fn AllocateForOutput(&self, dwoutputnum: u32, cbbuffer: u32, ppbuffer: *mut Option, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn AllocateForStream(&self, wstreamnum: u16, cbbuffer: u32, ppbuffer: windows_core::OutRef<'_, INSSBuffer>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn AllocateForOutput(&self, dwoutputnum: u32, cbbuffer: u32, ppbuffer: windows_core::OutRef<'_, INSSBuffer>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; } impl IWMReaderCallbackAdvanced_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnStreamSample(this: *mut core::ffi::c_void, wstreamnum: u16, cnssampletime: u64, cnssampleduration: u64, dwflags: u32, psample: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMReaderCallbackAdvanced_Impl::OnStreamSample(this, core::mem::transmute_copy(&wstreamnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&cnssampleduration), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psample), core::mem::transmute_copy(&pvcontext)).into() + IWMReaderCallbackAdvanced_Impl::OnStreamSample(this, core::mem::transmute_copy(&wstreamnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&cnssampleduration), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psample), core::mem::transmute_copy(&pvcontext)).into() } unsafe extern "system" fn OnTime(this: *mut core::ffi::c_void, cnscurrenttime: u64, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6007,7 +6007,7 @@ pub struct IWMReaderPlaylistBurn_Vtbl { pub EndPlaylistBurn: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IWMReaderPlaylistBurn_Impl: windows_core::IUnknownImpl { - fn InitPlaylistBurn(&self, cfiles: u32, ppwszfilenames: *const windows_core::PCWSTR, pcallback: Option<&IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn InitPlaylistBurn(&self, cfiles: u32, ppwszfilenames: *const windows_core::PCWSTR, pcallback: windows_core::Ref<'_, IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; fn GetInitResults(&self, cfiles: u32) -> windows_core::Result; fn Cancel(&self) -> windows_core::Result<()>; fn EndPlaylistBurn(&self, hrburnresult: windows_core::HRESULT) -> windows_core::Result<()>; @@ -6016,7 +6016,7 @@ impl IWMReaderPlaylistBurn_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitPlaylistBurn(this: *mut core::ffi::c_void, cfiles: u32, ppwszfilenames: *const windows_core::PCWSTR, pcallback: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMReaderPlaylistBurn_Impl::InitPlaylistBurn(this, core::mem::transmute_copy(&cfiles), core::mem::transmute_copy(&ppwszfilenames), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext)).into() + IWMReaderPlaylistBurn_Impl::InitPlaylistBurn(this, core::mem::transmute_copy(&cfiles), core::mem::transmute_copy(&ppwszfilenames), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext)).into() } unsafe extern "system" fn GetInitResults(this: *mut core::ffi::c_void, cfiles: u32, phrstati: *mut windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6171,13 +6171,13 @@ pub struct IWMReaderTypeNegotiation_Vtbl { pub TryOutputProps: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMReaderTypeNegotiation_Impl: windows_core::IUnknownImpl { - fn TryOutputProps(&self, dwoutputnum: u32, poutput: Option<&IWMOutputMediaProps>) -> windows_core::Result<()>; + fn TryOutputProps(&self, dwoutputnum: u32, poutput: windows_core::Ref<'_, IWMOutputMediaProps>) -> windows_core::Result<()>; } impl IWMReaderTypeNegotiation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TryOutputProps(this: *mut core::ffi::c_void, dwoutputnum: u32, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMReaderTypeNegotiation_Impl::TryOutputProps(this, core::mem::transmute_copy(&dwoutputnum), windows_core::from_raw_borrowed(&poutput)).into() + IWMReaderTypeNegotiation_Impl::TryOutputProps(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&poutput)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), TryOutputProps: TryOutputProps:: } } @@ -6209,18 +6209,18 @@ pub struct IWMRegisterCallback_Vtbl { pub Unadvise: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMRegisterCallback_Impl: windows_core::IUnknownImpl { - fn Advise(&self, pcallback: Option<&IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; - fn Unadvise(&self, pcallback: Option<&IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn Advise(&self, pcallback: windows_core::Ref<'_, IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn Unadvise(&self, pcallback: windows_core::Ref<'_, IWMStatusCallback>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; } impl IWMRegisterCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMRegisterCallback_Impl::Advise(this, windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext)).into() + IWMRegisterCallback_Impl::Advise(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext)).into() } unsafe extern "system" fn Unadvise(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMRegisterCallback_Impl::Unadvise(this, windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext)).into() + IWMRegisterCallback_Impl::Unadvise(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Advise: Advise::, Unadvise: Unadvise:: } } @@ -6569,7 +6569,7 @@ pub struct IWMSInternalAdminNetSource_Vtbl { pub IsUsingIE: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IWMSInternalAdminNetSource_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psharednamespace: Option<&windows_core::IUnknown>, pnamespacenode: Option<&windows_core::IUnknown>, pnetsourcecreator: Option<&INSNetSourceCreator>, fembeddedinserver: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Initialize(&self, psharednamespace: windows_core::Ref<'_, windows_core::IUnknown>, pnamespacenode: windows_core::Ref<'_, windows_core::IUnknown>, pnetsourcecreator: windows_core::Ref<'_, INSNetSourceCreator>, fembeddedinserver: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetNetSourceCreator(&self) -> windows_core::Result; fn SetCredentials(&self, bstrrealm: &windows_core::BSTR, bstrname: &windows_core::BSTR, bstrpassword: &windows_core::BSTR, fpersist: super::super::Foundation::BOOL, fconfirmedgood: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetCredentials(&self, bstrrealm: &windows_core::BSTR, pbstrname: *mut windows_core::BSTR, pbstrpassword: *mut windows_core::BSTR, pfconfirmedgood: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -6585,7 +6585,7 @@ impl IWMSInternalAdminNetSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psharednamespace: *mut core::ffi::c_void, pnamespacenode: *mut core::ffi::c_void, pnetsourcecreator: *mut core::ffi::c_void, fembeddedinserver: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMSInternalAdminNetSource_Impl::Initialize(this, windows_core::from_raw_borrowed(&psharednamespace), windows_core::from_raw_borrowed(&pnamespacenode), windows_core::from_raw_borrowed(&pnetsourcecreator), core::mem::transmute_copy(&fembeddedinserver)).into() + IWMSInternalAdminNetSource_Impl::Initialize(this, core::mem::transmute_copy(&psharednamespace), core::mem::transmute_copy(&pnamespacenode), core::mem::transmute_copy(&pnetsourcecreator), core::mem::transmute_copy(&fembeddedinserver)).into() } unsafe extern "system" fn GetNetSourceCreator(this: *mut core::ffi::c_void, ppnetsourcecreator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6903,9 +6903,9 @@ pub struct IWMSecureChannel_Vtbl { pub WMSC_SetSharedData: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8) -> windows_core::HRESULT, } pub trait IWMSecureChannel_Impl: IWMAuthorizer_Impl { - fn WMSC_AddCertificate(&self, pcert: Option<&IWMAuthorizer>) -> windows_core::Result<()>; + fn WMSC_AddCertificate(&self, pcert: windows_core::Ref<'_, IWMAuthorizer>) -> windows_core::Result<()>; fn WMSC_AddSignature(&self, pbcertsig: *const u8, cbcertsig: u32) -> windows_core::Result<()>; - fn WMSC_Connect(&self, potherside: Option<&IWMSecureChannel>) -> windows_core::Result<()>; + fn WMSC_Connect(&self, potherside: windows_core::Ref<'_, IWMSecureChannel>) -> windows_core::Result<()>; fn WMSC_IsConnected(&self) -> windows_core::Result; fn WMSC_Disconnect(&self) -> windows_core::Result<()>; fn WMSC_GetValidCertificate(&self, ppbcertificate: *mut *mut u8, pdwsignature: *mut u32) -> windows_core::Result<()>; @@ -6919,7 +6919,7 @@ impl IWMSecureChannel_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn WMSC_AddCertificate(this: *mut core::ffi::c_void, pcert: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMSecureChannel_Impl::WMSC_AddCertificate(this, windows_core::from_raw_borrowed(&pcert)).into() + IWMSecureChannel_Impl::WMSC_AddCertificate(this, core::mem::transmute_copy(&pcert)).into() } unsafe extern "system" fn WMSC_AddSignature(this: *mut core::ffi::c_void, pbcertsig: *const u8, cbcertsig: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6927,7 +6927,7 @@ impl IWMSecureChannel_Vtbl { } unsafe extern "system" fn WMSC_Connect(this: *mut core::ffi::c_void, potherside: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMSecureChannel_Impl::WMSC_Connect(this, windows_core::from_raw_borrowed(&potherside)).into() + IWMSecureChannel_Impl::WMSC_Connect(this, core::mem::transmute_copy(&potherside)).into() } unsafe extern "system" fn WMSC_IsConnected(this: *mut core::ffi::c_void, pfisconnected: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7550,7 +7550,7 @@ pub trait IWMSyncReader_Impl: windows_core::IUnknownImpl { fn Close(&self) -> windows_core::Result<()>; fn SetRange(&self, cnsstarttime: u64, cnsduration: i64) -> windows_core::Result<()>; fn SetRangeByFrame(&self, wstreamnum: u16, qwframenumber: u64, cframestoread: i64) -> windows_core::Result<()>; - fn GetNextSample(&self, wstreamnum: u16, ppsample: *mut Option, pcnssampletime: *mut u64, pcnsduration: *mut u64, pdwflags: *mut u32, pdwoutputnum: *mut u32, pwstreamnum: *mut u16) -> windows_core::Result<()>; + fn GetNextSample(&self, wstreamnum: u16, ppsample: windows_core::OutRef<'_, INSSBuffer>, pcnssampletime: *mut u64, pcnsduration: *mut u64, pdwflags: *mut u32, pdwoutputnum: *mut u32, pwstreamnum: *mut u16) -> windows_core::Result<()>; fn SetStreamsSelected(&self, cstreamcount: u16, pwstreamnumbers: *const u16, pselections: *const WMT_STREAM_SELECTION) -> windows_core::Result<()>; fn GetStreamSelected(&self, wstreamnum: u16) -> windows_core::Result; fn SetReadStreamSamples(&self, wstreamnum: u16, fcompressed: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -7559,14 +7559,14 @@ pub trait IWMSyncReader_Impl: windows_core::IUnknownImpl { fn SetOutputSetting(&self, dwoutputnum: u32, pszname: &windows_core::PCWSTR, r#type: WMT_ATTR_DATATYPE, pvalue: *const u8, cblength: u16) -> windows_core::Result<()>; fn GetOutputCount(&self) -> windows_core::Result; fn GetOutputProps(&self, dwoutputnum: u32) -> windows_core::Result; - fn SetOutputProps(&self, dwoutputnum: u32, poutput: Option<&IWMOutputMediaProps>) -> windows_core::Result<()>; + fn SetOutputProps(&self, dwoutputnum: u32, poutput: windows_core::Ref<'_, IWMOutputMediaProps>) -> windows_core::Result<()>; fn GetOutputFormatCount(&self, dwoutputnum: u32) -> windows_core::Result; fn GetOutputFormat(&self, dwoutputnum: u32, dwformatnum: u32) -> windows_core::Result; fn GetOutputNumberForStream(&self, wstreamnum: u16) -> windows_core::Result; fn GetStreamNumberForOutput(&self, dwoutputnum: u32) -> windows_core::Result; fn GetMaxOutputSampleSize(&self, dwoutput: u32) -> windows_core::Result; fn GetMaxStreamSampleSize(&self, wstream: u16) -> windows_core::Result; - fn OpenStream(&self, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn OpenStream(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IWMSyncReader_Vtbl { @@ -7649,7 +7649,7 @@ impl IWMSyncReader_Vtbl { } unsafe extern "system" fn SetOutputProps(this: *mut core::ffi::c_void, dwoutputnum: u32, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMSyncReader_Impl::SetOutputProps(this, core::mem::transmute_copy(&dwoutputnum), windows_core::from_raw_borrowed(&poutput)).into() + IWMSyncReader_Impl::SetOutputProps(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&poutput)).into() } unsafe extern "system" fn GetOutputFormatCount(this: *mut core::ffi::c_void, dwoutputnum: u32, pcformats: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7713,7 +7713,7 @@ impl IWMSyncReader_Vtbl { } unsafe extern "system" fn OpenStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMSyncReader_Impl::OpenStream(this, windows_core::from_raw_borrowed(&pstream)).into() + IWMSyncReader_Impl::OpenStream(this, core::mem::transmute_copy(&pstream)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7797,9 +7797,9 @@ pub struct IWMSyncReader2_Vtbl { pub trait IWMSyncReader2_Impl: IWMSyncReader_Impl { fn SetRangeByTimecode(&self, wstreamnum: u16, pstart: *const WMT_TIMECODE_EXTENSION_DATA, pend: *const WMT_TIMECODE_EXTENSION_DATA) -> windows_core::Result<()>; fn SetRangeByFrameEx(&self, wstreamnum: u16, qwframenumber: u64, cframestoread: i64) -> windows_core::Result; - fn SetAllocateForOutput(&self, dwoutputnum: u32, pallocator: Option<&IWMReaderAllocatorEx>) -> windows_core::Result<()>; + fn SetAllocateForOutput(&self, dwoutputnum: u32, pallocator: windows_core::Ref<'_, IWMReaderAllocatorEx>) -> windows_core::Result<()>; fn GetAllocateForOutput(&self, dwoutputnum: u32) -> windows_core::Result; - fn SetAllocateForStream(&self, wstreamnum: u16, pallocator: Option<&IWMReaderAllocatorEx>) -> windows_core::Result<()>; + fn SetAllocateForStream(&self, wstreamnum: u16, pallocator: windows_core::Ref<'_, IWMReaderAllocatorEx>) -> windows_core::Result<()>; fn GetAllocateForStream(&self, dwsreamnum: u16) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -7821,7 +7821,7 @@ impl IWMSyncReader2_Vtbl { } unsafe extern "system" fn SetAllocateForOutput(this: *mut core::ffi::c_void, dwoutputnum: u32, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMSyncReader2_Impl::SetAllocateForOutput(this, core::mem::transmute_copy(&dwoutputnum), windows_core::from_raw_borrowed(&pallocator)).into() + IWMSyncReader2_Impl::SetAllocateForOutput(this, core::mem::transmute_copy(&dwoutputnum), core::mem::transmute_copy(&pallocator)).into() } unsafe extern "system" fn GetAllocateForOutput(this: *mut core::ffi::c_void, dwoutputnum: u32, ppallocator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7835,7 +7835,7 @@ impl IWMSyncReader2_Vtbl { } unsafe extern "system" fn SetAllocateForStream(this: *mut core::ffi::c_void, wstreamnum: u16, pallocator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMSyncReader2_Impl::SetAllocateForStream(this, core::mem::transmute_copy(&wstreamnum), windows_core::from_raw_borrowed(&pallocator)).into() + IWMSyncReader2_Impl::SetAllocateForStream(this, core::mem::transmute_copy(&wstreamnum), core::mem::transmute_copy(&pallocator)).into() } unsafe extern "system" fn GetAllocateForStream(this: *mut core::ffi::c_void, dwsreamnum: u16, ppallocator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8071,17 +8071,17 @@ pub struct IWMWriter_Vtbl { } pub trait IWMWriter_Impl: windows_core::IUnknownImpl { fn SetProfileByID(&self, guidprofile: *const windows_core::GUID) -> windows_core::Result<()>; - fn SetProfile(&self, pprofile: Option<&IWMProfile>) -> windows_core::Result<()>; + fn SetProfile(&self, pprofile: windows_core::Ref<'_, IWMProfile>) -> windows_core::Result<()>; fn SetOutputFilename(&self, pwszfilename: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetInputCount(&self) -> windows_core::Result; fn GetInputProps(&self, dwinputnum: u32) -> windows_core::Result; - fn SetInputProps(&self, dwinputnum: u32, pinput: Option<&IWMInputMediaProps>) -> windows_core::Result<()>; + fn SetInputProps(&self, dwinputnum: u32, pinput: windows_core::Ref<'_, IWMInputMediaProps>) -> windows_core::Result<()>; fn GetInputFormatCount(&self, dwinputnumber: u32) -> windows_core::Result; fn GetInputFormat(&self, dwinputnumber: u32, dwformatnumber: u32) -> windows_core::Result; fn BeginWriting(&self) -> windows_core::Result<()>; fn EndWriting(&self) -> windows_core::Result<()>; fn AllocateSample(&self, dwsamplesize: u32) -> windows_core::Result; - fn WriteSample(&self, dwinputnum: u32, cnssampletime: u64, dwflags: u32, psample: Option<&INSSBuffer>) -> windows_core::Result<()>; + fn WriteSample(&self, dwinputnum: u32, cnssampletime: u64, dwflags: u32, psample: windows_core::Ref<'_, INSSBuffer>) -> windows_core::Result<()>; fn Flush(&self) -> windows_core::Result<()>; } impl IWMWriter_Vtbl { @@ -8092,7 +8092,7 @@ impl IWMWriter_Vtbl { } unsafe extern "system" fn SetProfile(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriter_Impl::SetProfile(this, windows_core::from_raw_borrowed(&pprofile)).into() + IWMWriter_Impl::SetProfile(this, core::mem::transmute_copy(&pprofile)).into() } unsafe extern "system" fn SetOutputFilename(this: *mut core::ffi::c_void, pwszfilename: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8120,7 +8120,7 @@ impl IWMWriter_Vtbl { } unsafe extern "system" fn SetInputProps(this: *mut core::ffi::c_void, dwinputnum: u32, pinput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriter_Impl::SetInputProps(this, core::mem::transmute_copy(&dwinputnum), windows_core::from_raw_borrowed(&pinput)).into() + IWMWriter_Impl::SetInputProps(this, core::mem::transmute_copy(&dwinputnum), core::mem::transmute_copy(&pinput)).into() } unsafe extern "system" fn GetInputFormatCount(this: *mut core::ffi::c_void, dwinputnumber: u32, pcformats: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8162,7 +8162,7 @@ impl IWMWriter_Vtbl { } unsafe extern "system" fn WriteSample(this: *mut core::ffi::c_void, dwinputnum: u32, cnssampletime: u64, dwflags: u32, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriter_Impl::WriteSample(this, core::mem::transmute_copy(&dwinputnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psample)).into() + IWMWriter_Impl::WriteSample(this, core::mem::transmute_copy(&dwinputnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn Flush(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8259,9 +8259,9 @@ pub struct IWMWriterAdvanced_Vtbl { pub trait IWMWriterAdvanced_Impl: windows_core::IUnknownImpl { fn GetSinkCount(&self) -> windows_core::Result; fn GetSink(&self, dwsinknum: u32) -> windows_core::Result; - fn AddSink(&self, psink: Option<&IWMWriterSink>) -> windows_core::Result<()>; - fn RemoveSink(&self, psink: Option<&IWMWriterSink>) -> windows_core::Result<()>; - fn WriteStreamSample(&self, wstreamnum: u16, cnssampletime: u64, mssamplesendtime: u32, cnssampleduration: u64, dwflags: u32, psample: Option<&INSSBuffer>) -> windows_core::Result<()>; + fn AddSink(&self, psink: windows_core::Ref<'_, IWMWriterSink>) -> windows_core::Result<()>; + fn RemoveSink(&self, psink: windows_core::Ref<'_, IWMWriterSink>) -> windows_core::Result<()>; + fn WriteStreamSample(&self, wstreamnum: u16, cnssampletime: u64, mssamplesendtime: u32, cnssampleduration: u64, dwflags: u32, psample: windows_core::Ref<'_, INSSBuffer>) -> windows_core::Result<()>; fn SetLiveSource(&self, fislivesource: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn IsRealTime(&self) -> windows_core::Result; fn GetWriterTime(&self) -> windows_core::Result; @@ -8293,15 +8293,15 @@ impl IWMWriterAdvanced_Vtbl { } unsafe extern "system" fn AddSink(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriterAdvanced_Impl::AddSink(this, windows_core::from_raw_borrowed(&psink)).into() + IWMWriterAdvanced_Impl::AddSink(this, core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn RemoveSink(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriterAdvanced_Impl::RemoveSink(this, windows_core::from_raw_borrowed(&psink)).into() + IWMWriterAdvanced_Impl::RemoveSink(this, core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn WriteStreamSample(this: *mut core::ffi::c_void, wstreamnum: u16, cnssampletime: u64, mssamplesendtime: u32, cnssampleduration: u64, dwflags: u32, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriterAdvanced_Impl::WriteStreamSample(this, core::mem::transmute_copy(&wstreamnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&mssamplesendtime), core::mem::transmute_copy(&cnssampleduration), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psample)).into() + IWMWriterAdvanced_Impl::WriteStreamSample(this, core::mem::transmute_copy(&wstreamnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&mssamplesendtime), core::mem::transmute_copy(&cnssampleduration), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn SetLiveSource(this: *mut core::ffi::c_void, fislivesource: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8932,11 +8932,11 @@ pub struct IWMWriterPostView_Vtbl { pub GetAllocateForPostView: unsafe extern "system" fn(*mut core::ffi::c_void, u16, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IWMWriterPostView_Impl: windows_core::IUnknownImpl { - fn SetPostViewCallback(&self, pcallback: Option<&IWMWriterPostViewCallback>, pvcontext: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn SetPostViewCallback(&self, pcallback: windows_core::Ref<'_, IWMWriterPostViewCallback>, pvcontext: *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetReceivePostViewSamples(&self, wstreamnum: u16, freceivepostviewsamples: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetReceivePostViewSamples(&self, wstreamnum: u16) -> windows_core::Result; fn GetPostViewProps(&self, wstreamnumber: u16) -> windows_core::Result; - fn SetPostViewProps(&self, wstreamnumber: u16, poutput: Option<&IWMMediaProps>) -> windows_core::Result<()>; + fn SetPostViewProps(&self, wstreamnumber: u16, poutput: windows_core::Ref<'_, IWMMediaProps>) -> windows_core::Result<()>; fn GetPostViewFormatCount(&self, wstreamnumber: u16) -> windows_core::Result; fn GetPostViewFormat(&self, wstreamnumber: u16, dwformatnumber: u32) -> windows_core::Result; fn SetAllocateForPostView(&self, wstreamnumber: u16, fallocate: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -8946,7 +8946,7 @@ impl IWMWriterPostView_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPostViewCallback(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pvcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriterPostView_Impl::SetPostViewCallback(this, windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&pvcontext)).into() + IWMWriterPostView_Impl::SetPostViewCallback(this, core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&pvcontext)).into() } unsafe extern "system" fn SetReceivePostViewSamples(this: *mut core::ffi::c_void, wstreamnum: u16, freceivepostviewsamples: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8974,7 +8974,7 @@ impl IWMWriterPostView_Vtbl { } unsafe extern "system" fn SetPostViewProps(this: *mut core::ffi::c_void, wstreamnumber: u16, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriterPostView_Impl::SetPostViewProps(this, core::mem::transmute_copy(&wstreamnumber), windows_core::from_raw_borrowed(&poutput)).into() + IWMWriterPostView_Impl::SetPostViewProps(this, core::mem::transmute_copy(&wstreamnumber), core::mem::transmute_copy(&poutput)).into() } unsafe extern "system" fn GetPostViewFormatCount(this: *mut core::ffi::c_void, wstreamnumber: u16, pcformats: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9054,14 +9054,14 @@ pub struct IWMWriterPostViewCallback_Vtbl { pub AllocateForPostView: unsafe extern "system" fn(*mut core::ffi::c_void, u16, u32, *mut *mut core::ffi::c_void, *const core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMWriterPostViewCallback_Impl: IWMStatusCallback_Impl { - fn OnPostViewSample(&self, wstreamnumber: u16, cnssampletime: u64, cnssampleduration: u64, dwflags: u32, psample: Option<&INSSBuffer>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; - fn AllocateForPostView(&self, wstreamnum: u16, cbbuffer: u32, ppbuffer: *mut Option, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn OnPostViewSample(&self, wstreamnumber: u16, cnssampletime: u64, cnssampleduration: u64, dwflags: u32, psample: windows_core::Ref<'_, INSSBuffer>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; + fn AllocateForPostView(&self, wstreamnum: u16, cbbuffer: u32, ppbuffer: windows_core::OutRef<'_, INSSBuffer>, pvcontext: *const core::ffi::c_void) -> windows_core::Result<()>; } impl IWMWriterPostViewCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnPostViewSample(this: *mut core::ffi::c_void, wstreamnumber: u16, cnssampletime: u64, cnssampleduration: u64, dwflags: u32, psample: *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriterPostViewCallback_Impl::OnPostViewSample(this, core::mem::transmute_copy(&wstreamnumber), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&cnssampleduration), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psample), core::mem::transmute_copy(&pvcontext)).into() + IWMWriterPostViewCallback_Impl::OnPostViewSample(this, core::mem::transmute_copy(&wstreamnumber), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&cnssampleduration), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psample), core::mem::transmute_copy(&pvcontext)).into() } unsafe extern "system" fn AllocateForPostView(this: *mut core::ffi::c_void, wstreamnum: u16, cbbuffer: u32, ppbuffer: *mut *mut core::ffi::c_void, pvcontext: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9114,7 +9114,7 @@ pub trait IWMWriterPreprocess_Impl: windows_core::IUnknownImpl { fn GetMaxPreprocessingPasses(&self, dwinputnum: u32, dwflags: u32) -> windows_core::Result; fn SetNumPreprocessingPasses(&self, dwinputnum: u32, dwflags: u32, dwnumpasses: u32) -> windows_core::Result<()>; fn BeginPreprocessingPass(&self, dwinputnum: u32, dwflags: u32) -> windows_core::Result<()>; - fn PreprocessSample(&self, dwinputnum: u32, cnssampletime: u64, dwflags: u32, psample: Option<&INSSBuffer>) -> windows_core::Result<()>; + fn PreprocessSample(&self, dwinputnum: u32, cnssampletime: u64, dwflags: u32, psample: windows_core::Ref<'_, INSSBuffer>) -> windows_core::Result<()>; fn EndPreprocessingPass(&self, dwinputnum: u32, dwflags: u32) -> windows_core::Result<()>; } impl IWMWriterPreprocess_Vtbl { @@ -9139,7 +9139,7 @@ impl IWMWriterPreprocess_Vtbl { } unsafe extern "system" fn PreprocessSample(this: *mut core::ffi::c_void, dwinputnum: u32, cnssampletime: u64, dwflags: u32, psample: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriterPreprocess_Impl::PreprocessSample(this, core::mem::transmute_copy(&dwinputnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psample)).into() + IWMWriterPreprocess_Impl::PreprocessSample(this, core::mem::transmute_copy(&dwinputnum), core::mem::transmute_copy(&cnssampletime), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psample)).into() } unsafe extern "system" fn EndPreprocessingPass(this: *mut core::ffi::c_void, dwinputnum: u32, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9257,17 +9257,17 @@ pub struct IWMWriterSink_Vtbl { pub OnEndWriting: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWMWriterSink_Impl: windows_core::IUnknownImpl { - fn OnHeader(&self, pheader: Option<&INSSBuffer>) -> windows_core::Result<()>; + fn OnHeader(&self, pheader: windows_core::Ref<'_, INSSBuffer>) -> windows_core::Result<()>; fn IsRealTime(&self) -> windows_core::Result; fn AllocateDataUnit(&self, cbdataunit: u32) -> windows_core::Result; - fn OnDataUnit(&self, pdataunit: Option<&INSSBuffer>) -> windows_core::Result<()>; + fn OnDataUnit(&self, pdataunit: windows_core::Ref<'_, INSSBuffer>) -> windows_core::Result<()>; fn OnEndWriting(&self) -> windows_core::Result<()>; } impl IWMWriterSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnHeader(this: *mut core::ffi::c_void, pheader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriterSink_Impl::OnHeader(this, windows_core::from_raw_borrowed(&pheader)).into() + IWMWriterSink_Impl::OnHeader(this, core::mem::transmute_copy(&pheader)).into() } unsafe extern "system" fn IsRealTime(this: *mut core::ffi::c_void, pfrealtime: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9291,7 +9291,7 @@ impl IWMWriterSink_Vtbl { } unsafe extern "system" fn OnDataUnit(this: *mut core::ffi::c_void, pdataunit: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWMWriterSink_Impl::OnDataUnit(this, windows_core::from_raw_borrowed(&pdataunit)).into() + IWMWriterSink_Impl::OnDataUnit(this, core::mem::transmute_copy(&pdataunit)).into() } unsafe extern "system" fn OnEndWriting(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs index 9c93872f00..23685d5b86 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/MobileBroadband/mod.rs @@ -251,18 +251,18 @@ pub struct IMbnConnectionContextEvents_Vtbl { pub OnSetProvisionedContextComplete: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IMbnConnectionContextEvents_Impl: windows_core::IUnknownImpl { - fn OnProvisionedContextListChange(&self, newinterface: Option<&IMbnConnectionContext>) -> windows_core::Result<()>; - fn OnSetProvisionedContextComplete(&self, newinterface: Option<&IMbnConnectionContext>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnProvisionedContextListChange(&self, newinterface: windows_core::Ref<'_, IMbnConnectionContext>) -> windows_core::Result<()>; + fn OnSetProvisionedContextComplete(&self, newinterface: windows_core::Ref<'_, IMbnConnectionContext>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; } impl IMbnConnectionContextEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnProvisionedContextListChange(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionContextEvents_Impl::OnProvisionedContextListChange(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnConnectionContextEvents_Impl::OnProvisionedContextListChange(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnSetProvisionedContextComplete(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionContextEvents_Impl::OnSetProvisionedContextComplete(this, windows_core::from_raw_borrowed(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnConnectionContextEvents_Impl::OnSetProvisionedContextComplete(this, core::mem::transmute_copy(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -312,28 +312,28 @@ pub struct IMbnConnectionEvents_Vtbl { pub OnVoiceCallStateChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMbnConnectionEvents_Impl: windows_core::IUnknownImpl { - fn OnConnectComplete(&self, newconnection: Option<&IMbnConnection>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnDisconnectComplete(&self, newconnection: Option<&IMbnConnection>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnConnectStateChange(&self, newconnection: Option<&IMbnConnection>) -> windows_core::Result<()>; - fn OnVoiceCallStateChange(&self, newconnection: Option<&IMbnConnection>) -> windows_core::Result<()>; + fn OnConnectComplete(&self, newconnection: windows_core::Ref<'_, IMbnConnection>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnDisconnectComplete(&self, newconnection: windows_core::Ref<'_, IMbnConnection>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnConnectStateChange(&self, newconnection: windows_core::Ref<'_, IMbnConnection>) -> windows_core::Result<()>; + fn OnVoiceCallStateChange(&self, newconnection: windows_core::Ref<'_, IMbnConnection>) -> windows_core::Result<()>; } impl IMbnConnectionEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnConnectComplete(this: *mut core::ffi::c_void, newconnection: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionEvents_Impl::OnConnectComplete(this, windows_core::from_raw_borrowed(&newconnection), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnConnectionEvents_Impl::OnConnectComplete(this, core::mem::transmute_copy(&newconnection), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnDisconnectComplete(this: *mut core::ffi::c_void, newconnection: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionEvents_Impl::OnDisconnectComplete(this, windows_core::from_raw_borrowed(&newconnection), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnConnectionEvents_Impl::OnDisconnectComplete(this, core::mem::transmute_copy(&newconnection), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnConnectStateChange(this: *mut core::ffi::c_void, newconnection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionEvents_Impl::OnConnectStateChange(this, windows_core::from_raw_borrowed(&newconnection)).into() + IMbnConnectionEvents_Impl::OnConnectStateChange(this, core::mem::transmute_copy(&newconnection)).into() } unsafe extern "system" fn OnVoiceCallStateChange(this: *mut core::ffi::c_void, newconnection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionEvents_Impl::OnVoiceCallStateChange(this, windows_core::from_raw_borrowed(&newconnection)).into() + IMbnConnectionEvents_Impl::OnVoiceCallStateChange(this, core::mem::transmute_copy(&newconnection)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -436,18 +436,18 @@ pub struct IMbnConnectionManagerEvents_Vtbl { pub OnConnectionRemoval: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMbnConnectionManagerEvents_Impl: windows_core::IUnknownImpl { - fn OnConnectionArrival(&self, newconnection: Option<&IMbnConnection>) -> windows_core::Result<()>; - fn OnConnectionRemoval(&self, oldconnection: Option<&IMbnConnection>) -> windows_core::Result<()>; + fn OnConnectionArrival(&self, newconnection: windows_core::Ref<'_, IMbnConnection>) -> windows_core::Result<()>; + fn OnConnectionRemoval(&self, oldconnection: windows_core::Ref<'_, IMbnConnection>) -> windows_core::Result<()>; } impl IMbnConnectionManagerEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnConnectionArrival(this: *mut core::ffi::c_void, newconnection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionManagerEvents_Impl::OnConnectionArrival(this, windows_core::from_raw_borrowed(&newconnection)).into() + IMbnConnectionManagerEvents_Impl::OnConnectionArrival(this, core::mem::transmute_copy(&newconnection)).into() } unsafe extern "system" fn OnConnectionRemoval(this: *mut core::ffi::c_void, oldconnection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionManagerEvents_Impl::OnConnectionRemoval(this, windows_core::from_raw_borrowed(&oldconnection)).into() + IMbnConnectionManagerEvents_Impl::OnConnectionRemoval(this, core::mem::transmute_copy(&oldconnection)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -537,13 +537,13 @@ pub struct IMbnConnectionProfileEvents_Vtbl { pub OnProfileUpdate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMbnConnectionProfileEvents_Impl: windows_core::IUnknownImpl { - fn OnProfileUpdate(&self, newprofile: Option<&IMbnConnectionProfile>) -> windows_core::Result<()>; + fn OnProfileUpdate(&self, newprofile: windows_core::Ref<'_, IMbnConnectionProfile>) -> windows_core::Result<()>; } impl IMbnConnectionProfileEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnProfileUpdate(this: *mut core::ffi::c_void, newprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionProfileEvents_Impl::OnProfileUpdate(this, windows_core::from_raw_borrowed(&newprofile)).into() + IMbnConnectionProfileEvents_Impl::OnProfileUpdate(this, core::mem::transmute_copy(&newprofile)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnProfileUpdate: OnProfileUpdate:: } } @@ -590,8 +590,8 @@ pub struct IMbnConnectionProfileManager_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IMbnConnectionProfileManager_Impl: windows_core::IUnknownImpl { - fn GetConnectionProfiles(&self, mbninterface: Option<&IMbnInterface>) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; - fn GetConnectionProfile(&self, mbninterface: Option<&IMbnInterface>, profilename: &windows_core::PCWSTR) -> windows_core::Result; + fn GetConnectionProfiles(&self, mbninterface: windows_core::Ref<'_, IMbnInterface>) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; + fn GetConnectionProfile(&self, mbninterface: windows_core::Ref<'_, IMbnInterface>, profilename: &windows_core::PCWSTR) -> windows_core::Result; fn CreateConnectionProfile(&self, xmlprofile: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -599,7 +599,7 @@ impl IMbnConnectionProfileManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetConnectionProfiles(this: *mut core::ffi::c_void, mbninterface: *mut core::ffi::c_void, connectionprofiles: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMbnConnectionProfileManager_Impl::GetConnectionProfiles(this, windows_core::from_raw_borrowed(&mbninterface)) { + match IMbnConnectionProfileManager_Impl::GetConnectionProfiles(this, core::mem::transmute_copy(&mbninterface)) { Ok(ok__) => { connectionprofiles.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -609,7 +609,7 @@ impl IMbnConnectionProfileManager_Vtbl { } unsafe extern "system" fn GetConnectionProfile(this: *mut core::ffi::c_void, mbninterface: *mut core::ffi::c_void, profilename: windows_core::PCWSTR, connectionprofile: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMbnConnectionProfileManager_Impl::GetConnectionProfile(this, windows_core::from_raw_borrowed(&mbninterface), core::mem::transmute(&profilename)) { + match IMbnConnectionProfileManager_Impl::GetConnectionProfile(this, core::mem::transmute_copy(&mbninterface), core::mem::transmute(&profilename)) { Ok(ok__) => { connectionprofile.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -657,18 +657,18 @@ pub struct IMbnConnectionProfileManagerEvents_Vtbl { pub OnConnectionProfileRemoval: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMbnConnectionProfileManagerEvents_Impl: windows_core::IUnknownImpl { - fn OnConnectionProfileArrival(&self, newconnectionprofile: Option<&IMbnConnectionProfile>) -> windows_core::Result<()>; - fn OnConnectionProfileRemoval(&self, oldconnectionprofile: Option<&IMbnConnectionProfile>) -> windows_core::Result<()>; + fn OnConnectionProfileArrival(&self, newconnectionprofile: windows_core::Ref<'_, IMbnConnectionProfile>) -> windows_core::Result<()>; + fn OnConnectionProfileRemoval(&self, oldconnectionprofile: windows_core::Ref<'_, IMbnConnectionProfile>) -> windows_core::Result<()>; } impl IMbnConnectionProfileManagerEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnConnectionProfileArrival(this: *mut core::ffi::c_void, newconnectionprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionProfileManagerEvents_Impl::OnConnectionProfileArrival(this, windows_core::from_raw_borrowed(&newconnectionprofile)).into() + IMbnConnectionProfileManagerEvents_Impl::OnConnectionProfileArrival(this, core::mem::transmute_copy(&newconnectionprofile)).into() } unsafe extern "system" fn OnConnectionProfileRemoval(this: *mut core::ffi::c_void, oldconnectionprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnConnectionProfileManagerEvents_Impl::OnConnectionProfileRemoval(this, windows_core::from_raw_borrowed(&oldconnectionprofile)).into() + IMbnConnectionProfileManagerEvents_Impl::OnConnectionProfileRemoval(this, core::mem::transmute_copy(&oldconnectionprofile)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1149,16 +1149,16 @@ pub struct IMbnDeviceServicesEvents_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IMbnDeviceServicesEvents_Impl: windows_core::IUnknownImpl { - fn OnQuerySupportedCommandsComplete(&self, deviceservice: Option<&IMbnDeviceService>, commandidlist: *const super::super::System::Com::SAFEARRAY, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; - fn OnOpenCommandSessionComplete(&self, deviceservice: Option<&IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; - fn OnCloseCommandSessionComplete(&self, deviceservice: Option<&IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; - fn OnSetCommandComplete(&self, deviceservice: Option<&IMbnDeviceService>, responseid: u32, deviceservicedata: *const super::super::System::Com::SAFEARRAY, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; - fn OnQueryCommandComplete(&self, deviceservice: Option<&IMbnDeviceService>, responseid: u32, deviceservicedata: *const super::super::System::Com::SAFEARRAY, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; - fn OnEventNotification(&self, deviceservice: Option<&IMbnDeviceService>, eventid: u32, deviceservicedata: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; - fn OnOpenDataSessionComplete(&self, deviceservice: Option<&IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; - fn OnCloseDataSessionComplete(&self, deviceservice: Option<&IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; - fn OnWriteDataComplete(&self, deviceservice: Option<&IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; - fn OnReadData(&self, deviceservice: Option<&IMbnDeviceService>, deviceservicedata: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn OnQuerySupportedCommandsComplete(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, commandidlist: *const super::super::System::Com::SAFEARRAY, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; + fn OnOpenCommandSessionComplete(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; + fn OnCloseCommandSessionComplete(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; + fn OnSetCommandComplete(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, responseid: u32, deviceservicedata: *const super::super::System::Com::SAFEARRAY, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; + fn OnQueryCommandComplete(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, responseid: u32, deviceservicedata: *const super::super::System::Com::SAFEARRAY, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; + fn OnEventNotification(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, eventid: u32, deviceservicedata: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn OnOpenDataSessionComplete(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; + fn OnCloseDataSessionComplete(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; + fn OnWriteDataComplete(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, status: windows_core::HRESULT, requestid: u32) -> windows_core::Result<()>; + fn OnReadData(&self, deviceservice: windows_core::Ref<'_, IMbnDeviceService>, deviceservicedata: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; fn OnInterfaceStateChange(&self, interfaceid: &windows_core::BSTR, statechange: MBN_DEVICE_SERVICES_INTERFACE_STATE) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -1166,43 +1166,43 @@ impl IMbnDeviceServicesEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnQuerySupportedCommandsComplete(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, commandidlist: *const super::super::System::Com::SAFEARRAY, status: windows_core::HRESULT, requestid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnQuerySupportedCommandsComplete(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&commandidlist), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() + IMbnDeviceServicesEvents_Impl::OnQuerySupportedCommandsComplete(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&commandidlist), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() } unsafe extern "system" fn OnOpenCommandSessionComplete(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, status: windows_core::HRESULT, requestid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnOpenCommandSessionComplete(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() + IMbnDeviceServicesEvents_Impl::OnOpenCommandSessionComplete(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() } unsafe extern "system" fn OnCloseCommandSessionComplete(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, status: windows_core::HRESULT, requestid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnCloseCommandSessionComplete(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() + IMbnDeviceServicesEvents_Impl::OnCloseCommandSessionComplete(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() } unsafe extern "system" fn OnSetCommandComplete(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, responseid: u32, deviceservicedata: *const super::super::System::Com::SAFEARRAY, status: windows_core::HRESULT, requestid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnSetCommandComplete(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&responseid), core::mem::transmute_copy(&deviceservicedata), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() + IMbnDeviceServicesEvents_Impl::OnSetCommandComplete(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&responseid), core::mem::transmute_copy(&deviceservicedata), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() } unsafe extern "system" fn OnQueryCommandComplete(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, responseid: u32, deviceservicedata: *const super::super::System::Com::SAFEARRAY, status: windows_core::HRESULT, requestid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnQueryCommandComplete(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&responseid), core::mem::transmute_copy(&deviceservicedata), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() + IMbnDeviceServicesEvents_Impl::OnQueryCommandComplete(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&responseid), core::mem::transmute_copy(&deviceservicedata), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() } unsafe extern "system" fn OnEventNotification(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, eventid: u32, deviceservicedata: *const super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnEventNotification(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&eventid), core::mem::transmute_copy(&deviceservicedata)).into() + IMbnDeviceServicesEvents_Impl::OnEventNotification(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&eventid), core::mem::transmute_copy(&deviceservicedata)).into() } unsafe extern "system" fn OnOpenDataSessionComplete(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, status: windows_core::HRESULT, requestid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnOpenDataSessionComplete(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() + IMbnDeviceServicesEvents_Impl::OnOpenDataSessionComplete(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() } unsafe extern "system" fn OnCloseDataSessionComplete(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, status: windows_core::HRESULT, requestid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnCloseDataSessionComplete(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() + IMbnDeviceServicesEvents_Impl::OnCloseDataSessionComplete(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() } unsafe extern "system" fn OnWriteDataComplete(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, status: windows_core::HRESULT, requestid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnWriteDataComplete(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() + IMbnDeviceServicesEvents_Impl::OnWriteDataComplete(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&status), core::mem::transmute_copy(&requestid)).into() } unsafe extern "system" fn OnReadData(this: *mut core::ffi::c_void, deviceservice: *mut core::ffi::c_void, deviceservicedata: *const super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnDeviceServicesEvents_Impl::OnReadData(this, windows_core::from_raw_borrowed(&deviceservice), core::mem::transmute_copy(&deviceservicedata)).into() + IMbnDeviceServicesEvents_Impl::OnReadData(this, core::mem::transmute_copy(&deviceservice), core::mem::transmute_copy(&deviceservicedata)).into() } unsafe extern "system" fn OnInterfaceStateChange(this: *mut core::ffi::c_void, interfaceid: *mut core::ffi::c_void, statechange: MBN_DEVICE_SERVICES_INTERFACE_STATE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1545,48 +1545,48 @@ pub struct IMbnInterfaceEvents_Vtbl { pub OnScanNetworkComplete: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IMbnInterfaceEvents_Impl: windows_core::IUnknownImpl { - fn OnInterfaceCapabilityAvailable(&self, newinterface: Option<&IMbnInterface>) -> windows_core::Result<()>; - fn OnSubscriberInformationChange(&self, newinterface: Option<&IMbnInterface>) -> windows_core::Result<()>; - fn OnReadyStateChange(&self, newinterface: Option<&IMbnInterface>) -> windows_core::Result<()>; - fn OnEmergencyModeChange(&self, newinterface: Option<&IMbnInterface>) -> windows_core::Result<()>; - fn OnHomeProviderAvailable(&self, newinterface: Option<&IMbnInterface>) -> windows_core::Result<()>; - fn OnPreferredProvidersChange(&self, newinterface: Option<&IMbnInterface>) -> windows_core::Result<()>; - fn OnSetPreferredProvidersComplete(&self, newinterface: Option<&IMbnInterface>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnScanNetworkComplete(&self, newinterface: Option<&IMbnInterface>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnInterfaceCapabilityAvailable(&self, newinterface: windows_core::Ref<'_, IMbnInterface>) -> windows_core::Result<()>; + fn OnSubscriberInformationChange(&self, newinterface: windows_core::Ref<'_, IMbnInterface>) -> windows_core::Result<()>; + fn OnReadyStateChange(&self, newinterface: windows_core::Ref<'_, IMbnInterface>) -> windows_core::Result<()>; + fn OnEmergencyModeChange(&self, newinterface: windows_core::Ref<'_, IMbnInterface>) -> windows_core::Result<()>; + fn OnHomeProviderAvailable(&self, newinterface: windows_core::Ref<'_, IMbnInterface>) -> windows_core::Result<()>; + fn OnPreferredProvidersChange(&self, newinterface: windows_core::Ref<'_, IMbnInterface>) -> windows_core::Result<()>; + fn OnSetPreferredProvidersComplete(&self, newinterface: windows_core::Ref<'_, IMbnInterface>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnScanNetworkComplete(&self, newinterface: windows_core::Ref<'_, IMbnInterface>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; } impl IMbnInterfaceEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnInterfaceCapabilityAvailable(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceEvents_Impl::OnInterfaceCapabilityAvailable(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnInterfaceEvents_Impl::OnInterfaceCapabilityAvailable(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnSubscriberInformationChange(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceEvents_Impl::OnSubscriberInformationChange(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnInterfaceEvents_Impl::OnSubscriberInformationChange(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnReadyStateChange(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceEvents_Impl::OnReadyStateChange(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnInterfaceEvents_Impl::OnReadyStateChange(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnEmergencyModeChange(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceEvents_Impl::OnEmergencyModeChange(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnInterfaceEvents_Impl::OnEmergencyModeChange(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnHomeProviderAvailable(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceEvents_Impl::OnHomeProviderAvailable(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnInterfaceEvents_Impl::OnHomeProviderAvailable(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnPreferredProvidersChange(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceEvents_Impl::OnPreferredProvidersChange(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnInterfaceEvents_Impl::OnPreferredProvidersChange(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnSetPreferredProvidersComplete(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceEvents_Impl::OnSetPreferredProvidersComplete(this, windows_core::from_raw_borrowed(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnInterfaceEvents_Impl::OnSetPreferredProvidersComplete(this, core::mem::transmute_copy(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnScanNetworkComplete(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceEvents_Impl::OnScanNetworkComplete(this, windows_core::from_raw_borrowed(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnInterfaceEvents_Impl::OnScanNetworkComplete(this, core::mem::transmute_copy(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1693,18 +1693,18 @@ pub struct IMbnInterfaceManagerEvents_Vtbl { pub OnInterfaceRemoval: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMbnInterfaceManagerEvents_Impl: windows_core::IUnknownImpl { - fn OnInterfaceArrival(&self, newinterface: Option<&IMbnInterface>) -> windows_core::Result<()>; - fn OnInterfaceRemoval(&self, oldinterface: Option<&IMbnInterface>) -> windows_core::Result<()>; + fn OnInterfaceArrival(&self, newinterface: windows_core::Ref<'_, IMbnInterface>) -> windows_core::Result<()>; + fn OnInterfaceRemoval(&self, oldinterface: windows_core::Ref<'_, IMbnInterface>) -> windows_core::Result<()>; } impl IMbnInterfaceManagerEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnInterfaceArrival(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceManagerEvents_Impl::OnInterfaceArrival(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnInterfaceManagerEvents_Impl::OnInterfaceArrival(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnInterfaceRemoval(this: *mut core::ffi::c_void, oldinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnInterfaceManagerEvents_Impl::OnInterfaceRemoval(this, windows_core::from_raw_borrowed(&oldinterface)).into() + IMbnInterfaceManagerEvents_Impl::OnInterfaceRemoval(this, core::mem::transmute_copy(&oldinterface)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1899,33 +1899,33 @@ pub struct IMbnMultiCarrierEvents_Vtbl { pub OnInterfaceCapabilityChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMbnMultiCarrierEvents_Impl: windows_core::IUnknownImpl { - fn OnSetHomeProviderComplete(&self, mbninterface: Option<&IMbnMultiCarrier>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnCurrentCellularClassChange(&self, mbninterface: Option<&IMbnMultiCarrier>) -> windows_core::Result<()>; - fn OnPreferredProvidersChange(&self, mbninterface: Option<&IMbnMultiCarrier>) -> windows_core::Result<()>; - fn OnScanNetworkComplete(&self, mbninterface: Option<&IMbnMultiCarrier>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnInterfaceCapabilityChange(&self, mbninterface: Option<&IMbnMultiCarrier>) -> windows_core::Result<()>; + fn OnSetHomeProviderComplete(&self, mbninterface: windows_core::Ref<'_, IMbnMultiCarrier>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnCurrentCellularClassChange(&self, mbninterface: windows_core::Ref<'_, IMbnMultiCarrier>) -> windows_core::Result<()>; + fn OnPreferredProvidersChange(&self, mbninterface: windows_core::Ref<'_, IMbnMultiCarrier>) -> windows_core::Result<()>; + fn OnScanNetworkComplete(&self, mbninterface: windows_core::Ref<'_, IMbnMultiCarrier>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnInterfaceCapabilityChange(&self, mbninterface: windows_core::Ref<'_, IMbnMultiCarrier>) -> windows_core::Result<()>; } impl IMbnMultiCarrierEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSetHomeProviderComplete(this: *mut core::ffi::c_void, mbninterface: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnMultiCarrierEvents_Impl::OnSetHomeProviderComplete(this, windows_core::from_raw_borrowed(&mbninterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnMultiCarrierEvents_Impl::OnSetHomeProviderComplete(this, core::mem::transmute_copy(&mbninterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnCurrentCellularClassChange(this: *mut core::ffi::c_void, mbninterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnMultiCarrierEvents_Impl::OnCurrentCellularClassChange(this, windows_core::from_raw_borrowed(&mbninterface)).into() + IMbnMultiCarrierEvents_Impl::OnCurrentCellularClassChange(this, core::mem::transmute_copy(&mbninterface)).into() } unsafe extern "system" fn OnPreferredProvidersChange(this: *mut core::ffi::c_void, mbninterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnMultiCarrierEvents_Impl::OnPreferredProvidersChange(this, windows_core::from_raw_borrowed(&mbninterface)).into() + IMbnMultiCarrierEvents_Impl::OnPreferredProvidersChange(this, core::mem::transmute_copy(&mbninterface)).into() } unsafe extern "system" fn OnScanNetworkComplete(this: *mut core::ffi::c_void, mbninterface: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnMultiCarrierEvents_Impl::OnScanNetworkComplete(this, windows_core::from_raw_borrowed(&mbninterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnMultiCarrierEvents_Impl::OnScanNetworkComplete(this, core::mem::transmute_copy(&mbninterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnInterfaceCapabilityChange(this: *mut core::ffi::c_void, mbninterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnMultiCarrierEvents_Impl::OnInterfaceCapabilityChange(this, windows_core::from_raw_borrowed(&mbninterface)).into() + IMbnMultiCarrierEvents_Impl::OnInterfaceCapabilityChange(this, core::mem::transmute_copy(&mbninterface)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2210,33 +2210,33 @@ pub struct IMbnPinEvents_Vtbl { pub OnUnblockComplete: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const MBN_PIN_INFO, u32, windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IMbnPinEvents_Impl: windows_core::IUnknownImpl { - fn OnEnableComplete(&self, pin: Option<&IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnDisableComplete(&self, pin: Option<&IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnEnterComplete(&self, pin: Option<&IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnChangeComplete(&self, pin: Option<&IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnUnblockComplete(&self, pin: Option<&IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnEnableComplete(&self, pin: windows_core::Ref<'_, IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnDisableComplete(&self, pin: windows_core::Ref<'_, IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnEnterComplete(&self, pin: windows_core::Ref<'_, IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnChangeComplete(&self, pin: windows_core::Ref<'_, IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnUnblockComplete(&self, pin: windows_core::Ref<'_, IMbnPin>, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; } impl IMbnPinEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnEnableComplete(this: *mut core::ffi::c_void, pin: *mut core::ffi::c_void, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnPinEvents_Impl::OnEnableComplete(this, windows_core::from_raw_borrowed(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnPinEvents_Impl::OnEnableComplete(this, core::mem::transmute_copy(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnDisableComplete(this: *mut core::ffi::c_void, pin: *mut core::ffi::c_void, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnPinEvents_Impl::OnDisableComplete(this, windows_core::from_raw_borrowed(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnPinEvents_Impl::OnDisableComplete(this, core::mem::transmute_copy(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnEnterComplete(this: *mut core::ffi::c_void, pin: *mut core::ffi::c_void, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnPinEvents_Impl::OnEnterComplete(this, windows_core::from_raw_borrowed(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnPinEvents_Impl::OnEnterComplete(this, core::mem::transmute_copy(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnChangeComplete(this: *mut core::ffi::c_void, pin: *mut core::ffi::c_void, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnPinEvents_Impl::OnChangeComplete(this, windows_core::from_raw_borrowed(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnPinEvents_Impl::OnChangeComplete(this, core::mem::transmute_copy(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnUnblockComplete(this: *mut core::ffi::c_void, pin: *mut core::ffi::c_void, pininfo: *const MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnPinEvents_Impl::OnUnblockComplete(this, windows_core::from_raw_borrowed(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnPinEvents_Impl::OnUnblockComplete(this, core::mem::transmute_copy(&pin), core::mem::transmute_copy(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2354,18 +2354,18 @@ pub struct IMbnPinManagerEvents_Vtbl { pub OnGetPinStateComplete: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, MBN_PIN_INFO, u32, windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IMbnPinManagerEvents_Impl: windows_core::IUnknownImpl { - fn OnPinListAvailable(&self, pinmanager: Option<&IMbnPinManager>) -> windows_core::Result<()>; - fn OnGetPinStateComplete(&self, pinmanager: Option<&IMbnPinManager>, pininfo: &MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnPinListAvailable(&self, pinmanager: windows_core::Ref<'_, IMbnPinManager>) -> windows_core::Result<()>; + fn OnGetPinStateComplete(&self, pinmanager: windows_core::Ref<'_, IMbnPinManager>, pininfo: &MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; } impl IMbnPinManagerEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnPinListAvailable(this: *mut core::ffi::c_void, pinmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnPinManagerEvents_Impl::OnPinListAvailable(this, windows_core::from_raw_borrowed(&pinmanager)).into() + IMbnPinManagerEvents_Impl::OnPinListAvailable(this, core::mem::transmute_copy(&pinmanager)).into() } unsafe extern "system" fn OnGetPinStateComplete(this: *mut core::ffi::c_void, pinmanager: *mut core::ffi::c_void, pininfo: MBN_PIN_INFO, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnPinManagerEvents_Impl::OnGetPinStateComplete(this, windows_core::from_raw_borrowed(&pinmanager), core::mem::transmute(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnPinManagerEvents_Impl::OnGetPinStateComplete(this, core::mem::transmute_copy(&pinmanager), core::mem::transmute(&pininfo), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2473,18 +2473,18 @@ pub struct IMbnRadioEvents_Vtbl { pub OnSetSoftwareRadioStateComplete: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IMbnRadioEvents_Impl: windows_core::IUnknownImpl { - fn OnRadioStateChange(&self, newinterface: Option<&IMbnRadio>) -> windows_core::Result<()>; - fn OnSetSoftwareRadioStateComplete(&self, newinterface: Option<&IMbnRadio>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnRadioStateChange(&self, newinterface: windows_core::Ref<'_, IMbnRadio>) -> windows_core::Result<()>; + fn OnSetSoftwareRadioStateComplete(&self, newinterface: windows_core::Ref<'_, IMbnRadio>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; } impl IMbnRadioEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnRadioStateChange(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnRadioEvents_Impl::OnRadioStateChange(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnRadioEvents_Impl::OnRadioStateChange(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnSetSoftwareRadioStateComplete(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnRadioEvents_Impl::OnSetSoftwareRadioStateComplete(this, windows_core::from_raw_borrowed(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnRadioEvents_Impl::OnSetSoftwareRadioStateComplete(this, core::mem::transmute_copy(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2728,28 +2728,28 @@ pub struct IMbnRegistrationEvents_Vtbl { pub OnSetRegisterModeComplete: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IMbnRegistrationEvents_Impl: windows_core::IUnknownImpl { - fn OnRegisterModeAvailable(&self, newinterface: Option<&IMbnRegistration>) -> windows_core::Result<()>; - fn OnRegisterStateChange(&self, newinterface: Option<&IMbnRegistration>) -> windows_core::Result<()>; - fn OnPacketServiceStateChange(&self, newinterface: Option<&IMbnRegistration>) -> windows_core::Result<()>; - fn OnSetRegisterModeComplete(&self, newinterface: Option<&IMbnRegistration>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnRegisterModeAvailable(&self, newinterface: windows_core::Ref<'_, IMbnRegistration>) -> windows_core::Result<()>; + fn OnRegisterStateChange(&self, newinterface: windows_core::Ref<'_, IMbnRegistration>) -> windows_core::Result<()>; + fn OnPacketServiceStateChange(&self, newinterface: windows_core::Ref<'_, IMbnRegistration>) -> windows_core::Result<()>; + fn OnSetRegisterModeComplete(&self, newinterface: windows_core::Ref<'_, IMbnRegistration>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; } impl IMbnRegistrationEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnRegisterModeAvailable(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnRegistrationEvents_Impl::OnRegisterModeAvailable(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnRegistrationEvents_Impl::OnRegisterModeAvailable(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnRegisterStateChange(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnRegistrationEvents_Impl::OnRegisterStateChange(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnRegistrationEvents_Impl::OnRegisterStateChange(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnPacketServiceStateChange(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnRegistrationEvents_Impl::OnPacketServiceStateChange(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnRegistrationEvents_Impl::OnPacketServiceStateChange(this, core::mem::transmute_copy(&newinterface)).into() } unsafe extern "system" fn OnSetRegisterModeComplete(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnRegistrationEvents_Impl::OnSetRegisterModeComplete(this, windows_core::from_raw_borrowed(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnRegistrationEvents_Impl::OnSetRegisterModeComplete(this, core::mem::transmute_copy(&newinterface), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2827,14 +2827,14 @@ pub struct IMbnServiceActivationEvents_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IMbnServiceActivationEvents_Impl: windows_core::IUnknownImpl { - fn OnActivationComplete(&self, serviceactivation: Option<&IMbnServiceActivation>, vendorspecificdata: *const super::super::System::Com::SAFEARRAY, requestid: u32, status: windows_core::HRESULT, networkerror: u32) -> windows_core::Result<()>; + fn OnActivationComplete(&self, serviceactivation: windows_core::Ref<'_, IMbnServiceActivation>, vendorspecificdata: *const super::super::System::Com::SAFEARRAY, requestid: u32, status: windows_core::HRESULT, networkerror: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IMbnServiceActivationEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnActivationComplete(this: *mut core::ffi::c_void, serviceactivation: *mut core::ffi::c_void, vendorspecificdata: *const super::super::System::Com::SAFEARRAY, requestid: u32, status: windows_core::HRESULT, networkerror: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnServiceActivationEvents_Impl::OnActivationComplete(this, windows_core::from_raw_borrowed(&serviceactivation), core::mem::transmute_copy(&vendorspecificdata), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status), core::mem::transmute_copy(&networkerror)).into() + IMbnServiceActivationEvents_Impl::OnActivationComplete(this, core::mem::transmute_copy(&serviceactivation), core::mem::transmute_copy(&vendorspecificdata), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status), core::mem::transmute_copy(&networkerror)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnActivationComplete: OnActivationComplete:: } } @@ -2915,13 +2915,13 @@ pub struct IMbnSignalEvents_Vtbl { pub OnSignalStateChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMbnSignalEvents_Impl: windows_core::IUnknownImpl { - fn OnSignalStateChange(&self, newinterface: Option<&IMbnSignal>) -> windows_core::Result<()>; + fn OnSignalStateChange(&self, newinterface: windows_core::Ref<'_, IMbnSignal>) -> windows_core::Result<()>; } impl IMbnSignalEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSignalStateChange(this: *mut core::ffi::c_void, newinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnSignalEvents_Impl::OnSignalStateChange(this, windows_core::from_raw_borrowed(&newinterface)).into() + IMbnSignalEvents_Impl::OnSignalStateChange(this, core::mem::transmute_copy(&newinterface)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnSignalStateChange: OnSignalStateChange:: } } @@ -2998,7 +2998,7 @@ pub struct IMbnSms_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IMbnSms_Impl: windows_core::IUnknownImpl { fn GetSmsConfiguration(&self) -> windows_core::Result; - fn SetSmsConfiguration(&self, smsconfiguration: Option<&IMbnSmsConfiguration>) -> windows_core::Result; + fn SetSmsConfiguration(&self, smsconfiguration: windows_core::Ref<'_, IMbnSmsConfiguration>) -> windows_core::Result; fn SmsSendPdu(&self, pdudata: &windows_core::PCWSTR, size: u8) -> windows_core::Result; fn SmsSendCdma(&self, address: &windows_core::PCWSTR, encoding: MBN_SMS_CDMA_ENCODING, language: MBN_SMS_CDMA_LANG, sizeincharacters: u32, message: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result; fn SmsSendCdmaPdu(&self, message: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result; @@ -3021,7 +3021,7 @@ impl IMbnSms_Vtbl { } unsafe extern "system" fn SetSmsConfiguration(this: *mut core::ffi::c_void, smsconfiguration: *mut core::ffi::c_void, requestid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMbnSms_Impl::SetSmsConfiguration(this, windows_core::from_raw_borrowed(&smsconfiguration)) { + match IMbnSms_Impl::SetSmsConfiguration(this, core::mem::transmute_copy(&smsconfiguration)) { Ok(ok__) => { requestid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3286,44 +3286,44 @@ pub struct IMbnSmsEvents_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IMbnSmsEvents_Impl: windows_core::IUnknownImpl { - fn OnSmsConfigurationChange(&self, sms: Option<&IMbnSms>) -> windows_core::Result<()>; - fn OnSetSmsConfigurationComplete(&self, sms: Option<&IMbnSms>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnSmsSendComplete(&self, sms: Option<&IMbnSms>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnSmsReadComplete(&self, sms: Option<&IMbnSms>, smsformat: MBN_SMS_FORMAT, readmsgs: *const super::super::System::Com::SAFEARRAY, moremsgs: super::super::Foundation::VARIANT_BOOL, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnSmsNewClass0Message(&self, sms: Option<&IMbnSms>, smsformat: MBN_SMS_FORMAT, readmsgs: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; - fn OnSmsDeleteComplete(&self, sms: Option<&IMbnSms>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; - fn OnSmsStatusChange(&self, sms: Option<&IMbnSms>) -> windows_core::Result<()>; + fn OnSmsConfigurationChange(&self, sms: windows_core::Ref<'_, IMbnSms>) -> windows_core::Result<()>; + fn OnSetSmsConfigurationComplete(&self, sms: windows_core::Ref<'_, IMbnSms>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnSmsSendComplete(&self, sms: windows_core::Ref<'_, IMbnSms>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnSmsReadComplete(&self, sms: windows_core::Ref<'_, IMbnSms>, smsformat: MBN_SMS_FORMAT, readmsgs: *const super::super::System::Com::SAFEARRAY, moremsgs: super::super::Foundation::VARIANT_BOOL, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnSmsNewClass0Message(&self, sms: windows_core::Ref<'_, IMbnSms>, smsformat: MBN_SMS_FORMAT, readmsgs: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn OnSmsDeleteComplete(&self, sms: windows_core::Ref<'_, IMbnSms>, requestid: u32, status: windows_core::HRESULT) -> windows_core::Result<()>; + fn OnSmsStatusChange(&self, sms: windows_core::Ref<'_, IMbnSms>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IMbnSmsEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnSmsConfigurationChange(this: *mut core::ffi::c_void, sms: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnSmsEvents_Impl::OnSmsConfigurationChange(this, windows_core::from_raw_borrowed(&sms)).into() + IMbnSmsEvents_Impl::OnSmsConfigurationChange(this, core::mem::transmute_copy(&sms)).into() } unsafe extern "system" fn OnSetSmsConfigurationComplete(this: *mut core::ffi::c_void, sms: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnSmsEvents_Impl::OnSetSmsConfigurationComplete(this, windows_core::from_raw_borrowed(&sms), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnSmsEvents_Impl::OnSetSmsConfigurationComplete(this, core::mem::transmute_copy(&sms), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnSmsSendComplete(this: *mut core::ffi::c_void, sms: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnSmsEvents_Impl::OnSmsSendComplete(this, windows_core::from_raw_borrowed(&sms), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnSmsEvents_Impl::OnSmsSendComplete(this, core::mem::transmute_copy(&sms), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnSmsReadComplete(this: *mut core::ffi::c_void, sms: *mut core::ffi::c_void, smsformat: MBN_SMS_FORMAT, readmsgs: *const super::super::System::Com::SAFEARRAY, moremsgs: super::super::Foundation::VARIANT_BOOL, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnSmsEvents_Impl::OnSmsReadComplete(this, windows_core::from_raw_borrowed(&sms), core::mem::transmute_copy(&smsformat), core::mem::transmute_copy(&readmsgs), core::mem::transmute_copy(&moremsgs), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnSmsEvents_Impl::OnSmsReadComplete(this, core::mem::transmute_copy(&sms), core::mem::transmute_copy(&smsformat), core::mem::transmute_copy(&readmsgs), core::mem::transmute_copy(&moremsgs), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnSmsNewClass0Message(this: *mut core::ffi::c_void, sms: *mut core::ffi::c_void, smsformat: MBN_SMS_FORMAT, readmsgs: *const super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnSmsEvents_Impl::OnSmsNewClass0Message(this, windows_core::from_raw_borrowed(&sms), core::mem::transmute_copy(&smsformat), core::mem::transmute_copy(&readmsgs)).into() + IMbnSmsEvents_Impl::OnSmsNewClass0Message(this, core::mem::transmute_copy(&sms), core::mem::transmute_copy(&smsformat), core::mem::transmute_copy(&readmsgs)).into() } unsafe extern "system" fn OnSmsDeleteComplete(this: *mut core::ffi::c_void, sms: *mut core::ffi::c_void, requestid: u32, status: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnSmsEvents_Impl::OnSmsDeleteComplete(this, windows_core::from_raw_borrowed(&sms), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() + IMbnSmsEvents_Impl::OnSmsDeleteComplete(this, core::mem::transmute_copy(&sms), core::mem::transmute_copy(&requestid), core::mem::transmute_copy(&status)).into() } unsafe extern "system" fn OnSmsStatusChange(this: *mut core::ffi::c_void, sms: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnSmsEvents_Impl::OnSmsStatusChange(this, windows_core::from_raw_borrowed(&sms)).into() + IMbnSmsEvents_Impl::OnSmsStatusChange(this, core::mem::transmute_copy(&sms)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3713,19 +3713,19 @@ pub struct IMbnVendorSpecificEvents_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IMbnVendorSpecificEvents_Impl: windows_core::IUnknownImpl { - fn OnEventNotification(&self, vendoroperation: Option<&IMbnVendorSpecificOperation>, vendorspecificdata: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; - fn OnSetVendorSpecificComplete(&self, vendoroperation: Option<&IMbnVendorSpecificOperation>, vendorspecificdata: *const super::super::System::Com::SAFEARRAY, requestid: u32) -> windows_core::Result<()>; + fn OnEventNotification(&self, vendoroperation: windows_core::Ref<'_, IMbnVendorSpecificOperation>, vendorspecificdata: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn OnSetVendorSpecificComplete(&self, vendoroperation: windows_core::Ref<'_, IMbnVendorSpecificOperation>, vendorspecificdata: *const super::super::System::Com::SAFEARRAY, requestid: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IMbnVendorSpecificEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnEventNotification(this: *mut core::ffi::c_void, vendoroperation: *mut core::ffi::c_void, vendorspecificdata: *const super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnVendorSpecificEvents_Impl::OnEventNotification(this, windows_core::from_raw_borrowed(&vendoroperation), core::mem::transmute_copy(&vendorspecificdata)).into() + IMbnVendorSpecificEvents_Impl::OnEventNotification(this, core::mem::transmute_copy(&vendoroperation), core::mem::transmute_copy(&vendorspecificdata)).into() } unsafe extern "system" fn OnSetVendorSpecificComplete(this: *mut core::ffi::c_void, vendoroperation: *mut core::ffi::c_void, vendorspecificdata: *const super::super::System::Com::SAFEARRAY, requestid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMbnVendorSpecificEvents_Impl::OnSetVendorSpecificComplete(this, windows_core::from_raw_borrowed(&vendoroperation), core::mem::transmute_copy(&vendorspecificdata), core::mem::transmute_copy(&requestid)).into() + IMbnVendorSpecificEvents_Impl::OnSetVendorSpecificComplete(this, core::mem::transmute_copy(&vendoroperation), core::mem::transmute_copy(&vendorspecificdata), core::mem::transmute_copy(&requestid)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs index 70e12b124c..0c314bebe1 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs @@ -2739,7 +2739,7 @@ pub struct IEnumNetCfgBindingInterface_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *const *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumNetCfgBindingInterface_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, INetCfgBindingInterface>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self, ppenum: *const Option) -> windows_core::Result<()>; @@ -2800,7 +2800,7 @@ pub struct IEnumNetCfgBindingPath_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *const *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumNetCfgBindingPath_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, INetCfgBindingPath>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self, ppenum: *const Option) -> windows_core::Result<()>; @@ -2861,7 +2861,7 @@ pub struct IEnumNetCfgComponent_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *const *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumNetCfgComponent_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, INetCfgComponent>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self, ppenum: *const Option) -> windows_core::Result<()>; @@ -2943,8 +2943,8 @@ pub trait INetCfg_Impl: windows_core::IUnknownImpl { fn Uninitialize(&self) -> windows_core::Result<()>; fn Apply(&self) -> windows_core::Result<()>; fn Cancel(&self) -> windows_core::Result<()>; - fn EnumComponents(&self, pguidclass: *const windows_core::GUID, ppenumcomponent: *mut Option) -> windows_core::Result<()>; - fn FindComponent(&self, pszwinfid: &windows_core::PCWSTR, pcomponent: *mut Option) -> windows_core::Result<()>; + fn EnumComponents(&self, pguidclass: *const windows_core::GUID, ppenumcomponent: windows_core::OutRef<'_, IEnumNetCfgComponent>) -> windows_core::Result<()>; + fn FindComponent(&self, pszwinfid: &windows_core::PCWSTR, pcomponent: windows_core::OutRef<'_, INetCfgComponent>) -> windows_core::Result<()>; fn QueryNetCfgClass(&self, pguidclass: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl INetCfg_Vtbl { @@ -3015,8 +3015,8 @@ pub struct INetCfgBindingInterface_Vtbl { } pub trait INetCfgBindingInterface_Impl: windows_core::IUnknownImpl { fn GetName(&self, ppszwinterfacename: *mut windows_core::PWSTR) -> windows_core::Result<()>; - fn GetUpperComponent(&self, ppnccitem: *mut Option) -> windows_core::Result<()>; - fn GetLowerComponent(&self, ppnccitem: *mut Option) -> windows_core::Result<()>; + fn GetUpperComponent(&self, ppnccitem: windows_core::OutRef<'_, INetCfgComponent>) -> windows_core::Result<()>; + fn GetLowerComponent(&self, ppnccitem: windows_core::OutRef<'_, INetCfgComponent>) -> windows_core::Result<()>; } impl INetCfgBindingInterface_Vtbl { pub const fn new() -> Self { @@ -3092,24 +3092,24 @@ pub struct INetCfgBindingPath_Vtbl { pub EnumBindingInterfaces: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait INetCfgBindingPath_Impl: windows_core::IUnknownImpl { - fn IsSamePathAs(&self, ppath: Option<&INetCfgBindingPath>) -> windows_core::Result<()>; - fn IsSubPathOf(&self, ppath: Option<&INetCfgBindingPath>) -> windows_core::Result<()>; + fn IsSamePathAs(&self, ppath: windows_core::Ref<'_, INetCfgBindingPath>) -> windows_core::Result<()>; + fn IsSubPathOf(&self, ppath: windows_core::Ref<'_, INetCfgBindingPath>) -> windows_core::Result<()>; fn IsEnabled(&self) -> windows_core::Result<()>; fn Enable(&self, fenable: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetPathToken(&self, ppszwpathtoken: *mut windows_core::PWSTR) -> windows_core::Result<()>; - fn GetOwner(&self, ppcomponent: *mut Option) -> windows_core::Result<()>; + fn GetOwner(&self, ppcomponent: windows_core::OutRef<'_, INetCfgComponent>) -> windows_core::Result<()>; fn GetDepth(&self) -> windows_core::Result; - fn EnumBindingInterfaces(&self, ppenuminterface: *mut Option) -> windows_core::Result<()>; + fn EnumBindingInterfaces(&self, ppenuminterface: windows_core::OutRef<'_, IEnumNetCfgBindingInterface>) -> windows_core::Result<()>; } impl INetCfgBindingPath_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsSamePathAs(this: *mut core::ffi::c_void, ppath: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgBindingPath_Impl::IsSamePathAs(this, windows_core::from_raw_borrowed(&ppath)).into() + INetCfgBindingPath_Impl::IsSamePathAs(this, core::mem::transmute_copy(&ppath)).into() } unsafe extern "system" fn IsSubPathOf(this: *mut core::ffi::c_void, ppath: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgBindingPath_Impl::IsSubPathOf(this, windows_core::from_raw_borrowed(&ppath)).into() + INetCfgBindingPath_Impl::IsSubPathOf(this, core::mem::transmute_copy(&ppath)).into() } unsafe extern "system" fn IsEnabled(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3178,8 +3178,8 @@ pub struct INetCfgClass_Vtbl { pub EnumComponents: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait INetCfgClass_Impl: windows_core::IUnknownImpl { - fn FindComponent(&self, pszwinfid: &windows_core::PCWSTR, ppnccitem: *mut Option) -> windows_core::Result<()>; - fn EnumComponents(&self, ppenumcomponent: *mut Option) -> windows_core::Result<()>; + fn FindComponent(&self, pszwinfid: &windows_core::PCWSTR, ppnccitem: windows_core::OutRef<'_, INetCfgComponent>) -> windows_core::Result<()>; + fn EnumComponents(&self, ppenumcomponent: windows_core::OutRef<'_, IEnumNetCfgComponent>) -> windows_core::Result<()>; } impl INetCfgClass_Vtbl { pub const fn new() -> Self { @@ -3231,9 +3231,9 @@ pub struct INetCfgClassSetup_Vtbl { pub DeInstall: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const OBO_TOKEN, *mut windows_core::PWSTR) -> windows_core::HRESULT, } pub trait INetCfgClassSetup_Impl: windows_core::IUnknownImpl { - fn SelectAndInstall(&self, hwndparent: super::super::Foundation::HWND, pobotoken: *const OBO_TOKEN, ppnccitem: *mut Option) -> windows_core::Result<()>; - fn Install(&self, pszwinfid: &windows_core::PCWSTR, pobotoken: *const OBO_TOKEN, dwsetupflags: u32, dwupgradefrombuildno: u32, pszwanswerfile: &windows_core::PCWSTR, pszwanswersections: &windows_core::PCWSTR, ppnccitem: *mut Option) -> windows_core::Result<()>; - fn DeInstall(&self, pcomponent: Option<&INetCfgComponent>, pobotoken: *const OBO_TOKEN, pmszwrefs: *mut windows_core::PWSTR) -> windows_core::Result<()>; + fn SelectAndInstall(&self, hwndparent: super::super::Foundation::HWND, pobotoken: *const OBO_TOKEN, ppnccitem: windows_core::OutRef<'_, INetCfgComponent>) -> windows_core::Result<()>; + fn Install(&self, pszwinfid: &windows_core::PCWSTR, pobotoken: *const OBO_TOKEN, dwsetupflags: u32, dwupgradefrombuildno: u32, pszwanswerfile: &windows_core::PCWSTR, pszwanswersections: &windows_core::PCWSTR, ppnccitem: windows_core::OutRef<'_, INetCfgComponent>) -> windows_core::Result<()>; + fn DeInstall(&self, pcomponent: windows_core::Ref<'_, INetCfgComponent>, pobotoken: *const OBO_TOKEN, pmszwrefs: *mut windows_core::PWSTR) -> windows_core::Result<()>; } impl INetCfgClassSetup_Vtbl { pub const fn new() -> Self { @@ -3247,7 +3247,7 @@ impl INetCfgClassSetup_Vtbl { } unsafe extern "system" fn DeInstall(this: *mut core::ffi::c_void, pcomponent: *mut core::ffi::c_void, pobotoken: *const OBO_TOKEN, pmszwrefs: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgClassSetup_Impl::DeInstall(this, windows_core::from_raw_borrowed(&pcomponent), core::mem::transmute_copy(&pobotoken), core::mem::transmute_copy(&pmszwrefs)).into() + INetCfgClassSetup_Impl::DeInstall(this, core::mem::transmute_copy(&pcomponent), core::mem::transmute_copy(&pobotoken), core::mem::transmute_copy(&pmszwrefs)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3283,13 +3283,13 @@ pub struct INetCfgClassSetup2_Vtbl { pub UpdateNonEnumeratedComponent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait INetCfgClassSetup2_Impl: INetCfgClassSetup_Impl { - fn UpdateNonEnumeratedComponent(&self, picomp: Option<&INetCfgComponent>, dwsetupflags: u32, dwupgradefrombuildno: u32) -> windows_core::Result<()>; + fn UpdateNonEnumeratedComponent(&self, picomp: windows_core::Ref<'_, INetCfgComponent>, dwsetupflags: u32, dwupgradefrombuildno: u32) -> windows_core::Result<()>; } impl INetCfgClassSetup2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UpdateNonEnumeratedComponent(this: *mut core::ffi::c_void, picomp: *mut core::ffi::c_void, dwsetupflags: u32, dwupgradefrombuildno: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgClassSetup2_Impl::UpdateNonEnumeratedComponent(this, windows_core::from_raw_borrowed(&picomp), core::mem::transmute_copy(&dwsetupflags), core::mem::transmute_copy(&dwupgradefrombuildno)).into() + INetCfgClassSetup2_Impl::UpdateNonEnumeratedComponent(this, core::mem::transmute_copy(&picomp), core::mem::transmute_copy(&dwsetupflags), core::mem::transmute_copy(&dwupgradefrombuildno)).into() } Self { base__: INetCfgClassSetup_Vtbl::new::(), UpdateNonEnumeratedComponent: UpdateNonEnumeratedComponent:: } } @@ -3379,7 +3379,7 @@ pub trait INetCfgComponent_Impl: windows_core::IUnknownImpl { fn GetBindName(&self, ppszwbindname: *mut windows_core::PWSTR) -> windows_core::Result<()>; fn GetDeviceStatus(&self) -> windows_core::Result; fn OpenParamKey(&self, phkey: *mut super::super::System::Registry::HKEY) -> windows_core::Result<()>; - fn RaisePropertyUi(&self, hwndparent: super::super::Foundation::HWND, dwflags: u32, punkcontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn RaisePropertyUi(&self, hwndparent: super::super::Foundation::HWND, dwflags: u32, punkcontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Registry")] impl INetCfgComponent_Vtbl { @@ -3442,7 +3442,7 @@ impl INetCfgComponent_Vtbl { } unsafe extern "system" fn RaisePropertyUi(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, dwflags: u32, punkcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponent_Impl::RaisePropertyUi(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&punkcontext)).into() + INetCfgComponent_Impl::RaisePropertyUi(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&punkcontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3530,24 +3530,24 @@ pub struct INetCfgComponentBindings_Vtbl { pub MoveAfter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait INetCfgComponentBindings_Impl: windows_core::IUnknownImpl { - fn BindTo(&self, pnccitem: Option<&INetCfgComponent>) -> windows_core::Result<()>; - fn UnbindFrom(&self, pnccitem: Option<&INetCfgComponent>) -> windows_core::Result<()>; + fn BindTo(&self, pnccitem: windows_core::Ref<'_, INetCfgComponent>) -> windows_core::Result<()>; + fn UnbindFrom(&self, pnccitem: windows_core::Ref<'_, INetCfgComponent>) -> windows_core::Result<()>; fn SupportsBindingInterface(&self, dwflags: u32, pszwinterfacename: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn IsBoundTo(&self, pnccitem: Option<&INetCfgComponent>) -> windows_core::Result<()>; - fn IsBindableTo(&self, pnccitem: Option<&INetCfgComponent>) -> windows_core::Result<()>; - fn EnumBindingPaths(&self, dwflags: u32, ppienum: *mut Option) -> windows_core::Result<()>; - fn MoveBefore(&self, pncbitemsrc: Option<&INetCfgBindingPath>, pncbitemdest: Option<&INetCfgBindingPath>) -> windows_core::Result<()>; - fn MoveAfter(&self, pncbitemsrc: Option<&INetCfgBindingPath>, pncbitemdest: Option<&INetCfgBindingPath>) -> windows_core::Result<()>; + fn IsBoundTo(&self, pnccitem: windows_core::Ref<'_, INetCfgComponent>) -> windows_core::Result<()>; + fn IsBindableTo(&self, pnccitem: windows_core::Ref<'_, INetCfgComponent>) -> windows_core::Result<()>; + fn EnumBindingPaths(&self, dwflags: u32, ppienum: windows_core::OutRef<'_, IEnumNetCfgBindingPath>) -> windows_core::Result<()>; + fn MoveBefore(&self, pncbitemsrc: windows_core::Ref<'_, INetCfgBindingPath>, pncbitemdest: windows_core::Ref<'_, INetCfgBindingPath>) -> windows_core::Result<()>; + fn MoveAfter(&self, pncbitemsrc: windows_core::Ref<'_, INetCfgBindingPath>, pncbitemdest: windows_core::Ref<'_, INetCfgBindingPath>) -> windows_core::Result<()>; } impl INetCfgComponentBindings_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BindTo(this: *mut core::ffi::c_void, pnccitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentBindings_Impl::BindTo(this, windows_core::from_raw_borrowed(&pnccitem)).into() + INetCfgComponentBindings_Impl::BindTo(this, core::mem::transmute_copy(&pnccitem)).into() } unsafe extern "system" fn UnbindFrom(this: *mut core::ffi::c_void, pnccitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentBindings_Impl::UnbindFrom(this, windows_core::from_raw_borrowed(&pnccitem)).into() + INetCfgComponentBindings_Impl::UnbindFrom(this, core::mem::transmute_copy(&pnccitem)).into() } unsafe extern "system" fn SupportsBindingInterface(this: *mut core::ffi::c_void, dwflags: u32, pszwinterfacename: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3555,11 +3555,11 @@ impl INetCfgComponentBindings_Vtbl { } unsafe extern "system" fn IsBoundTo(this: *mut core::ffi::c_void, pnccitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentBindings_Impl::IsBoundTo(this, windows_core::from_raw_borrowed(&pnccitem)).into() + INetCfgComponentBindings_Impl::IsBoundTo(this, core::mem::transmute_copy(&pnccitem)).into() } unsafe extern "system" fn IsBindableTo(this: *mut core::ffi::c_void, pnccitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentBindings_Impl::IsBindableTo(this, windows_core::from_raw_borrowed(&pnccitem)).into() + INetCfgComponentBindings_Impl::IsBindableTo(this, core::mem::transmute_copy(&pnccitem)).into() } unsafe extern "system" fn EnumBindingPaths(this: *mut core::ffi::c_void, dwflags: u32, ppienum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3567,11 +3567,11 @@ impl INetCfgComponentBindings_Vtbl { } unsafe extern "system" fn MoveBefore(this: *mut core::ffi::c_void, pncbitemsrc: *mut core::ffi::c_void, pncbitemdest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentBindings_Impl::MoveBefore(this, windows_core::from_raw_borrowed(&pncbitemsrc), windows_core::from_raw_borrowed(&pncbitemdest)).into() + INetCfgComponentBindings_Impl::MoveBefore(this, core::mem::transmute_copy(&pncbitemsrc), core::mem::transmute_copy(&pncbitemdest)).into() } unsafe extern "system" fn MoveAfter(this: *mut core::ffi::c_void, pncbitemsrc: *mut core::ffi::c_void, pncbitemdest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentBindings_Impl::MoveAfter(this, windows_core::from_raw_borrowed(&pncbitemsrc), windows_core::from_raw_borrowed(&pncbitemdest)).into() + INetCfgComponentBindings_Impl::MoveAfter(this, core::mem::transmute_copy(&pncbitemsrc), core::mem::transmute_copy(&pncbitemdest)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3622,16 +3622,16 @@ pub struct INetCfgComponentControl_Vtbl { pub CancelChanges: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait INetCfgComponentControl_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, picomp: Option<&INetCfgComponent>, pinetcfg: Option<&INetCfg>, finstalling: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Initialize(&self, picomp: windows_core::Ref<'_, INetCfgComponent>, pinetcfg: windows_core::Ref<'_, INetCfg>, finstalling: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn ApplyRegistryChanges(&self) -> windows_core::Result<()>; - fn ApplyPnpChanges(&self, picallback: Option<&INetCfgPnpReconfigCallback>) -> windows_core::Result<()>; + fn ApplyPnpChanges(&self, picallback: windows_core::Ref<'_, INetCfgPnpReconfigCallback>) -> windows_core::Result<()>; fn CancelChanges(&self) -> windows_core::Result<()>; } impl INetCfgComponentControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, picomp: *mut core::ffi::c_void, pinetcfg: *mut core::ffi::c_void, finstalling: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentControl_Impl::Initialize(this, windows_core::from_raw_borrowed(&picomp), windows_core::from_raw_borrowed(&pinetcfg), core::mem::transmute_copy(&finstalling)).into() + INetCfgComponentControl_Impl::Initialize(this, core::mem::transmute_copy(&picomp), core::mem::transmute_copy(&pinetcfg), core::mem::transmute_copy(&finstalling)).into() } unsafe extern "system" fn ApplyRegistryChanges(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3639,7 +3639,7 @@ impl INetCfgComponentControl_Vtbl { } unsafe extern "system" fn ApplyPnpChanges(this: *mut core::ffi::c_void, picallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentControl_Impl::ApplyPnpChanges(this, windows_core::from_raw_borrowed(&picallback)).into() + INetCfgComponentControl_Impl::ApplyPnpChanges(this, core::mem::transmute_copy(&picallback)).into() } unsafe extern "system" fn CancelChanges(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3681,18 +3681,18 @@ pub struct INetCfgComponentNotifyBinding_Vtbl { pub NotifyBindingPath: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait INetCfgComponentNotifyBinding_Impl: windows_core::IUnknownImpl { - fn QueryBindingPath(&self, dwchangeflag: u32, pipath: Option<&INetCfgBindingPath>) -> windows_core::Result<()>; - fn NotifyBindingPath(&self, dwchangeflag: u32, pipath: Option<&INetCfgBindingPath>) -> windows_core::Result<()>; + fn QueryBindingPath(&self, dwchangeflag: u32, pipath: windows_core::Ref<'_, INetCfgBindingPath>) -> windows_core::Result<()>; + fn NotifyBindingPath(&self, dwchangeflag: u32, pipath: windows_core::Ref<'_, INetCfgBindingPath>) -> windows_core::Result<()>; } impl INetCfgComponentNotifyBinding_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryBindingPath(this: *mut core::ffi::c_void, dwchangeflag: u32, pipath: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentNotifyBinding_Impl::QueryBindingPath(this, core::mem::transmute_copy(&dwchangeflag), windows_core::from_raw_borrowed(&pipath)).into() + INetCfgComponentNotifyBinding_Impl::QueryBindingPath(this, core::mem::transmute_copy(&dwchangeflag), core::mem::transmute_copy(&pipath)).into() } unsafe extern "system" fn NotifyBindingPath(this: *mut core::ffi::c_void, dwchangeflag: u32, pipath: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentNotifyBinding_Impl::NotifyBindingPath(this, core::mem::transmute_copy(&dwchangeflag), windows_core::from_raw_borrowed(&pipath)).into() + INetCfgComponentNotifyBinding_Impl::NotifyBindingPath(this, core::mem::transmute_copy(&dwchangeflag), core::mem::transmute_copy(&pipath)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3741,9 +3741,9 @@ pub struct INetCfgComponentNotifyGlobal_Vtbl { } pub trait INetCfgComponentNotifyGlobal_Impl: windows_core::IUnknownImpl { fn GetSupportedNotifications(&self) -> windows_core::Result; - fn SysQueryBindingPath(&self, dwchangeflag: u32, pipath: Option<&INetCfgBindingPath>) -> windows_core::Result<()>; - fn SysNotifyBindingPath(&self, dwchangeflag: u32, pipath: Option<&INetCfgBindingPath>) -> windows_core::Result<()>; - fn SysNotifyComponent(&self, dwchangeflag: u32, picomp: Option<&INetCfgComponent>) -> windows_core::Result<()>; + fn SysQueryBindingPath(&self, dwchangeflag: u32, pipath: windows_core::Ref<'_, INetCfgBindingPath>) -> windows_core::Result<()>; + fn SysNotifyBindingPath(&self, dwchangeflag: u32, pipath: windows_core::Ref<'_, INetCfgBindingPath>) -> windows_core::Result<()>; + fn SysNotifyComponent(&self, dwchangeflag: u32, picomp: windows_core::Ref<'_, INetCfgComponent>) -> windows_core::Result<()>; } impl INetCfgComponentNotifyGlobal_Vtbl { pub const fn new() -> Self { @@ -3759,15 +3759,15 @@ impl INetCfgComponentNotifyGlobal_Vtbl { } unsafe extern "system" fn SysQueryBindingPath(this: *mut core::ffi::c_void, dwchangeflag: u32, pipath: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentNotifyGlobal_Impl::SysQueryBindingPath(this, core::mem::transmute_copy(&dwchangeflag), windows_core::from_raw_borrowed(&pipath)).into() + INetCfgComponentNotifyGlobal_Impl::SysQueryBindingPath(this, core::mem::transmute_copy(&dwchangeflag), core::mem::transmute_copy(&pipath)).into() } unsafe extern "system" fn SysNotifyBindingPath(this: *mut core::ffi::c_void, dwchangeflag: u32, pipath: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentNotifyGlobal_Impl::SysNotifyBindingPath(this, core::mem::transmute_copy(&dwchangeflag), windows_core::from_raw_borrowed(&pipath)).into() + INetCfgComponentNotifyGlobal_Impl::SysNotifyBindingPath(this, core::mem::transmute_copy(&dwchangeflag), core::mem::transmute_copy(&pipath)).into() } unsafe extern "system" fn SysNotifyComponent(this: *mut core::ffi::c_void, dwchangeflag: u32, picomp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentNotifyGlobal_Impl::SysNotifyComponent(this, core::mem::transmute_copy(&dwchangeflag), windows_core::from_raw_borrowed(&picomp)).into() + INetCfgComponentNotifyGlobal_Impl::SysNotifyComponent(this, core::mem::transmute_copy(&dwchangeflag), core::mem::transmute_copy(&picomp)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3821,8 +3821,8 @@ pub struct INetCfgComponentPropertyUi_Vtbl { pub CancelProperties: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait INetCfgComponentPropertyUi_Impl: windows_core::IUnknownImpl { - fn QueryPropertyUi(&self, punkreserved: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn SetContext(&self, punkreserved: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn QueryPropertyUi(&self, punkreserved: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetContext(&self, punkreserved: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn MergePropPages(&self, pdwdefpages: *mut u32, pahpspprivate: *mut *mut u8, pcpages: *mut u32, hwndparent: super::super::Foundation::HWND, pszstartpage: *const windows_core::PCWSTR) -> windows_core::Result<()>; fn ValidateProperties(&self, hwndsheet: super::super::Foundation::HWND) -> windows_core::Result<()>; fn ApplyProperties(&self) -> windows_core::Result<()>; @@ -3832,11 +3832,11 @@ impl INetCfgComponentPropertyUi_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryPropertyUi(this: *mut core::ffi::c_void, punkreserved: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentPropertyUi_Impl::QueryPropertyUi(this, windows_core::from_raw_borrowed(&punkreserved)).into() + INetCfgComponentPropertyUi_Impl::QueryPropertyUi(this, core::mem::transmute_copy(&punkreserved)).into() } unsafe extern "system" fn SetContext(this: *mut core::ffi::c_void, punkreserved: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentPropertyUi_Impl::SetContext(this, windows_core::from_raw_borrowed(&punkreserved)).into() + INetCfgComponentPropertyUi_Impl::SetContext(this, core::mem::transmute_copy(&punkreserved)).into() } unsafe extern "system" fn MergePropPages(this: *mut core::ffi::c_void, pdwdefpages: *mut u32, pahpspprivate: *mut *mut u8, pcpages: *mut u32, hwndparent: super::super::Foundation::HWND, pszstartpage: *const windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3959,14 +3959,14 @@ pub struct INetCfgComponentSysPrep_Vtbl { pub RestoreAdapterParameters: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait INetCfgComponentSysPrep_Impl: windows_core::IUnknownImpl { - fn SaveAdapterParameters(&self, pncsp: Option<&INetCfgSysPrep>, pszwanswersections: &windows_core::PCWSTR, padapterinstanceguid: *const windows_core::GUID) -> windows_core::Result<()>; + fn SaveAdapterParameters(&self, pncsp: windows_core::Ref<'_, INetCfgSysPrep>, pszwanswersections: &windows_core::PCWSTR, padapterinstanceguid: *const windows_core::GUID) -> windows_core::Result<()>; fn RestoreAdapterParameters(&self, pszwanswerfile: &windows_core::PCWSTR, pszwanswersection: &windows_core::PCWSTR, padapterinstanceguid: *const windows_core::GUID) -> windows_core::Result<()>; } impl INetCfgComponentSysPrep_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SaveAdapterParameters(this: *mut core::ffi::c_void, pncsp: *mut core::ffi::c_void, pszwanswersections: windows_core::PCWSTR, padapterinstanceguid: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentSysPrep_Impl::SaveAdapterParameters(this, windows_core::from_raw_borrowed(&pncsp), core::mem::transmute(&pszwanswersections), core::mem::transmute_copy(&padapterinstanceguid)).into() + INetCfgComponentSysPrep_Impl::SaveAdapterParameters(this, core::mem::transmute_copy(&pncsp), core::mem::transmute(&pszwanswersections), core::mem::transmute_copy(&padapterinstanceguid)).into() } unsafe extern "system" fn RestoreAdapterParameters(this: *mut core::ffi::c_void, pszwanswerfile: windows_core::PCWSTR, pszwanswersection: windows_core::PCWSTR, padapterinstanceguid: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4013,23 +4013,23 @@ pub struct INetCfgComponentUpperEdge_Vtbl { pub RemoveInterfacesFromAdapter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait INetCfgComponentUpperEdge_Impl: windows_core::IUnknownImpl { - fn GetInterfaceIdsForAdapter(&self, padapter: Option<&INetCfgComponent>, pdwnuminterfaces: *mut u32, ppguidinterfaceids: *mut *mut windows_core::GUID) -> windows_core::Result<()>; - fn AddInterfacesToAdapter(&self, padapter: Option<&INetCfgComponent>, dwnuminterfaces: u32) -> windows_core::Result<()>; - fn RemoveInterfacesFromAdapter(&self, padapter: Option<&INetCfgComponent>, dwnuminterfaces: u32, pguidinterfaceids: *const windows_core::GUID) -> windows_core::Result<()>; + fn GetInterfaceIdsForAdapter(&self, padapter: windows_core::Ref<'_, INetCfgComponent>, pdwnuminterfaces: *mut u32, ppguidinterfaceids: *mut *mut windows_core::GUID) -> windows_core::Result<()>; + fn AddInterfacesToAdapter(&self, padapter: windows_core::Ref<'_, INetCfgComponent>, dwnuminterfaces: u32) -> windows_core::Result<()>; + fn RemoveInterfacesFromAdapter(&self, padapter: windows_core::Ref<'_, INetCfgComponent>, dwnuminterfaces: u32, pguidinterfaceids: *const windows_core::GUID) -> windows_core::Result<()>; } impl INetCfgComponentUpperEdge_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetInterfaceIdsForAdapter(this: *mut core::ffi::c_void, padapter: *mut core::ffi::c_void, pdwnuminterfaces: *mut u32, ppguidinterfaceids: *mut *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentUpperEdge_Impl::GetInterfaceIdsForAdapter(this, windows_core::from_raw_borrowed(&padapter), core::mem::transmute_copy(&pdwnuminterfaces), core::mem::transmute_copy(&ppguidinterfaceids)).into() + INetCfgComponentUpperEdge_Impl::GetInterfaceIdsForAdapter(this, core::mem::transmute_copy(&padapter), core::mem::transmute_copy(&pdwnuminterfaces), core::mem::transmute_copy(&ppguidinterfaceids)).into() } unsafe extern "system" fn AddInterfacesToAdapter(this: *mut core::ffi::c_void, padapter: *mut core::ffi::c_void, dwnuminterfaces: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentUpperEdge_Impl::AddInterfacesToAdapter(this, windows_core::from_raw_borrowed(&padapter), core::mem::transmute_copy(&dwnuminterfaces)).into() + INetCfgComponentUpperEdge_Impl::AddInterfacesToAdapter(this, core::mem::transmute_copy(&padapter), core::mem::transmute_copy(&dwnuminterfaces)).into() } unsafe extern "system" fn RemoveInterfacesFromAdapter(this: *mut core::ffi::c_void, padapter: *mut core::ffi::c_void, dwnuminterfaces: u32, pguidinterfaceids: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetCfgComponentUpperEdge_Impl::RemoveInterfacesFromAdapter(this, windows_core::from_raw_borrowed(&padapter), core::mem::transmute_copy(&dwnuminterfaces), core::mem::transmute_copy(&pguidinterfaceids)).into() + INetCfgComponentUpperEdge_Impl::RemoveInterfacesFromAdapter(this, core::mem::transmute_copy(&padapter), core::mem::transmute_copy(&dwnuminterfaces), core::mem::transmute_copy(&pguidinterfaceids)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs index aa7ece07ad..0870ce85e4 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs @@ -515,7 +515,7 @@ pub struct INetDiagHelperEx_Vtbl { } pub trait INetDiagHelperEx_Impl: windows_core::IUnknownImpl { fn ReconfirmLowHealth(&self, celt: u32, presults: *const HypothesisResult, ppwszupdateddescription: *mut windows_core::PWSTR, pupdatedstatus: *mut DIAGNOSIS_STATUS) -> windows_core::Result<()>; - fn SetUtilities(&self, putilities: Option<&INetDiagHelperUtilFactory>) -> windows_core::Result<()>; + fn SetUtilities(&self, putilities: windows_core::Ref<'_, INetDiagHelperUtilFactory>) -> windows_core::Result<()>; fn ReproduceFailure(&self) -> windows_core::Result<()>; } impl INetDiagHelperEx_Vtbl { @@ -526,7 +526,7 @@ impl INetDiagHelperEx_Vtbl { } unsafe extern "system" fn SetUtilities(this: *mut core::ffi::c_void, putilities: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetDiagHelperEx_Impl::SetUtilities(this, windows_core::from_raw_borrowed(&putilities)).into() + INetDiagHelperEx_Impl::SetUtilities(this, core::mem::transmute_copy(&putilities)).into() } unsafe extern "system" fn ReproduceFailure(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkPolicyServer/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkPolicyServer/mod.rs index 279af85caa..633b3b4687 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkPolicyServer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkPolicyServer/mod.rs @@ -404,8 +404,8 @@ pub struct ISdoCollection_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISdoCollection_Impl: super::super::System::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; - fn Add(&self, bstrname: &windows_core::BSTR, ppitem: *mut Option) -> windows_core::Result<()>; - fn Remove(&self, pitem: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn Add(&self, bstrname: &windows_core::BSTR, ppitem: windows_core::OutRef<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn Remove(&self, pitem: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn RemoveAll(&self) -> windows_core::Result<()>; fn Reload(&self) -> windows_core::Result<()>; fn IsNameUnique(&self, bstrname: &windows_core::BSTR) -> windows_core::Result; @@ -431,7 +431,7 @@ impl ISdoCollection_Vtbl { } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISdoCollection_Impl::Remove(this, windows_core::from_raw_borrowed(&pitem)).into() + ISdoCollection_Impl::Remove(this, core::mem::transmute_copy(&pitem)).into() } unsafe extern "system" fn RemoveAll(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -849,8 +849,8 @@ pub struct ISdoMachine2_Vtbl { pub trait ISdoMachine2_Impl: ISdoMachine_Impl { fn GetTemplatesSDO(&self, bstrservicename: &windows_core::BSTR) -> windows_core::Result; fn EnableTemplates(&self) -> windows_core::Result<()>; - fn SyncConfigAgainstTemplates(&self, bstrservicename: &windows_core::BSTR, ppconfigroot: *mut Option, pptemplatesroot: *mut Option, bforcedsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn ImportRemoteTemplates(&self, plocaltemplatesroot: Option<&windows_core::IUnknown>, bstrremotemachinename: &windows_core::BSTR) -> windows_core::Result<()>; + fn SyncConfigAgainstTemplates(&self, bstrservicename: &windows_core::BSTR, ppconfigroot: windows_core::OutRef<'_, windows_core::IUnknown>, pptemplatesroot: windows_core::OutRef<'_, windows_core::IUnknown>, bforcedsync: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn ImportRemoteTemplates(&self, plocaltemplatesroot: windows_core::Ref<'_, windows_core::IUnknown>, bstrremotemachinename: &windows_core::BSTR) -> windows_core::Result<()>; fn Reload(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -876,7 +876,7 @@ impl ISdoMachine2_Vtbl { } unsafe extern "system" fn ImportRemoteTemplates(this: *mut core::ffi::c_void, plocaltemplatesroot: *mut core::ffi::c_void, bstrremotemachinename: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISdoMachine2_Impl::ImportRemoteTemplates(this, windows_core::from_raw_borrowed(&plocaltemplatesroot), core::mem::transmute(&bstrremotemachinename)).into() + ISdoMachine2_Impl::ImportRemoteTemplates(this, core::mem::transmute_copy(&plocaltemplatesroot), core::mem::transmute(&bstrremotemachinename)).into() } unsafe extern "system" fn Reload(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1021,24 +1021,24 @@ pub struct ITemplateSdo_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITemplateSdo_Impl: ISdo_Impl { - fn AddToCollection(&self, bstrname: &windows_core::BSTR, pcollection: Option<&super::super::System::Com::IDispatch>, ppitem: *mut Option) -> windows_core::Result<()>; - fn AddToSdo(&self, bstrname: &windows_core::BSTR, psdotarget: Option<&super::super::System::Com::IDispatch>, ppitem: *mut Option) -> windows_core::Result<()>; - fn AddToSdoAsProperty(&self, psdotarget: Option<&super::super::System::Com::IDispatch>, id: i32) -> windows_core::Result<()>; + fn AddToCollection(&self, bstrname: &windows_core::BSTR, pcollection: windows_core::Ref<'_, super::super::System::Com::IDispatch>, ppitem: windows_core::OutRef<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn AddToSdo(&self, bstrname: &windows_core::BSTR, psdotarget: windows_core::Ref<'_, super::super::System::Com::IDispatch>, ppitem: windows_core::OutRef<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn AddToSdoAsProperty(&self, psdotarget: windows_core::Ref<'_, super::super::System::Com::IDispatch>, id: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITemplateSdo_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddToCollection(this: *mut core::ffi::c_void, bstrname: *mut core::ffi::c_void, pcollection: *mut core::ffi::c_void, ppitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITemplateSdo_Impl::AddToCollection(this, core::mem::transmute(&bstrname), windows_core::from_raw_borrowed(&pcollection), core::mem::transmute_copy(&ppitem)).into() + ITemplateSdo_Impl::AddToCollection(this, core::mem::transmute(&bstrname), core::mem::transmute_copy(&pcollection), core::mem::transmute_copy(&ppitem)).into() } unsafe extern "system" fn AddToSdo(this: *mut core::ffi::c_void, bstrname: *mut core::ffi::c_void, psdotarget: *mut core::ffi::c_void, ppitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITemplateSdo_Impl::AddToSdo(this, core::mem::transmute(&bstrname), windows_core::from_raw_borrowed(&psdotarget), core::mem::transmute_copy(&ppitem)).into() + ITemplateSdo_Impl::AddToSdo(this, core::mem::transmute(&bstrname), core::mem::transmute_copy(&psdotarget), core::mem::transmute_copy(&ppitem)).into() } unsafe extern "system" fn AddToSdoAsProperty(this: *mut core::ffi::c_void, psdotarget: *mut core::ffi::c_void, id: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITemplateSdo_Impl::AddToSdoAsProperty(this, windows_core::from_raw_borrowed(&psdotarget), core::mem::transmute_copy(&id)).into() + ITemplateSdo_Impl::AddToSdoAsProperty(this, core::mem::transmute_copy(&psdotarget), core::mem::transmute_copy(&id)).into() } Self { base__: ISdo_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs index 5d022e7bf1..2564ea33e7 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs @@ -4869,8 +4869,8 @@ pub struct IDot11AdHocManager_Vtbl { pub GetNetwork: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDot11AdHocManager_Impl: windows_core::IUnknownImpl { - fn CreateNetwork(&self, name: &windows_core::PCWSTR, password: &windows_core::PCWSTR, geographicalid: i32, pinterface: Option<&IDot11AdHocInterface>, psecurity: Option<&IDot11AdHocSecuritySettings>, pcontextguid: *const windows_core::GUID) -> windows_core::Result; - fn CommitCreatedNetwork(&self, piadhoc: Option<&IDot11AdHocNetwork>, fsaveprofile: bool, fmakesavedprofileuserspecific: bool) -> windows_core::Result<()>; + fn CreateNetwork(&self, name: &windows_core::PCWSTR, password: &windows_core::PCWSTR, geographicalid: i32, pinterface: windows_core::Ref<'_, IDot11AdHocInterface>, psecurity: windows_core::Ref<'_, IDot11AdHocSecuritySettings>, pcontextguid: *const windows_core::GUID) -> windows_core::Result; + fn CommitCreatedNetwork(&self, piadhoc: windows_core::Ref<'_, IDot11AdHocNetwork>, fsaveprofile: bool, fmakesavedprofileuserspecific: bool) -> windows_core::Result<()>; fn GetIEnumDot11AdHocNetworks(&self, pcontextguid: *const windows_core::GUID) -> windows_core::Result; fn GetIEnumDot11AdHocInterfaces(&self) -> windows_core::Result; fn GetNetwork(&self, networksignature: *const windows_core::GUID) -> windows_core::Result; @@ -4879,7 +4879,7 @@ impl IDot11AdHocManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateNetwork(this: *mut core::ffi::c_void, name: windows_core::PCWSTR, password: windows_core::PCWSTR, geographicalid: i32, pinterface: *mut core::ffi::c_void, psecurity: *mut core::ffi::c_void, pcontextguid: *const windows_core::GUID, piadhoc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDot11AdHocManager_Impl::CreateNetwork(this, core::mem::transmute(&name), core::mem::transmute(&password), core::mem::transmute_copy(&geographicalid), windows_core::from_raw_borrowed(&pinterface), windows_core::from_raw_borrowed(&psecurity), core::mem::transmute_copy(&pcontextguid)) { + match IDot11AdHocManager_Impl::CreateNetwork(this, core::mem::transmute(&name), core::mem::transmute(&password), core::mem::transmute_copy(&geographicalid), core::mem::transmute_copy(&pinterface), core::mem::transmute_copy(&psecurity), core::mem::transmute_copy(&pcontextguid)) { Ok(ok__) => { piadhoc.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4889,7 +4889,7 @@ impl IDot11AdHocManager_Vtbl { } unsafe extern "system" fn CommitCreatedNetwork(this: *mut core::ffi::c_void, piadhoc: *mut core::ffi::c_void, fsaveprofile: bool, fmakesavedprofileuserspecific: bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDot11AdHocManager_Impl::CommitCreatedNetwork(this, windows_core::from_raw_borrowed(&piadhoc), core::mem::transmute_copy(&fsaveprofile), core::mem::transmute_copy(&fmakesavedprofileuserspecific)).into() + IDot11AdHocManager_Impl::CommitCreatedNetwork(this, core::mem::transmute_copy(&piadhoc), core::mem::transmute_copy(&fsaveprofile), core::mem::transmute_copy(&fmakesavedprofileuserspecific)).into() } unsafe extern "system" fn GetIEnumDot11AdHocNetworks(this: *mut core::ffi::c_void, pcontextguid: *const windows_core::GUID, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4966,16 +4966,16 @@ pub struct IDot11AdHocManagerNotificationSink_Vtbl { pub OnInterfaceRemove: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait IDot11AdHocManagerNotificationSink_Impl: windows_core::IUnknownImpl { - fn OnNetworkAdd(&self, piadhocnetwork: Option<&IDot11AdHocNetwork>) -> windows_core::Result<()>; + fn OnNetworkAdd(&self, piadhocnetwork: windows_core::Ref<'_, IDot11AdHocNetwork>) -> windows_core::Result<()>; fn OnNetworkRemove(&self, signature: *const windows_core::GUID) -> windows_core::Result<()>; - fn OnInterfaceAdd(&self, piadhocinterface: Option<&IDot11AdHocInterface>) -> windows_core::Result<()>; + fn OnInterfaceAdd(&self, piadhocinterface: windows_core::Ref<'_, IDot11AdHocInterface>) -> windows_core::Result<()>; fn OnInterfaceRemove(&self, signature: *const windows_core::GUID) -> windows_core::Result<()>; } impl IDot11AdHocManagerNotificationSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnNetworkAdd(this: *mut core::ffi::c_void, piadhocnetwork: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDot11AdHocManagerNotificationSink_Impl::OnNetworkAdd(this, windows_core::from_raw_borrowed(&piadhocnetwork)).into() + IDot11AdHocManagerNotificationSink_Impl::OnNetworkAdd(this, core::mem::transmute_copy(&piadhocnetwork)).into() } unsafe extern "system" fn OnNetworkRemove(this: *mut core::ffi::c_void, signature: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4983,7 +4983,7 @@ impl IDot11AdHocManagerNotificationSink_Vtbl { } unsafe extern "system" fn OnInterfaceAdd(this: *mut core::ffi::c_void, piadhocinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDot11AdHocManagerNotificationSink_Impl::OnInterfaceAdd(this, windows_core::from_raw_borrowed(&piadhocinterface)).into() + IDot11AdHocManagerNotificationSink_Impl::OnInterfaceAdd(this, core::mem::transmute_copy(&piadhocinterface)).into() } unsafe extern "system" fn OnInterfaceRemove(this: *mut core::ffi::c_void, signature: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5282,7 +5282,7 @@ pub struct IEnumDot11AdHocInterfaces_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumDot11AdHocInterfaces_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IDot11AdHocInterface>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -5350,7 +5350,7 @@ pub struct IEnumDot11AdHocNetworks_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumDot11AdHocNetworks_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IDot11AdHocNetwork>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -5418,7 +5418,7 @@ pub struct IEnumDot11AdHocSecuritySettings_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumDot11AdHocSecuritySettings_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IDot11AdHocSecuritySettings>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs index 996da0aa20..1fdd7f9626 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs @@ -111,7 +111,7 @@ pub struct IWCNDevice_Vtbl { } pub trait IWCNDevice_Impl: windows_core::IUnknownImpl { fn SetPassword(&self, r#type: WCN_PASSWORD_TYPE, dwpasswordlength: u32, pbpassword: *const u8) -> windows_core::Result<()>; - fn Connect(&self, pnotify: Option<&IWCNConnectNotify>) -> windows_core::Result<()>; + fn Connect(&self, pnotify: windows_core::Ref<'_, IWCNConnectNotify>) -> windows_core::Result<()>; fn GetAttribute(&self, attributetype: WCN_ATTRIBUTE_TYPE, dwmaxbuffersize: u32, pbbuffer: *mut u8, pdwbufferused: *mut u32) -> windows_core::Result<()>; fn GetIntegerAttribute(&self, attributetype: WCN_ATTRIBUTE_TYPE) -> windows_core::Result; fn GetStringAttribute(&self, attributetype: WCN_ATTRIBUTE_TYPE, cchmaxstring: u32, wszstring: windows_core::PWSTR) -> windows_core::Result<()>; @@ -130,7 +130,7 @@ impl IWCNDevice_Vtbl { } unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, pnotify: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWCNDevice_Impl::Connect(this, windows_core::from_raw_borrowed(&pnotify)).into() + IWCNDevice_Impl::Connect(this, core::mem::transmute_copy(&pnotify)).into() } unsafe extern "system" fn GetAttribute(this: *mut core::ffi::c_void, attributetype: WCN_ATTRIBUTE_TYPE, dwmaxbuffersize: u32, pbbuffer: *mut u8, pdwbufferused: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs index ec3eecaaf1..c8769c3337 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs @@ -586,7 +586,7 @@ pub struct IEnumNetConnection_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumNetConnection_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, INetConnection>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -963,19 +963,19 @@ pub struct INATEventManager_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait INATEventManager_Impl: super::super::System::Com::IDispatch_Impl { - fn SetExternalIPAddressCallback(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn SetNumberOfEntriesCallback(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetExternalIPAddressCallback(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetNumberOfEntriesCallback(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl INATEventManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetExternalIPAddressCallback(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INATEventManager_Impl::SetExternalIPAddressCallback(this, windows_core::from_raw_borrowed(&punk)).into() + INATEventManager_Impl::SetExternalIPAddressCallback(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn SetNumberOfEntriesCallback(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INATEventManager_Impl::SetNumberOfEntriesCallback(this, windows_core::from_raw_borrowed(&punk)).into() + INATEventManager_Impl::SetNumberOfEntriesCallback(this, core::mem::transmute_copy(&punk)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -1275,7 +1275,7 @@ pub struct INetConnectionConnectUi_Vtbl { pub Disconnect: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HWND, u32) -> windows_core::HRESULT, } pub trait INetConnectionConnectUi_Impl: windows_core::IUnknownImpl { - fn SetConnection(&self, pcon: Option<&INetConnection>) -> windows_core::Result<()>; + fn SetConnection(&self, pcon: windows_core::Ref<'_, INetConnection>) -> windows_core::Result<()>; fn Connect(&self, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()>; fn Disconnect(&self, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()>; } @@ -1283,7 +1283,7 @@ impl INetConnectionConnectUi_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetConnection(this: *mut core::ffi::c_void, pcon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetConnectionConnectUi_Impl::SetConnection(this, windows_core::from_raw_borrowed(&pcon)).into() + INetConnectionConnectUi_Impl::SetConnection(this, core::mem::transmute_copy(&pcon)).into() } unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1722,7 +1722,7 @@ pub struct INetFwAuthorizedApplications_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait INetFwAuthorizedApplications_Impl: super::super::System::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; - fn Add(&self, app: Option<&INetFwAuthorizedApplication>) -> windows_core::Result<()>; + fn Add(&self, app: windows_core::Ref<'_, INetFwAuthorizedApplication>) -> windows_core::Result<()>; fn Remove(&self, imagefilename: &windows_core::BSTR) -> windows_core::Result<()>; fn Item(&self, imagefilename: &windows_core::BSTR) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; @@ -1742,7 +1742,7 @@ impl INetFwAuthorizedApplications_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, app: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetFwAuthorizedApplications_Impl::Add(this, windows_core::from_raw_borrowed(&app)).into() + INetFwAuthorizedApplications_Impl::Add(this, core::mem::transmute_copy(&app)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, imagefilename: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2484,7 +2484,7 @@ pub struct INetFwOpenPorts_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait INetFwOpenPorts_Impl: super::super::System::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; - fn Add(&self, port: Option<&INetFwOpenPort>) -> windows_core::Result<()>; + fn Add(&self, port: windows_core::Ref<'_, INetFwOpenPort>) -> windows_core::Result<()>; fn Remove(&self, portnumber: i32, ipprotocol: NET_FW_IP_PROTOCOL) -> windows_core::Result<()>; fn Item(&self, portnumber: i32, ipprotocol: NET_FW_IP_PROTOCOL) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; @@ -2504,7 +2504,7 @@ impl INetFwOpenPorts_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, port: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetFwOpenPorts_Impl::Add(this, windows_core::from_raw_borrowed(&port)).into() + INetFwOpenPorts_Impl::Add(this, core::mem::transmute_copy(&port)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, portnumber: i32, ipprotocol: NET_FW_IP_PROTOCOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3127,7 +3127,7 @@ pub struct INetFwProducts_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait INetFwProducts_Impl: super::super::System::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; - fn Register(&self, product: Option<&INetFwProduct>) -> windows_core::Result; + fn Register(&self, product: windows_core::Ref<'_, INetFwProduct>) -> windows_core::Result; fn Item(&self, index: i32) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; } @@ -3146,7 +3146,7 @@ impl INetFwProducts_Vtbl { } unsafe extern "system" fn Register(this: *mut core::ffi::c_void, product: *mut core::ffi::c_void, registration: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INetFwProducts_Impl::Register(this, windows_core::from_raw_borrowed(&product)) { + match INetFwProducts_Impl::Register(this, core::mem::transmute_copy(&product)) { Ok(ok__) => { registration.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4412,7 +4412,7 @@ pub struct INetFwRules_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait INetFwRules_Impl: super::super::System::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; - fn Add(&self, rule: Option<&INetFwRule>) -> windows_core::Result<()>; + fn Add(&self, rule: windows_core::Ref<'_, INetFwRule>) -> windows_core::Result<()>; fn Remove(&self, name: &windows_core::BSTR) -> windows_core::Result<()>; fn Item(&self, name: &windows_core::BSTR) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; @@ -4432,7 +4432,7 @@ impl INetFwRules_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, rule: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetFwRules_Impl::Add(this, windows_core::from_raw_borrowed(&rule)).into() + INetFwRules_Impl::Add(this, core::mem::transmute_copy(&rule)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4927,7 +4927,7 @@ pub trait INetSharingConfiguration_Impl: super::super::System::Com::IDispatch_Im fn EnableInternetFirewall(&self) -> windows_core::Result<()>; fn get_EnumPortMappings(&self, flags: SHARINGCONNECTION_ENUM_FLAGS) -> windows_core::Result; fn AddPortMapping(&self, bstrname: &windows_core::BSTR, ucipprotocol: u8, usexternalport: u16, usinternalport: u16, dwoptions: u32, bstrtargetnameoripaddress: &windows_core::BSTR, etargettype: ICS_TARGETTYPE) -> windows_core::Result; - fn RemovePortMapping(&self, pmapping: Option<&INetSharingPortMapping>) -> windows_core::Result<()>; + fn RemovePortMapping(&self, pmapping: windows_core::Ref<'_, INetSharingPortMapping>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl INetSharingConfiguration_Vtbl { @@ -5000,7 +5000,7 @@ impl INetSharingConfiguration_Vtbl { } unsafe extern "system" fn RemovePortMapping(this: *mut core::ffi::c_void, pmapping: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INetSharingConfiguration_Impl::RemovePortMapping(this, windows_core::from_raw_borrowed(&pmapping)).into() + INetSharingConfiguration_Impl::RemovePortMapping(this, core::mem::transmute_copy(&pmapping)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -5151,9 +5151,9 @@ pub trait INetSharingManager_Impl: super::super::System::Com::IDispatch_Impl { fn SharingInstalled(&self) -> windows_core::Result; fn get_EnumPublicConnections(&self, flags: SHARINGCONNECTION_ENUM_FLAGS) -> windows_core::Result; fn get_EnumPrivateConnections(&self, flags: SHARINGCONNECTION_ENUM_FLAGS) -> windows_core::Result; - fn get_INetSharingConfigurationForINetConnection(&self, pnetconnection: Option<&INetConnection>) -> windows_core::Result; + fn get_INetSharingConfigurationForINetConnection(&self, pnetconnection: windows_core::Ref<'_, INetConnection>) -> windows_core::Result; fn EnumEveryConnection(&self) -> windows_core::Result; - fn get_NetConnectionProps(&self, pnetconnection: Option<&INetConnection>) -> windows_core::Result; + fn get_NetConnectionProps(&self, pnetconnection: windows_core::Ref<'_, INetConnection>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl INetSharingManager_Vtbl { @@ -5190,7 +5190,7 @@ impl INetSharingManager_Vtbl { } unsafe extern "system" fn get_INetSharingConfigurationForINetConnection(this: *mut core::ffi::c_void, pnetconnection: *mut core::ffi::c_void, ppnetsharingconfiguration: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INetSharingManager_Impl::get_INetSharingConfigurationForINetConnection(this, windows_core::from_raw_borrowed(&pnetconnection)) { + match INetSharingManager_Impl::get_INetSharingConfigurationForINetConnection(this, core::mem::transmute_copy(&pnetconnection)) { Ok(ok__) => { ppnetsharingconfiguration.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5210,7 +5210,7 @@ impl INetSharingManager_Vtbl { } unsafe extern "system" fn get_NetConnectionProps(this: *mut core::ffi::c_void, pnetconnection: *mut core::ffi::c_void, ppprops: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INetSharingManager_Impl::get_NetConnectionProps(this, windows_core::from_raw_borrowed(&pnetconnection)) { + match INetSharingManager_Impl::get_NetConnectionProps(this, core::mem::transmute_copy(&pnetconnection)) { Ok(ok__) => { ppprops.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs index 6ae7b1583d..68e8b2ec8b 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs @@ -4571,8 +4571,8 @@ pub trait IADsAccessControlList_Impl: super::super::System::Com::IDispatch_Impl fn SetAclRevision(&self, lnaclrevision: i32) -> windows_core::Result<()>; fn AceCount(&self) -> windows_core::Result; fn SetAceCount(&self, lnacecount: i32) -> windows_core::Result<()>; - fn AddAce(&self, paccesscontrolentry: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; - fn RemoveAce(&self, paccesscontrolentry: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn AddAce(&self, paccesscontrolentry: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn RemoveAce(&self, paccesscontrolentry: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn CopyAccessList(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; } @@ -4609,11 +4609,11 @@ impl IADsAccessControlList_Vtbl { } unsafe extern "system" fn AddAce(this: *mut core::ffi::c_void, paccesscontrolentry: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IADsAccessControlList_Impl::AddAce(this, windows_core::from_raw_borrowed(&paccesscontrolentry)).into() + IADsAccessControlList_Impl::AddAce(this, core::mem::transmute_copy(&paccesscontrolentry)).into() } unsafe extern "system" fn RemoveAce(this: *mut core::ffi::c_void, paccesscontrolentry: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IADsAccessControlList_Impl::RemoveAce(this, windows_core::from_raw_borrowed(&paccesscontrolentry)).into() + IADsAccessControlList_Impl::RemoveAce(this, core::mem::transmute_copy(&paccesscontrolentry)).into() } unsafe extern "system" fn CopyAccessList(this: *mut core::ffi::c_void, ppaccesscontrollist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4814,7 +4814,7 @@ pub struct IADsAggregatee_Vtbl { pub RestoreInterface: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait IADsAggregatee_Impl: windows_core::IUnknownImpl { - fn ConnectAsAggregatee(&self, pouterunknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ConnectAsAggregatee(&self, pouterunknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn DisconnectAsAggregatee(&self) -> windows_core::Result<()>; fn RelinquishInterface(&self, riid: *const windows_core::GUID) -> windows_core::Result<()>; fn RestoreInterface(&self, riid: *const windows_core::GUID) -> windows_core::Result<()>; @@ -4823,7 +4823,7 @@ impl IADsAggregatee_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConnectAsAggregatee(this: *mut core::ffi::c_void, pouterunknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IADsAggregatee_Impl::ConnectAsAggregatee(this, windows_core::from_raw_borrowed(&pouterunknown)).into() + IADsAggregatee_Impl::ConnectAsAggregatee(this, core::mem::transmute_copy(&pouterunknown)).into() } unsafe extern "system" fn DisconnectAsAggregatee(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4870,14 +4870,14 @@ pub struct IADsAggregator_Vtbl { pub DisconnectAsAggregator: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IADsAggregator_Impl: windows_core::IUnknownImpl { - fn ConnectAsAggregator(&self, paggregatee: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ConnectAsAggregator(&self, paggregatee: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn DisconnectAsAggregator(&self) -> windows_core::Result<()>; } impl IADsAggregator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConnectAsAggregator(this: *mut core::ffi::c_void, paggregatee: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IADsAggregator_Impl::ConnectAsAggregator(this, windows_core::from_raw_borrowed(&paggregatee)).into() + IADsAggregator_Impl::ConnectAsAggregator(this, core::mem::transmute_copy(&paggregatee)).into() } unsafe extern "system" fn DisconnectAsAggregator(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10923,9 +10923,9 @@ pub trait IADsPropertyValue_Impl: super::super::System::Com::IDispatch_Impl { fn OctetString(&self) -> windows_core::Result; fn SetOctetString(&self, voctetstring: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn SecurityDescriptor(&self) -> windows_core::Result; - fn SetSecurityDescriptor(&self, psecuritydescriptor: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetSecurityDescriptor(&self, psecuritydescriptor: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn LargeInteger(&self) -> windows_core::Result; - fn SetLargeInteger(&self, plargeinteger: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetLargeInteger(&self, plargeinteger: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn UTCTime(&self) -> windows_core::Result; fn SetUTCTime(&self, dautctime: f64) -> windows_core::Result<()>; } @@ -11074,7 +11074,7 @@ impl IADsPropertyValue_Vtbl { } unsafe extern "system" fn SetSecurityDescriptor(this: *mut core::ffi::c_void, psecuritydescriptor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IADsPropertyValue_Impl::SetSecurityDescriptor(this, windows_core::from_raw_borrowed(&psecuritydescriptor)).into() + IADsPropertyValue_Impl::SetSecurityDescriptor(this, core::mem::transmute_copy(&psecuritydescriptor)).into() } unsafe extern "system" fn LargeInteger(this: *mut core::ffi::c_void, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11088,7 +11088,7 @@ impl IADsPropertyValue_Vtbl { } unsafe extern "system" fn SetLargeInteger(this: *mut core::ffi::c_void, plargeinteger: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IADsPropertyValue_Impl::SetLargeInteger(this, windows_core::from_raw_borrowed(&plargeinteger)).into() + IADsPropertyValue_Impl::SetLargeInteger(this, core::mem::transmute_copy(&plargeinteger)).into() } unsafe extern "system" fn UTCTime(this: *mut core::ffi::c_void, retval: *mut f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11618,11 +11618,11 @@ pub trait IADsSecurityDescriptor_Impl: super::super::System::Com::IDispatch_Impl fn GroupDefaulted(&self) -> windows_core::Result; fn SetGroupDefaulted(&self, fgroupdefaulted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn DiscretionaryAcl(&self) -> windows_core::Result; - fn SetDiscretionaryAcl(&self, pdiscretionaryacl: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetDiscretionaryAcl(&self, pdiscretionaryacl: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn DaclDefaulted(&self) -> windows_core::Result; fn SetDaclDefaulted(&self, fdacldefaulted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SystemAcl(&self) -> windows_core::Result; - fn SetSystemAcl(&self, psystemacl: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetSystemAcl(&self, psystemacl: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn SaclDefaulted(&self) -> windows_core::Result; fn SetSaclDefaulted(&self, fsacldefaulted: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn CopySecurityDescriptor(&self) -> windows_core::Result; @@ -11726,7 +11726,7 @@ impl IADsSecurityDescriptor_Vtbl { } unsafe extern "system" fn SetDiscretionaryAcl(this: *mut core::ffi::c_void, pdiscretionaryacl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IADsSecurityDescriptor_Impl::SetDiscretionaryAcl(this, windows_core::from_raw_borrowed(&pdiscretionaryacl)).into() + IADsSecurityDescriptor_Impl::SetDiscretionaryAcl(this, core::mem::transmute_copy(&pdiscretionaryacl)).into() } unsafe extern "system" fn DaclDefaulted(this: *mut core::ffi::c_void, retval: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11754,7 +11754,7 @@ impl IADsSecurityDescriptor_Vtbl { } unsafe extern "system" fn SetSystemAcl(this: *mut core::ffi::c_void, psystemacl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IADsSecurityDescriptor_Impl::SetSystemAcl(this, windows_core::from_raw_borrowed(&psystemacl)).into() + IADsSecurityDescriptor_Impl::SetSystemAcl(this, core::mem::transmute_copy(&psystemacl)).into() } unsafe extern "system" fn SaclDefaulted(this: *mut core::ffi::c_void, retval: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14308,7 +14308,7 @@ pub struct ICommonQuery_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait ICommonQuery_Impl: windows_core::IUnknownImpl { - fn OpenQueryWindow(&self, hwndparent: super::super::Foundation::HWND, pquerywnd: *mut OPENQUERYWINDOW, ppdataobject: *mut Option) -> windows_core::Result<()>; + fn OpenQueryWindow(&self, hwndparent: super::super::Foundation::HWND, pquerywnd: *mut OPENQUERYWINDOW, ppdataobject: windows_core::OutRef<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ICommonQuery_Vtbl { @@ -14715,7 +14715,7 @@ pub struct IDsAdminCreateObj_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IDsAdminCreateObj_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, padscontainerobj: Option<&IADsContainer>, padscopysource: Option<&IADs>, lpszclassname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn Initialize(&self, padscontainerobj: windows_core::Ref<'_, IADsContainer>, padscopysource: windows_core::Ref<'_, IADs>, lpszclassname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn CreateModal(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -14723,7 +14723,7 @@ impl IDsAdminCreateObj_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, padscontainerobj: *mut core::ffi::c_void, padscopysource: *mut core::ffi::c_void, lpszclassname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDsAdminCreateObj_Impl::Initialize(this, windows_core::from_raw_borrowed(&padscontainerobj), windows_core::from_raw_borrowed(&padscopysource), core::mem::transmute(&lpszclassname)).into() + IDsAdminCreateObj_Impl::Initialize(this, core::mem::transmute_copy(&padscontainerobj), core::mem::transmute_copy(&padscopysource), core::mem::transmute(&lpszclassname)).into() } unsafe extern "system" fn CreateModal(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, ppadsobj: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14843,9 +14843,9 @@ pub struct IDsAdminNewObjExt_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IDsAdminNewObjExt_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, padscontainerobj: Option<&IADsContainer>, padscopysource: Option<&IADs>, lpszclassname: &windows_core::PCWSTR, pdsadminnewobj: Option<&IDsAdminNewObj>, pdispinfo: *mut DSA_NEWOBJ_DISPINFO) -> windows_core::Result<()>; + fn Initialize(&self, padscontainerobj: windows_core::Ref<'_, IADsContainer>, padscopysource: windows_core::Ref<'_, IADs>, lpszclassname: &windows_core::PCWSTR, pdsadminnewobj: windows_core::Ref<'_, IDsAdminNewObj>, pdispinfo: *mut DSA_NEWOBJ_DISPINFO) -> windows_core::Result<()>; fn AddPages(&self, lpfnaddpage: super::super::UI::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; - fn SetObject(&self, padsobj: Option<&IADs>) -> windows_core::Result<()>; + fn SetObject(&self, padsobj: windows_core::Ref<'_, IADs>) -> windows_core::Result<()>; fn WriteData(&self, hwnd: super::super::Foundation::HWND, ucontext: u32) -> windows_core::Result<()>; fn OnError(&self, hwnd: super::super::Foundation::HWND, hr: windows_core::HRESULT, ucontext: u32) -> windows_core::Result<()>; fn GetSummaryInfo(&self, pbstrtext: *mut windows_core::BSTR) -> windows_core::Result<()>; @@ -14855,7 +14855,7 @@ impl IDsAdminNewObjExt_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, padscontainerobj: *mut core::ffi::c_void, padscopysource: *mut core::ffi::c_void, lpszclassname: windows_core::PCWSTR, pdsadminnewobj: *mut core::ffi::c_void, pdispinfo: *mut DSA_NEWOBJ_DISPINFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDsAdminNewObjExt_Impl::Initialize(this, windows_core::from_raw_borrowed(&padscontainerobj), windows_core::from_raw_borrowed(&padscopysource), core::mem::transmute(&lpszclassname), windows_core::from_raw_borrowed(&pdsadminnewobj), core::mem::transmute_copy(&pdispinfo)).into() + IDsAdminNewObjExt_Impl::Initialize(this, core::mem::transmute_copy(&padscontainerobj), core::mem::transmute_copy(&padscopysource), core::mem::transmute(&lpszclassname), core::mem::transmute_copy(&pdsadminnewobj), core::mem::transmute_copy(&pdispinfo)).into() } unsafe extern "system" fn AddPages(this: *mut core::ffi::c_void, lpfnaddpage: super::super::UI::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14863,7 +14863,7 @@ impl IDsAdminNewObjExt_Vtbl { } unsafe extern "system" fn SetObject(this: *mut core::ffi::c_void, padsobj: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDsAdminNewObjExt_Impl::SetObject(this, windows_core::from_raw_borrowed(&padsobj)).into() + IDsAdminNewObjExt_Impl::SetObject(this, core::mem::transmute_copy(&padsobj)).into() } unsafe extern "system" fn WriteData(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, ucontext: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14974,8 +14974,8 @@ pub struct IDsAdminNotifyHandler_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IDsAdminNotifyHandler_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pextrainfo: Option<&super::super::System::Com::IDataObject>, pueventflags: *mut u32) -> windows_core::Result<()>; - fn Begin(&self, uevent: u32, parg1: Option<&super::super::System::Com::IDataObject>, parg2: Option<&super::super::System::Com::IDataObject>, puflags: *mut u32, pbstr: *mut windows_core::BSTR) -> windows_core::Result<()>; + fn Initialize(&self, pextrainfo: windows_core::Ref<'_, super::super::System::Com::IDataObject>, pueventflags: *mut u32) -> windows_core::Result<()>; + fn Begin(&self, uevent: u32, parg1: windows_core::Ref<'_, super::super::System::Com::IDataObject>, parg2: windows_core::Ref<'_, super::super::System::Com::IDataObject>, puflags: *mut u32, pbstr: *mut windows_core::BSTR) -> windows_core::Result<()>; fn Notify(&self, nitem: u32, uflags: u32) -> windows_core::Result<()>; fn End(&self) -> windows_core::Result<()>; } @@ -14984,11 +14984,11 @@ impl IDsAdminNotifyHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pextrainfo: *mut core::ffi::c_void, pueventflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDsAdminNotifyHandler_Impl::Initialize(this, windows_core::from_raw_borrowed(&pextrainfo), core::mem::transmute_copy(&pueventflags)).into() + IDsAdminNotifyHandler_Impl::Initialize(this, core::mem::transmute_copy(&pextrainfo), core::mem::transmute_copy(&pueventflags)).into() } unsafe extern "system" fn Begin(this: *mut core::ffi::c_void, uevent: u32, parg1: *mut core::ffi::c_void, parg2: *mut core::ffi::c_void, puflags: *mut u32, pbstr: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDsAdminNotifyHandler_Impl::Begin(this, core::mem::transmute_copy(&uevent), windows_core::from_raw_borrowed(&parg1), windows_core::from_raw_borrowed(&parg2), core::mem::transmute_copy(&puflags), core::mem::transmute_copy(&pbstr)).into() + IDsAdminNotifyHandler_Impl::Begin(this, core::mem::transmute_copy(&uevent), core::mem::transmute_copy(&parg1), core::mem::transmute_copy(&parg2), core::mem::transmute_copy(&puflags), core::mem::transmute_copy(&pbstr)).into() } unsafe extern "system" fn Notify(this: *mut core::ffi::c_void, nitem: u32, uflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs index fdba7bfe7f..ff6afb28dc 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs @@ -41,18 +41,18 @@ pub struct AsyncIBackgroundCopyCallback_Vtbl { pub Finish_JobModification: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait AsyncIBackgroundCopyCallback_Impl: windows_core::IUnknownImpl { - fn Begin_JobTransferred(&self, pjob: Option<&IBackgroundCopyJob>) -> windows_core::Result<()>; + fn Begin_JobTransferred(&self, pjob: windows_core::Ref<'_, IBackgroundCopyJob>) -> windows_core::Result<()>; fn Finish_JobTransferred(&self) -> windows_core::Result<()>; - fn Begin_JobError(&self, pjob: Option<&IBackgroundCopyJob>, perror: Option<&IBackgroundCopyError>) -> windows_core::Result<()>; + fn Begin_JobError(&self, pjob: windows_core::Ref<'_, IBackgroundCopyJob>, perror: windows_core::Ref<'_, IBackgroundCopyError>) -> windows_core::Result<()>; fn Finish_JobError(&self) -> windows_core::Result<()>; - fn Begin_JobModification(&self, pjob: Option<&IBackgroundCopyJob>, dwreserved: u32) -> windows_core::Result<()>; + fn Begin_JobModification(&self, pjob: windows_core::Ref<'_, IBackgroundCopyJob>, dwreserved: u32) -> windows_core::Result<()>; fn Finish_JobModification(&self) -> windows_core::Result<()>; } impl AsyncIBackgroundCopyCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Begin_JobTransferred(this: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIBackgroundCopyCallback_Impl::Begin_JobTransferred(this, windows_core::from_raw_borrowed(&pjob)).into() + AsyncIBackgroundCopyCallback_Impl::Begin_JobTransferred(this, core::mem::transmute_copy(&pjob)).into() } unsafe extern "system" fn Finish_JobTransferred(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -60,7 +60,7 @@ impl AsyncIBackgroundCopyCallback_Vtbl { } unsafe extern "system" fn Begin_JobError(this: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void, perror: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIBackgroundCopyCallback_Impl::Begin_JobError(this, windows_core::from_raw_borrowed(&pjob), windows_core::from_raw_borrowed(&perror)).into() + AsyncIBackgroundCopyCallback_Impl::Begin_JobError(this, core::mem::transmute_copy(&pjob), core::mem::transmute_copy(&perror)).into() } unsafe extern "system" fn Finish_JobError(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -68,7 +68,7 @@ impl AsyncIBackgroundCopyCallback_Vtbl { } unsafe extern "system" fn Begin_JobModification(this: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void, dwreserved: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIBackgroundCopyCallback_Impl::Begin_JobModification(this, windows_core::from_raw_borrowed(&pjob), core::mem::transmute_copy(&dwreserved)).into() + AsyncIBackgroundCopyCallback_Impl::Begin_JobModification(this, core::mem::transmute_copy(&pjob), core::mem::transmute_copy(&dwreserved)).into() } unsafe extern "system" fn Finish_JobModification(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -703,23 +703,23 @@ pub struct IBackgroundCopyCallback_Vtbl { pub JobModification: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IBackgroundCopyCallback_Impl: windows_core::IUnknownImpl { - fn JobTransferred(&self, pjob: Option<&IBackgroundCopyJob>) -> windows_core::Result<()>; - fn JobError(&self, pjob: Option<&IBackgroundCopyJob>, perror: Option<&IBackgroundCopyError>) -> windows_core::Result<()>; - fn JobModification(&self, pjob: Option<&IBackgroundCopyJob>, dwreserved: u32) -> windows_core::Result<()>; + fn JobTransferred(&self, pjob: windows_core::Ref<'_, IBackgroundCopyJob>) -> windows_core::Result<()>; + fn JobError(&self, pjob: windows_core::Ref<'_, IBackgroundCopyJob>, perror: windows_core::Ref<'_, IBackgroundCopyError>) -> windows_core::Result<()>; + fn JobModification(&self, pjob: windows_core::Ref<'_, IBackgroundCopyJob>, dwreserved: u32) -> windows_core::Result<()>; } impl IBackgroundCopyCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn JobTransferred(this: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyCallback_Impl::JobTransferred(this, windows_core::from_raw_borrowed(&pjob)).into() + IBackgroundCopyCallback_Impl::JobTransferred(this, core::mem::transmute_copy(&pjob)).into() } unsafe extern "system" fn JobError(this: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void, perror: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyCallback_Impl::JobError(this, windows_core::from_raw_borrowed(&pjob), windows_core::from_raw_borrowed(&perror)).into() + IBackgroundCopyCallback_Impl::JobError(this, core::mem::transmute_copy(&pjob), core::mem::transmute_copy(&perror)).into() } unsafe extern "system" fn JobModification(this: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void, dwreserved: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyCallback_Impl::JobModification(this, windows_core::from_raw_borrowed(&pjob), core::mem::transmute_copy(&dwreserved)).into() + IBackgroundCopyCallback_Impl::JobModification(this, core::mem::transmute_copy(&pjob), core::mem::transmute_copy(&dwreserved)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -766,23 +766,23 @@ pub struct IBackgroundCopyCallback1_Vtbl { pub OnProgressEx: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32, u32, *const u8) -> windows_core::HRESULT, } pub trait IBackgroundCopyCallback1_Impl: windows_core::IUnknownImpl { - fn OnStatus(&self, pgroup: Option<&IBackgroundCopyGroup>, pjob: Option<&IBackgroundCopyJob1>, dwfileindex: u32, dwstatus: u32, dwnumofretries: u32, dwwin32result: u32, dwtransportresult: u32) -> windows_core::Result<()>; - fn OnProgress(&self, progresstype: u32, pgroup: Option<&IBackgroundCopyGroup>, pjob: Option<&IBackgroundCopyJob1>, dwfileindex: u32, dwprogressvalue: u32) -> windows_core::Result<()>; - fn OnProgressEx(&self, progresstype: u32, pgroup: Option<&IBackgroundCopyGroup>, pjob: Option<&IBackgroundCopyJob1>, dwfileindex: u32, dwprogressvalue: u32, dwbytearraysize: u32, pbyte: *const u8) -> windows_core::Result<()>; + fn OnStatus(&self, pgroup: windows_core::Ref<'_, IBackgroundCopyGroup>, pjob: windows_core::Ref<'_, IBackgroundCopyJob1>, dwfileindex: u32, dwstatus: u32, dwnumofretries: u32, dwwin32result: u32, dwtransportresult: u32) -> windows_core::Result<()>; + fn OnProgress(&self, progresstype: u32, pgroup: windows_core::Ref<'_, IBackgroundCopyGroup>, pjob: windows_core::Ref<'_, IBackgroundCopyJob1>, dwfileindex: u32, dwprogressvalue: u32) -> windows_core::Result<()>; + fn OnProgressEx(&self, progresstype: u32, pgroup: windows_core::Ref<'_, IBackgroundCopyGroup>, pjob: windows_core::Ref<'_, IBackgroundCopyJob1>, dwfileindex: u32, dwprogressvalue: u32, dwbytearraysize: u32, pbyte: *const u8) -> windows_core::Result<()>; } impl IBackgroundCopyCallback1_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnStatus(this: *mut core::ffi::c_void, pgroup: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void, dwfileindex: u32, dwstatus: u32, dwnumofretries: u32, dwwin32result: u32, dwtransportresult: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyCallback1_Impl::OnStatus(this, windows_core::from_raw_borrowed(&pgroup), windows_core::from_raw_borrowed(&pjob), core::mem::transmute_copy(&dwfileindex), core::mem::transmute_copy(&dwstatus), core::mem::transmute_copy(&dwnumofretries), core::mem::transmute_copy(&dwwin32result), core::mem::transmute_copy(&dwtransportresult)).into() + IBackgroundCopyCallback1_Impl::OnStatus(this, core::mem::transmute_copy(&pgroup), core::mem::transmute_copy(&pjob), core::mem::transmute_copy(&dwfileindex), core::mem::transmute_copy(&dwstatus), core::mem::transmute_copy(&dwnumofretries), core::mem::transmute_copy(&dwwin32result), core::mem::transmute_copy(&dwtransportresult)).into() } unsafe extern "system" fn OnProgress(this: *mut core::ffi::c_void, progresstype: u32, pgroup: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void, dwfileindex: u32, dwprogressvalue: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyCallback1_Impl::OnProgress(this, core::mem::transmute_copy(&progresstype), windows_core::from_raw_borrowed(&pgroup), windows_core::from_raw_borrowed(&pjob), core::mem::transmute_copy(&dwfileindex), core::mem::transmute_copy(&dwprogressvalue)).into() + IBackgroundCopyCallback1_Impl::OnProgress(this, core::mem::transmute_copy(&progresstype), core::mem::transmute_copy(&pgroup), core::mem::transmute_copy(&pjob), core::mem::transmute_copy(&dwfileindex), core::mem::transmute_copy(&dwprogressvalue)).into() } unsafe extern "system" fn OnProgressEx(this: *mut core::ffi::c_void, progresstype: u32, pgroup: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void, dwfileindex: u32, dwprogressvalue: u32, dwbytearraysize: u32, pbyte: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyCallback1_Impl::OnProgressEx(this, core::mem::transmute_copy(&progresstype), windows_core::from_raw_borrowed(&pgroup), windows_core::from_raw_borrowed(&pjob), core::mem::transmute_copy(&dwfileindex), core::mem::transmute_copy(&dwprogressvalue), core::mem::transmute_copy(&dwbytearraysize), core::mem::transmute_copy(&pbyte)).into() + IBackgroundCopyCallback1_Impl::OnProgressEx(this, core::mem::transmute_copy(&progresstype), core::mem::transmute_copy(&pgroup), core::mem::transmute_copy(&pjob), core::mem::transmute_copy(&dwfileindex), core::mem::transmute_copy(&dwprogressvalue), core::mem::transmute_copy(&dwbytearraysize), core::mem::transmute_copy(&pbyte)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -819,13 +819,13 @@ pub struct IBackgroundCopyCallback2_Vtbl { pub FileTransferred: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IBackgroundCopyCallback2_Impl: IBackgroundCopyCallback_Impl { - fn FileTransferred(&self, pjob: Option<&IBackgroundCopyJob>, pfile: Option<&IBackgroundCopyFile>) -> windows_core::Result<()>; + fn FileTransferred(&self, pjob: windows_core::Ref<'_, IBackgroundCopyJob>, pfile: windows_core::Ref<'_, IBackgroundCopyFile>) -> windows_core::Result<()>; } impl IBackgroundCopyCallback2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FileTransferred(this: *mut core::ffi::c_void, pjob: *mut core::ffi::c_void, pfile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyCallback2_Impl::FileTransferred(this, windows_core::from_raw_borrowed(&pjob), windows_core::from_raw_borrowed(&pfile)).into() + IBackgroundCopyCallback2_Impl::FileTransferred(this, core::mem::transmute_copy(&pjob), core::mem::transmute_copy(&pfile)).into() } Self { base__: IBackgroundCopyCallback_Vtbl::new::(), FileTransferred: FileTransferred:: } } @@ -857,13 +857,13 @@ pub struct IBackgroundCopyCallback3_Vtbl { pub FileRangesTransferred: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, u32, *const BG_FILE_RANGE) -> windows_core::HRESULT, } pub trait IBackgroundCopyCallback3_Impl: IBackgroundCopyCallback2_Impl { - fn FileRangesTransferred(&self, job: Option<&IBackgroundCopyJob>, file: Option<&IBackgroundCopyFile>, rangecount: u32, ranges: *const BG_FILE_RANGE) -> windows_core::Result<()>; + fn FileRangesTransferred(&self, job: windows_core::Ref<'_, IBackgroundCopyJob>, file: windows_core::Ref<'_, IBackgroundCopyFile>, rangecount: u32, ranges: *const BG_FILE_RANGE) -> windows_core::Result<()>; } impl IBackgroundCopyCallback3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FileRangesTransferred(this: *mut core::ffi::c_void, job: *mut core::ffi::c_void, file: *mut core::ffi::c_void, rangecount: u32, ranges: *const BG_FILE_RANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyCallback3_Impl::FileRangesTransferred(this, windows_core::from_raw_borrowed(&job), windows_core::from_raw_borrowed(&file), core::mem::transmute_copy(&rangecount), core::mem::transmute_copy(&ranges)).into() + IBackgroundCopyCallback3_Impl::FileRangesTransferred(this, core::mem::transmute_copy(&job), core::mem::transmute_copy(&file), core::mem::transmute_copy(&rangecount), core::mem::transmute_copy(&ranges)).into() } Self { base__: IBackgroundCopyCallback2_Vtbl::new::(), FileRangesTransferred: FileRangesTransferred:: } } @@ -1422,7 +1422,7 @@ pub trait IBackgroundCopyGroup_Impl: windows_core::IUnknownImpl { fn EnumJobs(&self, dwflags: u32) -> windows_core::Result; fn SwitchToForeground(&self) -> windows_core::Result<()>; fn QueryNewJobInterface(&self, iid: *const windows_core::GUID) -> windows_core::Result; - fn SetNotificationPointer(&self, iid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetNotificationPointer(&self, iid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IBackgroundCopyGroup_Vtbl { @@ -1533,7 +1533,7 @@ impl IBackgroundCopyGroup_Vtbl { } unsafe extern "system" fn SetNotificationPointer(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyGroup_Impl::SetNotificationPointer(this, core::mem::transmute_copy(&iid), windows_core::from_raw_borrowed(&punk)).into() + IBackgroundCopyGroup_Impl::SetNotificationPointer(this, core::mem::transmute_copy(&iid), core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1750,7 +1750,7 @@ pub trait IBackgroundCopyJob_Impl: windows_core::IUnknownImpl { fn GetPriority(&self) -> windows_core::Result; fn SetNotifyFlags(&self, val: u32) -> windows_core::Result<()>; fn GetNotifyFlags(&self) -> windows_core::Result; - fn SetNotifyInterface(&self, val: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetNotifyInterface(&self, val: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetNotifyInterface(&self) -> windows_core::Result; fn SetMinimumRetryDelay(&self, seconds: u32) -> windows_core::Result<()>; fn GetMinimumRetryDelay(&self) -> windows_core::Result; @@ -1913,7 +1913,7 @@ impl IBackgroundCopyJob_Vtbl { } unsafe extern "system" fn SetNotifyInterface(this: *mut core::ffi::c_void, val: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyJob_Impl::SetNotifyInterface(this, windows_core::from_raw_borrowed(&val)).into() + IBackgroundCopyJob_Impl::SetNotifyInterface(this, core::mem::transmute_copy(&val)).into() } unsafe extern "system" fn GetNotifyInterface(this: *mut core::ffi::c_void, pval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2725,14 +2725,14 @@ pub struct IBackgroundCopyJobHttpOptions3_Vtbl { pub MakeCustomHeadersWriteOnly: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IBackgroundCopyJobHttpOptions3_Impl: IBackgroundCopyJobHttpOptions2_Impl { - fn SetServerCertificateValidationInterface(&self, certvalidationcallback: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetServerCertificateValidationInterface(&self, certvalidationcallback: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn MakeCustomHeadersWriteOnly(&self) -> windows_core::Result<()>; } impl IBackgroundCopyJobHttpOptions3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetServerCertificateValidationInterface(this: *mut core::ffi::c_void, certvalidationcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyJobHttpOptions3_Impl::SetServerCertificateValidationInterface(this, windows_core::from_raw_borrowed(&certvalidationcallback)).into() + IBackgroundCopyJobHttpOptions3_Impl::SetServerCertificateValidationInterface(this, core::mem::transmute_copy(&certvalidationcallback)).into() } unsafe extern "system" fn MakeCustomHeadersWriteOnly(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2780,7 +2780,7 @@ pub struct IBackgroundCopyManager_Vtbl { pub GetErrorDescription: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT, u32, *mut windows_core::PWSTR) -> windows_core::HRESULT, } pub trait IBackgroundCopyManager_Impl: windows_core::IUnknownImpl { - fn CreateJob(&self, displayname: &windows_core::PCWSTR, r#type: BG_JOB_TYPE, pjobid: *mut windows_core::GUID, ppjob: *mut Option) -> windows_core::Result<()>; + fn CreateJob(&self, displayname: &windows_core::PCWSTR, r#type: BG_JOB_TYPE, pjobid: *mut windows_core::GUID, ppjob: windows_core::OutRef<'_, IBackgroundCopyJob>) -> windows_core::Result<()>; fn GetJob(&self, jobid: *const windows_core::GUID) -> windows_core::Result; fn EnumJobs(&self, dwflags: u32) -> windows_core::Result; fn GetErrorDescription(&self, hresult: windows_core::HRESULT, languageid: u32) -> windows_core::Result; @@ -2923,13 +2923,13 @@ pub struct IBackgroundCopyServerCertificateValidationCallback_Vtbl { pub ValidateServerCertificate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, u32, *const u8, u32, u32, *const u8) -> windows_core::HRESULT, } pub trait IBackgroundCopyServerCertificateValidationCallback_Impl: windows_core::IUnknownImpl { - fn ValidateServerCertificate(&self, job: Option<&IBackgroundCopyJob>, file: Option<&IBackgroundCopyFile>, certlength: u32, certdata: *const u8, certencodingtype: u32, certstorelength: u32, certstoredata: *const u8) -> windows_core::Result<()>; + fn ValidateServerCertificate(&self, job: windows_core::Ref<'_, IBackgroundCopyJob>, file: windows_core::Ref<'_, IBackgroundCopyFile>, certlength: u32, certdata: *const u8, certencodingtype: u32, certstorelength: u32, certstoredata: *const u8) -> windows_core::Result<()>; } impl IBackgroundCopyServerCertificateValidationCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ValidateServerCertificate(this: *mut core::ffi::c_void, job: *mut core::ffi::c_void, file: *mut core::ffi::c_void, certlength: u32, certdata: *const u8, certencodingtype: u32, certstorelength: u32, certstoredata: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBackgroundCopyServerCertificateValidationCallback_Impl::ValidateServerCertificate(this, windows_core::from_raw_borrowed(&job), windows_core::from_raw_borrowed(&file), core::mem::transmute_copy(&certlength), core::mem::transmute_copy(&certdata), core::mem::transmute_copy(&certencodingtype), core::mem::transmute_copy(&certstorelength), core::mem::transmute_copy(&certstoredata)).into() + IBackgroundCopyServerCertificateValidationCallback_Impl::ValidateServerCertificate(this, core::mem::transmute_copy(&job), core::mem::transmute_copy(&file), core::mem::transmute_copy(&certlength), core::mem::transmute_copy(&certdata), core::mem::transmute_copy(&certencodingtype), core::mem::transmute_copy(&certstorelength), core::mem::transmute_copy(&certstoredata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ValidateServerCertificate: ValidateServerCertificate:: } } @@ -3458,7 +3458,7 @@ pub struct IEnumBackgroundCopyFiles_Vtbl { pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IEnumBackgroundCopyFiles_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IBackgroundCopyFile>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3628,7 +3628,7 @@ pub struct IEnumBackgroundCopyJobs_Vtbl { pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IEnumBackgroundCopyJobs_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IBackgroundCopyJob>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3798,7 +3798,7 @@ pub struct IEnumBitsPeerCacheRecords_Vtbl { pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IEnumBitsPeerCacheRecords_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IBitsPeerCacheRecord>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3883,7 +3883,7 @@ pub struct IEnumBitsPeers_Vtbl { pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IEnumBitsPeers_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IBitsPeer>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; diff --git a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs index 94142b055b..2506cffaad 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs @@ -9411,7 +9411,7 @@ pub trait ISClusResDependencies_Impl: super::super::System::Com::IDispatch_Impl fn get_Item(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result; fn CreateItem(&self, bstrresourcename: &windows_core::BSTR, bstrresourcetype: &windows_core::BSTR, dwflags: CLUSTER_RESOURCE_CREATE_FLAGS) -> windows_core::Result; fn DeleteItem(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; - fn AddItem(&self, presource: Option<&ISClusResource>) -> windows_core::Result<()>; + fn AddItem(&self, presource: windows_core::Ref<'_, ISClusResource>) -> windows_core::Result<()>; fn RemoveItem(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -9467,7 +9467,7 @@ impl ISClusResDependencies_Vtbl { } unsafe extern "system" fn AddItem(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISClusResDependencies_Impl::AddItem(this, windows_core::from_raw_borrowed(&presource)).into() + ISClusResDependencies_Impl::AddItem(this, core::mem::transmute_copy(&presource)).into() } unsafe extern "system" fn RemoveItem(this: *mut core::ffi::c_void, varindex: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9569,7 +9569,7 @@ pub trait ISClusResDependents_Impl: super::super::System::Com::IDispatch_Impl { fn get_Item(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result; fn CreateItem(&self, bstrresourcename: &windows_core::BSTR, bstrresourcetype: &windows_core::BSTR, dwflags: CLUSTER_RESOURCE_CREATE_FLAGS) -> windows_core::Result; fn DeleteItem(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; - fn AddItem(&self, presource: Option<&ISClusResource>) -> windows_core::Result<()>; + fn AddItem(&self, presource: windows_core::Ref<'_, ISClusResource>) -> windows_core::Result<()>; fn RemoveItem(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -9625,7 +9625,7 @@ impl ISClusResDependents_Vtbl { } unsafe extern "system" fn AddItem(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISClusResDependents_Impl::AddItem(this, windows_core::from_raw_borrowed(&presource)).into() + ISClusResDependents_Impl::AddItem(this, core::mem::transmute_copy(&presource)).into() } unsafe extern "system" fn RemoveItem(this: *mut core::ffi::c_void, varindex: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10037,11 +10037,11 @@ pub trait ISClusResGroupPreferredOwnerNodes_Impl: super::super::System::Com::IDi fn _NewEnum(&self) -> windows_core::Result; fn Refresh(&self) -> windows_core::Result<()>; fn get_Item(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result; - fn InsertItem(&self, pnode: Option<&ISClusNode>, nposition: i32) -> windows_core::Result<()>; + fn InsertItem(&self, pnode: windows_core::Ref<'_, ISClusNode>, nposition: i32) -> windows_core::Result<()>; fn RemoveItem(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn Modified(&self) -> windows_core::Result; fn SaveChanges(&self) -> windows_core::Result<()>; - fn AddItem(&self, pnode: Option<&ISClusNode>) -> windows_core::Result<()>; + fn AddItem(&self, pnode: windows_core::Ref<'_, ISClusNode>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISClusResGroupPreferredOwnerNodes_Vtbl { @@ -10082,7 +10082,7 @@ impl ISClusResGroupPreferredOwnerNodes_Vtbl { } unsafe extern "system" fn InsertItem(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void, nposition: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISClusResGroupPreferredOwnerNodes_Impl::InsertItem(this, windows_core::from_raw_borrowed(&pnode), core::mem::transmute_copy(&nposition)).into() + ISClusResGroupPreferredOwnerNodes_Impl::InsertItem(this, core::mem::transmute_copy(&pnode), core::mem::transmute_copy(&nposition)).into() } unsafe extern "system" fn RemoveItem(this: *mut core::ffi::c_void, varindex: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10104,7 +10104,7 @@ impl ISClusResGroupPreferredOwnerNodes_Vtbl { } unsafe extern "system" fn AddItem(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISClusResGroupPreferredOwnerNodes_Impl::AddItem(this, windows_core::from_raw_borrowed(&pnode)).into() + ISClusResGroupPreferredOwnerNodes_Impl::AddItem(this, core::mem::transmute_copy(&pnode)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -10459,7 +10459,7 @@ pub trait ISClusResPossibleOwnerNodes_Impl: super::super::System::Com::IDispatch fn _NewEnum(&self) -> windows_core::Result; fn Refresh(&self) -> windows_core::Result<()>; fn get_Item(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result; - fn AddItem(&self, pnode: Option<&ISClusNode>) -> windows_core::Result<()>; + fn AddItem(&self, pnode: windows_core::Ref<'_, ISClusNode>) -> windows_core::Result<()>; fn RemoveItem(&self, varindex: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn Modified(&self) -> windows_core::Result; } @@ -10502,7 +10502,7 @@ impl ISClusResPossibleOwnerNodes_Vtbl { } unsafe extern "system" fn AddItem(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISClusResPossibleOwnerNodes_Impl::AddItem(this, windows_core::from_raw_borrowed(&pnode)).into() + ISClusResPossibleOwnerNodes_Impl::AddItem(this, core::mem::transmute_copy(&pnode)).into() } unsafe extern "system" fn RemoveItem(this: *mut core::ffi::c_void, varindex: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11306,10 +11306,10 @@ pub trait ISClusResource_Impl: super::super::System::Com::IDispatch_Impl { fn Fail(&self) -> windows_core::Result<()>; fn Online(&self, ntimeout: i32) -> windows_core::Result; fn Offline(&self, ntimeout: i32) -> windows_core::Result; - fn ChangeResourceGroup(&self, presourcegroup: Option<&ISClusResGroup>) -> windows_core::Result<()>; - fn AddResourceNode(&self, pnode: Option<&ISClusNode>) -> windows_core::Result<()>; - fn RemoveResourceNode(&self, pnode: Option<&ISClusNode>) -> windows_core::Result<()>; - fn CanResourceBeDependent(&self, presource: Option<&ISClusResource>) -> windows_core::Result; + fn ChangeResourceGroup(&self, presourcegroup: windows_core::Ref<'_, ISClusResGroup>) -> windows_core::Result<()>; + fn AddResourceNode(&self, pnode: windows_core::Ref<'_, ISClusNode>) -> windows_core::Result<()>; + fn RemoveResourceNode(&self, pnode: windows_core::Ref<'_, ISClusNode>) -> windows_core::Result<()>; + fn CanResourceBeDependent(&self, presource: windows_core::Ref<'_, ISClusResource>) -> windows_core::Result; fn PossibleOwnerNodes(&self) -> windows_core::Result; fn Dependencies(&self) -> windows_core::Result; fn Dependents(&self) -> windows_core::Result; @@ -11446,19 +11446,19 @@ impl ISClusResource_Vtbl { } unsafe extern "system" fn ChangeResourceGroup(this: *mut core::ffi::c_void, presourcegroup: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISClusResource_Impl::ChangeResourceGroup(this, windows_core::from_raw_borrowed(&presourcegroup)).into() + ISClusResource_Impl::ChangeResourceGroup(this, core::mem::transmute_copy(&presourcegroup)).into() } unsafe extern "system" fn AddResourceNode(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISClusResource_Impl::AddResourceNode(this, windows_core::from_raw_borrowed(&pnode)).into() + ISClusResource_Impl::AddResourceNode(this, core::mem::transmute_copy(&pnode)).into() } unsafe extern "system" fn RemoveResourceNode(this: *mut core::ffi::c_void, pnode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISClusResource_Impl::RemoveResourceNode(this, windows_core::from_raw_borrowed(&pnode)).into() + ISClusResource_Impl::RemoveResourceNode(this, core::mem::transmute_copy(&pnode)).into() } unsafe extern "system" fn CanResourceBeDependent(this: *mut core::ffi::c_void, presource: *mut core::ffi::c_void, pvardependent: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISClusResource_Impl::CanResourceBeDependent(this, windows_core::from_raw_borrowed(&presource)) { + match ISClusResource_Impl::CanResourceBeDependent(this, core::mem::transmute_copy(&presource)) { Ok(ok__) => { pvardependent.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12234,7 +12234,7 @@ pub trait ISCluster_Impl: super::super::System::Com::IDispatch_Impl { fn Name(&self) -> windows_core::Result; fn SetName(&self, bstrclustername: &windows_core::BSTR) -> windows_core::Result<()>; fn Version(&self) -> windows_core::Result; - fn SetQuorumResource(&self, pclusterresource: Option<&ISClusResource>) -> windows_core::Result<()>; + fn SetQuorumResource(&self, pclusterresource: windows_core::Ref<'_, ISClusResource>) -> windows_core::Result<()>; fn QuorumResource(&self) -> windows_core::Result; fn QuorumLogSize(&self) -> windows_core::Result; fn SetQuorumLogSize(&self, nlogsize: i32) -> windows_core::Result<()>; @@ -12330,7 +12330,7 @@ impl ISCluster_Vtbl { } unsafe extern "system" fn SetQuorumResource(this: *mut core::ffi::c_void, pclusterresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISCluster_Impl::SetQuorumResource(this, windows_core::from_raw_borrowed(&pclusterresource)).into() + ISCluster_Impl::SetQuorumResource(this, core::mem::transmute_copy(&pclusterresource)).into() } unsafe extern "system" fn QuorumResource(this: *mut core::ffi::c_void, pclusterresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12833,13 +12833,13 @@ pub struct IWEExtendContextMenu_Vtbl { pub AddContextMenuItems: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWEExtendContextMenu_Impl: windows_core::IUnknownImpl { - fn AddContextMenuItems(&self, pidata: Option<&windows_core::IUnknown>, picallback: Option<&IWCContextMenuCallback>) -> windows_core::Result<()>; + fn AddContextMenuItems(&self, pidata: windows_core::Ref<'_, windows_core::IUnknown>, picallback: windows_core::Ref<'_, IWCContextMenuCallback>) -> windows_core::Result<()>; } impl IWEExtendContextMenu_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddContextMenuItems(this: *mut core::ffi::c_void, pidata: *mut core::ffi::c_void, picallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWEExtendContextMenu_Impl::AddContextMenuItems(this, windows_core::from_raw_borrowed(&pidata), windows_core::from_raw_borrowed(&picallback)).into() + IWEExtendContextMenu_Impl::AddContextMenuItems(this, core::mem::transmute_copy(&pidata), core::mem::transmute_copy(&picallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), AddContextMenuItems: AddContextMenuItems:: } } @@ -12865,13 +12865,13 @@ pub struct IWEExtendPropertySheet_Vtbl { pub CreatePropertySheetPages: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWEExtendPropertySheet_Impl: windows_core::IUnknownImpl { - fn CreatePropertySheetPages(&self, pidata: Option<&windows_core::IUnknown>, picallback: Option<&IWCPropertySheetCallback>) -> windows_core::Result<()>; + fn CreatePropertySheetPages(&self, pidata: windows_core::Ref<'_, windows_core::IUnknown>, picallback: windows_core::Ref<'_, IWCPropertySheetCallback>) -> windows_core::Result<()>; } impl IWEExtendPropertySheet_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreatePropertySheetPages(this: *mut core::ffi::c_void, pidata: *mut core::ffi::c_void, picallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWEExtendPropertySheet_Impl::CreatePropertySheetPages(this, windows_core::from_raw_borrowed(&pidata), windows_core::from_raw_borrowed(&picallback)).into() + IWEExtendPropertySheet_Impl::CreatePropertySheetPages(this, core::mem::transmute_copy(&pidata), core::mem::transmute_copy(&picallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreatePropertySheetPages: CreatePropertySheetPages:: } } @@ -12897,13 +12897,13 @@ pub struct IWEExtendWizard_Vtbl { pub CreateWizardPages: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWEExtendWizard_Impl: windows_core::IUnknownImpl { - fn CreateWizardPages(&self, pidata: Option<&windows_core::IUnknown>, picallback: Option<&IWCWizardCallback>) -> windows_core::Result<()>; + fn CreateWizardPages(&self, pidata: windows_core::Ref<'_, windows_core::IUnknown>, picallback: windows_core::Ref<'_, IWCWizardCallback>) -> windows_core::Result<()>; } impl IWEExtendWizard_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateWizardPages(this: *mut core::ffi::c_void, pidata: *mut core::ffi::c_void, picallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWEExtendWizard_Impl::CreateWizardPages(this, windows_core::from_raw_borrowed(&pidata), windows_core::from_raw_borrowed(&picallback)).into() + IWEExtendWizard_Impl::CreateWizardPages(this, core::mem::transmute_copy(&pidata), core::mem::transmute_copy(&picallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreateWizardPages: CreateWizardPages:: } } @@ -12929,13 +12929,13 @@ pub struct IWEExtendWizard97_Vtbl { pub CreateWizard97Pages: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWEExtendWizard97_Impl: windows_core::IUnknownImpl { - fn CreateWizard97Pages(&self, pidata: Option<&windows_core::IUnknown>, picallback: Option<&IWCWizard97Callback>) -> windows_core::Result<()>; + fn CreateWizard97Pages(&self, pidata: windows_core::Ref<'_, windows_core::IUnknown>, picallback: windows_core::Ref<'_, IWCWizard97Callback>) -> windows_core::Result<()>; } impl IWEExtendWizard97_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateWizard97Pages(this: *mut core::ffi::c_void, pidata: *mut core::ffi::c_void, picallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWEExtendWizard97_Impl::CreateWizard97Pages(this, windows_core::from_raw_borrowed(&pidata), windows_core::from_raw_borrowed(&picallback)).into() + IWEExtendWizard97_Impl::CreateWizard97Pages(this, core::mem::transmute_copy(&pidata), core::mem::transmute_copy(&picallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreateWizard97Pages: CreateWizard97Pages:: } } @@ -12960,13 +12960,13 @@ pub struct IWEInvokeCommand_Vtbl { pub InvokeCommand: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWEInvokeCommand_Impl: windows_core::IUnknownImpl { - fn InvokeCommand(&self, ncommandid: u32, pidata: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn InvokeCommand(&self, ncommandid: u32, pidata: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IWEInvokeCommand_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InvokeCommand(this: *mut core::ffi::c_void, ncommandid: u32, pidata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWEInvokeCommand_Impl::InvokeCommand(this, core::mem::transmute_copy(&ncommandid), windows_core::from_raw_borrowed(&pidata)).into() + IWEInvokeCommand_Impl::InvokeCommand(this, core::mem::transmute_copy(&ncommandid), core::mem::transmute_copy(&pidata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), InvokeCommand: InvokeCommand:: } } diff --git a/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs index 6f92ba43e5..86913d3fc8 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs @@ -46,7 +46,7 @@ pub struct IEnumNetworkConnections_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IEnumNetworkConnections_Impl: super::super::System::Com::IDispatch_Impl { fn _NewEnum(&self) -> windows_core::Result; - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, INetworkConnection>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -149,7 +149,7 @@ pub struct IEnumNetworks_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IEnumNetworks_Impl: super::super::System::Com::IDispatch_Impl { fn _NewEnum(&self) -> windows_core::Result; - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, INetwork>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; diff --git a/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs index f0061441b8..503febed0e 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs @@ -469,8 +469,8 @@ pub trait IRdcLibrary_Impl: windows_core::IUnknownImpl { fn CreateGeneratorParameters(&self, parameterstype: GeneratorParametersType, level: u32) -> windows_core::Result; fn OpenGeneratorParameters(&self, size: u32, parametersblob: *const u8) -> windows_core::Result; fn CreateGenerator(&self, depth: u32, igeneratorparametersarray: *const Option) -> windows_core::Result; - fn CreateComparator(&self, iseedsignaturesfile: Option<&IRdcFileReader>, comparatorbuffersize: u32) -> windows_core::Result; - fn CreateSignatureReader(&self, ifilereader: Option<&IRdcFileReader>) -> windows_core::Result; + fn CreateComparator(&self, iseedsignaturesfile: windows_core::Ref<'_, IRdcFileReader>, comparatorbuffersize: u32) -> windows_core::Result; + fn CreateSignatureReader(&self, ifilereader: windows_core::Ref<'_, IRdcFileReader>) -> windows_core::Result; fn GetRDCVersion(&self, currentversion: *mut u32, minimumcompatibleappversion: *mut u32) -> windows_core::Result<()>; } impl IRdcLibrary_Vtbl { @@ -517,7 +517,7 @@ impl IRdcLibrary_Vtbl { } unsafe extern "system" fn CreateComparator(this: *mut core::ffi::c_void, iseedsignaturesfile: *mut core::ffi::c_void, comparatorbuffersize: u32, icomparator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRdcLibrary_Impl::CreateComparator(this, windows_core::from_raw_borrowed(&iseedsignaturesfile), core::mem::transmute_copy(&comparatorbuffersize)) { + match IRdcLibrary_Impl::CreateComparator(this, core::mem::transmute_copy(&iseedsignaturesfile), core::mem::transmute_copy(&comparatorbuffersize)) { Ok(ok__) => { icomparator.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -527,7 +527,7 @@ impl IRdcLibrary_Vtbl { } unsafe extern "system" fn CreateSignatureReader(this: *mut core::ffi::c_void, ifilereader: *mut core::ffi::c_void, isignaturereader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRdcLibrary_Impl::CreateSignatureReader(this, windows_core::from_raw_borrowed(&ifilereader)) { + match IRdcLibrary_Impl::CreateSignatureReader(this, core::mem::transmute_copy(&ifilereader)) { Ok(ok__) => { isignaturereader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -704,11 +704,11 @@ pub struct ISimilarity_Vtbl { } pub trait ISimilarity_Impl: windows_core::IUnknownImpl { fn CreateTable(&self, path: &windows_core::PCWSTR, truncate: super::super::Foundation::BOOL, securitydescriptor: *const u8, recordsize: u32) -> windows_core::Result; - fn CreateTableIndirect(&self, mapping: Option<&ISimilarityTraitsMapping>, fileidfile: Option<&IRdcFileWriter>, truncate: super::super::Foundation::BOOL, recordsize: u32) -> windows_core::Result; + fn CreateTableIndirect(&self, mapping: windows_core::Ref<'_, ISimilarityTraitsMapping>, fileidfile: windows_core::Ref<'_, IRdcFileWriter>, truncate: super::super::Foundation::BOOL, recordsize: u32) -> windows_core::Result; fn CloseTable(&self, isvalid: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn Append(&self, similarityfileid: *const SimilarityFileId, similaritydata: *const SimilarityData) -> windows_core::Result<()>; fn FindSimilarFileId(&self, similaritydata: *const SimilarityData, numberofmatchesrequired: u16, resultssize: u32) -> windows_core::Result; - fn CopyAndSwap(&self, newsimilaritytables: Option<&ISimilarity>, reportprogress: Option<&ISimilarityReportProgress>) -> windows_core::Result<()>; + fn CopyAndSwap(&self, newsimilaritytables: windows_core::Ref<'_, ISimilarity>, reportprogress: windows_core::Ref<'_, ISimilarityReportProgress>) -> windows_core::Result<()>; fn GetRecordCount(&self) -> windows_core::Result; } impl ISimilarity_Vtbl { @@ -725,7 +725,7 @@ impl ISimilarity_Vtbl { } unsafe extern "system" fn CreateTableIndirect(this: *mut core::ffi::c_void, mapping: *mut core::ffi::c_void, fileidfile: *mut core::ffi::c_void, truncate: super::super::Foundation::BOOL, recordsize: u32, isnew: *mut RdcCreatedTables) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISimilarity_Impl::CreateTableIndirect(this, windows_core::from_raw_borrowed(&mapping), windows_core::from_raw_borrowed(&fileidfile), core::mem::transmute_copy(&truncate), core::mem::transmute_copy(&recordsize)) { + match ISimilarity_Impl::CreateTableIndirect(this, core::mem::transmute_copy(&mapping), core::mem::transmute_copy(&fileidfile), core::mem::transmute_copy(&truncate), core::mem::transmute_copy(&recordsize)) { Ok(ok__) => { isnew.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -753,7 +753,7 @@ impl ISimilarity_Vtbl { } unsafe extern "system" fn CopyAndSwap(this: *mut core::ffi::c_void, newsimilaritytables: *mut core::ffi::c_void, reportprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISimilarity_Impl::CopyAndSwap(this, windows_core::from_raw_borrowed(&newsimilaritytables), windows_core::from_raw_borrowed(&reportprogress)).into() + ISimilarity_Impl::CopyAndSwap(this, core::mem::transmute_copy(&newsimilaritytables), core::mem::transmute_copy(&reportprogress)).into() } unsafe extern "system" fn GetRecordCount(this: *mut core::ffi::c_void, recordcount: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -829,7 +829,7 @@ pub struct ISimilarityFileIdTable_Vtbl { } pub trait ISimilarityFileIdTable_Impl: windows_core::IUnknownImpl { fn CreateTable(&self, path: &windows_core::PCWSTR, truncate: super::super::Foundation::BOOL, securitydescriptor: *const u8, recordsize: u32) -> windows_core::Result; - fn CreateTableIndirect(&self, fileidfile: Option<&IRdcFileWriter>, truncate: super::super::Foundation::BOOL, recordsize: u32) -> windows_core::Result; + fn CreateTableIndirect(&self, fileidfile: windows_core::Ref<'_, IRdcFileWriter>, truncate: super::super::Foundation::BOOL, recordsize: u32) -> windows_core::Result; fn CloseTable(&self, isvalid: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn Append(&self, similarityfileid: *const SimilarityFileId) -> windows_core::Result; fn Lookup(&self, similarityfileindex: u32, similarityfileid: *mut SimilarityFileId) -> windows_core::Result<()>; @@ -850,7 +850,7 @@ impl ISimilarityFileIdTable_Vtbl { } unsafe extern "system" fn CreateTableIndirect(this: *mut core::ffi::c_void, fileidfile: *mut core::ffi::c_void, truncate: super::super::Foundation::BOOL, recordsize: u32, isnew: *mut RdcCreatedTables) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISimilarityFileIdTable_Impl::CreateTableIndirect(this, windows_core::from_raw_borrowed(&fileidfile), core::mem::transmute_copy(&truncate), core::mem::transmute_copy(&recordsize)) { + match ISimilarityFileIdTable_Impl::CreateTableIndirect(this, core::mem::transmute_copy(&fileidfile), core::mem::transmute_copy(&truncate), core::mem::transmute_copy(&recordsize)) { Ok(ok__) => { isnew.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1199,7 +1199,7 @@ pub struct ISimilarityTraitsTable_Vtbl { } pub trait ISimilarityTraitsTable_Impl: windows_core::IUnknownImpl { fn CreateTable(&self, path: &windows_core::PCWSTR, truncate: super::super::Foundation::BOOL, securitydescriptor: *const u8) -> windows_core::Result; - fn CreateTableIndirect(&self, mapping: Option<&ISimilarityTraitsMapping>, truncate: super::super::Foundation::BOOL) -> windows_core::Result; + fn CreateTableIndirect(&self, mapping: windows_core::Ref<'_, ISimilarityTraitsMapping>, truncate: super::super::Foundation::BOOL) -> windows_core::Result; fn CloseTable(&self, isvalid: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn Append(&self, data: *const SimilarityData, fileindex: u32) -> windows_core::Result<()>; fn FindSimilarFileIndex(&self, similaritydata: *const SimilarityData, numberofmatchesrequired: u16, findsimilarfileindexresults: *mut FindSimilarFileIndexResults, resultssize: u32, resultsused: *mut u32) -> windows_core::Result<()>; @@ -1220,7 +1220,7 @@ impl ISimilarityTraitsTable_Vtbl { } unsafe extern "system" fn CreateTableIndirect(this: *mut core::ffi::c_void, mapping: *mut core::ffi::c_void, truncate: super::super::Foundation::BOOL, isnew: *mut RdcCreatedTables) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISimilarityTraitsTable_Impl::CreateTableIndirect(this, windows_core::from_raw_borrowed(&mapping), core::mem::transmute_copy(&truncate)) { + match ISimilarityTraitsTable_Impl::CreateTableIndirect(this, core::mem::transmute_copy(&mapping), core::mem::transmute_copy(&truncate)) { Ok(ok__) => { isnew.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs index 16a6f2eff0..5358253abd 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs @@ -3172,7 +3172,7 @@ pub struct IDialEngine_Vtbl { pub GetConnectHandle: unsafe extern "system" fn(*mut core::ffi::c_void, *mut usize) -> windows_core::HRESULT, } pub trait IDialEngine_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pwzconnectoid: &windows_core::PCWSTR, pides: Option<&IDialEventSink>) -> windows_core::Result<()>; + fn Initialize(&self, pwzconnectoid: &windows_core::PCWSTR, pides: windows_core::Ref<'_, IDialEventSink>) -> windows_core::Result<()>; fn GetProperty(&self, pwzproperty: &windows_core::PCWSTR, pwzvalue: &windows_core::PCWSTR, dwbufsize: u32) -> windows_core::Result<()>; fn SetProperty(&self, pwzproperty: &windows_core::PCWSTR, pwzvalue: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Dial(&self) -> windows_core::Result<()>; @@ -3184,7 +3184,7 @@ impl IDialEngine_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pwzconnectoid: windows_core::PCWSTR, pides: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDialEngine_Impl::Initialize(this, core::mem::transmute(&pwzconnectoid), windows_core::from_raw_borrowed(&pides)).into() + IDialEngine_Impl::Initialize(this, core::mem::transmute(&pwzconnectoid), core::mem::transmute_copy(&pides)).into() } unsafe extern "system" fn GetProperty(this: *mut core::ffi::c_void, pwzproperty: windows_core::PCWSTR, pwzvalue: windows_core::PCWSTR, dwbufsize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4443,13 +4443,13 @@ pub struct IProofOfPossessionCookieInfoManager2_Vtbl { pub GetCookieInfoWithUriForAccount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR, *mut u32, *mut *mut ProofOfPossessionCookieInfo) -> windows_core::HRESULT, } pub trait IProofOfPossessionCookieInfoManager2_Impl: windows_core::IUnknownImpl { - fn GetCookieInfoWithUriForAccount(&self, webaccount: Option<&windows_core::IInspectable>, uri: &windows_core::PCWSTR, cookieinfocount: *mut u32, cookieinfo: *mut *mut ProofOfPossessionCookieInfo) -> windows_core::Result<()>; + fn GetCookieInfoWithUriForAccount(&self, webaccount: windows_core::Ref<'_, windows_core::IInspectable>, uri: &windows_core::PCWSTR, cookieinfocount: *mut u32, cookieinfo: *mut *mut ProofOfPossessionCookieInfo) -> windows_core::Result<()>; } impl IProofOfPossessionCookieInfoManager2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetCookieInfoWithUriForAccount(this: *mut core::ffi::c_void, webaccount: *mut core::ffi::c_void, uri: windows_core::PCWSTR, cookieinfocount: *mut u32, cookieinfo: *mut *mut ProofOfPossessionCookieInfo) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProofOfPossessionCookieInfoManager2_Impl::GetCookieInfoWithUriForAccount(this, windows_core::from_raw_borrowed(&webaccount), core::mem::transmute(&uri), core::mem::transmute_copy(&cookieinfocount), core::mem::transmute_copy(&cookieinfo)).into() + IProofOfPossessionCookieInfoManager2_Impl::GetCookieInfoWithUriForAccount(this, core::mem::transmute_copy(&webaccount), core::mem::transmute(&uri), core::mem::transmute_copy(&cookieinfocount), core::mem::transmute_copy(&cookieinfo)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/Provider/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/Provider/mod.rs index 34de10a2c8..9eb2532afb 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/Provider/mod.rs @@ -171,7 +171,7 @@ pub trait AsyncIConnectedIdentityProvider_Impl: windows_core::IUnknownImpl { fn Finish_DisconnectIdentity(&self) -> windows_core::Result<()>; fn Begin_IsConnected(&self) -> windows_core::Result<()>; fn Finish_IsConnected(&self) -> windows_core::Result; - fn Begin_GetUrl(&self, identifier: IDENTITY_URL, context: Option<&super::super::super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; + fn Begin_GetUrl(&self, identifier: IDENTITY_URL, context: windows_core::Ref<'_, super::super::super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; fn Finish_GetUrl(&self, postdata: *mut super::super::super::super::System::Variant::VARIANT, url: *mut windows_core::PWSTR) -> windows_core::Result<()>; fn Begin_GetAccountState(&self) -> windows_core::Result<()>; fn Finish_GetAccountState(&self) -> windows_core::Result; @@ -211,7 +211,7 @@ impl AsyncIConnectedIdentityProvider_Vtbl { } unsafe extern "system" fn Begin_GetUrl(this: *mut core::ffi::c_void, identifier: IDENTITY_URL, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIConnectedIdentityProvider_Impl::Begin_GetUrl(this, core::mem::transmute_copy(&identifier), windows_core::from_raw_borrowed(&context)).into() + AsyncIConnectedIdentityProvider_Impl::Begin_GetUrl(this, core::mem::transmute_copy(&identifier), core::mem::transmute_copy(&context)).into() } unsafe extern "system" fn Finish_GetUrl(this: *mut core::ffi::c_void, postdata: *mut super::super::super::super::System::Variant::VARIANT, url: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -331,8 +331,8 @@ pub struct AsyncIIdentityAuthentication_Vtbl { pub trait AsyncIIdentityAuthentication_Impl: windows_core::IUnknownImpl { fn Begin_SetIdentityCredential(&self, credbuffer: *const u8, credbufferlength: u32) -> windows_core::Result<()>; fn Finish_SetIdentityCredential(&self) -> windows_core::Result<()>; - fn Begin_ValidateIdentityCredential(&self, credbuffer: *const u8, credbufferlength: u32, ppidentityproperties: *mut Option) -> windows_core::Result<()>; - fn Finish_ValidateIdentityCredential(&self, ppidentityproperties: *mut Option) -> windows_core::Result<()>; + fn Begin_ValidateIdentityCredential(&self, credbuffer: *const u8, credbufferlength: u32, ppidentityproperties: windows_core::OutRef<'_, super::super::super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn Finish_ValidateIdentityCredential(&self, ppidentityproperties: windows_core::OutRef<'_, super::super::super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] impl AsyncIIdentityAuthentication_Vtbl { @@ -497,7 +497,7 @@ pub trait AsyncIIdentityProvider_Impl: windows_core::IUnknownImpl { fn Finish_GetIdentityEnum(&self) -> windows_core::Result; fn Begin_Create(&self, lpszusername: &windows_core::PCWSTR, pkeywordstoadd: *const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn Finish_Create(&self) -> windows_core::Result; - fn Begin_Import(&self, ppropertystore: Option<&super::super::super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn Begin_Import(&self, ppropertystore: windows_core::Ref<'_, super::super::super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; fn Finish_Import(&self) -> windows_core::Result<()>; fn Begin_Delete(&self, lpszuniqueid: &windows_core::PCWSTR, pkeywordstodelete: *const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn Finish_Delete(&self) -> windows_core::Result<()>; @@ -505,7 +505,7 @@ pub trait AsyncIIdentityProvider_Impl: windows_core::IUnknownImpl { fn Finish_FindByUniqueID(&self) -> windows_core::Result; fn Begin_GetProviderPropertyStore(&self) -> windows_core::Result<()>; fn Finish_GetProviderPropertyStore(&self) -> windows_core::Result; - fn Begin_Advise(&self, pidentityadvise: Option<&IIdentityAdvise>, dwidentityupdateevents: u32) -> windows_core::Result<()>; + fn Begin_Advise(&self, pidentityadvise: windows_core::Ref<'_, IIdentityAdvise>, dwidentityupdateevents: u32) -> windows_core::Result<()>; fn Finish_Advise(&self) -> windows_core::Result; fn Begin_UnAdvise(&self, dwcookie: u32) -> windows_core::Result<()>; fn Finish_UnAdvise(&self) -> windows_core::Result<()>; @@ -543,7 +543,7 @@ impl AsyncIIdentityProvider_Vtbl { } unsafe extern "system" fn Begin_Import(this: *mut core::ffi::c_void, ppropertystore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIIdentityProvider_Impl::Begin_Import(this, windows_core::from_raw_borrowed(&ppropertystore)).into() + AsyncIIdentityProvider_Impl::Begin_Import(this, core::mem::transmute_copy(&ppropertystore)).into() } unsafe extern "system" fn Finish_Import(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -587,7 +587,7 @@ impl AsyncIIdentityProvider_Vtbl { } unsafe extern "system" fn Begin_Advise(this: *mut core::ffi::c_void, pidentityadvise: *mut core::ffi::c_void, dwidentityupdateevents: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIIdentityProvider_Impl::Begin_Advise(this, windows_core::from_raw_borrowed(&pidentityadvise), core::mem::transmute_copy(&dwidentityupdateevents)).into() + AsyncIIdentityProvider_Impl::Begin_Advise(this, core::mem::transmute_copy(&pidentityadvise), core::mem::transmute_copy(&dwidentityupdateevents)).into() } unsafe extern "system" fn Finish_Advise(this: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -710,7 +710,7 @@ pub trait AsyncIIdentityStore_Impl: windows_core::IUnknownImpl { fn Begin_GetCount(&self) -> windows_core::Result<()>; fn Finish_GetCount(&self) -> windows_core::Result; fn Begin_GetAt(&self, dwprovider: u32, pprovguid: *mut windows_core::GUID) -> windows_core::Result<()>; - fn Finish_GetAt(&self, pprovguid: *mut windows_core::GUID, ppidentityprovider: *mut Option) -> windows_core::Result<()>; + fn Finish_GetAt(&self, pprovguid: *mut windows_core::GUID, ppidentityprovider: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Begin_AddToCache(&self, lpszuniqueid: &windows_core::PCWSTR, providerguid: *const windows_core::GUID) -> windows_core::Result<()>; fn Finish_AddToCache(&self) -> windows_core::Result<()>; fn Begin_ConvertToSid(&self, lpszuniqueid: &windows_core::PCWSTR, providerguid: *const windows_core::GUID, cbsid: u16, psid: *mut u8) -> windows_core::Result<()>; @@ -990,7 +990,7 @@ pub trait IConnectedIdentityProvider_Impl: windows_core::IUnknownImpl { fn ConnectIdentity(&self, authbuffer: *const u8, authbuffersize: u32) -> windows_core::Result<()>; fn DisconnectIdentity(&self) -> windows_core::Result<()>; fn IsConnected(&self) -> windows_core::Result; - fn GetUrl(&self, identifier: IDENTITY_URL, context: Option<&super::super::super::super::System::Com::IBindCtx>, postdata: *mut super::super::super::super::System::Variant::VARIANT, url: *mut windows_core::PWSTR) -> windows_core::Result<()>; + fn GetUrl(&self, identifier: IDENTITY_URL, context: windows_core::Ref<'_, super::super::super::super::System::Com::IBindCtx>, postdata: *mut super::super::super::super::System::Variant::VARIANT, url: *mut windows_core::PWSTR) -> windows_core::Result<()>; fn GetAccountState(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -1016,7 +1016,7 @@ impl IConnectedIdentityProvider_Vtbl { } unsafe extern "system" fn GetUrl(this: *mut core::ffi::c_void, identifier: IDENTITY_URL, context: *mut core::ffi::c_void, postdata: *mut super::super::super::super::System::Variant::VARIANT, url: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConnectedIdentityProvider_Impl::GetUrl(this, core::mem::transmute_copy(&identifier), windows_core::from_raw_borrowed(&context), core::mem::transmute_copy(&postdata), core::mem::transmute_copy(&url)).into() + IConnectedIdentityProvider_Impl::GetUrl(this, core::mem::transmute_copy(&identifier), core::mem::transmute_copy(&context), core::mem::transmute_copy(&postdata), core::mem::transmute_copy(&url)).into() } unsafe extern "system" fn GetAccountState(this: *mut core::ffi::c_void, pstate: *mut ACCOUNT_STATE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1124,7 +1124,7 @@ pub struct IIdentityAuthentication_Vtbl { #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IIdentityAuthentication_Impl: windows_core::IUnknownImpl { fn SetIdentityCredential(&self, credbuffer: *const u8, credbufferlength: u32) -> windows_core::Result<()>; - fn ValidateIdentityCredential(&self, credbuffer: *const u8, credbufferlength: u32, ppidentityproperties: *mut Option) -> windows_core::Result<()>; + fn ValidateIdentityCredential(&self, credbuffer: *const u8, credbufferlength: u32, ppidentityproperties: windows_core::OutRef<'_, super::super::super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] impl IIdentityAuthentication_Vtbl { @@ -1235,12 +1235,12 @@ pub struct IIdentityProvider_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] pub trait IIdentityProvider_Impl: windows_core::IUnknownImpl { fn GetIdentityEnum(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: *const super::super::super::super::Foundation::PROPERTYKEY, pfilterpropvarvalue: *const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result; - fn Create(&self, lpszusername: &windows_core::PCWSTR, pppropertystore: *mut Option, pkeywordstoadd: *const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; - fn Import(&self, ppropertystore: Option<&super::super::super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn Create(&self, lpszusername: &windows_core::PCWSTR, pppropertystore: windows_core::OutRef<'_, super::super::super::super::UI::Shell::PropertiesSystem::IPropertyStore>, pkeywordstoadd: *const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; + fn Import(&self, ppropertystore: windows_core::Ref<'_, super::super::super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; fn Delete(&self, lpszuniqueid: &windows_core::PCWSTR, pkeywordstodelete: *const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn FindByUniqueID(&self, lpszuniqueid: &windows_core::PCWSTR) -> windows_core::Result; fn GetProviderPropertyStore(&self) -> windows_core::Result; - fn Advise(&self, pidentityadvise: Option<&IIdentityAdvise>, dwidentityupdateevents: &IdentityUpdateEvent) -> windows_core::Result; + fn Advise(&self, pidentityadvise: windows_core::Ref<'_, IIdentityAdvise>, dwidentityupdateevents: &IdentityUpdateEvent) -> windows_core::Result; fn UnAdvise(&self, dwcookie: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] @@ -1262,7 +1262,7 @@ impl IIdentityProvider_Vtbl { } unsafe extern "system" fn Import(this: *mut core::ffi::c_void, ppropertystore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IIdentityProvider_Impl::Import(this, windows_core::from_raw_borrowed(&ppropertystore)).into() + IIdentityProvider_Impl::Import(this, core::mem::transmute_copy(&ppropertystore)).into() } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, lpszuniqueid: windows_core::PCWSTR, pkeywordstodelete: *const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1290,7 +1290,7 @@ impl IIdentityProvider_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pidentityadvise: *mut core::ffi::c_void, dwidentityupdateevents: u32, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IIdentityProvider_Impl::Advise(this, windows_core::from_raw_borrowed(&pidentityadvise), core::mem::transmute(&dwidentityupdateevents)) { + match IIdentityProvider_Impl::Advise(this, core::mem::transmute_copy(&pidentityadvise), core::mem::transmute(&dwidentityupdateevents)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1367,7 +1367,7 @@ pub struct IIdentityStore_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IIdentityStore_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; - fn GetAt(&self, dwprovider: u32, pprovguid: *mut windows_core::GUID, ppidentityprovider: *mut Option) -> windows_core::Result<()>; + fn GetAt(&self, dwprovider: u32, pprovguid: *mut windows_core::GUID, ppidentityprovider: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn AddToCache(&self, lpszuniqueid: &windows_core::PCWSTR, providerguid: *const windows_core::GUID) -> windows_core::Result<()>; fn ConvertToSid(&self, lpszuniqueid: &windows_core::PCWSTR, providerguid: *const windows_core::GUID, cbsid: u16, psid: *mut u8, pcbrequiredsid: *mut u16) -> windows_core::Result<()>; fn EnumerateIdentities(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: *const super::super::super::super::Foundation::PROPERTYKEY, pfilterpropvarvalue: *const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result; diff --git a/crates/libs/windows/src/Windows/Win32/Security/ConfigurationSnapin/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/ConfigurationSnapin/mod.rs index 1216f0b328..53c2c62dc9 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/ConfigurationSnapin/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/ConfigurationSnapin/mod.rs @@ -29,7 +29,7 @@ pub struct ISceSvcAttachmentData_Vtbl { } pub trait ISceSvcAttachmentData_Impl: windows_core::IUnknownImpl { fn GetData(&self, scesvchandle: *mut core::ffi::c_void, scetype: SCESVC_INFO_TYPE, ppvdata: *mut *mut core::ffi::c_void, psceenumhandle: *mut u32) -> windows_core::Result<()>; - fn Initialize(&self, lpservicename: *mut i8, lptemplatename: *mut i8, lpscesvcpersistinfo: Option<&ISceSvcAttachmentPersistInfo>, pscesvchandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn Initialize(&self, lpservicename: *mut i8, lptemplatename: *mut i8, lpscesvcpersistinfo: windows_core::Ref<'_, ISceSvcAttachmentPersistInfo>, pscesvchandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn FreeBuffer(&self, pvdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn CloseHandle(&self, scesvchandle: *mut core::ffi::c_void) -> windows_core::Result<()>; } @@ -41,7 +41,7 @@ impl ISceSvcAttachmentData_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, lpservicename: *mut i8, lptemplatename: *mut i8, lpscesvcpersistinfo: *mut core::ffi::c_void, pscesvchandle: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISceSvcAttachmentData_Impl::Initialize(this, core::mem::transmute_copy(&lpservicename), core::mem::transmute_copy(&lptemplatename), windows_core::from_raw_borrowed(&lpscesvcpersistinfo), core::mem::transmute_copy(&pscesvchandle)).into() + ISceSvcAttachmentData_Impl::Initialize(this, core::mem::transmute_copy(&lpservicename), core::mem::transmute_copy(&lptemplatename), core::mem::transmute_copy(&lpscesvcpersistinfo), core::mem::transmute_copy(&pscesvchandle)).into() } unsafe extern "system" fn FreeBuffer(this: *mut core::ffi::c_void, pvdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs index 77c1c793b5..b1f73cf702 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs @@ -1035,7 +1035,7 @@ pub struct IAlternativeName_Vtbl { pub trait IAlternativeName_Impl: super::super::super::System::Com::IDispatch_Impl { fn InitializeFromString(&self, r#type: AlternativeNameType, strvalue: &windows_core::BSTR) -> windows_core::Result<()>; fn InitializeFromRawData(&self, r#type: AlternativeNameType, encoding: EncodingType, strrawdata: &windows_core::BSTR) -> windows_core::Result<()>; - fn InitializeFromOtherName(&self, pobjectid: Option<&IObjectId>, encoding: EncodingType, strrawdata: &windows_core::BSTR, tobewrapped: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn InitializeFromOtherName(&self, pobjectid: windows_core::Ref<'_, IObjectId>, encoding: EncodingType, strrawdata: &windows_core::BSTR, tobewrapped: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn Type(&self) -> windows_core::Result; fn StrValue(&self) -> windows_core::Result; fn ObjectId(&self) -> windows_core::Result; @@ -1054,7 +1054,7 @@ impl IAlternativeName_Vtbl { } unsafe extern "system" fn InitializeFromOtherName(this: *mut core::ffi::c_void, pobjectid: *mut core::ffi::c_void, encoding: EncodingType, strrawdata: *mut core::ffi::c_void, tobewrapped: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAlternativeName_Impl::InitializeFromOtherName(this, windows_core::from_raw_borrowed(&pobjectid), core::mem::transmute_copy(&encoding), core::mem::transmute(&strrawdata), core::mem::transmute_copy(&tobewrapped)).into() + IAlternativeName_Impl::InitializeFromOtherName(this, core::mem::transmute_copy(&pobjectid), core::mem::transmute_copy(&encoding), core::mem::transmute(&strrawdata), core::mem::transmute_copy(&tobewrapped)).into() } unsafe extern "system" fn Type(this: *mut core::ffi::c_void, pvalue: *mut AlternativeNameType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1167,7 +1167,7 @@ pub trait IAlternativeNames_Impl: super::super::super::System::Com::IDispatch_Im fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&IAlternativeName>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, IAlternativeName>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } @@ -1206,7 +1206,7 @@ impl IAlternativeNames_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAlternativeNames_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + IAlternativeNames_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5155,7 +5155,7 @@ pub trait ICertProperties_Impl: super::super::super::System::Com::IDispatch_Impl fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&ICertProperty>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, ICertProperty>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn InitializeFromCertificate(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL, encoding: EncodingType, strcertificate: &windows_core::BSTR) -> windows_core::Result<()>; @@ -5195,7 +5195,7 @@ impl ICertProperties_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICertProperties_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + ICertProperties_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6063,7 +6063,7 @@ pub struct ICertPropertyKeyProvInfo_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ICertPropertyKeyProvInfo_Impl: ICertProperty_Impl { - fn Initialize(&self, pvalue: Option<&IX509PrivateKey>) -> windows_core::Result<()>; + fn Initialize(&self, pvalue: windows_core::Ref<'_, IX509PrivateKey>) -> windows_core::Result<()>; fn PrivateKey(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -6071,7 +6071,7 @@ impl ICertPropertyKeyProvInfo_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICertPropertyKeyProvInfo_Impl::Initialize(this, windows_core::from_raw_borrowed(&pvalue)).into() + ICertPropertyKeyProvInfo_Impl::Initialize(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn PrivateKey(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7671,7 +7671,7 @@ pub trait ICertificatePolicies_Impl: super::super::super::System::Com::IDispatch fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&ICertificatePolicy>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, ICertificatePolicy>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } @@ -7710,7 +7710,7 @@ impl ICertificatePolicies_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICertificatePolicies_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + ICertificatePolicies_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7774,7 +7774,7 @@ pub struct ICertificatePolicy_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ICertificatePolicy_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Initialize(&self, pvalue: Option<&IObjectId>) -> windows_core::Result<()>; + fn Initialize(&self, pvalue: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; fn ObjectId(&self) -> windows_core::Result; fn PolicyQualifiers(&self) -> windows_core::Result; } @@ -7783,7 +7783,7 @@ impl ICertificatePolicy_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICertificatePolicy_Impl::Initialize(this, windows_core::from_raw_borrowed(&pvalue)).into() + ICertificatePolicy_Impl::Initialize(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn ObjectId(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7881,7 +7881,7 @@ pub trait ICertificationAuthorities_Impl: super::super::super::System::Com::IDis fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&ICertificationAuthority>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, ICertificationAuthority>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn ComputeSiteCosts(&self) -> windows_core::Result<()>; @@ -7922,7 +7922,7 @@ impl ICertificationAuthorities_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICertificationAuthorities_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + ICertificationAuthorities_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8062,8 +8062,8 @@ pub struct ICryptAttribute_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ICryptAttribute_Impl: super::super::super::System::Com::IDispatch_Impl { - fn InitializeFromObjectId(&self, pobjectid: Option<&IObjectId>) -> windows_core::Result<()>; - fn InitializeFromValues(&self, pattributes: Option<&IX509Attributes>) -> windows_core::Result<()>; + fn InitializeFromObjectId(&self, pobjectid: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; + fn InitializeFromValues(&self, pattributes: windows_core::Ref<'_, IX509Attributes>) -> windows_core::Result<()>; fn ObjectId(&self) -> windows_core::Result; fn Values(&self) -> windows_core::Result; } @@ -8072,11 +8072,11 @@ impl ICryptAttribute_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromObjectId(this: *mut core::ffi::c_void, pobjectid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICryptAttribute_Impl::InitializeFromObjectId(this, windows_core::from_raw_borrowed(&pobjectid)).into() + ICryptAttribute_Impl::InitializeFromObjectId(this, core::mem::transmute_copy(&pobjectid)).into() } unsafe extern "system" fn InitializeFromValues(this: *mut core::ffi::c_void, pattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICryptAttribute_Impl::InitializeFromValues(this, windows_core::from_raw_borrowed(&pattributes)).into() + ICryptAttribute_Impl::InitializeFromValues(this, core::mem::transmute_copy(&pattributes)).into() } unsafe extern "system" fn ObjectId(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8181,11 +8181,11 @@ pub trait ICryptAttributes_Impl: super::super::super::System::Com::IDispatch_Imp fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&ICryptAttribute>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, ICryptAttribute>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn get_IndexByObjectId(&self, pobjectid: Option<&IObjectId>) -> windows_core::Result; - fn AddRange(&self, pvalue: Option<&ICryptAttributes>) -> windows_core::Result<()>; + fn get_IndexByObjectId(&self, pobjectid: windows_core::Ref<'_, IObjectId>) -> windows_core::Result; + fn AddRange(&self, pvalue: windows_core::Ref<'_, ICryptAttributes>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ICryptAttributes_Vtbl { @@ -8222,7 +8222,7 @@ impl ICryptAttributes_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICryptAttributes_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + ICryptAttributes_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8234,7 +8234,7 @@ impl ICryptAttributes_Vtbl { } unsafe extern "system" fn get_IndexByObjectId(this: *mut core::ffi::c_void, pobjectid: *mut core::ffi::c_void, pindex: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICryptAttributes_Impl::get_IndexByObjectId(this, windows_core::from_raw_borrowed(&pobjectid)) { + match ICryptAttributes_Impl::get_IndexByObjectId(this, core::mem::transmute_copy(&pobjectid)) { Ok(ok__) => { pindex.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8244,7 +8244,7 @@ impl ICryptAttributes_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICryptAttributes_Impl::AddRange(this, windows_core::from_raw_borrowed(&pvalue)).into() + ICryptAttributes_Impl::AddRange(this, core::mem::transmute_copy(&pvalue)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -8536,11 +8536,11 @@ pub trait ICspAlgorithms_Impl: super::super::super::System::Com::IDispatch_Impl fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&ICspAlgorithm>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, ICspAlgorithm>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn get_ItemByName(&self, strname: &windows_core::BSTR) -> windows_core::Result; - fn get_IndexByObjectId(&self, pobjectid: Option<&IObjectId>) -> windows_core::Result; + fn get_IndexByObjectId(&self, pobjectid: windows_core::Ref<'_, IObjectId>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ICspAlgorithms_Vtbl { @@ -8577,7 +8577,7 @@ impl ICspAlgorithms_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICspAlgorithms_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + ICspAlgorithms_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8599,7 +8599,7 @@ impl ICspAlgorithms_Vtbl { } unsafe extern "system" fn get_IndexByObjectId(this: *mut core::ffi::c_void, pobjectid: *mut core::ffi::c_void, pindex: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICspAlgorithms_Impl::get_IndexByObjectId(this, windows_core::from_raw_borrowed(&pobjectid)) { + match ICspAlgorithms_Impl::get_IndexByObjectId(this, core::mem::transmute_copy(&pobjectid)) { Ok(ok__) => { pindex.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8736,7 +8736,7 @@ pub struct ICspInformation_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ICspInformation_Impl: super::super::super::System::Com::IDispatch_Impl { fn InitializeFromName(&self, strname: &windows_core::BSTR) -> windows_core::Result<()>; - fn InitializeFromType(&self, r#type: X509ProviderType, palgorithm: Option<&IObjectId>, machinecontext: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn InitializeFromType(&self, r#type: X509ProviderType, palgorithm: windows_core::Ref<'_, IObjectId>, machinecontext: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn CspAlgorithms(&self) -> windows_core::Result; fn HasHardwareRandomNumberGenerator(&self) -> windows_core::Result; fn IsHardwareDevice(&self) -> windows_core::Result; @@ -8751,7 +8751,7 @@ pub trait ICspInformation_Impl: super::super::super::System::Com::IDispatch_Impl fn IsSmartCard(&self) -> windows_core::Result; fn GetDefaultSecurityDescriptor(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; fn LegacyCsp(&self) -> windows_core::Result; - fn GetCspStatusFromOperations(&self, palgorithm: Option<&IObjectId>, operations: AlgorithmOperationFlags) -> windows_core::Result; + fn GetCspStatusFromOperations(&self, palgorithm: windows_core::Ref<'_, IObjectId>, operations: AlgorithmOperationFlags) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ICspInformation_Vtbl { @@ -8762,7 +8762,7 @@ impl ICspInformation_Vtbl { } unsafe extern "system" fn InitializeFromType(this: *mut core::ffi::c_void, r#type: X509ProviderType, palgorithm: *mut core::ffi::c_void, machinecontext: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICspInformation_Impl::InitializeFromType(this, core::mem::transmute_copy(&r#type), windows_core::from_raw_borrowed(&palgorithm), core::mem::transmute_copy(&machinecontext)).into() + ICspInformation_Impl::InitializeFromType(this, core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&palgorithm), core::mem::transmute_copy(&machinecontext)).into() } unsafe extern "system" fn CspAlgorithms(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8906,7 +8906,7 @@ impl ICspInformation_Vtbl { } unsafe extern "system" fn GetCspStatusFromOperations(this: *mut core::ffi::c_void, palgorithm: *mut core::ffi::c_void, operations: AlgorithmOperationFlags, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICspInformation_Impl::GetCspStatusFromOperations(this, windows_core::from_raw_borrowed(&palgorithm), core::mem::transmute_copy(&operations)) { + match ICspInformation_Impl::GetCspStatusFromOperations(this, core::mem::transmute_copy(&palgorithm), core::mem::transmute_copy(&operations)) { Ok(ok__) => { ppvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9033,15 +9033,15 @@ pub trait ICspInformations_Impl: super::super::super::System::Com::IDispatch_Imp fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&ICspInformation>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, ICspInformation>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn AddAvailableCsps(&self) -> windows_core::Result<()>; fn get_ItemByName(&self, strname: &windows_core::BSTR) -> windows_core::Result; fn GetCspStatusFromProviderName(&self, strprovidername: &windows_core::BSTR, legacykeyspec: X509KeySpec) -> windows_core::Result; - fn GetCspStatusesFromOperations(&self, operations: AlgorithmOperationFlags, pcspinformation: Option<&ICspInformation>) -> windows_core::Result; - fn GetEncryptionCspAlgorithms(&self, pcspinformation: Option<&ICspInformation>) -> windows_core::Result; - fn GetHashAlgorithms(&self, pcspinformation: Option<&ICspInformation>) -> windows_core::Result; + fn GetCspStatusesFromOperations(&self, operations: AlgorithmOperationFlags, pcspinformation: windows_core::Ref<'_, ICspInformation>) -> windows_core::Result; + fn GetEncryptionCspAlgorithms(&self, pcspinformation: windows_core::Ref<'_, ICspInformation>) -> windows_core::Result; + fn GetHashAlgorithms(&self, pcspinformation: windows_core::Ref<'_, ICspInformation>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ICspInformations_Vtbl { @@ -9078,7 +9078,7 @@ impl ICspInformations_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICspInformations_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + ICspInformations_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9114,7 +9114,7 @@ impl ICspInformations_Vtbl { } unsafe extern "system" fn GetCspStatusesFromOperations(this: *mut core::ffi::c_void, operations: AlgorithmOperationFlags, pcspinformation: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICspInformations_Impl::GetCspStatusesFromOperations(this, core::mem::transmute_copy(&operations), windows_core::from_raw_borrowed(&pcspinformation)) { + match ICspInformations_Impl::GetCspStatusesFromOperations(this, core::mem::transmute_copy(&operations), core::mem::transmute_copy(&pcspinformation)) { Ok(ok__) => { ppvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9124,7 +9124,7 @@ impl ICspInformations_Vtbl { } unsafe extern "system" fn GetEncryptionCspAlgorithms(this: *mut core::ffi::c_void, pcspinformation: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICspInformations_Impl::GetEncryptionCspAlgorithms(this, windows_core::from_raw_borrowed(&pcspinformation)) { + match ICspInformations_Impl::GetEncryptionCspAlgorithms(this, core::mem::transmute_copy(&pcspinformation)) { Ok(ok__) => { ppvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9134,7 +9134,7 @@ impl ICspInformations_Vtbl { } unsafe extern "system" fn GetHashAlgorithms(this: *mut core::ffi::c_void, pcspinformation: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICspInformations_Impl::GetHashAlgorithms(this, windows_core::from_raw_borrowed(&pcspinformation)) { + match ICspInformations_Impl::GetHashAlgorithms(this, core::mem::transmute_copy(&pcspinformation)) { Ok(ok__) => { ppvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9222,7 +9222,7 @@ pub struct ICspStatus_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ICspStatus_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Initialize(&self, pcsp: Option<&ICspInformation>, palgorithm: Option<&ICspAlgorithm>) -> windows_core::Result<()>; + fn Initialize(&self, pcsp: windows_core::Ref<'_, ICspInformation>, palgorithm: windows_core::Ref<'_, ICspAlgorithm>) -> windows_core::Result<()>; fn Ordinal(&self) -> windows_core::Result; fn SetOrdinal(&self, value: i32) -> windows_core::Result<()>; fn CspAlgorithm(&self) -> windows_core::Result; @@ -9235,7 +9235,7 @@ impl ICspStatus_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pcsp: *mut core::ffi::c_void, palgorithm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICspStatus_Impl::Initialize(this, windows_core::from_raw_borrowed(&pcsp), windows_core::from_raw_borrowed(&palgorithm)).into() + ICspStatus_Impl::Initialize(this, core::mem::transmute_copy(&pcsp), core::mem::transmute_copy(&palgorithm)).into() } unsafe extern "system" fn Ordinal(this: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9385,13 +9385,13 @@ pub trait ICspStatuses_Impl: super::super::super::System::Com::IDispatch_Impl { fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&ICspStatus>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, ICspStatus>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn get_ItemByName(&self, strcspname: &windows_core::BSTR, stralgorithmname: &windows_core::BSTR) -> windows_core::Result; fn get_ItemByOrdinal(&self, ordinal: i32) -> windows_core::Result; fn get_ItemByOperations(&self, strcspname: &windows_core::BSTR, stralgorithmname: &windows_core::BSTR, operations: AlgorithmOperationFlags) -> windows_core::Result; - fn get_ItemByProvider(&self, pcspstatus: Option<&ICspStatus>) -> windows_core::Result; + fn get_ItemByProvider(&self, pcspstatus: windows_core::Ref<'_, ICspStatus>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ICspStatuses_Vtbl { @@ -9428,7 +9428,7 @@ impl ICspStatuses_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICspStatuses_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + ICspStatuses_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9470,7 +9470,7 @@ impl ICspStatuses_Vtbl { } unsafe extern "system" fn get_ItemByProvider(this: *mut core::ffi::c_void, pcspstatus: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICspStatuses_Impl::get_ItemByProvider(this, windows_core::from_raw_borrowed(&pcspstatus)) { + match ICspStatuses_Impl::get_ItemByProvider(this, core::mem::transmute_copy(&pcspstatus)) { Ok(ok__) => { ppvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12715,10 +12715,10 @@ pub trait IObjectIds_Impl: super::super::super::System::Com::IDispatch_Impl { fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&IObjectId>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn AddRange(&self, pvalue: Option<&IObjectIds>) -> windows_core::Result<()>; + fn AddRange(&self, pvalue: windows_core::Ref<'_, IObjectIds>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IObjectIds_Vtbl { @@ -12755,7 +12755,7 @@ impl IObjectIds_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjectIds_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + IObjectIds_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12767,7 +12767,7 @@ impl IObjectIds_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjectIds_Impl::AddRange(this, windows_core::from_raw_borrowed(&pvalue)).into() + IObjectIds_Impl::AddRange(this, core::mem::transmute_copy(&pvalue)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -12953,7 +12953,7 @@ pub trait IPolicyQualifiers_Impl: super::super::super::System::Com::IDispatch_Im fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&IPolicyQualifier>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, IPolicyQualifier>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } @@ -12992,7 +12992,7 @@ impl IPolicyQualifiers_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPolicyQualifiers_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + IPolicyQualifiers_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13275,10 +13275,10 @@ pub trait ISignerCertificates_Impl: super::super::super::System::Com::IDispatch_ fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&ISignerCertificate>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, ISignerCertificate>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn Find(&self, psignercert: Option<&ISignerCertificate>) -> windows_core::Result; + fn Find(&self, psignercert: windows_core::Ref<'_, ISignerCertificate>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISignerCertificates_Vtbl { @@ -13315,7 +13315,7 @@ impl ISignerCertificates_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISignerCertificates_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + ISignerCertificates_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13327,7 +13327,7 @@ impl ISignerCertificates_Vtbl { } unsafe extern "system" fn Find(this: *mut core::ffi::c_void, psignercert: *mut core::ffi::c_void, pisignercert: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISignerCertificates_Impl::Find(this, windows_core::from_raw_borrowed(&psignercert)) { + match ISignerCertificates_Impl::Find(this, core::mem::transmute_copy(&psignercert)) { Ok(ok__) => { pisignercert.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -13417,10 +13417,10 @@ pub trait ISmimeCapabilities_Impl: super::super::super::System::Com::IDispatch_I fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&ISmimeCapability>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, ISmimeCapability>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn AddFromCsp(&self, pvalue: Option<&ICspInformation>) -> windows_core::Result<()>; + fn AddFromCsp(&self, pvalue: windows_core::Ref<'_, ICspInformation>) -> windows_core::Result<()>; fn AddAvailableSmimeCapabilities(&self, machinecontext: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -13458,7 +13458,7 @@ impl ISmimeCapabilities_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISmimeCapabilities_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + ISmimeCapabilities_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13470,7 +13470,7 @@ impl ISmimeCapabilities_Vtbl { } unsafe extern "system" fn AddFromCsp(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISmimeCapabilities_Impl::AddFromCsp(this, windows_core::from_raw_borrowed(&pvalue)).into() + ISmimeCapabilities_Impl::AddFromCsp(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn AddAvailableSmimeCapabilities(this: *mut core::ffi::c_void, machinecontext: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13532,7 +13532,7 @@ pub struct ISmimeCapability_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISmimeCapability_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Initialize(&self, pobjectid: Option<&IObjectId>, bitcount: i32) -> windows_core::Result<()>; + fn Initialize(&self, pobjectid: windows_core::Ref<'_, IObjectId>, bitcount: i32) -> windows_core::Result<()>; fn ObjectId(&self) -> windows_core::Result; fn BitCount(&self) -> windows_core::Result; } @@ -13541,7 +13541,7 @@ impl ISmimeCapability_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pobjectid: *mut core::ffi::c_void, bitcount: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISmimeCapability_Impl::Initialize(this, windows_core::from_raw_borrowed(&pobjectid), core::mem::transmute_copy(&bitcount)).into() + ISmimeCapability_Impl::Initialize(this, core::mem::transmute_copy(&pobjectid), core::mem::transmute_copy(&bitcount)).into() } unsafe extern "system" fn ObjectId(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13703,7 +13703,7 @@ pub struct IX509Attribute_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509Attribute_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Initialize(&self, pobjectid: Option<&IObjectId>, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; + fn Initialize(&self, pobjectid: windows_core::Ref<'_, IObjectId>, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn ObjectId(&self) -> windows_core::Result; fn get_RawData(&self, encoding: EncodingType) -> windows_core::Result; } @@ -13712,7 +13712,7 @@ impl IX509Attribute_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pobjectid: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509Attribute_Impl::Initialize(this, windows_core::from_raw_borrowed(&pobjectid), core::mem::transmute_copy(&encoding), core::mem::transmute(&strencodeddata)).into() + IX509Attribute_Impl::Initialize(this, core::mem::transmute_copy(&pobjectid), core::mem::transmute_copy(&encoding), core::mem::transmute(&strencodeddata)).into() } unsafe extern "system" fn ObjectId(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13795,7 +13795,7 @@ pub struct IX509AttributeArchiveKey_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509AttributeArchiveKey_Impl: IX509Attribute_Impl { - fn InitializeEncode(&self, pkey: Option<&IX509PrivateKey>, encoding: EncodingType, strcaxcert: &windows_core::BSTR, palgorithm: Option<&IObjectId>, encryptionstrength: i32) -> windows_core::Result<()>; + fn InitializeEncode(&self, pkey: windows_core::Ref<'_, IX509PrivateKey>, encoding: EncodingType, strcaxcert: &windows_core::BSTR, palgorithm: windows_core::Ref<'_, IObjectId>, encryptionstrength: i32) -> windows_core::Result<()>; fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn get_EncryptedKeyBlob(&self, encoding: EncodingType) -> windows_core::Result; fn EncryptionAlgorithm(&self) -> windows_core::Result; @@ -13806,7 +13806,7 @@ impl IX509AttributeArchiveKey_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeEncode(this: *mut core::ffi::c_void, pkey: *mut core::ffi::c_void, encoding: EncodingType, strcaxcert: *mut core::ffi::c_void, palgorithm: *mut core::ffi::c_void, encryptionstrength: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509AttributeArchiveKey_Impl::InitializeEncode(this, windows_core::from_raw_borrowed(&pkey), core::mem::transmute_copy(&encoding), core::mem::transmute(&strcaxcert), windows_core::from_raw_borrowed(&palgorithm), core::mem::transmute_copy(&encryptionstrength)).into() + IX509AttributeArchiveKey_Impl::InitializeEncode(this, core::mem::transmute_copy(&pkey), core::mem::transmute_copy(&encoding), core::mem::transmute(&strcaxcert), core::mem::transmute_copy(&palgorithm), core::mem::transmute_copy(&encryptionstrength)).into() } unsafe extern "system" fn InitializeDecode(this: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14195,7 +14195,7 @@ pub struct IX509AttributeExtensions_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509AttributeExtensions_Impl: IX509Attribute_Impl { - fn InitializeEncode(&self, pextensions: Option<&IX509Extensions>) -> windows_core::Result<()>; + fn InitializeEncode(&self, pextensions: windows_core::Ref<'_, IX509Extensions>) -> windows_core::Result<()>; fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn X509Extensions(&self) -> windows_core::Result; } @@ -14204,7 +14204,7 @@ impl IX509AttributeExtensions_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeEncode(this: *mut core::ffi::c_void, pextensions: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509AttributeExtensions_Impl::InitializeEncode(this, windows_core::from_raw_borrowed(&pextensions)).into() + IX509AttributeExtensions_Impl::InitializeEncode(this, core::mem::transmute_copy(&pextensions)).into() } unsafe extern "system" fn InitializeDecode(this: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14431,7 +14431,7 @@ pub trait IX509Attributes_Impl: super::super::super::System::Com::IDispatch_Impl fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&IX509Attribute>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, IX509Attribute>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } @@ -14470,7 +14470,7 @@ impl IX509Attributes_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509Attributes_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + IX509Attributes_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14655,9 +14655,9 @@ pub trait IX509CertificateRequest_Impl: super::super::super::System::Com::IDispa fn ClientId(&self) -> windows_core::Result; fn SetClientId(&self, value: RequestClientInfoClientId) -> windows_core::Result<()>; fn CspInformations(&self) -> windows_core::Result; - fn SetCspInformations(&self, pvalue: Option<&ICspInformations>) -> windows_core::Result<()>; + fn SetCspInformations(&self, pvalue: windows_core::Ref<'_, ICspInformations>) -> windows_core::Result<()>; fn HashAlgorithm(&self) -> windows_core::Result; - fn SetHashAlgorithm(&self, pvalue: Option<&IObjectId>) -> windows_core::Result<()>; + fn SetHashAlgorithm(&self, pvalue: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; fn AlternateSignatureAlgorithm(&self) -> windows_core::Result; fn SetAlternateSignatureAlgorithm(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn get_RawData(&self, encoding: EncodingType) -> windows_core::Result; @@ -14803,7 +14803,7 @@ impl IX509CertificateRequest_Vtbl { } unsafe extern "system" fn SetCspInformations(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequest_Impl::SetCspInformations(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRequest_Impl::SetCspInformations(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn HashAlgorithm(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14817,7 +14817,7 @@ impl IX509CertificateRequest_Vtbl { } unsafe extern "system" fn SetHashAlgorithm(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequest_Impl::SetHashAlgorithm(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRequest_Impl::SetHashAlgorithm(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn AlternateSignatureAlgorithm(this: *mut core::ffi::c_void, pvalue: *mut super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14957,9 +14957,9 @@ pub struct IX509CertificateRequestCertificate_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509CertificateRequestCertificate_Impl: IX509CertificateRequestPkcs10_Impl { - fn CheckPublicKeySignature(&self, ppublickey: Option<&IX509PublicKey>) -> windows_core::Result<()>; + fn CheckPublicKeySignature(&self, ppublickey: windows_core::Ref<'_, IX509PublicKey>) -> windows_core::Result<()>; fn Issuer(&self) -> windows_core::Result; - fn SetIssuer(&self, pvalue: Option<&IX500DistinguishedName>) -> windows_core::Result<()>; + fn SetIssuer(&self, pvalue: windows_core::Ref<'_, IX500DistinguishedName>) -> windows_core::Result<()>; fn NotBefore(&self) -> windows_core::Result; fn SetNotBefore(&self, value: f64) -> windows_core::Result<()>; fn NotAfter(&self) -> windows_core::Result; @@ -14967,14 +14967,14 @@ pub trait IX509CertificateRequestCertificate_Impl: IX509CertificateRequestPkcs10 fn get_SerialNumber(&self, encoding: EncodingType) -> windows_core::Result; fn put_SerialNumber(&self, encoding: EncodingType, value: &windows_core::BSTR) -> windows_core::Result<()>; fn SignerCertificate(&self) -> windows_core::Result; - fn SetSignerCertificate(&self, pvalue: Option<&ISignerCertificate>) -> windows_core::Result<()>; + fn SetSignerCertificate(&self, pvalue: windows_core::Ref<'_, ISignerCertificate>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IX509CertificateRequestCertificate_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CheckPublicKeySignature(this: *mut core::ffi::c_void, ppublickey: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCertificate_Impl::CheckPublicKeySignature(this, windows_core::from_raw_borrowed(&ppublickey)).into() + IX509CertificateRequestCertificate_Impl::CheckPublicKeySignature(this, core::mem::transmute_copy(&ppublickey)).into() } unsafe extern "system" fn Issuer(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14988,7 +14988,7 @@ impl IX509CertificateRequestCertificate_Vtbl { } unsafe extern "system" fn SetIssuer(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCertificate_Impl::SetIssuer(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRequestCertificate_Impl::SetIssuer(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn NotBefore(this: *mut core::ffi::c_void, pvalue: *mut f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15044,7 +15044,7 @@ impl IX509CertificateRequestCertificate_Vtbl { } unsafe extern "system" fn SetSignerCertificate(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCertificate_Impl::SetSignerCertificate(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRequestCertificate_Impl::SetSignerCertificate(this, core::mem::transmute_copy(&pvalue)).into() } Self { base__: IX509CertificateRequestPkcs10_Vtbl::new::(), @@ -15115,8 +15115,8 @@ pub struct IX509CertificateRequestCertificate2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509CertificateRequestCertificate2_Impl: IX509CertificateRequestCertificate_Impl { - fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: Option<&IX509EnrollmentPolicyServer>, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; - fn InitializeFromPrivateKeyTemplate(&self, context: X509CertificateEnrollmentContext, pprivatekey: Option<&IX509PrivateKey>, ppolicyserver: Option<&IX509EnrollmentPolicyServer>, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; + fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: windows_core::Ref<'_, IX509EnrollmentPolicyServer>, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; + fn InitializeFromPrivateKeyTemplate(&self, context: X509CertificateEnrollmentContext, pprivatekey: windows_core::Ref<'_, IX509PrivateKey>, ppolicyserver: windows_core::Ref<'_, IX509EnrollmentPolicyServer>, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; fn PolicyServer(&self) -> windows_core::Result; fn Template(&self) -> windows_core::Result; } @@ -15125,11 +15125,11 @@ impl IX509CertificateRequestCertificate2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromTemplate(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, ppolicyserver: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCertificate2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&ppolicyserver), windows_core::from_raw_borrowed(&ptemplate)).into() + IX509CertificateRequestCertificate2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&ppolicyserver), core::mem::transmute_copy(&ptemplate)).into() } unsafe extern "system" fn InitializeFromPrivateKeyTemplate(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, pprivatekey: *mut core::ffi::c_void, ppolicyserver: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCertificate2_Impl::InitializeFromPrivateKeyTemplate(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&pprivatekey), windows_core::from_raw_borrowed(&ppolicyserver), windows_core::from_raw_borrowed(&ptemplate)).into() + IX509CertificateRequestCertificate2_Impl::InitializeFromPrivateKeyTemplate(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&pprivatekey), core::mem::transmute_copy(&ppolicyserver), core::mem::transmute_copy(&ptemplate)).into() } unsafe extern "system" fn PolicyServer(this: *mut core::ffi::c_void, pppolicyserver: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15300,7 +15300,7 @@ pub struct IX509CertificateRequestCmc_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509CertificateRequestCmc_Impl: IX509CertificateRequestPkcs7_Impl { - fn InitializeFromInnerRequestTemplateName(&self, pinnerrequest: Option<&IX509CertificateRequest>, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()>; + fn InitializeFromInnerRequestTemplateName(&self, pinnerrequest: windows_core::Ref<'_, IX509CertificateRequest>, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()>; fn TemplateObjectId(&self) -> windows_core::Result; fn NullSigned(&self) -> windows_core::Result; fn CryptAttributes(&self) -> windows_core::Result; @@ -15318,7 +15318,7 @@ pub trait IX509CertificateRequestCmc_Impl: IX509CertificateRequestPkcs7_Impl { fn get_KeyArchivalCertificate(&self, encoding: EncodingType) -> windows_core::Result; fn put_KeyArchivalCertificate(&self, encoding: EncodingType, value: &windows_core::BSTR) -> windows_core::Result<()>; fn EncryptionAlgorithm(&self) -> windows_core::Result; - fn SetEncryptionAlgorithm(&self, pvalue: Option<&IObjectId>) -> windows_core::Result<()>; + fn SetEncryptionAlgorithm(&self, pvalue: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; fn EncryptionStrength(&self) -> windows_core::Result; fn SetEncryptionStrength(&self, value: i32) -> windows_core::Result<()>; fn get_EncryptedKeyHash(&self, encoding: EncodingType) -> windows_core::Result; @@ -15329,7 +15329,7 @@ impl IX509CertificateRequestCmc_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromInnerRequestTemplateName(this: *mut core::ffi::c_void, pinnerrequest: *mut core::ffi::c_void, strtemplatename: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCmc_Impl::InitializeFromInnerRequestTemplateName(this, windows_core::from_raw_borrowed(&pinnerrequest), core::mem::transmute(&strtemplatename)).into() + IX509CertificateRequestCmc_Impl::InitializeFromInnerRequestTemplateName(this, core::mem::transmute_copy(&pinnerrequest), core::mem::transmute(&strtemplatename)).into() } unsafe extern "system" fn TemplateObjectId(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15479,7 +15479,7 @@ impl IX509CertificateRequestCmc_Vtbl { } unsafe extern "system" fn SetEncryptionAlgorithm(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCmc_Impl::SetEncryptionAlgorithm(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRequestCmc_Impl::SetEncryptionAlgorithm(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn EncryptionStrength(this: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15607,23 +15607,23 @@ pub struct IX509CertificateRequestCmc2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509CertificateRequestCmc2_Impl: IX509CertificateRequestCmc_Impl { - fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: Option<&IX509EnrollmentPolicyServer>, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; - fn InitializeFromInnerRequestTemplate(&self, pinnerrequest: Option<&IX509CertificateRequest>, ppolicyserver: Option<&IX509EnrollmentPolicyServer>, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; + fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: windows_core::Ref<'_, IX509EnrollmentPolicyServer>, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; + fn InitializeFromInnerRequestTemplate(&self, pinnerrequest: windows_core::Ref<'_, IX509CertificateRequest>, ppolicyserver: windows_core::Ref<'_, IX509EnrollmentPolicyServer>, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; fn PolicyServer(&self) -> windows_core::Result; fn Template(&self) -> windows_core::Result; fn CheckSignature(&self, allowedsignaturetypes: Pkcs10AllowedSignatureTypes) -> windows_core::Result<()>; - fn CheckCertificateSignature(&self, psignercertificate: Option<&ISignerCertificate>, validatecertificatechain: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn CheckCertificateSignature(&self, psignercertificate: windows_core::Ref<'_, ISignerCertificate>, validatecertificatechain: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IX509CertificateRequestCmc2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromTemplate(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, ppolicyserver: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCmc2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&ppolicyserver), windows_core::from_raw_borrowed(&ptemplate)).into() + IX509CertificateRequestCmc2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&ppolicyserver), core::mem::transmute_copy(&ptemplate)).into() } unsafe extern "system" fn InitializeFromInnerRequestTemplate(this: *mut core::ffi::c_void, pinnerrequest: *mut core::ffi::c_void, ppolicyserver: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCmc2_Impl::InitializeFromInnerRequestTemplate(this, windows_core::from_raw_borrowed(&pinnerrequest), windows_core::from_raw_borrowed(&ppolicyserver), windows_core::from_raw_borrowed(&ptemplate)).into() + IX509CertificateRequestCmc2_Impl::InitializeFromInnerRequestTemplate(this, core::mem::transmute_copy(&pinnerrequest), core::mem::transmute_copy(&ppolicyserver), core::mem::transmute_copy(&ptemplate)).into() } unsafe extern "system" fn PolicyServer(this: *mut core::ffi::c_void, pppolicyserver: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15651,7 +15651,7 @@ impl IX509CertificateRequestCmc2_Vtbl { } unsafe extern "system" fn CheckCertificateSignature(this: *mut core::ffi::c_void, psignercertificate: *mut core::ffi::c_void, validatecertificatechain: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestCmc2_Impl::CheckCertificateSignature(this, windows_core::from_raw_borrowed(&psignercertificate), core::mem::transmute_copy(&validatecertificatechain)).into() + IX509CertificateRequestCmc2_Impl::CheckCertificateSignature(this, core::mem::transmute_copy(&psignercertificate), core::mem::transmute_copy(&validatecertificatechain)).into() } Self { base__: IX509CertificateRequestCmc_Vtbl::new::(), @@ -15831,8 +15831,8 @@ pub struct IX509CertificateRequestPkcs10_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509CertificateRequestPkcs10_Impl: IX509CertificateRequest_Impl { fn InitializeFromTemplateName(&self, context: X509CertificateEnrollmentContext, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()>; - fn InitializeFromPrivateKey(&self, context: X509CertificateEnrollmentContext, pprivatekey: Option<&IX509PrivateKey>, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()>; - fn InitializeFromPublicKey(&self, context: X509CertificateEnrollmentContext, ppublickey: Option<&IX509PublicKey>, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()>; + fn InitializeFromPrivateKey(&self, context: X509CertificateEnrollmentContext, pprivatekey: windows_core::Ref<'_, IX509PrivateKey>, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()>; + fn InitializeFromPublicKey(&self, context: X509CertificateEnrollmentContext, ppublickey: windows_core::Ref<'_, IX509PublicKey>, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()>; fn InitializeFromCertificate(&self, context: X509CertificateEnrollmentContext, strcertificate: &windows_core::BSTR, encoding: EncodingType, inheritoptions: X509RequestInheritOptions) -> windows_core::Result<()>; fn InitializeDecode(&self, strencodeddata: &windows_core::BSTR, encoding: EncodingType) -> windows_core::Result<()>; fn CheckSignature(&self, allowedsignaturetypes: Pkcs10AllowedSignatureTypes) -> windows_core::Result<()>; @@ -15844,7 +15844,7 @@ pub trait IX509CertificateRequestPkcs10_Impl: IX509CertificateRequest_Impl { fn ReuseKey(&self) -> windows_core::Result; fn get_OldCertificate(&self, encoding: EncodingType) -> windows_core::Result; fn Subject(&self) -> windows_core::Result; - fn SetSubject(&self, pvalue: Option<&IX500DistinguishedName>) -> windows_core::Result<()>; + fn SetSubject(&self, pvalue: windows_core::Ref<'_, IX500DistinguishedName>) -> windows_core::Result<()>; fn CspStatuses(&self) -> windows_core::Result; fn SmimeCapabilities(&self) -> windows_core::Result; fn SetSmimeCapabilities(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; @@ -15868,11 +15868,11 @@ impl IX509CertificateRequestPkcs10_Vtbl { } unsafe extern "system" fn InitializeFromPrivateKey(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, pprivatekey: *mut core::ffi::c_void, strtemplatename: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs10_Impl::InitializeFromPrivateKey(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&pprivatekey), core::mem::transmute(&strtemplatename)).into() + IX509CertificateRequestPkcs10_Impl::InitializeFromPrivateKey(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&pprivatekey), core::mem::transmute(&strtemplatename)).into() } unsafe extern "system" fn InitializeFromPublicKey(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, ppublickey: *mut core::ffi::c_void, strtemplatename: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs10_Impl::InitializeFromPublicKey(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&ppublickey), core::mem::transmute(&strtemplatename)).into() + IX509CertificateRequestPkcs10_Impl::InitializeFromPublicKey(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&ppublickey), core::mem::transmute(&strtemplatename)).into() } unsafe extern "system" fn InitializeFromCertificate(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, strcertificate: *mut core::ffi::c_void, encoding: EncodingType, inheritoptions: X509RequestInheritOptions) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15968,7 +15968,7 @@ impl IX509CertificateRequestPkcs10_Vtbl { } unsafe extern "system" fn SetSubject(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs10_Impl::SetSubject(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRequestPkcs10_Impl::SetSubject(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn CspStatuses(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16183,9 +16183,9 @@ pub struct IX509CertificateRequestPkcs10V2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509CertificateRequestPkcs10V2_Impl: IX509CertificateRequestPkcs10_Impl { - fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: Option<&IX509EnrollmentPolicyServer>, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; - fn InitializeFromPrivateKeyTemplate(&self, context: X509CertificateEnrollmentContext, pprivatekey: Option<&IX509PrivateKey>, ppolicyserver: Option<&IX509EnrollmentPolicyServer>, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; - fn InitializeFromPublicKeyTemplate(&self, context: X509CertificateEnrollmentContext, ppublickey: Option<&IX509PublicKey>, ppolicyserver: Option<&IX509EnrollmentPolicyServer>, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; + fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: windows_core::Ref<'_, IX509EnrollmentPolicyServer>, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; + fn InitializeFromPrivateKeyTemplate(&self, context: X509CertificateEnrollmentContext, pprivatekey: windows_core::Ref<'_, IX509PrivateKey>, ppolicyserver: windows_core::Ref<'_, IX509EnrollmentPolicyServer>, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; + fn InitializeFromPublicKeyTemplate(&self, context: X509CertificateEnrollmentContext, ppublickey: windows_core::Ref<'_, IX509PublicKey>, ppolicyserver: windows_core::Ref<'_, IX509EnrollmentPolicyServer>, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; fn PolicyServer(&self) -> windows_core::Result; fn Template(&self) -> windows_core::Result; } @@ -16194,15 +16194,15 @@ impl IX509CertificateRequestPkcs10V2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromTemplate(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, ppolicyserver: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs10V2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&ppolicyserver), windows_core::from_raw_borrowed(&ptemplate)).into() + IX509CertificateRequestPkcs10V2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&ppolicyserver), core::mem::transmute_copy(&ptemplate)).into() } unsafe extern "system" fn InitializeFromPrivateKeyTemplate(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, pprivatekey: *mut core::ffi::c_void, ppolicyserver: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs10V2_Impl::InitializeFromPrivateKeyTemplate(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&pprivatekey), windows_core::from_raw_borrowed(&ppolicyserver), windows_core::from_raw_borrowed(&ptemplate)).into() + IX509CertificateRequestPkcs10V2_Impl::InitializeFromPrivateKeyTemplate(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&pprivatekey), core::mem::transmute_copy(&ppolicyserver), core::mem::transmute_copy(&ptemplate)).into() } unsafe extern "system" fn InitializeFromPublicKeyTemplate(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, ppublickey: *mut core::ffi::c_void, ppolicyserver: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs10V2_Impl::InitializeFromPublicKeyTemplate(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&ppublickey), windows_core::from_raw_borrowed(&ppolicyserver), windows_core::from_raw_borrowed(&ptemplate)).into() + IX509CertificateRequestPkcs10V2_Impl::InitializeFromPublicKeyTemplate(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&ppublickey), core::mem::transmute_copy(&ppolicyserver), core::mem::transmute_copy(&ptemplate)).into() } unsafe extern "system" fn PolicyServer(this: *mut core::ffi::c_void, pppolicyserver: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16318,7 +16318,7 @@ pub trait IX509CertificateRequestPkcs10V3_Impl: IX509CertificateRequestPkcs10V2_ fn get_AttestationEncryptionCertificate(&self, encoding: EncodingType) -> windows_core::Result; fn put_AttestationEncryptionCertificate(&self, encoding: EncodingType, value: &windows_core::BSTR) -> windows_core::Result<()>; fn EncryptionAlgorithm(&self) -> windows_core::Result; - fn SetEncryptionAlgorithm(&self, pvalue: Option<&IObjectId>) -> windows_core::Result<()>; + fn SetEncryptionAlgorithm(&self, pvalue: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; fn EncryptionStrength(&self) -> windows_core::Result; fn SetEncryptionStrength(&self, value: i32) -> windows_core::Result<()>; fn ChallengePassword(&self) -> windows_core::Result; @@ -16368,7 +16368,7 @@ impl IX509CertificateRequestPkcs10V3_Vtbl { } unsafe extern "system" fn SetEncryptionAlgorithm(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs10V3_Impl::SetEncryptionAlgorithm(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRequestPkcs10V3_Impl::SetEncryptionAlgorithm(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn EncryptionStrength(this: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16581,12 +16581,12 @@ pub struct IX509CertificateRequestPkcs7_Vtbl { pub trait IX509CertificateRequestPkcs7_Impl: IX509CertificateRequest_Impl { fn InitializeFromTemplateName(&self, context: X509CertificateEnrollmentContext, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()>; fn InitializeFromCertificate(&self, context: X509CertificateEnrollmentContext, renewalrequest: super::super::super::Foundation::VARIANT_BOOL, strcertificate: &windows_core::BSTR, encoding: EncodingType, inheritoptions: X509RequestInheritOptions) -> windows_core::Result<()>; - fn InitializeFromInnerRequest(&self, pinnerrequest: Option<&IX509CertificateRequest>) -> windows_core::Result<()>; + fn InitializeFromInnerRequest(&self, pinnerrequest: windows_core::Ref<'_, IX509CertificateRequest>) -> windows_core::Result<()>; fn InitializeDecode(&self, strencodeddata: &windows_core::BSTR, encoding: EncodingType) -> windows_core::Result<()>; fn RequesterName(&self) -> windows_core::Result; fn SetRequesterName(&self, value: &windows_core::BSTR) -> windows_core::Result<()>; fn SignerCertificate(&self) -> windows_core::Result; - fn SetSignerCertificate(&self, pvalue: Option<&ISignerCertificate>) -> windows_core::Result<()>; + fn SetSignerCertificate(&self, pvalue: windows_core::Ref<'_, ISignerCertificate>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IX509CertificateRequestPkcs7_Vtbl { @@ -16601,7 +16601,7 @@ impl IX509CertificateRequestPkcs7_Vtbl { } unsafe extern "system" fn InitializeFromInnerRequest(this: *mut core::ffi::c_void, pinnerrequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs7_Impl::InitializeFromInnerRequest(this, windows_core::from_raw_borrowed(&pinnerrequest)).into() + IX509CertificateRequestPkcs7_Impl::InitializeFromInnerRequest(this, core::mem::transmute_copy(&pinnerrequest)).into() } unsafe extern "system" fn InitializeDecode(this: *mut core::ffi::c_void, strencodeddata: *mut core::ffi::c_void, encoding: EncodingType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16633,7 +16633,7 @@ impl IX509CertificateRequestPkcs7_Vtbl { } unsafe extern "system" fn SetSignerCertificate(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs7_Impl::SetSignerCertificate(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRequestPkcs7_Impl::SetSignerCertificate(this, core::mem::transmute_copy(&pvalue)).into() } Self { base__: IX509CertificateRequest_Vtbl::new::(), @@ -16696,7 +16696,7 @@ pub struct IX509CertificateRequestPkcs7V2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509CertificateRequestPkcs7V2_Impl: IX509CertificateRequestPkcs7_Impl { - fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: Option<&IX509EnrollmentPolicyServer>, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; + fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: windows_core::Ref<'_, IX509EnrollmentPolicyServer>, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; fn PolicyServer(&self) -> windows_core::Result; fn Template(&self) -> windows_core::Result; fn CheckCertificateSignature(&self, validatecertificatechain: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; @@ -16706,7 +16706,7 @@ impl IX509CertificateRequestPkcs7V2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromTemplate(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, ppolicyserver: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRequestPkcs7V2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&ppolicyserver), windows_core::from_raw_borrowed(&ptemplate)).into() + IX509CertificateRequestPkcs7V2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&ppolicyserver), core::mem::transmute_copy(&ptemplate)).into() } unsafe extern "system" fn PolicyServer(this: *mut core::ffi::c_void, pppolicyserver: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16924,10 +16924,10 @@ pub trait IX509CertificateRevocationList_Impl: super::super::super::System::Com: fn InitializeDecode(&self, strencodeddata: &windows_core::BSTR, encoding: EncodingType) -> windows_core::Result<()>; fn Encode(&self) -> windows_core::Result<()>; fn ResetForEncode(&self) -> windows_core::Result<()>; - fn CheckPublicKeySignature(&self, ppublickey: Option<&IX509PublicKey>) -> windows_core::Result<()>; + fn CheckPublicKeySignature(&self, ppublickey: windows_core::Ref<'_, IX509PublicKey>) -> windows_core::Result<()>; fn CheckSignature(&self) -> windows_core::Result<()>; fn Issuer(&self) -> windows_core::Result; - fn SetIssuer(&self, pvalue: Option<&IX500DistinguishedName>) -> windows_core::Result<()>; + fn SetIssuer(&self, pvalue: windows_core::Ref<'_, IX500DistinguishedName>) -> windows_core::Result<()>; fn ThisUpdate(&self) -> windows_core::Result; fn SetThisUpdate(&self, value: f64) -> windows_core::Result<()>; fn NextUpdate(&self) -> windows_core::Result; @@ -16936,7 +16936,7 @@ pub trait IX509CertificateRevocationList_Impl: super::super::super::System::Com: fn X509Extensions(&self) -> windows_core::Result; fn CriticalExtensions(&self) -> windows_core::Result; fn SignerCertificate(&self) -> windows_core::Result; - fn SetSignerCertificate(&self, pvalue: Option<&ISignerCertificate>) -> windows_core::Result<()>; + fn SetSignerCertificate(&self, pvalue: windows_core::Ref<'_, ISignerCertificate>) -> windows_core::Result<()>; fn get_CRLNumber(&self, encoding: EncodingType) -> windows_core::Result; fn put_CRLNumber(&self, encoding: EncodingType, value: &windows_core::BSTR) -> windows_core::Result<()>; fn CAVersion(&self) -> windows_core::Result; @@ -16944,7 +16944,7 @@ pub trait IX509CertificateRevocationList_Impl: super::super::super::System::Com: fn BaseCRL(&self) -> windows_core::Result; fn NullSigned(&self) -> windows_core::Result; fn HashAlgorithm(&self) -> windows_core::Result; - fn SetHashAlgorithm(&self, pvalue: Option<&IObjectId>) -> windows_core::Result<()>; + fn SetHashAlgorithm(&self, pvalue: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; fn AlternateSignatureAlgorithm(&self) -> windows_core::Result; fn SetAlternateSignatureAlgorithm(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SignatureInformation(&self) -> windows_core::Result; @@ -16973,7 +16973,7 @@ impl IX509CertificateRevocationList_Vtbl { } unsafe extern "system" fn CheckPublicKeySignature(this: *mut core::ffi::c_void, ppublickey: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRevocationList_Impl::CheckPublicKeySignature(this, windows_core::from_raw_borrowed(&ppublickey)).into() + IX509CertificateRevocationList_Impl::CheckPublicKeySignature(this, core::mem::transmute_copy(&ppublickey)).into() } unsafe extern "system" fn CheckSignature(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16991,7 +16991,7 @@ impl IX509CertificateRevocationList_Vtbl { } unsafe extern "system" fn SetIssuer(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRevocationList_Impl::SetIssuer(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRevocationList_Impl::SetIssuer(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn ThisUpdate(this: *mut core::ffi::c_void, pvalue: *mut f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17063,7 +17063,7 @@ impl IX509CertificateRevocationList_Vtbl { } unsafe extern "system" fn SetSignerCertificate(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRevocationList_Impl::SetSignerCertificate(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRevocationList_Impl::SetSignerCertificate(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn get_CRLNumber(this: *mut core::ffi::c_void, encoding: EncodingType, pvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17125,7 +17125,7 @@ impl IX509CertificateRevocationList_Vtbl { } unsafe extern "system" fn SetHashAlgorithm(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRevocationList_Impl::SetHashAlgorithm(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRevocationList_Impl::SetHashAlgorithm(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn AlternateSignatureAlgorithm(this: *mut core::ffi::c_void, pvalue: *mut super::super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17288,11 +17288,11 @@ pub trait IX509CertificateRevocationListEntries_Impl: super::super::super::Syste fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&IX509CertificateRevocationListEntry>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, IX509CertificateRevocationListEntry>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn get_IndexBySerialNumber(&self, encoding: EncodingType, serialnumber: &windows_core::BSTR) -> windows_core::Result; - fn AddRange(&self, pvalue: Option<&IX509CertificateRevocationListEntries>) -> windows_core::Result<()>; + fn AddRange(&self, pvalue: windows_core::Ref<'_, IX509CertificateRevocationListEntries>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IX509CertificateRevocationListEntries_Vtbl { @@ -17329,7 +17329,7 @@ impl IX509CertificateRevocationListEntries_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRevocationListEntries_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + IX509CertificateRevocationListEntries_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17351,7 +17351,7 @@ impl IX509CertificateRevocationListEntries_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateRevocationListEntries_Impl::AddRange(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateRevocationListEntries_Impl::AddRange(this, core::mem::transmute_copy(&pvalue)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -17618,7 +17618,7 @@ pub struct IX509CertificateTemplateWritable_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509CertificateTemplateWritable_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Initialize(&self, pvalue: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; + fn Initialize(&self, pvalue: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; fn Commit(&self, commitflags: CommitTemplateFlags, strservercontext: &windows_core::BSTR) -> windows_core::Result<()>; fn get_Property(&self, property: EnrollmentTemplateProperty) -> windows_core::Result; fn put_Property(&self, property: EnrollmentTemplateProperty, value: &super::super::super::System::Variant::VARIANT) -> windows_core::Result<()>; @@ -17629,7 +17629,7 @@ impl IX509CertificateTemplateWritable_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateTemplateWritable_Impl::Initialize(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509CertificateTemplateWritable_Impl::Initialize(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn Commit(this: *mut core::ffi::c_void, commitflags: CommitTemplateFlags, strservercontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17741,11 +17741,11 @@ pub trait IX509CertificateTemplates_Impl: super::super::super::System::Com::IDis fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn get_ItemByName(&self, bstrname: &windows_core::BSTR) -> windows_core::Result; - fn get_ItemByOid(&self, poid: Option<&IObjectId>) -> windows_core::Result; + fn get_ItemByOid(&self, poid: windows_core::Ref<'_, IObjectId>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IX509CertificateTemplates_Vtbl { @@ -17782,7 +17782,7 @@ impl IX509CertificateTemplates_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509CertificateTemplates_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + IX509CertificateTemplates_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17804,7 +17804,7 @@ impl IX509CertificateTemplates_Vtbl { } unsafe extern "system" fn get_ItemByOid(this: *mut core::ffi::c_void, poid: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IX509CertificateTemplates_Impl::get_ItemByOid(this, windows_core::from_raw_borrowed(&poid)) { + match IX509CertificateTemplates_Impl::get_ItemByOid(this, core::mem::transmute_copy(&poid)) { Ok(ok__) => { ppvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -18149,7 +18149,7 @@ pub struct IX509Enrollment_Vtbl { pub trait IX509Enrollment_Impl: super::super::super::System::Com::IDispatch_Impl { fn Initialize(&self, context: X509CertificateEnrollmentContext) -> windows_core::Result<()>; fn InitializeFromTemplateName(&self, context: X509CertificateEnrollmentContext, strtemplatename: &windows_core::BSTR) -> windows_core::Result<()>; - fn InitializeFromRequest(&self, prequest: Option<&IX509CertificateRequest>) -> windows_core::Result<()>; + fn InitializeFromRequest(&self, prequest: windows_core::Ref<'_, IX509CertificateRequest>) -> windows_core::Result<()>; fn CreateRequest(&self, encoding: EncodingType) -> windows_core::Result; fn Enroll(&self) -> windows_core::Result<()>; fn InstallResponse(&self, restrictions: InstallResponseRestrictionFlags, strresponse: &windows_core::BSTR, encoding: EncodingType, strpassword: &windows_core::BSTR) -> windows_core::Result<()>; @@ -18184,7 +18184,7 @@ impl IX509Enrollment_Vtbl { } unsafe extern "system" fn InitializeFromRequest(this: *mut core::ffi::c_void, prequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509Enrollment_Impl::InitializeFromRequest(this, windows_core::from_raw_borrowed(&prequest)).into() + IX509Enrollment_Impl::InitializeFromRequest(this, core::mem::transmute_copy(&prequest)).into() } unsafe extern "system" fn CreateRequest(this: *mut core::ffi::c_void, encoding: EncodingType, pvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18431,7 +18431,7 @@ pub struct IX509Enrollment2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509Enrollment2_Impl: IX509Enrollment_Impl { - fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: Option<&IX509EnrollmentPolicyServer>, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result<()>; + fn InitializeFromTemplate(&self, context: X509CertificateEnrollmentContext, ppolicyserver: windows_core::Ref<'_, IX509EnrollmentPolicyServer>, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result<()>; fn InstallResponse2(&self, restrictions: InstallResponseRestrictionFlags, strresponse: &windows_core::BSTR, encoding: EncodingType, strpassword: &windows_core::BSTR, strenrollmentpolicyserverurl: &windows_core::BSTR, strenrollmentpolicyserverid: &windows_core::BSTR, enrollmentpolicyserverflags: PolicyServerUrlFlags, authflags: X509EnrollmentAuthFlags) -> windows_core::Result<()>; fn PolicyServer(&self) -> windows_core::Result; fn Template(&self) -> windows_core::Result; @@ -18442,7 +18442,7 @@ impl IX509Enrollment2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromTemplate(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, ppolicyserver: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509Enrollment2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&ppolicyserver), windows_core::from_raw_borrowed(&ptemplate)).into() + IX509Enrollment2_Impl::InitializeFromTemplate(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&ppolicyserver), core::mem::transmute_copy(&ptemplate)).into() } unsafe extern "system" fn InstallResponse2(this: *mut core::ffi::c_void, restrictions: InstallResponseRestrictionFlags, strresponse: *mut core::ffi::c_void, encoding: EncodingType, strpassword: *mut core::ffi::c_void, strenrollmentpolicyserverurl: *mut core::ffi::c_void, strenrollmentpolicyserverid: *mut core::ffi::c_void, enrollmentpolicyserverflags: PolicyServerUrlFlags, authflags: X509EnrollmentAuthFlags) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18724,7 +18724,7 @@ pub trait IX509EnrollmentPolicyServer_Impl: super::super::super::System::Com::ID fn Initialize(&self, bstrpolicyserverurl: &windows_core::BSTR, bstrpolicyserverid: &windows_core::BSTR, authflags: X509EnrollmentAuthFlags, fisuntrusted: super::super::super::Foundation::VARIANT_BOOL, context: X509CertificateEnrollmentContext) -> windows_core::Result<()>; fn LoadPolicy(&self, option: X509EnrollmentPolicyLoadOption) -> windows_core::Result<()>; fn GetTemplates(&self) -> windows_core::Result; - fn GetCAsForTemplate(&self, ptemplate: Option<&IX509CertificateTemplate>) -> windows_core::Result; + fn GetCAsForTemplate(&self, ptemplate: windows_core::Ref<'_, IX509CertificateTemplate>) -> windows_core::Result; fn GetCAs(&self) -> windows_core::Result; fn Validate(&self) -> windows_core::Result<()>; fn GetCustomOids(&self) -> windows_core::Result; @@ -18769,7 +18769,7 @@ impl IX509EnrollmentPolicyServer_Vtbl { } unsafe extern "system" fn GetCAsForTemplate(this: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void, ppcas: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IX509EnrollmentPolicyServer_Impl::GetCAsForTemplate(this, windows_core::from_raw_borrowed(&ptemplate)) { + match IX509EnrollmentPolicyServer_Impl::GetCAsForTemplate(this, core::mem::transmute_copy(&ptemplate)) { Ok(ok__) => { ppcas.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19280,7 +19280,7 @@ pub struct IX509Extension_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509Extension_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Initialize(&self, pobjectid: Option<&IObjectId>, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; + fn Initialize(&self, pobjectid: windows_core::Ref<'_, IObjectId>, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn ObjectId(&self) -> windows_core::Result; fn get_RawData(&self, encoding: EncodingType) -> windows_core::Result; fn Critical(&self) -> windows_core::Result; @@ -19291,7 +19291,7 @@ impl IX509Extension_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pobjectid: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509Extension_Impl::Initialize(this, windows_core::from_raw_borrowed(&pobjectid), core::mem::transmute_copy(&encoding), core::mem::transmute(&strencodeddata)).into() + IX509Extension_Impl::Initialize(this, core::mem::transmute_copy(&pobjectid), core::mem::transmute_copy(&encoding), core::mem::transmute(&strencodeddata)).into() } unsafe extern "system" fn ObjectId(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19379,7 +19379,7 @@ pub struct IX509ExtensionAlternativeNames_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509ExtensionAlternativeNames_Impl: IX509Extension_Impl { - fn InitializeEncode(&self, pvalue: Option<&IAlternativeNames>) -> windows_core::Result<()>; + fn InitializeEncode(&self, pvalue: windows_core::Ref<'_, IAlternativeNames>) -> windows_core::Result<()>; fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn AlternativeNames(&self) -> windows_core::Result; } @@ -19388,7 +19388,7 @@ impl IX509ExtensionAlternativeNames_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeEncode(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509ExtensionAlternativeNames_Impl::InitializeEncode(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509ExtensionAlternativeNames_Impl::InitializeEncode(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn InitializeDecode(this: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19615,7 +19615,7 @@ pub struct IX509ExtensionCertificatePolicies_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509ExtensionCertificatePolicies_Impl: IX509Extension_Impl { - fn InitializeEncode(&self, pvalue: Option<&ICertificatePolicies>) -> windows_core::Result<()>; + fn InitializeEncode(&self, pvalue: windows_core::Ref<'_, ICertificatePolicies>) -> windows_core::Result<()>; fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn Policies(&self) -> windows_core::Result; } @@ -19624,7 +19624,7 @@ impl IX509ExtensionCertificatePolicies_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeEncode(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509ExtensionCertificatePolicies_Impl::InitializeEncode(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509ExtensionCertificatePolicies_Impl::InitializeEncode(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn InitializeDecode(this: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19690,7 +19690,7 @@ pub struct IX509ExtensionEnhancedKeyUsage_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509ExtensionEnhancedKeyUsage_Impl: IX509Extension_Impl { - fn InitializeEncode(&self, pvalue: Option<&IObjectIds>) -> windows_core::Result<()>; + fn InitializeEncode(&self, pvalue: windows_core::Ref<'_, IObjectIds>) -> windows_core::Result<()>; fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn EnhancedKeyUsage(&self) -> windows_core::Result; } @@ -19699,7 +19699,7 @@ impl IX509ExtensionEnhancedKeyUsage_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeEncode(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509ExtensionEnhancedKeyUsage_Impl::InitializeEncode(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509ExtensionEnhancedKeyUsage_Impl::InitializeEncode(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn InitializeDecode(this: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19837,7 +19837,7 @@ pub struct IX509ExtensionMSApplicationPolicies_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509ExtensionMSApplicationPolicies_Impl: IX509Extension_Impl { - fn InitializeEncode(&self, pvalue: Option<&ICertificatePolicies>) -> windows_core::Result<()>; + fn InitializeEncode(&self, pvalue: windows_core::Ref<'_, ICertificatePolicies>) -> windows_core::Result<()>; fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn Policies(&self) -> windows_core::Result; } @@ -19846,7 +19846,7 @@ impl IX509ExtensionMSApplicationPolicies_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeEncode(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509ExtensionMSApplicationPolicies_Impl::InitializeEncode(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509ExtensionMSApplicationPolicies_Impl::InitializeEncode(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn InitializeDecode(this: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19912,7 +19912,7 @@ pub struct IX509ExtensionSmimeCapabilities_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509ExtensionSmimeCapabilities_Impl: IX509Extension_Impl { - fn InitializeEncode(&self, pvalue: Option<&ISmimeCapabilities>) -> windows_core::Result<()>; + fn InitializeEncode(&self, pvalue: windows_core::Ref<'_, ISmimeCapabilities>) -> windows_core::Result<()>; fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn SmimeCapabilities(&self) -> windows_core::Result; } @@ -19921,7 +19921,7 @@ impl IX509ExtensionSmimeCapabilities_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeEncode(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509ExtensionSmimeCapabilities_Impl::InitializeEncode(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509ExtensionSmimeCapabilities_Impl::InitializeEncode(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn InitializeDecode(this: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20069,7 +20069,7 @@ pub struct IX509ExtensionTemplate_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509ExtensionTemplate_Impl: IX509Extension_Impl { - fn InitializeEncode(&self, ptemplateoid: Option<&IObjectId>, majorversion: i32, minorversion: i32) -> windows_core::Result<()>; + fn InitializeEncode(&self, ptemplateoid: windows_core::Ref<'_, IObjectId>, majorversion: i32, minorversion: i32) -> windows_core::Result<()>; fn InitializeDecode(&self, encoding: EncodingType, strencodeddata: &windows_core::BSTR) -> windows_core::Result<()>; fn TemplateOid(&self) -> windows_core::Result; fn MajorVersion(&self) -> windows_core::Result; @@ -20080,7 +20080,7 @@ impl IX509ExtensionTemplate_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeEncode(this: *mut core::ffi::c_void, ptemplateoid: *mut core::ffi::c_void, majorversion: i32, minorversion: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509ExtensionTemplate_Impl::InitializeEncode(this, windows_core::from_raw_borrowed(&ptemplateoid), core::mem::transmute_copy(&majorversion), core::mem::transmute_copy(&minorversion)).into() + IX509ExtensionTemplate_Impl::InitializeEncode(this, core::mem::transmute_copy(&ptemplateoid), core::mem::transmute_copy(&majorversion), core::mem::transmute_copy(&minorversion)).into() } unsafe extern "system" fn InitializeDecode(this: *mut core::ffi::c_void, encoding: EncodingType, strencodeddata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20272,11 +20272,11 @@ pub trait IX509Extensions_Impl: super::super::super::System::Com::IDispatch_Impl fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&IX509Extension>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, IX509Extension>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn get_IndexByObjectId(&self, pobjectid: Option<&IObjectId>) -> windows_core::Result; - fn AddRange(&self, pvalue: Option<&IX509Extensions>) -> windows_core::Result<()>; + fn get_IndexByObjectId(&self, pobjectid: windows_core::Ref<'_, IObjectId>) -> windows_core::Result; + fn AddRange(&self, pvalue: windows_core::Ref<'_, IX509Extensions>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IX509Extensions_Vtbl { @@ -20313,7 +20313,7 @@ impl IX509Extensions_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509Extensions_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + IX509Extensions_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20325,7 +20325,7 @@ impl IX509Extensions_Vtbl { } unsafe extern "system" fn get_IndexByObjectId(this: *mut core::ffi::c_void, pobjectid: *mut core::ffi::c_void, pindex: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IX509Extensions_Impl::get_IndexByObjectId(this, windows_core::from_raw_borrowed(&pobjectid)) { + match IX509Extensions_Impl::get_IndexByObjectId(this, core::mem::transmute_copy(&pobjectid)) { Ok(ok__) => { pindex.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -20335,7 +20335,7 @@ impl IX509Extensions_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509Extensions_Impl::AddRange(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509Extensions_Impl::AddRange(this, core::mem::transmute_copy(&pvalue)).into() } Self { base__: super::super::super::System::Com::IDispatch_Vtbl::new::(), @@ -20537,7 +20537,7 @@ pub trait IX509NameValuePairs_Impl: super::super::super::System::Com::IDispatch_ fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&IX509NameValuePair>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, IX509NameValuePair>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } @@ -20576,7 +20576,7 @@ impl IX509NameValuePairs_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509NameValuePairs_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + IX509NameValuePairs_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20660,7 +20660,7 @@ pub trait IX509PolicyServerListManager_Impl: super::super::super::System::Com::I fn get_ItemByIndex(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pval: Option<&IX509PolicyServerUrl>) -> windows_core::Result<()>; + fn Add(&self, pval: windows_core::Ref<'_, IX509PolicyServerUrl>) -> windows_core::Result<()>; fn Remove(&self, index: i32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; fn Initialize(&self, context: X509CertificateEnrollmentContext, flags: PolicyServerUrlFlags) -> windows_core::Result<()>; @@ -20700,7 +20700,7 @@ impl IX509PolicyServerListManager_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509PolicyServerListManager_Impl::Add(this, windows_core::from_raw_borrowed(&pval)).into() + IX509PolicyServerListManager_Impl::Add(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21263,9 +21263,9 @@ pub trait IX509PrivateKey_Impl: super::super::super::System::Com::IDispatch_Impl fn ReaderName(&self) -> windows_core::Result; fn SetReaderName(&self, value: &windows_core::BSTR) -> windows_core::Result<()>; fn CspInformations(&self) -> windows_core::Result; - fn SetCspInformations(&self, pvalue: Option<&ICspInformations>) -> windows_core::Result<()>; + fn SetCspInformations(&self, pvalue: windows_core::Ref<'_, ICspInformations>) -> windows_core::Result<()>; fn CspStatus(&self) -> windows_core::Result; - fn SetCspStatus(&self, pvalue: Option<&ICspStatus>) -> windows_core::Result<()>; + fn SetCspStatus(&self, pvalue: windows_core::Ref<'_, ICspStatus>) -> windows_core::Result<()>; fn ProviderName(&self) -> windows_core::Result; fn SetProviderName(&self, value: &windows_core::BSTR) -> windows_core::Result<()>; fn ProviderType(&self) -> windows_core::Result; @@ -21273,7 +21273,7 @@ pub trait IX509PrivateKey_Impl: super::super::super::System::Com::IDispatch_Impl fn LegacyCsp(&self) -> windows_core::Result; fn SetLegacyCsp(&self, value: super::super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn Algorithm(&self) -> windows_core::Result; - fn SetAlgorithm(&self, pvalue: Option<&IObjectId>) -> windows_core::Result<()>; + fn SetAlgorithm(&self, pvalue: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; fn KeySpec(&self) -> windows_core::Result; fn SetKeySpec(&self, value: X509KeySpec) -> windows_core::Result<()>; fn Length(&self) -> windows_core::Result; @@ -21408,7 +21408,7 @@ impl IX509PrivateKey_Vtbl { } unsafe extern "system" fn SetCspInformations(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509PrivateKey_Impl::SetCspInformations(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509PrivateKey_Impl::SetCspInformations(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn CspStatus(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21422,7 +21422,7 @@ impl IX509PrivateKey_Vtbl { } unsafe extern "system" fn SetCspStatus(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509PrivateKey_Impl::SetCspStatus(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509PrivateKey_Impl::SetCspStatus(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn ProviderName(this: *mut core::ffi::c_void, pvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21478,7 +21478,7 @@ impl IX509PrivateKey_Vtbl { } unsafe extern "system" fn SetAlgorithm(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509PrivateKey_Impl::SetAlgorithm(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509PrivateKey_Impl::SetAlgorithm(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn KeySpec(this: *mut core::ffi::c_void, pvalue: *mut X509KeySpec) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22005,7 +22005,7 @@ pub struct IX509PublicKey_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509PublicKey_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Initialize(&self, pobjectid: Option<&IObjectId>, strencodedkey: &windows_core::BSTR, strencodedparameters: &windows_core::BSTR, encoding: EncodingType) -> windows_core::Result<()>; + fn Initialize(&self, pobjectid: windows_core::Ref<'_, IObjectId>, strencodedkey: &windows_core::BSTR, strencodedparameters: &windows_core::BSTR, encoding: EncodingType) -> windows_core::Result<()>; fn InitializeFromEncodedPublicKeyInfo(&self, strencodedpublickeyinfo: &windows_core::BSTR, encoding: EncodingType) -> windows_core::Result<()>; fn Algorithm(&self) -> windows_core::Result; fn Length(&self) -> windows_core::Result; @@ -22018,7 +22018,7 @@ impl IX509PublicKey_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pobjectid: *mut core::ffi::c_void, strencodedkey: *mut core::ffi::c_void, strencodedparameters: *mut core::ffi::c_void, encoding: EncodingType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509PublicKey_Impl::Initialize(this, windows_core::from_raw_borrowed(&pobjectid), core::mem::transmute(&strencodedkey), core::mem::transmute(&strencodedparameters), core::mem::transmute_copy(&encoding)).into() + IX509PublicKey_Impl::Initialize(this, core::mem::transmute_copy(&pobjectid), core::mem::transmute(&strencodedkey), core::mem::transmute(&strencodedparameters), core::mem::transmute_copy(&encoding)).into() } unsafe extern "system" fn InitializeFromEncodedPublicKeyInfo(this: *mut core::ffi::c_void, strencodedpublickeyinfo: *mut core::ffi::c_void, encoding: EncodingType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22222,7 +22222,7 @@ pub struct IX509SCEPEnrollment_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509SCEPEnrollment_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Initialize(&self, prequest: Option<&IX509CertificateRequestPkcs10>, strthumbprint: &windows_core::BSTR, thumprintencoding: EncodingType, strservercertificates: &windows_core::BSTR, encoding: EncodingType) -> windows_core::Result<()>; + fn Initialize(&self, prequest: windows_core::Ref<'_, IX509CertificateRequestPkcs10>, strthumbprint: &windows_core::BSTR, thumprintencoding: EncodingType, strservercertificates: &windows_core::BSTR, encoding: EncodingType) -> windows_core::Result<()>; fn InitializeForPending(&self, context: X509CertificateEnrollmentContext) -> windows_core::Result<()>; fn CreateRequestMessage(&self, encoding: EncodingType) -> windows_core::Result; fn CreateRetrievePendingMessage(&self, encoding: EncodingType) -> windows_core::Result; @@ -22231,9 +22231,9 @@ pub trait IX509SCEPEnrollment_Impl: super::super::super::System::Com::IDispatch_ fn SetServerCapabilities(&self, value: &windows_core::BSTR) -> windows_core::Result<()>; fn FailInfo(&self) -> windows_core::Result; fn SignerCertificate(&self) -> windows_core::Result; - fn SetSignerCertificate(&self, pvalue: Option<&ISignerCertificate>) -> windows_core::Result<()>; + fn SetSignerCertificate(&self, pvalue: windows_core::Ref<'_, ISignerCertificate>) -> windows_core::Result<()>; fn OldCertificate(&self) -> windows_core::Result; - fn SetOldCertificate(&self, pvalue: Option<&ISignerCertificate>) -> windows_core::Result<()>; + fn SetOldCertificate(&self, pvalue: windows_core::Ref<'_, ISignerCertificate>) -> windows_core::Result<()>; fn get_TransactionId(&self, encoding: EncodingType) -> windows_core::Result; fn put_TransactionId(&self, encoding: EncodingType, value: &windows_core::BSTR) -> windows_core::Result<()>; fn Request(&self) -> windows_core::Result; @@ -22250,7 +22250,7 @@ impl IX509SCEPEnrollment_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, prequest: *mut core::ffi::c_void, strthumbprint: *mut core::ffi::c_void, thumprintencoding: EncodingType, strservercertificates: *mut core::ffi::c_void, encoding: EncodingType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509SCEPEnrollment_Impl::Initialize(this, windows_core::from_raw_borrowed(&prequest), core::mem::transmute(&strthumbprint), core::mem::transmute_copy(&thumprintencoding), core::mem::transmute(&strservercertificates), core::mem::transmute_copy(&encoding)).into() + IX509SCEPEnrollment_Impl::Initialize(this, core::mem::transmute_copy(&prequest), core::mem::transmute(&strthumbprint), core::mem::transmute_copy(&thumprintencoding), core::mem::transmute(&strservercertificates), core::mem::transmute_copy(&encoding)).into() } unsafe extern "system" fn InitializeForPending(this: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22322,7 +22322,7 @@ impl IX509SCEPEnrollment_Vtbl { } unsafe extern "system" fn SetSignerCertificate(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509SCEPEnrollment_Impl::SetSignerCertificate(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509SCEPEnrollment_Impl::SetSignerCertificate(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn OldCertificate(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22336,7 +22336,7 @@ impl IX509SCEPEnrollment_Vtbl { } unsafe extern "system" fn SetOldCertificate(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509SCEPEnrollment_Impl::SetOldCertificate(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509SCEPEnrollment_Impl::SetOldCertificate(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn get_TransactionId(this: *mut core::ffi::c_void, encoding: EncodingType, pvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22628,7 +22628,7 @@ pub struct IX509SCEPEnrollmentHelper_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509SCEPEnrollmentHelper_Impl: super::super::super::System::Com::IDispatch_Impl { - fn Initialize(&self, strserverurl: &windows_core::BSTR, strrequestheaders: &windows_core::BSTR, prequest: Option<&IX509CertificateRequestPkcs10>, strcacertificatethumbprint: &windows_core::BSTR) -> windows_core::Result<()>; + fn Initialize(&self, strserverurl: &windows_core::BSTR, strrequestheaders: &windows_core::BSTR, prequest: windows_core::Ref<'_, IX509CertificateRequestPkcs10>, strcacertificatethumbprint: &windows_core::BSTR) -> windows_core::Result<()>; fn InitializeForPending(&self, strserverurl: &windows_core::BSTR, strrequestheaders: &windows_core::BSTR, context: X509CertificateEnrollmentContext, strtransactionid: &windows_core::BSTR) -> windows_core::Result<()>; fn Enroll(&self, processflags: X509SCEPProcessMessageFlags) -> windows_core::Result; fn FetchPending(&self, processflags: X509SCEPProcessMessageFlags) -> windows_core::Result; @@ -22640,7 +22640,7 @@ impl IX509SCEPEnrollmentHelper_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, strserverurl: *mut core::ffi::c_void, strrequestheaders: *mut core::ffi::c_void, prequest: *mut core::ffi::c_void, strcacertificatethumbprint: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509SCEPEnrollmentHelper_Impl::Initialize(this, core::mem::transmute(&strserverurl), core::mem::transmute(&strrequestheaders), windows_core::from_raw_borrowed(&prequest), core::mem::transmute(&strcacertificatethumbprint)).into() + IX509SCEPEnrollmentHelper_Impl::Initialize(this, core::mem::transmute(&strserverurl), core::mem::transmute(&strrequestheaders), core::mem::transmute_copy(&prequest), core::mem::transmute(&strcacertificatethumbprint)).into() } unsafe extern "system" fn InitializeForPending(this: *mut core::ffi::c_void, strserverurl: *mut core::ffi::c_void, strrequestheaders: *mut core::ffi::c_void, context: X509CertificateEnrollmentContext, strtransactionid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22789,9 +22789,9 @@ pub struct IX509SignatureInformation_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IX509SignatureInformation_Impl: super::super::super::System::Com::IDispatch_Impl { fn HashAlgorithm(&self) -> windows_core::Result; - fn SetHashAlgorithm(&self, pvalue: Option<&IObjectId>) -> windows_core::Result<()>; + fn SetHashAlgorithm(&self, pvalue: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; fn PublicKeyAlgorithm(&self) -> windows_core::Result; - fn SetPublicKeyAlgorithm(&self, pvalue: Option<&IObjectId>) -> windows_core::Result<()>; + fn SetPublicKeyAlgorithm(&self, pvalue: windows_core::Ref<'_, IObjectId>) -> windows_core::Result<()>; fn get_Parameters(&self, encoding: EncodingType) -> windows_core::Result; fn put_Parameters(&self, encoding: EncodingType, value: &windows_core::BSTR) -> windows_core::Result<()>; fn AlternateSignatureAlgorithm(&self) -> windows_core::Result; @@ -22817,7 +22817,7 @@ impl IX509SignatureInformation_Vtbl { } unsafe extern "system" fn SetHashAlgorithm(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509SignatureInformation_Impl::SetHashAlgorithm(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509SignatureInformation_Impl::SetHashAlgorithm(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn PublicKeyAlgorithm(this: *mut core::ffi::c_void, ppvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22831,7 +22831,7 @@ impl IX509SignatureInformation_Vtbl { } unsafe extern "system" fn SetPublicKeyAlgorithm(this: *mut core::ffi::c_void, pvalue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IX509SignatureInformation_Impl::SetPublicKeyAlgorithm(this, windows_core::from_raw_borrowed(&pvalue)).into() + IX509SignatureInformation_Impl::SetPublicKeyAlgorithm(this, core::mem::transmute_copy(&pvalue)).into() } unsafe extern "system" fn get_Parameters(this: *mut core::ffi::c_void, encoding: EncodingType, pvalue: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs index 401f0769c0..fbc590e8b1 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs @@ -12005,7 +12005,7 @@ pub trait ICertSrvSetupKeyInformationCollection_Impl: super::super::System::Com: fn _NewEnum(&self) -> windows_core::Result; fn get_Item(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; - fn Add(&self, pikeyinformation: Option<&ICertSrvSetupKeyInformation>) -> windows_core::Result<()>; + fn Add(&self, pikeyinformation: windows_core::Ref<'_, ICertSrvSetupKeyInformation>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ICertSrvSetupKeyInformationCollection_Vtbl { @@ -12042,7 +12042,7 @@ impl ICertSrvSetupKeyInformationCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pikeyinformation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICertSrvSetupKeyInformationCollection_Impl::Add(this, windows_core::from_raw_borrowed(&pikeyinformation)).into() + ICertSrvSetupKeyInformationCollection_Impl::Add(this, core::mem::transmute_copy(&pikeyinformation)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs index 3664df2345..bdcb4c7ab8 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs @@ -247,10 +247,10 @@ pub struct IProtectionPolicyManagerInterop2_Vtbl { } pub trait IProtectionPolicyManagerInterop2_Impl: windows_core::IUnknownImpl { fn RequestAccessForAppWithWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestAccessWithAuditingInfoForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestAccessWithMessageForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: Option<&windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestAccessForAppWithAuditingInfoForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestAccessForAppWithMessageForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: Option<&windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessWithAuditingInfoForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessWithMessageForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessForAppWithAuditingInfoForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessForAppWithMessageForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IProtectionPolicyManagerInterop2_Vtbl { pub const fn new() -> Self { @@ -260,19 +260,19 @@ impl IProtectionPolicyManagerInterop2_Vtbl { } unsafe extern "system" fn RequestAccessWithAuditingInfoForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceidentity: *mut core::ffi::c_void, targetidentity: *mut core::ffi::c_void, auditinfounk: *mut core::ffi::c_void, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop2_Impl::RequestAccessWithAuditingInfoForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&targetidentity), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop2_Impl::RequestAccessWithAuditingInfoForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&targetidentity), core::mem::transmute_copy(&auditinfounk), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } unsafe extern "system" fn RequestAccessWithMessageForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceidentity: *mut core::ffi::c_void, targetidentity: *mut core::ffi::c_void, auditinfounk: *mut core::ffi::c_void, messagefromapp: *mut core::ffi::c_void, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop2_Impl::RequestAccessWithMessageForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&targetidentity), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop2_Impl::RequestAccessWithMessageForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&targetidentity), core::mem::transmute_copy(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } unsafe extern "system" fn RequestAccessForAppWithAuditingInfoForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceidentity: *mut core::ffi::c_void, apppackagefamilyname: *mut core::ffi::c_void, auditinfounk: *mut core::ffi::c_void, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop2_Impl::RequestAccessForAppWithAuditingInfoForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&apppackagefamilyname), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop2_Impl::RequestAccessForAppWithAuditingInfoForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&apppackagefamilyname), core::mem::transmute_copy(&auditinfounk), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } unsafe extern "system" fn RequestAccessForAppWithMessageForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceidentity: *mut core::ffi::c_void, apppackagefamilyname: *mut core::ffi::c_void, auditinfounk: *mut core::ffi::c_void, messagefromapp: *mut core::ffi::c_void, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop2_Impl::RequestAccessForAppWithMessageForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&apppackagefamilyname), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop2_Impl::RequestAccessForAppWithMessageForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&apppackagefamilyname), core::mem::transmute_copy(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -355,38 +355,38 @@ pub struct IProtectionPolicyManagerInterop3_Vtbl { pub RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HWND, *mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void, u32, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IProtectionPolicyManagerInterop3_Impl: windows_core::IUnknownImpl { - fn RequestAccessWithBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: Option<&windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestAccessForAppWithBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: Option<&windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestAccessToFilesForAppForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: Option<&windows_core::IUnknown>, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: Option<&windows_core::IUnknown>, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: Option<&windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestAccessToFilesForProcessForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: Option<&windows_core::IUnknown>, processid: u32, auditinfounk: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: Option<&windows_core::IUnknown>, processid: u32, auditinfounk: Option<&windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessWithBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, targetidentity: &windows_core::HSTRING, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessForAppWithBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceidentity: &windows_core::HSTRING, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessToFilesForAppForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: windows_core::Ref<'_, windows_core::IUnknown>, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: windows_core::Ref<'_, windows_core::IUnknown>, apppackagefamilyname: &windows_core::HSTRING, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessToFilesForProcessForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: windows_core::Ref<'_, windows_core::IUnknown>, processid: u32, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync(&self, appwindow: super::super::Foundation::HWND, sourceitemlistunk: windows_core::Ref<'_, windows_core::IUnknown>, processid: u32, auditinfounk: windows_core::Ref<'_, windows_core::IUnknown>, messagefromapp: &windows_core::HSTRING, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IProtectionPolicyManagerInterop3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RequestAccessWithBehaviorForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceidentity: *mut core::ffi::c_void, targetidentity: *mut core::ffi::c_void, auditinfounk: *mut core::ffi::c_void, messagefromapp: *mut core::ffi::c_void, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop3_Impl::RequestAccessWithBehaviorForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&targetidentity), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&behavior), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop3_Impl::RequestAccessWithBehaviorForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&targetidentity), core::mem::transmute_copy(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&behavior), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } unsafe extern "system" fn RequestAccessForAppWithBehaviorForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceidentity: *mut core::ffi::c_void, apppackagefamilyname: *mut core::ffi::c_void, auditinfounk: *mut core::ffi::c_void, messagefromapp: *mut core::ffi::c_void, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop3_Impl::RequestAccessForAppWithBehaviorForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&apppackagefamilyname), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&behavior), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop3_Impl::RequestAccessForAppWithBehaviorForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute(&sourceidentity), core::mem::transmute(&apppackagefamilyname), core::mem::transmute_copy(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&behavior), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } unsafe extern "system" fn RequestAccessToFilesForAppForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceitemlistunk: *mut core::ffi::c_void, apppackagefamilyname: *mut core::ffi::c_void, auditinfounk: *mut core::ffi::c_void, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop3_Impl::RequestAccessToFilesForAppForWindowAsync(this, core::mem::transmute_copy(&appwindow), windows_core::from_raw_borrowed(&sourceitemlistunk), core::mem::transmute(&apppackagefamilyname), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop3_Impl::RequestAccessToFilesForAppForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute_copy(&sourceitemlistunk), core::mem::transmute(&apppackagefamilyname), core::mem::transmute_copy(&auditinfounk), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } unsafe extern "system" fn RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceitemlistunk: *mut core::ffi::c_void, apppackagefamilyname: *mut core::ffi::c_void, auditinfounk: *mut core::ffi::c_void, messagefromapp: *mut core::ffi::c_void, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop3_Impl::RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync(this, core::mem::transmute_copy(&appwindow), windows_core::from_raw_borrowed(&sourceitemlistunk), core::mem::transmute(&apppackagefamilyname), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&behavior), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop3_Impl::RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute_copy(&sourceitemlistunk), core::mem::transmute(&apppackagefamilyname), core::mem::transmute_copy(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&behavior), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } unsafe extern "system" fn RequestAccessToFilesForProcessForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceitemlistunk: *mut core::ffi::c_void, processid: u32, auditinfounk: *mut core::ffi::c_void, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop3_Impl::RequestAccessToFilesForProcessForWindowAsync(this, core::mem::transmute_copy(&appwindow), windows_core::from_raw_borrowed(&sourceitemlistunk), core::mem::transmute_copy(&processid), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop3_Impl::RequestAccessToFilesForProcessForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute_copy(&sourceitemlistunk), core::mem::transmute_copy(&processid), core::mem::transmute_copy(&auditinfounk), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } unsafe extern "system" fn RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, sourceitemlistunk: *mut core::ffi::c_void, processid: u32, auditinfounk: *mut core::ffi::c_void, messagefromapp: *mut core::ffi::c_void, behavior: u32, riid: *const windows_core::GUID, asyncoperation: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProtectionPolicyManagerInterop3_Impl::RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync(this, core::mem::transmute_copy(&appwindow), windows_core::from_raw_borrowed(&sourceitemlistunk), core::mem::transmute_copy(&processid), windows_core::from_raw_borrowed(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&behavior), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() + IProtectionPolicyManagerInterop3_Impl::RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute_copy(&sourceitemlistunk), core::mem::transmute_copy(&processid), core::mem::transmute_copy(&auditinfounk), core::mem::transmute(&messagefromapp), core::mem::transmute_copy(&behavior), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncoperation)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs index ab6b60b74e..1ebc857064 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs @@ -1307,18 +1307,18 @@ pub struct IRouterProtocolConfig_Vtbl { pub RemoveProtocol: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u32, u32, super::super::Foundation::HWND, u32, *mut core::ffi::c_void, usize) -> windows_core::HRESULT, } pub trait IRouterProtocolConfig_Impl: windows_core::IUnknownImpl { - fn AddProtocol(&self, pszmachinename: &windows_core::PCWSTR, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: Option<&windows_core::IUnknown>, ureserved1: usize) -> windows_core::Result<()>; - fn RemoveProtocol(&self, pszmachinename: &windows_core::PCWSTR, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: Option<&windows_core::IUnknown>, ureserved1: usize) -> windows_core::Result<()>; + fn AddProtocol(&self, pszmachinename: &windows_core::PCWSTR, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: windows_core::Ref<'_, windows_core::IUnknown>, ureserved1: usize) -> windows_core::Result<()>; + fn RemoveProtocol(&self, pszmachinename: &windows_core::PCWSTR, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: windows_core::Ref<'_, windows_core::IUnknown>, ureserved1: usize) -> windows_core::Result<()>; } impl IRouterProtocolConfig_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddProtocol(this: *mut core::ffi::c_void, pszmachinename: windows_core::PCWSTR, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: *mut core::ffi::c_void, ureserved1: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRouterProtocolConfig_Impl::AddProtocol(this, core::mem::transmute(&pszmachinename), core::mem::transmute_copy(&dwtransportid), core::mem::transmute_copy(&dwprotocolid), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&prouter), core::mem::transmute_copy(&ureserved1)).into() + IRouterProtocolConfig_Impl::AddProtocol(this, core::mem::transmute(&pszmachinename), core::mem::transmute_copy(&dwtransportid), core::mem::transmute_copy(&dwprotocolid), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&prouter), core::mem::transmute_copy(&ureserved1)).into() } unsafe extern "system" fn RemoveProtocol(this: *mut core::ffi::c_void, pszmachinename: windows_core::PCWSTR, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: *mut core::ffi::c_void, ureserved1: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRouterProtocolConfig_Impl::RemoveProtocol(this, core::mem::transmute(&pszmachinename), core::mem::transmute_copy(&dwtransportid), core::mem::transmute_copy(&dwprotocolid), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&prouter), core::mem::transmute_copy(&ureserved1)).into() + IRouterProtocolConfig_Impl::RemoveProtocol(this, core::mem::transmute(&pszmachinename), core::mem::transmute_copy(&dwtransportid), core::mem::transmute_copy(&dwprotocolid), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&prouter), core::mem::transmute_copy(&ureserved1)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs index 192415ff70..40e152ee77 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs @@ -41,8 +41,8 @@ pub struct ITpmVirtualSmartCardManager_Vtbl { pub DestroyVirtualSmartCard: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait ITpmVirtualSmartCardManager_Impl: windows_core::IUnknownImpl { - fn CreateVirtualSmartCard(&self, pszfriendlyname: &windows_core::PCWSTR, badminalgid: u8, pbadminkey: *const u8, cbadminkey: u32, pbadminkcv: *const u8, cbadminkcv: u32, pbpuk: *const u8, cbpuk: u32, pbpin: *const u8, cbpin: u32, fgenerate: super::super::Foundation::BOOL, pstatuscallback: Option<&ITpmVirtualSmartCardManagerStatusCallback>, ppszinstanceid: *mut windows_core::PWSTR, pfneedreboot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn DestroyVirtualSmartCard(&self, pszinstanceid: &windows_core::PCWSTR, pstatuscallback: Option<&ITpmVirtualSmartCardManagerStatusCallback>) -> windows_core::Result; + fn CreateVirtualSmartCard(&self, pszfriendlyname: &windows_core::PCWSTR, badminalgid: u8, pbadminkey: *const u8, cbadminkey: u32, pbadminkcv: *const u8, cbadminkcv: u32, pbpuk: *const u8, cbpuk: u32, pbpin: *const u8, cbpin: u32, fgenerate: super::super::Foundation::BOOL, pstatuscallback: windows_core::Ref<'_, ITpmVirtualSmartCardManagerStatusCallback>, ppszinstanceid: *mut windows_core::PWSTR, pfneedreboot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn DestroyVirtualSmartCard(&self, pszinstanceid: &windows_core::PCWSTR, pstatuscallback: windows_core::Ref<'_, ITpmVirtualSmartCardManagerStatusCallback>) -> windows_core::Result; } impl ITpmVirtualSmartCardManager_Vtbl { pub const fn new() -> Self { @@ -61,7 +61,7 @@ impl ITpmVirtualSmartCardManager_Vtbl { core::mem::transmute_copy(&pbpin), core::mem::transmute_copy(&cbpin), core::mem::transmute_copy(&fgenerate), - windows_core::from_raw_borrowed(&pstatuscallback), + core::mem::transmute_copy(&pstatuscallback), core::mem::transmute_copy(&ppszinstanceid), core::mem::transmute_copy(&pfneedreboot), ) @@ -69,7 +69,7 @@ impl ITpmVirtualSmartCardManager_Vtbl { } unsafe extern "system" fn DestroyVirtualSmartCard(this: *mut core::ffi::c_void, pszinstanceid: windows_core::PCWSTR, pstatuscallback: *mut core::ffi::c_void, pfneedreboot: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITpmVirtualSmartCardManager_Impl::DestroyVirtualSmartCard(this, core::mem::transmute(&pszinstanceid), windows_core::from_raw_borrowed(&pstatuscallback)) { + match ITpmVirtualSmartCardManager_Impl::DestroyVirtualSmartCard(this, core::mem::transmute(&pszinstanceid), core::mem::transmute_copy(&pstatuscallback)) { Ok(ok__) => { pfneedreboot.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -130,7 +130,7 @@ pub struct ITpmVirtualSmartCardManager2_Vtbl { pub CreateVirtualSmartCardWithPinPolicy: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u8, *const u8, u32, *const u8, u32, *const u8, u32, *const u8, u32, *const u8, u32, super::super::Foundation::BOOL, *mut core::ffi::c_void, *mut windows_core::PWSTR, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait ITpmVirtualSmartCardManager2_Impl: ITpmVirtualSmartCardManager_Impl { - fn CreateVirtualSmartCardWithPinPolicy(&self, pszfriendlyname: &windows_core::PCWSTR, badminalgid: u8, pbadminkey: *const u8, cbadminkey: u32, pbadminkcv: *const u8, cbadminkcv: u32, pbpuk: *const u8, cbpuk: u32, pbpin: *const u8, cbpin: u32, pbpinpolicy: *const u8, cbpinpolicy: u32, fgenerate: super::super::Foundation::BOOL, pstatuscallback: Option<&ITpmVirtualSmartCardManagerStatusCallback>, ppszinstanceid: *mut windows_core::PWSTR, pfneedreboot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn CreateVirtualSmartCardWithPinPolicy(&self, pszfriendlyname: &windows_core::PCWSTR, badminalgid: u8, pbadminkey: *const u8, cbadminkey: u32, pbadminkcv: *const u8, cbadminkcv: u32, pbpuk: *const u8, cbpuk: u32, pbpin: *const u8, cbpin: u32, pbpinpolicy: *const u8, cbpinpolicy: u32, fgenerate: super::super::Foundation::BOOL, pstatuscallback: windows_core::Ref<'_, ITpmVirtualSmartCardManagerStatusCallback>, ppszinstanceid: *mut windows_core::PWSTR, pfneedreboot: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl ITpmVirtualSmartCardManager2_Vtbl { pub const fn new() -> Self { @@ -151,7 +151,7 @@ impl ITpmVirtualSmartCardManager2_Vtbl { core::mem::transmute_copy(&pbpinpolicy), core::mem::transmute_copy(&cbpinpolicy), core::mem::transmute_copy(&fgenerate), - windows_core::from_raw_borrowed(&pstatuscallback), + core::mem::transmute_copy(&pstatuscallback), core::mem::transmute_copy(&ppszinstanceid), core::mem::transmute_copy(&pfneedreboot), ) @@ -210,7 +210,7 @@ pub struct ITpmVirtualSmartCardManager3_Vtbl { pub CreateVirtualSmartCardWithAttestation: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u8, *const u8, u32, *const u8, u32, *const u8, u32, *const u8, u32, *const u8, u32, TPMVSC_ATTESTATION_TYPE, super::super::Foundation::BOOL, *mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, } pub trait ITpmVirtualSmartCardManager3_Impl: ITpmVirtualSmartCardManager2_Impl { - fn CreateVirtualSmartCardWithAttestation(&self, pszfriendlyname: &windows_core::PCWSTR, badminalgid: u8, pbadminkey: *const u8, cbadminkey: u32, pbadminkcv: *const u8, cbadminkcv: u32, pbpuk: *const u8, cbpuk: u32, pbpin: *const u8, cbpin: u32, pbpinpolicy: *const u8, cbpinpolicy: u32, attestationtype: TPMVSC_ATTESTATION_TYPE, fgenerate: super::super::Foundation::BOOL, pstatuscallback: Option<&ITpmVirtualSmartCardManagerStatusCallback>) -> windows_core::Result; + fn CreateVirtualSmartCardWithAttestation(&self, pszfriendlyname: &windows_core::PCWSTR, badminalgid: u8, pbadminkey: *const u8, cbadminkey: u32, pbadminkcv: *const u8, cbadminkcv: u32, pbpuk: *const u8, cbpuk: u32, pbpin: *const u8, cbpin: u32, pbpinpolicy: *const u8, cbpinpolicy: u32, attestationtype: TPMVSC_ATTESTATION_TYPE, fgenerate: super::super::Foundation::BOOL, pstatuscallback: windows_core::Ref<'_, ITpmVirtualSmartCardManagerStatusCallback>) -> windows_core::Result; } impl ITpmVirtualSmartCardManager3_Vtbl { pub const fn new() -> Self { @@ -232,7 +232,7 @@ impl ITpmVirtualSmartCardManager3_Vtbl { core::mem::transmute_copy(&cbpinpolicy), core::mem::transmute_copy(&attestationtype), core::mem::transmute_copy(&fgenerate), - windows_core::from_raw_borrowed(&pstatuscallback), + core::mem::transmute_copy(&pstatuscallback), ) { Ok(ok__) => { ppszinstanceid.write(core::mem::transmute(ok__)); diff --git a/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs index 86af0975b7..4909e96466 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs @@ -160,13 +160,13 @@ pub struct IDedupBackupSupport_Vtbl { pub RestoreFiles: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const *mut core::ffi::c_void, *mut core::ffi::c_void, u32, *mut windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IDedupBackupSupport_Impl: windows_core::IUnknownImpl { - fn RestoreFiles(&self, numberoffiles: u32, filefullpaths: *const windows_core::BSTR, store: Option<&IDedupReadFileCallback>, flags: u32) -> windows_core::Result; + fn RestoreFiles(&self, numberoffiles: u32, filefullpaths: *const windows_core::BSTR, store: windows_core::Ref<'_, IDedupReadFileCallback>, flags: u32) -> windows_core::Result; } impl IDedupBackupSupport_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RestoreFiles(this: *mut core::ffi::c_void, numberoffiles: u32, filefullpaths: *const *mut core::ffi::c_void, store: *mut core::ffi::c_void, flags: u32, fileresults: *mut windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDedupBackupSupport_Impl::RestoreFiles(this, core::mem::transmute_copy(&numberoffiles), core::mem::transmute_copy(&filefullpaths), windows_core::from_raw_borrowed(&store), core::mem::transmute_copy(&flags)) { + match IDedupBackupSupport_Impl::RestoreFiles(this, core::mem::transmute_copy(&numberoffiles), core::mem::transmute_copy(&filefullpaths), core::mem::transmute_copy(&store), core::mem::transmute_copy(&flags)) { Ok(ok__) => { fileresults.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -339,9 +339,9 @@ pub trait IDedupDataPort_Impl: windows_core::IUnknownImpl { fn GetStatus(&self, pstatus: *mut DedupDataPortVolumeStatus, pdataheadroommb: *mut u32) -> windows_core::Result<()>; fn LookupChunks(&self, count: u32, phashes: *const DedupHash) -> windows_core::Result; fn InsertChunks(&self, chunkcount: u32, pchunkmetadata: *const DedupChunk, databytecount: u32, pchunkdata: *const u8) -> windows_core::Result; - fn InsertChunksWithStream(&self, chunkcount: u32, pchunkmetadata: *const DedupChunk, databytecount: u32, pchunkdatastream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn InsertChunksWithStream(&self, chunkcount: u32, pchunkmetadata: *const DedupChunk, databytecount: u32, pchunkdatastream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn CommitStreams(&self, streamcount: u32, pstreams: *const DedupStream, entrycount: u32, pentries: *const DedupStreamEntry) -> windows_core::Result; - fn CommitStreamsWithStream(&self, streamcount: u32, pstreams: *const DedupStream, entrycount: u32, pentriesstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn CommitStreamsWithStream(&self, streamcount: u32, pstreams: *const DedupStream, entrycount: u32, pentriesstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn GetStreams(&self, streamcount: u32, pstreampaths: *const windows_core::BSTR) -> windows_core::Result; fn GetStreamsResults(&self, requestid: &windows_core::GUID, maxwaitms: u32, streamentryindex: u32, pstreamcount: *mut u32, ppstreams: *mut *mut DedupStream, pentrycount: *mut u32, ppentries: *mut *mut DedupStreamEntry, pstatus: *mut DedupDataPortRequestStatus, ppitemresults: *mut *mut windows_core::HRESULT) -> windows_core::Result<()>; fn GetChunks(&self, count: u32, phashes: *const DedupHash) -> windows_core::Result; @@ -378,7 +378,7 @@ impl IDedupDataPort_Vtbl { } unsafe extern "system" fn InsertChunksWithStream(this: *mut core::ffi::c_void, chunkcount: u32, pchunkmetadata: *const DedupChunk, databytecount: u32, pchunkdatastream: *mut core::ffi::c_void, prequestid: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDedupDataPort_Impl::InsertChunksWithStream(this, core::mem::transmute_copy(&chunkcount), core::mem::transmute_copy(&pchunkmetadata), core::mem::transmute_copy(&databytecount), windows_core::from_raw_borrowed(&pchunkdatastream)) { + match IDedupDataPort_Impl::InsertChunksWithStream(this, core::mem::transmute_copy(&chunkcount), core::mem::transmute_copy(&pchunkmetadata), core::mem::transmute_copy(&databytecount), core::mem::transmute_copy(&pchunkdatastream)) { Ok(ok__) => { prequestid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -398,7 +398,7 @@ impl IDedupDataPort_Vtbl { } unsafe extern "system" fn CommitStreamsWithStream(this: *mut core::ffi::c_void, streamcount: u32, pstreams: *const DedupStream, entrycount: u32, pentriesstream: *mut core::ffi::c_void, prequestid: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDedupDataPort_Impl::CommitStreamsWithStream(this, core::mem::transmute_copy(&streamcount), core::mem::transmute_copy(&pstreams), core::mem::transmute_copy(&entrycount), windows_core::from_raw_borrowed(&pentriesstream)) { + match IDedupDataPort_Impl::CommitStreamsWithStream(this, core::mem::transmute_copy(&streamcount), core::mem::transmute_copy(&pstreams), core::mem::transmute_copy(&entrycount), core::mem::transmute_copy(&pentriesstream)) { Ok(ok__) => { prequestid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs index 08ea2ff372..e8af3a5c13 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileServerResourceManager/mod.rs @@ -2264,8 +2264,8 @@ pub struct IFsrmClassifierModuleImplementation_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IFsrmClassifierModuleImplementation_Impl: IFsrmPipelineModuleImplementation_Impl { fn LastModified(&self) -> windows_core::Result; - fn UseRulesAndDefinitions(&self, rules: Option<&IFsrmCollection>, propertydefinitions: Option<&IFsrmCollection>) -> windows_core::Result<()>; - fn OnBeginFile(&self, propertybag: Option<&IFsrmPropertyBag>, arrayruleids: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn UseRulesAndDefinitions(&self, rules: windows_core::Ref<'_, IFsrmCollection>, propertydefinitions: windows_core::Ref<'_, IFsrmCollection>) -> windows_core::Result<()>; + fn OnBeginFile(&self, propertybag: windows_core::Ref<'_, IFsrmPropertyBag>, arrayruleids: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; fn DoesPropertyValueApply(&self, property: &windows_core::BSTR, value: &windows_core::BSTR, applyvalue: *mut super::super::Foundation::VARIANT_BOOL, idrule: &windows_core::GUID, idpropdef: &windows_core::GUID) -> windows_core::Result<()>; fn GetPropertyValueToApply(&self, property: &windows_core::BSTR, value: *mut windows_core::BSTR, idrule: &windows_core::GUID, idpropdef: &windows_core::GUID) -> windows_core::Result<()>; fn OnEndFile(&self) -> windows_core::Result<()>; @@ -2285,11 +2285,11 @@ impl IFsrmClassifierModuleImplementation_Vtbl { } unsafe extern "system" fn UseRulesAndDefinitions(this: *mut core::ffi::c_void, rules: *mut core::ffi::c_void, propertydefinitions: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmClassifierModuleImplementation_Impl::UseRulesAndDefinitions(this, windows_core::from_raw_borrowed(&rules), windows_core::from_raw_borrowed(&propertydefinitions)).into() + IFsrmClassifierModuleImplementation_Impl::UseRulesAndDefinitions(this, core::mem::transmute_copy(&rules), core::mem::transmute_copy(&propertydefinitions)).into() } unsafe extern "system" fn OnBeginFile(this: *mut core::ffi::c_void, propertybag: *mut core::ffi::c_void, arrayruleids: *const super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmClassifierModuleImplementation_Impl::OnBeginFile(this, windows_core::from_raw_borrowed(&propertybag), core::mem::transmute_copy(&arrayruleids)).into() + IFsrmClassifierModuleImplementation_Impl::OnBeginFile(this, core::mem::transmute_copy(&propertybag), core::mem::transmute_copy(&arrayruleids)).into() } unsafe extern "system" fn DoesPropertyValueApply(this: *mut core::ffi::c_void, property: *mut core::ffi::c_void, value: *mut core::ffi::c_void, applyvalue: *mut super::super::Foundation::VARIANT_BOOL, idrule: windows_core::GUID, idpropdef: windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3025,9 +3025,9 @@ pub trait IFsrmFileGroup_Impl: IFsrmObject_Impl { fn Name(&self) -> windows_core::Result; fn SetName(&self, name: &windows_core::BSTR) -> windows_core::Result<()>; fn Members(&self) -> windows_core::Result; - fn SetMembers(&self, members: Option<&IFsrmMutableCollection>) -> windows_core::Result<()>; + fn SetMembers(&self, members: windows_core::Ref<'_, IFsrmMutableCollection>) -> windows_core::Result<()>; fn NonMembers(&self) -> windows_core::Result; - fn SetNonMembers(&self, nonmembers: Option<&IFsrmMutableCollection>) -> windows_core::Result<()>; + fn SetNonMembers(&self, nonmembers: windows_core::Ref<'_, IFsrmMutableCollection>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFsrmFileGroup_Vtbl { @@ -3058,7 +3058,7 @@ impl IFsrmFileGroup_Vtbl { } unsafe extern "system" fn SetMembers(this: *mut core::ffi::c_void, members: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmFileGroup_Impl::SetMembers(this, windows_core::from_raw_borrowed(&members)).into() + IFsrmFileGroup_Impl::SetMembers(this, core::mem::transmute_copy(&members)).into() } unsafe extern "system" fn NonMembers(this: *mut core::ffi::c_void, nonmembers: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3072,7 +3072,7 @@ impl IFsrmFileGroup_Vtbl { } unsafe extern "system" fn SetNonMembers(this: *mut core::ffi::c_void, nonmembers: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmFileGroup_Impl::SetNonMembers(this, windows_core::from_raw_borrowed(&nonmembers)).into() + IFsrmFileGroup_Impl::SetNonMembers(this, core::mem::transmute_copy(&nonmembers)).into() } Self { base__: IFsrmObject_Vtbl::new::(), @@ -4340,7 +4340,7 @@ pub struct IFsrmFileScreenBase_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IFsrmFileScreenBase_Impl: IFsrmObject_Impl { fn BlockedFileGroups(&self) -> windows_core::Result; - fn SetBlockedFileGroups(&self, blocklist: Option<&IFsrmMutableCollection>) -> windows_core::Result<()>; + fn SetBlockedFileGroups(&self, blocklist: windows_core::Ref<'_, IFsrmMutableCollection>) -> windows_core::Result<()>; fn FileScreenFlags(&self) -> windows_core::Result; fn SetFileScreenFlags(&self, filescreenflags: i32) -> windows_core::Result<()>; fn CreateAction(&self, actiontype: FsrmActionType) -> windows_core::Result; @@ -4361,7 +4361,7 @@ impl IFsrmFileScreenBase_Vtbl { } unsafe extern "system" fn SetBlockedFileGroups(this: *mut core::ffi::c_void, blocklist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmFileScreenBase_Impl::SetBlockedFileGroups(this, windows_core::from_raw_borrowed(&blocklist)).into() + IFsrmFileScreenBase_Impl::SetBlockedFileGroups(this, core::mem::transmute_copy(&blocklist)).into() } unsafe extern "system" fn FileScreenFlags(this: *mut core::ffi::c_void, filescreenflags: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4453,7 +4453,7 @@ pub struct IFsrmFileScreenException_Vtbl { pub trait IFsrmFileScreenException_Impl: IFsrmObject_Impl { fn Path(&self) -> windows_core::Result; fn AllowedFileGroups(&self) -> windows_core::Result; - fn SetAllowedFileGroups(&self, allowlist: Option<&IFsrmMutableCollection>) -> windows_core::Result<()>; + fn SetAllowedFileGroups(&self, allowlist: windows_core::Ref<'_, IFsrmMutableCollection>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFsrmFileScreenException_Vtbl { @@ -4480,7 +4480,7 @@ impl IFsrmFileScreenException_Vtbl { } unsafe extern "system" fn SetAllowedFileGroups(this: *mut core::ffi::c_void, allowlist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmFileScreenException_Impl::SetAllowedFileGroups(this, windows_core::from_raw_borrowed(&allowlist)).into() + IFsrmFileScreenException_Impl::SetAllowedFileGroups(this, core::mem::transmute_copy(&allowlist)).into() } Self { base__: IFsrmObject_Vtbl::new::(), @@ -5264,7 +5264,7 @@ pub trait IFsrmPipelineModuleConnector_Impl: super::super::System::Com::IDispatc fn ModuleName(&self) -> windows_core::Result; fn HostingUserAccount(&self) -> windows_core::Result; fn HostingProcessPid(&self) -> windows_core::Result; - fn Bind(&self, moduledefinition: Option<&IFsrmPipelineModuleDefinition>, moduleimplementation: Option<&IFsrmPipelineModuleImplementation>) -> windows_core::Result<()>; + fn Bind(&self, moduledefinition: windows_core::Ref<'_, IFsrmPipelineModuleDefinition>, moduleimplementation: windows_core::Ref<'_, IFsrmPipelineModuleImplementation>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFsrmPipelineModuleConnector_Vtbl { @@ -5311,7 +5311,7 @@ impl IFsrmPipelineModuleConnector_Vtbl { } unsafe extern "system" fn Bind(this: *mut core::ffi::c_void, moduledefinition: *mut core::ffi::c_void, moduleimplementation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmPipelineModuleConnector_Impl::Bind(this, windows_core::from_raw_borrowed(&moduledefinition), windows_core::from_raw_borrowed(&moduleimplementation)).into() + IFsrmPipelineModuleConnector_Impl::Bind(this, core::mem::transmute_copy(&moduledefinition), core::mem::transmute_copy(&moduleimplementation)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -5672,7 +5672,7 @@ pub struct IFsrmPipelineModuleImplementation_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IFsrmPipelineModuleImplementation_Impl: super::super::System::Com::IDispatch_Impl { - fn OnLoad(&self, moduledefinition: Option<&IFsrmPipelineModuleDefinition>) -> windows_core::Result; + fn OnLoad(&self, moduledefinition: windows_core::Ref<'_, IFsrmPipelineModuleDefinition>) -> windows_core::Result; fn OnUnload(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -5680,7 +5680,7 @@ impl IFsrmPipelineModuleImplementation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnLoad(this: *mut core::ffi::c_void, moduledefinition: *mut core::ffi::c_void, moduleconnector: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFsrmPipelineModuleImplementation_Impl::OnLoad(this, windows_core::from_raw_borrowed(&moduledefinition)) { + match IFsrmPipelineModuleImplementation_Impl::OnLoad(this, core::mem::transmute_copy(&moduledefinition)) { Ok(ok__) => { moduleconnector.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9174,24 +9174,24 @@ pub struct IFsrmStorageModuleImplementation_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IFsrmStorageModuleImplementation_Impl: IFsrmPipelineModuleImplementation_Impl { - fn UseDefinitions(&self, propertydefinitions: Option<&IFsrmCollection>) -> windows_core::Result<()>; - fn LoadProperties(&self, propertybag: Option<&IFsrmPropertyBag>) -> windows_core::Result<()>; - fn SaveProperties(&self, propertybag: Option<&IFsrmPropertyBag>) -> windows_core::Result<()>; + fn UseDefinitions(&self, propertydefinitions: windows_core::Ref<'_, IFsrmCollection>) -> windows_core::Result<()>; + fn LoadProperties(&self, propertybag: windows_core::Ref<'_, IFsrmPropertyBag>) -> windows_core::Result<()>; + fn SaveProperties(&self, propertybag: windows_core::Ref<'_, IFsrmPropertyBag>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFsrmStorageModuleImplementation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UseDefinitions(this: *mut core::ffi::c_void, propertydefinitions: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmStorageModuleImplementation_Impl::UseDefinitions(this, windows_core::from_raw_borrowed(&propertydefinitions)).into() + IFsrmStorageModuleImplementation_Impl::UseDefinitions(this, core::mem::transmute_copy(&propertydefinitions)).into() } unsafe extern "system" fn LoadProperties(this: *mut core::ffi::c_void, propertybag: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmStorageModuleImplementation_Impl::LoadProperties(this, windows_core::from_raw_borrowed(&propertybag)).into() + IFsrmStorageModuleImplementation_Impl::LoadProperties(this, core::mem::transmute_copy(&propertybag)).into() } unsafe extern "system" fn SaveProperties(this: *mut core::ffi::c_void, propertybag: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsrmStorageModuleImplementation_Impl::SaveProperties(this, windows_core::from_raw_borrowed(&propertybag)).into() + IFsrmStorageModuleImplementation_Impl::SaveProperties(this, core::mem::transmute_copy(&propertybag)).into() } Self { base__: IFsrmPipelineModuleImplementation_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs index 15788db988..c2957a9944 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs @@ -5275,13 +5275,13 @@ pub trait IDiskQuotaControl_Impl: super::super::System::Com::IConnectionPointCon fn GetDefaultQuotaLimitText(&self, psztext: &windows_core::PCWSTR, cchtext: u32) -> windows_core::Result<()>; fn AddUserSid(&self, pusersid: super::super::Security::PSID, fnameresolution: DISKQUOTA_USERNAME_RESOLVE) -> windows_core::Result; fn AddUserName(&self, pszlogonname: &windows_core::PCWSTR, fnameresolution: DISKQUOTA_USERNAME_RESOLVE) -> windows_core::Result; - fn DeleteUser(&self, puser: Option<&IDiskQuotaUser>) -> windows_core::Result<()>; + fn DeleteUser(&self, puser: windows_core::Ref<'_, IDiskQuotaUser>) -> windows_core::Result<()>; fn FindUserSid(&self, pusersid: super::super::Security::PSID, fnameresolution: DISKQUOTA_USERNAME_RESOLVE) -> windows_core::Result; fn FindUserName(&self, pszlogonname: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateEnumUsers(&self, rgpusersids: *mut super::super::Security::PSID, cpsids: u32, fnameresolution: DISKQUOTA_USERNAME_RESOLVE, ppenum: *mut Option) -> windows_core::Result<()>; + fn CreateEnumUsers(&self, rgpusersids: *mut super::super::Security::PSID, cpsids: u32, fnameresolution: DISKQUOTA_USERNAME_RESOLVE, ppenum: windows_core::OutRef<'_, IEnumDiskQuotaUsers>) -> windows_core::Result<()>; fn CreateUserBatch(&self) -> windows_core::Result; fn InvalidateSidNameCache(&self) -> windows_core::Result<()>; - fn GiveUserNameResolutionPriority(&self, puser: Option<&IDiskQuotaUser>) -> windows_core::Result<()>; + fn GiveUserNameResolutionPriority(&self, puser: windows_core::Ref<'_, IDiskQuotaUser>) -> windows_core::Result<()>; fn ShutdownNameResolution(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Com"))] @@ -5353,7 +5353,7 @@ impl IDiskQuotaControl_Vtbl { } unsafe extern "system" fn DeleteUser(this: *mut core::ffi::c_void, puser: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiskQuotaControl_Impl::DeleteUser(this, windows_core::from_raw_borrowed(&puser)).into() + IDiskQuotaControl_Impl::DeleteUser(this, core::mem::transmute_copy(&puser)).into() } unsafe extern "system" fn FindUserSid(this: *mut core::ffi::c_void, pusersid: super::super::Security::PSID, fnameresolution: DISKQUOTA_USERNAME_RESOLVE, ppuser: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5395,7 +5395,7 @@ impl IDiskQuotaControl_Vtbl { } unsafe extern "system" fn GiveUserNameResolutionPriority(this: *mut core::ffi::c_void, puser: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiskQuotaControl_Impl::GiveUserNameResolutionPriority(this, windows_core::from_raw_borrowed(&puser)).into() + IDiskQuotaControl_Impl::GiveUserNameResolutionPriority(this, core::mem::transmute_copy(&puser)).into() } unsafe extern "system" fn ShutdownNameResolution(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5448,13 +5448,13 @@ pub struct IDiskQuotaEvents_Vtbl { pub OnUserNameChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDiskQuotaEvents_Impl: windows_core::IUnknownImpl { - fn OnUserNameChanged(&self, puser: Option<&IDiskQuotaUser>) -> windows_core::Result<()>; + fn OnUserNameChanged(&self, puser: windows_core::Ref<'_, IDiskQuotaUser>) -> windows_core::Result<()>; } impl IDiskQuotaEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnUserNameChanged(this: *mut core::ffi::c_void, puser: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiskQuotaEvents_Impl::OnUserNameChanged(this, windows_core::from_raw_borrowed(&puser)).into() + IDiskQuotaEvents_Impl::OnUserNameChanged(this, core::mem::transmute_copy(&puser)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnUserNameChanged: OnUserNameChanged:: } } @@ -5679,8 +5679,8 @@ pub struct IDiskQuotaUserBatch_Vtbl { pub FlushToDisk: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDiskQuotaUserBatch_Impl: windows_core::IUnknownImpl { - fn Add(&self, puser: Option<&IDiskQuotaUser>) -> windows_core::Result<()>; - fn Remove(&self, puser: Option<&IDiskQuotaUser>) -> windows_core::Result<()>; + fn Add(&self, puser: windows_core::Ref<'_, IDiskQuotaUser>) -> windows_core::Result<()>; + fn Remove(&self, puser: windows_core::Ref<'_, IDiskQuotaUser>) -> windows_core::Result<()>; fn RemoveAll(&self) -> windows_core::Result<()>; fn FlushToDisk(&self) -> windows_core::Result<()>; } @@ -5688,11 +5688,11 @@ impl IDiskQuotaUserBatch_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Add(this: *mut core::ffi::c_void, puser: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiskQuotaUserBatch_Impl::Add(this, windows_core::from_raw_borrowed(&puser)).into() + IDiskQuotaUserBatch_Impl::Add(this, core::mem::transmute_copy(&puser)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, puser: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiskQuotaUserBatch_Impl::Remove(this, windows_core::from_raw_borrowed(&puser)).into() + IDiskQuotaUserBatch_Impl::Remove(this, core::mem::transmute_copy(&puser)).into() } unsafe extern "system" fn RemoveAll(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5741,7 +5741,7 @@ pub struct IEnumDiskQuotaUsers_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumDiskQuotaUsers_Impl: windows_core::IUnknownImpl { - fn Next(&self, cusers: u32, rgusers: *mut Option, pcusersfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cusers: u32, rgusers: windows_core::OutRef<'_, IDiskQuotaUser>, pcusersfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cusers: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs index c01aedd1e4..39d2b40b3f 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs @@ -91,14 +91,14 @@ pub struct DDiscFormat2DataEvents_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait DDiscFormat2DataEvents_Impl: super::super::System::Com::IDispatch_Impl { - fn Update(&self, object: Option<&super::super::System::Com::IDispatch>, progress: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn Update(&self, object: windows_core::Ref<'_, super::super::System::Com::IDispatch>, progress: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl DDiscFormat2DataEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Update(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, progress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DDiscFormat2DataEvents_Impl::Update(this, windows_core::from_raw_borrowed(&object), windows_core::from_raw_borrowed(&progress)).into() + DDiscFormat2DataEvents_Impl::Update(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&progress)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), Update: Update:: } } @@ -136,14 +136,14 @@ pub struct DDiscFormat2EraseEvents_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait DDiscFormat2EraseEvents_Impl: super::super::System::Com::IDispatch_Impl { - fn Update(&self, object: Option<&super::super::System::Com::IDispatch>, elapsedseconds: i32, estimatedtotalseconds: i32) -> windows_core::Result<()>; + fn Update(&self, object: windows_core::Ref<'_, super::super::System::Com::IDispatch>, elapsedseconds: i32, estimatedtotalseconds: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl DDiscFormat2EraseEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Update(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, elapsedseconds: i32, estimatedtotalseconds: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DDiscFormat2EraseEvents_Impl::Update(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&elapsedseconds), core::mem::transmute_copy(&estimatedtotalseconds)).into() + DDiscFormat2EraseEvents_Impl::Update(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&elapsedseconds), core::mem::transmute_copy(&estimatedtotalseconds)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), Update: Update:: } } @@ -182,14 +182,14 @@ pub struct DDiscFormat2RawCDEvents_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait DDiscFormat2RawCDEvents_Impl: super::super::System::Com::IDispatch_Impl { - fn Update(&self, object: Option<&super::super::System::Com::IDispatch>, progress: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn Update(&self, object: windows_core::Ref<'_, super::super::System::Com::IDispatch>, progress: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl DDiscFormat2RawCDEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Update(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, progress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DDiscFormat2RawCDEvents_Impl::Update(this, windows_core::from_raw_borrowed(&object), windows_core::from_raw_borrowed(&progress)).into() + DDiscFormat2RawCDEvents_Impl::Update(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&progress)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), Update: Update:: } } @@ -228,14 +228,14 @@ pub struct DDiscFormat2TrackAtOnceEvents_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait DDiscFormat2TrackAtOnceEvents_Impl: super::super::System::Com::IDispatch_Impl { - fn Update(&self, object: Option<&super::super::System::Com::IDispatch>, progress: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn Update(&self, object: windows_core::Ref<'_, super::super::System::Com::IDispatch>, progress: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl DDiscFormat2TrackAtOnceEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Update(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, progress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DDiscFormat2TrackAtOnceEvents_Impl::Update(this, windows_core::from_raw_borrowed(&object), windows_core::from_raw_borrowed(&progress)).into() + DDiscFormat2TrackAtOnceEvents_Impl::Update(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&progress)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), Update: Update:: } } @@ -280,19 +280,19 @@ pub struct DDiscMaster2Events_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait DDiscMaster2Events_Impl: super::super::System::Com::IDispatch_Impl { - fn NotifyDeviceAdded(&self, object: Option<&super::super::System::Com::IDispatch>, uniqueid: &windows_core::BSTR) -> windows_core::Result<()>; - fn NotifyDeviceRemoved(&self, object: Option<&super::super::System::Com::IDispatch>, uniqueid: &windows_core::BSTR) -> windows_core::Result<()>; + fn NotifyDeviceAdded(&self, object: windows_core::Ref<'_, super::super::System::Com::IDispatch>, uniqueid: &windows_core::BSTR) -> windows_core::Result<()>; + fn NotifyDeviceRemoved(&self, object: windows_core::Ref<'_, super::super::System::Com::IDispatch>, uniqueid: &windows_core::BSTR) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl DDiscMaster2Events_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn NotifyDeviceAdded(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, uniqueid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DDiscMaster2Events_Impl::NotifyDeviceAdded(this, windows_core::from_raw_borrowed(&object), core::mem::transmute(&uniqueid)).into() + DDiscMaster2Events_Impl::NotifyDeviceAdded(this, core::mem::transmute_copy(&object), core::mem::transmute(&uniqueid)).into() } unsafe extern "system" fn NotifyDeviceRemoved(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, uniqueid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DDiscMaster2Events_Impl::NotifyDeviceRemoved(this, windows_core::from_raw_borrowed(&object), core::mem::transmute(&uniqueid)).into() + DDiscMaster2Events_Impl::NotifyDeviceRemoved(this, core::mem::transmute_copy(&object), core::mem::transmute(&uniqueid)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -334,14 +334,14 @@ pub struct DFileSystemImageEvents_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait DFileSystemImageEvents_Impl: super::super::System::Com::IDispatch_Impl { - fn Update(&self, object: Option<&super::super::System::Com::IDispatch>, currentfile: &windows_core::BSTR, copiedsectors: i32, totalsectors: i32) -> windows_core::Result<()>; + fn Update(&self, object: windows_core::Ref<'_, super::super::System::Com::IDispatch>, currentfile: &windows_core::BSTR, copiedsectors: i32, totalsectors: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl DFileSystemImageEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Update(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, currentfile: *mut core::ffi::c_void, copiedsectors: i32, totalsectors: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DFileSystemImageEvents_Impl::Update(this, windows_core::from_raw_borrowed(&object), core::mem::transmute(¤tfile), core::mem::transmute_copy(&copiedsectors), core::mem::transmute_copy(&totalsectors)).into() + DFileSystemImageEvents_Impl::Update(this, core::mem::transmute_copy(&object), core::mem::transmute(¤tfile), core::mem::transmute_copy(&copiedsectors), core::mem::transmute_copy(&totalsectors)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), Update: Update:: } } @@ -379,14 +379,14 @@ pub struct DFileSystemImageImportEvents_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait DFileSystemImageImportEvents_Impl: super::super::System::Com::IDispatch_Impl { - fn UpdateImport(&self, object: Option<&super::super::System::Com::IDispatch>, filesystem: FsiFileSystems, currentitem: &windows_core::BSTR, importeddirectoryitems: i32, totaldirectoryitems: i32, importedfileitems: i32, totalfileitems: i32) -> windows_core::Result<()>; + fn UpdateImport(&self, object: windows_core::Ref<'_, super::super::System::Com::IDispatch>, filesystem: FsiFileSystems, currentitem: &windows_core::BSTR, importeddirectoryitems: i32, totaldirectoryitems: i32, importedfileitems: i32, totalfileitems: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl DFileSystemImageImportEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UpdateImport(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, filesystem: FsiFileSystems, currentitem: *mut core::ffi::c_void, importeddirectoryitems: i32, totaldirectoryitems: i32, importedfileitems: i32, totalfileitems: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DFileSystemImageImportEvents_Impl::UpdateImport(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&filesystem), core::mem::transmute(¤titem), core::mem::transmute_copy(&importeddirectoryitems), core::mem::transmute_copy(&totaldirectoryitems), core::mem::transmute_copy(&importedfileitems), core::mem::transmute_copy(&totalfileitems)).into() + DFileSystemImageImportEvents_Impl::UpdateImport(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&filesystem), core::mem::transmute(¤titem), core::mem::transmute_copy(&importeddirectoryitems), core::mem::transmute_copy(&totaldirectoryitems), core::mem::transmute_copy(&importedfileitems), core::mem::transmute_copy(&totalfileitems)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), UpdateImport: UpdateImport:: } } @@ -600,14 +600,14 @@ pub struct DWriteEngine2Events_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait DWriteEngine2Events_Impl: super::super::System::Com::IDispatch_Impl { - fn Update(&self, object: Option<&super::super::System::Com::IDispatch>, progress: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn Update(&self, object: windows_core::Ref<'_, super::super::System::Com::IDispatch>, progress: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl DWriteEngine2Events_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Update(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, progress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DWriteEngine2Events_Impl::Update(this, windows_core::from_raw_borrowed(&object), windows_core::from_raw_borrowed(&progress)).into() + DWriteEngine2Events_Impl::Update(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&progress)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), Update: Update:: } } @@ -851,7 +851,7 @@ pub trait IBootOptions_Impl: super::super::System::Com::IDispatch_Impl { fn Emulation(&self) -> windows_core::Result; fn SetEmulation(&self, newval: EmulationType) -> windows_core::Result<()>; fn ImageSize(&self) -> windows_core::Result; - fn AssignBootImage(&self, newval: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AssignBootImage(&self, newval: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IBootOptions_Vtbl { @@ -920,7 +920,7 @@ impl IBootOptions_Vtbl { } unsafe extern "system" fn AssignBootImage(this: *mut core::ffi::c_void, newval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBootOptions_Impl::AssignBootImage(this, windows_core::from_raw_borrowed(&newval)).into() + IBootOptions_Impl::AssignBootImage(this, core::mem::transmute_copy(&newval)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -1045,8 +1045,8 @@ pub struct IDiscFormat2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDiscFormat2_Impl: super::super::System::Com::IDispatch_Impl { - fn IsRecorderSupported(&self, recorder: Option<&IDiscRecorder2>) -> windows_core::Result; - fn IsCurrentMediaSupported(&self, recorder: Option<&IDiscRecorder2>) -> windows_core::Result; + fn IsRecorderSupported(&self, recorder: windows_core::Ref<'_, IDiscRecorder2>) -> windows_core::Result; + fn IsCurrentMediaSupported(&self, recorder: windows_core::Ref<'_, IDiscRecorder2>) -> windows_core::Result; fn MediaPhysicallyBlank(&self) -> windows_core::Result; fn MediaHeuristicallyBlank(&self) -> windows_core::Result; fn SupportedMediaTypes(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; @@ -1056,7 +1056,7 @@ impl IDiscFormat2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsRecorderSupported(this: *mut core::ffi::c_void, recorder: *mut core::ffi::c_void, value: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDiscFormat2_Impl::IsRecorderSupported(this, windows_core::from_raw_borrowed(&recorder)) { + match IDiscFormat2_Impl::IsRecorderSupported(this, core::mem::transmute_copy(&recorder)) { Ok(ok__) => { value.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1066,7 +1066,7 @@ impl IDiscFormat2_Vtbl { } unsafe extern "system" fn IsCurrentMediaSupported(this: *mut core::ffi::c_void, recorder: *mut core::ffi::c_void, value: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDiscFormat2_Impl::IsCurrentMediaSupported(this, windows_core::from_raw_borrowed(&recorder)) { + match IDiscFormat2_Impl::IsCurrentMediaSupported(this, core::mem::transmute_copy(&recorder)) { Ok(ok__) => { value.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1312,7 +1312,7 @@ pub struct IDiscFormat2Data_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDiscFormat2Data_Impl: IDiscFormat2_Impl { - fn SetRecorder(&self, value: Option<&IDiscRecorder2>) -> windows_core::Result<()>; + fn SetRecorder(&self, value: windows_core::Ref<'_, IDiscRecorder2>) -> windows_core::Result<()>; fn Recorder(&self) -> windows_core::Result; fn SetBufferUnderrunFreeDisabled(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn BufferUnderrunFreeDisabled(&self) -> windows_core::Result; @@ -1341,7 +1341,7 @@ pub trait IDiscFormat2Data_Impl: IDiscFormat2_Impl { fn SetForceOverwrite(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn ForceOverwrite(&self) -> windows_core::Result; fn MultisessionInterfaces(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; - fn Write(&self, data: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Write(&self, data: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn CancelWrite(&self) -> windows_core::Result<()>; fn SetWriteSpeed(&self, requestedsectorspersecond: i32, rotationtypeispurecav: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } @@ -1350,7 +1350,7 @@ impl IDiscFormat2Data_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRecorder(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscFormat2Data_Impl::SetRecorder(this, windows_core::from_raw_borrowed(&value)).into() + IDiscFormat2Data_Impl::SetRecorder(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Recorder(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1598,7 +1598,7 @@ impl IDiscFormat2Data_Vtbl { } unsafe extern "system" fn Write(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscFormat2Data_Impl::Write(this, windows_core::from_raw_borrowed(&data)).into() + IDiscFormat2Data_Impl::Write(this, core::mem::transmute_copy(&data)).into() } unsafe extern "system" fn CancelWrite(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1813,7 +1813,7 @@ pub struct IDiscFormat2Erase_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDiscFormat2Erase_Impl: IDiscFormat2_Impl { - fn SetRecorder(&self, value: Option<&IDiscRecorder2>) -> windows_core::Result<()>; + fn SetRecorder(&self, value: windows_core::Ref<'_, IDiscRecorder2>) -> windows_core::Result<()>; fn Recorder(&self) -> windows_core::Result; fn SetFullErase(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn FullErase(&self) -> windows_core::Result; @@ -1827,7 +1827,7 @@ impl IDiscFormat2Erase_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRecorder(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscFormat2Erase_Impl::SetRecorder(this, windows_core::from_raw_borrowed(&value)).into() + IDiscFormat2Erase_Impl::SetRecorder(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Recorder(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2060,12 +2060,12 @@ pub struct IDiscFormat2RawCD_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDiscFormat2RawCD_Impl: IDiscFormat2_Impl { fn PrepareMedia(&self) -> windows_core::Result<()>; - fn WriteMedia(&self, data: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn WriteMedia2(&self, data: Option<&super::super::System::Com::IStream>, streamleadinsectors: i32) -> windows_core::Result<()>; + fn WriteMedia(&self, data: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn WriteMedia2(&self, data: windows_core::Ref<'_, super::super::System::Com::IStream>, streamleadinsectors: i32) -> windows_core::Result<()>; fn CancelWrite(&self) -> windows_core::Result<()>; fn ReleaseMedia(&self) -> windows_core::Result<()>; fn SetWriteSpeed(&self, requestedsectorspersecond: i32, rotationtypeispurecav: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn SetRecorder(&self, value: Option<&IDiscRecorder2>) -> windows_core::Result<()>; + fn SetRecorder(&self, value: windows_core::Ref<'_, IDiscRecorder2>) -> windows_core::Result<()>; fn Recorder(&self) -> windows_core::Result; fn SetBufferUnderrunFreeDisabled(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn BufferUnderrunFreeDisabled(&self) -> windows_core::Result; @@ -2093,11 +2093,11 @@ impl IDiscFormat2RawCD_Vtbl { } unsafe extern "system" fn WriteMedia(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscFormat2RawCD_Impl::WriteMedia(this, windows_core::from_raw_borrowed(&data)).into() + IDiscFormat2RawCD_Impl::WriteMedia(this, core::mem::transmute_copy(&data)).into() } unsafe extern "system" fn WriteMedia2(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void, streamleadinsectors: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscFormat2RawCD_Impl::WriteMedia2(this, windows_core::from_raw_borrowed(&data), core::mem::transmute_copy(&streamleadinsectors)).into() + IDiscFormat2RawCD_Impl::WriteMedia2(this, core::mem::transmute_copy(&data), core::mem::transmute_copy(&streamleadinsectors)).into() } unsafe extern "system" fn CancelWrite(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2113,7 +2113,7 @@ impl IDiscFormat2RawCD_Vtbl { } unsafe extern "system" fn SetRecorder(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscFormat2RawCD_Impl::SetRecorder(this, windows_core::from_raw_borrowed(&value)).into() + IDiscFormat2RawCD_Impl::SetRecorder(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Recorder(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2547,11 +2547,11 @@ pub struct IDiscFormat2TrackAtOnce_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDiscFormat2TrackAtOnce_Impl: IDiscFormat2_Impl { fn PrepareMedia(&self) -> windows_core::Result<()>; - fn AddAudioTrack(&self, data: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddAudioTrack(&self, data: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn CancelAddTrack(&self) -> windows_core::Result<()>; fn ReleaseMedia(&self) -> windows_core::Result<()>; fn SetWriteSpeed(&self, requestedsectorspersecond: i32, rotationtypeispurecav: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn SetRecorder(&self, value: Option<&IDiscRecorder2>) -> windows_core::Result<()>; + fn SetRecorder(&self, value: windows_core::Ref<'_, IDiscRecorder2>) -> windows_core::Result<()>; fn Recorder(&self) -> windows_core::Result; fn SetBufferUnderrunFreeDisabled(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn BufferUnderrunFreeDisabled(&self) -> windows_core::Result; @@ -2581,7 +2581,7 @@ impl IDiscFormat2TrackAtOnce_Vtbl { } unsafe extern "system" fn AddAudioTrack(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscFormat2TrackAtOnce_Impl::AddAudioTrack(this, windows_core::from_raw_borrowed(&data)).into() + IDiscFormat2TrackAtOnce_Impl::AddAudioTrack(this, core::mem::transmute_copy(&data)).into() } unsafe extern "system" fn CancelAddTrack(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2597,7 +2597,7 @@ impl IDiscFormat2TrackAtOnce_Vtbl { } unsafe extern "system" fn SetRecorder(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscFormat2TrackAtOnce_Impl::SetRecorder(this, windows_core::from_raw_borrowed(&value)).into() + IDiscFormat2TrackAtOnce_Impl::SetRecorder(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Recorder(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2983,9 +2983,9 @@ pub trait IDiscMaster_Impl: windows_core::IUnknownImpl { fn SetActiveDiscMasterFormat(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn EnumDiscRecorders(&self) -> windows_core::Result; fn GetActiveDiscRecorder(&self) -> windows_core::Result; - fn SetActiveDiscRecorder(&self, precorder: Option<&IDiscRecorder>) -> windows_core::Result<()>; + fn SetActiveDiscRecorder(&self, precorder: windows_core::Ref<'_, IDiscRecorder>) -> windows_core::Result<()>; fn ClearFormatContent(&self) -> windows_core::Result<()>; - fn ProgressAdvise(&self, pevents: Option<&IDiscMasterProgressEvents>) -> windows_core::Result; + fn ProgressAdvise(&self, pevents: windows_core::Ref<'_, IDiscMasterProgressEvents>) -> windows_core::Result; fn ProgressUnadvise(&self, vcookie: usize) -> windows_core::Result<()>; fn RecordDisc(&self, bsimulate: u8, bejectafterburn: u8) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; @@ -3042,7 +3042,7 @@ impl IDiscMaster_Vtbl { } unsafe extern "system" fn SetActiveDiscRecorder(this: *mut core::ffi::c_void, precorder: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscMaster_Impl::SetActiveDiscRecorder(this, windows_core::from_raw_borrowed(&precorder)).into() + IDiscMaster_Impl::SetActiveDiscRecorder(this, core::mem::transmute_copy(&precorder)).into() } unsafe extern "system" fn ClearFormatContent(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3050,7 +3050,7 @@ impl IDiscMaster_Vtbl { } unsafe extern "system" fn ProgressAdvise(this: *mut core::ffi::c_void, pevents: *mut core::ffi::c_void, pvcookie: *mut usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDiscMaster_Impl::ProgressAdvise(this, windows_core::from_raw_borrowed(&pevents)) { + match IDiscMaster_Impl::ProgressAdvise(this, core::mem::transmute_copy(&pevents)) { Ok(ok__) => { pvcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3409,7 +3409,7 @@ pub trait IDiscRecorder_Impl: windows_core::IUnknownImpl { fn GetBasePnPID(&self) -> windows_core::Result; fn GetPath(&self) -> windows_core::Result; fn GetRecorderProperties(&self) -> windows_core::Result; - fn SetRecorderProperties(&self, ppropstg: Option<&super::super::System::Com::StructuredStorage::IPropertyStorage>) -> windows_core::Result<()>; + fn SetRecorderProperties(&self, ppropstg: windows_core::Ref<'_, super::super::System::Com::StructuredStorage::IPropertyStorage>) -> windows_core::Result<()>; fn GetRecorderState(&self) -> windows_core::Result; fn OpenExclusive(&self) -> windows_core::Result<()>; fn QueryMediaType(&self, fmediatype: *mut MEDIA_TYPES, fmediaflags: *mut MEDIA_FLAGS) -> windows_core::Result<()>; @@ -3475,7 +3475,7 @@ impl IDiscRecorder_Vtbl { } unsafe extern "system" fn SetRecorderProperties(this: *mut core::ffi::c_void, ppropstg: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDiscRecorder_Impl::SetRecorderProperties(this, windows_core::from_raw_borrowed(&ppropstg)).into() + IDiscRecorder_Impl::SetRecorderProperties(this, core::mem::transmute_copy(&ppropstg)).into() } unsafe extern "system" fn GetRecorderState(this: *mut core::ffi::c_void, puldevstateflags: *mut DISC_RECORDER_STATE_FLAGS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4219,7 +4219,7 @@ pub struct IEnumDiscRecorders_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumDiscRecorders_Impl: windows_core::IUnknownImpl { - fn Next(&self, crecorders: u32, pprecorder: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, crecorders: u32, pprecorder: windows_core::OutRef<'_, IDiscRecorder>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, crecorders: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -4292,7 +4292,7 @@ pub struct IEnumFsiItems_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumFsiItems_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IFsiItem>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -4367,7 +4367,7 @@ pub struct IEnumProgressItems_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumProgressItems_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IProgressItem>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -4697,13 +4697,13 @@ pub trait IFileSystemImage_Impl: super::super::System::Com::IDispatch_Impl { fn SetSessionStartBlock(&self, newval: i32) -> windows_core::Result<()>; fn FreeMediaBlocks(&self) -> windows_core::Result; fn SetFreeMediaBlocks(&self, newval: i32) -> windows_core::Result<()>; - fn SetMaxMediaBlocksFromDevice(&self, discrecorder: Option<&IDiscRecorder2>) -> windows_core::Result<()>; + fn SetMaxMediaBlocksFromDevice(&self, discrecorder: windows_core::Ref<'_, IDiscRecorder2>) -> windows_core::Result<()>; fn UsedBlocks(&self) -> windows_core::Result; fn VolumeName(&self) -> windows_core::Result; fn SetVolumeName(&self, newval: &windows_core::BSTR) -> windows_core::Result<()>; fn ImportedVolumeName(&self) -> windows_core::Result; fn BootImageOptions(&self) -> windows_core::Result; - fn SetBootImageOptions(&self, newval: Option<&IBootOptions>) -> windows_core::Result<()>; + fn SetBootImageOptions(&self, newval: windows_core::Ref<'_, IBootOptions>) -> windows_core::Result<()>; fn FileCount(&self) -> windows_core::Result; fn DirectoryCount(&self) -> windows_core::Result; fn WorkingDirectory(&self) -> windows_core::Result; @@ -4719,7 +4719,7 @@ pub trait IFileSystemImage_Impl: super::super::System::Com::IDispatch_Impl { fn SetUDFRevision(&self, newval: i32) -> windows_core::Result<()>; fn UDFRevision(&self) -> windows_core::Result; fn UDFRevisionsSupported(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; - fn ChooseImageDefaults(&self, discrecorder: Option<&IDiscRecorder2>) -> windows_core::Result<()>; + fn ChooseImageDefaults(&self, discrecorder: windows_core::Ref<'_, IDiscRecorder2>) -> windows_core::Result<()>; fn ChooseImageDefaultsForMediaType(&self, value: IMAPI_MEDIA_PHYSICAL_TYPE) -> windows_core::Result<()>; fn SetISO9660InterchangeLevel(&self, newval: i32) -> windows_core::Result<()>; fn ISO9660InterchangeLevel(&self) -> windows_core::Result; @@ -4727,7 +4727,7 @@ pub trait IFileSystemImage_Impl: super::super::System::Com::IDispatch_Impl { fn CreateResultImage(&self) -> windows_core::Result; fn Exists(&self, fullpath: &windows_core::BSTR) -> windows_core::Result; fn CalculateDiscIdentifier(&self) -> windows_core::Result; - fn IdentifyFileSystemsOnDisc(&self, discrecorder: Option<&IDiscRecorder2>) -> windows_core::Result; + fn IdentifyFileSystemsOnDisc(&self, discrecorder: windows_core::Ref<'_, IDiscRecorder2>) -> windows_core::Result; fn GetDefaultFileSystemForImport(&self, filesystems: FsiFileSystems) -> windows_core::Result; fn ImportFileSystem(&self) -> windows_core::Result; fn ImportSpecificFileSystem(&self, filesystemtouse: FsiFileSystems) -> windows_core::Result<()>; @@ -4786,7 +4786,7 @@ impl IFileSystemImage_Vtbl { } unsafe extern "system" fn SetMaxMediaBlocksFromDevice(this: *mut core::ffi::c_void, discrecorder: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileSystemImage_Impl::SetMaxMediaBlocksFromDevice(this, windows_core::from_raw_borrowed(&discrecorder)).into() + IFileSystemImage_Impl::SetMaxMediaBlocksFromDevice(this, core::mem::transmute_copy(&discrecorder)).into() } unsafe extern "system" fn UsedBlocks(this: *mut core::ffi::c_void, pval: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4834,7 +4834,7 @@ impl IFileSystemImage_Vtbl { } unsafe extern "system" fn SetBootImageOptions(this: *mut core::ffi::c_void, newval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileSystemImage_Impl::SetBootImageOptions(this, windows_core::from_raw_borrowed(&newval)).into() + IFileSystemImage_Impl::SetBootImageOptions(this, core::mem::transmute_copy(&newval)).into() } unsafe extern "system" fn FileCount(this: *mut core::ffi::c_void, pval: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4958,7 +4958,7 @@ impl IFileSystemImage_Vtbl { } unsafe extern "system" fn ChooseImageDefaults(this: *mut core::ffi::c_void, discrecorder: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileSystemImage_Impl::ChooseImageDefaults(this, windows_core::from_raw_borrowed(&discrecorder)).into() + IFileSystemImage_Impl::ChooseImageDefaults(this, core::mem::transmute_copy(&discrecorder)).into() } unsafe extern "system" fn ChooseImageDefaultsForMediaType(this: *mut core::ffi::c_void, value: IMAPI_MEDIA_PHYSICAL_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5020,7 +5020,7 @@ impl IFileSystemImage_Vtbl { } unsafe extern "system" fn IdentifyFileSystemsOnDisc(this: *mut core::ffi::c_void, discrecorder: *mut core::ffi::c_void, filesystems: *mut FsiFileSystems) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFileSystemImage_Impl::IdentifyFileSystemsOnDisc(this, windows_core::from_raw_borrowed(&discrecorder)) { + match IFileSystemImage_Impl::IdentifyFileSystemsOnDisc(this, core::mem::transmute_copy(&discrecorder)) { Ok(ok__) => { filesystems.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5604,9 +5604,9 @@ pub trait IFsiDirectoryItem_Impl: IFsiItem_Impl { fn Count(&self) -> windows_core::Result; fn EnumFsiItems(&self) -> windows_core::Result; fn AddDirectory(&self, path: &windows_core::BSTR) -> windows_core::Result<()>; - fn AddFile(&self, path: &windows_core::BSTR, filedata: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddFile(&self, path: &windows_core::BSTR, filedata: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn AddTree(&self, sourcedirectory: &windows_core::BSTR, includebasedirectory: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn Add(&self, item: Option<&IFsiItem>) -> windows_core::Result<()>; + fn Add(&self, item: windows_core::Ref<'_, IFsiItem>) -> windows_core::Result<()>; fn Remove(&self, path: &windows_core::BSTR) -> windows_core::Result<()>; fn RemoveTree(&self, path: &windows_core::BSTR) -> windows_core::Result<()>; } @@ -5659,7 +5659,7 @@ impl IFsiDirectoryItem_Vtbl { } unsafe extern "system" fn AddFile(this: *mut core::ffi::c_void, path: *mut core::ffi::c_void, filedata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsiDirectoryItem_Impl::AddFile(this, core::mem::transmute(&path), windows_core::from_raw_borrowed(&filedata)).into() + IFsiDirectoryItem_Impl::AddFile(this, core::mem::transmute(&path), core::mem::transmute_copy(&filedata)).into() } unsafe extern "system" fn AddTree(this: *mut core::ffi::c_void, sourcedirectory: *mut core::ffi::c_void, includebasedirectory: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5667,7 +5667,7 @@ impl IFsiDirectoryItem_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, item: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsiDirectoryItem_Impl::Add(this, windows_core::from_raw_borrowed(&item)).into() + IFsiDirectoryItem_Impl::Add(this, core::mem::transmute_copy(&item)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, path: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5799,7 +5799,7 @@ pub trait IFsiFileItem_Impl: IFsiItem_Impl { fn DataSize32BitLow(&self) -> windows_core::Result; fn DataSize32BitHigh(&self) -> windows_core::Result; fn Data(&self) -> windows_core::Result; - fn SetData(&self, newval: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SetData(&self, newval: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFsiFileItem_Vtbl { @@ -5846,7 +5846,7 @@ impl IFsiFileItem_Vtbl { } unsafe extern "system" fn SetData(this: *mut core::ffi::c_void, newval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsiFileItem_Impl::SetData(this, windows_core::from_raw_borrowed(&newval)).into() + IFsiFileItem_Impl::SetData(this, core::mem::transmute_copy(&newval)).into() } Self { base__: IFsiItem_Vtbl::new::(), @@ -5920,7 +5920,7 @@ pub struct IFsiFileItem2_Vtbl { pub trait IFsiFileItem2_Impl: IFsiFileItem_Impl { fn FsiNamedStreams(&self) -> windows_core::Result; fn IsNamedStream(&self) -> windows_core::Result; - fn AddStream(&self, name: &windows_core::BSTR, streamdata: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddStream(&self, name: &windows_core::BSTR, streamdata: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn RemoveStream(&self, name: &windows_core::BSTR) -> windows_core::Result<()>; fn IsRealTime(&self) -> windows_core::Result; fn SetIsRealTime(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; @@ -5950,7 +5950,7 @@ impl IFsiFileItem2_Vtbl { } unsafe extern "system" fn AddStream(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void, streamdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFsiFileItem2_Impl::AddStream(this, core::mem::transmute(&name), windows_core::from_raw_borrowed(&streamdata)).into() + IFsiFileItem2_Impl::AddStream(this, core::mem::transmute(&name), core::mem::transmute_copy(&streamdata)).into() } unsafe extern "system" fn RemoveStream(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6361,7 +6361,7 @@ pub trait IIsoImageManager_Impl: super::super::System::Com::IDispatch_Impl { fn Path(&self) -> windows_core::Result; fn Stream(&self) -> windows_core::Result; fn SetPath(&self, val: &windows_core::BSTR) -> windows_core::Result<()>; - fn SetStream(&self, data: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SetStream(&self, data: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn Validate(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -6393,7 +6393,7 @@ impl IIsoImageManager_Vtbl { } unsafe extern "system" fn SetStream(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IIsoImageManager_Impl::SetStream(this, windows_core::from_raw_borrowed(&data)).into() + IIsoImageManager_Impl::SetStream(this, core::mem::transmute_copy(&data)).into() } unsafe extern "system" fn Validate(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6473,9 +6473,9 @@ pub trait IJolietDiscMaster_Impl: windows_core::IUnknownImpl { fn GetTotalDataBlocks(&self) -> windows_core::Result; fn GetUsedDataBlocks(&self) -> windows_core::Result; fn GetDataBlockSize(&self) -> windows_core::Result; - fn AddData(&self, pstorage: Option<&super::super::System::Com::StructuredStorage::IStorage>, lfileoverwrite: i32) -> windows_core::Result<()>; + fn AddData(&self, pstorage: windows_core::Ref<'_, super::super::System::Com::StructuredStorage::IStorage>, lfileoverwrite: i32) -> windows_core::Result<()>; fn GetJolietProperties(&self) -> windows_core::Result; - fn SetJolietProperties(&self, ppropstg: Option<&super::super::System::Com::StructuredStorage::IPropertyStorage>) -> windows_core::Result<()>; + fn SetJolietProperties(&self, ppropstg: windows_core::Ref<'_, super::super::System::Com::StructuredStorage::IPropertyStorage>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl IJolietDiscMaster_Vtbl { @@ -6512,7 +6512,7 @@ impl IJolietDiscMaster_Vtbl { } unsafe extern "system" fn AddData(this: *mut core::ffi::c_void, pstorage: *mut core::ffi::c_void, lfileoverwrite: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IJolietDiscMaster_Impl::AddData(this, windows_core::from_raw_borrowed(&pstorage), core::mem::transmute_copy(&lfileoverwrite)).into() + IJolietDiscMaster_Impl::AddData(this, core::mem::transmute_copy(&pstorage), core::mem::transmute_copy(&lfileoverwrite)).into() } unsafe extern "system" fn GetJolietProperties(this: *mut core::ffi::c_void, pppropstg: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6526,7 +6526,7 @@ impl IJolietDiscMaster_Vtbl { } unsafe extern "system" fn SetJolietProperties(this: *mut core::ffi::c_void, ppropstg: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IJolietDiscMaster_Impl::SetJolietProperties(this, windows_core::from_raw_borrowed(&ppropstg)).into() + IJolietDiscMaster_Impl::SetJolietProperties(this, core::mem::transmute_copy(&ppropstg)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7684,9 +7684,9 @@ pub struct IRawCDImageCreator_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IRawCDImageCreator_Impl: super::super::System::Com::IDispatch_Impl { fn CreateResultImage(&self) -> windows_core::Result; - fn AddTrack(&self, datatype: IMAPI_CD_SECTOR_TYPE, data: Option<&super::super::System::Com::IStream>) -> windows_core::Result; - fn AddSpecialPregap(&self, data: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn AddSubcodeRWGenerator(&self, subcode: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddTrack(&self, datatype: IMAPI_CD_SECTOR_TYPE, data: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; + fn AddSpecialPregap(&self, data: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddSubcodeRWGenerator(&self, subcode: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn SetResultingImageType(&self, value: IMAPI_FORMAT2_RAW_CD_DATA_SECTOR_TYPE) -> windows_core::Result<()>; fn ResultingImageType(&self) -> windows_core::Result; fn StartOfLeadout(&self) -> windows_core::Result; @@ -7718,7 +7718,7 @@ impl IRawCDImageCreator_Vtbl { } unsafe extern "system" fn AddTrack(this: *mut core::ffi::c_void, datatype: IMAPI_CD_SECTOR_TYPE, data: *mut core::ffi::c_void, trackindex: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRawCDImageCreator_Impl::AddTrack(this, core::mem::transmute_copy(&datatype), windows_core::from_raw_borrowed(&data)) { + match IRawCDImageCreator_Impl::AddTrack(this, core::mem::transmute_copy(&datatype), core::mem::transmute_copy(&data)) { Ok(ok__) => { trackindex.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7728,11 +7728,11 @@ impl IRawCDImageCreator_Vtbl { } unsafe extern "system" fn AddSpecialPregap(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRawCDImageCreator_Impl::AddSpecialPregap(this, windows_core::from_raw_borrowed(&data)).into() + IRawCDImageCreator_Impl::AddSpecialPregap(this, core::mem::transmute_copy(&data)).into() } unsafe extern "system" fn AddSubcodeRWGenerator(this: *mut core::ffi::c_void, subcode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRawCDImageCreator_Impl::AddSubcodeRWGenerator(this, windows_core::from_raw_borrowed(&subcode)).into() + IRawCDImageCreator_Impl::AddSubcodeRWGenerator(this, core::mem::transmute_copy(&subcode)).into() } unsafe extern "system" fn SetResultingImageType(this: *mut core::ffi::c_void, value: IMAPI_FORMAT2_RAW_CD_DATA_SECTOR_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8288,9 +8288,9 @@ pub struct IStreamConcatenate_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IStreamConcatenate_Impl: super::super::System::Com::IStream_Impl { - fn Initialize(&self, stream1: Option<&super::super::System::Com::IStream>, stream2: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Initialize(&self, stream1: windows_core::Ref<'_, super::super::System::Com::IStream>, stream2: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn Initialize2(&self, streams: *const Option, streamcount: u32) -> windows_core::Result<()>; - fn Append(&self, stream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Append(&self, stream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn Append2(&self, streams: *const Option, streamcount: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -8298,7 +8298,7 @@ impl IStreamConcatenate_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, stream1: *mut core::ffi::c_void, stream2: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStreamConcatenate_Impl::Initialize(this, windows_core::from_raw_borrowed(&stream1), windows_core::from_raw_borrowed(&stream2)).into() + IStreamConcatenate_Impl::Initialize(this, core::mem::transmute_copy(&stream1), core::mem::transmute_copy(&stream2)).into() } unsafe extern "system" fn Initialize2(this: *mut core::ffi::c_void, streams: *const *mut core::ffi::c_void, streamcount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8306,7 +8306,7 @@ impl IStreamConcatenate_Vtbl { } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStreamConcatenate_Impl::Append(this, windows_core::from_raw_borrowed(&stream)).into() + IStreamConcatenate_Impl::Append(this, core::mem::transmute_copy(&stream)).into() } unsafe extern "system" fn Append2(this: *mut core::ffi::c_void, streams: *const *mut core::ffi::c_void, streamcount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8539,9 +8539,9 @@ pub struct IWriteEngine2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IWriteEngine2_Impl: super::super::System::Com::IDispatch_Impl { - fn WriteSection(&self, data: Option<&super::super::System::Com::IStream>, startingblockaddress: i32, numberofblocks: i32) -> windows_core::Result<()>; + fn WriteSection(&self, data: windows_core::Ref<'_, super::super::System::Com::IStream>, startingblockaddress: i32, numberofblocks: i32) -> windows_core::Result<()>; fn CancelWrite(&self) -> windows_core::Result<()>; - fn SetRecorder(&self, value: Option<&IDiscRecorder2Ex>) -> windows_core::Result<()>; + fn SetRecorder(&self, value: windows_core::Ref<'_, IDiscRecorder2Ex>) -> windows_core::Result<()>; fn Recorder(&self) -> windows_core::Result; fn SetUseStreamingWrite12(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn UseStreamingWrite12(&self) -> windows_core::Result; @@ -8558,7 +8558,7 @@ impl IWriteEngine2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn WriteSection(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void, startingblockaddress: i32, numberofblocks: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWriteEngine2_Impl::WriteSection(this, windows_core::from_raw_borrowed(&data), core::mem::transmute_copy(&startingblockaddress), core::mem::transmute_copy(&numberofblocks)).into() + IWriteEngine2_Impl::WriteSection(this, core::mem::transmute_copy(&data), core::mem::transmute_copy(&startingblockaddress), core::mem::transmute_copy(&numberofblocks)).into() } unsafe extern "system" fn CancelWrite(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8566,7 +8566,7 @@ impl IWriteEngine2_Vtbl { } unsafe extern "system" fn SetRecorder(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWriteEngine2_Impl::SetRecorder(this, windows_core::from_raw_borrowed(&value)).into() + IWriteEngine2_Impl::SetRecorder(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Recorder(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs index 82ec0f43ef..8f35c6a07a 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs @@ -44,7 +44,7 @@ pub struct IEnumOfflineFilesItems_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumOfflineFilesItems_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IOfflineFilesItem>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -112,7 +112,7 @@ pub struct IEnumOfflineFilesSettings_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumOfflineFilesSettings_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IOfflineFilesSetting>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -280,20 +280,20 @@ pub struct IOfflineFilesCache_Vtbl { pub IsPathCacheable: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut super::super::Foundation::BOOL, *mut OFFLINEFILES_CACHING_MODE) -> windows_core::HRESULT, } pub trait IOfflineFilesCache_Impl: windows_core::IUnknownImpl { - fn Synchronize(&self, hwndparent: super::super::Foundation::HWND, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, basync: super::super::Foundation::BOOL, dwsynccontrol: u32, pisyncconflicthandler: Option<&IOfflineFilesSyncConflictHandler>, piprogress: Option<&IOfflineFilesSyncProgress>, psyncid: *const windows_core::GUID) -> windows_core::Result<()>; - fn DeleteItems(&self, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, dwflags: u32, basync: super::super::Foundation::BOOL, piprogress: Option<&IOfflineFilesSimpleProgress>) -> windows_core::Result<()>; - fn DeleteItemsForUser(&self, pszuser: &windows_core::PCWSTR, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, dwflags: u32, basync: super::super::Foundation::BOOL, piprogress: Option<&IOfflineFilesSimpleProgress>) -> windows_core::Result<()>; - fn Pin(&self, hwndparent: super::super::Foundation::HWND, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, bdeep: super::super::Foundation::BOOL, basync: super::super::Foundation::BOOL, dwpincontrolflags: u32, piprogress: Option<&IOfflineFilesSyncProgress>) -> windows_core::Result<()>; - fn Unpin(&self, hwndparent: super::super::Foundation::HWND, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, bdeep: super::super::Foundation::BOOL, basync: super::super::Foundation::BOOL, dwpincontrolflags: u32, piprogress: Option<&IOfflineFilesSyncProgress>) -> windows_core::Result<()>; + fn Synchronize(&self, hwndparent: super::super::Foundation::HWND, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, basync: super::super::Foundation::BOOL, dwsynccontrol: u32, pisyncconflicthandler: windows_core::Ref<'_, IOfflineFilesSyncConflictHandler>, piprogress: windows_core::Ref<'_, IOfflineFilesSyncProgress>, psyncid: *const windows_core::GUID) -> windows_core::Result<()>; + fn DeleteItems(&self, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, dwflags: u32, basync: super::super::Foundation::BOOL, piprogress: windows_core::Ref<'_, IOfflineFilesSimpleProgress>) -> windows_core::Result<()>; + fn DeleteItemsForUser(&self, pszuser: &windows_core::PCWSTR, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, dwflags: u32, basync: super::super::Foundation::BOOL, piprogress: windows_core::Ref<'_, IOfflineFilesSimpleProgress>) -> windows_core::Result<()>; + fn Pin(&self, hwndparent: super::super::Foundation::HWND, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, bdeep: super::super::Foundation::BOOL, basync: super::super::Foundation::BOOL, dwpincontrolflags: u32, piprogress: windows_core::Ref<'_, IOfflineFilesSyncProgress>) -> windows_core::Result<()>; + fn Unpin(&self, hwndparent: super::super::Foundation::HWND, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, bdeep: super::super::Foundation::BOOL, basync: super::super::Foundation::BOOL, dwpincontrolflags: u32, piprogress: windows_core::Ref<'_, IOfflineFilesSyncProgress>) -> windows_core::Result<()>; fn GetEncryptionStatus(&self, pbencrypted: *mut super::super::Foundation::BOOL, pbpartial: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn Encrypt(&self, hwndparent: super::super::Foundation::HWND, bencrypt: super::super::Foundation::BOOL, dwencryptioncontrolflags: u32, basync: super::super::Foundation::BOOL, piprogress: Option<&IOfflineFilesSyncProgress>) -> windows_core::Result<()>; + fn Encrypt(&self, hwndparent: super::super::Foundation::HWND, bencrypt: super::super::Foundation::BOOL, dwencryptioncontrolflags: u32, basync: super::super::Foundation::BOOL, piprogress: windows_core::Ref<'_, IOfflineFilesSyncProgress>) -> windows_core::Result<()>; fn FindItem(&self, pszpath: &windows_core::PCWSTR, dwqueryflags: u32) -> windows_core::Result; - fn FindItemEx(&self, pszpath: &windows_core::PCWSTR, pincludefilefilter: Option<&IOfflineFilesItemFilter>, pincludedirfilter: Option<&IOfflineFilesItemFilter>, pexcludefilefilter: Option<&IOfflineFilesItemFilter>, pexcludedirfilter: Option<&IOfflineFilesItemFilter>, dwqueryflags: u32) -> windows_core::Result; + fn FindItemEx(&self, pszpath: &windows_core::PCWSTR, pincludefilefilter: windows_core::Ref<'_, IOfflineFilesItemFilter>, pincludedirfilter: windows_core::Ref<'_, IOfflineFilesItemFilter>, pexcludefilefilter: windows_core::Ref<'_, IOfflineFilesItemFilter>, pexcludedirfilter: windows_core::Ref<'_, IOfflineFilesItemFilter>, dwqueryflags: u32) -> windows_core::Result; fn RenameItem(&self, pszpathoriginal: &windows_core::PCWSTR, pszpathnew: &windows_core::PCWSTR, breplaceifexists: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetLocation(&self) -> windows_core::Result; fn GetDiskSpaceInformation(&self, pcbvolumetotal: *mut u64, pcblimit: *mut u64, pcbused: *mut u64, pcbunpinnedlimit: *mut u64, pcbunpinnedused: *mut u64) -> windows_core::Result<()>; fn SetDiskSpaceLimits(&self, cblimit: u64, cbunpinnedlimit: u64) -> windows_core::Result<()>; - fn ProcessAdminPinPolicy(&self, ppinprogress: Option<&IOfflineFilesSyncProgress>, punpinprogress: Option<&IOfflineFilesSyncProgress>) -> windows_core::Result<()>; + fn ProcessAdminPinPolicy(&self, ppinprogress: windows_core::Ref<'_, IOfflineFilesSyncProgress>, punpinprogress: windows_core::Ref<'_, IOfflineFilesSyncProgress>) -> windows_core::Result<()>; fn GetSettingObject(&self, pszsettingname: &windows_core::PCWSTR) -> windows_core::Result; fn EnumSettingObjects(&self) -> windows_core::Result; fn IsPathCacheable(&self, pszpath: &windows_core::PCWSTR, pbcacheable: *mut super::super::Foundation::BOOL, psharecachingmode: *mut OFFLINEFILES_CACHING_MODE) -> windows_core::Result<()>; @@ -302,23 +302,23 @@ impl IOfflineFilesCache_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Synchronize(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, basync: super::super::Foundation::BOOL, dwsynccontrol: u32, pisyncconflicthandler: *mut core::ffi::c_void, piprogress: *mut core::ffi::c_void, psyncid: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOfflineFilesCache_Impl::Synchronize(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&basync), core::mem::transmute_copy(&dwsynccontrol), windows_core::from_raw_borrowed(&pisyncconflicthandler), windows_core::from_raw_borrowed(&piprogress), core::mem::transmute_copy(&psyncid)).into() + IOfflineFilesCache_Impl::Synchronize(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&basync), core::mem::transmute_copy(&dwsynccontrol), core::mem::transmute_copy(&pisyncconflicthandler), core::mem::transmute_copy(&piprogress), core::mem::transmute_copy(&psyncid)).into() } unsafe extern "system" fn DeleteItems(this: *mut core::ffi::c_void, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, dwflags: u32, basync: super::super::Foundation::BOOL, piprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOfflineFilesCache_Impl::DeleteItems(this, core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&basync), windows_core::from_raw_borrowed(&piprogress)).into() + IOfflineFilesCache_Impl::DeleteItems(this, core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&basync), core::mem::transmute_copy(&piprogress)).into() } unsafe extern "system" fn DeleteItemsForUser(this: *mut core::ffi::c_void, pszuser: windows_core::PCWSTR, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, dwflags: u32, basync: super::super::Foundation::BOOL, piprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOfflineFilesCache_Impl::DeleteItemsForUser(this, core::mem::transmute(&pszuser), core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&basync), windows_core::from_raw_borrowed(&piprogress)).into() + IOfflineFilesCache_Impl::DeleteItemsForUser(this, core::mem::transmute(&pszuser), core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&basync), core::mem::transmute_copy(&piprogress)).into() } unsafe extern "system" fn Pin(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, bdeep: super::super::Foundation::BOOL, basync: super::super::Foundation::BOOL, dwpincontrolflags: u32, piprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOfflineFilesCache_Impl::Pin(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&bdeep), core::mem::transmute_copy(&basync), core::mem::transmute_copy(&dwpincontrolflags), windows_core::from_raw_borrowed(&piprogress)).into() + IOfflineFilesCache_Impl::Pin(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&bdeep), core::mem::transmute_copy(&basync), core::mem::transmute_copy(&dwpincontrolflags), core::mem::transmute_copy(&piprogress)).into() } unsafe extern "system" fn Unpin(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, rgpszpaths: *const windows_core::PCWSTR, cpaths: u32, bdeep: super::super::Foundation::BOOL, basync: super::super::Foundation::BOOL, dwpincontrolflags: u32, piprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOfflineFilesCache_Impl::Unpin(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&bdeep), core::mem::transmute_copy(&basync), core::mem::transmute_copy(&dwpincontrolflags), windows_core::from_raw_borrowed(&piprogress)).into() + IOfflineFilesCache_Impl::Unpin(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&rgpszpaths), core::mem::transmute_copy(&cpaths), core::mem::transmute_copy(&bdeep), core::mem::transmute_copy(&basync), core::mem::transmute_copy(&dwpincontrolflags), core::mem::transmute_copy(&piprogress)).into() } unsafe extern "system" fn GetEncryptionStatus(this: *mut core::ffi::c_void, pbencrypted: *mut super::super::Foundation::BOOL, pbpartial: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -326,7 +326,7 @@ impl IOfflineFilesCache_Vtbl { } unsafe extern "system" fn Encrypt(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, bencrypt: super::super::Foundation::BOOL, dwencryptioncontrolflags: u32, basync: super::super::Foundation::BOOL, piprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOfflineFilesCache_Impl::Encrypt(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&bencrypt), core::mem::transmute_copy(&dwencryptioncontrolflags), core::mem::transmute_copy(&basync), windows_core::from_raw_borrowed(&piprogress)).into() + IOfflineFilesCache_Impl::Encrypt(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&bencrypt), core::mem::transmute_copy(&dwencryptioncontrolflags), core::mem::transmute_copy(&basync), core::mem::transmute_copy(&piprogress)).into() } unsafe extern "system" fn FindItem(this: *mut core::ffi::c_void, pszpath: windows_core::PCWSTR, dwqueryflags: u32, ppitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -340,7 +340,7 @@ impl IOfflineFilesCache_Vtbl { } unsafe extern "system" fn FindItemEx(this: *mut core::ffi::c_void, pszpath: windows_core::PCWSTR, pincludefilefilter: *mut core::ffi::c_void, pincludedirfilter: *mut core::ffi::c_void, pexcludefilefilter: *mut core::ffi::c_void, pexcludedirfilter: *mut core::ffi::c_void, dwqueryflags: u32, ppitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOfflineFilesCache_Impl::FindItemEx(this, core::mem::transmute(&pszpath), windows_core::from_raw_borrowed(&pincludefilefilter), windows_core::from_raw_borrowed(&pincludedirfilter), windows_core::from_raw_borrowed(&pexcludefilefilter), windows_core::from_raw_borrowed(&pexcludedirfilter), core::mem::transmute_copy(&dwqueryflags)) { + match IOfflineFilesCache_Impl::FindItemEx(this, core::mem::transmute(&pszpath), core::mem::transmute_copy(&pincludefilefilter), core::mem::transmute_copy(&pincludedirfilter), core::mem::transmute_copy(&pexcludefilefilter), core::mem::transmute_copy(&pexcludedirfilter), core::mem::transmute_copy(&dwqueryflags)) { Ok(ok__) => { ppitem.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -372,7 +372,7 @@ impl IOfflineFilesCache_Vtbl { } unsafe extern "system" fn ProcessAdminPinPolicy(this: *mut core::ffi::c_void, ppinprogress: *mut core::ffi::c_void, punpinprogress: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOfflineFilesCache_Impl::ProcessAdminPinPolicy(this, windows_core::from_raw_borrowed(&ppinprogress), windows_core::from_raw_borrowed(&punpinprogress)).into() + IOfflineFilesCache_Impl::ProcessAdminPinPolicy(this, core::mem::transmute_copy(&ppinprogress), core::mem::transmute_copy(&punpinprogress)).into() } unsafe extern "system" fn GetSettingObject(this: *mut core::ffi::c_void, pszsettingname: windows_core::PCWSTR, ppsetting: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1667,7 +1667,7 @@ pub struct IOfflineFilesItemContainer_Vtbl { } pub trait IOfflineFilesItemContainer_Impl: windows_core::IUnknownImpl { fn EnumItems(&self, dwqueryflags: u32) -> windows_core::Result; - fn EnumItemsEx(&self, pincludefilefilter: Option<&IOfflineFilesItemFilter>, pincludedirfilter: Option<&IOfflineFilesItemFilter>, pexcludefilefilter: Option<&IOfflineFilesItemFilter>, pexcludedirfilter: Option<&IOfflineFilesItemFilter>, dwenumflags: u32, dwqueryflags: u32) -> windows_core::Result; + fn EnumItemsEx(&self, pincludefilefilter: windows_core::Ref<'_, IOfflineFilesItemFilter>, pincludedirfilter: windows_core::Ref<'_, IOfflineFilesItemFilter>, pexcludefilefilter: windows_core::Ref<'_, IOfflineFilesItemFilter>, pexcludedirfilter: windows_core::Ref<'_, IOfflineFilesItemFilter>, dwenumflags: u32, dwqueryflags: u32) -> windows_core::Result; } impl IOfflineFilesItemContainer_Vtbl { pub const fn new() -> Self { @@ -1683,7 +1683,7 @@ impl IOfflineFilesItemContainer_Vtbl { } unsafe extern "system" fn EnumItemsEx(this: *mut core::ffi::c_void, pincludefilefilter: *mut core::ffi::c_void, pincludedirfilter: *mut core::ffi::c_void, pexcludefilefilter: *mut core::ffi::c_void, pexcludedirfilter: *mut core::ffi::c_void, dwenumflags: u32, dwqueryflags: u32, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOfflineFilesItemContainer_Impl::EnumItemsEx(this, windows_core::from_raw_borrowed(&pincludefilefilter), windows_core::from_raw_borrowed(&pincludedirfilter), windows_core::from_raw_borrowed(&pexcludefilefilter), windows_core::from_raw_borrowed(&pexcludedirfilter), core::mem::transmute_copy(&dwenumflags), core::mem::transmute_copy(&dwqueryflags)) { + match IOfflineFilesItemContainer_Impl::EnumItemsEx(this, core::mem::transmute_copy(&pincludefilefilter), core::mem::transmute_copy(&pincludedirfilter), core::mem::transmute_copy(&pexcludefilefilter), core::mem::transmute_copy(&pexcludedirfilter), core::mem::transmute_copy(&dwenumflags), core::mem::transmute_copy(&dwqueryflags)) { Ok(ok__) => { ppenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2598,7 +2598,7 @@ pub struct IOfflineFilesSyncProgress_Vtbl { } pub trait IOfflineFilesSyncProgress_Impl: IOfflineFilesProgress_Impl { fn SyncItemBegin(&self, pszfile: &windows_core::PCWSTR) -> windows_core::Result; - fn SyncItemResult(&self, pszfile: &windows_core::PCWSTR, hrresult: windows_core::HRESULT, perrorinfo: Option<&IOfflineFilesSyncErrorInfo>) -> windows_core::Result; + fn SyncItemResult(&self, pszfile: &windows_core::PCWSTR, hrresult: windows_core::HRESULT, perrorinfo: windows_core::Ref<'_, IOfflineFilesSyncErrorInfo>) -> windows_core::Result; } impl IOfflineFilesSyncProgress_Vtbl { pub const fn new() -> Self { @@ -2614,7 +2614,7 @@ impl IOfflineFilesSyncProgress_Vtbl { } unsafe extern "system" fn SyncItemResult(this: *mut core::ffi::c_void, pszfile: windows_core::PCWSTR, hrresult: windows_core::HRESULT, perrorinfo: *mut core::ffi::c_void, presponse: *mut OFFLINEFILES_OP_RESPONSE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOfflineFilesSyncProgress_Impl::SyncItemResult(this, core::mem::transmute(&pszfile), core::mem::transmute_copy(&hrresult), windows_core::from_raw_borrowed(&perrorinfo)) { + match IOfflineFilesSyncProgress_Impl::SyncItemResult(this, core::mem::transmute(&pszfile), core::mem::transmute_copy(&hrresult), core::mem::transmute_copy(&perrorinfo)) { Ok(ok__) => { presponse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs index e20167180c..36100e9f95 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs @@ -1034,7 +1034,7 @@ pub trait IAppxBlockMapFile_Impl: windows_core::IUnknownImpl { fn GetLocalFileHeaderSize(&self) -> windows_core::Result; fn GetName(&self) -> windows_core::Result; fn GetUncompressedSize(&self) -> windows_core::Result; - fn ValidateFileHash(&self, filestream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; + fn ValidateFileHash(&self, filestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxBlockMapFile_Vtbl { @@ -1081,7 +1081,7 @@ impl IAppxBlockMapFile_Vtbl { } unsafe extern "system" fn ValidateFileHash(this: *mut core::ffi::c_void, filestream: *mut core::ffi::c_void, isvalid: *mut super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxBlockMapFile_Impl::ValidateFileHash(this, windows_core::from_raw_borrowed(&filestream)) { + match IAppxBlockMapFile_Impl::ValidateFileHash(this, core::mem::transmute_copy(&filestream)) { Ok(ok__) => { isvalid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1325,16 +1325,16 @@ pub struct IAppxBundleFactory_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxBundleFactory_Impl: windows_core::IUnknownImpl { - fn CreateBundleWriter(&self, outputstream: Option<&super::super::super::System::Com::IStream>, bundleversion: u64) -> windows_core::Result; - fn CreateBundleReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; - fn CreateBundleManifestReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateBundleWriter(&self, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, bundleversion: u64) -> windows_core::Result; + fn CreateBundleReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateBundleManifestReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxBundleFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateBundleWriter(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, bundleversion: u64, bundlewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxBundleFactory_Impl::CreateBundleWriter(this, windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&bundleversion)) { + match IAppxBundleFactory_Impl::CreateBundleWriter(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&bundleversion)) { Ok(ok__) => { bundlewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1344,7 +1344,7 @@ impl IAppxBundleFactory_Vtbl { } unsafe extern "system" fn CreateBundleReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, bundlereader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxBundleFactory_Impl::CreateBundleReader(this, windows_core::from_raw_borrowed(&inputstream)) { + match IAppxBundleFactory_Impl::CreateBundleReader(this, core::mem::transmute_copy(&inputstream)) { Ok(ok__) => { bundlereader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1354,7 +1354,7 @@ impl IAppxBundleFactory_Vtbl { } unsafe extern "system" fn CreateBundleManifestReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, manifestreader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxBundleFactory_Impl::CreateBundleManifestReader(this, windows_core::from_raw_borrowed(&inputstream)) { + match IAppxBundleFactory_Impl::CreateBundleManifestReader(this, core::mem::transmute_copy(&inputstream)) { Ok(ok__) => { manifestreader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1398,14 +1398,14 @@ pub struct IAppxBundleFactory2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxBundleFactory2_Impl: windows_core::IUnknownImpl { - fn CreateBundleReader2(&self, inputstream: Option<&super::super::super::System::Com::IStream>, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; + fn CreateBundleReader2(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxBundleFactory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateBundleReader2(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, expecteddigest: windows_core::PCWSTR, bundlereader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxBundleFactory2_Impl::CreateBundleReader2(this, windows_core::from_raw_borrowed(&inputstream), core::mem::transmute(&expecteddigest)) { + match IAppxBundleFactory2_Impl::CreateBundleReader2(this, core::mem::transmute_copy(&inputstream), core::mem::transmute(&expecteddigest)) { Ok(ok__) => { bundlereader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2151,7 +2151,7 @@ pub struct IAppxBundleWriter_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxBundleWriter_Impl: windows_core::IUnknownImpl { - fn AddPayloadPackage(&self, filename: &windows_core::PCWSTR, packagestream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddPayloadPackage(&self, filename: &windows_core::PCWSTR, packagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -2159,7 +2159,7 @@ impl IAppxBundleWriter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddPayloadPackage(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, packagestream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxBundleWriter_Impl::AddPayloadPackage(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&packagestream)).into() + IAppxBundleWriter_Impl::AddPayloadPackage(this, core::mem::transmute(&filename), core::mem::transmute_copy(&packagestream)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2199,14 +2199,14 @@ pub struct IAppxBundleWriter2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxBundleWriter2_Impl: windows_core::IUnknownImpl { - fn AddExternalPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddExternalPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAppxBundleWriter2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddExternalPackageReference(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, inputstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxBundleWriter2_Impl::AddExternalPackageReference(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&inputstream)).into() + IAppxBundleWriter2_Impl::AddExternalPackageReference(this, core::mem::transmute(&filename), core::mem::transmute_copy(&inputstream)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), AddExternalPackageReference: AddExternalPackageReference:: } } @@ -2245,7 +2245,7 @@ pub struct IAppxBundleWriter3_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxBundleWriter3_Impl: windows_core::IUnknownImpl { - fn AddPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; fn Close(&self, hashmethodstring: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -2253,7 +2253,7 @@ impl IAppxBundleWriter3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddPackageReference(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, inputstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxBundleWriter3_Impl::AddPackageReference(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&inputstream)).into() + IAppxBundleWriter3_Impl::AddPackageReference(this, core::mem::transmute(&filename), core::mem::transmute_copy(&inputstream)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void, hashmethodstring: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2317,24 +2317,24 @@ pub struct IAppxBundleWriter4_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxBundleWriter4_Impl: windows_core::IUnknownImpl { - fn AddPayloadPackage(&self, filename: &windows_core::PCWSTR, packagestream: Option<&super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn AddPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: Option<&super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn AddExternalPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: Option<&super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn AddPayloadPackage(&self, filename: &windows_core::PCWSTR, packagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn AddPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn AddExternalPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAppxBundleWriter4_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddPayloadPackage(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, packagestream: *mut core::ffi::c_void, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxBundleWriter4_Impl::AddPayloadPackage(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&packagestream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() + IAppxBundleWriter4_Impl::AddPayloadPackage(this, core::mem::transmute(&filename), core::mem::transmute_copy(&packagestream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() } unsafe extern "system" fn AddPackageReference(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, inputstream: *mut core::ffi::c_void, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxBundleWriter4_Impl::AddPackageReference(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&inputstream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() + IAppxBundleWriter4_Impl::AddPackageReference(this, core::mem::transmute(&filename), core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() } unsafe extern "system" fn AddExternalPackageReference(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, inputstream: *mut core::ffi::c_void, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxBundleWriter4_Impl::AddExternalPackageReference(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&inputstream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() + IAppxBundleWriter4_Impl::AddExternalPackageReference(this, core::mem::transmute(&filename), core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2717,7 +2717,7 @@ pub struct IAppxEncryptedBundleWriter_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxEncryptedBundleWriter_Impl: windows_core::IUnknownImpl { - fn AddPayloadPackageEncrypted(&self, filename: &windows_core::PCWSTR, packagestream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddPayloadPackageEncrypted(&self, filename: &windows_core::PCWSTR, packagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -2725,7 +2725,7 @@ impl IAppxEncryptedBundleWriter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddPayloadPackageEncrypted(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, packagestream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptedBundleWriter_Impl::AddPayloadPackageEncrypted(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&packagestream)).into() + IAppxEncryptedBundleWriter_Impl::AddPayloadPackageEncrypted(this, core::mem::transmute(&filename), core::mem::transmute_copy(&packagestream)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2765,14 +2765,14 @@ pub struct IAppxEncryptedBundleWriter2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxEncryptedBundleWriter2_Impl: windows_core::IUnknownImpl { - fn AddExternalPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddExternalPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAppxEncryptedBundleWriter2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddExternalPackageReference(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, inputstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptedBundleWriter2_Impl::AddExternalPackageReference(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&inputstream)).into() + IAppxEncryptedBundleWriter2_Impl::AddExternalPackageReference(this, core::mem::transmute(&filename), core::mem::transmute_copy(&inputstream)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), AddExternalPackageReference: AddExternalPackageReference:: } } @@ -2816,19 +2816,19 @@ pub struct IAppxEncryptedBundleWriter3_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxEncryptedBundleWriter3_Impl: windows_core::IUnknownImpl { - fn AddPayloadPackageEncrypted(&self, filename: &windows_core::PCWSTR, packagestream: Option<&super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn AddExternalPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: Option<&super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn AddPayloadPackageEncrypted(&self, filename: &windows_core::PCWSTR, packagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn AddExternalPackageReference(&self, filename: &windows_core::PCWSTR, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAppxEncryptedBundleWriter3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddPayloadPackageEncrypted(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, packagestream: *mut core::ffi::c_void, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptedBundleWriter3_Impl::AddPayloadPackageEncrypted(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&packagestream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() + IAppxEncryptedBundleWriter3_Impl::AddPayloadPackageEncrypted(this, core::mem::transmute(&filename), core::mem::transmute_copy(&packagestream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() } unsafe extern "system" fn AddExternalPackageReference(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, inputstream: *mut core::ffi::c_void, isdefaultapplicablepackage: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptedBundleWriter3_Impl::AddExternalPackageReference(this, core::mem::transmute(&filename), windows_core::from_raw_borrowed(&inputstream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() + IAppxEncryptedBundleWriter3_Impl::AddExternalPackageReference(this, core::mem::transmute(&filename), core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&isdefaultapplicablepackage)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2868,7 +2868,7 @@ pub struct IAppxEncryptedPackageWriter_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxEncryptedPackageWriter_Impl: windows_core::IUnknownImpl { - fn AddPayloadFileEncrypted(&self, filename: &windows_core::PCWSTR, compressionoption: APPX_COMPRESSION_OPTION, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddPayloadFileEncrypted(&self, filename: &windows_core::PCWSTR, compressionoption: APPX_COMPRESSION_OPTION, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -2876,7 +2876,7 @@ impl IAppxEncryptedPackageWriter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddPayloadFileEncrypted(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, compressionoption: APPX_COMPRESSION_OPTION, inputstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptedPackageWriter_Impl::AddPayloadFileEncrypted(this, core::mem::transmute(&filename), core::mem::transmute_copy(&compressionoption), windows_core::from_raw_borrowed(&inputstream)).into() + IAppxEncryptedPackageWriter_Impl::AddPayloadFileEncrypted(this, core::mem::transmute(&filename), core::mem::transmute_copy(&compressionoption), core::mem::transmute_copy(&inputstream)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3036,29 +3036,29 @@ pub struct IAppxEncryptionFactory_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxEncryptionFactory_Impl: windows_core::IUnknownImpl { - fn EncryptPackage(&self, inputstream: Option<&super::super::super::System::Com::IStream>, outputstream: Option<&super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result<()>; - fn DecryptPackage(&self, inputstream: Option<&super::super::super::System::Com::IStream>, outputstream: Option<&super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result<()>; - fn CreateEncryptedPackageWriter(&self, outputstream: Option<&super::super::super::System::Com::IStream>, manifeststream: Option<&super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; - fn CreateEncryptedPackageReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result; - fn EncryptBundle(&self, inputstream: Option<&super::super::super::System::Com::IStream>, outputstream: Option<&super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result<()>; - fn DecryptBundle(&self, inputstream: Option<&super::super::super::System::Com::IStream>, outputstream: Option<&super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result<()>; - fn CreateEncryptedBundleWriter(&self, outputstream: Option<&super::super::super::System::Com::IStream>, bundleversion: u64, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; - fn CreateEncryptedBundleReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result; + fn EncryptPackage(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result<()>; + fn DecryptPackage(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result<()>; + fn CreateEncryptedPackageWriter(&self, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, manifeststream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; + fn CreateEncryptedPackageReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result; + fn EncryptBundle(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result<()>; + fn DecryptBundle(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result<()>; + fn CreateEncryptedBundleWriter(&self, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, bundleversion: u64, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; + fn CreateEncryptedBundleReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxEncryptionFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EncryptPackage(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptionFactory_Impl::EncryptPackage(this, windows_core::from_raw_borrowed(&inputstream), windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)).into() + IAppxEncryptionFactory_Impl::EncryptPackage(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)).into() } unsafe extern "system" fn DecryptPackage(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, keyinfo: *const APPX_KEY_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptionFactory_Impl::DecryptPackage(this, windows_core::from_raw_borrowed(&inputstream), windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&keyinfo)).into() + IAppxEncryptionFactory_Impl::DecryptPackage(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&keyinfo)).into() } unsafe extern "system" fn CreateEncryptedPackageWriter(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, manifeststream: *mut core::ffi::c_void, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxEncryptionFactory_Impl::CreateEncryptedPackageWriter(this, windows_core::from_raw_borrowed(&outputstream), windows_core::from_raw_borrowed(&manifeststream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { + match IAppxEncryptionFactory_Impl::CreateEncryptedPackageWriter(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&manifeststream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3068,7 +3068,7 @@ impl IAppxEncryptionFactory_Vtbl { } unsafe extern "system" fn CreateEncryptedPackageReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, keyinfo: *const APPX_KEY_INFO, packagereader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxEncryptionFactory_Impl::CreateEncryptedPackageReader(this, windows_core::from_raw_borrowed(&inputstream), core::mem::transmute_copy(&keyinfo)) { + match IAppxEncryptionFactory_Impl::CreateEncryptedPackageReader(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&keyinfo)) { Ok(ok__) => { packagereader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3078,15 +3078,15 @@ impl IAppxEncryptionFactory_Vtbl { } unsafe extern "system" fn EncryptBundle(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptionFactory_Impl::EncryptBundle(this, windows_core::from_raw_borrowed(&inputstream), windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)).into() + IAppxEncryptionFactory_Impl::EncryptBundle(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)).into() } unsafe extern "system" fn DecryptBundle(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, keyinfo: *const APPX_KEY_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptionFactory_Impl::DecryptBundle(this, windows_core::from_raw_borrowed(&inputstream), windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&keyinfo)).into() + IAppxEncryptionFactory_Impl::DecryptBundle(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&keyinfo)).into() } unsafe extern "system" fn CreateEncryptedBundleWriter(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, bundleversion: u64, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS, bundlewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxEncryptionFactory_Impl::CreateEncryptedBundleWriter(this, windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&bundleversion), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { + match IAppxEncryptionFactory_Impl::CreateEncryptedBundleWriter(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&bundleversion), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { Ok(ok__) => { bundlewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3096,7 +3096,7 @@ impl IAppxEncryptionFactory_Vtbl { } unsafe extern "system" fn CreateEncryptedBundleReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, keyinfo: *const APPX_KEY_INFO, bundlereader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxEncryptionFactory_Impl::CreateEncryptedBundleReader(this, windows_core::from_raw_borrowed(&inputstream), core::mem::transmute_copy(&keyinfo)) { + match IAppxEncryptionFactory_Impl::CreateEncryptedBundleReader(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&keyinfo)) { Ok(ok__) => { bundlereader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3146,14 +3146,14 @@ pub struct IAppxEncryptionFactory2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxEncryptionFactory2_Impl: windows_core::IUnknownImpl { - fn CreateEncryptedPackageWriter(&self, outputstream: Option<&super::super::super::System::Com::IStream>, manifeststream: Option<&super::super::super::System::Com::IStream>, contentgroupmapstream: Option<&super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; + fn CreateEncryptedPackageWriter(&self, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, manifeststream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, contentgroupmapstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxEncryptionFactory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateEncryptedPackageWriter(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, manifeststream: *mut core::ffi::c_void, contentgroupmapstream: *mut core::ffi::c_void, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxEncryptionFactory2_Impl::CreateEncryptedPackageWriter(this, windows_core::from_raw_borrowed(&outputstream), windows_core::from_raw_borrowed(&manifeststream), windows_core::from_raw_borrowed(&contentgroupmapstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { + match IAppxEncryptionFactory2_Impl::CreateEncryptedPackageWriter(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&manifeststream), core::mem::transmute_copy(&contentgroupmapstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3229,21 +3229,21 @@ pub struct IAppxEncryptionFactory3_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxEncryptionFactory3_Impl: windows_core::IUnknownImpl { - fn EncryptPackage(&self, inputstream: Option<&super::super::super::System::Com::IStream>, outputstream: Option<&super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result<()>; - fn CreateEncryptedPackageWriter(&self, outputstream: Option<&super::super::super::System::Com::IStream>, manifeststream: Option<&super::super::super::System::Com::IStream>, contentgroupmapstream: Option<&super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; - fn EncryptBundle(&self, inputstream: Option<&super::super::super::System::Com::IStream>, outputstream: Option<&super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result<()>; - fn CreateEncryptedBundleWriter(&self, outputstream: Option<&super::super::super::System::Com::IStream>, bundleversion: u64, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; + fn EncryptPackage(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result<()>; + fn CreateEncryptedPackageWriter(&self, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, manifeststream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, contentgroupmapstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; + fn EncryptBundle(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result<()>; + fn CreateEncryptedBundleWriter(&self, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, bundleversion: u64, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxEncryptionFactory3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EncryptPackage(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptionFactory3_Impl::EncryptPackage(this, windows_core::from_raw_borrowed(&inputstream), windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)).into() + IAppxEncryptionFactory3_Impl::EncryptPackage(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)).into() } unsafe extern "system" fn CreateEncryptedPackageWriter(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, manifeststream: *mut core::ffi::c_void, contentgroupmapstream: *mut core::ffi::c_void, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxEncryptionFactory3_Impl::CreateEncryptedPackageWriter(this, windows_core::from_raw_borrowed(&outputstream), windows_core::from_raw_borrowed(&manifeststream), windows_core::from_raw_borrowed(&contentgroupmapstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { + match IAppxEncryptionFactory3_Impl::CreateEncryptedPackageWriter(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&manifeststream), core::mem::transmute_copy(&contentgroupmapstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3253,11 +3253,11 @@ impl IAppxEncryptionFactory3_Vtbl { } unsafe extern "system" fn EncryptBundle(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptionFactory3_Impl::EncryptBundle(this, windows_core::from_raw_borrowed(&inputstream), windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)).into() + IAppxEncryptionFactory3_Impl::EncryptBundle(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)).into() } unsafe extern "system" fn CreateEncryptedBundleWriter(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, bundleversion: u64, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS, bundlewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxEncryptionFactory3_Impl::CreateEncryptedBundleWriter(this, windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&bundleversion), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { + match IAppxEncryptionFactory3_Impl::CreateEncryptedBundleWriter(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&bundleversion), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles)) { Ok(ok__) => { bundlewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3301,14 +3301,14 @@ pub struct IAppxEncryptionFactory4_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxEncryptionFactory4_Impl: windows_core::IUnknownImpl { - fn EncryptPackage(&self, inputstream: Option<&super::super::super::System::Com::IStream>, outputstream: Option<&super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS, memorylimit: u64) -> windows_core::Result<()>; + fn EncryptPackage(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS, memorylimit: u64) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAppxEncryptionFactory4_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EncryptPackage(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO, exemptedfiles: *const APPX_ENCRYPTED_EXEMPTIONS, memorylimit: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxEncryptionFactory4_Impl::EncryptPackage(this, windows_core::from_raw_borrowed(&inputstream), windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles), core::mem::transmute_copy(&memorylimit)).into() + IAppxEncryptionFactory4_Impl::EncryptPackage(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo), core::mem::transmute_copy(&exemptedfiles), core::mem::transmute_copy(&memorylimit)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), EncryptPackage: EncryptPackage:: } } @@ -3354,15 +3354,15 @@ pub struct IAppxEncryptionFactory5_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxEncryptionFactory5_Impl: windows_core::IUnknownImpl { - fn CreateEncryptedPackageReader2(&self, inputstream: Option<&super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateEncryptedBundleReader2(&self, inputstream: Option<&super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; + fn CreateEncryptedPackageReader2(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; + fn CreateEncryptedBundleReader2(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, keyinfo: *const APPX_KEY_INFO, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxEncryptionFactory5_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateEncryptedPackageReader2(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, keyinfo: *const APPX_KEY_INFO, expecteddigest: windows_core::PCWSTR, packagereader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxEncryptionFactory5_Impl::CreateEncryptedPackageReader2(this, windows_core::from_raw_borrowed(&inputstream), core::mem::transmute_copy(&keyinfo), core::mem::transmute(&expecteddigest)) { + match IAppxEncryptionFactory5_Impl::CreateEncryptedPackageReader2(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&keyinfo), core::mem::transmute(&expecteddigest)) { Ok(ok__) => { packagereader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3372,7 +3372,7 @@ impl IAppxEncryptionFactory5_Vtbl { } unsafe extern "system" fn CreateEncryptedBundleReader2(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, keyinfo: *const APPX_KEY_INFO, expecteddigest: windows_core::PCWSTR, bundlereader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxEncryptionFactory5_Impl::CreateEncryptedBundleReader2(this, windows_core::from_raw_borrowed(&inputstream), core::mem::transmute_copy(&keyinfo), core::mem::transmute(&expecteddigest)) { + match IAppxEncryptionFactory5_Impl::CreateEncryptedBundleReader2(this, core::mem::transmute_copy(&inputstream), core::mem::transmute_copy(&keyinfo), core::mem::transmute(&expecteddigest)) { Ok(ok__) => { bundlereader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3463,18 +3463,18 @@ pub struct IAppxFactory_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxFactory_Impl: windows_core::IUnknownImpl { - fn CreatePackageWriter(&self, outputstream: Option<&super::super::super::System::Com::IStream>, settings: *const APPX_PACKAGE_SETTINGS) -> windows_core::Result; - fn CreatePackageReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; - fn CreateManifestReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; - fn CreateBlockMapReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; - fn CreateValidatedBlockMapReader(&self, blockmapstream: Option<&super::super::super::System::Com::IStream>, signaturefilename: &windows_core::PCWSTR) -> windows_core::Result; + fn CreatePackageWriter(&self, outputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, settings: *const APPX_PACKAGE_SETTINGS) -> windows_core::Result; + fn CreatePackageReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateManifestReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateBlockMapReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateValidatedBlockMapReader(&self, blockmapstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, signaturefilename: &windows_core::PCWSTR) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreatePackageWriter(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, settings: *const APPX_PACKAGE_SETTINGS, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory_Impl::CreatePackageWriter(this, windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&settings)) { + match IAppxFactory_Impl::CreatePackageWriter(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&settings)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3484,7 +3484,7 @@ impl IAppxFactory_Vtbl { } unsafe extern "system" fn CreatePackageReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, packagereader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory_Impl::CreatePackageReader(this, windows_core::from_raw_borrowed(&inputstream)) { + match IAppxFactory_Impl::CreatePackageReader(this, core::mem::transmute_copy(&inputstream)) { Ok(ok__) => { packagereader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3494,7 +3494,7 @@ impl IAppxFactory_Vtbl { } unsafe extern "system" fn CreateManifestReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, manifestreader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory_Impl::CreateManifestReader(this, windows_core::from_raw_borrowed(&inputstream)) { + match IAppxFactory_Impl::CreateManifestReader(this, core::mem::transmute_copy(&inputstream)) { Ok(ok__) => { manifestreader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3504,7 +3504,7 @@ impl IAppxFactory_Vtbl { } unsafe extern "system" fn CreateBlockMapReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, blockmapreader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory_Impl::CreateBlockMapReader(this, windows_core::from_raw_borrowed(&inputstream)) { + match IAppxFactory_Impl::CreateBlockMapReader(this, core::mem::transmute_copy(&inputstream)) { Ok(ok__) => { blockmapreader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3514,7 +3514,7 @@ impl IAppxFactory_Vtbl { } unsafe extern "system" fn CreateValidatedBlockMapReader(this: *mut core::ffi::c_void, blockmapstream: *mut core::ffi::c_void, signaturefilename: windows_core::PCWSTR, blockmapreader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory_Impl::CreateValidatedBlockMapReader(this, windows_core::from_raw_borrowed(&blockmapstream), core::mem::transmute(&signaturefilename)) { + match IAppxFactory_Impl::CreateValidatedBlockMapReader(this, core::mem::transmute_copy(&blockmapstream), core::mem::transmute(&signaturefilename)) { Ok(ok__) => { blockmapreader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3583,16 +3583,16 @@ pub struct IAppxFactory2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxFactory2_Impl: windows_core::IUnknownImpl { - fn CreateContentGroupMapReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; - fn CreateSourceContentGroupMapReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; - fn CreateContentGroupMapWriter(&self, stream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateContentGroupMapReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateSourceContentGroupMapReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateContentGroupMapWriter(&self, stream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxFactory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateContentGroupMapReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, contentgroupmapreader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory2_Impl::CreateContentGroupMapReader(this, windows_core::from_raw_borrowed(&inputstream)) { + match IAppxFactory2_Impl::CreateContentGroupMapReader(this, core::mem::transmute_copy(&inputstream)) { Ok(ok__) => { contentgroupmapreader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3602,7 +3602,7 @@ impl IAppxFactory2_Vtbl { } unsafe extern "system" fn CreateSourceContentGroupMapReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, reader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory2_Impl::CreateSourceContentGroupMapReader(this, windows_core::from_raw_borrowed(&inputstream)) { + match IAppxFactory2_Impl::CreateSourceContentGroupMapReader(this, core::mem::transmute_copy(&inputstream)) { Ok(ok__) => { reader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3612,7 +3612,7 @@ impl IAppxFactory2_Vtbl { } unsafe extern "system" fn CreateContentGroupMapWriter(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, contentgroupmapwriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory2_Impl::CreateContentGroupMapWriter(this, windows_core::from_raw_borrowed(&stream)) { + match IAppxFactory2_Impl::CreateContentGroupMapWriter(this, core::mem::transmute_copy(&stream)) { Ok(ok__) => { contentgroupmapwriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3682,16 +3682,16 @@ pub struct IAppxFactory3_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxFactory3_Impl: windows_core::IUnknownImpl { - fn CreatePackageReader2(&self, inputstream: Option<&super::super::super::System::Com::IStream>, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateManifestReader2(&self, inputstream: Option<&super::super::super::System::Com::IStream>, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateAppInstallerReader(&self, inputstream: Option<&super::super::super::System::Com::IStream>, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; + fn CreatePackageReader2(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; + fn CreateManifestReader2(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; + fn CreateAppInstallerReader(&self, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, expecteddigest: &windows_core::PCWSTR) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAppxFactory3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreatePackageReader2(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, expecteddigest: windows_core::PCWSTR, packagereader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory3_Impl::CreatePackageReader2(this, windows_core::from_raw_borrowed(&inputstream), core::mem::transmute(&expecteddigest)) { + match IAppxFactory3_Impl::CreatePackageReader2(this, core::mem::transmute_copy(&inputstream), core::mem::transmute(&expecteddigest)) { Ok(ok__) => { packagereader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3701,7 +3701,7 @@ impl IAppxFactory3_Vtbl { } unsafe extern "system" fn CreateManifestReader2(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, expecteddigest: windows_core::PCWSTR, manifestreader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory3_Impl::CreateManifestReader2(this, windows_core::from_raw_borrowed(&inputstream), core::mem::transmute(&expecteddigest)) { + match IAppxFactory3_Impl::CreateManifestReader2(this, core::mem::transmute_copy(&inputstream), core::mem::transmute(&expecteddigest)) { Ok(ok__) => { manifestreader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3711,7 +3711,7 @@ impl IAppxFactory3_Vtbl { } unsafe extern "system" fn CreateAppInstallerReader(this: *mut core::ffi::c_void, inputstream: *mut core::ffi::c_void, expecteddigest: windows_core::PCWSTR, appinstallerreader: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppxFactory3_Impl::CreateAppInstallerReader(this, windows_core::from_raw_borrowed(&inputstream), core::mem::transmute(&expecteddigest)) { + match IAppxFactory3_Impl::CreateAppInstallerReader(this, core::mem::transmute_copy(&inputstream), core::mem::transmute(&expecteddigest)) { Ok(ok__) => { appinstallerreader.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6347,11 +6347,11 @@ pub struct IAppxPackageEditor_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IAppxPackageEditor_Impl: windows_core::IUnknownImpl { fn SetWorkingDirectory(&self, workingdirectory: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn CreateDeltaPackage(&self, updatedpackagestream: Option<&super::super::super::System::Com::IStream>, baselinepackagestream: Option<&super::super::super::System::Com::IStream>, deltapackagestream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn CreateDeltaPackageUsingBaselineBlockMap(&self, updatedpackagestream: Option<&super::super::super::System::Com::IStream>, baselineblockmapstream: Option<&super::super::super::System::Com::IStream>, baselinepackagefullname: &windows_core::PCWSTR, deltapackagestream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn UpdatePackage(&self, baselinepackagestream: Option<&super::super::super::System::Com::IStream>, deltapackagestream: Option<&super::super::super::System::Com::IStream>, updateoption: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_OPTION) -> windows_core::Result<()>; - fn UpdateEncryptedPackage(&self, baselineencryptedpackagestream: Option<&super::super::super::System::Com::IStream>, deltapackagestream: Option<&super::super::super::System::Com::IStream>, updateoption: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_OPTION, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result<()>; - fn UpdatePackageManifest(&self, packagestream: Option<&super::super::super::System::Com::IStream>, updatedmanifeststream: Option<&super::super::super::System::Com::IStream>, ispackageencrypted: super::super::super::Foundation::BOOL, options: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_MANIFEST_OPTIONS) -> windows_core::Result<()>; + fn CreateDeltaPackage(&self, updatedpackagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, baselinepackagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, deltapackagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn CreateDeltaPackageUsingBaselineBlockMap(&self, updatedpackagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, baselineblockmapstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, baselinepackagefullname: &windows_core::PCWSTR, deltapackagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn UpdatePackage(&self, baselinepackagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, deltapackagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, updateoption: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_OPTION) -> windows_core::Result<()>; + fn UpdateEncryptedPackage(&self, baselineencryptedpackagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, deltapackagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, updateoption: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_OPTION, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO) -> windows_core::Result<()>; + fn UpdatePackageManifest(&self, packagestream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, updatedmanifeststream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, ispackageencrypted: super::super::super::Foundation::BOOL, options: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_MANIFEST_OPTIONS) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAppxPackageEditor_Vtbl { @@ -6362,23 +6362,23 @@ impl IAppxPackageEditor_Vtbl { } unsafe extern "system" fn CreateDeltaPackage(this: *mut core::ffi::c_void, updatedpackagestream: *mut core::ffi::c_void, baselinepackagestream: *mut core::ffi::c_void, deltapackagestream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxPackageEditor_Impl::CreateDeltaPackage(this, windows_core::from_raw_borrowed(&updatedpackagestream), windows_core::from_raw_borrowed(&baselinepackagestream), windows_core::from_raw_borrowed(&deltapackagestream)).into() + IAppxPackageEditor_Impl::CreateDeltaPackage(this, core::mem::transmute_copy(&updatedpackagestream), core::mem::transmute_copy(&baselinepackagestream), core::mem::transmute_copy(&deltapackagestream)).into() } unsafe extern "system" fn CreateDeltaPackageUsingBaselineBlockMap(this: *mut core::ffi::c_void, updatedpackagestream: *mut core::ffi::c_void, baselineblockmapstream: *mut core::ffi::c_void, baselinepackagefullname: windows_core::PCWSTR, deltapackagestream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxPackageEditor_Impl::CreateDeltaPackageUsingBaselineBlockMap(this, windows_core::from_raw_borrowed(&updatedpackagestream), windows_core::from_raw_borrowed(&baselineblockmapstream), core::mem::transmute(&baselinepackagefullname), windows_core::from_raw_borrowed(&deltapackagestream)).into() + IAppxPackageEditor_Impl::CreateDeltaPackageUsingBaselineBlockMap(this, core::mem::transmute_copy(&updatedpackagestream), core::mem::transmute_copy(&baselineblockmapstream), core::mem::transmute(&baselinepackagefullname), core::mem::transmute_copy(&deltapackagestream)).into() } unsafe extern "system" fn UpdatePackage(this: *mut core::ffi::c_void, baselinepackagestream: *mut core::ffi::c_void, deltapackagestream: *mut core::ffi::c_void, updateoption: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_OPTION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxPackageEditor_Impl::UpdatePackage(this, windows_core::from_raw_borrowed(&baselinepackagestream), windows_core::from_raw_borrowed(&deltapackagestream), core::mem::transmute_copy(&updateoption)).into() + IAppxPackageEditor_Impl::UpdatePackage(this, core::mem::transmute_copy(&baselinepackagestream), core::mem::transmute_copy(&deltapackagestream), core::mem::transmute_copy(&updateoption)).into() } unsafe extern "system" fn UpdateEncryptedPackage(this: *mut core::ffi::c_void, baselineencryptedpackagestream: *mut core::ffi::c_void, deltapackagestream: *mut core::ffi::c_void, updateoption: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_OPTION, settings: *const APPX_ENCRYPTED_PACKAGE_SETTINGS2, keyinfo: *const APPX_KEY_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxPackageEditor_Impl::UpdateEncryptedPackage(this, windows_core::from_raw_borrowed(&baselineencryptedpackagestream), windows_core::from_raw_borrowed(&deltapackagestream), core::mem::transmute_copy(&updateoption), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo)).into() + IAppxPackageEditor_Impl::UpdateEncryptedPackage(this, core::mem::transmute_copy(&baselineencryptedpackagestream), core::mem::transmute_copy(&deltapackagestream), core::mem::transmute_copy(&updateoption), core::mem::transmute_copy(&settings), core::mem::transmute_copy(&keyinfo)).into() } unsafe extern "system" fn UpdatePackageManifest(this: *mut core::ffi::c_void, packagestream: *mut core::ffi::c_void, updatedmanifeststream: *mut core::ffi::c_void, ispackageencrypted: super::super::super::Foundation::BOOL, options: APPX_PACKAGE_EDITOR_UPDATE_PACKAGE_MANIFEST_OPTIONS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxPackageEditor_Impl::UpdatePackageManifest(this, windows_core::from_raw_borrowed(&packagestream), windows_core::from_raw_borrowed(&updatedmanifeststream), core::mem::transmute_copy(&ispackageencrypted), core::mem::transmute_copy(&options)).into() + IAppxPackageEditor_Impl::UpdatePackageManifest(this, core::mem::transmute_copy(&packagestream), core::mem::transmute_copy(&updatedmanifeststream), core::mem::transmute_copy(&ispackageencrypted), core::mem::transmute_copy(&options)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6539,19 +6539,19 @@ pub struct IAppxPackageWriter_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxPackageWriter_Impl: windows_core::IUnknownImpl { - fn AddPayloadFile(&self, filename: &windows_core::PCWSTR, contenttype: &windows_core::PCWSTR, compressionoption: APPX_COMPRESSION_OPTION, inputstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn Close(&self, manifest: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddPayloadFile(&self, filename: &windows_core::PCWSTR, contenttype: &windows_core::PCWSTR, compressionoption: APPX_COMPRESSION_OPTION, inputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Close(&self, manifest: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAppxPackageWriter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddPayloadFile(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, contenttype: windows_core::PCWSTR, compressionoption: APPX_COMPRESSION_OPTION, inputstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxPackageWriter_Impl::AddPayloadFile(this, core::mem::transmute(&filename), core::mem::transmute(&contenttype), core::mem::transmute_copy(&compressionoption), windows_core::from_raw_borrowed(&inputstream)).into() + IAppxPackageWriter_Impl::AddPayloadFile(this, core::mem::transmute(&filename), core::mem::transmute(&contenttype), core::mem::transmute_copy(&compressionoption), core::mem::transmute_copy(&inputstream)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void, manifest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxPackageWriter_Impl::Close(this, windows_core::from_raw_borrowed(&manifest)).into() + IAppxPackageWriter_Impl::Close(this, core::mem::transmute_copy(&manifest)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6587,14 +6587,14 @@ pub struct IAppxPackageWriter2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAppxPackageWriter2_Impl: windows_core::IUnknownImpl { - fn Close(&self, manifest: Option<&super::super::super::System::Com::IStream>, contentgroupmap: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Close(&self, manifest: windows_core::Ref<'_, super::super::super::System::Com::IStream>, contentgroupmap: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IAppxPackageWriter2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Close(this: *mut core::ffi::c_void, manifest: *mut core::ffi::c_void, contentgroupmap: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxPackageWriter2_Impl::Close(this, windows_core::from_raw_borrowed(&manifest), windows_core::from_raw_borrowed(&contentgroupmap)).into() + IAppxPackageWriter2_Impl::Close(this, core::mem::transmute_copy(&manifest), core::mem::transmute_copy(&contentgroupmap)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Close: Close:: } } @@ -6704,13 +6704,13 @@ pub struct IAppxPackagingDiagnosticEventSinkManager_Vtbl { pub SetSinkForProcess: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAppxPackagingDiagnosticEventSinkManager_Impl: windows_core::IUnknownImpl { - fn SetSinkForProcess(&self, sink: Option<&IAppxPackagingDiagnosticEventSink>) -> windows_core::Result<()>; + fn SetSinkForProcess(&self, sink: windows_core::Ref<'_, IAppxPackagingDiagnosticEventSink>) -> windows_core::Result<()>; } impl IAppxPackagingDiagnosticEventSinkManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSinkForProcess(this: *mut core::ffi::c_void, sink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppxPackagingDiagnosticEventSinkManager_Impl::SetSinkForProcess(this, windows_core::from_raw_borrowed(&sink)).into() + IAppxPackagingDiagnosticEventSinkManager_Impl::SetSinkForProcess(this, core::mem::transmute_copy(&sink)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetSinkForProcess: SetSinkForProcess:: } } diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Opc/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Opc/mod.rs index 4e4f4f3fe9..5064b5ea3d 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Opc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Opc/mod.rs @@ -602,13 +602,13 @@ pub struct IOpcDigitalSignatureManager_Vtbl { #[cfg(all(feature = "Win32_Security_Cryptography", feature = "Win32_System_Com"))] pub trait IOpcDigitalSignatureManager_Impl: windows_core::IUnknownImpl { fn GetSignatureOriginPartName(&self) -> windows_core::Result; - fn SetSignatureOriginPartName(&self, signatureoriginpartname: Option<&IOpcPartUri>) -> windows_core::Result<()>; + fn SetSignatureOriginPartName(&self, signatureoriginpartname: windows_core::Ref<'_, IOpcPartUri>) -> windows_core::Result<()>; fn GetSignatureEnumerator(&self) -> windows_core::Result; - fn RemoveSignature(&self, signaturepartname: Option<&IOpcPartUri>) -> windows_core::Result<()>; + fn RemoveSignature(&self, signaturepartname: windows_core::Ref<'_, IOpcPartUri>) -> windows_core::Result<()>; fn CreateSigningOptions(&self) -> windows_core::Result; - fn Validate(&self, signature: Option<&IOpcDigitalSignature>, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT) -> windows_core::Result; - fn Sign(&self, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT, signingoptions: Option<&IOpcSigningOptions>) -> windows_core::Result; - fn ReplaceSignatureXml(&self, signaturepartname: Option<&IOpcPartUri>, newsignaturexml: *const u8, count: u32) -> windows_core::Result; + fn Validate(&self, signature: windows_core::Ref<'_, IOpcDigitalSignature>, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT) -> windows_core::Result; + fn Sign(&self, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT, signingoptions: windows_core::Ref<'_, IOpcSigningOptions>) -> windows_core::Result; + fn ReplaceSignatureXml(&self, signaturepartname: windows_core::Ref<'_, IOpcPartUri>, newsignaturexml: *const u8, count: u32) -> windows_core::Result; } #[cfg(all(feature = "Win32_Security_Cryptography", feature = "Win32_System_Com"))] impl IOpcDigitalSignatureManager_Vtbl { @@ -625,7 +625,7 @@ impl IOpcDigitalSignatureManager_Vtbl { } unsafe extern "system" fn SetSignatureOriginPartName(this: *mut core::ffi::c_void, signatureoriginpartname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcDigitalSignatureManager_Impl::SetSignatureOriginPartName(this, windows_core::from_raw_borrowed(&signatureoriginpartname)).into() + IOpcDigitalSignatureManager_Impl::SetSignatureOriginPartName(this, core::mem::transmute_copy(&signatureoriginpartname)).into() } unsafe extern "system" fn GetSignatureEnumerator(this: *mut core::ffi::c_void, signatureenumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -639,7 +639,7 @@ impl IOpcDigitalSignatureManager_Vtbl { } unsafe extern "system" fn RemoveSignature(this: *mut core::ffi::c_void, signaturepartname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcDigitalSignatureManager_Impl::RemoveSignature(this, windows_core::from_raw_borrowed(&signaturepartname)).into() + IOpcDigitalSignatureManager_Impl::RemoveSignature(this, core::mem::transmute_copy(&signaturepartname)).into() } unsafe extern "system" fn CreateSigningOptions(this: *mut core::ffi::c_void, signingoptions: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -653,7 +653,7 @@ impl IOpcDigitalSignatureManager_Vtbl { } unsafe extern "system" fn Validate(this: *mut core::ffi::c_void, signature: *mut core::ffi::c_void, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT, validationresult: *mut OPC_SIGNATURE_VALIDATION_RESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcDigitalSignatureManager_Impl::Validate(this, windows_core::from_raw_borrowed(&signature), core::mem::transmute_copy(&certificate)) { + match IOpcDigitalSignatureManager_Impl::Validate(this, core::mem::transmute_copy(&signature), core::mem::transmute_copy(&certificate)) { Ok(ok__) => { validationresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -663,7 +663,7 @@ impl IOpcDigitalSignatureManager_Vtbl { } unsafe extern "system" fn Sign(this: *mut core::ffi::c_void, certificate: *const super::super::super::Security::Cryptography::CERT_CONTEXT, signingoptions: *mut core::ffi::c_void, digitalsignature: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcDigitalSignatureManager_Impl::Sign(this, core::mem::transmute_copy(&certificate), windows_core::from_raw_borrowed(&signingoptions)) { + match IOpcDigitalSignatureManager_Impl::Sign(this, core::mem::transmute_copy(&certificate), core::mem::transmute_copy(&signingoptions)) { Ok(ok__) => { digitalsignature.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -673,7 +673,7 @@ impl IOpcDigitalSignatureManager_Vtbl { } unsafe extern "system" fn ReplaceSignatureXml(this: *mut core::ffi::c_void, signaturepartname: *mut core::ffi::c_void, newsignaturexml: *const u8, count: u32, digitalsignature: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcDigitalSignatureManager_Impl::ReplaceSignatureXml(this, windows_core::from_raw_borrowed(&signaturepartname), core::mem::transmute_copy(&newsignaturexml), core::mem::transmute_copy(&count)) { + match IOpcDigitalSignatureManager_Impl::ReplaceSignatureXml(this, core::mem::transmute_copy(&signaturepartname), core::mem::transmute_copy(&newsignaturexml), core::mem::transmute_copy(&count)) { Ok(ok__) => { digitalsignature.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -783,9 +783,9 @@ pub trait IOpcFactory_Impl: windows_core::IUnknownImpl { fn CreatePartUri(&self, pwzuri: &windows_core::PCWSTR) -> windows_core::Result; fn CreateStreamOnFile(&self, filename: &windows_core::PCWSTR, iomode: OPC_STREAM_IO_MODE, securityattributes: *const super::super::super::Security::SECURITY_ATTRIBUTES, dwflagsandattributes: u32) -> windows_core::Result; fn CreatePackage(&self) -> windows_core::Result; - fn ReadPackageFromStream(&self, stream: Option<&super::super::super::System::Com::IStream>, flags: OPC_READ_FLAGS) -> windows_core::Result; - fn WritePackageToStream(&self, package: Option<&IOpcPackage>, flags: OPC_WRITE_FLAGS, stream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn CreateDigitalSignatureManager(&self, package: Option<&IOpcPackage>) -> windows_core::Result; + fn ReadPackageFromStream(&self, stream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, flags: OPC_READ_FLAGS) -> windows_core::Result; + fn WritePackageToStream(&self, package: windows_core::Ref<'_, IOpcPackage>, flags: OPC_WRITE_FLAGS, stream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn CreateDigitalSignatureManager(&self, package: windows_core::Ref<'_, IOpcPackage>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Com"))] impl IOpcFactory_Vtbl { @@ -832,7 +832,7 @@ impl IOpcFactory_Vtbl { } unsafe extern "system" fn ReadPackageFromStream(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, flags: OPC_READ_FLAGS, package: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcFactory_Impl::ReadPackageFromStream(this, windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&flags)) { + match IOpcFactory_Impl::ReadPackageFromStream(this, core::mem::transmute_copy(&stream), core::mem::transmute_copy(&flags)) { Ok(ok__) => { package.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -842,11 +842,11 @@ impl IOpcFactory_Vtbl { } unsafe extern "system" fn WritePackageToStream(this: *mut core::ffi::c_void, package: *mut core::ffi::c_void, flags: OPC_WRITE_FLAGS, stream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcFactory_Impl::WritePackageToStream(this, windows_core::from_raw_borrowed(&package), core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&stream)).into() + IOpcFactory_Impl::WritePackageToStream(this, core::mem::transmute_copy(&package), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&stream)).into() } unsafe extern "system" fn CreateDigitalSignatureManager(this: *mut core::ffi::c_void, package: *mut core::ffi::c_void, signaturemanager: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcFactory_Impl::CreateDigitalSignatureManager(this, windows_core::from_raw_borrowed(&package)) { + match IOpcFactory_Impl::CreateDigitalSignatureManager(this, core::mem::transmute_copy(&package)) { Ok(ok__) => { signaturemanager.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1195,10 +1195,10 @@ pub struct IOpcPartSet_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOpcPartSet_Impl: windows_core::IUnknownImpl { - fn GetPart(&self, name: Option<&IOpcPartUri>) -> windows_core::Result; - fn CreatePart(&self, name: Option<&IOpcPartUri>, contenttype: &windows_core::PCWSTR, compressionoptions: OPC_COMPRESSION_OPTIONS) -> windows_core::Result; - fn DeletePart(&self, name: Option<&IOpcPartUri>) -> windows_core::Result<()>; - fn PartExists(&self, name: Option<&IOpcPartUri>) -> windows_core::Result; + fn GetPart(&self, name: windows_core::Ref<'_, IOpcPartUri>) -> windows_core::Result; + fn CreatePart(&self, name: windows_core::Ref<'_, IOpcPartUri>, contenttype: &windows_core::PCWSTR, compressionoptions: OPC_COMPRESSION_OPTIONS) -> windows_core::Result; + fn DeletePart(&self, name: windows_core::Ref<'_, IOpcPartUri>) -> windows_core::Result<()>; + fn PartExists(&self, name: windows_core::Ref<'_, IOpcPartUri>) -> windows_core::Result; fn GetEnumerator(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -1206,7 +1206,7 @@ impl IOpcPartSet_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetPart(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void, part: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcPartSet_Impl::GetPart(this, windows_core::from_raw_borrowed(&name)) { + match IOpcPartSet_Impl::GetPart(this, core::mem::transmute_copy(&name)) { Ok(ok__) => { part.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1216,7 +1216,7 @@ impl IOpcPartSet_Vtbl { } unsafe extern "system" fn CreatePart(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void, contenttype: windows_core::PCWSTR, compressionoptions: OPC_COMPRESSION_OPTIONS, part: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcPartSet_Impl::CreatePart(this, windows_core::from_raw_borrowed(&name), core::mem::transmute(&contenttype), core::mem::transmute_copy(&compressionoptions)) { + match IOpcPartSet_Impl::CreatePart(this, core::mem::transmute_copy(&name), core::mem::transmute(&contenttype), core::mem::transmute_copy(&compressionoptions)) { Ok(ok__) => { part.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1226,11 +1226,11 @@ impl IOpcPartSet_Vtbl { } unsafe extern "system" fn DeletePart(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcPartSet_Impl::DeletePart(this, windows_core::from_raw_borrowed(&name)).into() + IOpcPartSet_Impl::DeletePart(this, core::mem::transmute_copy(&name)).into() } unsafe extern "system" fn PartExists(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void, partexists: *mut super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcPartSet_Impl::PartExists(this, windows_core::from_raw_borrowed(&name)) { + match IOpcPartSet_Impl::PartExists(this, core::mem::transmute_copy(&name)) { Ok(ok__) => { partexists.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1302,7 +1302,7 @@ pub struct IOpcPartUri_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOpcPartUri_Impl: IOpcUri_Impl { - fn ComparePartUri(&self, parturi: Option<&IOpcPartUri>) -> windows_core::Result; + fn ComparePartUri(&self, parturi: windows_core::Ref<'_, IOpcPartUri>) -> windows_core::Result; fn GetSourceUri(&self) -> windows_core::Result; fn IsRelationshipsPartUri(&self) -> windows_core::Result; } @@ -1311,7 +1311,7 @@ impl IOpcPartUri_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ComparePartUri(this: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, comparisonresult: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcPartUri_Impl::ComparePartUri(this, windows_core::from_raw_borrowed(&parturi)) { + match IOpcPartUri_Impl::ComparePartUri(this, core::mem::transmute_copy(&parturi)) { Ok(ok__) => { comparisonresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1732,7 +1732,7 @@ pub struct IOpcRelationshipSelectorSet_Vtbl { } pub trait IOpcRelationshipSelectorSet_Impl: windows_core::IUnknownImpl { fn Create(&self, selector: OPC_RELATIONSHIP_SELECTOR, selectioncriterion: &windows_core::PCWSTR) -> windows_core::Result; - fn Delete(&self, relationshipselector: Option<&IOpcRelationshipSelector>) -> windows_core::Result<()>; + fn Delete(&self, relationshipselector: windows_core::Ref<'_, IOpcRelationshipSelector>) -> windows_core::Result<()>; fn GetEnumerator(&self) -> windows_core::Result; } impl IOpcRelationshipSelectorSet_Vtbl { @@ -1749,7 +1749,7 @@ impl IOpcRelationshipSelectorSet_Vtbl { } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, relationshipselector: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcRelationshipSelectorSet_Impl::Delete(this, windows_core::from_raw_borrowed(&relationshipselector)).into() + IOpcRelationshipSelectorSet_Impl::Delete(this, core::mem::transmute_copy(&relationshipselector)).into() } unsafe extern "system" fn GetEnumerator(this: *mut core::ffi::c_void, relationshipselectorenumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1843,7 +1843,7 @@ pub struct IOpcRelationshipSet_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IOpcRelationshipSet_Impl: windows_core::IUnknownImpl { fn GetRelationship(&self, relationshipidentifier: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateRelationship(&self, relationshipidentifier: &windows_core::PCWSTR, relationshiptype: &windows_core::PCWSTR, targeturi: Option<&super::super::super::System::Com::IUri>, targetmode: OPC_URI_TARGET_MODE) -> windows_core::Result; + fn CreateRelationship(&self, relationshipidentifier: &windows_core::PCWSTR, relationshiptype: &windows_core::PCWSTR, targeturi: windows_core::Ref<'_, super::super::super::System::Com::IUri>, targetmode: OPC_URI_TARGET_MODE) -> windows_core::Result; fn DeleteRelationship(&self, relationshipidentifier: &windows_core::PCWSTR) -> windows_core::Result<()>; fn RelationshipExists(&self, relationshipidentifier: &windows_core::PCWSTR) -> windows_core::Result; fn GetEnumerator(&self) -> windows_core::Result; @@ -1865,7 +1865,7 @@ impl IOpcRelationshipSet_Vtbl { } unsafe extern "system" fn CreateRelationship(this: *mut core::ffi::c_void, relationshipidentifier: windows_core::PCWSTR, relationshiptype: windows_core::PCWSTR, targeturi: *mut core::ffi::c_void, targetmode: OPC_URI_TARGET_MODE, relationship: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcRelationshipSet_Impl::CreateRelationship(this, core::mem::transmute(&relationshipidentifier), core::mem::transmute(&relationshiptype), windows_core::from_raw_borrowed(&targeturi), core::mem::transmute_copy(&targetmode)) { + match IOpcRelationshipSet_Impl::CreateRelationship(this, core::mem::transmute(&relationshipidentifier), core::mem::transmute(&relationshiptype), core::mem::transmute_copy(&targeturi), core::mem::transmute_copy(&targetmode)) { Ok(ok__) => { relationship.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2078,7 +2078,7 @@ pub struct IOpcSignatureCustomObjectSet_Vtbl { } pub trait IOpcSignatureCustomObjectSet_Impl: windows_core::IUnknownImpl { fn Create(&self, xmlmarkup: *const u8, count: u32) -> windows_core::Result; - fn Delete(&self, customobject: Option<&IOpcSignatureCustomObject>) -> windows_core::Result<()>; + fn Delete(&self, customobject: windows_core::Ref<'_, IOpcSignatureCustomObject>) -> windows_core::Result<()>; fn GetEnumerator(&self) -> windows_core::Result; } impl IOpcSignatureCustomObjectSet_Vtbl { @@ -2095,7 +2095,7 @@ impl IOpcSignatureCustomObjectSet_Vtbl { } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, customobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcSignatureCustomObjectSet_Impl::Delete(this, windows_core::from_raw_borrowed(&customobject)).into() + IOpcSignatureCustomObjectSet_Impl::Delete(this, core::mem::transmute_copy(&customobject)).into() } unsafe extern "system" fn GetEnumerator(this: *mut core::ffi::c_void, customobjectenumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2349,8 +2349,8 @@ pub struct IOpcSignaturePartReferenceSet_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOpcSignaturePartReferenceSet_Impl: windows_core::IUnknownImpl { - fn Create(&self, parturi: Option<&IOpcPartUri>, digestmethod: &windows_core::PCWSTR, transformmethod: OPC_CANONICALIZATION_METHOD) -> windows_core::Result; - fn Delete(&self, partreference: Option<&IOpcSignaturePartReference>) -> windows_core::Result<()>; + fn Create(&self, parturi: windows_core::Ref<'_, IOpcPartUri>, digestmethod: &windows_core::PCWSTR, transformmethod: OPC_CANONICALIZATION_METHOD) -> windows_core::Result; + fn Delete(&self, partreference: windows_core::Ref<'_, IOpcSignaturePartReference>) -> windows_core::Result<()>; fn GetEnumerator(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -2358,7 +2358,7 @@ impl IOpcSignaturePartReferenceSet_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, digestmethod: windows_core::PCWSTR, transformmethod: OPC_CANONICALIZATION_METHOD, partreference: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcSignaturePartReferenceSet_Impl::Create(this, windows_core::from_raw_borrowed(&parturi), core::mem::transmute(&digestmethod), core::mem::transmute_copy(&transformmethod)) { + match IOpcSignaturePartReferenceSet_Impl::Create(this, core::mem::transmute_copy(&parturi), core::mem::transmute(&digestmethod), core::mem::transmute_copy(&transformmethod)) { Ok(ok__) => { partreference.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2368,7 +2368,7 @@ impl IOpcSignaturePartReferenceSet_Vtbl { } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, partreference: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcSignaturePartReferenceSet_Impl::Delete(this, windows_core::from_raw_borrowed(&partreference)).into() + IOpcSignaturePartReferenceSet_Impl::Delete(this, core::mem::transmute_copy(&partreference)).into() } unsafe extern "system" fn GetEnumerator(this: *mut core::ffi::c_void, partreferenceenumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2642,8 +2642,8 @@ pub struct IOpcSignatureReferenceSet_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOpcSignatureReferenceSet_Impl: windows_core::IUnknownImpl { - fn Create(&self, referenceuri: Option<&super::super::super::System::Com::IUri>, referenceid: &windows_core::PCWSTR, r#type: &windows_core::PCWSTR, digestmethod: &windows_core::PCWSTR, transformmethod: OPC_CANONICALIZATION_METHOD) -> windows_core::Result; - fn Delete(&self, reference: Option<&IOpcSignatureReference>) -> windows_core::Result<()>; + fn Create(&self, referenceuri: windows_core::Ref<'_, super::super::super::System::Com::IUri>, referenceid: &windows_core::PCWSTR, r#type: &windows_core::PCWSTR, digestmethod: &windows_core::PCWSTR, transformmethod: OPC_CANONICALIZATION_METHOD) -> windows_core::Result; + fn Delete(&self, reference: windows_core::Ref<'_, IOpcSignatureReference>) -> windows_core::Result<()>; fn GetEnumerator(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -2651,7 +2651,7 @@ impl IOpcSignatureReferenceSet_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, referenceuri: *mut core::ffi::c_void, referenceid: windows_core::PCWSTR, r#type: windows_core::PCWSTR, digestmethod: windows_core::PCWSTR, transformmethod: OPC_CANONICALIZATION_METHOD, reference: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcSignatureReferenceSet_Impl::Create(this, windows_core::from_raw_borrowed(&referenceuri), core::mem::transmute(&referenceid), core::mem::transmute(&r#type), core::mem::transmute(&digestmethod), core::mem::transmute_copy(&transformmethod)) { + match IOpcSignatureReferenceSet_Impl::Create(this, core::mem::transmute_copy(&referenceuri), core::mem::transmute(&referenceid), core::mem::transmute(&r#type), core::mem::transmute(&digestmethod), core::mem::transmute_copy(&transformmethod)) { Ok(ok__) => { reference.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2661,7 +2661,7 @@ impl IOpcSignatureReferenceSet_Vtbl { } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, reference: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcSignatureReferenceSet_Impl::Delete(this, windows_core::from_raw_borrowed(&reference)).into() + IOpcSignatureReferenceSet_Impl::Delete(this, core::mem::transmute_copy(&reference)).into() } unsafe extern "system" fn GetEnumerator(this: *mut core::ffi::c_void, referenceenumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2939,9 +2939,9 @@ pub struct IOpcSignatureRelationshipReferenceSet_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOpcSignatureRelationshipReferenceSet_Impl: windows_core::IUnknownImpl { - fn Create(&self, sourceuri: Option<&IOpcUri>, digestmethod: &windows_core::PCWSTR, relationshipsigningoption: OPC_RELATIONSHIPS_SIGNING_OPTION, selectorset: Option<&IOpcRelationshipSelectorSet>, transformmethod: OPC_CANONICALIZATION_METHOD) -> windows_core::Result; + fn Create(&self, sourceuri: windows_core::Ref<'_, IOpcUri>, digestmethod: &windows_core::PCWSTR, relationshipsigningoption: OPC_RELATIONSHIPS_SIGNING_OPTION, selectorset: windows_core::Ref<'_, IOpcRelationshipSelectorSet>, transformmethod: OPC_CANONICALIZATION_METHOD) -> windows_core::Result; fn CreateRelationshipSelectorSet(&self) -> windows_core::Result; - fn Delete(&self, relationshipreference: Option<&IOpcSignatureRelationshipReference>) -> windows_core::Result<()>; + fn Delete(&self, relationshipreference: windows_core::Ref<'_, IOpcSignatureRelationshipReference>) -> windows_core::Result<()>; fn GetEnumerator(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -2949,7 +2949,7 @@ impl IOpcSignatureRelationshipReferenceSet_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, sourceuri: *mut core::ffi::c_void, digestmethod: windows_core::PCWSTR, relationshipsigningoption: OPC_RELATIONSHIPS_SIGNING_OPTION, selectorset: *mut core::ffi::c_void, transformmethod: OPC_CANONICALIZATION_METHOD, relationshipreference: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcSignatureRelationshipReferenceSet_Impl::Create(this, windows_core::from_raw_borrowed(&sourceuri), core::mem::transmute(&digestmethod), core::mem::transmute_copy(&relationshipsigningoption), windows_core::from_raw_borrowed(&selectorset), core::mem::transmute_copy(&transformmethod)) { + match IOpcSignatureRelationshipReferenceSet_Impl::Create(this, core::mem::transmute_copy(&sourceuri), core::mem::transmute(&digestmethod), core::mem::transmute_copy(&relationshipsigningoption), core::mem::transmute_copy(&selectorset), core::mem::transmute_copy(&transformmethod)) { Ok(ok__) => { relationshipreference.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2969,7 +2969,7 @@ impl IOpcSignatureRelationshipReferenceSet_Vtbl { } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, relationshipreference: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcSignatureRelationshipReferenceSet_Impl::Delete(this, windows_core::from_raw_borrowed(&relationshipreference)).into() + IOpcSignatureRelationshipReferenceSet_Impl::Delete(this, core::mem::transmute_copy(&relationshipreference)).into() } unsafe extern "system" fn GetEnumerator(this: *mut core::ffi::c_void, relationshipreferenceenumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3120,7 +3120,7 @@ pub trait IOpcSigningOptions_Impl: windows_core::IUnknownImpl { fn GetCustomReferenceSet(&self) -> windows_core::Result; fn GetCertificateSet(&self) -> windows_core::Result; fn GetSignaturePartName(&self) -> windows_core::Result; - fn SetSignaturePartName(&self, signaturepartname: Option<&IOpcPartUri>) -> windows_core::Result<()>; + fn SetSignaturePartName(&self, signaturepartname: windows_core::Ref<'_, IOpcPartUri>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IOpcSigningOptions_Vtbl { @@ -3257,7 +3257,7 @@ impl IOpcSigningOptions_Vtbl { } unsafe extern "system" fn SetSignaturePartName(this: *mut core::ffi::c_void, signaturepartname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpcSigningOptions_Impl::SetSignaturePartName(this, windows_core::from_raw_borrowed(&signaturepartname)).into() + IOpcSigningOptions_Impl::SetSignaturePartName(this, core::mem::transmute_copy(&signaturepartname)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3329,8 +3329,8 @@ pub struct IOpcUri_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IOpcUri_Impl: super::super::super::System::Com::IUri_Impl { fn GetRelationshipsPartUri(&self) -> windows_core::Result; - fn GetRelativeUri(&self, targetparturi: Option<&IOpcPartUri>) -> windows_core::Result; - fn CombinePartUri(&self, relativeuri: Option<&super::super::super::System::Com::IUri>) -> windows_core::Result; + fn GetRelativeUri(&self, targetparturi: windows_core::Ref<'_, IOpcPartUri>) -> windows_core::Result; + fn CombinePartUri(&self, relativeuri: windows_core::Ref<'_, super::super::super::System::Com::IUri>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IOpcUri_Vtbl { @@ -3347,7 +3347,7 @@ impl IOpcUri_Vtbl { } unsafe extern "system" fn GetRelativeUri(this: *mut core::ffi::c_void, targetparturi: *mut core::ffi::c_void, relativeuri: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcUri_Impl::GetRelativeUri(this, windows_core::from_raw_borrowed(&targetparturi)) { + match IOpcUri_Impl::GetRelativeUri(this, core::mem::transmute_copy(&targetparturi)) { Ok(ok__) => { relativeuri.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3357,7 +3357,7 @@ impl IOpcUri_Vtbl { } unsafe extern "system" fn CombinePartUri(this: *mut core::ffi::c_void, relativeuri: *mut core::ffi::c_void, combineduri: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpcUri_Impl::CombinePartUri(this, windows_core::from_raw_borrowed(&relativeuri)) { + match IOpcUri_Impl::CombinePartUri(this, core::mem::transmute_copy(&relativeuri)) { Ok(ok__) => { combineduri.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs index 614587b3b1..7a4119a051 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs @@ -159,7 +159,7 @@ pub struct IEnumVdsObject_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumVdsObject_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppobjectarray: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppobjectarray: windows_core::OutRef<'_, windows_core::IUnknown>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3202,7 +3202,7 @@ pub struct IVdsProviderPrivate_Vtbl { } pub trait IVdsProviderPrivate_Impl: windows_core::IUnknownImpl { fn GetObject(&self, objectid: &windows_core::GUID, r#type: VDS_OBJECT_TYPE) -> windows_core::Result; - fn OnLoad(&self, pwszmachinename: &windows_core::PCWSTR, pcallbackobject: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnLoad(&self, pwszmachinename: &windows_core::PCWSTR, pcallbackobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn OnUnload(&self, bforceunload: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IVdsProviderPrivate_Vtbl { @@ -3219,7 +3219,7 @@ impl IVdsProviderPrivate_Vtbl { } unsafe extern "system" fn OnLoad(this: *mut core::ffi::c_void, pwszmachinename: windows_core::PCWSTR, pcallbackobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVdsProviderPrivate_Impl::OnLoad(this, core::mem::transmute(&pwszmachinename), windows_core::from_raw_borrowed(&pcallbackobject)).into() + IVdsProviderPrivate_Impl::OnLoad(this, core::mem::transmute(&pwszmachinename), core::mem::transmute_copy(&pcallbackobject)).into() } unsafe extern "system" fn OnUnload(this: *mut core::ffi::c_void, bforceunload: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3407,7 +3407,7 @@ pub trait IVdsService_Impl: windows_core::IUnknownImpl { fn Reenumerate(&self) -> windows_core::Result<()>; fn Refresh(&self) -> windows_core::Result<()>; fn CleanupObsoleteMountPoints(&self) -> windows_core::Result<()>; - fn Advise(&self, psink: Option<&IVdsAdviseSink>) -> windows_core::Result; + fn Advise(&self, psink: windows_core::Ref<'_, IVdsAdviseSink>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; fn Reboot(&self) -> windows_core::Result<()>; fn SetFlags(&self, ulflags: u32) -> windows_core::Result<()>; @@ -3495,7 +3495,7 @@ impl IVdsService_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IVdsService_Impl::Advise(this, windows_core::from_raw_borrowed(&psink)) { + match IVdsService_Impl::Advise(this, core::mem::transmute_copy(&psink)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4674,10 +4674,10 @@ pub struct IVdsVdProvider_Vtbl { #[cfg(feature = "Win32_Storage_Vhd")] pub trait IVdsVdProvider_Impl: windows_core::IUnknownImpl { fn QueryVDisks(&self) -> windows_core::Result; - fn CreateVDisk(&self, virtualdevicetype: *const super::Vhd::VIRTUAL_STORAGE_TYPE, ppath: &windows_core::PCWSTR, pstringsecuritydescriptor: &windows_core::PCWSTR, flags: super::Vhd::CREATE_VIRTUAL_DISK_FLAG, providerspecificflags: u32, reserved: u32, pcreatediskparameters: *const VDS_CREATE_VDISK_PARAMETERS, ppasync: *mut Option) -> windows_core::Result<()>; - fn AddVDisk(&self, virtualdevicetype: *const super::Vhd::VIRTUAL_STORAGE_TYPE, ppath: &windows_core::PCWSTR, ppvdisk: *mut Option) -> windows_core::Result<()>; - fn GetDiskFromVDisk(&self, pvdisk: Option<&IVdsVDisk>) -> windows_core::Result; - fn GetVDiskFromDisk(&self, pdisk: Option<&IVdsDisk>) -> windows_core::Result; + fn CreateVDisk(&self, virtualdevicetype: *const super::Vhd::VIRTUAL_STORAGE_TYPE, ppath: &windows_core::PCWSTR, pstringsecuritydescriptor: &windows_core::PCWSTR, flags: super::Vhd::CREATE_VIRTUAL_DISK_FLAG, providerspecificflags: u32, reserved: u32, pcreatediskparameters: *const VDS_CREATE_VDISK_PARAMETERS, ppasync: windows_core::OutRef<'_, IVdsAsync>) -> windows_core::Result<()>; + fn AddVDisk(&self, virtualdevicetype: *const super::Vhd::VIRTUAL_STORAGE_TYPE, ppath: &windows_core::PCWSTR, ppvdisk: windows_core::OutRef<'_, IVdsVDisk>) -> windows_core::Result<()>; + fn GetDiskFromVDisk(&self, pvdisk: windows_core::Ref<'_, IVdsVDisk>) -> windows_core::Result; + fn GetVDiskFromDisk(&self, pdisk: windows_core::Ref<'_, IVdsDisk>) -> windows_core::Result; } #[cfg(feature = "Win32_Storage_Vhd")] impl IVdsVdProvider_Vtbl { @@ -4702,7 +4702,7 @@ impl IVdsVdProvider_Vtbl { } unsafe extern "system" fn GetDiskFromVDisk(this: *mut core::ffi::c_void, pvdisk: *mut core::ffi::c_void, ppdisk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IVdsVdProvider_Impl::GetDiskFromVDisk(this, windows_core::from_raw_borrowed(&pvdisk)) { + match IVdsVdProvider_Impl::GetDiskFromVDisk(this, core::mem::transmute_copy(&pvdisk)) { Ok(ok__) => { ppdisk.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4712,7 +4712,7 @@ impl IVdsVdProvider_Vtbl { } unsafe extern "system" fn GetVDiskFromDisk(this: *mut core::ffi::c_void, pdisk: *mut core::ffi::c_void, ppvdisk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IVdsVdProvider_Impl::GetVDiskFromDisk(this, windows_core::from_raw_borrowed(&pdisk)) { + match IVdsVdProvider_Impl::GetVDiskFromDisk(this, core::mem::transmute_copy(&pdisk)) { Ok(ok__) => { ppvdisk.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs index 8a6840a784..b0e4bd6f0a 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs @@ -1456,7 +1456,7 @@ pub trait IVssEnumMgmtObject_Impl: windows_core::IUnknownImpl { fn Next(&self, celt: u32, rgelt: *mut VSS_MGMT_OBJECT_PROP, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; - fn Clone(&self, ppenum: *mut Option) -> windows_core::Result<()>; + fn Clone(&self, ppenum: windows_core::OutRef<'_, IVssEnumMgmtObject>) -> windows_core::Result<()>; } impl IVssEnumMgmtObject_Vtbl { pub const fn new() -> Self { @@ -1517,7 +1517,7 @@ pub trait IVssEnumObject_Impl: windows_core::IUnknownImpl { fn Next(&self, celt: u32, rgelt: *mut VSS_OBJECT_PROP, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; - fn Clone(&self, ppenum: *mut Option) -> windows_core::Result<()>; + fn Clone(&self, ppenum: windows_core::OutRef<'_, IVssEnumObject>) -> windows_core::Result<()>; } impl IVssEnumObject_Vtbl { pub const fn new() -> Self { @@ -2061,14 +2061,14 @@ pub struct IVssProviderNotifications_Vtbl { pub OnUnload: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IVssProviderNotifications_Impl: windows_core::IUnknownImpl { - fn OnLoad(&self, pcallback: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnLoad(&self, pcallback: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn OnUnload(&self, bforceunload: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IVssProviderNotifications_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnLoad(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVssProviderNotifications_Impl::OnLoad(this, windows_core::from_raw_borrowed(&pcallback)).into() + IVssProviderNotifications_Impl::OnLoad(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn OnUnload(this: *mut core::ffi::c_void, bforceunload: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Xps/Printing/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Xps/Printing/mod.rs index 9d176bb4af..7f829e454e 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Xps/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Xps/Printing/mod.rs @@ -199,14 +199,14 @@ pub struct IPrintDocumentPackageTargetFactory_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IPrintDocumentPackageTargetFactory_Impl: windows_core::IUnknownImpl { - fn CreateDocumentPackageTargetForPrintJob(&self, printername: &windows_core::PCWSTR, jobname: &windows_core::PCWSTR, joboutputstream: Option<&super::super::super::System::Com::IStream>, jobprintticketstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateDocumentPackageTargetForPrintJob(&self, printername: &windows_core::PCWSTR, jobname: &windows_core::PCWSTR, joboutputstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, jobprintticketstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IPrintDocumentPackageTargetFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDocumentPackageTargetForPrintJob(this: *mut core::ffi::c_void, printername: windows_core::PCWSTR, jobname: windows_core::PCWSTR, joboutputstream: *mut core::ffi::c_void, jobprintticketstream: *mut core::ffi::c_void, docpackagetarget: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintDocumentPackageTargetFactory_Impl::CreateDocumentPackageTargetForPrintJob(this, core::mem::transmute(&printername), core::mem::transmute(&jobname), windows_core::from_raw_borrowed(&joboutputstream), windows_core::from_raw_borrowed(&jobprintticketstream)) { + match IPrintDocumentPackageTargetFactory_Impl::CreateDocumentPackageTargetForPrintJob(this, core::mem::transmute(&printername), core::mem::transmute(&jobname), core::mem::transmute_copy(&joboutputstream), core::mem::transmute_copy(&jobprintticketstream)) { Ok(ok__) => { docpackagetarget.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs index 2662869549..d1fbc556af 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs @@ -186,7 +186,7 @@ pub struct IXpsDocumentPackageTarget_Vtbl { } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsDocumentPackageTarget_Impl: windows_core::IUnknownImpl { - fn GetXpsOMPackageWriter(&self, documentsequencepartname: Option<&super::Packaging::Opc::IOpcPartUri>, discardcontrolpartname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn GetXpsOMPackageWriter(&self, documentsequencepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, discardcontrolpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; fn GetXpsOMFactory(&self) -> windows_core::Result; fn GetXpsType(&self) -> windows_core::Result; } @@ -195,7 +195,7 @@ impl IXpsDocumentPackageTarget_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetXpsOMPackageWriter(this: *mut core::ffi::c_void, documentsequencepartname: *mut core::ffi::c_void, discardcontrolpartname: *mut core::ffi::c_void, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsDocumentPackageTarget_Impl::GetXpsOMPackageWriter(this, windows_core::from_raw_borrowed(&documentsequencepartname), windows_core::from_raw_borrowed(&discardcontrolpartname)) { + match IXpsDocumentPackageTarget_Impl::GetXpsOMPackageWriter(this, core::mem::transmute_copy(&documentsequencepartname), core::mem::transmute_copy(&discardcontrolpartname)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -266,7 +266,7 @@ pub struct IXpsDocumentPackageTarget3D_Vtbl { } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsDocumentPackageTarget3D_Impl: windows_core::IUnknownImpl { - fn GetXpsOMPackageWriter3D(&self, documentsequencepartname: Option<&super::Packaging::Opc::IOpcPartUri>, discardcontrolpartname: Option<&super::Packaging::Opc::IOpcPartUri>, modelpartname: Option<&super::Packaging::Opc::IOpcPartUri>, modeldata: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn GetXpsOMPackageWriter3D(&self, documentsequencepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, discardcontrolpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, modelpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, modeldata: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn GetXpsOMFactory(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] @@ -274,7 +274,7 @@ impl IXpsDocumentPackageTarget3D_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetXpsOMPackageWriter3D(this: *mut core::ffi::c_void, documentsequencepartname: *mut core::ffi::c_void, discardcontrolpartname: *mut core::ffi::c_void, modelpartname: *mut core::ffi::c_void, modeldata: *mut core::ffi::c_void, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsDocumentPackageTarget3D_Impl::GetXpsOMPackageWriter3D(this, windows_core::from_raw_borrowed(&documentsequencepartname), windows_core::from_raw_borrowed(&discardcontrolpartname), windows_core::from_raw_borrowed(&modelpartname), windows_core::from_raw_borrowed(&modeldata)) { + match IXpsDocumentPackageTarget3D_Impl::GetXpsOMPackageWriter3D(this, core::mem::transmute_copy(&documentsequencepartname), core::mem::transmute_copy(&discardcontrolpartname), core::mem::transmute_copy(&modelpartname), core::mem::transmute_copy(&modeldata)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -451,9 +451,9 @@ pub trait IXpsOMCanvas_Impl: IXpsOMVisual_Impl { fn SetAccessibilityLongDescription(&self, longdescription: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetDictionary(&self) -> windows_core::Result; fn GetDictionaryLocal(&self) -> windows_core::Result; - fn SetDictionaryLocal(&self, resourcedictionary: Option<&IXpsOMDictionary>) -> windows_core::Result<()>; + fn SetDictionaryLocal(&self, resourcedictionary: windows_core::Ref<'_, IXpsOMDictionary>) -> windows_core::Result<()>; fn GetDictionaryResource(&self) -> windows_core::Result; - fn SetDictionaryResource(&self, remotedictionaryresource: Option<&IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; + fn SetDictionaryResource(&self, remotedictionaryresource: windows_core::Ref<'_, IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -533,7 +533,7 @@ impl IXpsOMCanvas_Vtbl { } unsafe extern "system" fn SetDictionaryLocal(this: *mut core::ffi::c_void, resourcedictionary: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMCanvas_Impl::SetDictionaryLocal(this, windows_core::from_raw_borrowed(&resourcedictionary)).into() + IXpsOMCanvas_Impl::SetDictionaryLocal(this, core::mem::transmute_copy(&resourcedictionary)).into() } unsafe extern "system" fn GetDictionaryResource(this: *mut core::ffi::c_void, remotedictionaryresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -547,7 +547,7 @@ impl IXpsOMCanvas_Vtbl { } unsafe extern "system" fn SetDictionaryResource(this: *mut core::ffi::c_void, remotedictionaryresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMCanvas_Impl::SetDictionaryResource(this, windows_core::from_raw_borrowed(&remotedictionaryresource)).into() + IXpsOMCanvas_Impl::SetDictionaryResource(this, core::mem::transmute_copy(&remotedictionaryresource)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, canvas: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -620,7 +620,7 @@ pub struct IXpsOMColorProfileResource_Vtbl { #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMColorProfileResource_Impl: IXpsOMResource_Impl { fn GetStream(&self) -> windows_core::Result; - fn SetContent(&self, sourcestream: Option<&super::super::System::Com::IStream>, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetContent(&self, sourcestream: windows_core::Ref<'_, super::super::System::Com::IStream>, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMColorProfileResource_Vtbl { @@ -637,7 +637,7 @@ impl IXpsOMColorProfileResource_Vtbl { } unsafe extern "system" fn SetContent(this: *mut core::ffi::c_void, sourcestream: *mut core::ffi::c_void, partname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMColorProfileResource_Impl::SetContent(this, windows_core::from_raw_borrowed(&sourcestream), windows_core::from_raw_borrowed(&partname)).into() + IXpsOMColorProfileResource_Impl::SetContent(this, core::mem::transmute_copy(&sourcestream), core::mem::transmute_copy(&partname)).into() } Self { base__: IXpsOMResource_Vtbl::new::(), GetStream: GetStream::, SetContent: SetContent:: } } @@ -706,11 +706,11 @@ pub struct IXpsOMColorProfileResourceCollection_Vtbl { pub trait IXpsOMColorProfileResourceCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, object: Option<&IXpsOMColorProfileResource>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, object: windows_core::Ref<'_, IXpsOMColorProfileResource>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, object: Option<&IXpsOMColorProfileResource>) -> windows_core::Result<()>; - fn Append(&self, object: Option<&IXpsOMColorProfileResource>) -> windows_core::Result<()>; - fn GetByPartName(&self, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn SetAt(&self, index: u32, object: windows_core::Ref<'_, IXpsOMColorProfileResource>) -> windows_core::Result<()>; + fn Append(&self, object: windows_core::Ref<'_, IXpsOMColorProfileResource>) -> windows_core::Result<()>; + fn GetByPartName(&self, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMColorProfileResourceCollection_Vtbl { @@ -737,7 +737,7 @@ impl IXpsOMColorProfileResourceCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMColorProfileResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&object)).into() + IXpsOMColorProfileResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -745,15 +745,15 @@ impl IXpsOMColorProfileResourceCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMColorProfileResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&object)).into() + IXpsOMColorProfileResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMColorProfileResourceCollection_Impl::Append(this, windows_core::from_raw_borrowed(&object)).into() + IXpsOMColorProfileResourceCollection_Impl::Append(this, core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn GetByPartName(this: *mut core::ffi::c_void, partname: *mut core::ffi::c_void, part: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMColorProfileResourceCollection_Impl::GetByPartName(this, windows_core::from_raw_borrowed(&partname)) { + match IXpsOMColorProfileResourceCollection_Impl::GetByPartName(this, core::mem::transmute_copy(&partname)) { Ok(ok__) => { part.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1485,12 +1485,12 @@ pub trait IXpsOMDictionary_Impl: windows_core::IUnknownImpl { fn GetOwner(&self) -> windows_core::Result; fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32, key: *mut windows_core::PWSTR) -> windows_core::Result; - fn GetByKey(&self, key: &windows_core::PCWSTR, beforeentry: Option<&IXpsOMShareable>) -> windows_core::Result; - fn GetIndex(&self, entry: Option<&IXpsOMShareable>) -> windows_core::Result; - fn Append(&self, key: &windows_core::PCWSTR, entry: Option<&IXpsOMShareable>) -> windows_core::Result<()>; - fn InsertAt(&self, index: u32, key: &windows_core::PCWSTR, entry: Option<&IXpsOMShareable>) -> windows_core::Result<()>; + fn GetByKey(&self, key: &windows_core::PCWSTR, beforeentry: windows_core::Ref<'_, IXpsOMShareable>) -> windows_core::Result; + fn GetIndex(&self, entry: windows_core::Ref<'_, IXpsOMShareable>) -> windows_core::Result; + fn Append(&self, key: &windows_core::PCWSTR, entry: windows_core::Ref<'_, IXpsOMShareable>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, key: &windows_core::PCWSTR, entry: windows_core::Ref<'_, IXpsOMShareable>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, key: &windows_core::PCWSTR, entry: Option<&IXpsOMShareable>) -> windows_core::Result<()>; + fn SetAt(&self, index: u32, key: &windows_core::PCWSTR, entry: windows_core::Ref<'_, IXpsOMShareable>) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } impl IXpsOMDictionary_Vtbl { @@ -1527,7 +1527,7 @@ impl IXpsOMDictionary_Vtbl { } unsafe extern "system" fn GetByKey(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, beforeentry: *mut core::ffi::c_void, entry: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMDictionary_Impl::GetByKey(this, core::mem::transmute(&key), windows_core::from_raw_borrowed(&beforeentry)) { + match IXpsOMDictionary_Impl::GetByKey(this, core::mem::transmute(&key), core::mem::transmute_copy(&beforeentry)) { Ok(ok__) => { entry.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1537,7 +1537,7 @@ impl IXpsOMDictionary_Vtbl { } unsafe extern "system" fn GetIndex(this: *mut core::ffi::c_void, entry: *mut core::ffi::c_void, index: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMDictionary_Impl::GetIndex(this, windows_core::from_raw_borrowed(&entry)) { + match IXpsOMDictionary_Impl::GetIndex(this, core::mem::transmute_copy(&entry)) { Ok(ok__) => { index.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1547,11 +1547,11 @@ impl IXpsOMDictionary_Vtbl { } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, entry: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDictionary_Impl::Append(this, core::mem::transmute(&key), windows_core::from_raw_borrowed(&entry)).into() + IXpsOMDictionary_Impl::Append(this, core::mem::transmute(&key), core::mem::transmute_copy(&entry)).into() } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, key: windows_core::PCWSTR, entry: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDictionary_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute(&key), windows_core::from_raw_borrowed(&entry)).into() + IXpsOMDictionary_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute(&key), core::mem::transmute_copy(&entry)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1559,7 +1559,7 @@ impl IXpsOMDictionary_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, key: windows_core::PCWSTR, entry: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDictionary_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute(&key), windows_core::from_raw_borrowed(&entry)).into() + IXpsOMDictionary_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute(&key), core::mem::transmute_copy(&entry)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, dictionary: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1653,9 +1653,9 @@ pub trait IXpsOMDocument_Impl: IXpsOMPart_Impl { fn GetOwner(&self) -> windows_core::Result; fn GetPageReferences(&self) -> windows_core::Result; fn GetPrintTicketResource(&self) -> windows_core::Result; - fn SetPrintTicketResource(&self, printticketresource: Option<&IXpsOMPrintTicketResource>) -> windows_core::Result<()>; + fn SetPrintTicketResource(&self, printticketresource: windows_core::Ref<'_, IXpsOMPrintTicketResource>) -> windows_core::Result<()>; fn GetDocumentStructureResource(&self) -> windows_core::Result; - fn SetDocumentStructureResource(&self, documentstructureresource: Option<&IXpsOMDocumentStructureResource>) -> windows_core::Result<()>; + fn SetDocumentStructureResource(&self, documentstructureresource: windows_core::Ref<'_, IXpsOMDocumentStructureResource>) -> windows_core::Result<()>; fn GetSignatureBlockResources(&self) -> windows_core::Result; fn Clone(&self) -> windows_core::Result; } @@ -1694,7 +1694,7 @@ impl IXpsOMDocument_Vtbl { } unsafe extern "system" fn SetPrintTicketResource(this: *mut core::ffi::c_void, printticketresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDocument_Impl::SetPrintTicketResource(this, windows_core::from_raw_borrowed(&printticketresource)).into() + IXpsOMDocument_Impl::SetPrintTicketResource(this, core::mem::transmute_copy(&printticketresource)).into() } unsafe extern "system" fn GetDocumentStructureResource(this: *mut core::ffi::c_void, documentstructureresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1708,7 +1708,7 @@ impl IXpsOMDocument_Vtbl { } unsafe extern "system" fn SetDocumentStructureResource(this: *mut core::ffi::c_void, documentstructureresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDocument_Impl::SetDocumentStructureResource(this, windows_core::from_raw_borrowed(&documentstructureresource)).into() + IXpsOMDocument_Impl::SetDocumentStructureResource(this, core::mem::transmute_copy(&documentstructureresource)).into() } unsafe extern "system" fn GetSignatureBlockResources(this: *mut core::ffi::c_void, signatureblockresources: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1794,10 +1794,10 @@ pub struct IXpsOMDocumentCollection_Vtbl { pub trait IXpsOMDocumentCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, document: Option<&IXpsOMDocument>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, document: windows_core::Ref<'_, IXpsOMDocument>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, document: Option<&IXpsOMDocument>) -> windows_core::Result<()>; - fn Append(&self, document: Option<&IXpsOMDocument>) -> windows_core::Result<()>; + fn SetAt(&self, index: u32, document: windows_core::Ref<'_, IXpsOMDocument>) -> windows_core::Result<()>; + fn Append(&self, document: windows_core::Ref<'_, IXpsOMDocument>) -> windows_core::Result<()>; } impl IXpsOMDocumentCollection_Vtbl { pub const fn new() -> Self { @@ -1823,7 +1823,7 @@ impl IXpsOMDocumentCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, document: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDocumentCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&document)).into() + IXpsOMDocumentCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&document)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1831,11 +1831,11 @@ impl IXpsOMDocumentCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, document: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDocumentCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&document)).into() + IXpsOMDocumentCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&document)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, document: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDocumentCollection_Impl::Append(this, windows_core::from_raw_borrowed(&document)).into() + IXpsOMDocumentCollection_Impl::Append(this, core::mem::transmute_copy(&document)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1893,7 +1893,7 @@ pub trait IXpsOMDocumentSequence_Impl: IXpsOMPart_Impl { fn GetOwner(&self) -> windows_core::Result; fn GetDocuments(&self) -> windows_core::Result; fn GetPrintTicketResource(&self) -> windows_core::Result; - fn SetPrintTicketResource(&self, printticketresource: Option<&IXpsOMPrintTicketResource>) -> windows_core::Result<()>; + fn SetPrintTicketResource(&self, printticketresource: windows_core::Ref<'_, IXpsOMPrintTicketResource>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMDocumentSequence_Vtbl { @@ -1930,7 +1930,7 @@ impl IXpsOMDocumentSequence_Vtbl { } unsafe extern "system" fn SetPrintTicketResource(this: *mut core::ffi::c_void, printticketresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDocumentSequence_Impl::SetPrintTicketResource(this, windows_core::from_raw_borrowed(&printticketresource)).into() + IXpsOMDocumentSequence_Impl::SetPrintTicketResource(this, core::mem::transmute_copy(&printticketresource)).into() } Self { base__: IXpsOMPart_Vtbl::new::(), @@ -1990,7 +1990,7 @@ pub struct IXpsOMDocumentStructureResource_Vtbl { pub trait IXpsOMDocumentStructureResource_Impl: IXpsOMResource_Impl { fn GetOwner(&self) -> windows_core::Result; fn GetStream(&self) -> windows_core::Result; - fn SetContent(&self, sourcestream: Option<&super::super::System::Com::IStream>, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetContent(&self, sourcestream: windows_core::Ref<'_, super::super::System::Com::IStream>, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMDocumentStructureResource_Vtbl { @@ -2017,7 +2017,7 @@ impl IXpsOMDocumentStructureResource_Vtbl { } unsafe extern "system" fn SetContent(this: *mut core::ffi::c_void, sourcestream: *mut core::ffi::c_void, partname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMDocumentStructureResource_Impl::SetContent(this, windows_core::from_raw_borrowed(&sourcestream), windows_core::from_raw_borrowed(&partname)).into() + IXpsOMDocumentStructureResource_Impl::SetContent(this, core::mem::transmute_copy(&sourcestream), core::mem::transmute_copy(&partname)).into() } Self { base__: IXpsOMResource_Vtbl::new::(), @@ -2075,7 +2075,7 @@ pub struct IXpsOMFontResource_Vtbl { #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMFontResource_Impl: IXpsOMResource_Impl { fn GetStream(&self) -> windows_core::Result; - fn SetContent(&self, sourcestream: Option<&super::super::System::Com::IStream>, embeddingoption: XPS_FONT_EMBEDDING, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetContent(&self, sourcestream: windows_core::Ref<'_, super::super::System::Com::IStream>, embeddingoption: XPS_FONT_EMBEDDING, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; fn GetEmbeddingOption(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] @@ -2093,7 +2093,7 @@ impl IXpsOMFontResource_Vtbl { } unsafe extern "system" fn SetContent(this: *mut core::ffi::c_void, sourcestream: *mut core::ffi::c_void, embeddingoption: XPS_FONT_EMBEDDING, partname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMFontResource_Impl::SetContent(this, windows_core::from_raw_borrowed(&sourcestream), core::mem::transmute_copy(&embeddingoption), windows_core::from_raw_borrowed(&partname)).into() + IXpsOMFontResource_Impl::SetContent(this, core::mem::transmute_copy(&sourcestream), core::mem::transmute_copy(&embeddingoption), core::mem::transmute_copy(&partname)).into() } unsafe extern "system" fn GetEmbeddingOption(this: *mut core::ffi::c_void, embeddingoption: *mut XPS_FONT_EMBEDDING) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2177,11 +2177,11 @@ pub struct IXpsOMFontResourceCollection_Vtbl { pub trait IXpsOMFontResourceCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn SetAt(&self, index: u32, value: Option<&IXpsOMFontResource>) -> windows_core::Result<()>; - fn InsertAt(&self, index: u32, value: Option<&IXpsOMFontResource>) -> windows_core::Result<()>; - fn Append(&self, value: Option<&IXpsOMFontResource>) -> windows_core::Result<()>; + fn SetAt(&self, index: u32, value: windows_core::Ref<'_, IXpsOMFontResource>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, value: windows_core::Ref<'_, IXpsOMFontResource>) -> windows_core::Result<()>; + fn Append(&self, value: windows_core::Ref<'_, IXpsOMFontResource>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn GetByPartName(&self, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn GetByPartName(&self, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMFontResourceCollection_Vtbl { @@ -2208,15 +2208,15 @@ impl IXpsOMFontResourceCollection_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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMFontResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&value)).into() + IXpsOMFontResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&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: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMFontResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&value)).into() + IXpsOMFontResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMFontResourceCollection_Impl::Append(this, windows_core::from_raw_borrowed(&value)).into() + IXpsOMFontResourceCollection_Impl::Append(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2224,7 +2224,7 @@ impl IXpsOMFontResourceCollection_Vtbl { } unsafe extern "system" fn GetByPartName(this: *mut core::ffi::c_void, partname: *mut core::ffi::c_void, part: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMFontResourceCollection_Impl::GetByPartName(this, windows_core::from_raw_borrowed(&partname)) { + match IXpsOMFontResourceCollection_Impl::GetByPartName(this, core::mem::transmute_copy(&partname)) { Ok(ok__) => { part.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2317,7 +2317,7 @@ pub trait IXpsOMGeometry_Impl: IXpsOMShareable_Impl { fn SetFillRule(&self, fillrule: XPS_FILL_RULE) -> windows_core::Result<()>; fn GetTransform(&self) -> windows_core::Result; fn GetTransformLocal(&self) -> windows_core::Result; - fn SetTransformLocal(&self, transform: Option<&IXpsOMMatrixTransform>) -> windows_core::Result<()>; + fn SetTransformLocal(&self, transform: windows_core::Ref<'_, IXpsOMMatrixTransform>) -> windows_core::Result<()>; fn GetTransformLookup(&self) -> windows_core::Result; fn SetTransformLookup(&self, lookup: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2370,7 +2370,7 @@ impl IXpsOMGeometry_Vtbl { } unsafe extern "system" fn SetTransformLocal(this: *mut core::ffi::c_void, transform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGeometry_Impl::SetTransformLocal(this, windows_core::from_raw_borrowed(&transform)).into() + IXpsOMGeometry_Impl::SetTransformLocal(this, core::mem::transmute_copy(&transform)).into() } unsafe extern "system" fn GetTransformLookup(this: *mut core::ffi::c_void, lookup: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2687,10 +2687,10 @@ pub struct IXpsOMGeometryFigureCollection_Vtbl { pub trait IXpsOMGeometryFigureCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, geometryfigure: Option<&IXpsOMGeometryFigure>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, geometryfigure: windows_core::Ref<'_, IXpsOMGeometryFigure>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, geometryfigure: Option<&IXpsOMGeometryFigure>) -> windows_core::Result<()>; - fn Append(&self, geometryfigure: Option<&IXpsOMGeometryFigure>) -> windows_core::Result<()>; + fn SetAt(&self, index: u32, geometryfigure: windows_core::Ref<'_, IXpsOMGeometryFigure>) -> windows_core::Result<()>; + fn Append(&self, geometryfigure: windows_core::Ref<'_, IXpsOMGeometryFigure>) -> windows_core::Result<()>; } impl IXpsOMGeometryFigureCollection_Vtbl { pub const fn new() -> Self { @@ -2716,7 +2716,7 @@ impl IXpsOMGeometryFigureCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, geometryfigure: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGeometryFigureCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&geometryfigure)).into() + IXpsOMGeometryFigureCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&geometryfigure)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2724,11 +2724,11 @@ impl IXpsOMGeometryFigureCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, geometryfigure: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGeometryFigureCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&geometryfigure)).into() + IXpsOMGeometryFigureCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&geometryfigure)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, geometryfigure: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGeometryFigureCollection_Impl::Append(this, windows_core::from_raw_borrowed(&geometryfigure)).into() + IXpsOMGeometryFigureCollection_Impl::Append(this, core::mem::transmute_copy(&geometryfigure)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2912,12 +2912,12 @@ pub trait IXpsOMGlyphs_Impl: IXpsOMVisual_Impl { fn GetFontRenderingEmSize(&self) -> windows_core::Result; fn SetFontRenderingEmSize(&self, fontrenderingemsize: f32) -> windows_core::Result<()>; fn GetFontResource(&self) -> windows_core::Result; - fn SetFontResource(&self, fontresource: Option<&IXpsOMFontResource>) -> windows_core::Result<()>; + fn SetFontResource(&self, fontresource: windows_core::Ref<'_, IXpsOMFontResource>) -> windows_core::Result<()>; fn GetFontFaceIndex(&self) -> windows_core::Result; fn SetFontFaceIndex(&self, fontfaceindex: i16) -> windows_core::Result<()>; fn GetFillBrush(&self) -> windows_core::Result; fn GetFillBrushLocal(&self) -> windows_core::Result; - fn SetFillBrushLocal(&self, fillbrush: Option<&IXpsOMBrush>) -> windows_core::Result<()>; + fn SetFillBrushLocal(&self, fillbrush: windows_core::Ref<'_, IXpsOMBrush>) -> windows_core::Result<()>; fn GetFillBrushLookup(&self) -> windows_core::Result; fn SetFillBrushLookup(&self, key: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetGlyphsEditor(&self) -> windows_core::Result; @@ -3062,7 +3062,7 @@ impl IXpsOMGlyphs_Vtbl { } unsafe extern "system" fn SetFontResource(this: *mut core::ffi::c_void, fontresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGlyphs_Impl::SetFontResource(this, windows_core::from_raw_borrowed(&fontresource)).into() + IXpsOMGlyphs_Impl::SetFontResource(this, core::mem::transmute_copy(&fontresource)).into() } unsafe extern "system" fn GetFontFaceIndex(this: *mut core::ffi::c_void, fontfaceindex: *mut i16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3100,7 +3100,7 @@ impl IXpsOMGlyphs_Vtbl { } unsafe extern "system" fn SetFillBrushLocal(this: *mut core::ffi::c_void, fillbrush: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGlyphs_Impl::SetFillBrushLocal(this, windows_core::from_raw_borrowed(&fillbrush)).into() + IXpsOMGlyphs_Impl::SetFillBrushLocal(this, core::mem::transmute_copy(&fillbrush)).into() } unsafe extern "system" fn GetFillBrushLookup(this: *mut core::ffi::c_void, key: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3499,7 +3499,7 @@ pub trait IXpsOMGradientBrush_Impl: IXpsOMBrush_Impl { fn GetGradientStops(&self) -> windows_core::Result; fn GetTransform(&self) -> windows_core::Result; fn GetTransformLocal(&self) -> windows_core::Result; - fn SetTransformLocal(&self, transform: Option<&IXpsOMMatrixTransform>) -> windows_core::Result<()>; + fn SetTransformLocal(&self, transform: windows_core::Ref<'_, IXpsOMMatrixTransform>) -> windows_core::Result<()>; fn GetTransformLookup(&self) -> windows_core::Result; fn SetTransformLookup(&self, key: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetSpreadMethod(&self) -> windows_core::Result; @@ -3541,7 +3541,7 @@ impl IXpsOMGradientBrush_Vtbl { } unsafe extern "system" fn SetTransformLocal(this: *mut core::ffi::c_void, transform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGradientBrush_Impl::SetTransformLocal(this, windows_core::from_raw_borrowed(&transform)).into() + IXpsOMGradientBrush_Impl::SetTransformLocal(this, core::mem::transmute_copy(&transform)).into() } unsafe extern "system" fn GetTransformLookup(this: *mut core::ffi::c_void, key: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3648,7 +3648,7 @@ pub trait IXpsOMGradientStop_Impl: windows_core::IUnknownImpl { fn GetOffset(&self) -> windows_core::Result; fn SetOffset(&self, offset: f32) -> windows_core::Result<()>; fn GetColor(&self, color: *mut XPS_COLOR) -> windows_core::Result; - fn SetColor(&self, color: *const XPS_COLOR, colorprofile: Option<&IXpsOMColorProfileResource>) -> windows_core::Result<()>; + fn SetColor(&self, color: *const XPS_COLOR, colorprofile: windows_core::Ref<'_, IXpsOMColorProfileResource>) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } impl IXpsOMGradientStop_Vtbl { @@ -3689,7 +3689,7 @@ impl IXpsOMGradientStop_Vtbl { } unsafe extern "system" fn SetColor(this: *mut core::ffi::c_void, color: *const XPS_COLOR, colorprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGradientStop_Impl::SetColor(this, core::mem::transmute_copy(&color), windows_core::from_raw_borrowed(&colorprofile)).into() + IXpsOMGradientStop_Impl::SetColor(this, core::mem::transmute_copy(&color), core::mem::transmute_copy(&colorprofile)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, gradientstop: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3762,10 +3762,10 @@ pub struct IXpsOMGradientStopCollection_Vtbl { pub trait IXpsOMGradientStopCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, stop: Option<&IXpsOMGradientStop>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, stop: windows_core::Ref<'_, IXpsOMGradientStop>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, stop: Option<&IXpsOMGradientStop>) -> windows_core::Result<()>; - fn Append(&self, stop: Option<&IXpsOMGradientStop>) -> windows_core::Result<()>; + fn SetAt(&self, index: u32, stop: windows_core::Ref<'_, IXpsOMGradientStop>) -> windows_core::Result<()>; + fn Append(&self, stop: windows_core::Ref<'_, IXpsOMGradientStop>) -> windows_core::Result<()>; } impl IXpsOMGradientStopCollection_Vtbl { pub const fn new() -> Self { @@ -3791,7 +3791,7 @@ impl IXpsOMGradientStopCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, stop: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGradientStopCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&stop)).into() + IXpsOMGradientStopCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&stop)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3799,11 +3799,11 @@ impl IXpsOMGradientStopCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, stop: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGradientStopCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&stop)).into() + IXpsOMGradientStopCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&stop)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, stop: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMGradientStopCollection_Impl::Append(this, windows_core::from_raw_borrowed(&stop)).into() + IXpsOMGradientStopCollection_Impl::Append(this, core::mem::transmute_copy(&stop)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3865,9 +3865,9 @@ pub struct IXpsOMImageBrush_Vtbl { } pub trait IXpsOMImageBrush_Impl: IXpsOMTileBrush_Impl { fn GetImageResource(&self) -> windows_core::Result; - fn SetImageResource(&self, imageresource: Option<&IXpsOMImageResource>) -> windows_core::Result<()>; + fn SetImageResource(&self, imageresource: windows_core::Ref<'_, IXpsOMImageResource>) -> windows_core::Result<()>; fn GetColorProfileResource(&self) -> windows_core::Result; - fn SetColorProfileResource(&self, colorprofileresource: Option<&IXpsOMColorProfileResource>) -> windows_core::Result<()>; + fn SetColorProfileResource(&self, colorprofileresource: windows_core::Ref<'_, IXpsOMColorProfileResource>) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } impl IXpsOMImageBrush_Vtbl { @@ -3884,7 +3884,7 @@ impl IXpsOMImageBrush_Vtbl { } unsafe extern "system" fn SetImageResource(this: *mut core::ffi::c_void, imageresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMImageBrush_Impl::SetImageResource(this, windows_core::from_raw_borrowed(&imageresource)).into() + IXpsOMImageBrush_Impl::SetImageResource(this, core::mem::transmute_copy(&imageresource)).into() } unsafe extern "system" fn GetColorProfileResource(this: *mut core::ffi::c_void, colorprofileresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3898,7 +3898,7 @@ impl IXpsOMImageBrush_Vtbl { } unsafe extern "system" fn SetColorProfileResource(this: *mut core::ffi::c_void, colorprofileresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMImageBrush_Impl::SetColorProfileResource(this, windows_core::from_raw_borrowed(&colorprofileresource)).into() + IXpsOMImageBrush_Impl::SetColorProfileResource(this, core::mem::transmute_copy(&colorprofileresource)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, imagebrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3967,7 +3967,7 @@ pub struct IXpsOMImageResource_Vtbl { #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMImageResource_Impl: IXpsOMResource_Impl { fn GetStream(&self) -> windows_core::Result; - fn SetContent(&self, sourcestream: Option<&super::super::System::Com::IStream>, imagetype: XPS_IMAGE_TYPE, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetContent(&self, sourcestream: windows_core::Ref<'_, super::super::System::Com::IStream>, imagetype: XPS_IMAGE_TYPE, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; fn GetImageType(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] @@ -3985,7 +3985,7 @@ impl IXpsOMImageResource_Vtbl { } unsafe extern "system" fn SetContent(this: *mut core::ffi::c_void, sourcestream: *mut core::ffi::c_void, imagetype: XPS_IMAGE_TYPE, partname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMImageResource_Impl::SetContent(this, windows_core::from_raw_borrowed(&sourcestream), core::mem::transmute_copy(&imagetype), windows_core::from_raw_borrowed(&partname)).into() + IXpsOMImageResource_Impl::SetContent(this, core::mem::transmute_copy(&sourcestream), core::mem::transmute_copy(&imagetype), core::mem::transmute_copy(&partname)).into() } unsafe extern "system" fn GetImageType(this: *mut core::ffi::c_void, imagetype: *mut XPS_IMAGE_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4069,11 +4069,11 @@ pub struct IXpsOMImageResourceCollection_Vtbl { pub trait IXpsOMImageResourceCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, object: Option<&IXpsOMImageResource>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, object: windows_core::Ref<'_, IXpsOMImageResource>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, object: Option<&IXpsOMImageResource>) -> windows_core::Result<()>; - fn Append(&self, object: Option<&IXpsOMImageResource>) -> windows_core::Result<()>; - fn GetByPartName(&self, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn SetAt(&self, index: u32, object: windows_core::Ref<'_, IXpsOMImageResource>) -> windows_core::Result<()>; + fn Append(&self, object: windows_core::Ref<'_, IXpsOMImageResource>) -> windows_core::Result<()>; + fn GetByPartName(&self, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMImageResourceCollection_Vtbl { @@ -4100,7 +4100,7 @@ impl IXpsOMImageResourceCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMImageResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&object)).into() + IXpsOMImageResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4108,15 +4108,15 @@ impl IXpsOMImageResourceCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMImageResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&object)).into() + IXpsOMImageResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMImageResourceCollection_Impl::Append(this, windows_core::from_raw_borrowed(&object)).into() + IXpsOMImageResourceCollection_Impl::Append(this, core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn GetByPartName(this: *mut core::ffi::c_void, partname: *mut core::ffi::c_void, part: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMImageResourceCollection_Impl::GetByPartName(this, windows_core::from_raw_borrowed(&partname)) { + match IXpsOMImageResourceCollection_Impl::GetByPartName(this, core::mem::transmute_copy(&partname)) { Ok(ok__) => { part.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4737,39 +4737,39 @@ pub struct IXpsOMObjectFactory_Vtbl { pub trait IXpsOMObjectFactory_Impl: windows_core::IUnknownImpl { fn CreatePackage(&self) -> windows_core::Result; fn CreatePackageFromFile(&self, filename: &windows_core::PCWSTR, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; - fn CreatePackageFromStream(&self, stream: Option<&super::super::System::Com::IStream>, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; - fn CreateStoryFragmentsResource(&self, acquiredstream: Option<&super::super::System::Com::IStream>, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreateDocumentStructureResource(&self, acquiredstream: Option<&super::super::System::Com::IStream>, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreateSignatureBlockResource(&self, acquiredstream: Option<&super::super::System::Com::IStream>, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreateRemoteDictionaryResource(&self, dictionary: Option<&IXpsOMDictionary>, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreateRemoteDictionaryResourceFromStream(&self, dictionarymarkupstream: Option<&super::super::System::Com::IStream>, dictionaryparturi: Option<&super::Packaging::Opc::IOpcPartUri>, resources: Option<&IXpsOMPartResources>) -> windows_core::Result; + fn CreatePackageFromStream(&self, stream: windows_core::Ref<'_, super::super::System::Com::IStream>, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; + fn CreateStoryFragmentsResource(&self, acquiredstream: windows_core::Ref<'_, super::super::System::Com::IStream>, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateDocumentStructureResource(&self, acquiredstream: windows_core::Ref<'_, super::super::System::Com::IStream>, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateSignatureBlockResource(&self, acquiredstream: windows_core::Ref<'_, super::super::System::Com::IStream>, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateRemoteDictionaryResource(&self, dictionary: windows_core::Ref<'_, IXpsOMDictionary>, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateRemoteDictionaryResourceFromStream(&self, dictionarymarkupstream: windows_core::Ref<'_, super::super::System::Com::IStream>, dictionaryparturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, resources: windows_core::Ref<'_, IXpsOMPartResources>) -> windows_core::Result; fn CreatePartResources(&self) -> windows_core::Result; - fn CreateDocumentSequence(&self, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreateDocument(&self, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateDocumentSequence(&self, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateDocument(&self, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; fn CreatePageReference(&self, advisorypagedimensions: *const XPS_SIZE) -> windows_core::Result; - fn CreatePage(&self, pagedimensions: *const XPS_SIZE, language: &windows_core::PCWSTR, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreatePageFromStream(&self, pagemarkupstream: Option<&super::super::System::Com::IStream>, parturi: Option<&super::Packaging::Opc::IOpcPartUri>, resources: Option<&IXpsOMPartResources>, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; + fn CreatePage(&self, pagedimensions: *const XPS_SIZE, language: &windows_core::PCWSTR, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreatePageFromStream(&self, pagemarkupstream: windows_core::Ref<'_, super::super::System::Com::IStream>, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, resources: windows_core::Ref<'_, IXpsOMPartResources>, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; fn CreateCanvas(&self) -> windows_core::Result; - fn CreateGlyphs(&self, fontresource: Option<&IXpsOMFontResource>) -> windows_core::Result; + fn CreateGlyphs(&self, fontresource: windows_core::Ref<'_, IXpsOMFontResource>) -> windows_core::Result; fn CreatePath(&self) -> windows_core::Result; fn CreateGeometry(&self) -> windows_core::Result; fn CreateGeometryFigure(&self, startpoint: *const XPS_POINT) -> windows_core::Result; fn CreateMatrixTransform(&self, matrix: *const XPS_MATRIX) -> windows_core::Result; - fn CreateSolidColorBrush(&self, color: *const XPS_COLOR, colorprofile: Option<&IXpsOMColorProfileResource>) -> windows_core::Result; - fn CreateColorProfileResource(&self, acquiredstream: Option<&super::super::System::Com::IStream>, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreateImageBrush(&self, image: Option<&IXpsOMImageResource>, viewbox: *const XPS_RECT, viewport: *const XPS_RECT) -> windows_core::Result; + fn CreateSolidColorBrush(&self, color: *const XPS_COLOR, colorprofile: windows_core::Ref<'_, IXpsOMColorProfileResource>) -> windows_core::Result; + fn CreateColorProfileResource(&self, acquiredstream: windows_core::Ref<'_, super::super::System::Com::IStream>, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateImageBrush(&self, image: windows_core::Ref<'_, IXpsOMImageResource>, viewbox: *const XPS_RECT, viewport: *const XPS_RECT) -> windows_core::Result; fn CreateVisualBrush(&self, viewbox: *const XPS_RECT, viewport: *const XPS_RECT) -> windows_core::Result; - fn CreateImageResource(&self, acquiredstream: Option<&super::super::System::Com::IStream>, contenttype: XPS_IMAGE_TYPE, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreatePrintTicketResource(&self, acquiredstream: Option<&super::super::System::Com::IStream>, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreateFontResource(&self, acquiredstream: Option<&super::super::System::Com::IStream>, fontembedding: XPS_FONT_EMBEDDING, parturi: Option<&super::Packaging::Opc::IOpcPartUri>, isobfsourcestream: super::super::Foundation::BOOL) -> windows_core::Result; - fn CreateGradientStop(&self, color: *const XPS_COLOR, colorprofile: Option<&IXpsOMColorProfileResource>, offset: f32) -> windows_core::Result; - fn CreateLinearGradientBrush(&self, gradstop1: Option<&IXpsOMGradientStop>, gradstop2: Option<&IXpsOMGradientStop>, startpoint: *const XPS_POINT, endpoint: *const XPS_POINT) -> windows_core::Result; - fn CreateRadialGradientBrush(&self, gradstop1: Option<&IXpsOMGradientStop>, gradstop2: Option<&IXpsOMGradientStop>, centerpoint: *const XPS_POINT, gradientorigin: *const XPS_POINT, radiisizes: *const XPS_SIZE) -> windows_core::Result; - fn CreateCoreProperties(&self, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateImageResource(&self, acquiredstream: windows_core::Ref<'_, super::super::System::Com::IStream>, contenttype: XPS_IMAGE_TYPE, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreatePrintTicketResource(&self, acquiredstream: windows_core::Ref<'_, super::super::System::Com::IStream>, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateFontResource(&self, acquiredstream: windows_core::Ref<'_, super::super::System::Com::IStream>, fontembedding: XPS_FONT_EMBEDDING, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, isobfsourcestream: super::super::Foundation::BOOL) -> windows_core::Result; + fn CreateGradientStop(&self, color: *const XPS_COLOR, colorprofile: windows_core::Ref<'_, IXpsOMColorProfileResource>, offset: f32) -> windows_core::Result; + fn CreateLinearGradientBrush(&self, gradstop1: windows_core::Ref<'_, IXpsOMGradientStop>, gradstop2: windows_core::Ref<'_, IXpsOMGradientStop>, startpoint: *const XPS_POINT, endpoint: *const XPS_POINT) -> windows_core::Result; + fn CreateRadialGradientBrush(&self, gradstop1: windows_core::Ref<'_, IXpsOMGradientStop>, gradstop2: windows_core::Ref<'_, IXpsOMGradientStop>, centerpoint: *const XPS_POINT, gradientorigin: *const XPS_POINT, radiisizes: *const XPS_SIZE) -> windows_core::Result; + fn CreateCoreProperties(&self, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; fn CreateDictionary(&self) -> windows_core::Result; fn CreatePartUriCollection(&self) -> windows_core::Result; - fn CreatePackageWriterOnFile(&self, filename: &windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: Option<&super::Packaging::Opc::IOpcPartUri>, coreproperties: Option<&IXpsOMCoreProperties>, packagethumbnail: Option<&IXpsOMImageResource>, documentsequenceprintticket: Option<&IXpsOMPrintTicketResource>, discardcontrolpartname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreatePackageWriterOnStream(&self, outputstream: Option<&super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: Option<&super::Packaging::Opc::IOpcPartUri>, coreproperties: Option<&IXpsOMCoreProperties>, packagethumbnail: Option<&IXpsOMImageResource>, documentsequenceprintticket: Option<&IXpsOMPrintTicketResource>, discardcontrolpartname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreatePackageWriterOnFile(&self, filename: &windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, coreproperties: windows_core::Ref<'_, IXpsOMCoreProperties>, packagethumbnail: windows_core::Ref<'_, IXpsOMImageResource>, documentsequenceprintticket: windows_core::Ref<'_, IXpsOMPrintTicketResource>, discardcontrolpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreatePackageWriterOnStream(&self, outputstream: windows_core::Ref<'_, super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, coreproperties: windows_core::Ref<'_, IXpsOMCoreProperties>, packagethumbnail: windows_core::Ref<'_, IXpsOMImageResource>, documentsequenceprintticket: windows_core::Ref<'_, IXpsOMPrintTicketResource>, discardcontrolpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; fn CreatePartUri(&self, uri: &windows_core::PCWSTR) -> windows_core::Result; fn CreateReadOnlyStreamOnFile(&self, filename: &windows_core::PCWSTR) -> windows_core::Result; } @@ -4798,7 +4798,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreatePackageFromStream(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, reuseobjects: super::super::Foundation::BOOL, package: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreatePackageFromStream(this, windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&reuseobjects)) { + match IXpsOMObjectFactory_Impl::CreatePackageFromStream(this, core::mem::transmute_copy(&stream), core::mem::transmute_copy(&reuseobjects)) { Ok(ok__) => { package.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4808,7 +4808,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateStoryFragmentsResource(this: *mut core::ffi::c_void, acquiredstream: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, storyfragmentsresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateStoryFragmentsResource(this, windows_core::from_raw_borrowed(&acquiredstream), windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreateStoryFragmentsResource(this, core::mem::transmute_copy(&acquiredstream), core::mem::transmute_copy(&parturi)) { Ok(ok__) => { storyfragmentsresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4818,7 +4818,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateDocumentStructureResource(this: *mut core::ffi::c_void, acquiredstream: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, documentstructureresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateDocumentStructureResource(this, windows_core::from_raw_borrowed(&acquiredstream), windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreateDocumentStructureResource(this, core::mem::transmute_copy(&acquiredstream), core::mem::transmute_copy(&parturi)) { Ok(ok__) => { documentstructureresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4828,7 +4828,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateSignatureBlockResource(this: *mut core::ffi::c_void, acquiredstream: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, signatureblockresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateSignatureBlockResource(this, windows_core::from_raw_borrowed(&acquiredstream), windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreateSignatureBlockResource(this, core::mem::transmute_copy(&acquiredstream), core::mem::transmute_copy(&parturi)) { Ok(ok__) => { signatureblockresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4838,7 +4838,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateRemoteDictionaryResource(this: *mut core::ffi::c_void, dictionary: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, remotedictionaryresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateRemoteDictionaryResource(this, windows_core::from_raw_borrowed(&dictionary), windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreateRemoteDictionaryResource(this, core::mem::transmute_copy(&dictionary), core::mem::transmute_copy(&parturi)) { Ok(ok__) => { remotedictionaryresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4848,7 +4848,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateRemoteDictionaryResourceFromStream(this: *mut core::ffi::c_void, dictionarymarkupstream: *mut core::ffi::c_void, dictionaryparturi: *mut core::ffi::c_void, resources: *mut core::ffi::c_void, dictionaryresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateRemoteDictionaryResourceFromStream(this, windows_core::from_raw_borrowed(&dictionarymarkupstream), windows_core::from_raw_borrowed(&dictionaryparturi), windows_core::from_raw_borrowed(&resources)) { + match IXpsOMObjectFactory_Impl::CreateRemoteDictionaryResourceFromStream(this, core::mem::transmute_copy(&dictionarymarkupstream), core::mem::transmute_copy(&dictionaryparturi), core::mem::transmute_copy(&resources)) { Ok(ok__) => { dictionaryresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4868,7 +4868,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateDocumentSequence(this: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, documentsequence: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateDocumentSequence(this, windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreateDocumentSequence(this, core::mem::transmute_copy(&parturi)) { Ok(ok__) => { documentsequence.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4878,7 +4878,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateDocument(this: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, document: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateDocument(this, windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreateDocument(this, core::mem::transmute_copy(&parturi)) { Ok(ok__) => { document.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4898,7 +4898,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreatePage(this: *mut core::ffi::c_void, pagedimensions: *const XPS_SIZE, language: windows_core::PCWSTR, parturi: *mut core::ffi::c_void, page: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreatePage(this, core::mem::transmute_copy(&pagedimensions), core::mem::transmute(&language), windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreatePage(this, core::mem::transmute_copy(&pagedimensions), core::mem::transmute(&language), core::mem::transmute_copy(&parturi)) { Ok(ok__) => { page.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4908,7 +4908,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreatePageFromStream(this: *mut core::ffi::c_void, pagemarkupstream: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, resources: *mut core::ffi::c_void, reuseobjects: super::super::Foundation::BOOL, page: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreatePageFromStream(this, windows_core::from_raw_borrowed(&pagemarkupstream), windows_core::from_raw_borrowed(&parturi), windows_core::from_raw_borrowed(&resources), core::mem::transmute_copy(&reuseobjects)) { + match IXpsOMObjectFactory_Impl::CreatePageFromStream(this, core::mem::transmute_copy(&pagemarkupstream), core::mem::transmute_copy(&parturi), core::mem::transmute_copy(&resources), core::mem::transmute_copy(&reuseobjects)) { Ok(ok__) => { page.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4928,7 +4928,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateGlyphs(this: *mut core::ffi::c_void, fontresource: *mut core::ffi::c_void, glyphs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateGlyphs(this, windows_core::from_raw_borrowed(&fontresource)) { + match IXpsOMObjectFactory_Impl::CreateGlyphs(this, core::mem::transmute_copy(&fontresource)) { Ok(ok__) => { glyphs.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4978,7 +4978,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateSolidColorBrush(this: *mut core::ffi::c_void, color: *const XPS_COLOR, colorprofile: *mut core::ffi::c_void, solidcolorbrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateSolidColorBrush(this, core::mem::transmute_copy(&color), windows_core::from_raw_borrowed(&colorprofile)) { + match IXpsOMObjectFactory_Impl::CreateSolidColorBrush(this, core::mem::transmute_copy(&color), core::mem::transmute_copy(&colorprofile)) { Ok(ok__) => { solidcolorbrush.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4988,7 +4988,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateColorProfileResource(this: *mut core::ffi::c_void, acquiredstream: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, colorprofileresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateColorProfileResource(this, windows_core::from_raw_borrowed(&acquiredstream), windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreateColorProfileResource(this, core::mem::transmute_copy(&acquiredstream), core::mem::transmute_copy(&parturi)) { Ok(ok__) => { colorprofileresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4998,7 +4998,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateImageBrush(this: *mut core::ffi::c_void, image: *mut core::ffi::c_void, viewbox: *const XPS_RECT, viewport: *const XPS_RECT, imagebrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateImageBrush(this, windows_core::from_raw_borrowed(&image), core::mem::transmute_copy(&viewbox), core::mem::transmute_copy(&viewport)) { + match IXpsOMObjectFactory_Impl::CreateImageBrush(this, core::mem::transmute_copy(&image), core::mem::transmute_copy(&viewbox), core::mem::transmute_copy(&viewport)) { Ok(ok__) => { imagebrush.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5018,7 +5018,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateImageResource(this: *mut core::ffi::c_void, acquiredstream: *mut core::ffi::c_void, contenttype: XPS_IMAGE_TYPE, parturi: *mut core::ffi::c_void, imageresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateImageResource(this, windows_core::from_raw_borrowed(&acquiredstream), core::mem::transmute_copy(&contenttype), windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreateImageResource(this, core::mem::transmute_copy(&acquiredstream), core::mem::transmute_copy(&contenttype), core::mem::transmute_copy(&parturi)) { Ok(ok__) => { imageresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5028,7 +5028,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreatePrintTicketResource(this: *mut core::ffi::c_void, acquiredstream: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, printticketresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreatePrintTicketResource(this, windows_core::from_raw_borrowed(&acquiredstream), windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreatePrintTicketResource(this, core::mem::transmute_copy(&acquiredstream), core::mem::transmute_copy(&parturi)) { Ok(ok__) => { printticketresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5038,7 +5038,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateFontResource(this: *mut core::ffi::c_void, acquiredstream: *mut core::ffi::c_void, fontembedding: XPS_FONT_EMBEDDING, parturi: *mut core::ffi::c_void, isobfsourcestream: super::super::Foundation::BOOL, fontresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateFontResource(this, windows_core::from_raw_borrowed(&acquiredstream), core::mem::transmute_copy(&fontembedding), windows_core::from_raw_borrowed(&parturi), core::mem::transmute_copy(&isobfsourcestream)) { + match IXpsOMObjectFactory_Impl::CreateFontResource(this, core::mem::transmute_copy(&acquiredstream), core::mem::transmute_copy(&fontembedding), core::mem::transmute_copy(&parturi), core::mem::transmute_copy(&isobfsourcestream)) { Ok(ok__) => { fontresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5048,7 +5048,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateGradientStop(this: *mut core::ffi::c_void, color: *const XPS_COLOR, colorprofile: *mut core::ffi::c_void, offset: f32, gradientstop: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateGradientStop(this, core::mem::transmute_copy(&color), windows_core::from_raw_borrowed(&colorprofile), core::mem::transmute_copy(&offset)) { + match IXpsOMObjectFactory_Impl::CreateGradientStop(this, core::mem::transmute_copy(&color), core::mem::transmute_copy(&colorprofile), core::mem::transmute_copy(&offset)) { Ok(ok__) => { gradientstop.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5058,7 +5058,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateLinearGradientBrush(this: *mut core::ffi::c_void, gradstop1: *mut core::ffi::c_void, gradstop2: *mut core::ffi::c_void, startpoint: *const XPS_POINT, endpoint: *const XPS_POINT, lineargradientbrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateLinearGradientBrush(this, windows_core::from_raw_borrowed(&gradstop1), windows_core::from_raw_borrowed(&gradstop2), core::mem::transmute_copy(&startpoint), core::mem::transmute_copy(&endpoint)) { + match IXpsOMObjectFactory_Impl::CreateLinearGradientBrush(this, core::mem::transmute_copy(&gradstop1), core::mem::transmute_copy(&gradstop2), core::mem::transmute_copy(&startpoint), core::mem::transmute_copy(&endpoint)) { Ok(ok__) => { lineargradientbrush.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5068,7 +5068,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateRadialGradientBrush(this: *mut core::ffi::c_void, gradstop1: *mut core::ffi::c_void, gradstop2: *mut core::ffi::c_void, centerpoint: *const XPS_POINT, gradientorigin: *const XPS_POINT, radiisizes: *const XPS_SIZE, radialgradientbrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateRadialGradientBrush(this, windows_core::from_raw_borrowed(&gradstop1), windows_core::from_raw_borrowed(&gradstop2), core::mem::transmute_copy(¢erpoint), core::mem::transmute_copy(&gradientorigin), core::mem::transmute_copy(&radiisizes)) { + match IXpsOMObjectFactory_Impl::CreateRadialGradientBrush(this, core::mem::transmute_copy(&gradstop1), core::mem::transmute_copy(&gradstop2), core::mem::transmute_copy(¢erpoint), core::mem::transmute_copy(&gradientorigin), core::mem::transmute_copy(&radiisizes)) { Ok(ok__) => { radialgradientbrush.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5078,7 +5078,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreateCoreProperties(this: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, coreproperties: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreateCoreProperties(this, windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory_Impl::CreateCoreProperties(this, core::mem::transmute_copy(&parturi)) { Ok(ok__) => { coreproperties.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5108,19 +5108,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreatePackageWriterOnFile(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: *mut core::ffi::c_void, coreproperties: *mut core::ffi::c_void, packagethumbnail: *mut core::ffi::c_void, documentsequenceprintticket: *mut core::ffi::c_void, discardcontrolpartname: *mut core::ffi::c_void, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreatePackageWriterOnFile( - this, - core::mem::transmute(&filename), - core::mem::transmute_copy(&securityattributes), - core::mem::transmute_copy(&flagsandattributes), - core::mem::transmute_copy(&optimizemarkupsize), - core::mem::transmute_copy(&interleaving), - windows_core::from_raw_borrowed(&documentsequencepartname), - windows_core::from_raw_borrowed(&coreproperties), - windows_core::from_raw_borrowed(&packagethumbnail), - windows_core::from_raw_borrowed(&documentsequenceprintticket), - windows_core::from_raw_borrowed(&discardcontrolpartname), - ) { + match IXpsOMObjectFactory_Impl::CreatePackageWriterOnFile(this, core::mem::transmute(&filename), core::mem::transmute_copy(&securityattributes), core::mem::transmute_copy(&flagsandattributes), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&interleaving), core::mem::transmute_copy(&documentsequencepartname), core::mem::transmute_copy(&coreproperties), core::mem::transmute_copy(&packagethumbnail), core::mem::transmute_copy(&documentsequenceprintticket), core::mem::transmute_copy(&discardcontrolpartname)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5130,7 +5118,7 @@ impl IXpsOMObjectFactory_Vtbl { } unsafe extern "system" fn CreatePackageWriterOnStream(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: *mut core::ffi::c_void, coreproperties: *mut core::ffi::c_void, packagethumbnail: *mut core::ffi::c_void, documentsequenceprintticket: *mut core::ffi::c_void, discardcontrolpartname: *mut core::ffi::c_void, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory_Impl::CreatePackageWriterOnStream(this, windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&interleaving), windows_core::from_raw_borrowed(&documentsequencepartname), windows_core::from_raw_borrowed(&coreproperties), windows_core::from_raw_borrowed(&packagethumbnail), windows_core::from_raw_borrowed(&documentsequenceprintticket), windows_core::from_raw_borrowed(&discardcontrolpartname)) { + match IXpsOMObjectFactory_Impl::CreatePackageWriterOnStream(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&interleaving), core::mem::transmute_copy(&documentsequencepartname), core::mem::transmute_copy(&coreproperties), core::mem::transmute_copy(&packagethumbnail), core::mem::transmute_copy(&documentsequenceprintticket), core::mem::transmute_copy(&discardcontrolpartname)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5356,17 +5344,17 @@ pub struct IXpsOMObjectFactory1_Vtbl { #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMObjectFactory1_Impl: IXpsOMObjectFactory_Impl { fn GetDocumentTypeFromFile(&self, filename: &windows_core::PCWSTR) -> windows_core::Result; - fn GetDocumentTypeFromStream(&self, xpsdocumentstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; - fn ConvertHDPhotoToJpegXR(&self, imageresource: Option<&IXpsOMImageResource>) -> windows_core::Result<()>; - fn ConvertJpegXRToHDPhoto(&self, imageresource: Option<&IXpsOMImageResource>) -> windows_core::Result<()>; - fn CreatePackageWriterOnFile1(&self, filename: &windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: Option<&super::Packaging::Opc::IOpcPartUri>, coreproperties: Option<&IXpsOMCoreProperties>, packagethumbnail: Option<&IXpsOMImageResource>, documentsequenceprintticket: Option<&IXpsOMPrintTicketResource>, discardcontrolpartname: Option<&super::Packaging::Opc::IOpcPartUri>, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result; - fn CreatePackageWriterOnStream1(&self, outputstream: Option<&super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: Option<&super::Packaging::Opc::IOpcPartUri>, coreproperties: Option<&IXpsOMCoreProperties>, packagethumbnail: Option<&IXpsOMImageResource>, documentsequenceprintticket: Option<&IXpsOMPrintTicketResource>, discardcontrolpartname: Option<&super::Packaging::Opc::IOpcPartUri>, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result; + fn GetDocumentTypeFromStream(&self, xpsdocumentstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; + fn ConvertHDPhotoToJpegXR(&self, imageresource: windows_core::Ref<'_, IXpsOMImageResource>) -> windows_core::Result<()>; + fn ConvertJpegXRToHDPhoto(&self, imageresource: windows_core::Ref<'_, IXpsOMImageResource>) -> windows_core::Result<()>; + fn CreatePackageWriterOnFile1(&self, filename: &windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, coreproperties: windows_core::Ref<'_, IXpsOMCoreProperties>, packagethumbnail: windows_core::Ref<'_, IXpsOMImageResource>, documentsequenceprintticket: windows_core::Ref<'_, IXpsOMPrintTicketResource>, discardcontrolpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result; + fn CreatePackageWriterOnStream1(&self, outputstream: windows_core::Ref<'_, super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, coreproperties: windows_core::Ref<'_, IXpsOMCoreProperties>, packagethumbnail: windows_core::Ref<'_, IXpsOMImageResource>, documentsequenceprintticket: windows_core::Ref<'_, IXpsOMPrintTicketResource>, discardcontrolpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result; fn CreatePackage1(&self) -> windows_core::Result; - fn CreatePackageFromStream1(&self, stream: Option<&super::super::System::Com::IStream>, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; + fn CreatePackageFromStream1(&self, stream: windows_core::Ref<'_, super::super::System::Com::IStream>, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; fn CreatePackageFromFile1(&self, filename: &windows_core::PCWSTR, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; - fn CreatePage1(&self, pagedimensions: *const XPS_SIZE, language: &windows_core::PCWSTR, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; - fn CreatePageFromStream1(&self, pagemarkupstream: Option<&super::super::System::Com::IStream>, parturi: Option<&super::Packaging::Opc::IOpcPartUri>, resources: Option<&IXpsOMPartResources>, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; - fn CreateRemoteDictionaryResourceFromStream1(&self, dictionarymarkupstream: Option<&super::super::System::Com::IStream>, parturi: Option<&super::Packaging::Opc::IOpcPartUri>, resources: Option<&IXpsOMPartResources>) -> windows_core::Result; + fn CreatePage1(&self, pagedimensions: *const XPS_SIZE, language: &windows_core::PCWSTR, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreatePageFromStream1(&self, pagemarkupstream: windows_core::Ref<'_, super::super::System::Com::IStream>, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, resources: windows_core::Ref<'_, IXpsOMPartResources>, reuseobjects: super::super::Foundation::BOOL) -> windows_core::Result; + fn CreateRemoteDictionaryResourceFromStream1(&self, dictionarymarkupstream: windows_core::Ref<'_, super::super::System::Com::IStream>, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, resources: windows_core::Ref<'_, IXpsOMPartResources>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMObjectFactory1_Vtbl { @@ -5383,7 +5371,7 @@ impl IXpsOMObjectFactory1_Vtbl { } unsafe extern "system" fn GetDocumentTypeFromStream(this: *mut core::ffi::c_void, xpsdocumentstream: *mut core::ffi::c_void, documenttype: *mut XPS_DOCUMENT_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory1_Impl::GetDocumentTypeFromStream(this, windows_core::from_raw_borrowed(&xpsdocumentstream)) { + match IXpsOMObjectFactory1_Impl::GetDocumentTypeFromStream(this, core::mem::transmute_copy(&xpsdocumentstream)) { Ok(ok__) => { documenttype.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5393,11 +5381,11 @@ impl IXpsOMObjectFactory1_Vtbl { } unsafe extern "system" fn ConvertHDPhotoToJpegXR(this: *mut core::ffi::c_void, imageresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMObjectFactory1_Impl::ConvertHDPhotoToJpegXR(this, windows_core::from_raw_borrowed(&imageresource)).into() + IXpsOMObjectFactory1_Impl::ConvertHDPhotoToJpegXR(this, core::mem::transmute_copy(&imageresource)).into() } unsafe extern "system" fn ConvertJpegXRToHDPhoto(this: *mut core::ffi::c_void, imageresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMObjectFactory1_Impl::ConvertJpegXRToHDPhoto(this, windows_core::from_raw_borrowed(&imageresource)).into() + IXpsOMObjectFactory1_Impl::ConvertJpegXRToHDPhoto(this, core::mem::transmute_copy(&imageresource)).into() } unsafe extern "system" fn CreatePackageWriterOnFile1(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: *mut core::ffi::c_void, coreproperties: *mut core::ffi::c_void, packagethumbnail: *mut core::ffi::c_void, documentsequenceprintticket: *mut core::ffi::c_void, discardcontrolpartname: *mut core::ffi::c_void, documenttype: XPS_DOCUMENT_TYPE, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5408,11 +5396,11 @@ impl IXpsOMObjectFactory1_Vtbl { core::mem::transmute_copy(&flagsandattributes), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&interleaving), - windows_core::from_raw_borrowed(&documentsequencepartname), - windows_core::from_raw_borrowed(&coreproperties), - windows_core::from_raw_borrowed(&packagethumbnail), - windows_core::from_raw_borrowed(&documentsequenceprintticket), - windows_core::from_raw_borrowed(&discardcontrolpartname), + core::mem::transmute_copy(&documentsequencepartname), + core::mem::transmute_copy(&coreproperties), + core::mem::transmute_copy(&packagethumbnail), + core::mem::transmute_copy(&documentsequenceprintticket), + core::mem::transmute_copy(&discardcontrolpartname), core::mem::transmute_copy(&documenttype), ) { Ok(ok__) => { @@ -5424,7 +5412,7 @@ impl IXpsOMObjectFactory1_Vtbl { } unsafe extern "system" fn CreatePackageWriterOnStream1(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, optimizemarkupsize: super::super::Foundation::BOOL, interleaving: XPS_INTERLEAVING, documentsequencepartname: *mut core::ffi::c_void, coreproperties: *mut core::ffi::c_void, packagethumbnail: *mut core::ffi::c_void, documentsequenceprintticket: *mut core::ffi::c_void, discardcontrolpartname: *mut core::ffi::c_void, documenttype: XPS_DOCUMENT_TYPE, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory1_Impl::CreatePackageWriterOnStream1(this, windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&interleaving), windows_core::from_raw_borrowed(&documentsequencepartname), windows_core::from_raw_borrowed(&coreproperties), windows_core::from_raw_borrowed(&packagethumbnail), windows_core::from_raw_borrowed(&documentsequenceprintticket), windows_core::from_raw_borrowed(&discardcontrolpartname), core::mem::transmute_copy(&documenttype)) { + match IXpsOMObjectFactory1_Impl::CreatePackageWriterOnStream1(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&interleaving), core::mem::transmute_copy(&documentsequencepartname), core::mem::transmute_copy(&coreproperties), core::mem::transmute_copy(&packagethumbnail), core::mem::transmute_copy(&documentsequenceprintticket), core::mem::transmute_copy(&discardcontrolpartname), core::mem::transmute_copy(&documenttype)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5444,7 +5432,7 @@ impl IXpsOMObjectFactory1_Vtbl { } unsafe extern "system" fn CreatePackageFromStream1(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, reuseobjects: super::super::Foundation::BOOL, package: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory1_Impl::CreatePackageFromStream1(this, windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&reuseobjects)) { + match IXpsOMObjectFactory1_Impl::CreatePackageFromStream1(this, core::mem::transmute_copy(&stream), core::mem::transmute_copy(&reuseobjects)) { Ok(ok__) => { package.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5464,7 +5452,7 @@ impl IXpsOMObjectFactory1_Vtbl { } unsafe extern "system" fn CreatePage1(this: *mut core::ffi::c_void, pagedimensions: *const XPS_SIZE, language: windows_core::PCWSTR, parturi: *mut core::ffi::c_void, page: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory1_Impl::CreatePage1(this, core::mem::transmute_copy(&pagedimensions), core::mem::transmute(&language), windows_core::from_raw_borrowed(&parturi)) { + match IXpsOMObjectFactory1_Impl::CreatePage1(this, core::mem::transmute_copy(&pagedimensions), core::mem::transmute(&language), core::mem::transmute_copy(&parturi)) { Ok(ok__) => { page.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5474,7 +5462,7 @@ impl IXpsOMObjectFactory1_Vtbl { } unsafe extern "system" fn CreatePageFromStream1(this: *mut core::ffi::c_void, pagemarkupstream: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, resources: *mut core::ffi::c_void, reuseobjects: super::super::Foundation::BOOL, page: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory1_Impl::CreatePageFromStream1(this, windows_core::from_raw_borrowed(&pagemarkupstream), windows_core::from_raw_borrowed(&parturi), windows_core::from_raw_borrowed(&resources), core::mem::transmute_copy(&reuseobjects)) { + match IXpsOMObjectFactory1_Impl::CreatePageFromStream1(this, core::mem::transmute_copy(&pagemarkupstream), core::mem::transmute_copy(&parturi), core::mem::transmute_copy(&resources), core::mem::transmute_copy(&reuseobjects)) { Ok(ok__) => { page.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5484,7 +5472,7 @@ impl IXpsOMObjectFactory1_Vtbl { } unsafe extern "system" fn CreateRemoteDictionaryResourceFromStream1(this: *mut core::ffi::c_void, dictionarymarkupstream: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void, resources: *mut core::ffi::c_void, dictionaryresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMObjectFactory1_Impl::CreateRemoteDictionaryResourceFromStream1(this, windows_core::from_raw_borrowed(&dictionarymarkupstream), windows_core::from_raw_borrowed(&parturi), windows_core::from_raw_borrowed(&resources)) { + match IXpsOMObjectFactory1_Impl::CreateRemoteDictionaryResourceFromStream1(this, core::mem::transmute_copy(&dictionarymarkupstream), core::mem::transmute_copy(&parturi), core::mem::transmute_copy(&resources)) { Ok(ok__) => { dictionaryresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5603,15 +5591,15 @@ pub struct IXpsOMPackage_Vtbl { #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMPackage_Impl: windows_core::IUnknownImpl { fn GetDocumentSequence(&self) -> windows_core::Result; - fn SetDocumentSequence(&self, documentsequence: Option<&IXpsOMDocumentSequence>) -> windows_core::Result<()>; + fn SetDocumentSequence(&self, documentsequence: windows_core::Ref<'_, IXpsOMDocumentSequence>) -> windows_core::Result<()>; fn GetCoreProperties(&self) -> windows_core::Result; - fn SetCoreProperties(&self, coreproperties: Option<&IXpsOMCoreProperties>) -> windows_core::Result<()>; + fn SetCoreProperties(&self, coreproperties: windows_core::Ref<'_, IXpsOMCoreProperties>) -> windows_core::Result<()>; fn GetDiscardControlPartName(&self) -> windows_core::Result; - fn SetDiscardControlPartName(&self, discardcontrolparturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetDiscardControlPartName(&self, discardcontrolparturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; fn GetThumbnailResource(&self) -> windows_core::Result; - fn SetThumbnailResource(&self, imageresource: Option<&IXpsOMImageResource>) -> windows_core::Result<()>; + fn SetThumbnailResource(&self, imageresource: windows_core::Ref<'_, IXpsOMImageResource>) -> windows_core::Result<()>; fn WriteToFile(&self, filename: &windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn WriteToStream(&self, stream: Option<&super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn WriteToStream(&self, stream: windows_core::Ref<'_, super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMPackage_Vtbl { @@ -5628,7 +5616,7 @@ impl IXpsOMPackage_Vtbl { } unsafe extern "system" fn SetDocumentSequence(this: *mut core::ffi::c_void, documentsequence: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackage_Impl::SetDocumentSequence(this, windows_core::from_raw_borrowed(&documentsequence)).into() + IXpsOMPackage_Impl::SetDocumentSequence(this, core::mem::transmute_copy(&documentsequence)).into() } unsafe extern "system" fn GetCoreProperties(this: *mut core::ffi::c_void, coreproperties: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5642,7 +5630,7 @@ impl IXpsOMPackage_Vtbl { } unsafe extern "system" fn SetCoreProperties(this: *mut core::ffi::c_void, coreproperties: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackage_Impl::SetCoreProperties(this, windows_core::from_raw_borrowed(&coreproperties)).into() + IXpsOMPackage_Impl::SetCoreProperties(this, core::mem::transmute_copy(&coreproperties)).into() } unsafe extern "system" fn GetDiscardControlPartName(this: *mut core::ffi::c_void, discardcontrolparturi: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5656,7 +5644,7 @@ impl IXpsOMPackage_Vtbl { } unsafe extern "system" fn SetDiscardControlPartName(this: *mut core::ffi::c_void, discardcontrolparturi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackage_Impl::SetDiscardControlPartName(this, windows_core::from_raw_borrowed(&discardcontrolparturi)).into() + IXpsOMPackage_Impl::SetDiscardControlPartName(this, core::mem::transmute_copy(&discardcontrolparturi)).into() } unsafe extern "system" fn GetThumbnailResource(this: *mut core::ffi::c_void, imageresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5670,7 +5658,7 @@ impl IXpsOMPackage_Vtbl { } unsafe extern "system" fn SetThumbnailResource(this: *mut core::ffi::c_void, imageresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackage_Impl::SetThumbnailResource(this, windows_core::from_raw_borrowed(&imageresource)).into() + IXpsOMPackage_Impl::SetThumbnailResource(this, core::mem::transmute_copy(&imageresource)).into() } unsafe extern "system" fn WriteToFile(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5678,7 +5666,7 @@ impl IXpsOMPackage_Vtbl { } unsafe extern "system" fn WriteToStream(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, optimizemarkupsize: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackage_Impl::WriteToStream(this, windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&optimizemarkupsize)).into() + IXpsOMPackage_Impl::WriteToStream(this, core::mem::transmute_copy(&stream), core::mem::transmute_copy(&optimizemarkupsize)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5745,7 +5733,7 @@ pub struct IXpsOMPackage1_Vtbl { pub trait IXpsOMPackage1_Impl: IXpsOMPackage_Impl { fn GetDocumentType(&self) -> windows_core::Result; fn WriteToFile1(&self, filename: &windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32, optimizemarkupsize: super::super::Foundation::BOOL, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()>; - fn WriteToStream1(&self, outputstream: Option<&super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()>; + fn WriteToStream1(&self, outputstream: windows_core::Ref<'_, super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMPackage1_Vtbl { @@ -5766,7 +5754,7 @@ impl IXpsOMPackage1_Vtbl { } unsafe extern "system" fn WriteToStream1(this: *mut core::ffi::c_void, outputstream: *mut core::ffi::c_void, optimizemarkupsize: super::super::Foundation::BOOL, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackage1_Impl::WriteToStream1(this, windows_core::from_raw_borrowed(&outputstream), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&documenttype)).into() + IXpsOMPackage1_Impl::WriteToStream1(this, core::mem::transmute_copy(&outputstream), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&documenttype)).into() } Self { base__: IXpsOMPackage_Vtbl::new::(), @@ -5805,14 +5793,14 @@ pub struct IXpsOMPackageTarget_Vtbl { } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMPackageTarget_Impl: windows_core::IUnknownImpl { - fn CreateXpsOMPackageWriter(&self, documentsequencepartname: Option<&super::Packaging::Opc::IOpcPartUri>, documentsequenceprintticket: Option<&IXpsOMPrintTicketResource>, discardcontrolpartname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn CreateXpsOMPackageWriter(&self, documentsequencepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, documentsequenceprintticket: windows_core::Ref<'_, IXpsOMPrintTicketResource>, discardcontrolpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMPackageTarget_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateXpsOMPackageWriter(this: *mut core::ffi::c_void, documentsequencepartname: *mut core::ffi::c_void, documentsequenceprintticket: *mut core::ffi::c_void, discardcontrolpartname: *mut core::ffi::c_void, packagewriter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMPackageTarget_Impl::CreateXpsOMPackageWriter(this, windows_core::from_raw_borrowed(&documentsequencepartname), windows_core::from_raw_borrowed(&documentsequenceprintticket), windows_core::from_raw_borrowed(&discardcontrolpartname)) { + match IXpsOMPackageTarget_Impl::CreateXpsOMPackageWriter(this, core::mem::transmute_copy(&documentsequencepartname), core::mem::transmute_copy(&documentsequenceprintticket), core::mem::transmute_copy(&discardcontrolpartname)) { Ok(ok__) => { packagewriter.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5880,9 +5868,9 @@ pub struct IXpsOMPackageWriter_Vtbl { } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMPackageWriter_Impl: windows_core::IUnknownImpl { - fn StartNewDocument(&self, documentpartname: Option<&super::Packaging::Opc::IOpcPartUri>, documentprintticket: Option<&IXpsOMPrintTicketResource>, documentstructure: Option<&IXpsOMDocumentStructureResource>, signatureblockresources: Option<&IXpsOMSignatureBlockResourceCollection>, restrictedfonts: Option<&IXpsOMPartUriCollection>) -> windows_core::Result<()>; - fn AddPage(&self, page: Option<&IXpsOMPage>, advisorypagedimensions: *const XPS_SIZE, discardableresourceparts: Option<&IXpsOMPartUriCollection>, storyfragments: Option<&IXpsOMStoryFragmentsResource>, pageprintticket: Option<&IXpsOMPrintTicketResource>, pagethumbnail: Option<&IXpsOMImageResource>) -> windows_core::Result<()>; - fn AddResource(&self, resource: Option<&IXpsOMResource>) -> windows_core::Result<()>; + fn StartNewDocument(&self, documentpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, documentprintticket: windows_core::Ref<'_, IXpsOMPrintTicketResource>, documentstructure: windows_core::Ref<'_, IXpsOMDocumentStructureResource>, signatureblockresources: windows_core::Ref<'_, IXpsOMSignatureBlockResourceCollection>, restrictedfonts: windows_core::Ref<'_, IXpsOMPartUriCollection>) -> windows_core::Result<()>; + fn AddPage(&self, page: windows_core::Ref<'_, IXpsOMPage>, advisorypagedimensions: *const XPS_SIZE, discardableresourceparts: windows_core::Ref<'_, IXpsOMPartUriCollection>, storyfragments: windows_core::Ref<'_, IXpsOMStoryFragmentsResource>, pageprintticket: windows_core::Ref<'_, IXpsOMPrintTicketResource>, pagethumbnail: windows_core::Ref<'_, IXpsOMImageResource>) -> windows_core::Result<()>; + fn AddResource(&self, resource: windows_core::Ref<'_, IXpsOMResource>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; fn IsClosed(&self) -> windows_core::Result; } @@ -5891,15 +5879,15 @@ impl IXpsOMPackageWriter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartNewDocument(this: *mut core::ffi::c_void, documentpartname: *mut core::ffi::c_void, documentprintticket: *mut core::ffi::c_void, documentstructure: *mut core::ffi::c_void, signatureblockresources: *mut core::ffi::c_void, restrictedfonts: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackageWriter_Impl::StartNewDocument(this, windows_core::from_raw_borrowed(&documentpartname), windows_core::from_raw_borrowed(&documentprintticket), windows_core::from_raw_borrowed(&documentstructure), windows_core::from_raw_borrowed(&signatureblockresources), windows_core::from_raw_borrowed(&restrictedfonts)).into() + IXpsOMPackageWriter_Impl::StartNewDocument(this, core::mem::transmute_copy(&documentpartname), core::mem::transmute_copy(&documentprintticket), core::mem::transmute_copy(&documentstructure), core::mem::transmute_copy(&signatureblockresources), core::mem::transmute_copy(&restrictedfonts)).into() } unsafe extern "system" fn AddPage(this: *mut core::ffi::c_void, page: *mut core::ffi::c_void, advisorypagedimensions: *const XPS_SIZE, discardableresourceparts: *mut core::ffi::c_void, storyfragments: *mut core::ffi::c_void, pageprintticket: *mut core::ffi::c_void, pagethumbnail: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackageWriter_Impl::AddPage(this, windows_core::from_raw_borrowed(&page), core::mem::transmute_copy(&advisorypagedimensions), windows_core::from_raw_borrowed(&discardableresourceparts), windows_core::from_raw_borrowed(&storyfragments), windows_core::from_raw_borrowed(&pageprintticket), windows_core::from_raw_borrowed(&pagethumbnail)).into() + IXpsOMPackageWriter_Impl::AddPage(this, core::mem::transmute_copy(&page), core::mem::transmute_copy(&advisorypagedimensions), core::mem::transmute_copy(&discardableresourceparts), core::mem::transmute_copy(&storyfragments), core::mem::transmute_copy(&pageprintticket), core::mem::transmute_copy(&pagethumbnail)).into() } unsafe extern "system" fn AddResource(this: *mut core::ffi::c_void, resource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackageWriter_Impl::AddResource(this, windows_core::from_raw_borrowed(&resource)).into() + IXpsOMPackageWriter_Impl::AddResource(this, core::mem::transmute_copy(&resource)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5970,19 +5958,19 @@ pub struct IXpsOMPackageWriter3D_Vtbl { } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMPackageWriter3D_Impl: IXpsOMPackageWriter_Impl { - fn AddModelTexture(&self, texturepartname: Option<&super::Packaging::Opc::IOpcPartUri>, texturedata: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn SetModelPrintTicket(&self, printticketpartname: Option<&super::Packaging::Opc::IOpcPartUri>, printticketdata: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn AddModelTexture(&self, texturepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, texturedata: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SetModelPrintTicket(&self, printticketpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, printticketdata: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMPackageWriter3D_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddModelTexture(this: *mut core::ffi::c_void, texturepartname: *mut core::ffi::c_void, texturedata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackageWriter3D_Impl::AddModelTexture(this, windows_core::from_raw_borrowed(&texturepartname), windows_core::from_raw_borrowed(&texturedata)).into() + IXpsOMPackageWriter3D_Impl::AddModelTexture(this, core::mem::transmute_copy(&texturepartname), core::mem::transmute_copy(&texturedata)).into() } unsafe extern "system" fn SetModelPrintTicket(this: *mut core::ffi::c_void, printticketpartname: *mut core::ffi::c_void, printticketdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPackageWriter3D_Impl::SetModelPrintTicket(this, windows_core::from_raw_borrowed(&printticketpartname), windows_core::from_raw_borrowed(&printticketdata)).into() + IXpsOMPackageWriter3D_Impl::SetModelPrintTicket(this, core::mem::transmute_copy(&printticketpartname), core::mem::transmute_copy(&printticketdata)).into() } Self { base__: IXpsOMPackageWriter_Vtbl::new::(), @@ -6148,10 +6136,10 @@ pub trait IXpsOMPage_Impl: IXpsOMPart_Impl { fn SetIsHyperlinkTarget(&self, ishyperlinktarget: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetDictionary(&self) -> windows_core::Result; fn GetDictionaryLocal(&self) -> windows_core::Result; - fn SetDictionaryLocal(&self, resourcedictionary: Option<&IXpsOMDictionary>) -> windows_core::Result<()>; + fn SetDictionaryLocal(&self, resourcedictionary: windows_core::Ref<'_, IXpsOMDictionary>) -> windows_core::Result<()>; fn GetDictionaryResource(&self) -> windows_core::Result; - fn SetDictionaryResource(&self, remotedictionaryresource: Option<&IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; - fn Write(&self, stream: Option<&super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetDictionaryResource(&self, remotedictionaryresource: windows_core::Ref<'_, IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; + fn Write(&self, stream: windows_core::Ref<'_, super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GenerateUnusedLookupKey(&self, r#type: XPS_OBJECT_TYPE) -> windows_core::Result; fn Clone(&self) -> windows_core::Result; } @@ -6284,7 +6272,7 @@ impl IXpsOMPage_Vtbl { } unsafe extern "system" fn SetDictionaryLocal(this: *mut core::ffi::c_void, resourcedictionary: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPage_Impl::SetDictionaryLocal(this, windows_core::from_raw_borrowed(&resourcedictionary)).into() + IXpsOMPage_Impl::SetDictionaryLocal(this, core::mem::transmute_copy(&resourcedictionary)).into() } unsafe extern "system" fn GetDictionaryResource(this: *mut core::ffi::c_void, remotedictionaryresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6298,11 +6286,11 @@ impl IXpsOMPage_Vtbl { } unsafe extern "system" fn SetDictionaryResource(this: *mut core::ffi::c_void, remotedictionaryresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPage_Impl::SetDictionaryResource(this, windows_core::from_raw_borrowed(&remotedictionaryresource)).into() + IXpsOMPage_Impl::SetDictionaryResource(this, core::mem::transmute_copy(&remotedictionaryresource)).into() } unsafe extern "system" fn Write(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, optimizemarkupsize: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPage_Impl::Write(this, windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&optimizemarkupsize)).into() + IXpsOMPage_Impl::Write(this, core::mem::transmute_copy(&stream), core::mem::transmute_copy(&optimizemarkupsize)).into() } unsafe extern "system" fn GenerateUnusedLookupKey(this: *mut core::ffi::c_void, r#type: XPS_OBJECT_TYPE, key: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6389,7 +6377,7 @@ pub struct IXpsOMPage1_Vtbl { #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMPage1_Impl: IXpsOMPage_Impl { fn GetDocumentType(&self) -> windows_core::Result; - fn Write1(&self, stream: Option<&super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()>; + fn Write1(&self, stream: windows_core::Ref<'_, super::super::System::Com::ISequentialStream>, optimizemarkupsize: super::super::Foundation::BOOL, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMPage1_Vtbl { @@ -6406,7 +6394,7 @@ impl IXpsOMPage1_Vtbl { } unsafe extern "system" fn Write1(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, optimizemarkupsize: super::super::Foundation::BOOL, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPage1_Impl::Write1(this, windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&documenttype)).into() + IXpsOMPage1_Impl::Write1(this, core::mem::transmute_copy(&stream), core::mem::transmute_copy(&optimizemarkupsize), core::mem::transmute_copy(&documenttype)).into() } Self { base__: IXpsOMPage_Vtbl::new::(), GetDocumentType: GetDocumentType::, Write1: Write1:: } } @@ -6518,17 +6506,17 @@ pub struct IXpsOMPageReference_Vtbl { pub trait IXpsOMPageReference_Impl: windows_core::IUnknownImpl { fn GetOwner(&self) -> windows_core::Result; fn GetPage(&self) -> windows_core::Result; - fn SetPage(&self, page: Option<&IXpsOMPage>) -> windows_core::Result<()>; + fn SetPage(&self, page: windows_core::Ref<'_, IXpsOMPage>) -> windows_core::Result<()>; fn DiscardPage(&self) -> windows_core::Result<()>; fn IsPageLoaded(&self) -> windows_core::Result; fn GetAdvisoryPageDimensions(&self) -> windows_core::Result; fn SetAdvisoryPageDimensions(&self, pagedimensions: *const XPS_SIZE) -> windows_core::Result<()>; fn GetStoryFragmentsResource(&self) -> windows_core::Result; - fn SetStoryFragmentsResource(&self, storyfragmentsresource: Option<&IXpsOMStoryFragmentsResource>) -> windows_core::Result<()>; + fn SetStoryFragmentsResource(&self, storyfragmentsresource: windows_core::Ref<'_, IXpsOMStoryFragmentsResource>) -> windows_core::Result<()>; fn GetPrintTicketResource(&self) -> windows_core::Result; - fn SetPrintTicketResource(&self, printticketresource: Option<&IXpsOMPrintTicketResource>) -> windows_core::Result<()>; + fn SetPrintTicketResource(&self, printticketresource: windows_core::Ref<'_, IXpsOMPrintTicketResource>) -> windows_core::Result<()>; fn GetThumbnailResource(&self) -> windows_core::Result; - fn SetThumbnailResource(&self, imageresource: Option<&IXpsOMImageResource>) -> windows_core::Result<()>; + fn SetThumbnailResource(&self, imageresource: windows_core::Ref<'_, IXpsOMImageResource>) -> windows_core::Result<()>; fn CollectLinkTargets(&self) -> windows_core::Result; fn CollectPartResources(&self) -> windows_core::Result; fn HasRestrictedFonts(&self) -> windows_core::Result; @@ -6558,7 +6546,7 @@ impl IXpsOMPageReference_Vtbl { } unsafe extern "system" fn SetPage(this: *mut core::ffi::c_void, page: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPageReference_Impl::SetPage(this, windows_core::from_raw_borrowed(&page)).into() + IXpsOMPageReference_Impl::SetPage(this, core::mem::transmute_copy(&page)).into() } unsafe extern "system" fn DiscardPage(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6600,7 +6588,7 @@ impl IXpsOMPageReference_Vtbl { } unsafe extern "system" fn SetStoryFragmentsResource(this: *mut core::ffi::c_void, storyfragmentsresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPageReference_Impl::SetStoryFragmentsResource(this, windows_core::from_raw_borrowed(&storyfragmentsresource)).into() + IXpsOMPageReference_Impl::SetStoryFragmentsResource(this, core::mem::transmute_copy(&storyfragmentsresource)).into() } unsafe extern "system" fn GetPrintTicketResource(this: *mut core::ffi::c_void, printticketresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6614,7 +6602,7 @@ impl IXpsOMPageReference_Vtbl { } unsafe extern "system" fn SetPrintTicketResource(this: *mut core::ffi::c_void, printticketresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPageReference_Impl::SetPrintTicketResource(this, windows_core::from_raw_borrowed(&printticketresource)).into() + IXpsOMPageReference_Impl::SetPrintTicketResource(this, core::mem::transmute_copy(&printticketresource)).into() } unsafe extern "system" fn GetThumbnailResource(this: *mut core::ffi::c_void, imageresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6628,7 +6616,7 @@ impl IXpsOMPageReference_Vtbl { } unsafe extern "system" fn SetThumbnailResource(this: *mut core::ffi::c_void, imageresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPageReference_Impl::SetThumbnailResource(this, windows_core::from_raw_borrowed(&imageresource)).into() + IXpsOMPageReference_Impl::SetThumbnailResource(this, core::mem::transmute_copy(&imageresource)).into() } unsafe extern "system" fn CollectLinkTargets(this: *mut core::ffi::c_void, linktargets: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6742,10 +6730,10 @@ pub struct IXpsOMPageReferenceCollection_Vtbl { pub trait IXpsOMPageReferenceCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, pagereference: Option<&IXpsOMPageReference>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, pagereference: windows_core::Ref<'_, IXpsOMPageReference>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, pagereference: Option<&IXpsOMPageReference>) -> windows_core::Result<()>; - fn Append(&self, pagereference: Option<&IXpsOMPageReference>) -> windows_core::Result<()>; + fn SetAt(&self, index: u32, pagereference: windows_core::Ref<'_, IXpsOMPageReference>) -> windows_core::Result<()>; + fn Append(&self, pagereference: windows_core::Ref<'_, IXpsOMPageReference>) -> windows_core::Result<()>; } impl IXpsOMPageReferenceCollection_Vtbl { pub const fn new() -> Self { @@ -6771,7 +6759,7 @@ impl IXpsOMPageReferenceCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, pagereference: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPageReferenceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&pagereference)).into() + IXpsOMPageReferenceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&pagereference)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6779,11 +6767,11 @@ impl IXpsOMPageReferenceCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, pagereference: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPageReferenceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&pagereference)).into() + IXpsOMPageReferenceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&pagereference)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, pagereference: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPageReferenceCollection_Impl::Append(this, windows_core::from_raw_borrowed(&pagereference)).into() + IXpsOMPageReferenceCollection_Impl::Append(this, core::mem::transmute_copy(&pagereference)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6831,7 +6819,7 @@ pub struct IXpsOMPart_Vtbl { #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMPart_Impl: windows_core::IUnknownImpl { fn GetPartName(&self) -> windows_core::Result; - fn SetPartName(&self, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetPartName(&self, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMPart_Vtbl { @@ -6848,7 +6836,7 @@ impl IXpsOMPart_Vtbl { } unsafe extern "system" fn SetPartName(this: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPart_Impl::SetPartName(this, windows_core::from_raw_borrowed(&parturi)).into() + IXpsOMPart_Impl::SetPartName(this, core::mem::transmute_copy(&parturi)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7014,10 +7002,10 @@ pub struct IXpsOMPartUriCollection_Vtbl { pub trait IXpsOMPartUriCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; - fn Append(&self, parturi: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetAt(&self, index: u32, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn Append(&self, parturi: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMPartUriCollection_Vtbl { @@ -7044,7 +7032,7 @@ impl IXpsOMPartUriCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, parturi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPartUriCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&parturi)).into() + IXpsOMPartUriCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&parturi)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7052,11 +7040,11 @@ impl IXpsOMPartUriCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, parturi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPartUriCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&parturi)).into() + IXpsOMPartUriCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&parturi)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, parturi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPartUriCollection_Impl::Append(this, windows_core::from_raw_borrowed(&parturi)).into() + IXpsOMPartUriCollection_Impl::Append(this, core::mem::transmute_copy(&parturi)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7285,7 +7273,7 @@ pub struct IXpsOMPath_Vtbl { pub trait IXpsOMPath_Impl: IXpsOMVisual_Impl { fn GetGeometry(&self) -> windows_core::Result; fn GetGeometryLocal(&self) -> windows_core::Result; - fn SetGeometryLocal(&self, geometry: Option<&IXpsOMGeometry>) -> windows_core::Result<()>; + fn SetGeometryLocal(&self, geometry: windows_core::Ref<'_, IXpsOMGeometry>) -> windows_core::Result<()>; fn GetGeometryLookup(&self) -> windows_core::Result; fn SetGeometryLookup(&self, lookup: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetAccessibilityShortDescription(&self) -> windows_core::Result; @@ -7296,7 +7284,7 @@ pub trait IXpsOMPath_Impl: IXpsOMVisual_Impl { fn SetSnapsToPixels(&self, snapstopixels: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetStrokeBrush(&self) -> windows_core::Result; fn GetStrokeBrushLocal(&self) -> windows_core::Result; - fn SetStrokeBrushLocal(&self, brush: Option<&IXpsOMBrush>) -> windows_core::Result<()>; + fn SetStrokeBrushLocal(&self, brush: windows_core::Ref<'_, IXpsOMBrush>) -> windows_core::Result<()>; fn GetStrokeBrushLookup(&self) -> windows_core::Result; fn SetStrokeBrushLookup(&self, lookup: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetStrokeDashes(&self) -> windows_core::Result; @@ -7316,7 +7304,7 @@ pub trait IXpsOMPath_Impl: IXpsOMVisual_Impl { fn SetStrokeThickness(&self, strokethickness: f32) -> windows_core::Result<()>; fn GetFillBrush(&self) -> windows_core::Result; fn GetFillBrushLocal(&self) -> windows_core::Result; - fn SetFillBrushLocal(&self, brush: Option<&IXpsOMBrush>) -> windows_core::Result<()>; + fn SetFillBrushLocal(&self, brush: windows_core::Ref<'_, IXpsOMBrush>) -> windows_core::Result<()>; fn GetFillBrushLookup(&self) -> windows_core::Result; fn SetFillBrushLookup(&self, lookup: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -7346,7 +7334,7 @@ impl IXpsOMPath_Vtbl { } unsafe extern "system" fn SetGeometryLocal(this: *mut core::ffi::c_void, geometry: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPath_Impl::SetGeometryLocal(this, windows_core::from_raw_borrowed(&geometry)).into() + IXpsOMPath_Impl::SetGeometryLocal(this, core::mem::transmute_copy(&geometry)).into() } unsafe extern "system" fn GetGeometryLookup(this: *mut core::ffi::c_void, lookup: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7426,7 +7414,7 @@ impl IXpsOMPath_Vtbl { } unsafe extern "system" fn SetStrokeBrushLocal(this: *mut core::ffi::c_void, brush: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPath_Impl::SetStrokeBrushLocal(this, windows_core::from_raw_borrowed(&brush)).into() + IXpsOMPath_Impl::SetStrokeBrushLocal(this, core::mem::transmute_copy(&brush)).into() } unsafe extern "system" fn GetStrokeBrushLookup(this: *mut core::ffi::c_void, lookup: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7572,7 +7560,7 @@ impl IXpsOMPath_Vtbl { } unsafe extern "system" fn SetFillBrushLocal(this: *mut core::ffi::c_void, brush: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPath_Impl::SetFillBrushLocal(this, windows_core::from_raw_borrowed(&brush)).into() + IXpsOMPath_Impl::SetFillBrushLocal(this, core::mem::transmute_copy(&brush)).into() } unsafe extern "system" fn GetFillBrushLookup(this: *mut core::ffi::c_void, lookup: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7683,7 +7671,7 @@ pub struct IXpsOMPrintTicketResource_Vtbl { #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMPrintTicketResource_Impl: IXpsOMResource_Impl { fn GetStream(&self) -> windows_core::Result; - fn SetContent(&self, sourcestream: Option<&super::super::System::Com::IStream>, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetContent(&self, sourcestream: windows_core::Ref<'_, super::super::System::Com::IStream>, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMPrintTicketResource_Vtbl { @@ -7700,7 +7688,7 @@ impl IXpsOMPrintTicketResource_Vtbl { } unsafe extern "system" fn SetContent(this: *mut core::ffi::c_void, sourcestream: *mut core::ffi::c_void, partname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMPrintTicketResource_Impl::SetContent(this, windows_core::from_raw_borrowed(&sourcestream), windows_core::from_raw_borrowed(&partname)).into() + IXpsOMPrintTicketResource_Impl::SetContent(this, core::mem::transmute_copy(&sourcestream), core::mem::transmute_copy(&partname)).into() } Self { base__: IXpsOMResource_Vtbl::new::(), GetStream: GetStream::, SetContent: SetContent:: } } @@ -7864,7 +7852,7 @@ pub struct IXpsOMRemoteDictionaryResource_Vtbl { #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMRemoteDictionaryResource_Impl: IXpsOMResource_Impl { fn GetDictionary(&self) -> windows_core::Result; - fn SetDictionary(&self, dictionary: Option<&IXpsOMDictionary>) -> windows_core::Result<()>; + fn SetDictionary(&self, dictionary: windows_core::Ref<'_, IXpsOMDictionary>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMRemoteDictionaryResource_Vtbl { @@ -7881,7 +7869,7 @@ impl IXpsOMRemoteDictionaryResource_Vtbl { } unsafe extern "system" fn SetDictionary(this: *mut core::ffi::c_void, dictionary: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMRemoteDictionaryResource_Impl::SetDictionary(this, windows_core::from_raw_borrowed(&dictionary)).into() + IXpsOMRemoteDictionaryResource_Impl::SetDictionary(this, core::mem::transmute_copy(&dictionary)).into() } Self { base__: IXpsOMResource_Vtbl::new::(), @@ -7928,7 +7916,7 @@ pub struct IXpsOMRemoteDictionaryResource1_Vtbl { #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMRemoteDictionaryResource1_Impl: IXpsOMRemoteDictionaryResource_Impl { fn GetDocumentType(&self) -> windows_core::Result; - fn Write1(&self, stream: Option<&super::super::System::Com::ISequentialStream>, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()>; + fn Write1(&self, stream: windows_core::Ref<'_, super::super::System::Com::ISequentialStream>, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMRemoteDictionaryResource1_Vtbl { @@ -7945,7 +7933,7 @@ impl IXpsOMRemoteDictionaryResource1_Vtbl { } unsafe extern "system" fn Write1(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, documenttype: XPS_DOCUMENT_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMRemoteDictionaryResource1_Impl::Write1(this, windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&documenttype)).into() + IXpsOMRemoteDictionaryResource1_Impl::Write1(this, core::mem::transmute_copy(&stream), core::mem::transmute_copy(&documenttype)).into() } Self { base__: IXpsOMRemoteDictionaryResource_Vtbl::new::(), @@ -8018,11 +8006,11 @@ pub struct IXpsOMRemoteDictionaryResourceCollection_Vtbl { pub trait IXpsOMRemoteDictionaryResourceCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, object: Option<&IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, object: windows_core::Ref<'_, IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, object: Option<&IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; - fn Append(&self, object: Option<&IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; - fn GetByPartName(&self, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn SetAt(&self, index: u32, object: windows_core::Ref<'_, IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; + fn Append(&self, object: windows_core::Ref<'_, IXpsOMRemoteDictionaryResource>) -> windows_core::Result<()>; + fn GetByPartName(&self, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMRemoteDictionaryResourceCollection_Vtbl { @@ -8049,7 +8037,7 @@ impl IXpsOMRemoteDictionaryResourceCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMRemoteDictionaryResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&object)).into() + IXpsOMRemoteDictionaryResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8057,15 +8045,15 @@ impl IXpsOMRemoteDictionaryResourceCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMRemoteDictionaryResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&object)).into() + IXpsOMRemoteDictionaryResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMRemoteDictionaryResourceCollection_Impl::Append(this, windows_core::from_raw_borrowed(&object)).into() + IXpsOMRemoteDictionaryResourceCollection_Impl::Append(this, core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn GetByPartName(this: *mut core::ffi::c_void, partname: *mut core::ffi::c_void, remotedictionaryresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMRemoteDictionaryResourceCollection_Impl::GetByPartName(this, windows_core::from_raw_borrowed(&partname)) { + match IXpsOMRemoteDictionaryResourceCollection_Impl::GetByPartName(this, core::mem::transmute_copy(&partname)) { Ok(ok__) => { remotedictionaryresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8210,7 +8198,7 @@ pub struct IXpsOMSignatureBlockResource_Vtbl { pub trait IXpsOMSignatureBlockResource_Impl: IXpsOMResource_Impl { fn GetOwner(&self) -> windows_core::Result; fn GetStream(&self) -> windows_core::Result; - fn SetContent(&self, sourcestream: Option<&super::super::System::Com::IStream>, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetContent(&self, sourcestream: windows_core::Ref<'_, super::super::System::Com::IStream>, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMSignatureBlockResource_Vtbl { @@ -8237,7 +8225,7 @@ impl IXpsOMSignatureBlockResource_Vtbl { } unsafe extern "system" fn SetContent(this: *mut core::ffi::c_void, sourcestream: *mut core::ffi::c_void, partname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMSignatureBlockResource_Impl::SetContent(this, windows_core::from_raw_borrowed(&sourcestream), windows_core::from_raw_borrowed(&partname)).into() + IXpsOMSignatureBlockResource_Impl::SetContent(this, core::mem::transmute_copy(&sourcestream), core::mem::transmute_copy(&partname)).into() } Self { base__: IXpsOMResource_Vtbl::new::(), @@ -8311,11 +8299,11 @@ pub struct IXpsOMSignatureBlockResourceCollection_Vtbl { pub trait IXpsOMSignatureBlockResourceCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, signatureblockresource: Option<&IXpsOMSignatureBlockResource>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, signatureblockresource: windows_core::Ref<'_, IXpsOMSignatureBlockResource>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, signatureblockresource: Option<&IXpsOMSignatureBlockResource>) -> windows_core::Result<()>; - fn Append(&self, signatureblockresource: Option<&IXpsOMSignatureBlockResource>) -> windows_core::Result<()>; - fn GetByPartName(&self, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn SetAt(&self, index: u32, signatureblockresource: windows_core::Ref<'_, IXpsOMSignatureBlockResource>) -> windows_core::Result<()>; + fn Append(&self, signatureblockresource: windows_core::Ref<'_, IXpsOMSignatureBlockResource>) -> windows_core::Result<()>; + fn GetByPartName(&self, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMSignatureBlockResourceCollection_Vtbl { @@ -8342,7 +8330,7 @@ impl IXpsOMSignatureBlockResourceCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, signatureblockresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMSignatureBlockResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&signatureblockresource)).into() + IXpsOMSignatureBlockResourceCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&signatureblockresource)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8350,15 +8338,15 @@ impl IXpsOMSignatureBlockResourceCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, signatureblockresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMSignatureBlockResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&signatureblockresource)).into() + IXpsOMSignatureBlockResourceCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&signatureblockresource)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, signatureblockresource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMSignatureBlockResourceCollection_Impl::Append(this, windows_core::from_raw_borrowed(&signatureblockresource)).into() + IXpsOMSignatureBlockResourceCollection_Impl::Append(this, core::mem::transmute_copy(&signatureblockresource)).into() } unsafe extern "system" fn GetByPartName(this: *mut core::ffi::c_void, partname: *mut core::ffi::c_void, signatureblockresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMSignatureBlockResourceCollection_Impl::GetByPartName(this, windows_core::from_raw_borrowed(&partname)) { + match IXpsOMSignatureBlockResourceCollection_Impl::GetByPartName(this, core::mem::transmute_copy(&partname)) { Ok(ok__) => { signatureblockresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8416,7 +8404,7 @@ pub struct IXpsOMSolidColorBrush_Vtbl { } pub trait IXpsOMSolidColorBrush_Impl: IXpsOMBrush_Impl { fn GetColor(&self, color: *mut XPS_COLOR) -> windows_core::Result; - fn SetColor(&self, color: *const XPS_COLOR, colorprofile: Option<&IXpsOMColorProfileResource>) -> windows_core::Result<()>; + fn SetColor(&self, color: *const XPS_COLOR, colorprofile: windows_core::Ref<'_, IXpsOMColorProfileResource>) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } impl IXpsOMSolidColorBrush_Vtbl { @@ -8433,7 +8421,7 @@ impl IXpsOMSolidColorBrush_Vtbl { } unsafe extern "system" fn SetColor(this: *mut core::ffi::c_void, color: *const XPS_COLOR, colorprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMSolidColorBrush_Impl::SetColor(this, core::mem::transmute_copy(&color), windows_core::from_raw_borrowed(&colorprofile)).into() + IXpsOMSolidColorBrush_Impl::SetColor(this, core::mem::transmute_copy(&color), core::mem::transmute_copy(&colorprofile)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, solidcolorbrush: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8501,7 +8489,7 @@ pub struct IXpsOMStoryFragmentsResource_Vtbl { pub trait IXpsOMStoryFragmentsResource_Impl: IXpsOMResource_Impl { fn GetOwner(&self) -> windows_core::Result; fn GetStream(&self) -> windows_core::Result; - fn SetContent(&self, sourcestream: Option<&super::super::System::Com::IStream>, partname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetContent(&self, sourcestream: windows_core::Ref<'_, super::super::System::Com::IStream>, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMStoryFragmentsResource_Vtbl { @@ -8528,7 +8516,7 @@ impl IXpsOMStoryFragmentsResource_Vtbl { } unsafe extern "system" fn SetContent(this: *mut core::ffi::c_void, sourcestream: *mut core::ffi::c_void, partname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMStoryFragmentsResource_Impl::SetContent(this, windows_core::from_raw_borrowed(&sourcestream), windows_core::from_raw_borrowed(&partname)).into() + IXpsOMStoryFragmentsResource_Impl::SetContent(this, core::mem::transmute_copy(&sourcestream), core::mem::transmute_copy(&partname)).into() } Self { base__: IXpsOMResource_Vtbl::new::(), @@ -8566,14 +8554,14 @@ pub struct IXpsOMThumbnailGenerator_Vtbl { } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsOMThumbnailGenerator_Impl: windows_core::IUnknownImpl { - fn GenerateThumbnail(&self, page: Option<&IXpsOMPage>, thumbnailtype: XPS_IMAGE_TYPE, thumbnailsize: XPS_THUMBNAIL_SIZE, imageresourcepartname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; + fn GenerateThumbnail(&self, page: windows_core::Ref<'_, IXpsOMPage>, thumbnailtype: XPS_IMAGE_TYPE, thumbnailsize: XPS_THUMBNAIL_SIZE, imageresourcepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result; } #[cfg(all(feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsOMThumbnailGenerator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GenerateThumbnail(this: *mut core::ffi::c_void, page: *mut core::ffi::c_void, thumbnailtype: XPS_IMAGE_TYPE, thumbnailsize: XPS_THUMBNAIL_SIZE, imageresourcepartname: *mut core::ffi::c_void, imageresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsOMThumbnailGenerator_Impl::GenerateThumbnail(this, windows_core::from_raw_borrowed(&page), core::mem::transmute_copy(&thumbnailtype), core::mem::transmute_copy(&thumbnailsize), windows_core::from_raw_borrowed(&imageresourcepartname)) { + match IXpsOMThumbnailGenerator_Impl::GenerateThumbnail(this, core::mem::transmute_copy(&page), core::mem::transmute_copy(&thumbnailtype), core::mem::transmute_copy(&thumbnailsize), core::mem::transmute_copy(&imageresourcepartname)) { Ok(ok__) => { imageresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8662,7 +8650,7 @@ pub struct IXpsOMTileBrush_Vtbl { pub trait IXpsOMTileBrush_Impl: IXpsOMBrush_Impl { fn GetTransform(&self) -> windows_core::Result; fn GetTransformLocal(&self) -> windows_core::Result; - fn SetTransformLocal(&self, transform: Option<&IXpsOMMatrixTransform>) -> windows_core::Result<()>; + fn SetTransformLocal(&self, transform: windows_core::Ref<'_, IXpsOMMatrixTransform>) -> windows_core::Result<()>; fn GetTransformLookup(&self) -> windows_core::Result; fn SetTransformLookup(&self, key: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetViewbox(&self) -> windows_core::Result; @@ -8696,7 +8684,7 @@ impl IXpsOMTileBrush_Vtbl { } unsafe extern "system" fn SetTransformLocal(this: *mut core::ffi::c_void, transform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMTileBrush_Impl::SetTransformLocal(this, windows_core::from_raw_borrowed(&transform)).into() + IXpsOMTileBrush_Impl::SetTransformLocal(this, core::mem::transmute_copy(&transform)).into() } unsafe extern "system" fn GetTransformLookup(this: *mut core::ffi::c_void, key: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8941,19 +8929,19 @@ pub struct IXpsOMVisual_Vtbl { pub trait IXpsOMVisual_Impl: IXpsOMShareable_Impl { fn GetTransform(&self) -> windows_core::Result; fn GetTransformLocal(&self) -> windows_core::Result; - fn SetTransformLocal(&self, matrixtransform: Option<&IXpsOMMatrixTransform>) -> windows_core::Result<()>; + fn SetTransformLocal(&self, matrixtransform: windows_core::Ref<'_, IXpsOMMatrixTransform>) -> windows_core::Result<()>; fn GetTransformLookup(&self) -> windows_core::Result; fn SetTransformLookup(&self, key: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetClipGeometry(&self) -> windows_core::Result; fn GetClipGeometryLocal(&self) -> windows_core::Result; - fn SetClipGeometryLocal(&self, clipgeometry: Option<&IXpsOMGeometry>) -> windows_core::Result<()>; + fn SetClipGeometryLocal(&self, clipgeometry: windows_core::Ref<'_, IXpsOMGeometry>) -> windows_core::Result<()>; fn GetClipGeometryLookup(&self) -> windows_core::Result; fn SetClipGeometryLookup(&self, key: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetOpacity(&self) -> windows_core::Result; fn SetOpacity(&self, opacity: f32) -> windows_core::Result<()>; fn GetOpacityMaskBrush(&self) -> windows_core::Result; fn GetOpacityMaskBrushLocal(&self) -> windows_core::Result; - fn SetOpacityMaskBrushLocal(&self, opacitymaskbrush: Option<&IXpsOMBrush>) -> windows_core::Result<()>; + fn SetOpacityMaskBrushLocal(&self, opacitymaskbrush: windows_core::Ref<'_, IXpsOMBrush>) -> windows_core::Result<()>; fn GetOpacityMaskBrushLookup(&self) -> windows_core::Result; fn SetOpacityMaskBrushLookup(&self, key: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetName(&self) -> windows_core::Result; @@ -8961,7 +8949,7 @@ pub trait IXpsOMVisual_Impl: IXpsOMShareable_Impl { fn GetIsHyperlinkTarget(&self) -> windows_core::Result; fn SetIsHyperlinkTarget(&self, ishyperlink: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetHyperlinkNavigateUri(&self) -> windows_core::Result; - fn SetHyperlinkNavigateUri(&self, hyperlinkuri: Option<&super::super::System::Com::IUri>) -> windows_core::Result<()>; + fn SetHyperlinkNavigateUri(&self, hyperlinkuri: windows_core::Ref<'_, super::super::System::Com::IUri>) -> windows_core::Result<()>; fn GetLanguage(&self) -> windows_core::Result; fn SetLanguage(&self, language: &windows_core::PCWSTR) -> windows_core::Result<()>; } @@ -8990,7 +8978,7 @@ impl IXpsOMVisual_Vtbl { } unsafe extern "system" fn SetTransformLocal(this: *mut core::ffi::c_void, matrixtransform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMVisual_Impl::SetTransformLocal(this, windows_core::from_raw_borrowed(&matrixtransform)).into() + IXpsOMVisual_Impl::SetTransformLocal(this, core::mem::transmute_copy(&matrixtransform)).into() } unsafe extern "system" fn GetTransformLookup(this: *mut core::ffi::c_void, key: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9028,7 +9016,7 @@ impl IXpsOMVisual_Vtbl { } unsafe extern "system" fn SetClipGeometryLocal(this: *mut core::ffi::c_void, clipgeometry: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMVisual_Impl::SetClipGeometryLocal(this, windows_core::from_raw_borrowed(&clipgeometry)).into() + IXpsOMVisual_Impl::SetClipGeometryLocal(this, core::mem::transmute_copy(&clipgeometry)).into() } unsafe extern "system" fn GetClipGeometryLookup(this: *mut core::ffi::c_void, key: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9080,7 +9068,7 @@ impl IXpsOMVisual_Vtbl { } unsafe extern "system" fn SetOpacityMaskBrushLocal(this: *mut core::ffi::c_void, opacitymaskbrush: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMVisual_Impl::SetOpacityMaskBrushLocal(this, windows_core::from_raw_borrowed(&opacitymaskbrush)).into() + IXpsOMVisual_Impl::SetOpacityMaskBrushLocal(this, core::mem::transmute_copy(&opacitymaskbrush)).into() } unsafe extern "system" fn GetOpacityMaskBrushLookup(this: *mut core::ffi::c_void, key: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9136,7 +9124,7 @@ impl IXpsOMVisual_Vtbl { } unsafe extern "system" fn SetHyperlinkNavigateUri(this: *mut core::ffi::c_void, hyperlinkuri: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMVisual_Impl::SetHyperlinkNavigateUri(this, windows_core::from_raw_borrowed(&hyperlinkuri)).into() + IXpsOMVisual_Impl::SetHyperlinkNavigateUri(this, core::mem::transmute_copy(&hyperlinkuri)).into() } unsafe extern "system" fn GetLanguage(this: *mut core::ffi::c_void, language: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9238,7 +9226,7 @@ pub struct IXpsOMVisualBrush_Vtbl { pub trait IXpsOMVisualBrush_Impl: IXpsOMTileBrush_Impl { fn GetVisual(&self) -> windows_core::Result; fn GetVisualLocal(&self) -> windows_core::Result; - fn SetVisualLocal(&self, visual: Option<&IXpsOMVisual>) -> windows_core::Result<()>; + fn SetVisualLocal(&self, visual: windows_core::Ref<'_, IXpsOMVisual>) -> windows_core::Result<()>; fn GetVisualLookup(&self) -> windows_core::Result; fn SetVisualLookup(&self, lookup: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -9267,7 +9255,7 @@ impl IXpsOMVisualBrush_Vtbl { } unsafe extern "system" fn SetVisualLocal(this: *mut core::ffi::c_void, visual: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMVisualBrush_Impl::SetVisualLocal(this, windows_core::from_raw_borrowed(&visual)).into() + IXpsOMVisualBrush_Impl::SetVisualLocal(this, core::mem::transmute_copy(&visual)).into() } unsafe extern "system" fn GetVisualLookup(this: *mut core::ffi::c_void, lookup: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9354,10 +9342,10 @@ pub struct IXpsOMVisualCollection_Vtbl { pub trait IXpsOMVisualCollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, index: u32) -> windows_core::Result; - fn InsertAt(&self, index: u32, object: Option<&IXpsOMVisual>) -> windows_core::Result<()>; + fn InsertAt(&self, index: u32, object: windows_core::Ref<'_, IXpsOMVisual>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn SetAt(&self, index: u32, object: Option<&IXpsOMVisual>) -> windows_core::Result<()>; - fn Append(&self, object: Option<&IXpsOMVisual>) -> windows_core::Result<()>; + fn SetAt(&self, index: u32, object: windows_core::Ref<'_, IXpsOMVisual>) -> windows_core::Result<()>; + fn Append(&self, object: windows_core::Ref<'_, IXpsOMVisual>) -> windows_core::Result<()>; } impl IXpsOMVisualCollection_Vtbl { pub const fn new() -> Self { @@ -9383,7 +9371,7 @@ impl IXpsOMVisualCollection_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, index: u32, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMVisualCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&object)).into() + IXpsOMVisualCollection_Impl::InsertAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9391,11 +9379,11 @@ impl IXpsOMVisualCollection_Vtbl { } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, index: u32, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMVisualCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&object)).into() + IXpsOMVisualCollection_Impl::SetAt(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsOMVisualCollection_Impl::Append(this, windows_core::from_raw_borrowed(&object)).into() + IXpsOMVisualCollection_Impl::Append(this, core::mem::transmute_copy(&object)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10003,16 +9991,16 @@ pub struct IXpsSignatureManager_Vtbl { #[cfg(all(feature = "Win32_Security_Cryptography", feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] pub trait IXpsSignatureManager_Impl: windows_core::IUnknownImpl { fn LoadPackageFile(&self, filename: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn LoadPackageStream(&self, stream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn Sign(&self, signoptions: Option<&IXpsSigningOptions>, x509certificate: *const super::super::Security::Cryptography::CERT_CONTEXT) -> windows_core::Result; + fn LoadPackageStream(&self, stream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Sign(&self, signoptions: windows_core::Ref<'_, IXpsSigningOptions>, x509certificate: *const super::super::Security::Cryptography::CERT_CONTEXT) -> windows_core::Result; fn GetSignatureOriginPartName(&self) -> windows_core::Result; - fn SetSignatureOriginPartName(&self, signatureoriginpartname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetSignatureOriginPartName(&self, signatureoriginpartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; fn GetSignatures(&self) -> windows_core::Result; - fn AddSignatureBlock(&self, partname: Option<&super::Packaging::Opc::IOpcPartUri>, fixeddocumentindex: u32) -> windows_core::Result; + fn AddSignatureBlock(&self, partname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>, fixeddocumentindex: u32) -> windows_core::Result; fn GetSignatureBlocks(&self) -> windows_core::Result; fn CreateSigningOptions(&self) -> windows_core::Result; fn SavePackageToFile(&self, filename: &windows_core::PCWSTR, securityattributes: *const super::super::Security::SECURITY_ATTRIBUTES, flagsandattributes: u32) -> windows_core::Result<()>; - fn SavePackageToStream(&self, stream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SavePackageToStream(&self, stream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Security_Cryptography", feature = "Win32_Storage_Packaging_Opc", feature = "Win32_System_Com"))] impl IXpsSignatureManager_Vtbl { @@ -10023,11 +10011,11 @@ impl IXpsSignatureManager_Vtbl { } unsafe extern "system" fn LoadPackageStream(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsSignatureManager_Impl::LoadPackageStream(this, windows_core::from_raw_borrowed(&stream)).into() + IXpsSignatureManager_Impl::LoadPackageStream(this, core::mem::transmute_copy(&stream)).into() } unsafe extern "system" fn Sign(this: *mut core::ffi::c_void, signoptions: *mut core::ffi::c_void, x509certificate: *const super::super::Security::Cryptography::CERT_CONTEXT, signature: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsSignatureManager_Impl::Sign(this, windows_core::from_raw_borrowed(&signoptions), core::mem::transmute_copy(&x509certificate)) { + match IXpsSignatureManager_Impl::Sign(this, core::mem::transmute_copy(&signoptions), core::mem::transmute_copy(&x509certificate)) { Ok(ok__) => { signature.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10047,7 +10035,7 @@ impl IXpsSignatureManager_Vtbl { } unsafe extern "system" fn SetSignatureOriginPartName(this: *mut core::ffi::c_void, signatureoriginpartname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsSignatureManager_Impl::SetSignatureOriginPartName(this, windows_core::from_raw_borrowed(&signatureoriginpartname)).into() + IXpsSignatureManager_Impl::SetSignatureOriginPartName(this, core::mem::transmute_copy(&signatureoriginpartname)).into() } unsafe extern "system" fn GetSignatures(this: *mut core::ffi::c_void, signatures: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10061,7 +10049,7 @@ impl IXpsSignatureManager_Vtbl { } unsafe extern "system" fn AddSignatureBlock(this: *mut core::ffi::c_void, partname: *mut core::ffi::c_void, fixeddocumentindex: u32, signatureblock: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IXpsSignatureManager_Impl::AddSignatureBlock(this, windows_core::from_raw_borrowed(&partname), core::mem::transmute_copy(&fixeddocumentindex)) { + match IXpsSignatureManager_Impl::AddSignatureBlock(this, core::mem::transmute_copy(&partname), core::mem::transmute_copy(&fixeddocumentindex)) { Ok(ok__) => { signatureblock.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10095,7 +10083,7 @@ impl IXpsSignatureManager_Vtbl { } unsafe extern "system" fn SavePackageToStream(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsSignatureManager_Impl::SavePackageToStream(this, windows_core::from_raw_borrowed(&stream)).into() + IXpsSignatureManager_Impl::SavePackageToStream(this, core::mem::transmute_copy(&stream)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10206,7 +10194,7 @@ pub trait IXpsSignatureRequest_Impl: windows_core::IUnknownImpl { fn SetRequestSignByDate(&self, datestring: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetSigningLocale(&self) -> windows_core::Result; fn SetSigningLocale(&self, place: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn GetSpotLocation(&self, pageindex: *mut i32, pagepartname: *mut Option, x: *mut f32, y: *mut f32) -> windows_core::Result<()>; + fn GetSpotLocation(&self, pageindex: *mut i32, pagepartname: windows_core::OutRef<'_, super::Packaging::Opc::IOpcPartUri>, x: *mut f32, y: *mut f32) -> windows_core::Result<()>; fn SetSpotLocation(&self, pageindex: i32, x: f32, y: f32) -> windows_core::Result<()>; fn GetRequestId(&self) -> windows_core::Result; fn GetSignature(&self) -> windows_core::Result; @@ -10520,7 +10508,7 @@ pub trait IXpsSigningOptions_Impl: windows_core::IUnknownImpl { fn GetDigestMethod(&self) -> windows_core::Result; fn SetDigestMethod(&self, digestmethod: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetSignaturePartName(&self) -> windows_core::Result; - fn SetSignaturePartName(&self, signaturepartname: Option<&super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; + fn SetSignaturePartName(&self, signaturepartname: windows_core::Ref<'_, super::Packaging::Opc::IOpcPartUri>) -> windows_core::Result<()>; fn GetPolicy(&self) -> windows_core::Result; fn SetPolicy(&self, policy: XPS_SIGN_POLICY) -> windows_core::Result<()>; fn GetSigningTimeFormat(&self) -> windows_core::Result; @@ -10588,7 +10576,7 @@ impl IXpsSigningOptions_Vtbl { } unsafe extern "system" fn SetSignaturePartName(this: *mut core::ffi::c_void, signaturepartname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXpsSigningOptions_Impl::SetSignaturePartName(this, windows_core::from_raw_borrowed(&signaturepartname)).into() + IXpsSigningOptions_Impl::SetSignaturePartName(this, core::mem::transmute_copy(&signaturepartname)).into() } unsafe extern "system" fn GetPolicy(this: *mut core::ffi::c_void, policy: *mut XPS_SIGN_POLICY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs b/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs index 34dc1be345..3138a8fb4b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs @@ -829,7 +829,7 @@ pub struct IABContainer_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IABContainer_Impl: IMAPIContainer_Impl { fn CreateEntry(&self, cbentryid: u32, lpentryid: *const ENTRYID, ulcreateflags: u32) -> windows_core::Result; - fn CopyEntries(&self, lpentries: *const SBinaryArray, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; + fn CopyEntries(&self, lpentries: *const SBinaryArray, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; fn DeleteEntries(&self, lpentries: *const SBinaryArray, ulflags: u32) -> windows_core::Result<()>; fn ResolveNames(&self, lpproptagarray: *const SPropTagArray, ulflags: u32, lpadrlist: *const ADRLIST) -> windows_core::Result; } @@ -848,7 +848,7 @@ impl IABContainer_Vtbl { } unsafe extern "system" fn CopyEntries(this: *mut core::ffi::c_void, lpentries: *const SBinaryArray, uluiparam: usize, lpprogress: *mut core::ffi::c_void, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IABContainer_Impl::CopyEntries(this, core::mem::transmute_copy(&lpentries), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&ulflags)).into() + IABContainer_Impl::CopyEntries(this, core::mem::transmute_copy(&lpentries), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&ulflags)).into() } unsafe extern "system" fn DeleteEntries(this: *mut core::ffi::c_void, lpentries: *const SBinaryArray, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -997,9 +997,9 @@ pub struct IAddrBook_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAddrBook_Impl: IMAPIProp_Impl { - fn OpenEntry(&self, cbentryid: u32, lpentryid: *mut ENTRYID, lpinterface: *mut windows_core::GUID, ulflags: u32, lpulobjtype: *mut u32, lppunk: *mut Option) -> windows_core::Result<()>; + fn OpenEntry(&self, cbentryid: u32, lpentryid: *mut ENTRYID, lpinterface: *mut windows_core::GUID, ulflags: u32, lpulobjtype: *mut u32, lppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn CompareEntryIDs(&self, cbentryid1: u32, lpentryid1: *mut ENTRYID, cbentryid2: u32, lpentryid2: *mut ENTRYID, ulflags: u32, lpulresult: *mut u32) -> windows_core::Result<()>; - fn Advise(&self, cbentryid: u32, lpentryid: *mut ENTRYID, uleventmask: u32, lpadvisesink: Option<&IMAPIAdviseSink>, lpulconnection: *mut u32) -> windows_core::Result<()>; + fn Advise(&self, cbentryid: u32, lpentryid: *mut ENTRYID, uleventmask: u32, lpadvisesink: windows_core::Ref<'_, IMAPIAdviseSink>, lpulconnection: *mut u32) -> windows_core::Result<()>; fn Unadvise(&self, ulconnection: u32) -> windows_core::Result<()>; fn CreateOneOff(&self, lpszname: *mut i8, lpszadrtype: *mut i8, lpszaddress: *mut i8, ulflags: u32, lpcbentryid: *mut u32, lppentryid: *mut *mut ENTRYID) -> windows_core::Result<()>; fn NewEntry(&self, uluiparam: u32, ulflags: u32, cbeidcontainer: u32, lpeidcontainer: *mut ENTRYID, cbeidnewentrytpl: u32, lpeidnewentrytpl: *mut ENTRYID, lpcbeidnewentry: *mut u32, lppeidnewentry: *mut *mut ENTRYID) -> windows_core::Result<()>; @@ -1029,7 +1029,7 @@ impl IAddrBook_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, cbentryid: u32, lpentryid: *mut ENTRYID, uleventmask: u32, lpadvisesink: *mut core::ffi::c_void, lpulconnection: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAddrBook_Impl::Advise(this, core::mem::transmute_copy(&cbentryid), core::mem::transmute_copy(&lpentryid), core::mem::transmute_copy(&uleventmask), windows_core::from_raw_borrowed(&lpadvisesink), core::mem::transmute_copy(&lpulconnection)).into() + IAddrBook_Impl::Advise(this, core::mem::transmute_copy(&cbentryid), core::mem::transmute_copy(&lpentryid), core::mem::transmute_copy(&uleventmask), core::mem::transmute_copy(&lpadvisesink), core::mem::transmute_copy(&lpulconnection)).into() } unsafe extern "system" fn Unadvise(this: *mut core::ffi::c_void, ulconnection: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1186,7 +1186,7 @@ pub struct IDistList_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IDistList_Impl: IMAPIContainer_Impl { fn CreateEntry(&self, cbentryid: u32, lpentryid: *const ENTRYID, ulcreateflags: u32) -> windows_core::Result; - fn CopyEntries(&self, lpentries: *const SBinaryArray, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; + fn CopyEntries(&self, lpentries: *const SBinaryArray, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; fn DeleteEntries(&self, lpentries: *const SBinaryArray, ulflags: u32) -> windows_core::Result<()>; fn ResolveNames(&self, lpproptagarray: *const SPropTagArray, ulflags: u32, lpadrlist: *const ADRLIST) -> windows_core::Result; } @@ -1205,7 +1205,7 @@ impl IDistList_Vtbl { } unsafe extern "system" fn CopyEntries(this: *mut core::ffi::c_void, lpentries: *const SBinaryArray, uluiparam: usize, lpprogress: *mut core::ffi::c_void, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDistList_Impl::CopyEntries(this, core::mem::transmute_copy(&lpentries), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&ulflags)).into() + IDistList_Impl::CopyEntries(this, core::mem::transmute_copy(&lpentries), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&ulflags)).into() } unsafe extern "system" fn DeleteEntries(this: *mut core::ffi::c_void, lpentries: *const SBinaryArray, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1318,7 +1318,7 @@ pub struct IMAPIContainer_Vtbl { pub trait IMAPIContainer_Impl: IMAPIProp_Impl { fn GetContentsTable(&self, ulflags: u32) -> windows_core::Result; fn GetHierarchyTable(&self, ulflags: u32) -> windows_core::Result; - fn OpenEntry(&self, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: *mut windows_core::GUID, ulflags: u32, lpulobjtype: *mut u32, lppunk: *mut Option) -> windows_core::Result<()>; + fn OpenEntry(&self, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: *mut windows_core::GUID, ulflags: u32, lpulobjtype: *mut u32, lppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetSearchCriteria(&self, lprestriction: *const SRestriction, lpcontainerlist: *const SBinaryArray, ulsearchflags: u32) -> windows_core::Result<()>; fn GetSearchCriteria(&self, ulflags: u32, lpprestriction: *mut *mut SRestriction, lppcontainerlist: *mut *mut SBinaryArray, lpulsearchstate: *mut u32) -> windows_core::Result<()>; } @@ -1511,17 +1511,17 @@ pub struct IMAPIFolder_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IMAPIFolder_Impl: IMAPIContainer_Impl { - fn CreateMessage(&self, lpinterface: *mut windows_core::GUID, ulflags: u32, lppmessage: *mut Option) -> windows_core::Result<()>; - fn CopyMessages(&self, lpmsglist: *const SBinaryArray, lpinterface: *const windows_core::GUID, lpdestfolder: *const core::ffi::c_void, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; - fn DeleteMessages(&self, lpmsglist: *const SBinaryArray, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; + fn CreateMessage(&self, lpinterface: *mut windows_core::GUID, ulflags: u32, lppmessage: windows_core::OutRef<'_, IMessage>) -> windows_core::Result<()>; + fn CopyMessages(&self, lpmsglist: *const SBinaryArray, lpinterface: *const windows_core::GUID, lpdestfolder: *const core::ffi::c_void, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; + fn DeleteMessages(&self, lpmsglist: *const SBinaryArray, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; fn CreateFolder(&self, ulfoldertype: u32, lpszfoldername: *const i8, lpszfoldercomment: *const i8, lpinterface: *const windows_core::GUID, ulflags: u32) -> windows_core::Result; - fn CopyFolder(&self, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: *const windows_core::GUID, lpdestfolder: *const core::ffi::c_void, lpsznewfoldername: *const i8, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; - fn DeleteFolder(&self, cbentryid: u32, lpentryid: *const ENTRYID, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; - fn SetReadFlags(&self, lpmsglist: *const SBinaryArray, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; + fn CopyFolder(&self, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: *const windows_core::GUID, lpdestfolder: *const core::ffi::c_void, lpsznewfoldername: *const i8, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; + fn DeleteFolder(&self, cbentryid: u32, lpentryid: *const ENTRYID, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; + fn SetReadFlags(&self, lpmsglist: *const SBinaryArray, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; fn GetMessageStatus(&self, cbentryid: u32, lpentryid: *const ENTRYID, ulflags: u32) -> windows_core::Result; fn SetMessageStatus(&self, cbentryid: u32, lpentryid: *const ENTRYID, ulnewstatus: u32, ulnewstatusmask: u32) -> windows_core::Result; fn SaveContentsSort(&self, lpsortcriteria: *const SSortOrderSet, ulflags: u32) -> windows_core::Result<()>; - fn EmptyFolder(&self, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; + fn EmptyFolder(&self, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IMAPIFolder_Vtbl { @@ -1532,11 +1532,11 @@ impl IMAPIFolder_Vtbl { } unsafe extern "system" fn CopyMessages(this: *mut core::ffi::c_void, lpmsglist: *const SBinaryArray, lpinterface: *const windows_core::GUID, lpdestfolder: *const core::ffi::c_void, uluiparam: usize, lpprogress: *mut core::ffi::c_void, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMAPIFolder_Impl::CopyMessages(this, core::mem::transmute_copy(&lpmsglist), core::mem::transmute_copy(&lpinterface), core::mem::transmute_copy(&lpdestfolder), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&ulflags)).into() + IMAPIFolder_Impl::CopyMessages(this, core::mem::transmute_copy(&lpmsglist), core::mem::transmute_copy(&lpinterface), core::mem::transmute_copy(&lpdestfolder), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&ulflags)).into() } unsafe extern "system" fn DeleteMessages(this: *mut core::ffi::c_void, lpmsglist: *const SBinaryArray, uluiparam: usize, lpprogress: *mut core::ffi::c_void, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMAPIFolder_Impl::DeleteMessages(this, core::mem::transmute_copy(&lpmsglist), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&ulflags)).into() + IMAPIFolder_Impl::DeleteMessages(this, core::mem::transmute_copy(&lpmsglist), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&ulflags)).into() } unsafe extern "system" fn CreateFolder(this: *mut core::ffi::c_void, ulfoldertype: u32, lpszfoldername: *const i8, lpszfoldercomment: *const i8, lpinterface: *const windows_core::GUID, ulflags: u32, lppfolder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1550,15 +1550,15 @@ impl IMAPIFolder_Vtbl { } unsafe extern "system" fn CopyFolder(this: *mut core::ffi::c_void, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: *const windows_core::GUID, lpdestfolder: *const core::ffi::c_void, lpsznewfoldername: *const i8, uluiparam: usize, lpprogress: *mut core::ffi::c_void, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMAPIFolder_Impl::CopyFolder(this, core::mem::transmute_copy(&cbentryid), core::mem::transmute_copy(&lpentryid), core::mem::transmute_copy(&lpinterface), core::mem::transmute_copy(&lpdestfolder), core::mem::transmute_copy(&lpsznewfoldername), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&ulflags)).into() + IMAPIFolder_Impl::CopyFolder(this, core::mem::transmute_copy(&cbentryid), core::mem::transmute_copy(&lpentryid), core::mem::transmute_copy(&lpinterface), core::mem::transmute_copy(&lpdestfolder), core::mem::transmute_copy(&lpsznewfoldername), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&ulflags)).into() } unsafe extern "system" fn DeleteFolder(this: *mut core::ffi::c_void, cbentryid: u32, lpentryid: *const ENTRYID, uluiparam: usize, lpprogress: *mut core::ffi::c_void, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMAPIFolder_Impl::DeleteFolder(this, core::mem::transmute_copy(&cbentryid), core::mem::transmute_copy(&lpentryid), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&ulflags)).into() + IMAPIFolder_Impl::DeleteFolder(this, core::mem::transmute_copy(&cbentryid), core::mem::transmute_copy(&lpentryid), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&ulflags)).into() } unsafe extern "system" fn SetReadFlags(this: *mut core::ffi::c_void, lpmsglist: *const SBinaryArray, uluiparam: usize, lpprogress: *mut core::ffi::c_void, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMAPIFolder_Impl::SetReadFlags(this, core::mem::transmute_copy(&lpmsglist), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&ulflags)).into() + IMAPIFolder_Impl::SetReadFlags(this, core::mem::transmute_copy(&lpmsglist), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&ulflags)).into() } unsafe extern "system" fn GetMessageStatus(this: *mut core::ffi::c_void, cbentryid: u32, lpentryid: *const ENTRYID, ulflags: u32, lpulmessagestatus: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1586,7 +1586,7 @@ impl IMAPIFolder_Vtbl { } unsafe extern "system" fn EmptyFolder(this: *mut core::ffi::c_void, uluiparam: usize, lpprogress: *mut core::ffi::c_void, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMAPIFolder_Impl::EmptyFolder(this, core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&ulflags)).into() + IMAPIFolder_Impl::EmptyFolder(this, core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&ulflags)).into() } Self { base__: IMAPIContainer_Vtbl::new::(), @@ -1752,11 +1752,11 @@ pub trait IMAPIProp_Impl: windows_core::IUnknownImpl { fn SaveChanges(&self, ulflags: u32) -> windows_core::Result<()>; fn GetProps(&self, lpproptagarray: *mut SPropTagArray, ulflags: u32, lpcvalues: *mut u32, lppproparray: *mut *mut SPropValue) -> windows_core::Result<()>; fn GetPropList(&self, ulflags: u32, lppproptagarray: *mut *mut SPropTagArray) -> windows_core::Result<()>; - fn OpenProperty(&self, ulproptag: u32, lpiid: *mut windows_core::GUID, ulinterfaceoptions: u32, ulflags: u32, lppunk: *mut Option) -> windows_core::Result<()>; + fn OpenProperty(&self, ulproptag: u32, lpiid: *mut windows_core::GUID, ulinterfaceoptions: u32, ulflags: u32, lppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetProps(&self, cvalues: u32, lpproparray: *mut SPropValue, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()>; fn DeleteProps(&self, lpproptagarray: *mut SPropTagArray, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()>; - fn CopyTo(&self, ciidexclude: u32, rgiidexclude: *mut windows_core::GUID, lpexcludeprops: *mut SPropTagArray, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, lpinterface: *mut windows_core::GUID, lpdestobj: *mut core::ffi::c_void, ulflags: u32, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()>; - fn CopyProps(&self, lpincludeprops: *mut SPropTagArray, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, lpinterface: *mut windows_core::GUID, lpdestobj: *mut core::ffi::c_void, ulflags: u32, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()>; + fn CopyTo(&self, ciidexclude: u32, rgiidexclude: *mut windows_core::GUID, lpexcludeprops: *mut SPropTagArray, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, lpinterface: *mut windows_core::GUID, lpdestobj: *mut core::ffi::c_void, ulflags: u32, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()>; + fn CopyProps(&self, lpincludeprops: *mut SPropTagArray, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, lpinterface: *mut windows_core::GUID, lpdestobj: *mut core::ffi::c_void, ulflags: u32, lppproblems: *mut *mut SPropProblemArray) -> windows_core::Result<()>; fn GetNamesFromIDs(&self, lppproptags: *mut *mut SPropTagArray, lppropsetguid: *mut windows_core::GUID, ulflags: u32, lpcpropnames: *mut u32, lppppropnames: *mut *mut *mut MAPINAMEID) -> windows_core::Result<()>; fn GetIDsFromNames(&self, cpropnames: u32, lpppropnames: *mut *mut MAPINAMEID, ulflags: u32, lppproptags: *mut *mut SPropTagArray) -> windows_core::Result<()>; } @@ -1793,11 +1793,11 @@ impl IMAPIProp_Vtbl { } unsafe extern "system" fn CopyTo(this: *mut core::ffi::c_void, ciidexclude: u32, rgiidexclude: *mut windows_core::GUID, lpexcludeprops: *mut SPropTagArray, uluiparam: usize, lpprogress: *mut core::ffi::c_void, lpinterface: *mut windows_core::GUID, lpdestobj: *mut core::ffi::c_void, ulflags: u32, lppproblems: *mut *mut SPropProblemArray) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMAPIProp_Impl::CopyTo(this, core::mem::transmute_copy(&ciidexclude), core::mem::transmute_copy(&rgiidexclude), core::mem::transmute_copy(&lpexcludeprops), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&lpinterface), core::mem::transmute_copy(&lpdestobj), core::mem::transmute_copy(&ulflags), core::mem::transmute_copy(&lppproblems)).into() + IMAPIProp_Impl::CopyTo(this, core::mem::transmute_copy(&ciidexclude), core::mem::transmute_copy(&rgiidexclude), core::mem::transmute_copy(&lpexcludeprops), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&lpinterface), core::mem::transmute_copy(&lpdestobj), core::mem::transmute_copy(&ulflags), core::mem::transmute_copy(&lppproblems)).into() } unsafe extern "system" fn CopyProps(this: *mut core::ffi::c_void, lpincludeprops: *mut SPropTagArray, uluiparam: usize, lpprogress: *mut core::ffi::c_void, lpinterface: *mut windows_core::GUID, lpdestobj: *mut core::ffi::c_void, ulflags: u32, lppproblems: *mut *mut SPropProblemArray) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMAPIProp_Impl::CopyProps(this, core::mem::transmute_copy(&lpincludeprops), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&lpinterface), core::mem::transmute_copy(&lpdestobj), core::mem::transmute_copy(&ulflags), core::mem::transmute_copy(&lppproblems)).into() + IMAPIProp_Impl::CopyProps(this, core::mem::transmute_copy(&lpincludeprops), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&lpinterface), core::mem::transmute_copy(&lpdestobj), core::mem::transmute_copy(&ulflags), core::mem::transmute_copy(&lppproblems)).into() } unsafe extern "system" fn GetNamesFromIDs(this: *mut core::ffi::c_void, lppproptags: *mut *mut SPropTagArray, lppropsetguid: *mut windows_core::GUID, ulflags: u32, lpcpropnames: *mut u32, lppppropnames: *mut *mut *mut MAPINAMEID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2020,7 +2020,7 @@ pub struct IMAPITable_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IMAPITable_Impl: windows_core::IUnknownImpl { fn GetLastError(&self, hresult: windows_core::HRESULT, ulflags: u32, lppmapierror: *mut *mut MAPIERROR) -> windows_core::Result<()>; - fn Advise(&self, uleventmask: u32, lpadvisesink: Option<&IMAPIAdviseSink>, lpulconnection: *mut u32) -> windows_core::Result<()>; + fn Advise(&self, uleventmask: u32, lpadvisesink: windows_core::Ref<'_, IMAPIAdviseSink>, lpulconnection: *mut u32) -> windows_core::Result<()>; fn Unadvise(&self, ulconnection: u32) -> windows_core::Result<()>; fn GetStatus(&self, lpultablestatus: *mut u32, lpultabletype: *mut u32) -> windows_core::Result<()>; fn SetColumns(&self, lpproptagarray: *mut SPropTagArray, ulflags: u32) -> windows_core::Result<()>; @@ -2052,7 +2052,7 @@ impl IMAPITable_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, uleventmask: u32, lpadvisesink: *mut core::ffi::c_void, lpulconnection: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMAPITable_Impl::Advise(this, core::mem::transmute_copy(&uleventmask), windows_core::from_raw_borrowed(&lpadvisesink), core::mem::transmute_copy(&lpulconnection)).into() + IMAPITable_Impl::Advise(this, core::mem::transmute_copy(&uleventmask), core::mem::transmute_copy(&lpadvisesink), core::mem::transmute_copy(&lpulconnection)).into() } unsafe extern "system" fn Unadvise(this: *mut core::ffi::c_void, ulconnection: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2318,8 +2318,8 @@ pub struct IMessage_Vtbl { pub trait IMessage_Impl: IMAPIProp_Impl { fn GetAttachmentTable(&self, ulflags: u32) -> windows_core::Result; fn OpenAttach(&self, ulattachmentnum: u32, lpinterface: *const windows_core::GUID, ulflags: u32) -> windows_core::Result; - fn CreateAttach(&self, lpinterface: *const windows_core::GUID, ulflags: u32, lpulattachmentnum: *mut u32, lppattach: *mut Option) -> windows_core::Result<()>; - fn DeleteAttach(&self, ulattachmentnum: u32, uluiparam: usize, lpprogress: Option<&IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; + fn CreateAttach(&self, lpinterface: *const windows_core::GUID, ulflags: u32, lpulattachmentnum: *mut u32, lppattach: windows_core::OutRef<'_, IAttach>) -> windows_core::Result<()>; + fn DeleteAttach(&self, ulattachmentnum: u32, uluiparam: usize, lpprogress: windows_core::Ref<'_, IMAPIProgress>, ulflags: u32) -> windows_core::Result<()>; fn GetRecipientTable(&self, ulflags: u32) -> windows_core::Result; fn ModifyRecipients(&self, ulflags: u32, lpmods: *const ADRLIST) -> windows_core::Result<()>; fn SubmitMessage(&self, ulflags: u32) -> windows_core::Result<()>; @@ -2354,7 +2354,7 @@ impl IMessage_Vtbl { } unsafe extern "system" fn DeleteAttach(this: *mut core::ffi::c_void, ulattachmentnum: u32, uluiparam: usize, lpprogress: *mut core::ffi::c_void, ulflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMessage_Impl::DeleteAttach(this, core::mem::transmute_copy(&ulattachmentnum), core::mem::transmute_copy(&uluiparam), windows_core::from_raw_borrowed(&lpprogress), core::mem::transmute_copy(&ulflags)).into() + IMessage_Impl::DeleteAttach(this, core::mem::transmute_copy(&ulattachmentnum), core::mem::transmute_copy(&uluiparam), core::mem::transmute_copy(&lpprogress), core::mem::transmute_copy(&ulflags)).into() } unsafe extern "system" fn GetRecipientTable(this: *mut core::ffi::c_void, ulflags: u32, lpptable: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2478,17 +2478,17 @@ pub struct IMsgStore_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IMsgStore_Impl: IMAPIProp_Impl { - fn Advise(&self, cbentryid: u32, lpentryid: *const ENTRYID, uleventmask: u32, lpadvisesink: Option<&IMAPIAdviseSink>) -> windows_core::Result; + fn Advise(&self, cbentryid: u32, lpentryid: *const ENTRYID, uleventmask: u32, lpadvisesink: windows_core::Ref<'_, IMAPIAdviseSink>) -> windows_core::Result; fn Unadvise(&self, ulconnection: u32) -> windows_core::Result<()>; fn CompareEntryIDs(&self, cbentryid1: u32, lpentryid1: *const ENTRYID, cbentryid2: u32, lpentryid2: *const ENTRYID, ulflags: u32) -> windows_core::Result; - fn OpenEntry(&self, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: *const windows_core::GUID, ulflags: u32, lpulobjtype: *mut u32, ppunk: *mut Option) -> windows_core::Result<()>; + fn OpenEntry(&self, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: *const windows_core::GUID, ulflags: u32, lpulobjtype: *mut u32, ppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetReceiveFolder(&self, lpszmessageclass: *const i8, ulflags: u32, cbentryid: u32, lpentryid: *const ENTRYID) -> windows_core::Result<()>; fn GetReceiveFolder(&self, lpszmessageclass: *const i8, ulflags: u32, lpcbentryid: *mut u32, lppentryid: *mut *mut ENTRYID, lppszexplicitclass: *mut *mut i8) -> windows_core::Result<()>; fn GetReceiveFolderTable(&self, ulflags: u32) -> windows_core::Result; fn StoreLogoff(&self, lpulflags: *mut u32) -> windows_core::Result<()>; fn AbortSubmit(&self, cbentryid: u32, lpentryid: *const ENTRYID, ulflags: u32) -> windows_core::Result<()>; fn GetOutgoingQueue(&self, ulflags: u32) -> windows_core::Result; - fn SetLockState(&self, lpmessage: Option<&IMessage>, ullockstate: u32) -> windows_core::Result<()>; + fn SetLockState(&self, lpmessage: windows_core::Ref<'_, IMessage>, ullockstate: u32) -> windows_core::Result<()>; fn FinishedMsg(&self, ulflags: u32, cbentryid: u32, lpentryid: *const ENTRYID) -> windows_core::Result<()>; fn NotifyNewMail(&self, lpnotification: *const NOTIFICATION) -> windows_core::Result<()>; } @@ -2497,7 +2497,7 @@ impl IMsgStore_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, cbentryid: u32, lpentryid: *const ENTRYID, uleventmask: u32, lpadvisesink: *mut core::ffi::c_void, lpulconnection: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMsgStore_Impl::Advise(this, core::mem::transmute_copy(&cbentryid), core::mem::transmute_copy(&lpentryid), core::mem::transmute_copy(&uleventmask), windows_core::from_raw_borrowed(&lpadvisesink)) { + match IMsgStore_Impl::Advise(this, core::mem::transmute_copy(&cbentryid), core::mem::transmute_copy(&lpentryid), core::mem::transmute_copy(&uleventmask), core::mem::transmute_copy(&lpadvisesink)) { Ok(ok__) => { lpulconnection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2561,7 +2561,7 @@ impl IMsgStore_Vtbl { } unsafe extern "system" fn SetLockState(this: *mut core::ffi::c_void, lpmessage: *mut core::ffi::c_void, ullockstate: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMsgStore_Impl::SetLockState(this, windows_core::from_raw_borrowed(&lpmessage), core::mem::transmute_copy(&ullockstate)).into() + IMsgStore_Impl::SetLockState(this, core::mem::transmute_copy(&lpmessage), core::mem::transmute_copy(&ullockstate)).into() } unsafe extern "system" fn FinishedMsg(this: *mut core::ffi::c_void, ulflags: u32, cbentryid: u32, lpentryid: *const ENTRYID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2873,7 +2873,7 @@ pub struct ITableData_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITableData_Impl: windows_core::IUnknownImpl { - fn HrGetView(&self, lpssortorderset: *mut SSortOrderSet, lpfcallerrelease: *mut CALLERRELEASE, ulcallerdata: u32, lppmapitable: *mut Option) -> windows_core::Result<()>; + fn HrGetView(&self, lpssortorderset: *mut SSortOrderSet, lpfcallerrelease: *mut CALLERRELEASE, ulcallerdata: u32, lppmapitable: windows_core::OutRef<'_, IMAPITable>) -> windows_core::Result<()>; fn HrModifyRow(&self, param0: *mut SRow) -> windows_core::Result<()>; fn HrDeleteRow(&self, lpspropvalue: *mut SPropValue) -> windows_core::Result<()>; fn HrQueryRow(&self, lpspropvalue: *mut SPropValue, lppsrow: *mut *mut SRow, lpulirow: *mut u32) -> windows_core::Result<()>; @@ -3070,13 +3070,13 @@ pub trait IWABObject_Impl: windows_core::IUnknownImpl { fn FreeBuffer(&self, lpbuffer: *const core::ffi::c_void) -> windows_core::Result<()>; fn Backup(&self, lpfilename: &windows_core::PCSTR) -> windows_core::Result<()>; fn Import(&self, lpwip: &windows_core::PCSTR) -> windows_core::Result<()>; - fn Find(&self, lpiab: Option<&IAddrBook>, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; - fn VCardDisplay(&self, lpiab: Option<&IAddrBook>, hwnd: super::super::Foundation::HWND, lpszfilename: &windows_core::PCSTR) -> windows_core::Result<()>; - fn LDAPUrl(&self, lpiab: Option<&IAddrBook>, hwnd: super::super::Foundation::HWND, ulflags: u32, lpszurl: &windows_core::PCSTR) -> windows_core::Result; - fn VCardCreate(&self, lpiab: Option<&IAddrBook>, ulflags: u32, lpszvcard: &windows_core::PCSTR, lpmailuser: Option<&IMailUser>) -> windows_core::Result<()>; - fn VCardRetrieve(&self, lpiab: Option<&IAddrBook>, ulflags: u32, lpszvcard: &windows_core::PCSTR) -> windows_core::Result; - fn GetMe(&self, lpiab: Option<&IAddrBook>, ulflags: u32, lpdwaction: *mut u32, lpsbeid: *mut SBinary, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; - fn SetMe(&self, lpiab: Option<&IAddrBook>, ulflags: u32, sbeid: &SBinary, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; + fn Find(&self, lpiab: windows_core::Ref<'_, IAddrBook>, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; + fn VCardDisplay(&self, lpiab: windows_core::Ref<'_, IAddrBook>, hwnd: super::super::Foundation::HWND, lpszfilename: &windows_core::PCSTR) -> windows_core::Result<()>; + fn LDAPUrl(&self, lpiab: windows_core::Ref<'_, IAddrBook>, hwnd: super::super::Foundation::HWND, ulflags: u32, lpszurl: &windows_core::PCSTR) -> windows_core::Result; + fn VCardCreate(&self, lpiab: windows_core::Ref<'_, IAddrBook>, ulflags: u32, lpszvcard: &windows_core::PCSTR, lpmailuser: windows_core::Ref<'_, IMailUser>) -> windows_core::Result<()>; + fn VCardRetrieve(&self, lpiab: windows_core::Ref<'_, IAddrBook>, ulflags: u32, lpszvcard: &windows_core::PCSTR) -> windows_core::Result; + fn GetMe(&self, lpiab: windows_core::Ref<'_, IAddrBook>, ulflags: u32, lpdwaction: *mut u32, lpsbeid: *mut SBinary, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; + fn SetMe(&self, lpiab: windows_core::Ref<'_, IAddrBook>, ulflags: u32, sbeid: &SBinary, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; } impl IWABObject_Vtbl { pub const fn new() -> Self { @@ -3106,15 +3106,15 @@ impl IWABObject_Vtbl { } unsafe extern "system" fn Find(this: *mut core::ffi::c_void, lpiab: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWABObject_Impl::Find(this, windows_core::from_raw_borrowed(&lpiab), core::mem::transmute_copy(&hwnd)).into() + IWABObject_Impl::Find(this, core::mem::transmute_copy(&lpiab), core::mem::transmute_copy(&hwnd)).into() } unsafe extern "system" fn VCardDisplay(this: *mut core::ffi::c_void, lpiab: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, lpszfilename: windows_core::PCSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWABObject_Impl::VCardDisplay(this, windows_core::from_raw_borrowed(&lpiab), core::mem::transmute_copy(&hwnd), core::mem::transmute(&lpszfilename)).into() + IWABObject_Impl::VCardDisplay(this, core::mem::transmute_copy(&lpiab), core::mem::transmute_copy(&hwnd), core::mem::transmute(&lpszfilename)).into() } unsafe extern "system" fn LDAPUrl(this: *mut core::ffi::c_void, lpiab: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, ulflags: u32, lpszurl: windows_core::PCSTR, lppmailuser: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWABObject_Impl::LDAPUrl(this, windows_core::from_raw_borrowed(&lpiab), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&ulflags), core::mem::transmute(&lpszurl)) { + match IWABObject_Impl::LDAPUrl(this, core::mem::transmute_copy(&lpiab), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&ulflags), core::mem::transmute(&lpszurl)) { Ok(ok__) => { lppmailuser.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3124,11 +3124,11 @@ impl IWABObject_Vtbl { } unsafe extern "system" fn VCardCreate(this: *mut core::ffi::c_void, lpiab: *mut core::ffi::c_void, ulflags: u32, lpszvcard: windows_core::PCSTR, lpmailuser: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWABObject_Impl::VCardCreate(this, windows_core::from_raw_borrowed(&lpiab), core::mem::transmute_copy(&ulflags), core::mem::transmute(&lpszvcard), windows_core::from_raw_borrowed(&lpmailuser)).into() + IWABObject_Impl::VCardCreate(this, core::mem::transmute_copy(&lpiab), core::mem::transmute_copy(&ulflags), core::mem::transmute(&lpszvcard), core::mem::transmute_copy(&lpmailuser)).into() } unsafe extern "system" fn VCardRetrieve(this: *mut core::ffi::c_void, lpiab: *mut core::ffi::c_void, ulflags: u32, lpszvcard: windows_core::PCSTR, lppmailuser: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWABObject_Impl::VCardRetrieve(this, windows_core::from_raw_borrowed(&lpiab), core::mem::transmute_copy(&ulflags), core::mem::transmute(&lpszvcard)) { + match IWABObject_Impl::VCardRetrieve(this, core::mem::transmute_copy(&lpiab), core::mem::transmute_copy(&ulflags), core::mem::transmute(&lpszvcard)) { Ok(ok__) => { lppmailuser.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3138,11 +3138,11 @@ impl IWABObject_Vtbl { } unsafe extern "system" fn GetMe(this: *mut core::ffi::c_void, lpiab: *mut core::ffi::c_void, ulflags: u32, lpdwaction: *mut u32, lpsbeid: *mut SBinary, hwnd: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWABObject_Impl::GetMe(this, windows_core::from_raw_borrowed(&lpiab), core::mem::transmute_copy(&ulflags), core::mem::transmute_copy(&lpdwaction), core::mem::transmute_copy(&lpsbeid), core::mem::transmute_copy(&hwnd)).into() + IWABObject_Impl::GetMe(this, core::mem::transmute_copy(&lpiab), core::mem::transmute_copy(&ulflags), core::mem::transmute_copy(&lpdwaction), core::mem::transmute_copy(&lpsbeid), core::mem::transmute_copy(&hwnd)).into() } unsafe extern "system" fn SetMe(this: *mut core::ffi::c_void, lpiab: *mut core::ffi::c_void, ulflags: u32, sbeid: SBinary, hwnd: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWABObject_Impl::SetMe(this, windows_core::from_raw_borrowed(&lpiab), core::mem::transmute_copy(&ulflags), core::mem::transmute(&sbeid), core::mem::transmute_copy(&hwnd)).into() + IWABObject_Impl::SetMe(this, core::mem::transmute_copy(&lpiab), core::mem::transmute_copy(&ulflags), core::mem::transmute(&sbeid), core::mem::transmute_copy(&hwnd)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs index 749d15e702..bef93557dc 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs @@ -286,14 +286,14 @@ pub struct IAntimalware_Vtbl { pub CloseSession: unsafe extern "system" fn(*mut core::ffi::c_void, u64), } pub trait IAntimalware_Impl: windows_core::IUnknownImpl { - fn Scan(&self, stream: Option<&IAmsiStream>, result: *mut AMSI_RESULT, provider: *mut Option) -> windows_core::Result<()>; + fn Scan(&self, stream: windows_core::Ref<'_, IAmsiStream>, result: *mut AMSI_RESULT, provider: windows_core::OutRef<'_, IAntimalwareProvider>) -> windows_core::Result<()>; fn CloseSession(&self, session: u64); } impl IAntimalware_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Scan(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, result: *mut AMSI_RESULT, provider: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAntimalware_Impl::Scan(this, windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&result), core::mem::transmute_copy(&provider)).into() + IAntimalware_Impl::Scan(this, core::mem::transmute_copy(&stream), core::mem::transmute_copy(&result), core::mem::transmute_copy(&provider)).into() } unsafe extern "system" fn CloseSession(this: *mut core::ffi::c_void, session: u64) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -377,7 +377,7 @@ pub struct IAntimalwareProvider_Vtbl { pub DisplayName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, } pub trait IAntimalwareProvider_Impl: windows_core::IUnknownImpl { - fn Scan(&self, stream: Option<&IAmsiStream>) -> windows_core::Result; + fn Scan(&self, stream: windows_core::Ref<'_, IAmsiStream>) -> windows_core::Result; fn CloseSession(&self, session: u64); fn DisplayName(&self) -> windows_core::Result; } @@ -385,7 +385,7 @@ impl IAntimalwareProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Scan(this: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, result: *mut AMSI_RESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAntimalwareProvider_Impl::Scan(this, windows_core::from_raw_borrowed(&stream)) { + match IAntimalwareProvider_Impl::Scan(this, core::mem::transmute_copy(&stream)) { Ok(ok__) => { result.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs index d9ee4cff08..a12a3db8a2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs @@ -3282,7 +3282,7 @@ pub struct IAssemblyCache_Vtbl { pub trait IAssemblyCache_Impl: windows_core::IUnknownImpl { fn UninstallAssembly(&self, dwflags: u32, pszassemblyname: &windows_core::PCWSTR, prefdata: *mut FUSION_INSTALL_REFERENCE, puldisposition: *mut IASSEMBLYCACHE_UNINSTALL_DISPOSITION) -> windows_core::Result<()>; fn QueryAssemblyInfo(&self, dwflags: QUERYASMINFO_FLAGS, pszassemblyname: &windows_core::PCWSTR, pasminfo: *mut ASSEMBLY_INFO) -> windows_core::Result<()>; - fn CreateAssemblyCacheItem(&self, dwflags: u32, pvreserved: *mut core::ffi::c_void, ppasmitem: *mut Option, pszassemblyname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn CreateAssemblyCacheItem(&self, dwflags: u32, pvreserved: *mut core::ffi::c_void, ppasmitem: windows_core::OutRef<'_, IAssemblyCacheItem>, pszassemblyname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Reserved(&self) -> windows_core::Result; fn InstallAssembly(&self, dwflags: u32, pszmanifestfilepath: &windows_core::PCWSTR, prefdata: *mut FUSION_INSTALL_REFERENCE) -> windows_core::Result<()>; } @@ -3357,7 +3357,7 @@ pub struct IAssemblyCacheItem_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAssemblyCacheItem_Impl: windows_core::IUnknownImpl { - fn CreateStream(&self, dwflags: u32, pszstreamname: &windows_core::PCWSTR, dwformat: u32, dwformatflags: u32, ppistream: *mut Option, pulimaxsize: *mut u64) -> windows_core::Result<()>; + fn CreateStream(&self, dwflags: u32, pszstreamname: &windows_core::PCWSTR, dwformat: u32, dwformatflags: u32, ppistream: windows_core::OutRef<'_, super::Com::IStream>, pulimaxsize: *mut u64) -> windows_core::Result<()>; fn Commit(&self, dwflags: u32, puldisposition: *mut u32) -> windows_core::Result<()>; fn AbortItem(&self) -> windows_core::Result<()>; } @@ -3447,10 +3447,10 @@ pub trait IAssemblyName_Impl: windows_core::IUnknownImpl { fn GetProperty(&self, propertyid: u32, pvproperty: *mut core::ffi::c_void, pcbproperty: *mut u32) -> windows_core::Result<()>; fn Finalize(&self) -> windows_core::Result<()>; fn GetDisplayName(&self, szdisplayname: windows_core::PWSTR, pccdisplayname: *mut u32, dwdisplayflags: u32) -> windows_core::Result<()>; - fn Reserved(&self, refiid: *const windows_core::GUID, punkreserved1: Option<&windows_core::IUnknown>, punkreserved2: Option<&windows_core::IUnknown>, szreserved: &windows_core::PCWSTR, llreserved: i64, pvreserved: *mut core::ffi::c_void, cbreserved: u32, ppreserved: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn Reserved(&self, refiid: *const windows_core::GUID, punkreserved1: windows_core::Ref<'_, windows_core::IUnknown>, punkreserved2: windows_core::Ref<'_, windows_core::IUnknown>, szreserved: &windows_core::PCWSTR, llreserved: i64, pvreserved: *mut core::ffi::c_void, cbreserved: u32, ppreserved: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetName(&self, lpcwbuffer: *mut u32, pwzname: windows_core::PWSTR) -> windows_core::Result<()>; fn GetVersion(&self, pdwversionhi: *mut u32, pdwversionlow: *mut u32) -> windows_core::Result<()>; - fn IsEqual(&self, pname: Option<&IAssemblyName>, dwcmpflags: u32) -> windows_core::Result<()>; + fn IsEqual(&self, pname: windows_core::Ref<'_, IAssemblyName>, dwcmpflags: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } impl IAssemblyName_Vtbl { @@ -3473,7 +3473,7 @@ impl IAssemblyName_Vtbl { } unsafe extern "system" fn Reserved(this: *mut core::ffi::c_void, refiid: *const windows_core::GUID, punkreserved1: *mut core::ffi::c_void, punkreserved2: *mut core::ffi::c_void, szreserved: windows_core::PCWSTR, llreserved: i64, pvreserved: *mut core::ffi::c_void, cbreserved: u32, ppreserved: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAssemblyName_Impl::Reserved(this, core::mem::transmute_copy(&refiid), windows_core::from_raw_borrowed(&punkreserved1), windows_core::from_raw_borrowed(&punkreserved2), core::mem::transmute(&szreserved), core::mem::transmute_copy(&llreserved), core::mem::transmute_copy(&pvreserved), core::mem::transmute_copy(&cbreserved), core::mem::transmute_copy(&ppreserved)).into() + IAssemblyName_Impl::Reserved(this, core::mem::transmute_copy(&refiid), core::mem::transmute_copy(&punkreserved1), core::mem::transmute_copy(&punkreserved2), core::mem::transmute(&szreserved), core::mem::transmute_copy(&llreserved), core::mem::transmute_copy(&pvreserved), core::mem::transmute_copy(&cbreserved), core::mem::transmute_copy(&ppreserved)).into() } unsafe extern "system" fn GetName(this: *mut core::ffi::c_void, lpcwbuffer: *mut u32, pwzname: windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3485,7 +3485,7 @@ impl IAssemblyName_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, pname: *mut core::ffi::c_void, dwcmpflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAssemblyName_Impl::IsEqual(this, windows_core::from_raw_borrowed(&pname), core::mem::transmute_copy(&dwcmpflags)).into() + IAssemblyName_Impl::IsEqual(this, core::mem::transmute_copy(&pname), core::mem::transmute_copy(&dwcmpflags)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, pname: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3546,7 +3546,7 @@ pub struct IEnumMsmDependency_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumMsmDependency_Impl: windows_core::IUnknownImpl { - fn Next(&self, cfetch: u32, rgmsmdependencies: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cfetch: u32, rgmsmdependencies: windows_core::OutRef<'_, IMsmDependency>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cskip: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -3621,7 +3621,7 @@ pub struct IEnumMsmError_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IEnumMsmError_Impl: windows_core::IUnknownImpl { - fn Next(&self, cfetch: u32, rgmsmerrors: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cfetch: u32, rgmsmerrors: windows_core::OutRef<'_, IMsmError>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cskip: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -6304,12 +6304,12 @@ pub struct IPMEnumerationManager_Vtbl { pub get_StartAppEnumeratorBlob: unsafe extern "system" fn(*mut core::ffi::c_void, PM_ENUM_FILTER, *mut u32, *mut *mut PM_STARTAPPBLOB) -> windows_core::HRESULT, } pub trait IPMEnumerationManager_Impl: windows_core::IUnknownImpl { - fn get_AllApplications(&self, ppappenum: *mut Option, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; - fn get_AllTiles(&self, pptileenum: *mut Option, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; - fn get_AllTasks(&self, pptaskenum: *mut Option, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; - fn get_AllExtensions(&self, ppextensionenum: *mut Option, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; - fn get_AllBackgroundServiceAgents(&self, ppbsaenum: *mut Option, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; - fn get_AllBackgroundWorkers(&self, ppbswenum: *mut Option, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; + fn get_AllApplications(&self, ppappenum: windows_core::OutRef<'_, IPMApplicationInfoEnumerator>, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; + fn get_AllTiles(&self, pptileenum: windows_core::OutRef<'_, IPMTileInfoEnumerator>, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; + fn get_AllTasks(&self, pptaskenum: windows_core::OutRef<'_, IPMTaskInfoEnumerator>, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; + fn get_AllExtensions(&self, ppextensionenum: windows_core::OutRef<'_, IPMExtensionInfoEnumerator>, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; + fn get_AllBackgroundServiceAgents(&self, ppbsaenum: windows_core::OutRef<'_, IPMBackgroundServiceAgentInfoEnumerator>, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; + fn get_AllBackgroundWorkers(&self, ppbswenum: windows_core::OutRef<'_, IPMBackgroundWorkerInfoEnumerator>, filter: &PM_ENUM_FILTER) -> windows_core::Result<()>; fn get_ApplicationInfo(&self, productid: &windows_core::GUID) -> windows_core::Result; fn get_TileInfo(&self, productid: &windows_core::GUID, tileid: &windows_core::BSTR) -> windows_core::Result; fn get_TaskInfo(&self, productid: &windows_core::GUID, taskid: &windows_core::BSTR) -> windows_core::Result; diff --git a/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs b/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs index 1c8a02a6e2..6d06f71ed6 100644 --- a/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/AssessmentTool/mod.rs @@ -82,19 +82,19 @@ pub struct IInitiateWinSATAssessment_Vtbl { pub CancelAssessment: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IInitiateWinSATAssessment_Impl: windows_core::IUnknownImpl { - fn InitiateAssessment(&self, cmdline: &windows_core::PCWSTR, pcallbacks: Option<&IWinSATInitiateEvents>, callerhwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; - fn InitiateFormalAssessment(&self, pcallbacks: Option<&IWinSATInitiateEvents>, callerhwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; + fn InitiateAssessment(&self, cmdline: &windows_core::PCWSTR, pcallbacks: windows_core::Ref<'_, IWinSATInitiateEvents>, callerhwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; + fn InitiateFormalAssessment(&self, pcallbacks: windows_core::Ref<'_, IWinSATInitiateEvents>, callerhwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; fn CancelAssessment(&self) -> windows_core::Result<()>; } impl IInitiateWinSATAssessment_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitiateAssessment(this: *mut core::ffi::c_void, cmdline: windows_core::PCWSTR, pcallbacks: *mut core::ffi::c_void, callerhwnd: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInitiateWinSATAssessment_Impl::InitiateAssessment(this, core::mem::transmute(&cmdline), windows_core::from_raw_borrowed(&pcallbacks), core::mem::transmute_copy(&callerhwnd)).into() + IInitiateWinSATAssessment_Impl::InitiateAssessment(this, core::mem::transmute(&cmdline), core::mem::transmute_copy(&pcallbacks), core::mem::transmute_copy(&callerhwnd)).into() } unsafe extern "system" fn InitiateFormalAssessment(this: *mut core::ffi::c_void, pcallbacks: *mut core::ffi::c_void, callerhwnd: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInitiateWinSATAssessment_Impl::InitiateFormalAssessment(this, windows_core::from_raw_borrowed(&pcallbacks), core::mem::transmute_copy(&callerhwnd)).into() + IInitiateWinSATAssessment_Impl::InitiateFormalAssessment(this, core::mem::transmute_copy(&pcallbacks), core::mem::transmute_copy(&callerhwnd)).into() } unsafe extern "system" fn CancelAssessment(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs index a8965f5290..0ba671c0fa 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs @@ -507,13 +507,13 @@ pub struct IAppDomainBinding_Vtbl { pub OnAppDomain: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAppDomainBinding_Impl: windows_core::IUnknownImpl { - fn OnAppDomain(&self, pappdomain: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnAppDomain(&self, pappdomain: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IAppDomainBinding_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnAppDomain(this: *mut core::ffi::c_void, pappdomain: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppDomainBinding_Impl::OnAppDomain(this, windows_core::from_raw_borrowed(&pappdomain)).into() + IAppDomainBinding_Impl::OnAppDomain(this, core::mem::transmute_copy(&pappdomain)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnAppDomain: OnAppDomain:: } } @@ -646,9 +646,9 @@ pub struct ICLRAssemblyIdentityManager_Vtbl { pub trait ICLRAssemblyIdentityManager_Impl: windows_core::IUnknownImpl { fn GetCLRAssemblyReferenceList(&self, ppwzassemblyreferences: *const windows_core::PCWSTR, dwnumofreferences: u32) -> windows_core::Result; fn GetBindingIdentityFromFile(&self, pwzfilepath: &windows_core::PCWSTR, dwflags: u32, pwzbuffer: windows_core::PWSTR, pcchbuffersize: *mut u32) -> windows_core::Result<()>; - fn GetBindingIdentityFromStream(&self, pstream: Option<&super::Com::IStream>, dwflags: u32, pwzbuffer: windows_core::PWSTR, pcchbuffersize: *mut u32) -> windows_core::Result<()>; - fn GetReferencedAssembliesFromFile(&self, pwzfilepath: &windows_core::PCWSTR, dwflags: u32, pexcludeassemblieslist: Option<&ICLRAssemblyReferenceList>) -> windows_core::Result; - fn GetReferencedAssembliesFromStream(&self, pstream: Option<&super::Com::IStream>, dwflags: u32, pexcludeassemblieslist: Option<&ICLRAssemblyReferenceList>) -> windows_core::Result; + fn GetBindingIdentityFromStream(&self, pstream: windows_core::Ref<'_, super::Com::IStream>, dwflags: u32, pwzbuffer: windows_core::PWSTR, pcchbuffersize: *mut u32) -> windows_core::Result<()>; + fn GetReferencedAssembliesFromFile(&self, pwzfilepath: &windows_core::PCWSTR, dwflags: u32, pexcludeassemblieslist: windows_core::Ref<'_, ICLRAssemblyReferenceList>) -> windows_core::Result; + fn GetReferencedAssembliesFromStream(&self, pstream: windows_core::Ref<'_, super::Com::IStream>, dwflags: u32, pexcludeassemblieslist: windows_core::Ref<'_, ICLRAssemblyReferenceList>) -> windows_core::Result; fn GetProbingAssembliesFromReference(&self, dwmachinetype: u32, dwflags: u32, pwzreferenceidentity: &windows_core::PCWSTR) -> windows_core::Result; fn IsStronglyNamed(&self, pwzassemblyidentity: &windows_core::PCWSTR) -> windows_core::Result; } @@ -671,11 +671,11 @@ impl ICLRAssemblyIdentityManager_Vtbl { } unsafe extern "system" fn GetBindingIdentityFromStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, dwflags: u32, pwzbuffer: windows_core::PWSTR, pcchbuffersize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICLRAssemblyIdentityManager_Impl::GetBindingIdentityFromStream(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pwzbuffer), core::mem::transmute_copy(&pcchbuffersize)).into() + ICLRAssemblyIdentityManager_Impl::GetBindingIdentityFromStream(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pwzbuffer), core::mem::transmute_copy(&pcchbuffersize)).into() } unsafe extern "system" fn GetReferencedAssembliesFromFile(this: *mut core::ffi::c_void, pwzfilepath: windows_core::PCWSTR, dwflags: u32, pexcludeassemblieslist: *mut core::ffi::c_void, ppreferenceenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICLRAssemblyIdentityManager_Impl::GetReferencedAssembliesFromFile(this, core::mem::transmute(&pwzfilepath), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pexcludeassemblieslist)) { + match ICLRAssemblyIdentityManager_Impl::GetReferencedAssembliesFromFile(this, core::mem::transmute(&pwzfilepath), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pexcludeassemblieslist)) { Ok(ok__) => { ppreferenceenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -685,7 +685,7 @@ impl ICLRAssemblyIdentityManager_Vtbl { } unsafe extern "system" fn GetReferencedAssembliesFromStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, dwflags: u32, pexcludeassemblieslist: *mut core::ffi::c_void, ppreferenceenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICLRAssemblyIdentityManager_Impl::GetReferencedAssembliesFromStream(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pexcludeassemblieslist)) { + match ICLRAssemblyIdentityManager_Impl::GetReferencedAssembliesFromStream(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pexcludeassemblieslist)) { Ok(ok__) => { ppreferenceenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -754,7 +754,7 @@ pub struct ICLRAssemblyReferenceList_Vtbl { } pub trait ICLRAssemblyReferenceList_Impl: windows_core::IUnknownImpl { fn IsStringAssemblyReferenceInList(&self, pwzassemblyname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn IsAssemblyReferenceInList(&self, pname: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn IsAssemblyReferenceInList(&self, pname: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ICLRAssemblyReferenceList_Vtbl { pub const fn new() -> Self { @@ -764,7 +764,7 @@ impl ICLRAssemblyReferenceList_Vtbl { } unsafe extern "system" fn IsAssemblyReferenceInList(this: *mut core::ffi::c_void, pname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICLRAssemblyReferenceList_Impl::IsAssemblyReferenceInList(this, windows_core::from_raw_borrowed(&pname)).into() + ICLRAssemblyReferenceList_Impl::IsAssemblyReferenceInList(this, core::mem::transmute_copy(&pname)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -962,14 +962,14 @@ pub struct ICLRDebugging_Vtbl { pub CanUnloadNow: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HMODULE) -> windows_core::HRESULT, } pub trait ICLRDebugging_Impl: windows_core::IUnknownImpl { - fn OpenVirtualProcess(&self, modulebaseaddress: u64, pdatatarget: Option<&windows_core::IUnknown>, plibraryprovider: Option<&ICLRDebuggingLibraryProvider>, pmaxdebuggersupportedversion: *const CLR_DEBUGGING_VERSION, riidprocess: *const windows_core::GUID, ppprocess: *mut Option, pversion: *mut CLR_DEBUGGING_VERSION, pdwflags: *mut CLR_DEBUGGING_PROCESS_FLAGS) -> windows_core::Result<()>; + fn OpenVirtualProcess(&self, modulebaseaddress: u64, pdatatarget: windows_core::Ref<'_, windows_core::IUnknown>, plibraryprovider: windows_core::Ref<'_, ICLRDebuggingLibraryProvider>, pmaxdebuggersupportedversion: *const CLR_DEBUGGING_VERSION, riidprocess: *const windows_core::GUID, ppprocess: windows_core::OutRef<'_, windows_core::IUnknown>, pversion: *mut CLR_DEBUGGING_VERSION, pdwflags: *mut CLR_DEBUGGING_PROCESS_FLAGS) -> windows_core::Result<()>; fn CanUnloadNow(&self, hmodule: super::super::Foundation::HMODULE) -> windows_core::Result<()>; } impl ICLRDebugging_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OpenVirtualProcess(this: *mut core::ffi::c_void, modulebaseaddress: u64, pdatatarget: *mut core::ffi::c_void, plibraryprovider: *mut core::ffi::c_void, pmaxdebuggersupportedversion: *const CLR_DEBUGGING_VERSION, riidprocess: *const windows_core::GUID, ppprocess: *mut *mut core::ffi::c_void, pversion: *mut CLR_DEBUGGING_VERSION, pdwflags: *mut CLR_DEBUGGING_PROCESS_FLAGS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICLRDebugging_Impl::OpenVirtualProcess(this, core::mem::transmute_copy(&modulebaseaddress), windows_core::from_raw_borrowed(&pdatatarget), windows_core::from_raw_borrowed(&plibraryprovider), core::mem::transmute_copy(&pmaxdebuggersupportedversion), core::mem::transmute_copy(&riidprocess), core::mem::transmute_copy(&ppprocess), core::mem::transmute_copy(&pversion), core::mem::transmute_copy(&pdwflags)).into() + ICLRDebugging_Impl::OpenVirtualProcess(this, core::mem::transmute_copy(&modulebaseaddress), core::mem::transmute_copy(&pdatatarget), core::mem::transmute_copy(&plibraryprovider), core::mem::transmute_copy(&pmaxdebuggersupportedversion), core::mem::transmute_copy(&riidprocess), core::mem::transmute_copy(&ppprocess), core::mem::transmute_copy(&pversion), core::mem::transmute_copy(&pdwflags)).into() } unsafe extern "system" fn CanUnloadNow(this: *mut core::ffi::c_void, hmodule: super::super::Foundation::HMODULE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1502,14 +1502,14 @@ pub struct ICLRMetaHostPolicy_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ICLRMetaHostPolicy_Impl: windows_core::IUnknownImpl { - fn GetRequestedRuntime(&self, dwpolicyflags: METAHOST_POLICY_FLAGS, pwzbinary: &windows_core::PCWSTR, pcfgstream: Option<&super::Com::IStream>, pwzversion: &windows_core::PWSTR, pcchversion: *mut u32, pwzimageversion: windows_core::PWSTR, pcchimageversion: *mut u32, pdwconfigflags: *mut u32, riid: *const windows_core::GUID, ppruntime: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn GetRequestedRuntime(&self, dwpolicyflags: METAHOST_POLICY_FLAGS, pwzbinary: &windows_core::PCWSTR, pcfgstream: windows_core::Ref<'_, super::Com::IStream>, pwzversion: &windows_core::PWSTR, pcchversion: *mut u32, pwzimageversion: windows_core::PWSTR, pcchimageversion: *mut u32, pdwconfigflags: *mut u32, riid: *const windows_core::GUID, ppruntime: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ICLRMetaHostPolicy_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetRequestedRuntime(this: *mut core::ffi::c_void, dwpolicyflags: METAHOST_POLICY_FLAGS, pwzbinary: windows_core::PCWSTR, pcfgstream: *mut core::ffi::c_void, pwzversion: windows_core::PWSTR, pcchversion: *mut u32, pwzimageversion: windows_core::PWSTR, pcchimageversion: *mut u32, pdwconfigflags: *mut u32, riid: *const windows_core::GUID, ppruntime: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICLRMetaHostPolicy_Impl::GetRequestedRuntime(this, core::mem::transmute_copy(&dwpolicyflags), core::mem::transmute(&pwzbinary), windows_core::from_raw_borrowed(&pcfgstream), core::mem::transmute(&pwzversion), core::mem::transmute_copy(&pcchversion), core::mem::transmute_copy(&pwzimageversion), core::mem::transmute_copy(&pcchimageversion), core::mem::transmute_copy(&pdwconfigflags), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppruntime)).into() + ICLRMetaHostPolicy_Impl::GetRequestedRuntime(this, core::mem::transmute_copy(&dwpolicyflags), core::mem::transmute(&pwzbinary), core::mem::transmute_copy(&pcfgstream), core::mem::transmute(&pwzversion), core::mem::transmute_copy(&pcchversion), core::mem::transmute_copy(&pwzimageversion), core::mem::transmute_copy(&pcchimageversion), core::mem::transmute_copy(&pdwconfigflags), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppruntime)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), GetRequestedRuntime: GetRequestedRuntime:: } } @@ -1542,18 +1542,18 @@ pub struct ICLROnEventManager_Vtbl { pub UnregisterActionOnEvent: unsafe extern "system" fn(*mut core::ffi::c_void, EClrEvent, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICLROnEventManager_Impl: windows_core::IUnknownImpl { - fn RegisterActionOnEvent(&self, event: EClrEvent, paction: Option<&IActionOnCLREvent>) -> windows_core::Result<()>; - fn UnregisterActionOnEvent(&self, event: EClrEvent, paction: Option<&IActionOnCLREvent>) -> windows_core::Result<()>; + fn RegisterActionOnEvent(&self, event: EClrEvent, paction: windows_core::Ref<'_, IActionOnCLREvent>) -> windows_core::Result<()>; + fn UnregisterActionOnEvent(&self, event: EClrEvent, paction: windows_core::Ref<'_, IActionOnCLREvent>) -> windows_core::Result<()>; } impl ICLROnEventManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterActionOnEvent(this: *mut core::ffi::c_void, event: EClrEvent, paction: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICLROnEventManager_Impl::RegisterActionOnEvent(this, core::mem::transmute_copy(&event), windows_core::from_raw_borrowed(&paction)).into() + ICLROnEventManager_Impl::RegisterActionOnEvent(this, core::mem::transmute_copy(&event), core::mem::transmute_copy(&paction)).into() } unsafe extern "system" fn UnregisterActionOnEvent(this: *mut core::ffi::c_void, event: EClrEvent, paction: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICLROnEventManager_Impl::UnregisterActionOnEvent(this, core::mem::transmute_copy(&event), windows_core::from_raw_borrowed(&paction)).into() + ICLROnEventManager_Impl::UnregisterActionOnEvent(this, core::mem::transmute_copy(&event), core::mem::transmute_copy(&paction)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1797,7 +1797,7 @@ pub struct ICLRRuntimeHost_Vtbl { pub trait ICLRRuntimeHost_Impl: windows_core::IUnknownImpl { fn Start(&self) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; - fn SetHostControl(&self, phostcontrol: Option<&IHostControl>) -> windows_core::Result<()>; + fn SetHostControl(&self, phostcontrol: windows_core::Ref<'_, IHostControl>) -> windows_core::Result<()>; fn GetCLRControl(&self) -> windows_core::Result; fn UnloadAppDomain(&self, dwappdomainid: u32, fwaituntildone: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn ExecuteInAppDomain(&self, dwappdomainid: u32, pcallback: FExecuteInAppDomainCallback, cookie: *const core::ffi::c_void) -> windows_core::Result<()>; @@ -1817,7 +1817,7 @@ impl ICLRRuntimeHost_Vtbl { } unsafe extern "system" fn SetHostControl(this: *mut core::ffi::c_void, phostcontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICLRRuntimeHost_Impl::SetHostControl(this, windows_core::from_raw_borrowed(&phostcontrol)).into() + ICLRRuntimeHost_Impl::SetHostControl(this, core::mem::transmute_copy(&phostcontrol)).into() } unsafe extern "system" fn GetCLRControl(this: *mut core::ffi::c_void, pclrcontrol: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2989,24 +2989,24 @@ pub struct ICorConfiguration_Vtbl { pub AddDebuggerSpecialThread: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait ICorConfiguration_Impl: windows_core::IUnknownImpl { - fn SetGCThreadControl(&self, pgcthreadcontrol: Option<&IGCThreadControl>) -> windows_core::Result<()>; - fn SetGCHostControl(&self, pgchostcontrol: Option<&IGCHostControl>) -> windows_core::Result<()>; - fn SetDebuggerThreadControl(&self, pdebuggerthreadcontrol: Option<&IDebuggerThreadControl>) -> windows_core::Result<()>; + fn SetGCThreadControl(&self, pgcthreadcontrol: windows_core::Ref<'_, IGCThreadControl>) -> windows_core::Result<()>; + fn SetGCHostControl(&self, pgchostcontrol: windows_core::Ref<'_, IGCHostControl>) -> windows_core::Result<()>; + fn SetDebuggerThreadControl(&self, pdebuggerthreadcontrol: windows_core::Ref<'_, IDebuggerThreadControl>) -> windows_core::Result<()>; fn AddDebuggerSpecialThread(&self, dwspecialthreadid: u32) -> windows_core::Result<()>; } impl ICorConfiguration_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetGCThreadControl(this: *mut core::ffi::c_void, pgcthreadcontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICorConfiguration_Impl::SetGCThreadControl(this, windows_core::from_raw_borrowed(&pgcthreadcontrol)).into() + ICorConfiguration_Impl::SetGCThreadControl(this, core::mem::transmute_copy(&pgcthreadcontrol)).into() } unsafe extern "system" fn SetGCHostControl(this: *mut core::ffi::c_void, pgchostcontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICorConfiguration_Impl::SetGCHostControl(this, windows_core::from_raw_borrowed(&pgchostcontrol)).into() + ICorConfiguration_Impl::SetGCHostControl(this, core::mem::transmute_copy(&pgchostcontrol)).into() } unsafe extern "system" fn SetDebuggerThreadControl(this: *mut core::ffi::c_void, pdebuggerthreadcontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICorConfiguration_Impl::SetDebuggerThreadControl(this, windows_core::from_raw_borrowed(&pdebuggerthreadcontrol)).into() + ICorConfiguration_Impl::SetDebuggerThreadControl(this, core::mem::transmute_copy(&pdebuggerthreadcontrol)).into() } unsafe extern "system" fn AddDebuggerSpecialThread(this: *mut core::ffi::c_void, dwspecialthreadid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3142,15 +3142,15 @@ pub trait ICorRuntimeHost_Impl: windows_core::IUnknownImpl { fn GetConfiguration(&self) -> windows_core::Result; fn Start(&self) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; - fn CreateDomain(&self, pwzfriendlyname: &windows_core::PCWSTR, pidentityarray: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateDomain(&self, pwzfriendlyname: &windows_core::PCWSTR, pidentityarray: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn GetDefaultDomain(&self) -> windows_core::Result; fn EnumDomains(&self, henum: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn NextDomain(&self, henum: *const core::ffi::c_void) -> windows_core::Result; fn CloseEnum(&self, henum: *const core::ffi::c_void) -> windows_core::Result<()>; - fn CreateDomainEx(&self, pwzfriendlyname: &windows_core::PCWSTR, psetup: Option<&windows_core::IUnknown>, pevidence: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateDomainEx(&self, pwzfriendlyname: &windows_core::PCWSTR, psetup: windows_core::Ref<'_, windows_core::IUnknown>, pevidence: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn CreateDomainSetup(&self) -> windows_core::Result; fn CreateEvidence(&self) -> windows_core::Result; - fn UnloadDomain(&self, pappdomain: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn UnloadDomain(&self, pappdomain: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn CurrentDomain(&self) -> windows_core::Result; } impl ICorRuntimeHost_Vtbl { @@ -3217,7 +3217,7 @@ impl ICorRuntimeHost_Vtbl { } unsafe extern "system" fn CreateDomain(this: *mut core::ffi::c_void, pwzfriendlyname: windows_core::PCWSTR, pidentityarray: *mut core::ffi::c_void, pappdomain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorRuntimeHost_Impl::CreateDomain(this, core::mem::transmute(&pwzfriendlyname), windows_core::from_raw_borrowed(&pidentityarray)) { + match ICorRuntimeHost_Impl::CreateDomain(this, core::mem::transmute(&pwzfriendlyname), core::mem::transmute_copy(&pidentityarray)) { Ok(ok__) => { pappdomain.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3255,7 +3255,7 @@ impl ICorRuntimeHost_Vtbl { } unsafe extern "system" fn CreateDomainEx(this: *mut core::ffi::c_void, pwzfriendlyname: windows_core::PCWSTR, psetup: *mut core::ffi::c_void, pevidence: *mut core::ffi::c_void, pappdomain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICorRuntimeHost_Impl::CreateDomainEx(this, core::mem::transmute(&pwzfriendlyname), windows_core::from_raw_borrowed(&psetup), windows_core::from_raw_borrowed(&pevidence)) { + match ICorRuntimeHost_Impl::CreateDomainEx(this, core::mem::transmute(&pwzfriendlyname), core::mem::transmute_copy(&psetup), core::mem::transmute_copy(&pevidence)) { Ok(ok__) => { pappdomain.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3285,7 +3285,7 @@ impl ICorRuntimeHost_Vtbl { } unsafe extern "system" fn UnloadDomain(this: *mut core::ffi::c_void, pappdomain: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICorRuntimeHost_Impl::UnloadDomain(this, windows_core::from_raw_borrowed(&pappdomain)).into() + ICorRuntimeHost_Impl::UnloadDomain(this, core::mem::transmute_copy(&pappdomain)).into() } unsafe extern "system" fn CurrentDomain(this: *mut core::ffi::c_void, pappdomain: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3879,8 +3879,8 @@ pub struct IHostAssemblyStore_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IHostAssemblyStore_Impl: windows_core::IUnknownImpl { - fn ProvideAssembly(&self, pbindinfo: *const AssemblyBindInfo, passemblyid: *mut u64, pcontext: *mut u64, ppstmassemblyimage: *mut Option, ppstmpdb: *mut Option) -> windows_core::Result<()>; - fn ProvideModule(&self, pbindinfo: *const ModuleBindInfo, pdwmoduleid: *mut u32, ppstmmoduleimage: *mut Option, ppstmpdb: *mut Option) -> windows_core::Result<()>; + fn ProvideAssembly(&self, pbindinfo: *const AssemblyBindInfo, passemblyid: *mut u64, pcontext: *mut u64, ppstmassemblyimage: windows_core::OutRef<'_, super::Com::IStream>, ppstmpdb: windows_core::OutRef<'_, super::Com::IStream>) -> windows_core::Result<()>; + fn ProvideModule(&self, pbindinfo: *const ModuleBindInfo, pdwmoduleid: *mut u32, ppstmmoduleimage: windows_core::OutRef<'_, super::Com::IStream>, ppstmpdb: windows_core::OutRef<'_, super::Com::IStream>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IHostAssemblyStore_Vtbl { @@ -3963,7 +3963,7 @@ pub struct IHostControl_Vtbl { } pub trait IHostControl_Impl: windows_core::IUnknownImpl { fn GetHostManager(&self, riid: *const windows_core::GUID, ppobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn SetAppDomainManager(&self, dwappdomainid: u32, punkappdomainmanager: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetAppDomainManager(&self, dwappdomainid: u32, punkappdomainmanager: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IHostControl_Vtbl { pub const fn new() -> Self { @@ -3973,7 +3973,7 @@ impl IHostControl_Vtbl { } unsafe extern "system" fn SetAppDomainManager(this: *mut core::ffi::c_void, dwappdomainid: u32, punkappdomainmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHostControl_Impl::SetAppDomainManager(this, core::mem::transmute_copy(&dwappdomainid), windows_core::from_raw_borrowed(&punkappdomainmanager)).into() + IHostControl_Impl::SetAppDomainManager(this, core::mem::transmute_copy(&dwappdomainid), core::mem::transmute_copy(&punkappdomainmanager)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4172,7 +4172,7 @@ pub trait IHostIoCompletionManager_Impl: windows_core::IUnknownImpl { fn GetMaxThreads(&self) -> windows_core::Result; fn GetAvailableThreads(&self) -> windows_core::Result; fn GetHostOverlappedSize(&self) -> windows_core::Result; - fn SetCLRIoCompletionManager(&self, pmanager: Option<&ICLRIoCompletionManager>) -> windows_core::Result<()>; + fn SetCLRIoCompletionManager(&self, pmanager: windows_core::Ref<'_, ICLRIoCompletionManager>) -> windows_core::Result<()>; fn InitializeHostOverlapped(&self, pvoverlapped: *const core::ffi::c_void) -> windows_core::Result<()>; fn Bind(&self, hport: super::super::Foundation::HANDLE, hhandle: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn SetMinThreads(&self, dwminiocompletionthreads: u32) -> windows_core::Result<()>; @@ -4230,7 +4230,7 @@ impl IHostIoCompletionManager_Vtbl { } unsafe extern "system" fn SetCLRIoCompletionManager(this: *mut core::ffi::c_void, pmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHostIoCompletionManager_Impl::SetCLRIoCompletionManager(this, windows_core::from_raw_borrowed(&pmanager)).into() + IHostIoCompletionManager_Impl::SetCLRIoCompletionManager(this, core::mem::transmute_copy(&pmanager)).into() } unsafe extern "system" fn InitializeHostOverlapped(this: *mut core::ffi::c_void, pvoverlapped: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4436,7 +4436,7 @@ pub trait IHostMemoryManager_Impl: windows_core::IUnknownImpl { fn VirtualQuery(&self, lpaddress: *const core::ffi::c_void, lpbuffer: *mut core::ffi::c_void, dwlength: usize, presult: *mut usize) -> windows_core::Result<()>; fn VirtualProtect(&self, lpaddress: *const core::ffi::c_void, dwsize: usize, flnewprotect: u32) -> windows_core::Result; fn GetMemoryLoad(&self, pmemoryload: *mut u32, pavailablebytes: *mut usize) -> windows_core::Result<()>; - fn RegisterMemoryNotificationCallback(&self, pcallback: Option<&ICLRMemoryNotificationCallback>) -> windows_core::Result<()>; + fn RegisterMemoryNotificationCallback(&self, pcallback: windows_core::Ref<'_, ICLRMemoryNotificationCallback>) -> windows_core::Result<()>; fn NeedsVirtualAddressSpace(&self, startaddress: *const core::ffi::c_void, size: usize) -> windows_core::Result<()>; fn AcquiredVirtualAddressSpace(&self, startaddress: *const core::ffi::c_void, size: usize) -> windows_core::Result<()>; fn ReleasedVirtualAddressSpace(&self, startaddress: *const core::ffi::c_void) -> windows_core::Result<()>; @@ -4481,7 +4481,7 @@ impl IHostMemoryManager_Vtbl { } unsafe extern "system" fn RegisterMemoryNotificationCallback(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHostMemoryManager_Impl::RegisterMemoryNotificationCallback(this, windows_core::from_raw_borrowed(&pcallback)).into() + IHostMemoryManager_Impl::RegisterMemoryNotificationCallback(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn NeedsVirtualAddressSpace(this: *mut core::ffi::c_void, startaddress: *const core::ffi::c_void, size: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4643,7 +4643,7 @@ pub trait IHostSecurityManager_Impl: windows_core::IUnknownImpl { fn OpenThreadToken(&self, dwdesiredaccess: u32, bopenasself: super::super::Foundation::BOOL) -> windows_core::Result; fn SetThreadToken(&self, htoken: super::super::Foundation::HANDLE) -> windows_core::Result<()>; fn GetSecurityContext(&self, econtexttype: EContextType) -> windows_core::Result; - fn SetSecurityContext(&self, econtexttype: EContextType, psecuritycontext: Option<&IHostSecurityContext>) -> windows_core::Result<()>; + fn SetSecurityContext(&self, econtexttype: EContextType, psecuritycontext: windows_core::Ref<'_, IHostSecurityContext>) -> windows_core::Result<()>; } impl IHostSecurityManager_Vtbl { pub const fn new() -> Self { @@ -4681,7 +4681,7 @@ impl IHostSecurityManager_Vtbl { } unsafe extern "system" fn SetSecurityContext(this: *mut core::ffi::c_void, econtexttype: EContextType, psecuritycontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHostSecurityManager_Impl::SetSecurityContext(this, core::mem::transmute_copy(&econtexttype), windows_core::from_raw_borrowed(&psecuritycontext)).into() + IHostSecurityManager_Impl::SetSecurityContext(this, core::mem::transmute_copy(&econtexttype), core::mem::transmute_copy(&psecuritycontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4802,7 +4802,7 @@ pub struct IHostSyncManager_Vtbl { pub CreateSemaphoreA: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IHostSyncManager_Impl: windows_core::IUnknownImpl { - fn SetCLRSyncManager(&self, pmanager: Option<&ICLRSyncManager>) -> windows_core::Result<()>; + fn SetCLRSyncManager(&self, pmanager: windows_core::Ref<'_, ICLRSyncManager>) -> windows_core::Result<()>; fn CreateCrst(&self) -> windows_core::Result; fn CreateCrstWithSpinCount(&self, dwspincount: u32) -> windows_core::Result; fn CreateAutoEvent(&self) -> windows_core::Result; @@ -4816,7 +4816,7 @@ impl IHostSyncManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetCLRSyncManager(this: *mut core::ffi::c_void, pmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHostSyncManager_Impl::SetCLRSyncManager(this, windows_core::from_raw_borrowed(&pmanager)).into() + IHostSyncManager_Impl::SetCLRSyncManager(this, core::mem::transmute_copy(&pmanager)).into() } unsafe extern "system" fn CreateCrst(this: *mut core::ffi::c_void, ppcrst: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4958,7 +4958,7 @@ pub trait IHostTask_Impl: windows_core::IUnknownImpl { fn Join(&self, dwmilliseconds: u32, option: u32) -> windows_core::Result<()>; fn SetPriority(&self, newpriority: i32) -> windows_core::Result<()>; fn GetPriority(&self) -> windows_core::Result; - fn SetCLRTask(&self, pclrtask: Option<&ICLRTask>) -> windows_core::Result<()>; + fn SetCLRTask(&self, pclrtask: windows_core::Ref<'_, ICLRTask>) -> windows_core::Result<()>; } impl IHostTask_Vtbl { pub const fn new() -> Self { @@ -4990,7 +4990,7 @@ impl IHostTask_Vtbl { } unsafe extern "system" fn SetCLRTask(this: *mut core::ffi::c_void, pclrtask: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHostTask_Impl::SetCLRTask(this, windows_core::from_raw_borrowed(&pclrtask)).into() + IHostTask_Impl::SetCLRTask(this, core::mem::transmute_copy(&pclrtask)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5117,7 +5117,7 @@ pub trait IHostTaskManager_Impl: windows_core::IUnknownImpl { fn EndThreadAffinity(&self) -> windows_core::Result<()>; fn SetStackGuarantee(&self, guarantee: u32) -> windows_core::Result<()>; fn GetStackGuarantee(&self) -> windows_core::Result; - fn SetCLRTaskManager(&self, ppmanager: Option<&ICLRTaskManager>) -> windows_core::Result<()>; + fn SetCLRTaskManager(&self, ppmanager: windows_core::Ref<'_, ICLRTaskManager>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Threading")] impl IHostTaskManager_Vtbl { @@ -5216,7 +5216,7 @@ impl IHostTaskManager_Vtbl { } unsafe extern "system" fn SetCLRTaskManager(this: *mut core::ffi::c_void, ppmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHostTaskManager_Impl::SetCLRTaskManager(this, windows_core::from_raw_borrowed(&ppmanager)).into() + IHostTaskManager_Impl::SetCLRTaskManager(this, core::mem::transmute_copy(&ppmanager)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5492,7 +5492,7 @@ pub trait ITypeName_Impl: windows_core::IUnknownImpl { fn GetNameCount(&self) -> windows_core::Result; fn GetNames(&self, count: u32, rgbsznames: *mut windows_core::BSTR) -> windows_core::Result; fn GetTypeArgumentCount(&self) -> windows_core::Result; - fn GetTypeArguments(&self, count: u32, rgparguments: *mut Option) -> windows_core::Result; + fn GetTypeArguments(&self, count: u32, rgparguments: windows_core::OutRef<'_, ITypeName>) -> windows_core::Result; fn GetModifierLength(&self) -> windows_core::Result; fn GetModifiers(&self, count: u32, rgmodifiers: *mut u32) -> windows_core::Result; fn GetAssemblyName(&self) -> windows_core::Result; diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs index e4519da697..8bfba06b9f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs @@ -215,10 +215,10 @@ pub trait ICallFrame_Impl: windows_core::IUnknownImpl { fn GetParamInfo(&self, iparam: u32) -> windows_core::Result; fn SetParam(&self, iparam: u32, pvar: *const super::super::Variant::VARIANT) -> windows_core::Result<()>; fn GetParam(&self, iparam: u32) -> windows_core::Result; - fn Copy(&self, copycontrol: CALLFRAME_COPY, pwalker: Option<&ICallFrameWalker>) -> windows_core::Result; - fn Free(&self, pframeargsdest: Option<&ICallFrame>, pwalkerdestfree: Option<&ICallFrameWalker>, pwalkercopy: Option<&ICallFrameWalker>, freeflags: u32, pwalkerfree: Option<&ICallFrameWalker>, nullflags: u32) -> windows_core::Result<()>; - fn FreeParam(&self, iparam: u32, freeflags: u32, pwalkerfree: Option<&ICallFrameWalker>, nullflags: u32) -> windows_core::Result<()>; - fn WalkFrame(&self, walkwhat: u32, pwalker: Option<&ICallFrameWalker>) -> windows_core::Result<()>; + fn Copy(&self, copycontrol: CALLFRAME_COPY, pwalker: windows_core::Ref<'_, ICallFrameWalker>) -> windows_core::Result; + fn Free(&self, pframeargsdest: windows_core::Ref<'_, ICallFrame>, pwalkerdestfree: windows_core::Ref<'_, ICallFrameWalker>, pwalkercopy: windows_core::Ref<'_, ICallFrameWalker>, freeflags: u32, pwalkerfree: windows_core::Ref<'_, ICallFrameWalker>, nullflags: u32) -> windows_core::Result<()>; + fn FreeParam(&self, iparam: u32, freeflags: u32, pwalkerfree: windows_core::Ref<'_, ICallFrameWalker>, nullflags: u32) -> windows_core::Result<()>; + fn WalkFrame(&self, walkwhat: u32, pwalker: windows_core::Ref<'_, ICallFrameWalker>) -> windows_core::Result<()>; fn GetMarshalSizeMax(&self, pmshlcontext: *const CALLFRAME_MARSHALCONTEXT, mshlflags: super::MSHLFLAGS) -> windows_core::Result; fn Marshal(&self, pmshlcontext: *const CALLFRAME_MARSHALCONTEXT, mshlflags: super::MSHLFLAGS, pbuffer: *const core::ffi::c_void, cbbuffer: u32, pcbbufferused: *mut u32, pdatarep: *mut u32, prpcflags: *mut u32) -> windows_core::Result<()>; fn Unmarshal(&self, pbuffer: *const core::ffi::c_void, cbbuffer: u32, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT) -> windows_core::Result; @@ -282,7 +282,7 @@ impl ICallFrame_Vtbl { } unsafe extern "system" fn Copy(this: *mut core::ffi::c_void, copycontrol: CALLFRAME_COPY, pwalker: *mut core::ffi::c_void, ppframe: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICallFrame_Impl::Copy(this, core::mem::transmute_copy(©control), windows_core::from_raw_borrowed(&pwalker)) { + match ICallFrame_Impl::Copy(this, core::mem::transmute_copy(©control), core::mem::transmute_copy(&pwalker)) { Ok(ok__) => { ppframe.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -292,15 +292,15 @@ impl ICallFrame_Vtbl { } unsafe extern "system" fn Free(this: *mut core::ffi::c_void, pframeargsdest: *mut core::ffi::c_void, pwalkerdestfree: *mut core::ffi::c_void, pwalkercopy: *mut core::ffi::c_void, freeflags: u32, pwalkerfree: *mut core::ffi::c_void, nullflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICallFrame_Impl::Free(this, windows_core::from_raw_borrowed(&pframeargsdest), windows_core::from_raw_borrowed(&pwalkerdestfree), windows_core::from_raw_borrowed(&pwalkercopy), core::mem::transmute_copy(&freeflags), windows_core::from_raw_borrowed(&pwalkerfree), core::mem::transmute_copy(&nullflags)).into() + ICallFrame_Impl::Free(this, core::mem::transmute_copy(&pframeargsdest), core::mem::transmute_copy(&pwalkerdestfree), core::mem::transmute_copy(&pwalkercopy), core::mem::transmute_copy(&freeflags), core::mem::transmute_copy(&pwalkerfree), core::mem::transmute_copy(&nullflags)).into() } unsafe extern "system" fn FreeParam(this: *mut core::ffi::c_void, iparam: u32, freeflags: u32, pwalkerfree: *mut core::ffi::c_void, nullflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICallFrame_Impl::FreeParam(this, core::mem::transmute_copy(&iparam), core::mem::transmute_copy(&freeflags), windows_core::from_raw_borrowed(&pwalkerfree), core::mem::transmute_copy(&nullflags)).into() + ICallFrame_Impl::FreeParam(this, core::mem::transmute_copy(&iparam), core::mem::transmute_copy(&freeflags), core::mem::transmute_copy(&pwalkerfree), core::mem::transmute_copy(&nullflags)).into() } unsafe extern "system" fn WalkFrame(this: *mut core::ffi::c_void, walkwhat: u32, pwalker: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICallFrame_Impl::WalkFrame(this, core::mem::transmute_copy(&walkwhat), windows_core::from_raw_borrowed(&pwalker)).into() + ICallFrame_Impl::WalkFrame(this, core::mem::transmute_copy(&walkwhat), core::mem::transmute_copy(&pwalker)).into() } unsafe extern "system" fn GetMarshalSizeMax(this: *mut core::ffi::c_void, pmshlcontext: *const CALLFRAME_MARSHALCONTEXT, mshlflags: super::MSHLFLAGS, pcbbufferneeded: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -379,13 +379,13 @@ pub struct ICallFrameEvents_Vtbl { pub OnCall: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICallFrameEvents_Impl: windows_core::IUnknownImpl { - fn OnCall(&self, pframe: Option<&ICallFrame>) -> windows_core::Result<()>; + fn OnCall(&self, pframe: windows_core::Ref<'_, ICallFrame>) -> windows_core::Result<()>; } impl ICallFrameEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnCall(this: *mut core::ffi::c_void, pframe: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICallFrameEvents_Impl::OnCall(this, windows_core::from_raw_borrowed(&pframe)).into() + ICallFrameEvents_Impl::OnCall(this, core::mem::transmute_copy(&pframe)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnCall: OnCall:: } } @@ -517,14 +517,14 @@ pub struct ICallInterceptor_Vtbl { pub GetRegisteredSink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICallInterceptor_Impl: ICallIndirect_Impl { - fn RegisterSink(&self, psink: Option<&ICallFrameEvents>) -> windows_core::Result<()>; + fn RegisterSink(&self, psink: windows_core::Ref<'_, ICallFrameEvents>) -> windows_core::Result<()>; fn GetRegisteredSink(&self) -> windows_core::Result; } impl ICallInterceptor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterSink(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICallInterceptor_Impl::RegisterSink(this, windows_core::from_raw_borrowed(&psink)).into() + ICallInterceptor_Impl::RegisterSink(this, core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn GetRegisteredSink(this: *mut core::ffi::c_void, ppsink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -564,7 +564,7 @@ pub struct ICallUnmarshal_Vtbl { pub ReleaseMarshalData: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void, u32, u32, u32, *const CALLFRAME_MARSHALCONTEXT) -> windows_core::HRESULT, } pub trait ICallUnmarshal_Impl: windows_core::IUnknownImpl { - fn Unmarshal(&self, imethod: u32, pbuffer: *const core::ffi::c_void, cbbuffer: u32, fforcebuffercopy: super::super::super::Foundation::BOOL, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT, pcbunmarshalled: *mut u32, ppframe: *mut Option) -> windows_core::Result<()>; + fn Unmarshal(&self, imethod: u32, pbuffer: *const core::ffi::c_void, cbbuffer: u32, fforcebuffercopy: super::super::super::Foundation::BOOL, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT, pcbunmarshalled: *mut u32, ppframe: windows_core::OutRef<'_, ICallFrame>) -> windows_core::Result<()>; fn ReleaseMarshalData(&self, imethod: u32, pbuffer: *const core::ffi::c_void, cbbuffer: u32, ibfirstrelease: u32, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT) -> windows_core::Result<()>; } impl ICallUnmarshal_Vtbl { diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs index 086d958011..f6ca5de579 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/Events/mod.rs @@ -68,7 +68,7 @@ pub struct IEnumEventObject_Vtbl { } pub trait IEnumEventObject_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, creqelem: u32, ppinterface: *mut Option, cretelem: *mut u32) -> windows_core::Result<()>; + fn Next(&self, creqelem: u32, ppinterface: windows_core::OutRef<'_, windows_core::IUnknown>, cretelem: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::HRESULT; fn Skip(&self, cskipelem: u32) -> windows_core::Result<()>; } @@ -508,7 +508,7 @@ pub struct IEventControl_Vtbl { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IEventControl_Impl: super::IDispatch_Impl { - fn SetPublisherFilter(&self, methodname: &windows_core::BSTR, ppublisherfilter: Option<&IPublisherFilter>) -> windows_core::Result<()>; + fn SetPublisherFilter(&self, methodname: &windows_core::BSTR, ppublisherfilter: windows_core::Ref<'_, IPublisherFilter>) -> windows_core::Result<()>; fn AllowInprocActivation(&self) -> windows_core::Result; fn SetAllowInprocActivation(&self, fallowinprocactivation: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetSubscriptions(&self, methodname: &windows_core::BSTR, optionalcriteria: &windows_core::BSTR, optionalerrorindex: *const i32) -> windows_core::Result; @@ -519,7 +519,7 @@ impl IEventControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPublisherFilter(this: *mut core::ffi::c_void, methodname: *mut core::ffi::c_void, ppublisherfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IEventControl_Impl::SetPublisherFilter(this, core::mem::transmute(&methodname), windows_core::from_raw_borrowed(&ppublisherfilter)).into() + IEventControl_Impl::SetPublisherFilter(this, core::mem::transmute(&methodname), core::mem::transmute_copy(&ppublisherfilter)).into() } unsafe extern "system" fn AllowInprocActivation(this: *mut core::ffi::c_void, pfallowinprocactivation: *mut super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1308,7 +1308,7 @@ pub trait IEventSubscription_Impl: super::IDispatch_Impl { fn SubscriberCLSID(&self) -> windows_core::Result; fn SetSubscriberCLSID(&self, bstrsubscriberclsid: &windows_core::BSTR) -> windows_core::Result<()>; fn SubscriberInterface(&self) -> windows_core::Result; - fn SetSubscriberInterface(&self, psubscriberinterface: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetSubscriberInterface(&self, psubscriberinterface: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn PerUser(&self) -> windows_core::Result; fn SetPerUser(&self, fperuser: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn OwnerSID(&self) -> windows_core::Result; @@ -1429,7 +1429,7 @@ impl IEventSubscription_Vtbl { } unsafe extern "system" fn SetSubscriberInterface(this: *mut core::ffi::c_void, psubscriberinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IEventSubscription_Impl::SetSubscriberInterface(this, windows_core::from_raw_borrowed(&psubscriberinterface)).into() + IEventSubscription_Impl::SetSubscriberInterface(this, core::mem::transmute_copy(&psubscriberinterface)).into() } unsafe extern "system" fn PerUser(this: *mut core::ffi::c_void, pfperuser: *mut super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1663,7 +1663,7 @@ pub struct IEventSystem_Vtbl { #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IEventSystem_Impl: super::IDispatch_Impl { fn Query(&self, progid: &windows_core::BSTR, querycriteria: &windows_core::BSTR, errorindex: *mut i32) -> windows_core::Result; - fn Store(&self, progid: &windows_core::BSTR, pinterface: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Store(&self, progid: &windows_core::BSTR, pinterface: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Remove(&self, progid: &windows_core::BSTR, querycriteria: &windows_core::BSTR) -> windows_core::Result; fn EventObjectChangeEventClassID(&self) -> windows_core::Result; fn QueryS(&self, progid: &windows_core::BSTR, querycriteria: &windows_core::BSTR) -> windows_core::Result; @@ -1684,7 +1684,7 @@ impl IEventSystem_Vtbl { } unsafe extern "system" fn Store(this: *mut core::ffi::c_void, progid: *mut core::ffi::c_void, pinterface: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IEventSystem_Impl::Store(this, core::mem::transmute(&progid), windows_core::from_raw_borrowed(&pinterface)).into() + IEventSystem_Impl::Store(this, core::mem::transmute(&progid), core::mem::transmute_copy(&pinterface)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, progid: *mut core::ffi::c_void, querycriteria: *mut core::ffi::c_void, errorindex: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1759,14 +1759,14 @@ pub struct IFiringControl_Vtbl { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IFiringControl_Impl: super::IDispatch_Impl { - fn FireSubscription(&self, subscription: Option<&IEventSubscription>) -> windows_core::Result<()>; + fn FireSubscription(&self, subscription: windows_core::Ref<'_, IEventSubscription>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFiringControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FireSubscription(this: *mut core::ffi::c_void, subscription: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFiringControl_Impl::FireSubscription(this, windows_core::from_raw_borrowed(&subscription)).into() + IFiringControl_Impl::FireSubscription(this, core::mem::transmute_copy(&subscription)).into() } Self { base__: super::IDispatch_Vtbl::new::(), FireSubscription: FireSubscription:: } } @@ -1820,7 +1820,7 @@ pub struct IMultiInterfaceEventControl_Vtbl { pub SetFireInParallel: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IMultiInterfaceEventControl_Impl: windows_core::IUnknownImpl { - fn SetMultiInterfacePublisherFilter(&self, classfilter: Option<&IMultiInterfacePublisherFilter>) -> windows_core::Result<()>; + fn SetMultiInterfacePublisherFilter(&self, classfilter: windows_core::Ref<'_, IMultiInterfacePublisherFilter>) -> windows_core::Result<()>; fn GetSubscriptions(&self, eventiid: *const windows_core::GUID, bstrmethodname: &windows_core::BSTR, optionalcriteria: &windows_core::BSTR, optionalerrorindex: *const i32) -> windows_core::Result; fn SetDefaultQuery(&self, eventiid: *const windows_core::GUID, bstrmethodname: &windows_core::BSTR, bstrcriteria: &windows_core::BSTR) -> windows_core::Result; fn AllowInprocActivation(&self) -> windows_core::Result; @@ -1832,7 +1832,7 @@ impl IMultiInterfaceEventControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetMultiInterfacePublisherFilter(this: *mut core::ffi::c_void, classfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMultiInterfaceEventControl_Impl::SetMultiInterfacePublisherFilter(this, windows_core::from_raw_borrowed(&classfilter)).into() + IMultiInterfaceEventControl_Impl::SetMultiInterfacePublisherFilter(this, core::mem::transmute_copy(&classfilter)).into() } unsafe extern "system" fn GetSubscriptions(this: *mut core::ffi::c_void, eventiid: *const windows_core::GUID, bstrmethodname: *mut core::ffi::c_void, optionalcriteria: *mut core::ffi::c_void, optionalerrorindex: *const i32, ppcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1921,18 +1921,18 @@ pub struct IMultiInterfacePublisherFilter_Vtbl { pub PrepareToFire: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMultiInterfacePublisherFilter_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, peic: Option<&IMultiInterfaceEventControl>) -> windows_core::Result<()>; - fn PrepareToFire(&self, iid: *const windows_core::GUID, methodname: &windows_core::BSTR, firingcontrol: Option<&IFiringControl>) -> windows_core::Result<()>; + fn Initialize(&self, peic: windows_core::Ref<'_, IMultiInterfaceEventControl>) -> windows_core::Result<()>; + fn PrepareToFire(&self, iid: *const windows_core::GUID, methodname: &windows_core::BSTR, firingcontrol: windows_core::Ref<'_, IFiringControl>) -> windows_core::Result<()>; } impl IMultiInterfacePublisherFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, peic: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMultiInterfacePublisherFilter_Impl::Initialize(this, windows_core::from_raw_borrowed(&peic)).into() + IMultiInterfacePublisherFilter_Impl::Initialize(this, core::mem::transmute_copy(&peic)).into() } unsafe extern "system" fn PrepareToFire(this: *mut core::ffi::c_void, iid: *const windows_core::GUID, methodname: *mut core::ffi::c_void, firingcontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMultiInterfacePublisherFilter_Impl::PrepareToFire(this, core::mem::transmute_copy(&iid), core::mem::transmute(&methodname), windows_core::from_raw_borrowed(&firingcontrol)).into() + IMultiInterfacePublisherFilter_Impl::PrepareToFire(this, core::mem::transmute_copy(&iid), core::mem::transmute(&methodname), core::mem::transmute_copy(&firingcontrol)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1968,18 +1968,18 @@ pub struct IPublisherFilter_Vtbl { pub PrepareToFire: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPublisherFilter_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, methodname: &windows_core::BSTR, dispuserdefined: Option<&super::IDispatch>) -> windows_core::Result<()>; - fn PrepareToFire(&self, methodname: &windows_core::BSTR, firingcontrol: Option<&IFiringControl>) -> windows_core::Result<()>; + fn Initialize(&self, methodname: &windows_core::BSTR, dispuserdefined: windows_core::Ref<'_, super::IDispatch>) -> windows_core::Result<()>; + fn PrepareToFire(&self, methodname: &windows_core::BSTR, firingcontrol: windows_core::Ref<'_, IFiringControl>) -> windows_core::Result<()>; } impl IPublisherFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, methodname: *mut core::ffi::c_void, dispuserdefined: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPublisherFilter_Impl::Initialize(this, core::mem::transmute(&methodname), windows_core::from_raw_borrowed(&dispuserdefined)).into() + IPublisherFilter_Impl::Initialize(this, core::mem::transmute(&methodname), core::mem::transmute_copy(&dispuserdefined)).into() } unsafe extern "system" fn PrepareToFire(this: *mut core::ffi::c_void, methodname: *mut core::ffi::c_void, firingcontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPublisherFilter_Impl::PrepareToFire(this, core::mem::transmute(&methodname), windows_core::from_raw_borrowed(&firingcontrol)).into() + IPublisherFilter_Impl::PrepareToFire(this, core::mem::transmute(&methodname), core::mem::transmute_copy(&firingcontrol)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/Marshal/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/Marshal/mod.rs index c87270c25e..efa2872c15 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/Marshal/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/Marshal/mod.rs @@ -699,9 +699,9 @@ pub struct IMarshal_Vtbl { pub trait IMarshal_Impl: windows_core::IUnknownImpl { fn GetUnmarshalClass(&self, riid: *const windows_core::GUID, pv: *const core::ffi::c_void, dwdestcontext: u32, pvdestcontext: *const core::ffi::c_void, mshlflags: u32) -> windows_core::Result; fn GetMarshalSizeMax(&self, riid: *const windows_core::GUID, pv: *const core::ffi::c_void, dwdestcontext: u32, pvdestcontext: *const core::ffi::c_void, mshlflags: u32) -> windows_core::Result; - fn MarshalInterface(&self, pstm: Option<&super::IStream>, riid: *const windows_core::GUID, pv: *const core::ffi::c_void, dwdestcontext: u32, pvdestcontext: *const core::ffi::c_void, mshlflags: u32) -> windows_core::Result<()>; - fn UnmarshalInterface(&self, pstm: Option<&super::IStream>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn ReleaseMarshalData(&self, pstm: Option<&super::IStream>) -> windows_core::Result<()>; + fn MarshalInterface(&self, pstm: windows_core::Ref<'_, super::IStream>, riid: *const windows_core::GUID, pv: *const core::ffi::c_void, dwdestcontext: u32, pvdestcontext: *const core::ffi::c_void, mshlflags: u32) -> windows_core::Result<()>; + fn UnmarshalInterface(&self, pstm: windows_core::Ref<'_, super::IStream>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ReleaseMarshalData(&self, pstm: windows_core::Ref<'_, super::IStream>) -> windows_core::Result<()>; fn DisconnectObject(&self, dwreserved: u32) -> windows_core::Result<()>; } impl IMarshal_Vtbl { @@ -728,15 +728,15 @@ impl IMarshal_Vtbl { } unsafe extern "system" fn MarshalInterface(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void, riid: *const windows_core::GUID, pv: *const core::ffi::c_void, dwdestcontext: u32, pvdestcontext: *const core::ffi::c_void, mshlflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMarshal_Impl::MarshalInterface(this, windows_core::from_raw_borrowed(&pstm), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pv), core::mem::transmute_copy(&dwdestcontext), core::mem::transmute_copy(&pvdestcontext), core::mem::transmute_copy(&mshlflags)).into() + IMarshal_Impl::MarshalInterface(this, core::mem::transmute_copy(&pstm), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pv), core::mem::transmute_copy(&dwdestcontext), core::mem::transmute_copy(&pvdestcontext), core::mem::transmute_copy(&mshlflags)).into() } unsafe extern "system" fn UnmarshalInterface(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMarshal_Impl::UnmarshalInterface(this, windows_core::from_raw_borrowed(&pstm), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IMarshal_Impl::UnmarshalInterface(this, core::mem::transmute_copy(&pstm), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn ReleaseMarshalData(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMarshal_Impl::ReleaseMarshalData(this, windows_core::from_raw_borrowed(&pstm)).into() + IMarshal_Impl::ReleaseMarshalData(this, core::mem::transmute_copy(&pstm)).into() } unsafe extern "system" fn DisconnectObject(this: *mut core::ffi::c_void, dwreserved: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs index e32977a778..5ea6c7e10a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs @@ -1542,7 +1542,7 @@ pub trait ILayoutStorage_Impl: windows_core::IUnknownImpl { fn BeginMonitor(&self) -> windows_core::Result<()>; fn EndMonitor(&self) -> windows_core::Result<()>; fn ReLayoutDocfile(&self, pwcsnewdfname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn ReLayoutDocfileOnILockBytes(&self, pilockbytes: Option<&ILockBytes>) -> windows_core::Result<()>; + fn ReLayoutDocfileOnILockBytes(&self, pilockbytes: windows_core::Ref<'_, ILockBytes>) -> windows_core::Result<()>; } impl ILayoutStorage_Vtbl { pub const fn new() -> Self { @@ -1564,7 +1564,7 @@ impl ILayoutStorage_Vtbl { } unsafe extern "system" fn ReLayoutDocfileOnILockBytes(this: *mut core::ffi::c_void, pilockbytes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILayoutStorage_Impl::ReLayoutDocfileOnILockBytes(this, windows_core::from_raw_borrowed(&pilockbytes)).into() + ILayoutStorage_Impl::ReLayoutDocfileOnILockBytes(this, core::mem::transmute_copy(&pilockbytes)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1767,10 +1767,10 @@ pub struct IPersistStorage_Vtbl { } pub trait IPersistStorage_Impl: super::IPersist_Impl { fn IsDirty(&self) -> windows_core::HRESULT; - fn InitNew(&self, pstg: Option<&IStorage>) -> windows_core::Result<()>; - fn Load(&self, pstg: Option<&IStorage>) -> windows_core::Result<()>; - fn Save(&self, pstgsave: Option<&IStorage>, fsameasload: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SaveCompleted(&self, pstgnew: Option<&IStorage>) -> windows_core::Result<()>; + fn InitNew(&self, pstg: windows_core::Ref<'_, IStorage>) -> windows_core::Result<()>; + fn Load(&self, pstg: windows_core::Ref<'_, IStorage>) -> windows_core::Result<()>; + fn Save(&self, pstgsave: windows_core::Ref<'_, IStorage>, fsameasload: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SaveCompleted(&self, pstgnew: windows_core::Ref<'_, IStorage>) -> windows_core::Result<()>; fn HandsOffStorage(&self) -> windows_core::Result<()>; } impl IPersistStorage_Vtbl { @@ -1781,19 +1781,19 @@ impl IPersistStorage_Vtbl { } unsafe extern "system" fn InitNew(this: *mut core::ffi::c_void, pstg: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistStorage_Impl::InitNew(this, windows_core::from_raw_borrowed(&pstg)).into() + IPersistStorage_Impl::InitNew(this, core::mem::transmute_copy(&pstg)).into() } unsafe extern "system" fn Load(this: *mut core::ffi::c_void, pstg: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistStorage_Impl::Load(this, windows_core::from_raw_borrowed(&pstg)).into() + IPersistStorage_Impl::Load(this, core::mem::transmute_copy(&pstg)).into() } unsafe extern "system" fn Save(this: *mut core::ffi::c_void, pstgsave: *mut core::ffi::c_void, fsameasload: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistStorage_Impl::Save(this, windows_core::from_raw_borrowed(&pstgsave), core::mem::transmute_copy(&fsameasload)).into() + IPersistStorage_Impl::Save(this, core::mem::transmute_copy(&pstgsave), core::mem::transmute_copy(&fsameasload)).into() } unsafe extern "system" fn SaveCompleted(this: *mut core::ffi::c_void, pstgnew: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistStorage_Impl::SaveCompleted(this, windows_core::from_raw_borrowed(&pstgnew)).into() + IPersistStorage_Impl::SaveCompleted(this, core::mem::transmute_copy(&pstgnew)).into() } unsafe extern "system" fn HandsOffStorage(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1847,7 +1847,7 @@ pub struct IPropertyBag_Vtbl { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPropertyBag_Impl: windows_core::IUnknownImpl { - fn Read(&self, pszpropname: &windows_core::PCWSTR, pvar: *mut super::super::Variant::VARIANT, perrorlog: Option<&super::IErrorLog>) -> windows_core::Result<()>; + fn Read(&self, pszpropname: &windows_core::PCWSTR, pvar: *mut super::super::Variant::VARIANT, perrorlog: windows_core::Ref<'_, super::IErrorLog>) -> windows_core::Result<()>; fn Write(&self, pszpropname: &windows_core::PCWSTR, pvar: *const super::super::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -1855,7 +1855,7 @@ impl IPropertyBag_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Read(this: *mut core::ffi::c_void, pszpropname: windows_core::PCWSTR, pvar: *mut super::super::Variant::VARIANT, perrorlog: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertyBag_Impl::Read(this, core::mem::transmute(&pszpropname), core::mem::transmute_copy(&pvar), windows_core::from_raw_borrowed(&perrorlog)).into() + IPropertyBag_Impl::Read(this, core::mem::transmute(&pszpropname), core::mem::transmute_copy(&pvar), core::mem::transmute_copy(&perrorlog)).into() } unsafe extern "system" fn Write(this: *mut core::ffi::c_void, pszpropname: windows_core::PCWSTR, pvar: *const super::super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1920,18 +1920,18 @@ pub struct IPropertyBag2_Vtbl { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IPropertyBag2_Impl: windows_core::IUnknownImpl { - fn Read(&self, cproperties: u32, ppropbag: *const PROPBAG2, perrlog: Option<&super::IErrorLog>, pvarvalue: *mut super::super::Variant::VARIANT, phrerror: *mut windows_core::HRESULT) -> windows_core::Result<()>; + fn Read(&self, cproperties: u32, ppropbag: *const PROPBAG2, perrlog: windows_core::Ref<'_, super::IErrorLog>, pvarvalue: *mut super::super::Variant::VARIANT, phrerror: *mut windows_core::HRESULT) -> windows_core::Result<()>; fn Write(&self, cproperties: u32, ppropbag: *const PROPBAG2, pvarvalue: *const super::super::Variant::VARIANT) -> windows_core::Result<()>; fn CountProperties(&self) -> windows_core::Result; fn GetPropertyInfo(&self, iproperty: u32, cproperties: u32, ppropbag: *mut PROPBAG2, pcproperties: *mut u32) -> windows_core::Result<()>; - fn LoadObject(&self, pstrname: &windows_core::PCWSTR, dwhint: u32, punkobject: Option<&windows_core::IUnknown>, perrlog: Option<&super::IErrorLog>) -> windows_core::Result<()>; + fn LoadObject(&self, pstrname: &windows_core::PCWSTR, dwhint: u32, punkobject: windows_core::Ref<'_, windows_core::IUnknown>, perrlog: windows_core::Ref<'_, super::IErrorLog>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IPropertyBag2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Read(this: *mut core::ffi::c_void, cproperties: u32, ppropbag: *const PROPBAG2, perrlog: *mut core::ffi::c_void, pvarvalue: *mut super::super::Variant::VARIANT, phrerror: *mut windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertyBag2_Impl::Read(this, core::mem::transmute_copy(&cproperties), core::mem::transmute_copy(&ppropbag), windows_core::from_raw_borrowed(&perrlog), core::mem::transmute_copy(&pvarvalue), core::mem::transmute_copy(&phrerror)).into() + IPropertyBag2_Impl::Read(this, core::mem::transmute_copy(&cproperties), core::mem::transmute_copy(&ppropbag), core::mem::transmute_copy(&perrlog), core::mem::transmute_copy(&pvarvalue), core::mem::transmute_copy(&phrerror)).into() } unsafe extern "system" fn Write(this: *mut core::ffi::c_void, cproperties: u32, ppropbag: *const PROPBAG2, pvarvalue: *const super::super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1953,7 +1953,7 @@ impl IPropertyBag2_Vtbl { } unsafe extern "system" fn LoadObject(this: *mut core::ffi::c_void, pstrname: windows_core::PCWSTR, dwhint: u32, punkobject: *mut core::ffi::c_void, perrlog: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertyBag2_Impl::LoadObject(this, core::mem::transmute(&pstrname), core::mem::transmute_copy(&dwhint), windows_core::from_raw_borrowed(&punkobject), windows_core::from_raw_borrowed(&perrlog)).into() + IPropertyBag2_Impl::LoadObject(this, core::mem::transmute(&pstrname), core::mem::transmute_copy(&dwhint), core::mem::transmute_copy(&punkobject), core::mem::transmute_copy(&perrlog)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2364,9 +2364,9 @@ pub trait IStorage_Impl: windows_core::IUnknownImpl { fn CreateStream(&self, pwcsname: &windows_core::PCWSTR, grfmode: super::STGM, reserved1: u32, reserved2: u32) -> windows_core::Result; fn OpenStream(&self, pwcsname: &windows_core::PCWSTR, reserved1: *const core::ffi::c_void, grfmode: super::STGM, reserved2: u32) -> windows_core::Result; fn CreateStorage(&self, pwcsname: &windows_core::PCWSTR, grfmode: super::STGM, reserved1: u32, reserved2: u32) -> windows_core::Result; - fn OpenStorage(&self, pwcsname: &windows_core::PCWSTR, pstgpriority: Option<&IStorage>, grfmode: super::STGM, snbexclude: *const *const u16, reserved: u32) -> windows_core::Result; - fn CopyTo(&self, ciidexclude: u32, rgiidexclude: *const windows_core::GUID, snbexclude: *const *const u16, pstgdest: Option<&IStorage>) -> windows_core::Result<()>; - fn MoveElementTo(&self, pwcsname: &windows_core::PCWSTR, pstgdest: Option<&IStorage>, pwcsnewname: &windows_core::PCWSTR, grfflags: &STGMOVE) -> windows_core::Result<()>; + fn OpenStorage(&self, pwcsname: &windows_core::PCWSTR, pstgpriority: windows_core::Ref<'_, IStorage>, grfmode: super::STGM, snbexclude: *const *const u16, reserved: u32) -> windows_core::Result; + fn CopyTo(&self, ciidexclude: u32, rgiidexclude: *const windows_core::GUID, snbexclude: *const *const u16, pstgdest: windows_core::Ref<'_, IStorage>) -> windows_core::Result<()>; + fn MoveElementTo(&self, pwcsname: &windows_core::PCWSTR, pstgdest: windows_core::Ref<'_, IStorage>, pwcsnewname: &windows_core::PCWSTR, grfflags: &STGMOVE) -> windows_core::Result<()>; fn Commit(&self, grfcommitflags: u32) -> windows_core::Result<()>; fn Revert(&self) -> windows_core::Result<()>; fn EnumElements(&self, reserved1: u32, reserved2: *const core::ffi::c_void, reserved3: u32) -> windows_core::Result; @@ -2411,7 +2411,7 @@ impl IStorage_Vtbl { } unsafe extern "system" fn OpenStorage(this: *mut core::ffi::c_void, pwcsname: windows_core::PCWSTR, pstgpriority: *mut core::ffi::c_void, grfmode: super::STGM, snbexclude: *const *const u16, reserved: u32, ppstg: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorage_Impl::OpenStorage(this, core::mem::transmute(&pwcsname), windows_core::from_raw_borrowed(&pstgpriority), core::mem::transmute_copy(&grfmode), core::mem::transmute_copy(&snbexclude), core::mem::transmute_copy(&reserved)) { + match IStorage_Impl::OpenStorage(this, core::mem::transmute(&pwcsname), core::mem::transmute_copy(&pstgpriority), core::mem::transmute_copy(&grfmode), core::mem::transmute_copy(&snbexclude), core::mem::transmute_copy(&reserved)) { Ok(ok__) => { ppstg.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2421,11 +2421,11 @@ impl IStorage_Vtbl { } unsafe extern "system" fn CopyTo(this: *mut core::ffi::c_void, ciidexclude: u32, rgiidexclude: *const windows_core::GUID, snbexclude: *const *const u16, pstgdest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStorage_Impl::CopyTo(this, core::mem::transmute_copy(&ciidexclude), core::mem::transmute_copy(&rgiidexclude), core::mem::transmute_copy(&snbexclude), windows_core::from_raw_borrowed(&pstgdest)).into() + IStorage_Impl::CopyTo(this, core::mem::transmute_copy(&ciidexclude), core::mem::transmute_copy(&rgiidexclude), core::mem::transmute_copy(&snbexclude), core::mem::transmute_copy(&pstgdest)).into() } unsafe extern "system" fn MoveElementTo(this: *mut core::ffi::c_void, pwcsname: windows_core::PCWSTR, pstgdest: *mut core::ffi::c_void, pwcsnewname: windows_core::PCWSTR, grfflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStorage_Impl::MoveElementTo(this, core::mem::transmute(&pwcsname), windows_core::from_raw_borrowed(&pstgdest), core::mem::transmute(&pwcsnewname), core::mem::transmute(&grfflags)).into() + IStorage_Impl::MoveElementTo(this, core::mem::transmute(&pwcsname), core::mem::transmute_copy(&pstgdest), core::mem::transmute(&pwcsnewname), core::mem::transmute(&grfflags)).into() } unsafe extern "system" fn Commit(this: *mut core::ffi::c_void, grfcommitflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/UI/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/UI/mod.rs index a271a3cf90..b62b7f8e25 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/UI/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/UI/mod.rs @@ -65,19 +65,19 @@ pub struct IThumbnailExtractor_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] pub trait IThumbnailExtractor_Impl: windows_core::IUnknownImpl { - fn ExtractThumbnail(&self, pstg: Option<&super::StructuredStorage::IStorage>, ullength: u32, ulheight: u32, puloutputlength: *mut u32, puloutputheight: *mut u32, phoutputbitmap: *mut super::super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()>; - fn OnFileUpdated(&self, pstg: Option<&super::StructuredStorage::IStorage>) -> windows_core::Result<()>; + fn ExtractThumbnail(&self, pstg: windows_core::Ref<'_, super::StructuredStorage::IStorage>, ullength: u32, ulheight: u32, puloutputlength: *mut u32, puloutputheight: *mut u32, phoutputbitmap: *mut super::super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()>; + fn OnFileUpdated(&self, pstg: windows_core::Ref<'_, super::StructuredStorage::IStorage>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] impl IThumbnailExtractor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ExtractThumbnail(this: *mut core::ffi::c_void, pstg: *mut core::ffi::c_void, ullength: u32, ulheight: u32, puloutputlength: *mut u32, puloutputheight: *mut u32, phoutputbitmap: *mut super::super::super::Graphics::Gdi::HBITMAP) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IThumbnailExtractor_Impl::ExtractThumbnail(this, windows_core::from_raw_borrowed(&pstg), core::mem::transmute_copy(&ullength), core::mem::transmute_copy(&ulheight), core::mem::transmute_copy(&puloutputlength), core::mem::transmute_copy(&puloutputheight), core::mem::transmute_copy(&phoutputbitmap)).into() + IThumbnailExtractor_Impl::ExtractThumbnail(this, core::mem::transmute_copy(&pstg), core::mem::transmute_copy(&ullength), core::mem::transmute_copy(&ulheight), core::mem::transmute_copy(&puloutputlength), core::mem::transmute_copy(&puloutputheight), core::mem::transmute_copy(&phoutputbitmap)).into() } unsafe extern "system" fn OnFileUpdated(this: *mut core::ffi::c_void, pstg: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IThumbnailExtractor_Impl::OnFileUpdated(this, windows_core::from_raw_borrowed(&pstg)).into() + IThumbnailExtractor_Impl::OnFileUpdated(this, core::mem::transmute_copy(&pstg)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs index 7ab5589293..a7117fb81b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs @@ -1038,13 +1038,13 @@ pub struct IBindProtocol_Vtbl { pub CreateBinding: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IBindProtocol_Impl: windows_core::IUnknownImpl { - fn CreateBinding(&self, szurl: &windows_core::PCWSTR, pbc: Option<&super::IBindCtx>) -> windows_core::Result; + fn CreateBinding(&self, szurl: &windows_core::PCWSTR, pbc: windows_core::Ref<'_, super::IBindCtx>) -> windows_core::Result; } impl IBindProtocol_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateBinding(this: *mut core::ffi::c_void, szurl: windows_core::PCWSTR, pbc: *mut core::ffi::c_void, ppb: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBindProtocol_Impl::CreateBinding(this, core::mem::transmute(&szurl), windows_core::from_raw_borrowed(&pbc)) { + match IBindProtocol_Impl::CreateBinding(this, core::mem::transmute(&szurl), core::mem::transmute_copy(&pbc)) { Ok(ok__) => { ppb.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1772,13 +1772,13 @@ pub struct IInternetProtocolEx_Vtbl { pub StartEx: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, u32, super::super::super::Foundation::HANDLE_PTR) -> windows_core::HRESULT, } pub trait IInternetProtocolEx_Impl: IInternetProtocol_Impl { - fn StartEx(&self, puri: Option<&super::IUri>, poiprotsink: Option<&IInternetProtocolSink>, poibindinfo: Option<&IInternetBindInfo>, grfpi: u32, dwreserved: super::super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()>; + fn StartEx(&self, puri: windows_core::Ref<'_, super::IUri>, poiprotsink: windows_core::Ref<'_, IInternetProtocolSink>, poibindinfo: windows_core::Ref<'_, IInternetBindInfo>, grfpi: u32, dwreserved: super::super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()>; } impl IInternetProtocolEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartEx(this: *mut core::ffi::c_void, puri: *mut core::ffi::c_void, poiprotsink: *mut core::ffi::c_void, poibindinfo: *mut core::ffi::c_void, grfpi: u32, dwreserved: super::super::super::Foundation::HANDLE_PTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetProtocolEx_Impl::StartEx(this, windows_core::from_raw_borrowed(&puri), windows_core::from_raw_borrowed(&poiprotsink), windows_core::from_raw_borrowed(&poibindinfo), core::mem::transmute_copy(&grfpi), core::mem::transmute_copy(&dwreserved)).into() + IInternetProtocolEx_Impl::StartEx(this, core::mem::transmute_copy(&puri), core::mem::transmute_copy(&poiprotsink), core::mem::transmute_copy(&poibindinfo), core::mem::transmute_copy(&grfpi), core::mem::transmute_copy(&dwreserved)).into() } Self { base__: IInternetProtocol_Vtbl::new::(), StartEx: StartEx:: } } @@ -1901,7 +1901,7 @@ pub struct IInternetProtocolRoot_Vtbl { pub Resume: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IInternetProtocolRoot_Impl: windows_core::IUnknownImpl { - fn Start(&self, szurl: &windows_core::PCWSTR, poiprotsink: Option<&IInternetProtocolSink>, poibindinfo: Option<&IInternetBindInfo>, grfpi: u32, dwreserved: super::super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()>; + fn Start(&self, szurl: &windows_core::PCWSTR, poiprotsink: windows_core::Ref<'_, IInternetProtocolSink>, poibindinfo: windows_core::Ref<'_, IInternetBindInfo>, grfpi: u32, dwreserved: super::super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()>; fn Continue(&self, pprotocoldata: *const PROTOCOLDATA) -> windows_core::Result<()>; fn Abort(&self, hrreason: windows_core::HRESULT, dwoptions: u32) -> windows_core::Result<()>; fn Terminate(&self, dwoptions: u32) -> windows_core::Result<()>; @@ -1912,7 +1912,7 @@ impl IInternetProtocolRoot_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Start(this: *mut core::ffi::c_void, szurl: windows_core::PCWSTR, poiprotsink: *mut core::ffi::c_void, poibindinfo: *mut core::ffi::c_void, grfpi: u32, dwreserved: super::super::super::Foundation::HANDLE_PTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetProtocolRoot_Impl::Start(this, core::mem::transmute(&szurl), windows_core::from_raw_borrowed(&poiprotsink), windows_core::from_raw_borrowed(&poibindinfo), core::mem::transmute_copy(&grfpi), core::mem::transmute_copy(&dwreserved)).into() + IInternetProtocolRoot_Impl::Start(this, core::mem::transmute(&szurl), core::mem::transmute_copy(&poiprotsink), core::mem::transmute_copy(&poibindinfo), core::mem::transmute_copy(&grfpi), core::mem::transmute_copy(&dwreserved)).into() } unsafe extern "system" fn Continue(this: *mut core::ffi::c_void, pprotocoldata: *const PROTOCOLDATA) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2040,7 +2040,7 @@ pub struct IInternetProtocolSinkStackable_Vtbl { pub RollbackSwitch: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IInternetProtocolSinkStackable_Impl: windows_core::IUnknownImpl { - fn SwitchSink(&self, poiprotsink: Option<&IInternetProtocolSink>) -> windows_core::Result<()>; + fn SwitchSink(&self, poiprotsink: windows_core::Ref<'_, IInternetProtocolSink>) -> windows_core::Result<()>; fn CommitSwitch(&self) -> windows_core::Result<()>; fn RollbackSwitch(&self) -> windows_core::Result<()>; } @@ -2048,7 +2048,7 @@ impl IInternetProtocolSinkStackable_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SwitchSink(this: *mut core::ffi::c_void, poiprotsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetProtocolSinkStackable_Impl::SwitchSink(this, windows_core::from_raw_borrowed(&poiprotsink)).into() + IInternetProtocolSinkStackable_Impl::SwitchSink(this, core::mem::transmute_copy(&poiprotsink)).into() } unsafe extern "system" fn CommitSwitch(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2130,20 +2130,20 @@ pub struct IInternetSecurityManager_Vtbl { pub GetZoneMappings: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IInternetSecurityManager_Impl: windows_core::IUnknownImpl { - fn SetSecuritySite(&self, psite: Option<&IInternetSecurityMgrSite>) -> windows_core::Result<()>; + fn SetSecuritySite(&self, psite: windows_core::Ref<'_, IInternetSecurityMgrSite>) -> windows_core::Result<()>; fn GetSecuritySite(&self) -> windows_core::Result; fn MapUrlToZone(&self, pwszurl: &windows_core::PCWSTR, pdwzone: *mut u32, dwflags: u32) -> windows_core::Result<()>; fn GetSecurityId(&self, pwszurl: &windows_core::PCWSTR, pbsecurityid: *mut u8, pcbsecurityid: *mut u32, dwreserved: usize) -> windows_core::Result<()>; fn ProcessUrlAction(&self, pwszurl: &windows_core::PCWSTR, dwaction: u32, ppolicy: *mut u8, cbpolicy: u32, pcontext: *const u8, cbcontext: u32, dwflags: u32, dwreserved: u32) -> windows_core::Result<()>; fn QueryCustomPolicy(&self, pwszurl: &windows_core::PCWSTR, guidkey: *const windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, pcontext: *const u8, cbcontext: u32, dwreserved: u32) -> windows_core::Result<()>; fn SetZoneMapping(&self, dwzone: u32, lpszpattern: &windows_core::PCWSTR, dwflags: u32) -> windows_core::Result<()>; - fn GetZoneMappings(&self, dwzone: u32, ppenumstring: *mut Option, dwflags: u32) -> windows_core::Result<()>; + fn GetZoneMappings(&self, dwzone: u32, ppenumstring: windows_core::OutRef<'_, super::IEnumString>, dwflags: u32) -> windows_core::Result<()>; } impl IInternetSecurityManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSecuritySite(this: *mut core::ffi::c_void, psite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSecurityManager_Impl::SetSecuritySite(this, windows_core::from_raw_borrowed(&psite)).into() + IInternetSecurityManager_Impl::SetSecuritySite(this, core::mem::transmute_copy(&psite)).into() } unsafe extern "system" fn GetSecuritySite(this: *mut core::ffi::c_void, ppsite: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2276,28 +2276,28 @@ pub struct IInternetSecurityManagerEx2_Vtbl { pub QueryCustomPolicyEx2: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut u8, *mut u32, *const u8, u32, usize) -> windows_core::HRESULT, } pub trait IInternetSecurityManagerEx2_Impl: IInternetSecurityManagerEx_Impl { - fn MapUrlToZoneEx2(&self, puri: Option<&super::IUri>, pdwzone: *mut u32, dwflags: u32, ppwszmappedurl: *mut windows_core::PWSTR, pdwoutflags: *mut u32) -> windows_core::Result<()>; - fn ProcessUrlActionEx2(&self, puri: Option<&super::IUri>, dwaction: u32, ppolicy: *mut u8, cbpolicy: u32, pcontext: *const u8, cbcontext: u32, dwflags: u32, dwreserved: usize, pdwoutflags: *mut u32) -> windows_core::Result<()>; - fn GetSecurityIdEx2(&self, puri: Option<&super::IUri>, pbsecurityid: *mut u8, pcbsecurityid: *mut u32, dwreserved: usize) -> windows_core::Result<()>; - fn QueryCustomPolicyEx2(&self, puri: Option<&super::IUri>, guidkey: *const windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, pcontext: *const u8, cbcontext: u32, dwreserved: usize) -> windows_core::Result<()>; + fn MapUrlToZoneEx2(&self, puri: windows_core::Ref<'_, super::IUri>, pdwzone: *mut u32, dwflags: u32, ppwszmappedurl: *mut windows_core::PWSTR, pdwoutflags: *mut u32) -> windows_core::Result<()>; + fn ProcessUrlActionEx2(&self, puri: windows_core::Ref<'_, super::IUri>, dwaction: u32, ppolicy: *mut u8, cbpolicy: u32, pcontext: *const u8, cbcontext: u32, dwflags: u32, dwreserved: usize, pdwoutflags: *mut u32) -> windows_core::Result<()>; + fn GetSecurityIdEx2(&self, puri: windows_core::Ref<'_, super::IUri>, pbsecurityid: *mut u8, pcbsecurityid: *mut u32, dwreserved: usize) -> windows_core::Result<()>; + fn QueryCustomPolicyEx2(&self, puri: windows_core::Ref<'_, super::IUri>, guidkey: *const windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, pcontext: *const u8, cbcontext: u32, dwreserved: usize) -> windows_core::Result<()>; } impl IInternetSecurityManagerEx2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn MapUrlToZoneEx2(this: *mut core::ffi::c_void, puri: *mut core::ffi::c_void, pdwzone: *mut u32, dwflags: u32, ppwszmappedurl: *mut windows_core::PWSTR, pdwoutflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSecurityManagerEx2_Impl::MapUrlToZoneEx2(this, windows_core::from_raw_borrowed(&puri), core::mem::transmute_copy(&pdwzone), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&ppwszmappedurl), core::mem::transmute_copy(&pdwoutflags)).into() + IInternetSecurityManagerEx2_Impl::MapUrlToZoneEx2(this, core::mem::transmute_copy(&puri), core::mem::transmute_copy(&pdwzone), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&ppwszmappedurl), core::mem::transmute_copy(&pdwoutflags)).into() } unsafe extern "system" fn ProcessUrlActionEx2(this: *mut core::ffi::c_void, puri: *mut core::ffi::c_void, dwaction: u32, ppolicy: *mut u8, cbpolicy: u32, pcontext: *const u8, cbcontext: u32, dwflags: u32, dwreserved: usize, pdwoutflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSecurityManagerEx2_Impl::ProcessUrlActionEx2(this, windows_core::from_raw_borrowed(&puri), core::mem::transmute_copy(&dwaction), core::mem::transmute_copy(&ppolicy), core::mem::transmute_copy(&cbpolicy), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&cbcontext), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&dwreserved), core::mem::transmute_copy(&pdwoutflags)).into() + IInternetSecurityManagerEx2_Impl::ProcessUrlActionEx2(this, core::mem::transmute_copy(&puri), core::mem::transmute_copy(&dwaction), core::mem::transmute_copy(&ppolicy), core::mem::transmute_copy(&cbpolicy), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&cbcontext), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&dwreserved), core::mem::transmute_copy(&pdwoutflags)).into() } unsafe extern "system" fn GetSecurityIdEx2(this: *mut core::ffi::c_void, puri: *mut core::ffi::c_void, pbsecurityid: *mut u8, pcbsecurityid: *mut u32, dwreserved: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSecurityManagerEx2_Impl::GetSecurityIdEx2(this, windows_core::from_raw_borrowed(&puri), core::mem::transmute_copy(&pbsecurityid), core::mem::transmute_copy(&pcbsecurityid), core::mem::transmute_copy(&dwreserved)).into() + IInternetSecurityManagerEx2_Impl::GetSecurityIdEx2(this, core::mem::transmute_copy(&puri), core::mem::transmute_copy(&pbsecurityid), core::mem::transmute_copy(&pcbsecurityid), core::mem::transmute_copy(&dwreserved)).into() } unsafe extern "system" fn QueryCustomPolicyEx2(this: *mut core::ffi::c_void, puri: *mut core::ffi::c_void, guidkey: *const windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, pcontext: *const u8, cbcontext: u32, dwreserved: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSecurityManagerEx2_Impl::QueryCustomPolicyEx2(this, windows_core::from_raw_borrowed(&puri), core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&pppolicy), core::mem::transmute_copy(&pcbpolicy), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&cbcontext), core::mem::transmute_copy(&dwreserved)).into() + IInternetSecurityManagerEx2_Impl::QueryCustomPolicyEx2(this, core::mem::transmute_copy(&puri), core::mem::transmute_copy(&guidkey), core::mem::transmute_copy(&pppolicy), core::mem::transmute_copy(&pcbpolicy), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&cbcontext), core::mem::transmute_copy(&dwreserved)).into() } Self { base__: IInternetSecurityManagerEx_Vtbl::new::(), @@ -2418,11 +2418,11 @@ pub struct IInternetSession_Vtbl { pub GetSessionOption: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut u32, u32) -> windows_core::HRESULT, } pub trait IInternetSession_Impl: windows_core::IUnknownImpl { - fn RegisterNameSpace(&self, pcf: Option<&super::IClassFactory>, rclsid: *const windows_core::GUID, pwzprotocol: &windows_core::PCWSTR, cpatterns: u32, ppwzpatterns: *const windows_core::PCWSTR, dwreserved: u32) -> windows_core::Result<()>; - fn UnregisterNameSpace(&self, pcf: Option<&super::IClassFactory>, pszprotocol: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn RegisterMimeFilter(&self, pcf: Option<&super::IClassFactory>, rclsid: *const windows_core::GUID, pwztype: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn UnregisterMimeFilter(&self, pcf: Option<&super::IClassFactory>, pwztype: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn CreateBinding(&self, pbc: Option<&super::IBindCtx>, szurl: &windows_core::PCWSTR, punkouter: Option<&windows_core::IUnknown>, ppunk: *mut Option, ppoinetprot: *mut Option, dwoption: u32) -> windows_core::Result<()>; + fn RegisterNameSpace(&self, pcf: windows_core::Ref<'_, super::IClassFactory>, rclsid: *const windows_core::GUID, pwzprotocol: &windows_core::PCWSTR, cpatterns: u32, ppwzpatterns: *const windows_core::PCWSTR, dwreserved: u32) -> windows_core::Result<()>; + fn UnregisterNameSpace(&self, pcf: windows_core::Ref<'_, super::IClassFactory>, pszprotocol: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn RegisterMimeFilter(&self, pcf: windows_core::Ref<'_, super::IClassFactory>, rclsid: *const windows_core::GUID, pwztype: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn UnregisterMimeFilter(&self, pcf: windows_core::Ref<'_, super::IClassFactory>, pwztype: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn CreateBinding(&self, pbc: windows_core::Ref<'_, super::IBindCtx>, szurl: &windows_core::PCWSTR, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, ppunk: windows_core::OutRef<'_, windows_core::IUnknown>, ppoinetprot: windows_core::OutRef<'_, IInternetProtocol>, dwoption: u32) -> windows_core::Result<()>; fn SetSessionOption(&self, dwoption: u32, pbuffer: *const core::ffi::c_void, dwbufferlength: u32, dwreserved: u32) -> windows_core::Result<()>; fn GetSessionOption(&self, dwoption: u32, pbuffer: *mut core::ffi::c_void, pdwbufferlength: *mut u32, dwreserved: u32) -> windows_core::Result<()>; } @@ -2430,23 +2430,23 @@ impl IInternetSession_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterNameSpace(this: *mut core::ffi::c_void, pcf: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, pwzprotocol: windows_core::PCWSTR, cpatterns: u32, ppwzpatterns: *const windows_core::PCWSTR, dwreserved: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSession_Impl::RegisterNameSpace(this, windows_core::from_raw_borrowed(&pcf), core::mem::transmute_copy(&rclsid), core::mem::transmute(&pwzprotocol), core::mem::transmute_copy(&cpatterns), core::mem::transmute_copy(&ppwzpatterns), core::mem::transmute_copy(&dwreserved)).into() + IInternetSession_Impl::RegisterNameSpace(this, core::mem::transmute_copy(&pcf), core::mem::transmute_copy(&rclsid), core::mem::transmute(&pwzprotocol), core::mem::transmute_copy(&cpatterns), core::mem::transmute_copy(&ppwzpatterns), core::mem::transmute_copy(&dwreserved)).into() } unsafe extern "system" fn UnregisterNameSpace(this: *mut core::ffi::c_void, pcf: *mut core::ffi::c_void, pszprotocol: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSession_Impl::UnregisterNameSpace(this, windows_core::from_raw_borrowed(&pcf), core::mem::transmute(&pszprotocol)).into() + IInternetSession_Impl::UnregisterNameSpace(this, core::mem::transmute_copy(&pcf), core::mem::transmute(&pszprotocol)).into() } unsafe extern "system" fn RegisterMimeFilter(this: *mut core::ffi::c_void, pcf: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, pwztype: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSession_Impl::RegisterMimeFilter(this, windows_core::from_raw_borrowed(&pcf), core::mem::transmute_copy(&rclsid), core::mem::transmute(&pwztype)).into() + IInternetSession_Impl::RegisterMimeFilter(this, core::mem::transmute_copy(&pcf), core::mem::transmute_copy(&rclsid), core::mem::transmute(&pwztype)).into() } unsafe extern "system" fn UnregisterMimeFilter(this: *mut core::ffi::c_void, pcf: *mut core::ffi::c_void, pwztype: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSession_Impl::UnregisterMimeFilter(this, windows_core::from_raw_borrowed(&pcf), core::mem::transmute(&pwztype)).into() + IInternetSession_Impl::UnregisterMimeFilter(this, core::mem::transmute_copy(&pcf), core::mem::transmute(&pwztype)).into() } unsafe extern "system" fn CreateBinding(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, szurl: windows_core::PCWSTR, punkouter: *mut core::ffi::c_void, ppunk: *mut *mut core::ffi::c_void, ppoinetprot: *mut *mut core::ffi::c_void, dwoption: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInternetSession_Impl::CreateBinding(this, windows_core::from_raw_borrowed(&pbc), core::mem::transmute(&szurl), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&ppunk), core::mem::transmute_copy(&ppoinetprot), core::mem::transmute_copy(&dwoption)).into() + IInternetSession_Impl::CreateBinding(this, core::mem::transmute_copy(&pbc), core::mem::transmute(&szurl), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&ppunk), core::mem::transmute_copy(&ppoinetprot), core::mem::transmute_copy(&dwoption)).into() } unsafe extern "system" fn SetSessionOption(this: *mut core::ffi::c_void, dwoption: u32, pbuffer: *const core::ffi::c_void, dwbufferlength: u32, dwreserved: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2915,9 +2915,9 @@ pub struct IPersistMoniker_Vtbl { pub trait IPersistMoniker_Impl: windows_core::IUnknownImpl { fn GetClassID(&self) -> windows_core::Result; fn IsDirty(&self) -> windows_core::HRESULT; - fn Load(&self, ffullyavailable: super::super::super::Foundation::BOOL, pimkname: Option<&super::IMoniker>, pibc: Option<&super::IBindCtx>, grfmode: u32) -> windows_core::Result<()>; - fn Save(&self, pimkname: Option<&super::IMoniker>, pbc: Option<&super::IBindCtx>, fremember: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SaveCompleted(&self, pimkname: Option<&super::IMoniker>, pibc: Option<&super::IBindCtx>) -> windows_core::Result<()>; + fn Load(&self, ffullyavailable: super::super::super::Foundation::BOOL, pimkname: windows_core::Ref<'_, super::IMoniker>, pibc: windows_core::Ref<'_, super::IBindCtx>, grfmode: u32) -> windows_core::Result<()>; + fn Save(&self, pimkname: windows_core::Ref<'_, super::IMoniker>, pbc: windows_core::Ref<'_, super::IBindCtx>, fremember: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SaveCompleted(&self, pimkname: windows_core::Ref<'_, super::IMoniker>, pibc: windows_core::Ref<'_, super::IBindCtx>) -> windows_core::Result<()>; fn GetCurMoniker(&self) -> windows_core::Result; } impl IPersistMoniker_Vtbl { @@ -2938,15 +2938,15 @@ impl IPersistMoniker_Vtbl { } unsafe extern "system" fn Load(this: *mut core::ffi::c_void, ffullyavailable: super::super::super::Foundation::BOOL, pimkname: *mut core::ffi::c_void, pibc: *mut core::ffi::c_void, grfmode: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistMoniker_Impl::Load(this, core::mem::transmute_copy(&ffullyavailable), windows_core::from_raw_borrowed(&pimkname), windows_core::from_raw_borrowed(&pibc), core::mem::transmute_copy(&grfmode)).into() + IPersistMoniker_Impl::Load(this, core::mem::transmute_copy(&ffullyavailable), core::mem::transmute_copy(&pimkname), core::mem::transmute_copy(&pibc), core::mem::transmute_copy(&grfmode)).into() } unsafe extern "system" fn Save(this: *mut core::ffi::c_void, pimkname: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, fremember: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistMoniker_Impl::Save(this, windows_core::from_raw_borrowed(&pimkname), windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&fremember)).into() + IPersistMoniker_Impl::Save(this, core::mem::transmute_copy(&pimkname), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&fremember)).into() } unsafe extern "system" fn SaveCompleted(this: *mut core::ffi::c_void, pimkname: *mut core::ffi::c_void, pibc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistMoniker_Impl::SaveCompleted(this, windows_core::from_raw_borrowed(&pimkname), windows_core::from_raw_borrowed(&pibc)).into() + IPersistMoniker_Impl::SaveCompleted(this, core::mem::transmute_copy(&pimkname), core::mem::transmute_copy(&pibc)).into() } unsafe extern "system" fn GetCurMoniker(this: *mut core::ffi::c_void, ppimkname: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3010,17 +3010,17 @@ pub struct ISoftDistExt_Vtbl { } #[cfg(feature = "Win32_Data_Xml_MsXml")] pub trait ISoftDistExt_Impl: windows_core::IUnknownImpl { - fn ProcessSoftDist(&self, szcdfurl: &windows_core::PCWSTR, psoftdistelement: Option<&super::super::super::Data::Xml::MsXml::IXMLElement>, lpsdi: *mut SOFTDISTINFO) -> windows_core::Result<()>; + fn ProcessSoftDist(&self, szcdfurl: &windows_core::PCWSTR, psoftdistelement: windows_core::Ref<'_, super::super::super::Data::Xml::MsXml::IXMLElement>, lpsdi: *mut SOFTDISTINFO) -> windows_core::Result<()>; fn GetFirstCodeBase(&self, szcodebase: *const windows_core::PCWSTR, dwmaxsize: *const u32) -> windows_core::Result<()>; fn GetNextCodeBase(&self, szcodebase: *const windows_core::PCWSTR, dwmaxsize: *const u32) -> windows_core::Result<()>; - fn AsyncInstallDistributionUnit(&self, pbc: Option<&super::IBindCtx>, pvreserved: *const core::ffi::c_void, flags: u32, lpcbh: *const CODEBASEHOLD) -> windows_core::Result<()>; + fn AsyncInstallDistributionUnit(&self, pbc: windows_core::Ref<'_, super::IBindCtx>, pvreserved: *const core::ffi::c_void, flags: u32, lpcbh: *const CODEBASEHOLD) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Data_Xml_MsXml")] impl ISoftDistExt_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ProcessSoftDist(this: *mut core::ffi::c_void, szcdfurl: windows_core::PCWSTR, psoftdistelement: *mut core::ffi::c_void, lpsdi: *mut SOFTDISTINFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISoftDistExt_Impl::ProcessSoftDist(this, core::mem::transmute(&szcdfurl), windows_core::from_raw_borrowed(&psoftdistelement), core::mem::transmute_copy(&lpsdi)).into() + ISoftDistExt_Impl::ProcessSoftDist(this, core::mem::transmute(&szcdfurl), core::mem::transmute_copy(&psoftdistelement), core::mem::transmute_copy(&lpsdi)).into() } unsafe extern "system" fn GetFirstCodeBase(this: *mut core::ffi::c_void, szcodebase: *const windows_core::PCWSTR, dwmaxsize: *const u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3032,7 +3032,7 @@ impl ISoftDistExt_Vtbl { } unsafe extern "system" fn AsyncInstallDistributionUnit(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pvreserved: *const core::ffi::c_void, flags: u32, lpcbh: *const CODEBASEHOLD) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISoftDistExt_Impl::AsyncInstallDistributionUnit(this, windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&pvreserved), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&lpcbh)).into() + ISoftDistExt_Impl::AsyncInstallDistributionUnit(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pvreserved), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&lpcbh)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs index 2cb5febcdb..9148dde27d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs @@ -940,7 +940,7 @@ pub trait AsyncIAdviseSink_Impl: windows_core::IUnknownImpl { fn Finish_OnDataChange(&self); fn Begin_OnViewChange(&self, dwaspect: u32, lindex: i32); fn Finish_OnViewChange(&self); - fn Begin_OnRename(&self, pmk: Option<&IMoniker>); + fn Begin_OnRename(&self, pmk: windows_core::Ref<'_, IMoniker>); fn Finish_OnRename(&self); fn Begin_OnSave(&self); fn Finish_OnSave(&self); @@ -968,7 +968,7 @@ impl AsyncIAdviseSink_Vtbl { } unsafe extern "system" fn Begin_OnRename(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIAdviseSink_Impl::Begin_OnRename(this, windows_core::from_raw_borrowed(&pmk)) + AsyncIAdviseSink_Impl::Begin_OnRename(this, core::mem::transmute_copy(&pmk)) } unsafe extern "system" fn Finish_OnRename(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1037,7 +1037,7 @@ pub struct AsyncIAdviseSink2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] pub trait AsyncIAdviseSink2_Impl: AsyncIAdviseSink_Impl { - fn Begin_OnLinkSrcChange(&self, pmk: Option<&IMoniker>); + fn Begin_OnLinkSrcChange(&self, pmk: windows_core::Ref<'_, IMoniker>); fn Finish_OnLinkSrcChange(&self); } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] @@ -1045,7 +1045,7 @@ impl AsyncIAdviseSink2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Begin_OnLinkSrcChange(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIAdviseSink2_Impl::Begin_OnLinkSrcChange(this, windows_core::from_raw_borrowed(&pmk)) + AsyncIAdviseSink2_Impl::Begin_OnLinkSrcChange(this, core::mem::transmute_copy(&pmk)) } unsafe extern "system" fn Finish_OnLinkSrcChange(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2406,7 +2406,7 @@ pub struct IAddrExclusionControl_Vtbl { } pub trait IAddrExclusionControl_Impl: windows_core::IUnknownImpl { fn GetCurrentAddrExclusionList(&self, riid: *const windows_core::GUID, ppenumerator: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn UpdateAddrExclusionList(&self, penumerator: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn UpdateAddrExclusionList(&self, penumerator: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IAddrExclusionControl_Vtbl { pub const fn new() -> Self { @@ -2416,7 +2416,7 @@ impl IAddrExclusionControl_Vtbl { } unsafe extern "system" fn UpdateAddrExclusionList(this: *mut core::ffi::c_void, penumerator: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAddrExclusionControl_Impl::UpdateAddrExclusionList(this, windows_core::from_raw_borrowed(&penumerator)).into() + IAddrExclusionControl_Impl::UpdateAddrExclusionList(this, core::mem::transmute_copy(&penumerator)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2509,7 +2509,7 @@ pub struct IAdviseSink_Vtbl { pub trait IAdviseSink_Impl: windows_core::IUnknownImpl { fn OnDataChange(&self, pformatetc: *const FORMATETC, pstgmed: *const STGMEDIUM); fn OnViewChange(&self, dwaspect: u32, lindex: i32); - fn OnRename(&self, pmk: Option<&IMoniker>); + fn OnRename(&self, pmk: windows_core::Ref<'_, IMoniker>); fn OnSave(&self); fn OnClose(&self); } @@ -2526,7 +2526,7 @@ impl IAdviseSink_Vtbl { } unsafe extern "system" fn OnRename(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAdviseSink_Impl::OnRename(this, windows_core::from_raw_borrowed(&pmk)) + IAdviseSink_Impl::OnRename(this, core::mem::transmute_copy(&pmk)) } unsafe extern "system" fn OnSave(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2574,14 +2574,14 @@ pub struct IAdviseSink2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] pub trait IAdviseSink2_Impl: IAdviseSink_Impl { - fn OnLinkSrcChange(&self, pmk: Option<&IMoniker>); + fn OnLinkSrcChange(&self, pmk: windows_core::Ref<'_, IMoniker>); } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] impl IAdviseSink2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnLinkSrcChange(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAdviseSink2_Impl::OnLinkSrcChange(this, windows_core::from_raw_borrowed(&pmk)) + IAdviseSink2_Impl::OnLinkSrcChange(this, core::mem::transmute_copy(&pmk)) } Self { base__: IAdviseSink_Vtbl::new::(), OnLinkSrcChange: OnLinkSrcChange:: } } @@ -2695,7 +2695,7 @@ pub struct IAsyncRpcChannelBuffer_Vtbl { pub GetDestCtxEx: unsafe extern "system" fn(*mut core::ffi::c_void, *const RPCOLEMESSAGE, *mut u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAsyncRpcChannelBuffer_Impl: IRpcChannelBuffer2_Impl { - fn Send(&self, pmsg: *mut RPCOLEMESSAGE, psync: Option<&ISynchronize>, pulstatus: *mut u32) -> windows_core::Result<()>; + fn Send(&self, pmsg: *mut RPCOLEMESSAGE, psync: windows_core::Ref<'_, ISynchronize>, pulstatus: *mut u32) -> windows_core::Result<()>; fn Receive(&self, pmsg: *mut RPCOLEMESSAGE, pulstatus: *mut u32) -> windows_core::Result<()>; fn GetDestCtxEx(&self, pmsg: *const RPCOLEMESSAGE, pdwdestcontext: *mut u32, ppvdestcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } @@ -2703,7 +2703,7 @@ impl IAsyncRpcChannelBuffer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Send(this: *mut core::ffi::c_void, pmsg: *mut RPCOLEMESSAGE, psync: *mut core::ffi::c_void, pulstatus: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncRpcChannelBuffer_Impl::Send(this, core::mem::transmute_copy(&pmsg), windows_core::from_raw_borrowed(&psync), core::mem::transmute_copy(&pulstatus)).into() + IAsyncRpcChannelBuffer_Impl::Send(this, core::mem::transmute_copy(&pmsg), core::mem::transmute_copy(&psync), core::mem::transmute_copy(&pulstatus)).into() } unsafe extern "system" fn Receive(this: *mut core::ffi::c_void, pmsg: *mut RPCOLEMESSAGE, pulstatus: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2855,13 +2855,13 @@ pub struct IBindCtx_Vtbl { pub RevokeObjectParam: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT, } pub trait IBindCtx_Impl: windows_core::IUnknownImpl { - fn RegisterObjectBound(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn RevokeObjectBound(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn RegisterObjectBound(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn RevokeObjectBound(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn ReleaseBoundObjects(&self) -> windows_core::Result<()>; fn SetBindOptions(&self, pbindopts: *const BIND_OPTS) -> windows_core::Result<()>; fn GetBindOptions(&self, pbindopts: *mut BIND_OPTS) -> windows_core::Result<()>; fn GetRunningObjectTable(&self) -> windows_core::Result; - fn RegisterObjectParam(&self, pszkey: &windows_core::PCWSTR, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn RegisterObjectParam(&self, pszkey: &windows_core::PCWSTR, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetObjectParam(&self, pszkey: &windows_core::PCWSTR) -> windows_core::Result; fn EnumObjectParam(&self) -> windows_core::Result; fn RevokeObjectParam(&self, pszkey: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -2870,11 +2870,11 @@ impl IBindCtx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterObjectBound(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindCtx_Impl::RegisterObjectBound(this, windows_core::from_raw_borrowed(&punk)).into() + IBindCtx_Impl::RegisterObjectBound(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn RevokeObjectBound(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindCtx_Impl::RevokeObjectBound(this, windows_core::from_raw_borrowed(&punk)).into() + IBindCtx_Impl::RevokeObjectBound(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn ReleaseBoundObjects(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2900,7 +2900,7 @@ impl IBindCtx_Vtbl { } unsafe extern "system" fn RegisterObjectParam(this: *mut core::ffi::c_void, pszkey: windows_core::PCWSTR, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindCtx_Impl::RegisterObjectParam(this, core::mem::transmute(&pszkey), windows_core::from_raw_borrowed(&punk)).into() + IBindCtx_Impl::RegisterObjectParam(this, core::mem::transmute(&pszkey), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn GetObjectParam(this: *mut core::ffi::c_void, pszkey: windows_core::PCWSTR, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2980,23 +2980,23 @@ pub struct IBindHost_Vtbl { pub MonikerBindToObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IBindHost_Impl: windows_core::IUnknownImpl { - fn CreateMoniker(&self, szname: &windows_core::PCWSTR, pbc: Option<&IBindCtx>, ppmk: *mut Option, dwreserved: u32) -> windows_core::Result<()>; - fn MonikerBindToStorage(&self, pmk: Option<&IMoniker>, pbc: Option<&IBindCtx>, pbsc: Option<&IBindStatusCallback>, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn MonikerBindToObject(&self, pmk: Option<&IMoniker>, pbc: Option<&IBindCtx>, pbsc: Option<&IBindStatusCallback>, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateMoniker(&self, szname: &windows_core::PCWSTR, pbc: windows_core::Ref<'_, IBindCtx>, ppmk: windows_core::OutRef<'_, IMoniker>, dwreserved: u32) -> windows_core::Result<()>; + fn MonikerBindToStorage(&self, pmk: windows_core::Ref<'_, IMoniker>, pbc: windows_core::Ref<'_, IBindCtx>, pbsc: windows_core::Ref<'_, IBindStatusCallback>, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn MonikerBindToObject(&self, pmk: windows_core::Ref<'_, IMoniker>, pbc: windows_core::Ref<'_, IBindCtx>, pbsc: windows_core::Ref<'_, IBindStatusCallback>, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IBindHost_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateMoniker(this: *mut core::ffi::c_void, szname: windows_core::PCWSTR, pbc: *mut core::ffi::c_void, ppmk: *mut *mut core::ffi::c_void, dwreserved: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindHost_Impl::CreateMoniker(this, core::mem::transmute(&szname), windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&ppmk), core::mem::transmute_copy(&dwreserved)).into() + IBindHost_Impl::CreateMoniker(this, core::mem::transmute(&szname), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&ppmk), core::mem::transmute_copy(&dwreserved)).into() } unsafe extern "system" fn MonikerBindToStorage(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pbsc: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindHost_Impl::MonikerBindToStorage(this, windows_core::from_raw_borrowed(&pmk), windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pbsc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobj)).into() + IBindHost_Impl::MonikerBindToStorage(this, core::mem::transmute_copy(&pmk), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pbsc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobj)).into() } unsafe extern "system" fn MonikerBindToObject(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pbsc: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindHost_Impl::MonikerBindToObject(this, windows_core::from_raw_borrowed(&pmk), windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pbsc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobj)).into() + IBindHost_Impl::MonikerBindToObject(this, core::mem::transmute_copy(&pmk), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pbsc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobj)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3073,21 +3073,21 @@ pub struct IBindStatusCallback_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] pub trait IBindStatusCallback_Impl: windows_core::IUnknownImpl { - fn OnStartBinding(&self, dwreserved: u32, pib: Option<&IBinding>) -> windows_core::Result<()>; + fn OnStartBinding(&self, dwreserved: u32, pib: windows_core::Ref<'_, IBinding>) -> windows_core::Result<()>; fn GetPriority(&self) -> windows_core::Result; fn OnLowResource(&self, reserved: u32) -> windows_core::Result<()>; fn OnProgress(&self, ulprogress: u32, ulprogressmax: u32, ulstatuscode: u32, szstatustext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn OnStopBinding(&self, hresult: windows_core::HRESULT, szerror: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetBindInfo(&self, grfbindf: *mut u32, pbindinfo: *mut BINDINFO) -> windows_core::Result<()>; fn OnDataAvailable(&self, grfbscf: u32, dwsize: u32, pformatetc: *const FORMATETC, pstgmed: *const STGMEDIUM) -> windows_core::Result<()>; - fn OnObjectAvailable(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnObjectAvailable(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] impl IBindStatusCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnStartBinding(this: *mut core::ffi::c_void, dwreserved: u32, pib: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindStatusCallback_Impl::OnStartBinding(this, core::mem::transmute_copy(&dwreserved), windows_core::from_raw_borrowed(&pib)).into() + IBindStatusCallback_Impl::OnStartBinding(this, core::mem::transmute_copy(&dwreserved), core::mem::transmute_copy(&pib)).into() } unsafe extern "system" fn GetPriority(this: *mut core::ffi::c_void, pnpriority: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3121,7 +3121,7 @@ impl IBindStatusCallback_Vtbl { } unsafe extern "system" fn OnObjectAvailable(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindStatusCallback_Impl::OnObjectAvailable(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)).into() + IBindStatusCallback_Impl::OnObjectAvailable(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3324,13 +3324,13 @@ pub struct ICallFactory_Vtbl { pub CreateCall: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICallFactory_Impl: windows_core::IUnknownImpl { - fn CreateCall(&self, riid: *const windows_core::GUID, pctrlunk: Option<&windows_core::IUnknown>, riid2: *const windows_core::GUID) -> windows_core::Result; + fn CreateCall(&self, riid: *const windows_core::GUID, pctrlunk: windows_core::Ref<'_, windows_core::IUnknown>, riid2: *const windows_core::GUID) -> windows_core::Result; } impl ICallFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateCall(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, pctrlunk: *mut core::ffi::c_void, riid2: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICallFactory_Impl::CreateCall(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&pctrlunk), core::mem::transmute_copy(&riid2)) { + match ICallFactory_Impl::CreateCall(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pctrlunk), core::mem::transmute_copy(&riid2)) { Ok(ok__) => { ppv.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3718,14 +3718,14 @@ pub struct IClassFactory_Vtbl { pub LockServer: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IClassFactory_Impl: windows_core::IUnknownImpl { - fn CreateInstance(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateInstance(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn LockServer(&self, flock: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IClassFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IClassFactory_Impl::CreateInstance(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() + IClassFactory_Impl::CreateInstance(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() } unsafe extern "system" fn LockServer(this: *mut core::ffi::c_void, flock: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3774,23 +3774,23 @@ pub struct IClientSecurity_Vtbl { pub CopyProxy: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IClientSecurity_Impl: windows_core::IUnknownImpl { - fn QueryBlanket(&self, pproxy: Option<&windows_core::IUnknown>, pauthnsvc: *mut u32, pauthzsvc: *mut u32, pserverprincname: *mut *mut u16, pauthnlevel: *mut RPC_C_AUTHN_LEVEL, pimplevel: *mut RPC_C_IMP_LEVEL, pauthinfo: *mut *mut core::ffi::c_void, pcapabilites: *mut u32) -> windows_core::Result<()>; - fn SetBlanket(&self, pproxy: Option<&windows_core::IUnknown>, dwauthnsvc: u32, dwauthzsvc: u32, pserverprincname: &windows_core::PCWSTR, dwauthnlevel: RPC_C_AUTHN_LEVEL, dwimplevel: RPC_C_IMP_LEVEL, pauthinfo: *const core::ffi::c_void, dwcapabilities: &EOLE_AUTHENTICATION_CAPABILITIES) -> windows_core::Result<()>; - fn CopyProxy(&self, pproxy: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn QueryBlanket(&self, pproxy: windows_core::Ref<'_, windows_core::IUnknown>, pauthnsvc: *mut u32, pauthzsvc: *mut u32, pserverprincname: *mut *mut u16, pauthnlevel: *mut RPC_C_AUTHN_LEVEL, pimplevel: *mut RPC_C_IMP_LEVEL, pauthinfo: *mut *mut core::ffi::c_void, pcapabilites: *mut u32) -> windows_core::Result<()>; + fn SetBlanket(&self, pproxy: windows_core::Ref<'_, windows_core::IUnknown>, dwauthnsvc: u32, dwauthzsvc: u32, pserverprincname: &windows_core::PCWSTR, dwauthnlevel: RPC_C_AUTHN_LEVEL, dwimplevel: RPC_C_IMP_LEVEL, pauthinfo: *const core::ffi::c_void, dwcapabilities: &EOLE_AUTHENTICATION_CAPABILITIES) -> windows_core::Result<()>; + fn CopyProxy(&self, pproxy: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } impl IClientSecurity_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryBlanket(this: *mut core::ffi::c_void, pproxy: *mut core::ffi::c_void, pauthnsvc: *mut u32, pauthzsvc: *mut u32, pserverprincname: *mut *mut u16, pauthnlevel: *mut RPC_C_AUTHN_LEVEL, pimplevel: *mut RPC_C_IMP_LEVEL, pauthinfo: *mut *mut core::ffi::c_void, pcapabilites: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IClientSecurity_Impl::QueryBlanket(this, windows_core::from_raw_borrowed(&pproxy), core::mem::transmute_copy(&pauthnsvc), core::mem::transmute_copy(&pauthzsvc), core::mem::transmute_copy(&pserverprincname), core::mem::transmute_copy(&pauthnlevel), core::mem::transmute_copy(&pimplevel), core::mem::transmute_copy(&pauthinfo), core::mem::transmute_copy(&pcapabilites)).into() + IClientSecurity_Impl::QueryBlanket(this, core::mem::transmute_copy(&pproxy), core::mem::transmute_copy(&pauthnsvc), core::mem::transmute_copy(&pauthzsvc), core::mem::transmute_copy(&pserverprincname), core::mem::transmute_copy(&pauthnlevel), core::mem::transmute_copy(&pimplevel), core::mem::transmute_copy(&pauthinfo), core::mem::transmute_copy(&pcapabilites)).into() } unsafe extern "system" fn SetBlanket(this: *mut core::ffi::c_void, pproxy: *mut core::ffi::c_void, dwauthnsvc: u32, dwauthzsvc: u32, pserverprincname: windows_core::PCWSTR, dwauthnlevel: RPC_C_AUTHN_LEVEL, dwimplevel: RPC_C_IMP_LEVEL, pauthinfo: *const core::ffi::c_void, dwcapabilities: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IClientSecurity_Impl::SetBlanket(this, windows_core::from_raw_borrowed(&pproxy), core::mem::transmute_copy(&dwauthnsvc), core::mem::transmute_copy(&dwauthzsvc), core::mem::transmute(&pserverprincname), core::mem::transmute_copy(&dwauthnlevel), core::mem::transmute_copy(&dwimplevel), core::mem::transmute_copy(&pauthinfo), core::mem::transmute(&dwcapabilities)).into() + IClientSecurity_Impl::SetBlanket(this, core::mem::transmute_copy(&pproxy), core::mem::transmute_copy(&dwauthnsvc), core::mem::transmute_copy(&dwauthzsvc), core::mem::transmute(&pserverprincname), core::mem::transmute_copy(&dwauthnlevel), core::mem::transmute_copy(&dwimplevel), core::mem::transmute_copy(&pauthinfo), core::mem::transmute(&dwcapabilities)).into() } unsafe extern "system" fn CopyProxy(this: *mut core::ffi::c_void, pproxy: *mut core::ffi::c_void, ppcopy: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IClientSecurity_Impl::CopyProxy(this, windows_core::from_raw_borrowed(&pproxy)) { + match IClientSecurity_Impl::CopyProxy(this, core::mem::transmute_copy(&pproxy)) { Ok(ok__) => { ppcopy.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3930,7 +3930,7 @@ pub struct IConnectionPoint_Vtbl { pub trait IConnectionPoint_Impl: windows_core::IUnknownImpl { fn GetConnectionInterface(&self) -> windows_core::Result; fn GetConnectionPointContainer(&self) -> windows_core::Result; - fn Advise(&self, punksink: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn Advise(&self, punksink: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; fn EnumConnections(&self) -> windows_core::Result; } @@ -3958,7 +3958,7 @@ impl IConnectionPoint_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, punksink: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IConnectionPoint_Impl::Advise(this, windows_core::from_raw_borrowed(&punksink)) { + match IConnectionPoint_Impl::Advise(this, core::mem::transmute_copy(&punksink)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4078,16 +4078,16 @@ pub struct IContext_Vtbl { pub EnumContextProps: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IContext_Impl: windows_core::IUnknownImpl { - fn SetProperty(&self, rpolicyid: *const windows_core::GUID, flags: u32, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetProperty(&self, rpolicyid: *const windows_core::GUID, flags: u32, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RemoveProperty(&self, rpolicyid: *const windows_core::GUID) -> windows_core::Result<()>; - fn GetProperty(&self, rguid: *const windows_core::GUID, pflags: *mut u32, ppunk: *mut Option) -> windows_core::Result<()>; + fn GetProperty(&self, rguid: *const windows_core::GUID, pflags: *mut u32, ppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumContextProps(&self) -> windows_core::Result; } impl IContext_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetProperty(this: *mut core::ffi::c_void, rpolicyid: *const windows_core::GUID, flags: u32, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContext_Impl::SetProperty(this, core::mem::transmute_copy(&rpolicyid), core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&punk)).into() + IContext_Impl::SetProperty(this, core::mem::transmute_copy(&rpolicyid), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn RemoveProperty(this: *mut core::ffi::c_void, rpolicyid: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4136,13 +4136,13 @@ pub struct IContextCallback_Vtbl { pub ContextCallback: unsafe extern "system" fn(*mut core::ffi::c_void, PFNCONTEXTCALL, *const ComCallData, *const windows_core::GUID, i32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IContextCallback_Impl: windows_core::IUnknownImpl { - fn ContextCallback(&self, pfncallback: PFNCONTEXTCALL, pparam: *const ComCallData, riid: *const windows_core::GUID, imethod: i32, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ContextCallback(&self, pfncallback: PFNCONTEXTCALL, pparam: *const ComCallData, riid: *const windows_core::GUID, imethod: i32, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IContextCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ContextCallback(this: *mut core::ffi::c_void, pfncallback: PFNCONTEXTCALL, pparam: *const ComCallData, riid: *const windows_core::GUID, imethod: i32, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContextCallback_Impl::ContextCallback(this, core::mem::transmute_copy(&pfncallback), core::mem::transmute_copy(&pparam), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&imethod), windows_core::from_raw_borrowed(&punk)).into() + IContextCallback_Impl::ContextCallback(this, core::mem::transmute_copy(&pfncallback), core::mem::transmute_copy(&pparam), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&imethod), core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ContextCallback: ContextCallback:: } } @@ -4237,16 +4237,16 @@ pub struct IDataAdviseHolder_Vtbl { pub SendOnDataChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait IDataAdviseHolder_Impl: windows_core::IUnknownImpl { - fn Advise(&self, pdataobject: Option<&IDataObject>, pfetc: *const FORMATETC, advf: u32, padvise: Option<&IAdviseSink>) -> windows_core::Result; + fn Advise(&self, pdataobject: windows_core::Ref<'_, IDataObject>, pfetc: *const FORMATETC, advf: u32, padvise: windows_core::Ref<'_, IAdviseSink>) -> windows_core::Result; fn Unadvise(&self, dwconnection: u32) -> windows_core::Result<()>; fn EnumAdvise(&self) -> windows_core::Result; - fn SendOnDataChange(&self, pdataobject: Option<&IDataObject>, dwreserved: u32, advf: u32) -> windows_core::Result<()>; + fn SendOnDataChange(&self, pdataobject: windows_core::Ref<'_, IDataObject>, dwreserved: u32, advf: u32) -> windows_core::Result<()>; } impl IDataAdviseHolder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void, pfetc: *const FORMATETC, advf: u32, padvise: *mut core::ffi::c_void, pdwconnection: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataAdviseHolder_Impl::Advise(this, windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute_copy(&pfetc), core::mem::transmute_copy(&advf), windows_core::from_raw_borrowed(&padvise)) { + match IDataAdviseHolder_Impl::Advise(this, core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&pfetc), core::mem::transmute_copy(&advf), core::mem::transmute_copy(&padvise)) { Ok(ok__) => { pdwconnection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4270,7 +4270,7 @@ impl IDataAdviseHolder_Vtbl { } unsafe extern "system" fn SendOnDataChange(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void, dwreserved: u32, advf: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataAdviseHolder_Impl::SendOnDataChange(this, windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute_copy(&dwreserved), core::mem::transmute_copy(&advf)).into() + IDataAdviseHolder_Impl::SendOnDataChange(this, core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&dwreserved), core::mem::transmute_copy(&advf)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4356,7 +4356,7 @@ pub trait IDataObject_Impl: windows_core::IUnknownImpl { fn GetCanonicalFormatEtc(&self, pformatectin: *const FORMATETC, pformatetcout: *mut FORMATETC) -> windows_core::HRESULT; fn SetData(&self, pformatetc: *const FORMATETC, pmedium: *const STGMEDIUM, frelease: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn EnumFormatEtc(&self, dwdirection: u32) -> windows_core::Result; - fn DAdvise(&self, pformatetc: *const FORMATETC, advf: u32, padvsink: Option<&IAdviseSink>) -> windows_core::Result; + fn DAdvise(&self, pformatetc: *const FORMATETC, advf: u32, padvsink: windows_core::Ref<'_, IAdviseSink>) -> windows_core::Result; fn DUnadvise(&self, dwconnection: u32) -> windows_core::Result<()>; fn EnumDAdvise(&self) -> windows_core::Result; } @@ -4401,7 +4401,7 @@ impl IDataObject_Vtbl { } unsafe extern "system" fn DAdvise(this: *mut core::ffi::c_void, pformatetc: *const FORMATETC, advf: u32, padvsink: *mut core::ffi::c_void, pdwconnection: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataObject_Impl::DAdvise(this, core::mem::transmute_copy(&pformatetc), core::mem::transmute_copy(&advf), windows_core::from_raw_borrowed(&padvsink)) { + match IDataObject_Impl::DAdvise(this, core::mem::transmute_copy(&pformatetc), core::mem::transmute_copy(&advf), core::mem::transmute_copy(&padvsink)) { Ok(ok__) => { pdwconnection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4625,7 +4625,7 @@ pub struct IEnumConnectionPoints_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumConnectionPoints_Impl: windows_core::IUnknownImpl { - fn Next(&self, cconnections: u32, ppcp: *mut Option, pcfetched: *mut u32) -> windows_core::HRESULT; + fn Next(&self, cconnections: u32, ppcp: windows_core::OutRef<'_, IConnectionPoint>, pcfetched: *mut u32) -> windows_core::HRESULT; fn Skip(&self, cconnections: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -4982,7 +4982,7 @@ pub struct IEnumMoniker_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumMoniker_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::HRESULT; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IMoniker>, pceltfetched: *mut u32) -> windows_core::HRESULT; fn Skip(&self, celt: u32) -> windows_core::HRESULT; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -5186,7 +5186,7 @@ pub struct IEnumUnknown_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumUnknown_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::HRESULT; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, windows_core::IUnknown>, pceltfetched: *mut u32) -> windows_core::HRESULT; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -5475,7 +5475,7 @@ pub struct IGlobalInterfaceTable_Vtbl { pub GetInterfaceFromGlobal: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IGlobalInterfaceTable_Impl: windows_core::IUnknownImpl { - fn RegisterInterfaceInGlobal(&self, punk: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; + fn RegisterInterfaceInGlobal(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; fn RevokeInterfaceFromGlobal(&self, dwcookie: u32) -> windows_core::Result<()>; fn GetInterfaceFromGlobal(&self, dwcookie: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } @@ -5483,7 +5483,7 @@ impl IGlobalInterfaceTable_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterInterfaceInGlobal(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, riid: *const windows_core::GUID, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGlobalInterfaceTable_Impl::RegisterInterfaceInGlobal(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&riid)) { + match IGlobalInterfaceTable_Impl::RegisterInterfaceInGlobal(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&riid)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5715,7 +5715,7 @@ pub struct IMachineGlobalObjectTable_Vtbl { pub RevokeObject: unsafe extern "system" fn(*mut core::ffi::c_void, MachineGlobalObjectTableRegistrationToken) -> windows_core::HRESULT, } pub trait IMachineGlobalObjectTable_Impl: windows_core::IUnknownImpl { - fn RegisterObject(&self, clsid: *const windows_core::GUID, identifier: &windows_core::PCWSTR, object: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn RegisterObject(&self, clsid: *const windows_core::GUID, identifier: &windows_core::PCWSTR, object: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn GetObject(&self, clsid: *const windows_core::GUID, identifier: &windows_core::PCWSTR, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn RevokeObject(&self, token: MachineGlobalObjectTableRegistrationToken) -> windows_core::Result<()>; } @@ -5723,7 +5723,7 @@ impl IMachineGlobalObjectTable_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterObject(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, identifier: windows_core::PCWSTR, object: *mut core::ffi::c_void, token: *mut MachineGlobalObjectTableRegistrationToken) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMachineGlobalObjectTable_Impl::RegisterObject(this, core::mem::transmute_copy(&clsid), core::mem::transmute(&identifier), windows_core::from_raw_borrowed(&object)) { + match IMachineGlobalObjectTable_Impl::RegisterObject(this, core::mem::transmute_copy(&clsid), core::mem::transmute(&identifier), core::mem::transmute_copy(&object)) { Ok(ok__) => { token.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6102,39 +6102,39 @@ pub struct IMoniker_Vtbl { pub IsSystemMoniker: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IMoniker_Impl: IPersistStream_Impl { - fn BindToObject(&self, pbc: Option<&IBindCtx>, pmktoleft: Option<&IMoniker>, riidresult: *const windows_core::GUID, ppvresult: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn BindToStorage(&self, pbc: Option<&IBindCtx>, pmktoleft: Option<&IMoniker>, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn Reduce(&self, pbc: Option<&IBindCtx>, dwreducehowfar: u32, ppmktoleft: *mut Option, ppmkreduced: *mut Option) -> windows_core::Result<()>; - fn ComposeWith(&self, pmkright: Option<&IMoniker>, fonlyifnotgeneric: super::super::Foundation::BOOL) -> windows_core::Result; + fn BindToObject(&self, pbc: windows_core::Ref<'_, IBindCtx>, pmktoleft: windows_core::Ref<'_, IMoniker>, riidresult: *const windows_core::GUID, ppvresult: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn BindToStorage(&self, pbc: windows_core::Ref<'_, IBindCtx>, pmktoleft: windows_core::Ref<'_, IMoniker>, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn Reduce(&self, pbc: windows_core::Ref<'_, IBindCtx>, dwreducehowfar: u32, ppmktoleft: windows_core::OutRef<'_, IMoniker>, ppmkreduced: windows_core::OutRef<'_, IMoniker>) -> windows_core::Result<()>; + fn ComposeWith(&self, pmkright: windows_core::Ref<'_, IMoniker>, fonlyifnotgeneric: super::super::Foundation::BOOL) -> windows_core::Result; fn Enum(&self, fforward: super::super::Foundation::BOOL) -> windows_core::Result; - fn IsEqual(&self, pmkothermoniker: Option<&IMoniker>) -> windows_core::HRESULT; + fn IsEqual(&self, pmkothermoniker: windows_core::Ref<'_, IMoniker>) -> windows_core::HRESULT; fn Hash(&self) -> windows_core::Result; - fn IsRunning(&self, pbc: Option<&IBindCtx>, pmktoleft: Option<&IMoniker>, pmknewlyrunning: Option<&IMoniker>) -> windows_core::Result<()>; - fn GetTimeOfLastChange(&self, pbc: Option<&IBindCtx>, pmktoleft: Option<&IMoniker>) -> windows_core::Result; + fn IsRunning(&self, pbc: windows_core::Ref<'_, IBindCtx>, pmktoleft: windows_core::Ref<'_, IMoniker>, pmknewlyrunning: windows_core::Ref<'_, IMoniker>) -> windows_core::Result<()>; + fn GetTimeOfLastChange(&self, pbc: windows_core::Ref<'_, IBindCtx>, pmktoleft: windows_core::Ref<'_, IMoniker>) -> windows_core::Result; fn Inverse(&self) -> windows_core::Result; - fn CommonPrefixWith(&self, pmkother: Option<&IMoniker>) -> windows_core::Result; - fn RelativePathTo(&self, pmkother: Option<&IMoniker>) -> windows_core::Result; - fn GetDisplayName(&self, pbc: Option<&IBindCtx>, pmktoleft: Option<&IMoniker>) -> windows_core::Result; - fn ParseDisplayName(&self, pbc: Option<&IBindCtx>, pmktoleft: Option<&IMoniker>, pszdisplayname: &windows_core::PCWSTR, pcheaten: *mut u32, ppmkout: *mut Option) -> windows_core::Result<()>; + fn CommonPrefixWith(&self, pmkother: windows_core::Ref<'_, IMoniker>) -> windows_core::Result; + fn RelativePathTo(&self, pmkother: windows_core::Ref<'_, IMoniker>) -> windows_core::Result; + fn GetDisplayName(&self, pbc: windows_core::Ref<'_, IBindCtx>, pmktoleft: windows_core::Ref<'_, IMoniker>) -> windows_core::Result; + fn ParseDisplayName(&self, pbc: windows_core::Ref<'_, IBindCtx>, pmktoleft: windows_core::Ref<'_, IMoniker>, pszdisplayname: &windows_core::PCWSTR, pcheaten: *mut u32, ppmkout: windows_core::OutRef<'_, IMoniker>) -> windows_core::Result<()>; fn IsSystemMoniker(&self) -> windows_core::Result; } impl IMoniker_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BindToObject(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pmktoleft: *mut core::ffi::c_void, riidresult: *const windows_core::GUID, ppvresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMoniker_Impl::BindToObject(this, windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pmktoleft), core::mem::transmute_copy(&riidresult), core::mem::transmute_copy(&ppvresult)).into() + IMoniker_Impl::BindToObject(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pmktoleft), core::mem::transmute_copy(&riidresult), core::mem::transmute_copy(&ppvresult)).into() } unsafe extern "system" fn BindToStorage(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pmktoleft: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMoniker_Impl::BindToStorage(this, windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pmktoleft), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobj)).into() + IMoniker_Impl::BindToStorage(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pmktoleft), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobj)).into() } unsafe extern "system" fn Reduce(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, dwreducehowfar: u32, ppmktoleft: *mut *mut core::ffi::c_void, ppmkreduced: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMoniker_Impl::Reduce(this, windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&dwreducehowfar), core::mem::transmute_copy(&ppmktoleft), core::mem::transmute_copy(&ppmkreduced)).into() + IMoniker_Impl::Reduce(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&dwreducehowfar), core::mem::transmute_copy(&ppmktoleft), core::mem::transmute_copy(&ppmkreduced)).into() } unsafe extern "system" fn ComposeWith(this: *mut core::ffi::c_void, pmkright: *mut core::ffi::c_void, fonlyifnotgeneric: super::super::Foundation::BOOL, ppmkcomposite: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMoniker_Impl::ComposeWith(this, windows_core::from_raw_borrowed(&pmkright), core::mem::transmute_copy(&fonlyifnotgeneric)) { + match IMoniker_Impl::ComposeWith(this, core::mem::transmute_copy(&pmkright), core::mem::transmute_copy(&fonlyifnotgeneric)) { Ok(ok__) => { ppmkcomposite.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6154,7 +6154,7 @@ impl IMoniker_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, pmkothermoniker: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMoniker_Impl::IsEqual(this, windows_core::from_raw_borrowed(&pmkothermoniker)) + IMoniker_Impl::IsEqual(this, core::mem::transmute_copy(&pmkothermoniker)) } unsafe extern "system" fn Hash(this: *mut core::ffi::c_void, pdwhash: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6168,11 +6168,11 @@ impl IMoniker_Vtbl { } unsafe extern "system" fn IsRunning(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pmktoleft: *mut core::ffi::c_void, pmknewlyrunning: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMoniker_Impl::IsRunning(this, windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pmktoleft), windows_core::from_raw_borrowed(&pmknewlyrunning)).into() + IMoniker_Impl::IsRunning(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pmktoleft), core::mem::transmute_copy(&pmknewlyrunning)).into() } unsafe extern "system" fn GetTimeOfLastChange(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pmktoleft: *mut core::ffi::c_void, pfiletime: *mut super::super::Foundation::FILETIME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMoniker_Impl::GetTimeOfLastChange(this, windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pmktoleft)) { + match IMoniker_Impl::GetTimeOfLastChange(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pmktoleft)) { Ok(ok__) => { pfiletime.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6192,7 +6192,7 @@ impl IMoniker_Vtbl { } unsafe extern "system" fn CommonPrefixWith(this: *mut core::ffi::c_void, pmkother: *mut core::ffi::c_void, ppmkprefix: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMoniker_Impl::CommonPrefixWith(this, windows_core::from_raw_borrowed(&pmkother)) { + match IMoniker_Impl::CommonPrefixWith(this, core::mem::transmute_copy(&pmkother)) { Ok(ok__) => { ppmkprefix.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6202,7 +6202,7 @@ impl IMoniker_Vtbl { } unsafe extern "system" fn RelativePathTo(this: *mut core::ffi::c_void, pmkother: *mut core::ffi::c_void, ppmkrelpath: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMoniker_Impl::RelativePathTo(this, windows_core::from_raw_borrowed(&pmkother)) { + match IMoniker_Impl::RelativePathTo(this, core::mem::transmute_copy(&pmkother)) { Ok(ok__) => { ppmkrelpath.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6212,7 +6212,7 @@ impl IMoniker_Vtbl { } unsafe extern "system" fn GetDisplayName(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pmktoleft: *mut core::ffi::c_void, ppszdisplayname: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMoniker_Impl::GetDisplayName(this, windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pmktoleft)) { + match IMoniker_Impl::GetDisplayName(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pmktoleft)) { Ok(ok__) => { ppszdisplayname.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6222,7 +6222,7 @@ impl IMoniker_Vtbl { } unsafe extern "system" fn ParseDisplayName(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pmktoleft: *mut core::ffi::c_void, pszdisplayname: windows_core::PCWSTR, pcheaten: *mut u32, ppmkout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMoniker_Impl::ParseDisplayName(this, windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pmktoleft), core::mem::transmute(&pszdisplayname), core::mem::transmute_copy(&pcheaten), core::mem::transmute_copy(&ppmkout)).into() + IMoniker_Impl::ParseDisplayName(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pmktoleft), core::mem::transmute(&pszdisplayname), core::mem::transmute_copy(&pcheaten), core::mem::transmute_copy(&ppmkout)).into() } unsafe extern "system" fn IsSystemMoniker(this: *mut core::ffi::c_void, pdwmksys: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6396,18 +6396,18 @@ pub struct IPSFactoryBuffer_Vtbl { pub CreateStub: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPSFactoryBuffer_Impl: windows_core::IUnknownImpl { - fn CreateProxy(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, ppproxy: *mut Option, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateStub(&self, riid: *const windows_core::GUID, punkserver: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateProxy(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, ppproxy: windows_core::OutRef<'_, IRpcProxyBuffer>, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateStub(&self, riid: *const windows_core::GUID, punkserver: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } impl IPSFactoryBuffer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateProxy(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppproxy: *mut *mut core::ffi::c_void, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPSFactoryBuffer_Impl::CreateProxy(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppproxy), core::mem::transmute_copy(&ppv)).into() + IPSFactoryBuffer_Impl::CreateProxy(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppproxy), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn CreateStub(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punkserver: *mut core::ffi::c_void, ppstub: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPSFactoryBuffer_Impl::CreateStub(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punkserver)) { + match IPSFactoryBuffer_Impl::CreateStub(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punkserver)) { Ok(ok__) => { ppstub.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6677,8 +6677,8 @@ pub struct IPersistStream_Vtbl { } pub trait IPersistStream_Impl: IPersist_Impl { fn IsDirty(&self) -> windows_core::HRESULT; - fn Load(&self, pstm: Option<&IStream>) -> windows_core::Result<()>; - fn Save(&self, pstm: Option<&IStream>, fcleardirty: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Load(&self, pstm: windows_core::Ref<'_, IStream>) -> windows_core::Result<()>; + fn Save(&self, pstm: windows_core::Ref<'_, IStream>, fcleardirty: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetSizeMax(&self) -> windows_core::Result; } impl IPersistStream_Vtbl { @@ -6689,11 +6689,11 @@ impl IPersistStream_Vtbl { } unsafe extern "system" fn Load(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistStream_Impl::Load(this, windows_core::from_raw_borrowed(&pstm)).into() + IPersistStream_Impl::Load(this, core::mem::transmute_copy(&pstm)).into() } unsafe extern "system" fn Save(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void, fcleardirty: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistStream_Impl::Save(this, windows_core::from_raw_borrowed(&pstm), core::mem::transmute_copy(&fcleardirty)).into() + IPersistStream_Impl::Save(this, core::mem::transmute_copy(&pstm), core::mem::transmute_copy(&fcleardirty)).into() } unsafe extern "system" fn GetSizeMax(this: *mut core::ffi::c_void, pcbsize: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6761,8 +6761,8 @@ pub struct IPersistStreamInit_Vtbl { } pub trait IPersistStreamInit_Impl: IPersist_Impl { fn IsDirty(&self) -> windows_core::HRESULT; - fn Load(&self, pstm: Option<&IStream>) -> windows_core::Result<()>; - fn Save(&self, pstm: Option<&IStream>, fcleardirty: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Load(&self, pstm: windows_core::Ref<'_, IStream>) -> windows_core::Result<()>; + fn Save(&self, pstm: windows_core::Ref<'_, IStream>, fcleardirty: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetSizeMax(&self) -> windows_core::Result; fn InitNew(&self) -> windows_core::Result<()>; } @@ -6774,11 +6774,11 @@ impl IPersistStreamInit_Vtbl { } unsafe extern "system" fn Load(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistStreamInit_Impl::Load(this, windows_core::from_raw_borrowed(&pstm)).into() + IPersistStreamInit_Impl::Load(this, core::mem::transmute_copy(&pstm)).into() } unsafe extern "system" fn Save(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void, fcleardirty: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistStreamInit_Impl::Save(this, windows_core::from_raw_borrowed(&pstm), core::mem::transmute_copy(&fcleardirty)).into() + IPersistStreamInit_Impl::Save(this, core::mem::transmute_copy(&pstm), core::mem::transmute_copy(&fcleardirty)).into() } unsafe extern "system" fn GetSizeMax(this: *mut core::ffi::c_void, pcbsize: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7060,13 +7060,13 @@ pub struct IReleaseMarshalBuffers_Vtbl { pub ReleaseMarshalBuffer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut RPCOLEMESSAGE, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IReleaseMarshalBuffers_Impl: windows_core::IUnknownImpl { - fn ReleaseMarshalBuffer(&self, pmsg: *mut RPCOLEMESSAGE, dwflags: u32, pchnl: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ReleaseMarshalBuffer(&self, pmsg: *mut RPCOLEMESSAGE, dwflags: u32, pchnl: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IReleaseMarshalBuffers_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ReleaseMarshalBuffer(this: *mut core::ffi::c_void, pmsg: *mut RPCOLEMESSAGE, dwflags: u32, pchnl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReleaseMarshalBuffers_Impl::ReleaseMarshalBuffer(this, core::mem::transmute_copy(&pmsg), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pchnl)).into() + IReleaseMarshalBuffers_Impl::ReleaseMarshalBuffer(this, core::mem::transmute_copy(&pmsg), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pchnl)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ReleaseMarshalBuffer: ReleaseMarshalBuffer:: } } @@ -7240,7 +7240,7 @@ pub trait IRpcChannelBuffer3_Impl: IRpcChannelBuffer2_Impl { fn GetCallContext(&self, pmsg: *const RPCOLEMESSAGE, riid: *const windows_core::GUID, pinterface: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetDestCtxEx(&self, pmsg: *const RPCOLEMESSAGE, pdwdestcontext: *mut u32, ppvdestcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetState(&self, pmsg: *const RPCOLEMESSAGE) -> windows_core::Result; - fn RegisterAsync(&self, pmsg: *mut RPCOLEMESSAGE, pasyncmgr: Option<&IAsyncManager>) -> windows_core::Result<()>; + fn RegisterAsync(&self, pmsg: *mut RPCOLEMESSAGE, pasyncmgr: windows_core::Ref<'_, IAsyncManager>) -> windows_core::Result<()>; } impl IRpcChannelBuffer3_Vtbl { pub const fn new() -> Self { @@ -7276,7 +7276,7 @@ impl IRpcChannelBuffer3_Vtbl { } unsafe extern "system" fn RegisterAsync(this: *mut core::ffi::c_void, pmsg: *mut RPCOLEMESSAGE, pasyncmgr: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRpcChannelBuffer3_Impl::RegisterAsync(this, core::mem::transmute_copy(&pmsg), windows_core::from_raw_borrowed(&pasyncmgr)).into() + IRpcChannelBuffer3_Impl::RegisterAsync(this, core::mem::transmute_copy(&pmsg), core::mem::transmute_copy(&pasyncmgr)).into() } Self { base__: IRpcChannelBuffer2_Vtbl::new::(), @@ -7373,18 +7373,18 @@ pub struct IRpcOptions_Vtbl { pub Query: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, RPCOPT_PROPERTIES, *mut usize) -> windows_core::HRESULT, } pub trait IRpcOptions_Impl: windows_core::IUnknownImpl { - fn Set(&self, pprx: Option<&windows_core::IUnknown>, dwproperty: RPCOPT_PROPERTIES, dwvalue: usize) -> windows_core::Result<()>; - fn Query(&self, pprx: Option<&windows_core::IUnknown>, dwproperty: RPCOPT_PROPERTIES) -> windows_core::Result; + fn Set(&self, pprx: windows_core::Ref<'_, windows_core::IUnknown>, dwproperty: RPCOPT_PROPERTIES, dwvalue: usize) -> windows_core::Result<()>; + fn Query(&self, pprx: windows_core::Ref<'_, windows_core::IUnknown>, dwproperty: RPCOPT_PROPERTIES) -> windows_core::Result; } impl IRpcOptions_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Set(this: *mut core::ffi::c_void, pprx: *mut core::ffi::c_void, dwproperty: RPCOPT_PROPERTIES, dwvalue: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRpcOptions_Impl::Set(this, windows_core::from_raw_borrowed(&pprx), core::mem::transmute_copy(&dwproperty), core::mem::transmute_copy(&dwvalue)).into() + IRpcOptions_Impl::Set(this, core::mem::transmute_copy(&pprx), core::mem::transmute_copy(&dwproperty), core::mem::transmute_copy(&dwvalue)).into() } unsafe extern "system" fn Query(this: *mut core::ffi::c_void, pprx: *mut core::ffi::c_void, dwproperty: RPCOPT_PROPERTIES, pdwvalue: *mut usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRpcOptions_Impl::Query(this, windows_core::from_raw_borrowed(&pprx), core::mem::transmute_copy(&dwproperty)) { + match IRpcOptions_Impl::Query(this, core::mem::transmute_copy(&pprx), core::mem::transmute_copy(&dwproperty)) { Ok(ok__) => { pdwvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7419,14 +7419,14 @@ pub struct IRpcProxyBuffer_Vtbl { pub Disconnect: unsafe extern "system" fn(*mut core::ffi::c_void), } pub trait IRpcProxyBuffer_Impl: windows_core::IUnknownImpl { - fn Connect(&self, prpcchannelbuffer: Option<&IRpcChannelBuffer>) -> windows_core::Result<()>; + fn Connect(&self, prpcchannelbuffer: windows_core::Ref<'_, IRpcChannelBuffer>) -> windows_core::Result<()>; fn Disconnect(&self); } impl IRpcProxyBuffer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, prpcchannelbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRpcProxyBuffer_Impl::Connect(this, windows_core::from_raw_borrowed(&prpcchannelbuffer)).into() + IRpcProxyBuffer_Impl::Connect(this, core::mem::transmute_copy(&prpcchannelbuffer)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7482,9 +7482,9 @@ pub struct IRpcStubBuffer_Vtbl { pub DebugServerRelease: unsafe extern "system" fn(*mut core::ffi::c_void, *const core::ffi::c_void), } pub trait IRpcStubBuffer_Impl: windows_core::IUnknownImpl { - fn Connect(&self, punkserver: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Connect(&self, punkserver: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Disconnect(&self); - fn Invoke(&self, _prpcmsg: *mut RPCOLEMESSAGE, _prpcchannelbuffer: Option<&IRpcChannelBuffer>) -> windows_core::Result<()>; + fn Invoke(&self, _prpcmsg: *mut RPCOLEMESSAGE, _prpcchannelbuffer: windows_core::Ref<'_, IRpcChannelBuffer>) -> windows_core::Result<()>; fn IsIIDSupported(&self, riid: *const windows_core::GUID) -> Option; fn CountRefs(&self) -> u32; fn DebugServerQueryInterface(&self, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; @@ -7494,7 +7494,7 @@ impl IRpcStubBuffer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, punkserver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRpcStubBuffer_Impl::Connect(this, windows_core::from_raw_borrowed(&punkserver)).into() + IRpcStubBuffer_Impl::Connect(this, core::mem::transmute_copy(&punkserver)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7502,7 +7502,7 @@ impl IRpcStubBuffer_Vtbl { } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, _prpcmsg: *mut RPCOLEMESSAGE, _prpcchannelbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRpcStubBuffer_Impl::Invoke(this, core::mem::transmute_copy(&_prpcmsg), windows_core::from_raw_borrowed(&_prpcchannelbuffer)).into() + IRpcStubBuffer_Impl::Invoke(this, core::mem::transmute_copy(&_prpcmsg), core::mem::transmute_copy(&_prpcchannelbuffer)).into() } unsafe extern "system" fn IsIIDSupported(this: *mut core::ffi::c_void, riid: *const windows_core::GUID) -> Option { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7598,7 +7598,7 @@ pub struct IRunnableObject_Vtbl { } pub trait IRunnableObject_Impl: windows_core::IUnknownImpl { fn GetRunningClass(&self) -> windows_core::Result; - fn Run(&self, pbc: Option<&IBindCtx>) -> windows_core::Result<()>; + fn Run(&self, pbc: windows_core::Ref<'_, IBindCtx>) -> windows_core::Result<()>; fn IsRunning(&self) -> super::super::Foundation::BOOL; fn LockRunning(&self, flock: super::super::Foundation::BOOL, flastunlockcloses: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetContainedObject(&self, fcontained: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -7617,7 +7617,7 @@ impl IRunnableObject_Vtbl { } unsafe extern "system" fn Run(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRunnableObject_Impl::Run(this, windows_core::from_raw_borrowed(&pbc)).into() + IRunnableObject_Impl::Run(this, core::mem::transmute_copy(&pbc)).into() } unsafe extern "system" fn IsRunning(this: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7699,19 +7699,19 @@ pub struct IRunningObjectTable_Vtbl { pub EnumRunning: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRunningObjectTable_Impl: windows_core::IUnknownImpl { - fn Register(&self, grfflags: ROT_FLAGS, punkobject: Option<&windows_core::IUnknown>, pmkobjectname: Option<&IMoniker>) -> windows_core::Result; + fn Register(&self, grfflags: ROT_FLAGS, punkobject: windows_core::Ref<'_, windows_core::IUnknown>, pmkobjectname: windows_core::Ref<'_, IMoniker>) -> windows_core::Result; fn Revoke(&self, dwregister: u32) -> windows_core::Result<()>; - fn IsRunning(&self, pmkobjectname: Option<&IMoniker>) -> windows_core::Result<()>; - fn GetObject(&self, pmkobjectname: Option<&IMoniker>) -> windows_core::Result; + fn IsRunning(&self, pmkobjectname: windows_core::Ref<'_, IMoniker>) -> windows_core::Result<()>; + fn GetObject(&self, pmkobjectname: windows_core::Ref<'_, IMoniker>) -> windows_core::Result; fn NoteChangeTime(&self, dwregister: u32, pfiletime: *const super::super::Foundation::FILETIME) -> windows_core::Result<()>; - fn GetTimeOfLastChange(&self, pmkobjectname: Option<&IMoniker>) -> windows_core::Result; + fn GetTimeOfLastChange(&self, pmkobjectname: windows_core::Ref<'_, IMoniker>) -> windows_core::Result; fn EnumRunning(&self) -> windows_core::Result; } impl IRunningObjectTable_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Register(this: *mut core::ffi::c_void, grfflags: ROT_FLAGS, punkobject: *mut core::ffi::c_void, pmkobjectname: *mut core::ffi::c_void, pdwregister: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRunningObjectTable_Impl::Register(this, core::mem::transmute_copy(&grfflags), windows_core::from_raw_borrowed(&punkobject), windows_core::from_raw_borrowed(&pmkobjectname)) { + match IRunningObjectTable_Impl::Register(this, core::mem::transmute_copy(&grfflags), core::mem::transmute_copy(&punkobject), core::mem::transmute_copy(&pmkobjectname)) { Ok(ok__) => { pdwregister.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7725,11 +7725,11 @@ impl IRunningObjectTable_Vtbl { } unsafe extern "system" fn IsRunning(this: *mut core::ffi::c_void, pmkobjectname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRunningObjectTable_Impl::IsRunning(this, windows_core::from_raw_borrowed(&pmkobjectname)).into() + IRunningObjectTable_Impl::IsRunning(this, core::mem::transmute_copy(&pmkobjectname)).into() } unsafe extern "system" fn GetObject(this: *mut core::ffi::c_void, pmkobjectname: *mut core::ffi::c_void, ppunkobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRunningObjectTable_Impl::GetObject(this, windows_core::from_raw_borrowed(&pmkobjectname)) { + match IRunningObjectTable_Impl::GetObject(this, core::mem::transmute_copy(&pmkobjectname)) { Ok(ok__) => { ppunkobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7743,7 +7743,7 @@ impl IRunningObjectTable_Vtbl { } unsafe extern "system" fn GetTimeOfLastChange(this: *mut core::ffi::c_void, pmkobjectname: *mut core::ffi::c_void, pfiletime: *mut super::super::Foundation::FILETIME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRunningObjectTable_Impl::GetTimeOfLastChange(this, windows_core::from_raw_borrowed(&pmkobjectname)) { + match IRunningObjectTable_Impl::GetTimeOfLastChange(this, core::mem::transmute_copy(&pmkobjectname)) { Ok(ok__) => { pfiletime.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7999,7 +7999,7 @@ pub struct IStream_Vtbl { pub trait IStream_Impl: ISequentialStream_Impl { fn Seek(&self, dlibmove: i64, dworigin: STREAM_SEEK, plibnewposition: *mut u64) -> windows_core::Result<()>; fn SetSize(&self, libnewsize: u64) -> windows_core::Result<()>; - fn CopyTo(&self, pstm: Option<&IStream>, cb: u64, pcbread: *mut u64, pcbwritten: *mut u64) -> windows_core::Result<()>; + fn CopyTo(&self, pstm: windows_core::Ref<'_, IStream>, cb: u64, pcbread: *mut u64, pcbwritten: *mut u64) -> windows_core::Result<()>; fn Commit(&self, grfcommitflags: &STGC) -> windows_core::Result<()>; fn Revert(&self) -> windows_core::Result<()>; fn LockRegion(&self, liboffset: u64, cb: u64, dwlocktype: &LOCKTYPE) -> windows_core::Result<()>; @@ -8019,7 +8019,7 @@ impl IStream_Vtbl { } unsafe extern "system" fn CopyTo(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void, cb: u64, pcbread: *mut u64, pcbwritten: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStream_Impl::CopyTo(this, windows_core::from_raw_borrowed(&pstm), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pcbread), core::mem::transmute_copy(&pcbwritten)).into() + IStream_Impl::CopyTo(this, core::mem::transmute_copy(&pstm), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pcbread), core::mem::transmute_copy(&pcbwritten)).into() } unsafe extern "system" fn Commit(this: *mut core::ffi::c_void, grfcommitflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8187,7 +8187,7 @@ pub struct ISurrogateService_Vtbl { pub ProcessShutdown: unsafe extern "system" fn(*mut core::ffi::c_void, ShutdownType) -> windows_core::HRESULT, } pub trait ISurrogateService_Impl: windows_core::IUnknownImpl { - fn Init(&self, rguidprocessid: *const windows_core::GUID, pprocesslock: Option<&IProcessLock>) -> windows_core::Result; + fn Init(&self, rguidprocessid: *const windows_core::GUID, pprocesslock: windows_core::Ref<'_, IProcessLock>) -> windows_core::Result; fn ApplicationLaunch(&self, rguidapplid: *const windows_core::GUID, apptype: ApplicationType) -> windows_core::Result<()>; fn ApplicationFree(&self, rguidapplid: *const windows_core::GUID) -> windows_core::Result<()>; fn CatalogRefresh(&self, ulreserved: u32) -> windows_core::Result<()>; @@ -8197,7 +8197,7 @@ impl ISurrogateService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, rguidprocessid: *const windows_core::GUID, pprocesslock: *mut core::ffi::c_void, pfapplicationaware: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISurrogateService_Impl::Init(this, core::mem::transmute_copy(&rguidprocessid), windows_core::from_raw_borrowed(&pprocesslock)) { + match ISurrogateService_Impl::Init(this, core::mem::transmute_copy(&rguidprocessid), core::mem::transmute_copy(&pprocesslock)) { Ok(ok__) => { pfapplicationaware.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8307,14 +8307,14 @@ pub struct ISynchronizeContainer_Vtbl { pub WaitMultiple: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISynchronizeContainer_Impl: windows_core::IUnknownImpl { - fn AddSynchronize(&self, psync: Option<&ISynchronize>) -> windows_core::Result<()>; + fn AddSynchronize(&self, psync: windows_core::Ref<'_, ISynchronize>) -> windows_core::Result<()>; fn WaitMultiple(&self, dwflags: u32, dwtimeout: u32) -> windows_core::Result; } impl ISynchronizeContainer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddSynchronize(this: *mut core::ffi::c_void, psync: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISynchronizeContainer_Impl::AddSynchronize(this, windows_core::from_raw_borrowed(&psync)).into() + ISynchronizeContainer_Impl::AddSynchronize(this, core::mem::transmute_copy(&psync)).into() } unsafe extern "system" fn WaitMultiple(this: *mut core::ffi::c_void, dwflags: u32, dwtimeout: u32, ppsync: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8496,8 +8496,8 @@ pub struct ITypeComp_Vtbl { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITypeComp_Impl: windows_core::IUnknownImpl { - fn Bind(&self, szname: &windows_core::PCWSTR, lhashval: u32, wflags: u16, pptinfo: *mut Option, pdesckind: *mut DESCKIND, pbindptr: *mut BINDPTR) -> windows_core::Result<()>; - fn BindType(&self, szname: &windows_core::PCWSTR, lhashval: u32, pptinfo: *mut Option, pptcomp: *mut Option) -> windows_core::Result<()>; + fn Bind(&self, szname: &windows_core::PCWSTR, lhashval: u32, wflags: u16, pptinfo: windows_core::OutRef<'_, ITypeInfo>, pdesckind: *mut DESCKIND, pbindptr: *mut BINDPTR) -> windows_core::Result<()>; + fn BindType(&self, szname: &windows_core::PCWSTR, lhashval: u32, pptinfo: windows_core::OutRef<'_, ITypeInfo>, pptcomp: windows_core::OutRef<'_, ITypeComp>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITypeComp_Vtbl { @@ -8659,9 +8659,9 @@ pub trait ITypeInfo_Impl: windows_core::IUnknownImpl { fn GetDllEntry(&self, memid: i32, invkind: INVOKEKIND, pbstrdllname: *mut windows_core::BSTR, pbstrname: *mut windows_core::BSTR, pwordinal: *mut u16) -> windows_core::Result<()>; fn GetRefTypeInfo(&self, hreftype: u32) -> windows_core::Result; fn AddressOfMember(&self, memid: i32, invkind: INVOKEKIND, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateInstance(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateInstance(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetMops(&self, memid: i32) -> windows_core::Result; - fn GetContainingTypeLib(&self, pptlib: *mut Option, pindex: *mut u32) -> windows_core::Result<()>; + fn GetContainingTypeLib(&self, pptlib: windows_core::OutRef<'_, ITypeLib>, pindex: *mut u32) -> windows_core::Result<()>; fn ReleaseTypeAttr(&self, ptypeattr: *const TYPEATTR); fn ReleaseFuncDesc(&self, pfuncdesc: *const FUNCDESC); fn ReleaseVarDesc(&self, pvardesc: *const VARDESC); @@ -8771,7 +8771,7 @@ impl ITypeInfo_Vtbl { } unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITypeInfo_Impl::CreateInstance(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobj)).into() + ITypeInfo_Impl::CreateInstance(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobj)).into() } unsafe extern "system" fn GetMops(this: *mut core::ffi::c_void, memid: i32, pbstrmops: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9208,7 +9208,7 @@ pub trait ITypeLib_Impl: windows_core::IUnknownImpl { fn GetTypeComp(&self) -> windows_core::Result; fn GetDocumentation(&self, index: i32, pbstrname: *mut windows_core::BSTR, pbstrdocstring: *mut windows_core::BSTR, pdwhelpcontext: *mut u32, pbstrhelpfile: *mut windows_core::BSTR) -> windows_core::Result<()>; fn IsName(&self, sznamebuf: &windows_core::PWSTR, lhashval: u32, pfname: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn FindName(&self, sznamebuf: &windows_core::PWSTR, lhashval: u32, pptinfo: *mut Option, rgmemid: *mut i32, pcfound: *mut u16) -> windows_core::Result<()>; + fn FindName(&self, sznamebuf: &windows_core::PWSTR, lhashval: u32, pptinfo: windows_core::OutRef<'_, ITypeInfo>, rgmemid: *mut i32, pcfound: *mut u16) -> windows_core::Result<()>; fn ReleaseTLibAttr(&self, ptlibattr: *const TLIBATTR); } impl ITypeLib_Vtbl { @@ -9744,7 +9744,7 @@ pub trait IUri_Impl: windows_core::IUnknownImpl { fn GetScheme(&self) -> windows_core::Result; fn GetZone(&self) -> windows_core::Result; fn GetProperties(&self) -> windows_core::Result; - fn IsEqual(&self, puri: Option<&IUri>) -> windows_core::Result; + fn IsEqual(&self, puri: windows_core::Ref<'_, IUri>) -> windows_core::Result; } impl IUri_Vtbl { pub const fn new() -> Self { @@ -9972,7 +9972,7 @@ impl IUri_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, puri: *mut core::ffi::c_void, pfequal: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUri_Impl::IsEqual(this, windows_core::from_raw_borrowed(&puri)) { + match IUri_Impl::IsEqual(this, core::mem::transmute_copy(&puri)) { Ok(ok__) => { pfequal.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10148,7 +10148,7 @@ pub trait IUriBuilder_Impl: windows_core::IUnknownImpl { fn CreateUri(&self, dwcreateflags: u32, dwallowencodingpropertymask: u32, dwreserved: usize) -> windows_core::Result; fn CreateUriWithFlags(&self, dwcreateflags: u32, dwuribuilderflags: u32, dwallowencodingpropertymask: u32, dwreserved: usize) -> windows_core::Result; fn GetIUri(&self) -> windows_core::Result; - fn SetIUri(&self, piuri: Option<&IUri>) -> windows_core::Result<()>; + fn SetIUri(&self, piuri: windows_core::Ref<'_, IUri>) -> windows_core::Result<()>; fn GetFragment(&self, pcchfragment: *mut u32, ppwzfragment: *mut windows_core::PCWSTR) -> windows_core::Result<()>; fn GetHost(&self, pcchhost: *mut u32, ppwzhost: *mut windows_core::PCWSTR) -> windows_core::Result<()>; fn GetPassword(&self, pcchpassword: *mut u32, ppwzpassword: *mut windows_core::PCWSTR) -> windows_core::Result<()>; @@ -10212,7 +10212,7 @@ impl IUriBuilder_Vtbl { } unsafe extern "system" fn SetIUri(this: *mut core::ffi::c_void, piuri: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUriBuilder_Impl::SetIUri(this, windows_core::from_raw_borrowed(&piuri)).into() + IUriBuilder_Impl::SetIUri(this, core::mem::transmute_copy(&piuri)).into() } unsafe extern "system" fn GetFragment(this: *mut core::ffi::c_void, pcchfragment: *mut u32, ppwzfragment: *mut windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10343,13 +10343,13 @@ pub struct IUrlMon_Vtbl { pub AsyncGetClassBits: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, windows_core::PCWSTR, windows_core::PCWSTR, u32, u32, windows_core::PCWSTR, *mut core::ffi::c_void, u32, *const windows_core::GUID, u32) -> windows_core::HRESULT, } pub trait IUrlMon_Impl: windows_core::IUnknownImpl { - fn AsyncGetClassBits(&self, rclsid: *const windows_core::GUID, psztype: &windows_core::PCWSTR, pszext: &windows_core::PCWSTR, dwfileversionms: u32, dwfileversionls: u32, pszcodebase: &windows_core::PCWSTR, pbc: Option<&IBindCtx>, dwclasscontext: u32, riid: *const windows_core::GUID, flags: u32) -> windows_core::Result<()>; + fn AsyncGetClassBits(&self, rclsid: *const windows_core::GUID, psztype: &windows_core::PCWSTR, pszext: &windows_core::PCWSTR, dwfileversionms: u32, dwfileversionls: u32, pszcodebase: &windows_core::PCWSTR, pbc: windows_core::Ref<'_, IBindCtx>, dwclasscontext: u32, riid: *const windows_core::GUID, flags: u32) -> windows_core::Result<()>; } impl IUrlMon_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AsyncGetClassBits(this: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, psztype: windows_core::PCWSTR, pszext: windows_core::PCWSTR, dwfileversionms: u32, dwfileversionls: u32, pszcodebase: windows_core::PCWSTR, pbc: *mut core::ffi::c_void, dwclasscontext: u32, riid: *const windows_core::GUID, flags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUrlMon_Impl::AsyncGetClassBits(this, core::mem::transmute_copy(&rclsid), core::mem::transmute(&psztype), core::mem::transmute(&pszext), core::mem::transmute_copy(&dwfileversionms), core::mem::transmute_copy(&dwfileversionls), core::mem::transmute(&pszcodebase), windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&dwclasscontext), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&flags)).into() + IUrlMon_Impl::AsyncGetClassBits(this, core::mem::transmute_copy(&rclsid), core::mem::transmute(&psztype), core::mem::transmute(&pszext), core::mem::transmute_copy(&dwfileversionms), core::mem::transmute_copy(&dwfileversionls), core::mem::transmute(&pszcodebase), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&dwclasscontext), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&flags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), AsyncGetClassBits: AsyncGetClassBits:: } } @@ -10380,7 +10380,7 @@ pub struct IWaitMultiple_Vtbl { } pub trait IWaitMultiple_Impl: windows_core::IUnknownImpl { fn WaitMultiple(&self, timeout: u32) -> windows_core::Result; - fn AddSynchronize(&self, psync: Option<&ISynchronize>) -> windows_core::Result<()>; + fn AddSynchronize(&self, psync: windows_core::Ref<'_, ISynchronize>) -> windows_core::Result<()>; } impl IWaitMultiple_Vtbl { pub const fn new() -> Self { @@ -10396,7 +10396,7 @@ impl IWaitMultiple_Vtbl { } unsafe extern "system" fn AddSynchronize(this: *mut core::ffi::c_void, psync: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWaitMultiple_Impl::AddSynchronize(this, windows_core::from_raw_borrowed(&psync)).into() + IWaitMultiple_Impl::AddSynchronize(this, core::mem::transmute_copy(&psync)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs index 2ff41d975b..f78c91f27f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs @@ -937,19 +937,19 @@ pub struct IAppDomainHelper_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IAppDomainHelper_Impl: super::Com::IDispatch_Impl { - fn Initialize(&self, punkad: Option<&windows_core::IUnknown>, __midl__iappdomainhelper0000: isize, ppool: *mut core::ffi::c_void) -> windows_core::Result<()>; - fn DoCallback(&self, punkad: Option<&windows_core::IUnknown>, __midl__iappdomainhelper0001: isize, ppool: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn Initialize(&self, punkad: windows_core::Ref<'_, windows_core::IUnknown>, __midl__iappdomainhelper0000: isize, ppool: *mut core::ffi::c_void) -> windows_core::Result<()>; + fn DoCallback(&self, punkad: windows_core::Ref<'_, windows_core::IUnknown>, __midl__iappdomainhelper0001: isize, ppool: *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IAppDomainHelper_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, punkad: *mut core::ffi::c_void, __midl__iappdomainhelper0000: isize, ppool: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppDomainHelper_Impl::Initialize(this, windows_core::from_raw_borrowed(&punkad), core::mem::transmute_copy(&__midl__iappdomainhelper0000), core::mem::transmute_copy(&ppool)).into() + IAppDomainHelper_Impl::Initialize(this, core::mem::transmute_copy(&punkad), core::mem::transmute_copy(&__midl__iappdomainhelper0000), core::mem::transmute_copy(&ppool)).into() } unsafe extern "system" fn DoCallback(this: *mut core::ffi::c_void, punkad: *mut core::ffi::c_void, __midl__iappdomainhelper0001: isize, ppool: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAppDomainHelper_Impl::DoCallback(this, windows_core::from_raw_borrowed(&punkad), core::mem::transmute_copy(&__midl__iappdomainhelper0001), core::mem::transmute_copy(&ppool)).into() + IAppDomainHelper_Impl::DoCallback(this, core::mem::transmute_copy(&punkad), core::mem::transmute_copy(&__midl__iappdomainhelper0001), core::mem::transmute_copy(&ppool)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), @@ -4323,13 +4323,13 @@ pub struct IComTrackingInfoEvents_Vtbl { pub OnNewTrackingInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IComTrackingInfoEvents_Impl: windows_core::IUnknownImpl { - fn OnNewTrackingInfo(&self, ptoplevelcollection: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnNewTrackingInfo(&self, ptoplevelcollection: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IComTrackingInfoEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnNewTrackingInfo(this: *mut core::ffi::c_void, ptoplevelcollection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComTrackingInfoEvents_Impl::OnNewTrackingInfo(this, windows_core::from_raw_borrowed(&ptoplevelcollection)).into() + IComTrackingInfoEvents_Impl::OnNewTrackingInfo(this, core::mem::transmute_copy(&ptoplevelcollection)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnNewTrackingInfo: OnNewTrackingInfo:: } } @@ -4802,13 +4802,13 @@ pub struct ICreateWithLocalTransaction_Vtbl { pub CreateInstanceWithSysTx: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICreateWithLocalTransaction_Impl: windows_core::IUnknownImpl { - fn CreateInstanceWithSysTx(&self, ptransaction: Option<&windows_core::IUnknown>, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, pobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateInstanceWithSysTx(&self, ptransaction: windows_core::Ref<'_, windows_core::IUnknown>, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, pobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl ICreateWithLocalTransaction_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateInstanceWithSysTx(this: *mut core::ffi::c_void, ptransaction: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, pobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICreateWithLocalTransaction_Impl::CreateInstanceWithSysTx(this, windows_core::from_raw_borrowed(&ptransaction), core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pobject)).into() + ICreateWithLocalTransaction_Impl::CreateInstanceWithSysTx(this, core::mem::transmute_copy(&ptransaction), core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreateInstanceWithSysTx: CreateInstanceWithSysTx:: } } @@ -4872,14 +4872,14 @@ pub struct ICreateWithTransactionEx_Vtbl { } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] pub trait ICreateWithTransactionEx_Impl: windows_core::IUnknownImpl { - fn CreateInstance(&self, ptransaction: Option<&super::DistributedTransactionCoordinator::ITransaction>, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, pobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateInstance(&self, ptransaction: windows_core::Ref<'_, super::DistributedTransactionCoordinator::ITransaction>, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, pobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] impl ICreateWithTransactionEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateInstance(this: *mut core::ffi::c_void, ptransaction: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID, pobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICreateWithTransactionEx_Impl::CreateInstance(this, windows_core::from_raw_borrowed(&ptransaction), core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pobject)).into() + ICreateWithTransactionEx_Impl::CreateInstance(this, core::mem::transmute_copy(&ptransaction), core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreateInstance: CreateInstance:: } } @@ -4958,7 +4958,7 @@ pub struct ICrmCompensator_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ICrmCompensator_Impl: windows_core::IUnknownImpl { - fn SetLogControl(&self, plogcontrol: Option<&ICrmLogControl>) -> windows_core::Result<()>; + fn SetLogControl(&self, plogcontrol: windows_core::Ref<'_, ICrmLogControl>) -> windows_core::Result<()>; fn BeginPrepare(&self) -> windows_core::Result<()>; fn PrepareRecord(&self, crmlogrec: &CrmLogRecordRead) -> windows_core::Result; fn EndPrepare(&self) -> windows_core::Result; @@ -4974,7 +4974,7 @@ impl ICrmCompensator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetLogControl(this: *mut core::ffi::c_void, plogcontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICrmCompensator_Impl::SetLogControl(this, windows_core::from_raw_borrowed(&plogcontrol)).into() + ICrmCompensator_Impl::SetLogControl(this, core::mem::transmute_copy(&plogcontrol)).into() } unsafe extern "system" fn BeginPrepare(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5125,7 +5125,7 @@ pub struct ICrmCompensatorVariants_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ICrmCompensatorVariants_Impl: windows_core::IUnknownImpl { - fn SetLogControlVariants(&self, plogcontrol: Option<&ICrmLogControl>) -> windows_core::Result<()>; + fn SetLogControlVariants(&self, plogcontrol: windows_core::Ref<'_, ICrmLogControl>) -> windows_core::Result<()>; fn BeginPrepareVariants(&self) -> windows_core::Result<()>; fn PrepareRecordVariants(&self, plogrecord: *const super::Variant::VARIANT) -> windows_core::Result; fn EndPrepareVariants(&self) -> windows_core::Result; @@ -5141,7 +5141,7 @@ impl ICrmCompensatorVariants_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetLogControlVariants(this: *mut core::ffi::c_void, plogcontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICrmCompensatorVariants_Impl::SetLogControlVariants(this, windows_core::from_raw_borrowed(&plogcontrol)).into() + ICrmCompensatorVariants_Impl::SetLogControlVariants(this, core::mem::transmute_copy(&plogcontrol)).into() } unsafe extern "system" fn BeginPrepareVariants(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5893,14 +5893,14 @@ pub struct IDispenserManager_Vtbl { pub GetContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut usize, *mut usize) -> windows_core::HRESULT, } pub trait IDispenserManager_Impl: windows_core::IUnknownImpl { - fn RegisterDispenser(&self, __midl__idispensermanager0000: Option<&IDispenserDriver>, szdispensername: &windows_core::PCWSTR) -> windows_core::Result; + fn RegisterDispenser(&self, __midl__idispensermanager0000: windows_core::Ref<'_, IDispenserDriver>, szdispensername: &windows_core::PCWSTR) -> windows_core::Result; fn GetContext(&self, __midl__idispensermanager0002: *mut usize, __midl__idispensermanager0003: *mut usize) -> windows_core::Result<()>; } impl IDispenserManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RegisterDispenser(this: *mut core::ffi::c_void, __midl__idispensermanager0000: *mut core::ffi::c_void, szdispensername: windows_core::PCWSTR, __midl__idispensermanager0001: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDispenserManager_Impl::RegisterDispenser(this, windows_core::from_raw_borrowed(&__midl__idispensermanager0000), core::mem::transmute(&szdispensername)) { + match IDispenserManager_Impl::RegisterDispenser(this, core::mem::transmute_copy(&__midl__idispensermanager0000), core::mem::transmute(&szdispensername)) { Ok(ok__) => { __midl__idispensermanager0001.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6469,8 +6469,8 @@ pub struct IMTSActivity_Vtbl { pub UnbindFromThread: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMTSActivity_Impl: windows_core::IUnknownImpl { - fn SynchronousCall(&self, pcall: Option<&IMTSCall>) -> windows_core::Result<()>; - fn AsyncCall(&self, pcall: Option<&IMTSCall>) -> windows_core::Result<()>; + fn SynchronousCall(&self, pcall: windows_core::Ref<'_, IMTSCall>) -> windows_core::Result<()>; + fn AsyncCall(&self, pcall: windows_core::Ref<'_, IMTSCall>) -> windows_core::Result<()>; fn Reserved1(&self); fn BindToCurrentThread(&self) -> windows_core::Result<()>; fn UnbindFromThread(&self) -> windows_core::Result<()>; @@ -6479,11 +6479,11 @@ impl IMTSActivity_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SynchronousCall(this: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMTSActivity_Impl::SynchronousCall(this, windows_core::from_raw_borrowed(&pcall)).into() + IMTSActivity_Impl::SynchronousCall(this, core::mem::transmute_copy(&pcall)).into() } unsafe extern "system" fn AsyncCall(this: *mut core::ffi::c_void, pcall: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMTSActivity_Impl::AsyncCall(this, windows_core::from_raw_borrowed(&pcall)).into() + IMTSActivity_Impl::AsyncCall(this, core::mem::transmute_copy(&pcall)).into() } unsafe extern "system" fn Reserved1(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6611,18 +6611,18 @@ pub struct IManagedActivationEvents_Vtbl { pub DestroyManagedStub: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IManagedActivationEvents_Impl: windows_core::IUnknownImpl { - fn CreateManagedStub(&self, pinfo: Option<&IManagedObjectInfo>, fdist: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn DestroyManagedStub(&self, pinfo: Option<&IManagedObjectInfo>) -> windows_core::Result<()>; + fn CreateManagedStub(&self, pinfo: windows_core::Ref<'_, IManagedObjectInfo>, fdist: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn DestroyManagedStub(&self, pinfo: windows_core::Ref<'_, IManagedObjectInfo>) -> windows_core::Result<()>; } impl IManagedActivationEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateManagedStub(this: *mut core::ffi::c_void, pinfo: *mut core::ffi::c_void, fdist: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IManagedActivationEvents_Impl::CreateManagedStub(this, windows_core::from_raw_borrowed(&pinfo), core::mem::transmute_copy(&fdist)).into() + IManagedActivationEvents_Impl::CreateManagedStub(this, core::mem::transmute_copy(&pinfo), core::mem::transmute_copy(&fdist)).into() } unsafe extern "system" fn DestroyManagedStub(this: *mut core::ffi::c_void, pinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IManagedActivationEvents_Impl::DestroyManagedStub(this, windows_core::from_raw_borrowed(&pinfo)).into() + IManagedActivationEvents_Impl::DestroyManagedStub(this, core::mem::transmute_copy(&pinfo)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6667,7 +6667,7 @@ pub struct IManagedObjectInfo_Vtbl { pub trait IManagedObjectInfo_Impl: windows_core::IUnknownImpl { fn GetIUnknown(&self) -> windows_core::Result; fn GetIObjectControl(&self) -> windows_core::Result; - fn SetInPool(&self, binpool: super::super::Foundation::BOOL, ppooledobj: Option<&IManagedPooledObj>) -> windows_core::Result<()>; + fn SetInPool(&self, binpool: super::super::Foundation::BOOL, ppooledobj: windows_core::Ref<'_, IManagedPooledObj>) -> windows_core::Result<()>; fn SetWrapperStrength(&self, bstrong: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IManagedObjectInfo_Vtbl { @@ -6694,7 +6694,7 @@ impl IManagedObjectInfo_Vtbl { } unsafe extern "system" fn SetInPool(this: *mut core::ffi::c_void, binpool: super::super::Foundation::BOOL, ppooledobj: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IManagedObjectInfo_Impl::SetInPool(this, core::mem::transmute_copy(&binpool), windows_core::from_raw_borrowed(&ppooledobj)).into() + IManagedObjectInfo_Impl::SetInPool(this, core::mem::transmute_copy(&binpool), core::mem::transmute_copy(&ppooledobj)).into() } unsafe extern "system" fn SetWrapperStrength(this: *mut core::ffi::c_void, bstrong: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7266,7 +7266,7 @@ pub trait IObjPool_Impl: windows_core::IUnknownImpl { fn Reserved2(&self); fn Reserved3(&self); fn Reserved4(&self); - fn PutEndTx(&self, pobj: Option<&windows_core::IUnknown>); + fn PutEndTx(&self, pobj: windows_core::Ref<'_, windows_core::IUnknown>); fn Reserved5(&self); fn Reserved6(&self); } @@ -7290,7 +7290,7 @@ impl IObjPool_Vtbl { } unsafe extern "system" fn PutEndTx(this: *mut core::ffi::c_void, pobj: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjPool_Impl::PutEndTx(this, windows_core::from_raw_borrowed(&pobj)) + IObjPool_Impl::PutEndTx(this, core::mem::transmute_copy(&pobj)) } unsafe extern "system" fn Reserved5(this: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7337,14 +7337,14 @@ pub struct IObjectConstruct_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IObjectConstruct_Impl: windows_core::IUnknownImpl { - fn Construct(&self, pctorobj: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn Construct(&self, pctorobj: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IObjectConstruct_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Construct(this: *mut core::ffi::c_void, pctorobj: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjectConstruct_Impl::Construct(this, windows_core::from_raw_borrowed(&pctorobj)).into() + IObjectConstruct_Impl::Construct(this, core::mem::transmute_copy(&pctorobj)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Construct: Construct:: } } @@ -7842,14 +7842,14 @@ pub struct IProcessInitializer_Vtbl { pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IProcessInitializer_Impl: windows_core::IUnknownImpl { - fn Startup(&self, punkprocesscontrol: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Startup(&self, punkprocesscontrol: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; } impl IProcessInitializer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Startup(this: *mut core::ffi::c_void, punkprocesscontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProcessInitializer_Impl::Startup(this, windows_core::from_raw_borrowed(&punkprocesscontrol)).into() + IProcessInitializer_Impl::Startup(this, core::mem::transmute_copy(&punkprocesscontrol)).into() } unsafe extern "system" fn Shutdown(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8298,7 +8298,7 @@ pub struct ISelectCOMLBServer_Vtbl { } pub trait ISelectCOMLBServer_Impl: windows_core::IUnknownImpl { fn Init(&self) -> windows_core::Result<()>; - fn GetLBServer(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetLBServer(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ISelectCOMLBServer_Vtbl { pub const fn new() -> Self { @@ -8308,7 +8308,7 @@ impl ISelectCOMLBServer_Vtbl { } unsafe extern "system" fn GetLBServer(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISelectCOMLBServer_Impl::GetLBServer(this, windows_core::from_raw_borrowed(&punk)).into() + ISelectCOMLBServer_Impl::GetLBServer(this, core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Init: Init::, GetLBServer: GetLBServer:: } } @@ -8389,8 +8389,8 @@ pub struct IServiceActivity_Vtbl { pub UnbindFromThread: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IServiceActivity_Impl: windows_core::IUnknownImpl { - fn SynchronousCall(&self, piservicecall: Option<&IServiceCall>) -> windows_core::Result<()>; - fn AsynchronousCall(&self, piservicecall: Option<&IServiceCall>) -> windows_core::Result<()>; + fn SynchronousCall(&self, piservicecall: windows_core::Ref<'_, IServiceCall>) -> windows_core::Result<()>; + fn AsynchronousCall(&self, piservicecall: windows_core::Ref<'_, IServiceCall>) -> windows_core::Result<()>; fn BindToCurrentThread(&self) -> windows_core::Result<()>; fn UnbindFromThread(&self) -> windows_core::Result<()>; } @@ -8398,11 +8398,11 @@ impl IServiceActivity_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SynchronousCall(this: *mut core::ffi::c_void, piservicecall: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IServiceActivity_Impl::SynchronousCall(this, windows_core::from_raw_borrowed(&piservicecall)).into() + IServiceActivity_Impl::SynchronousCall(this, core::mem::transmute_copy(&piservicecall)).into() } unsafe extern "system" fn AsynchronousCall(this: *mut core::ffi::c_void, piservicecall: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IServiceActivity_Impl::AsynchronousCall(this, windows_core::from_raw_borrowed(&piservicecall)).into() + IServiceActivity_Impl::AsynchronousCall(this, core::mem::transmute_copy(&piservicecall)).into() } unsafe extern "system" fn BindToCurrentThread(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8602,7 +8602,7 @@ pub struct IServicePool_Vtbl { pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IServicePool_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, ppoolconfig: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, ppoolconfig: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetObject(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; } @@ -8610,7 +8610,7 @@ impl IServicePool_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, ppoolconfig: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IServicePool_Impl::Initialize(this, windows_core::from_raw_borrowed(&ppoolconfig)).into() + IServicePool_Impl::Initialize(this, core::mem::transmute_copy(&ppoolconfig)).into() } unsafe extern "system" fn GetObject(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8702,7 +8702,7 @@ pub trait IServicePoolConfig_Impl: windows_core::IUnknownImpl { fn CreationTimeout(&self, pdwcreationtimeout: *mut u32) -> windows_core::Result<()>; fn SetTransactionAffinity(&self, ftxaffinity: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn TransactionAffinity(&self, pftxaffinity: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetClassFactory(&self, pfactory: Option<&super::Com::IClassFactory>) -> windows_core::Result<()>; + fn SetClassFactory(&self, pfactory: windows_core::Ref<'_, super::Com::IClassFactory>) -> windows_core::Result<()>; fn ClassFactory(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -8742,7 +8742,7 @@ impl IServicePoolConfig_Vtbl { } unsafe extern "system" fn SetClassFactory(this: *mut core::ffi::c_void, pfactory: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IServicePoolConfig_Impl::SetClassFactory(this, windows_core::from_raw_borrowed(&pfactory)).into() + IServicePoolConfig_Impl::SetClassFactory(this, core::mem::transmute_copy(&pfactory)).into() } unsafe extern "system" fn ClassFactory(this: *mut core::ffi::c_void, pfactory: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8882,14 +8882,14 @@ pub struct IServiceSysTxnConfig_Vtbl { } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] pub trait IServiceSysTxnConfig_Impl: IServiceTransactionConfig_Impl { - fn ConfigureBYOTSysTxn(&self, ptxproxy: Option<&ITransactionProxy>) -> windows_core::Result<()>; + fn ConfigureBYOTSysTxn(&self, ptxproxy: windows_core::Ref<'_, ITransactionProxy>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] impl IServiceSysTxnConfig_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConfigureBYOTSysTxn(this: *mut core::ffi::c_void, ptxproxy: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IServiceSysTxnConfig_Impl::ConfigureBYOTSysTxn(this, windows_core::from_raw_borrowed(&ptxproxy)).into() + IServiceSysTxnConfig_Impl::ConfigureBYOTSysTxn(this, core::mem::transmute_copy(&ptxproxy)).into() } Self { base__: IServiceTransactionConfig_Vtbl::new::(), ConfigureBYOTSysTxn: ConfigureBYOTSysTxn:: } } @@ -8999,14 +8999,14 @@ pub struct IServiceTransactionConfig_Vtbl { } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] pub trait IServiceTransactionConfig_Impl: IServiceTransactionConfigBase_Impl { - fn ConfigureBYOT(&self, pitxbyot: Option<&super::DistributedTransactionCoordinator::ITransaction>) -> windows_core::Result<()>; + fn ConfigureBYOT(&self, pitxbyot: windows_core::Ref<'_, super::DistributedTransactionCoordinator::ITransaction>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] impl IServiceTransactionConfig_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConfigureBYOT(this: *mut core::ffi::c_void, pitxbyot: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IServiceTransactionConfig_Impl::ConfigureBYOT(this, windows_core::from_raw_borrowed(&pitxbyot)).into() + IServiceTransactionConfig_Impl::ConfigureBYOT(this, core::mem::transmute_copy(&pitxbyot)).into() } Self { base__: IServiceTransactionConfigBase_Vtbl::new::(), ConfigureBYOT: ConfigureBYOT:: } } @@ -9198,9 +9198,9 @@ pub struct ISharedPropertyGroup_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISharedPropertyGroup_Impl: super::Com::IDispatch_Impl { - fn CreatePropertyByPosition(&self, index: i32, fexists: *mut super::super::Foundation::VARIANT_BOOL, ppprop: *mut Option) -> windows_core::Result<()>; + fn CreatePropertyByPosition(&self, index: i32, fexists: *mut super::super::Foundation::VARIANT_BOOL, ppprop: windows_core::OutRef<'_, ISharedProperty>) -> windows_core::Result<()>; fn get_PropertyByPosition(&self, index: i32) -> windows_core::Result; - fn CreateProperty(&self, name: &windows_core::BSTR, fexists: *mut super::super::Foundation::VARIANT_BOOL, ppprop: *mut Option) -> windows_core::Result<()>; + fn CreateProperty(&self, name: &windows_core::BSTR, fexists: *mut super::super::Foundation::VARIANT_BOOL, ppprop: windows_core::OutRef<'_, ISharedProperty>) -> windows_core::Result<()>; fn get_Property(&self, name: &windows_core::BSTR) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -9283,7 +9283,7 @@ pub struct ISharedPropertyGroupManager_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISharedPropertyGroupManager_Impl: super::Com::IDispatch_Impl { - fn CreatePropertyGroup(&self, name: &windows_core::BSTR, dwisomode: *mut i32, dwrelmode: *mut i32, fexists: *mut super::super::Foundation::VARIANT_BOOL, ppgroup: *mut Option) -> windows_core::Result<()>; + fn CreatePropertyGroup(&self, name: &windows_core::BSTR, dwisomode: *mut i32, dwrelmode: *mut i32, fexists: *mut super::super::Foundation::VARIANT_BOOL, ppgroup: windows_core::OutRef<'_, ISharedPropertyGroup>) -> windows_core::Result<()>; fn get_Group(&self, name: &windows_core::BSTR) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; } @@ -9882,7 +9882,7 @@ pub trait ITransactionProxy_Impl: windows_core::IUnknownImpl { fn Commit(&self, guid: &windows_core::GUID) -> windows_core::Result<()>; fn Abort(&self) -> windows_core::Result<()>; fn Promote(&self) -> windows_core::Result; - fn CreateVoter(&self, ptxasync: Option<&super::DistributedTransactionCoordinator::ITransactionVoterNotifyAsync2>) -> windows_core::Result; + fn CreateVoter(&self, ptxasync: windows_core::Ref<'_, super::DistributedTransactionCoordinator::ITransactionVoterNotifyAsync2>) -> windows_core::Result; fn GetIsolationLevel(&self, __midl__itransactionproxy0000: *mut i32) -> windows_core::Result<()>; fn GetIdentifier(&self, pbstridentifier: *mut windows_core::GUID) -> windows_core::Result<()>; fn IsReusable(&self, pfisreusable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -9910,7 +9910,7 @@ impl ITransactionProxy_Vtbl { } unsafe extern "system" fn CreateVoter(this: *mut core::ffi::c_void, ptxasync: *mut core::ffi::c_void, ppballot: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransactionProxy_Impl::CreateVoter(this, windows_core::from_raw_borrowed(&ptxasync)) { + match ITransactionProxy_Impl::CreateVoter(this, core::mem::transmute_copy(&ptxasync)) { Ok(ok__) => { ppballot.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9972,18 +9972,18 @@ pub struct ITransactionResourcePool_Vtbl { pub GetResource: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITransactionResourcePool_Impl: windows_core::IUnknownImpl { - fn PutResource(&self, ppool: Option<&IObjPool>, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn GetResource(&self, ppool: Option<&IObjPool>) -> windows_core::Result; + fn PutResource(&self, ppool: windows_core::Ref<'_, IObjPool>, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetResource(&self, ppool: windows_core::Ref<'_, IObjPool>) -> windows_core::Result; } impl ITransactionResourcePool_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PutResource(this: *mut core::ffi::c_void, ppool: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransactionResourcePool_Impl::PutResource(this, windows_core::from_raw_borrowed(&ppool), windows_core::from_raw_borrowed(&punk)).into() + ITransactionResourcePool_Impl::PutResource(this, core::mem::transmute_copy(&ppool), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn GetResource(this: *mut core::ffi::c_void, ppool: *mut core::ffi::c_void, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransactionResourcePool_Impl::GetResource(this, windows_core::from_raw_borrowed(&ppool)) { + match ITransactionResourcePool_Impl::GetResource(this, core::mem::transmute_copy(&ppool)) { Ok(ok__) => { ppunk.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs index 317755da3c..febee86bef 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs @@ -2275,7 +2275,7 @@ pub trait IContactManager_Impl: windows_core::IUnknownImpl { fn Load(&self, pszcontactid: &windows_core::PCWSTR) -> windows_core::Result; fn MergeContactIDs(&self, psznewcontactid: &windows_core::PCWSTR, pszoldcontactid: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetMeContact(&self) -> windows_core::Result; - fn SetMeContact(&self, pmecontact: Option<&IContact>) -> windows_core::Result<()>; + fn SetMeContact(&self, pmecontact: windows_core::Ref<'_, IContact>) -> windows_core::Result<()>; fn GetContactCollection(&self) -> windows_core::Result; } impl IContactManager_Vtbl { @@ -2310,7 +2310,7 @@ impl IContactManager_Vtbl { } unsafe extern "system" fn SetMeContact(this: *mut core::ffi::c_void, pmecontact: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContactManager_Impl::SetMeContact(this, windows_core::from_raw_borrowed(&pmecontact)).into() + IContactManager_Impl::SetMeContact(this, core::mem::transmute_copy(&pmecontact)).into() } unsafe extern "system" fn GetContactCollection(this: *mut core::ffi::c_void, ppcontactcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2451,17 +2451,17 @@ pub struct IContactProperties_Vtbl { pub trait IContactProperties_Impl: windows_core::IUnknownImpl { fn GetString(&self, pszpropertyname: &windows_core::PCWSTR, dwflags: u32, pszvalue: &windows_core::PWSTR, cchvalue: u32, pdwcchpropertyvaluerequired: *mut u32) -> windows_core::Result<()>; fn GetDate(&self, pszpropertyname: &windows_core::PCWSTR, dwflags: u32, pftdatetime: *mut super::super::Foundation::FILETIME) -> windows_core::Result<()>; - fn GetBinary(&self, pszpropertyname: &windows_core::PCWSTR, dwflags: u32, pszcontenttype: &windows_core::PWSTR, cchcontenttype: u32, pdwcchcontenttyperequired: *mut u32, ppstream: *mut Option) -> windows_core::Result<()>; + fn GetBinary(&self, pszpropertyname: &windows_core::PCWSTR, dwflags: u32, pszcontenttype: &windows_core::PWSTR, cchcontenttype: u32, pdwcchcontenttyperequired: *mut u32, ppstream: windows_core::OutRef<'_, super::Com::IStream>) -> windows_core::Result<()>; fn GetLabels(&self, pszarrayelementname: &windows_core::PCWSTR, dwflags: u32, pszlabels: &windows_core::PWSTR, cchlabels: u32, pdwcchlabelsrequired: *mut u32) -> windows_core::Result<()>; fn SetString(&self, pszpropertyname: &windows_core::PCWSTR, dwflags: u32, pszvalue: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetDate(&self, pszpropertyname: &windows_core::PCWSTR, dwflags: u32, ftdatetime: &super::super::Foundation::FILETIME) -> windows_core::Result<()>; - fn SetBinary(&self, pszpropertyname: &windows_core::PCWSTR, dwflags: u32, pszcontenttype: &windows_core::PCWSTR, pstream: Option<&super::Com::IStream>) -> windows_core::Result<()>; + fn SetBinary(&self, pszpropertyname: &windows_core::PCWSTR, dwflags: u32, pszcontenttype: &windows_core::PCWSTR, pstream: windows_core::Ref<'_, super::Com::IStream>) -> windows_core::Result<()>; fn SetLabels(&self, pszarrayelementname: &windows_core::PCWSTR, dwflags: u32, dwlabelcount: u32, ppszlabels: *const windows_core::PCWSTR) -> windows_core::Result<()>; fn CreateArrayNode(&self, pszarrayname: &windows_core::PCWSTR, dwflags: u32, fappend: super::super::Foundation::BOOL, psznewarrayelementname: &windows_core::PWSTR, cchnewarrayelementname: u32, pdwcchnewarrayelementnamerequired: *mut u32) -> windows_core::Result<()>; fn DeleteProperty(&self, pszpropertyname: &windows_core::PCWSTR, dwflags: u32) -> windows_core::Result<()>; fn DeleteArrayNode(&self, pszarrayelementname: &windows_core::PCWSTR, dwflags: u32) -> windows_core::Result<()>; fn DeleteLabels(&self, pszarrayelementname: &windows_core::PCWSTR, dwflags: u32) -> windows_core::Result<()>; - fn GetPropertyCollection(&self, pppropertycollection: *mut Option, dwflags: u32, pszmultivaluename: &windows_core::PCWSTR, dwlabelcount: u32, ppszlabels: *const windows_core::PCWSTR, fanylabelmatches: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn GetPropertyCollection(&self, pppropertycollection: windows_core::OutRef<'_, IContactPropertyCollection>, dwflags: u32, pszmultivaluename: &windows_core::PCWSTR, dwlabelcount: u32, ppszlabels: *const windows_core::PCWSTR, fanylabelmatches: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IContactProperties_Vtbl { @@ -2492,7 +2492,7 @@ impl IContactProperties_Vtbl { } unsafe extern "system" fn SetBinary(this: *mut core::ffi::c_void, pszpropertyname: windows_core::PCWSTR, dwflags: u32, pszcontenttype: windows_core::PCWSTR, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContactProperties_Impl::SetBinary(this, core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&dwflags), core::mem::transmute(&pszcontenttype), windows_core::from_raw_borrowed(&pstream)).into() + IContactProperties_Impl::SetBinary(this, core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&dwflags), core::mem::transmute(&pszcontenttype), core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn SetLabels(this: *mut core::ffi::c_void, pszarrayelementname: windows_core::PCWSTR, dwflags: u32, dwlabelcount: u32, ppszlabels: *const windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs index 118d361a2d..708a9a4293 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DesktopSharing/mod.rs @@ -866,14 +866,14 @@ pub struct IRDPSRAPIClipboardUseEvents_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IRDPSRAPIClipboardUseEvents_Impl: windows_core::IUnknownImpl { - fn OnPasteFromClipboard(&self, clipboardformat: u32, pattendee: Option<&super::Com::IDispatch>) -> windows_core::Result; + fn OnPasteFromClipboard(&self, clipboardformat: u32, pattendee: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IRDPSRAPIClipboardUseEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnPasteFromClipboard(this: *mut core::ffi::c_void, clipboardformat: u32, pattendee: *mut core::ffi::c_void, pretval: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRDPSRAPIClipboardUseEvents_Impl::OnPasteFromClipboard(this, core::mem::transmute_copy(&clipboardformat), windows_core::from_raw_borrowed(&pattendee)) { + match IRDPSRAPIClipboardUseEvents_Impl::OnPasteFromClipboard(this, core::mem::transmute_copy(&clipboardformat), core::mem::transmute_copy(&pattendee)) { Ok(ok__) => { pretval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1681,16 +1681,16 @@ pub struct IRDPSRAPISharingSession2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IRDPSRAPISharingSession2_Impl: IRDPSRAPISharingSession_Impl { - fn ConnectUsingTransportStream(&self, pstream: Option<&IRDPSRAPITransportStream>, bstrgroup: &windows_core::BSTR, bstrauthenticatedattendeename: &windows_core::BSTR) -> windows_core::Result<()>; + fn ConnectUsingTransportStream(&self, pstream: windows_core::Ref<'_, IRDPSRAPITransportStream>, bstrgroup: &windows_core::BSTR, bstrauthenticatedattendeename: &windows_core::BSTR) -> windows_core::Result<()>; fn FrameBuffer(&self) -> windows_core::Result; - fn SendControlLevelChangeResponse(&self, pattendee: Option<&IRDPSRAPIAttendee>, requestedlevel: CTRL_LEVEL, reasoncode: i32) -> windows_core::Result<()>; + fn SendControlLevelChangeResponse(&self, pattendee: windows_core::Ref<'_, IRDPSRAPIAttendee>, requestedlevel: CTRL_LEVEL, reasoncode: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IRDPSRAPISharingSession2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConnectUsingTransportStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, bstrgroup: *mut core::ffi::c_void, bstrauthenticatedattendeename: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRDPSRAPISharingSession2_Impl::ConnectUsingTransportStream(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute(&bstrgroup), core::mem::transmute(&bstrauthenticatedattendeename)).into() + IRDPSRAPISharingSession2_Impl::ConnectUsingTransportStream(this, core::mem::transmute_copy(&pstream), core::mem::transmute(&bstrgroup), core::mem::transmute(&bstrauthenticatedattendeename)).into() } unsafe extern "system" fn FrameBuffer(this: *mut core::ffi::c_void, ppval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1704,7 +1704,7 @@ impl IRDPSRAPISharingSession2_Vtbl { } unsafe extern "system" fn SendControlLevelChangeResponse(this: *mut core::ffi::c_void, pattendee: *mut core::ffi::c_void, requestedlevel: CTRL_LEVEL, reasoncode: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRDPSRAPISharingSession2_Impl::SendControlLevelChangeResponse(this, windows_core::from_raw_borrowed(&pattendee), core::mem::transmute_copy(&requestedlevel), core::mem::transmute_copy(&reasoncode)).into() + IRDPSRAPISharingSession2_Impl::SendControlLevelChangeResponse(this, core::mem::transmute_copy(&pattendee), core::mem::transmute_copy(&requestedlevel), core::mem::transmute_copy(&reasoncode)).into() } Self { base__: IRDPSRAPISharingSession_Vtbl::new::(), @@ -1886,10 +1886,10 @@ pub struct IRDPSRAPITransportStream_Vtbl { } pub trait IRDPSRAPITransportStream_Impl: windows_core::IUnknownImpl { fn AllocBuffer(&self, maxpayload: i32) -> windows_core::Result; - fn FreeBuffer(&self, pbuffer: Option<&IRDPSRAPITransportStreamBuffer>) -> windows_core::Result<()>; - fn WriteBuffer(&self, pbuffer: Option<&IRDPSRAPITransportStreamBuffer>) -> windows_core::Result<()>; - fn ReadBuffer(&self, pbuffer: Option<&IRDPSRAPITransportStreamBuffer>) -> windows_core::Result<()>; - fn Open(&self, pcallbacks: Option<&IRDPSRAPITransportStreamEvents>) -> windows_core::Result<()>; + fn FreeBuffer(&self, pbuffer: windows_core::Ref<'_, IRDPSRAPITransportStreamBuffer>) -> windows_core::Result<()>; + fn WriteBuffer(&self, pbuffer: windows_core::Ref<'_, IRDPSRAPITransportStreamBuffer>) -> windows_core::Result<()>; + fn ReadBuffer(&self, pbuffer: windows_core::Ref<'_, IRDPSRAPITransportStreamBuffer>) -> windows_core::Result<()>; + fn Open(&self, pcallbacks: windows_core::Ref<'_, IRDPSRAPITransportStreamEvents>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } impl IRDPSRAPITransportStream_Vtbl { @@ -1906,19 +1906,19 @@ impl IRDPSRAPITransportStream_Vtbl { } unsafe extern "system" fn FreeBuffer(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRDPSRAPITransportStream_Impl::FreeBuffer(this, windows_core::from_raw_borrowed(&pbuffer)).into() + IRDPSRAPITransportStream_Impl::FreeBuffer(this, core::mem::transmute_copy(&pbuffer)).into() } unsafe extern "system" fn WriteBuffer(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRDPSRAPITransportStream_Impl::WriteBuffer(this, windows_core::from_raw_borrowed(&pbuffer)).into() + IRDPSRAPITransportStream_Impl::WriteBuffer(this, core::mem::transmute_copy(&pbuffer)).into() } unsafe extern "system" fn ReadBuffer(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRDPSRAPITransportStream_Impl::ReadBuffer(this, windows_core::from_raw_borrowed(&pbuffer)).into() + IRDPSRAPITransportStream_Impl::ReadBuffer(this, core::mem::transmute_copy(&pbuffer)).into() } unsafe extern "system" fn Open(this: *mut core::ffi::c_void, pcallbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRDPSRAPITransportStream_Impl::Open(this, windows_core::from_raw_borrowed(&pcallbacks)).into() + IRDPSRAPITransportStream_Impl::Open(this, core::mem::transmute_copy(&pcallbacks)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2006,7 +2006,7 @@ pub trait IRDPSRAPITransportStreamBuffer_Impl: windows_core::IUnknownImpl { fn Flags(&self) -> windows_core::Result; fn SetFlags(&self, lflags: i32) -> windows_core::Result<()>; fn Context(&self) -> windows_core::Result; - fn SetContext(&self, pcontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetContext(&self, pcontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IRDPSRAPITransportStreamBuffer_Vtbl { pub const fn new() -> Self { @@ -2084,7 +2084,7 @@ impl IRDPSRAPITransportStreamBuffer_Vtbl { } unsafe extern "system" fn SetContext(this: *mut core::ffi::c_void, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRDPSRAPITransportStreamBuffer_Impl::SetContext(this, windows_core::from_raw_borrowed(&pcontext)).into() + IRDPSRAPITransportStreamBuffer_Impl::SetContext(this, core::mem::transmute_copy(&pcontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2132,19 +2132,19 @@ pub struct IRDPSRAPITransportStreamEvents_Vtbl { pub OnStreamClosed: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT), } pub trait IRDPSRAPITransportStreamEvents_Impl: windows_core::IUnknownImpl { - fn OnWriteCompleted(&self, pbuffer: Option<&IRDPSRAPITransportStreamBuffer>); - fn OnReadCompleted(&self, pbuffer: Option<&IRDPSRAPITransportStreamBuffer>); + fn OnWriteCompleted(&self, pbuffer: windows_core::Ref<'_, IRDPSRAPITransportStreamBuffer>); + fn OnReadCompleted(&self, pbuffer: windows_core::Ref<'_, IRDPSRAPITransportStreamBuffer>); fn OnStreamClosed(&self, hrreason: windows_core::HRESULT); } impl IRDPSRAPITransportStreamEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnWriteCompleted(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRDPSRAPITransportStreamEvents_Impl::OnWriteCompleted(this, windows_core::from_raw_borrowed(&pbuffer)) + IRDPSRAPITransportStreamEvents_Impl::OnWriteCompleted(this, core::mem::transmute_copy(&pbuffer)) } unsafe extern "system" fn OnReadCompleted(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRDPSRAPITransportStreamEvents_Impl::OnReadCompleted(this, windows_core::from_raw_borrowed(&pbuffer)) + IRDPSRAPITransportStreamEvents_Impl::OnReadCompleted(this, core::mem::transmute_copy(&pbuffer)) } unsafe extern "system" fn OnStreamClosed(this: *mut core::ffi::c_void, hrreason: windows_core::HRESULT) { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs index d4ff2f9c01..8cfd99c733 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ClrProfiling/mod.rs @@ -735,7 +735,7 @@ pub struct ICorProfilerCallback_Vtbl { pub ExceptionCLRCatcherExecute: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICorProfilerCallback_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, picorprofilerinfounk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, picorprofilerinfounk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; fn AppDomainCreationStarted(&self, appdomainid: usize) -> windows_core::Result<()>; fn AppDomainCreationFinished(&self, appdomainid: usize, hrstatus: windows_core::HRESULT) -> windows_core::Result<()>; @@ -809,7 +809,7 @@ impl ICorProfilerCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, picorprofilerinfounk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICorProfilerCallback_Impl::Initialize(this, windows_core::from_raw_borrowed(&picorprofilerinfounk)).into() + ICorProfilerCallback_Impl::Initialize(this, core::mem::transmute_copy(&picorprofilerinfounk)).into() } unsafe extern "system" fn Shutdown(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1406,7 +1406,7 @@ pub struct ICorProfilerCallback3_Vtbl { pub ProfilerDetachSucceeded: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICorProfilerCallback3_Impl: ICorProfilerCallback2_Impl { - fn InitializeForAttach(&self, pcorprofilerinfounk: Option<&windows_core::IUnknown>, pvclientdata: *const core::ffi::c_void, cbclientdata: u32) -> windows_core::Result<()>; + fn InitializeForAttach(&self, pcorprofilerinfounk: windows_core::Ref<'_, windows_core::IUnknown>, pvclientdata: *const core::ffi::c_void, cbclientdata: u32) -> windows_core::Result<()>; fn ProfilerAttachComplete(&self) -> windows_core::Result<()>; fn ProfilerDetachSucceeded(&self) -> windows_core::Result<()>; } @@ -1414,7 +1414,7 @@ impl ICorProfilerCallback3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeForAttach(this: *mut core::ffi::c_void, pcorprofilerinfounk: *mut core::ffi::c_void, pvclientdata: *const core::ffi::c_void, cbclientdata: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICorProfilerCallback3_Impl::InitializeForAttach(this, windows_core::from_raw_borrowed(&pcorprofilerinfounk), core::mem::transmute_copy(&pvclientdata), core::mem::transmute_copy(&cbclientdata)).into() + ICorProfilerCallback3_Impl::InitializeForAttach(this, core::mem::transmute_copy(&pcorprofilerinfounk), core::mem::transmute_copy(&pvclientdata), core::mem::transmute_copy(&cbclientdata)).into() } unsafe extern "system" fn ProfilerAttachComplete(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1479,7 +1479,7 @@ pub struct ICorProfilerCallback4_Vtbl { } pub trait ICorProfilerCallback4_Impl: ICorProfilerCallback3_Impl { fn ReJITCompilationStarted(&self, functionid: usize, rejitid: usize, fissafetoblock: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn GetReJITParameters(&self, moduleid: usize, methodid: u32, pfunctioncontrol: Option<&ICorProfilerFunctionControl>) -> windows_core::Result<()>; + fn GetReJITParameters(&self, moduleid: usize, methodid: u32, pfunctioncontrol: windows_core::Ref<'_, ICorProfilerFunctionControl>) -> windows_core::Result<()>; fn ReJITCompilationFinished(&self, functionid: usize, rejitid: usize, hrstatus: windows_core::HRESULT, fissafetoblock: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn ReJITError(&self, moduleid: usize, methodid: u32, functionid: usize, hrstatus: windows_core::HRESULT) -> windows_core::Result<()>; fn MovedReferences2(&self, cmovedobjectidranges: u32, oldobjectidrangestart: *const usize, newobjectidrangestart: *const usize, cobjectidrangelength: *const usize) -> windows_core::Result<()>; @@ -1493,7 +1493,7 @@ impl ICorProfilerCallback4_Vtbl { } unsafe extern "system" fn GetReJITParameters(this: *mut core::ffi::c_void, moduleid: usize, methodid: u32, pfunctioncontrol: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICorProfilerCallback4_Impl::GetReJITParameters(this, core::mem::transmute_copy(&moduleid), core::mem::transmute_copy(&methodid), windows_core::from_raw_borrowed(&pfunctioncontrol)).into() + ICorProfilerCallback4_Impl::GetReJITParameters(this, core::mem::transmute_copy(&moduleid), core::mem::transmute_copy(&methodid), core::mem::transmute_copy(&pfunctioncontrol)).into() } unsafe extern "system" fn ReJITCompilationFinished(this: *mut core::ffi::c_void, functionid: usize, rejitid: usize, hrstatus: windows_core::HRESULT, fissafetoblock: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1586,13 +1586,13 @@ pub struct ICorProfilerCallback6_Vtbl { pub GetAssemblyReferences: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICorProfilerCallback6_Impl: ICorProfilerCallback5_Impl { - fn GetAssemblyReferences(&self, wszassemblypath: &windows_core::PCWSTR, pasmrefprovider: Option<&ICorProfilerAssemblyReferenceProvider>) -> windows_core::Result<()>; + fn GetAssemblyReferences(&self, wszassemblypath: &windows_core::PCWSTR, pasmrefprovider: windows_core::Ref<'_, ICorProfilerAssemblyReferenceProvider>) -> windows_core::Result<()>; } impl ICorProfilerCallback6_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetAssemblyReferences(this: *mut core::ffi::c_void, wszassemblypath: windows_core::PCWSTR, pasmrefprovider: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICorProfilerCallback6_Impl::GetAssemblyReferences(this, core::mem::transmute(&wszassemblypath), windows_core::from_raw_borrowed(&pasmrefprovider)).into() + ICorProfilerCallback6_Impl::GetAssemblyReferences(this, core::mem::transmute(&wszassemblypath), core::mem::transmute_copy(&pasmrefprovider)).into() } Self { base__: ICorProfilerCallback5_Vtbl::new::(), GetAssemblyReferences: GetAssemblyReferences:: } } @@ -2029,7 +2029,7 @@ pub trait ICorProfilerInfo_Impl: windows_core::IUnknownImpl { fn SetEventMask(&self, dwevents: u32) -> windows_core::Result<()>; fn SetEnterLeaveFunctionHooks(&self, pfuncenter: *const FunctionEnter, pfuncleave: *const FunctionLeave, pfunctailcall: *const FunctionTailcall) -> windows_core::Result<()>; fn SetFunctionIDMapper(&self, pfunc: *const FunctionIDMapper) -> windows_core::Result<()>; - fn GetTokenAndMetaDataFromFunction(&self, functionid: usize, riid: *const windows_core::GUID, ppimport: *mut Option, ptoken: *mut u32) -> windows_core::Result<()>; + fn GetTokenAndMetaDataFromFunction(&self, functionid: usize, riid: *const windows_core::GUID, ppimport: windows_core::OutRef<'_, windows_core::IUnknown>, ptoken: *mut u32) -> windows_core::Result<()>; fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, cchname: u32, pcchname: *mut u32, szname: windows_core::PWSTR, passemblyid: *mut usize) -> windows_core::Result<()>; fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const windows_core::GUID) -> windows_core::Result; fn GetILFunctionBody(&self, moduleid: usize, methodid: u32, ppmethodheader: *mut *mut u8, pcbmethodsize: *mut u32) -> windows_core::Result<()>; @@ -3477,7 +3477,7 @@ pub struct ICorProfilerInfo6_Vtbl { } #[cfg(feature = "Win32_System_WinRT_Metadata")] pub trait ICorProfilerInfo6_Impl: ICorProfilerInfo5_Impl { - fn EnumNgenModuleMethodsInliningThisMethod(&self, inlinersmoduleid: usize, inlineemoduleid: usize, inlineemethodid: u32, incompletedata: *mut super::super::super::Foundation::BOOL, ppenum: *mut Option) -> windows_core::Result<()>; + fn EnumNgenModuleMethodsInliningThisMethod(&self, inlinersmoduleid: usize, inlineemoduleid: usize, inlineemethodid: u32, incompletedata: *mut super::super::super::Foundation::BOOL, ppenum: windows_core::OutRef<'_, ICorProfilerMethodEnum>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_WinRT_Metadata")] impl ICorProfilerInfo6_Vtbl { diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs index 511e2cc372..a8962357bb 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs @@ -63,20 +63,20 @@ pub struct AsyncIDebugApplicationNodeEvents_Vtbl { pub Finish_onAttach: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait AsyncIDebugApplicationNodeEvents_Impl: windows_core::IUnknownImpl { - fn Begin_onAddChild(&self, prddpchild: Option<&IDebugApplicationNode>) -> windows_core::Result<()>; + fn Begin_onAddChild(&self, prddpchild: windows_core::Ref<'_, IDebugApplicationNode>) -> windows_core::Result<()>; fn Finish_onAddChild(&self) -> windows_core::Result<()>; - fn Begin_onRemoveChild(&self, prddpchild: Option<&IDebugApplicationNode>) -> windows_core::Result<()>; + fn Begin_onRemoveChild(&self, prddpchild: windows_core::Ref<'_, IDebugApplicationNode>) -> windows_core::Result<()>; fn Finish_onRemoveChild(&self) -> windows_core::Result<()>; fn Begin_onDetach(&self) -> windows_core::Result<()>; fn Finish_onDetach(&self) -> windows_core::Result<()>; - fn Begin_onAttach(&self, prddpparent: Option<&IDebugApplicationNode>) -> windows_core::Result<()>; + fn Begin_onAttach(&self, prddpparent: windows_core::Ref<'_, IDebugApplicationNode>) -> windows_core::Result<()>; fn Finish_onAttach(&self) -> windows_core::Result<()>; } impl AsyncIDebugApplicationNodeEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Begin_onAddChild(this: *mut core::ffi::c_void, prddpchild: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIDebugApplicationNodeEvents_Impl::Begin_onAddChild(this, windows_core::from_raw_borrowed(&prddpchild)).into() + AsyncIDebugApplicationNodeEvents_Impl::Begin_onAddChild(this, core::mem::transmute_copy(&prddpchild)).into() } unsafe extern "system" fn Finish_onAddChild(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -84,7 +84,7 @@ impl AsyncIDebugApplicationNodeEvents_Vtbl { } unsafe extern "system" fn Begin_onRemoveChild(this: *mut core::ffi::c_void, prddpchild: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIDebugApplicationNodeEvents_Impl::Begin_onRemoveChild(this, windows_core::from_raw_borrowed(&prddpchild)).into() + AsyncIDebugApplicationNodeEvents_Impl::Begin_onRemoveChild(this, core::mem::transmute_copy(&prddpchild)).into() } unsafe extern "system" fn Finish_onRemoveChild(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -100,7 +100,7 @@ impl AsyncIDebugApplicationNodeEvents_Vtbl { } unsafe extern "system" fn Begin_onAttach(this: *mut core::ffi::c_void, prddpparent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - AsyncIDebugApplicationNodeEvents_Impl::Begin_onAttach(this, windows_core::from_raw_borrowed(&prddpparent)).into() + AsyncIDebugApplicationNodeEvents_Impl::Begin_onAttach(this, core::mem::transmute_copy(&prddpparent)).into() } unsafe extern "system" fn Finish_onAttach(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -327,7 +327,7 @@ pub struct IActiveScript_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IActiveScript_Impl: windows_core::IUnknownImpl { - fn SetScriptSite(&self, pass: Option<&IActiveScriptSite>) -> windows_core::Result<()>; + fn SetScriptSite(&self, pass: windows_core::Ref<'_, IActiveScriptSite>) -> windows_core::Result<()>; fn GetScriptSite(&self, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetScriptState(&self, ss: SCRIPTSTATE) -> windows_core::Result<()>; fn GetScriptState(&self) -> windows_core::Result; @@ -346,7 +346,7 @@ impl IActiveScript_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetScriptSite(this: *mut core::ffi::c_void, pass: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScript_Impl::SetScriptSite(this, windows_core::from_raw_borrowed(&pass)).into() + IActiveScript_Impl::SetScriptSite(this, core::mem::transmute_copy(&pass)).into() } unsafe extern "system" fn GetScriptSite(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -571,19 +571,19 @@ pub struct IActiveScriptAuthor_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IActiveScriptAuthor_Impl: windows_core::IUnknownImpl { - fn AddNamedItem(&self, pszname: &windows_core::PCWSTR, dwflags: u32, pdisp: Option<&super::super::super::Com::IDispatch>) -> windows_core::Result<()>; + fn AddNamedItem(&self, pszname: &windows_core::PCWSTR, dwflags: u32, pdisp: windows_core::Ref<'_, super::super::super::Com::IDispatch>) -> windows_core::Result<()>; fn AddScriptlet(&self, pszdefaultname: &windows_core::PCWSTR, pszcode: &windows_core::PCWSTR, pszitemname: &windows_core::PCWSTR, pszsubitemname: &windows_core::PCWSTR, pszeventname: &windows_core::PCWSTR, pszdelimiter: &windows_core::PCWSTR, dwcookie: u32, dwflags: u32) -> windows_core::Result<()>; fn ParseScriptText(&self, pszcode: &windows_core::PCWSTR, pszitemname: &windows_core::PCWSTR, pszdelimiter: &windows_core::PCWSTR, dwcookie: u32, dwflags: u32) -> windows_core::Result<()>; fn GetScriptTextAttributes(&self, pszcode: &windows_core::PCWSTR, cch: u32, pszdelimiter: &windows_core::PCWSTR, dwflags: u32, pattr: *mut u16) -> windows_core::Result<()>; fn GetScriptletTextAttributes(&self, pszcode: &windows_core::PCWSTR, cch: u32, pszdelimiter: &windows_core::PCWSTR, dwflags: u32, pattr: *mut u16) -> windows_core::Result<()>; fn GetRoot(&self) -> windows_core::Result; fn GetLanguageFlags(&self) -> windows_core::Result; - fn GetEventHandler(&self, pdisp: Option<&super::super::super::Com::IDispatch>, pszitem: &windows_core::PCWSTR, pszsubitem: &windows_core::PCWSTR, pszevent: &windows_core::PCWSTR) -> windows_core::Result; + fn GetEventHandler(&self, pdisp: windows_core::Ref<'_, super::super::super::Com::IDispatch>, pszitem: &windows_core::PCWSTR, pszsubitem: &windows_core::PCWSTR, pszevent: &windows_core::PCWSTR) -> windows_core::Result; fn RemoveNamedItem(&self, pszname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn AddTypeLib(&self, rguidtypelib: *const windows_core::GUID, dwmajor: u32, dwminor: u32, dwflags: u32) -> windows_core::Result<()>; fn RemoveTypeLib(&self, rguidtypelib: *const windows_core::GUID, dwmajor: u32, dwminor: u32) -> windows_core::Result<()>; fn GetChars(&self, frequestedlist: u32) -> windows_core::Result; - fn GetInfoFromContext(&self, pszcode: &windows_core::PCWSTR, cchcode: u32, ichcurrentposition: u32, dwlisttypesrequested: u32, pdwlisttypesprovided: *mut u32, pichlistanchorposition: *mut u32, pichfuncanchorposition: *mut u32, pmemid: *mut i32, picurrentparameter: *mut i32, ppunk: *mut Option) -> windows_core::Result<()>; + fn GetInfoFromContext(&self, pszcode: &windows_core::PCWSTR, cchcode: u32, ichcurrentposition: u32, dwlisttypesrequested: u32, pdwlisttypesprovided: *mut u32, pichlistanchorposition: *mut u32, pichfuncanchorposition: *mut u32, pmemid: *mut i32, picurrentparameter: *mut i32, ppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn IsCommitChar(&self, ch: u16) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -591,7 +591,7 @@ impl IActiveScriptAuthor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddNamedItem(this: *mut core::ffi::c_void, pszname: windows_core::PCWSTR, dwflags: u32, pdisp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptAuthor_Impl::AddNamedItem(this, core::mem::transmute(&pszname), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pdisp)).into() + IActiveScriptAuthor_Impl::AddNamedItem(this, core::mem::transmute(&pszname), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pdisp)).into() } unsafe extern "system" fn AddScriptlet(this: *mut core::ffi::c_void, pszdefaultname: windows_core::PCWSTR, pszcode: windows_core::PCWSTR, pszitemname: windows_core::PCWSTR, pszsubitemname: windows_core::PCWSTR, pszeventname: windows_core::PCWSTR, pszdelimiter: windows_core::PCWSTR, dwcookie: u32, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -631,7 +631,7 @@ impl IActiveScriptAuthor_Vtbl { } unsafe extern "system" fn GetEventHandler(this: *mut core::ffi::c_void, pdisp: *mut core::ffi::c_void, pszitem: windows_core::PCWSTR, pszsubitem: windows_core::PCWSTR, pszevent: windows_core::PCWSTR, ppse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IActiveScriptAuthor_Impl::GetEventHandler(this, windows_core::from_raw_borrowed(&pdisp), core::mem::transmute(&pszitem), core::mem::transmute(&pszsubitem), core::mem::transmute(&pszevent)) { + match IActiveScriptAuthor_Impl::GetEventHandler(this, core::mem::transmute_copy(&pdisp), core::mem::transmute(&pszitem), core::mem::transmute(&pszsubitem), core::mem::transmute(&pszevent)) { Ok(ok__) => { ppse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -725,14 +725,14 @@ pub struct IActiveScriptAuthorProcedure_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IActiveScriptAuthorProcedure_Impl: windows_core::IUnknownImpl { - fn ParseProcedureText(&self, pszcode: &windows_core::PCWSTR, pszformalparams: &windows_core::PCWSTR, pszprocedurename: &windows_core::PCWSTR, pszitemname: &windows_core::PCWSTR, pszdelimiter: &windows_core::PCWSTR, dwcookie: u32, dwflags: u32, pdispfor: Option<&super::super::super::Com::IDispatch>) -> windows_core::Result<()>; + fn ParseProcedureText(&self, pszcode: &windows_core::PCWSTR, pszformalparams: &windows_core::PCWSTR, pszprocedurename: &windows_core::PCWSTR, pszitemname: &windows_core::PCWSTR, pszdelimiter: &windows_core::PCWSTR, dwcookie: u32, dwflags: u32, pdispfor: windows_core::Ref<'_, super::super::super::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IActiveScriptAuthorProcedure_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ParseProcedureText(this: *mut core::ffi::c_void, pszcode: windows_core::PCWSTR, pszformalparams: windows_core::PCWSTR, pszprocedurename: windows_core::PCWSTR, pszitemname: windows_core::PCWSTR, pszdelimiter: windows_core::PCWSTR, dwcookie: u32, dwflags: u32, pdispfor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptAuthorProcedure_Impl::ParseProcedureText(this, core::mem::transmute(&pszcode), core::mem::transmute(&pszformalparams), core::mem::transmute(&pszprocedurename), core::mem::transmute(&pszitemname), core::mem::transmute(&pszdelimiter), core::mem::transmute_copy(&dwcookie), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pdispfor)).into() + IActiveScriptAuthorProcedure_Impl::ParseProcedureText(this, core::mem::transmute(&pszcode), core::mem::transmute(&pszformalparams), core::mem::transmute(&pszprocedurename), core::mem::transmute(&pszitemname), core::mem::transmute(&pszdelimiter), core::mem::transmute_copy(&dwcookie), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pdispfor)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ParseProcedureText: ParseProcedureText:: } } @@ -1234,7 +1234,7 @@ pub struct IActiveScriptParse32_Vtbl { pub trait IActiveScriptParse32_Impl: windows_core::IUnknownImpl { fn InitNew(&self) -> windows_core::Result<()>; fn AddScriptlet(&self, pstrdefaultname: &windows_core::PCWSTR, pstrcode: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, pstrsubitemname: &windows_core::PCWSTR, pstreventname: &windows_core::PCWSTR, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32, pbstrname: *mut windows_core::BSTR, pexcepinfo: *mut super::super::super::Com::EXCEPINFO) -> windows_core::Result<()>; - fn ParseScriptText(&self, pstrcode: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: Option<&windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32, pvarresult: *mut super::super::super::Variant::VARIANT, pexcepinfo: *mut super::super::super::Com::EXCEPINFO) -> windows_core::Result<()>; + fn ParseScriptText(&self, pstrcode: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: windows_core::Ref<'_, windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32, pvarresult: *mut super::super::super::Variant::VARIANT, pexcepinfo: *mut super::super::super::Com::EXCEPINFO) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IActiveScriptParse32_Vtbl { @@ -1249,7 +1249,7 @@ impl IActiveScriptParse32_Vtbl { } unsafe extern "system" fn ParseScriptText(this: *mut core::ffi::c_void, pstrcode: windows_core::PCWSTR, pstritemname: windows_core::PCWSTR, punkcontext: *mut core::ffi::c_void, pstrdelimiter: windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32, pvarresult: *mut super::super::super::Variant::VARIANT, pexcepinfo: *mut super::super::super::Com::EXCEPINFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptParse32_Impl::ParseScriptText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstritemname), windows_core::from_raw_borrowed(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pvarresult), core::mem::transmute_copy(&pexcepinfo)).into() + IActiveScriptParse32_Impl::ParseScriptText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstritemname), core::mem::transmute_copy(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pvarresult), core::mem::transmute_copy(&pexcepinfo)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1310,7 +1310,7 @@ pub struct IActiveScriptParse64_Vtbl { pub trait IActiveScriptParse64_Impl: windows_core::IUnknownImpl { fn InitNew(&self) -> windows_core::Result<()>; fn AddScriptlet(&self, pstrdefaultname: &windows_core::PCWSTR, pstrcode: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, pstrsubitemname: &windows_core::PCWSTR, pstreventname: &windows_core::PCWSTR, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32, pbstrname: *mut windows_core::BSTR, pexcepinfo: *mut super::super::super::Com::EXCEPINFO) -> windows_core::Result<()>; - fn ParseScriptText(&self, pstrcode: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: Option<&windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32, pvarresult: *mut super::super::super::Variant::VARIANT, pexcepinfo: *mut super::super::super::Com::EXCEPINFO) -> windows_core::Result<()>; + fn ParseScriptText(&self, pstrcode: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: windows_core::Ref<'_, windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32, pvarresult: *mut super::super::super::Variant::VARIANT, pexcepinfo: *mut super::super::super::Com::EXCEPINFO) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IActiveScriptParse64_Vtbl { @@ -1325,7 +1325,7 @@ impl IActiveScriptParse64_Vtbl { } unsafe extern "system" fn ParseScriptText(this: *mut core::ffi::c_void, pstrcode: windows_core::PCWSTR, pstritemname: windows_core::PCWSTR, punkcontext: *mut core::ffi::c_void, pstrdelimiter: windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32, pvarresult: *mut super::super::super::Variant::VARIANT, pexcepinfo: *mut super::super::super::Com::EXCEPINFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptParse64_Impl::ParseScriptText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstritemname), windows_core::from_raw_borrowed(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pvarresult), core::mem::transmute_copy(&pexcepinfo)).into() + IActiveScriptParse64_Impl::ParseScriptText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstritemname), core::mem::transmute_copy(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pvarresult), core::mem::transmute_copy(&pexcepinfo)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1417,14 +1417,14 @@ pub struct IActiveScriptParseProcedure32_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IActiveScriptParseProcedure32_Impl: windows_core::IUnknownImpl { - fn ParseProcedureText(&self, pstrcode: &windows_core::PCWSTR, pstrformalparams: &windows_core::PCWSTR, pstrprocedurename: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: Option<&windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32) -> windows_core::Result; + fn ParseProcedureText(&self, pstrcode: &windows_core::PCWSTR, pstrformalparams: &windows_core::PCWSTR, pstrprocedurename: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: windows_core::Ref<'_, windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IActiveScriptParseProcedure32_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ParseProcedureText(this: *mut core::ffi::c_void, pstrcode: windows_core::PCWSTR, pstrformalparams: windows_core::PCWSTR, pstrprocedurename: windows_core::PCWSTR, pstritemname: windows_core::PCWSTR, punkcontext: *mut core::ffi::c_void, pstrdelimiter: windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32, ppdisp: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IActiveScriptParseProcedure32_Impl::ParseProcedureText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstrformalparams), core::mem::transmute(&pstrprocedurename), core::mem::transmute(&pstritemname), windows_core::from_raw_borrowed(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags)) { + match IActiveScriptParseProcedure32_Impl::ParseProcedureText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstrformalparams), core::mem::transmute(&pstrprocedurename), core::mem::transmute(&pstritemname), core::mem::transmute_copy(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppdisp.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1467,14 +1467,14 @@ pub struct IActiveScriptParseProcedure64_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IActiveScriptParseProcedure64_Impl: windows_core::IUnknownImpl { - fn ParseProcedureText(&self, pstrcode: &windows_core::PCWSTR, pstrformalparams: &windows_core::PCWSTR, pstrprocedurename: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: Option<&windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32) -> windows_core::Result; + fn ParseProcedureText(&self, pstrcode: &windows_core::PCWSTR, pstrformalparams: &windows_core::PCWSTR, pstrprocedurename: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: windows_core::Ref<'_, windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IActiveScriptParseProcedure64_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ParseProcedureText(this: *mut core::ffi::c_void, pstrcode: windows_core::PCWSTR, pstrformalparams: windows_core::PCWSTR, pstrprocedurename: windows_core::PCWSTR, pstritemname: windows_core::PCWSTR, punkcontext: *mut core::ffi::c_void, pstrdelimiter: windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32, ppdisp: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IActiveScriptParseProcedure64_Impl::ParseProcedureText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstrformalparams), core::mem::transmute(&pstrprocedurename), core::mem::transmute(&pstritemname), windows_core::from_raw_borrowed(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags)) { + match IActiveScriptParseProcedure64_Impl::ParseProcedureText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstrformalparams), core::mem::transmute(&pstrprocedurename), core::mem::transmute(&pstritemname), core::mem::transmute_copy(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppdisp.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1516,14 +1516,14 @@ pub struct IActiveScriptParseProcedureOld32_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IActiveScriptParseProcedureOld32_Impl: windows_core::IUnknownImpl { - fn ParseProcedureText(&self, pstrcode: &windows_core::PCWSTR, pstrformalparams: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: Option<&windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32) -> windows_core::Result; + fn ParseProcedureText(&self, pstrcode: &windows_core::PCWSTR, pstrformalparams: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: windows_core::Ref<'_, windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IActiveScriptParseProcedureOld32_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ParseProcedureText(this: *mut core::ffi::c_void, pstrcode: windows_core::PCWSTR, pstrformalparams: windows_core::PCWSTR, pstritemname: windows_core::PCWSTR, punkcontext: *mut core::ffi::c_void, pstrdelimiter: windows_core::PCWSTR, dwsourcecontextcookie: u32, ulstartinglinenumber: u32, dwflags: u32, ppdisp: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IActiveScriptParseProcedureOld32_Impl::ParseProcedureText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstrformalparams), core::mem::transmute(&pstritemname), windows_core::from_raw_borrowed(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags)) { + match IActiveScriptParseProcedureOld32_Impl::ParseProcedureText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstrformalparams), core::mem::transmute(&pstritemname), core::mem::transmute_copy(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppdisp.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1565,14 +1565,14 @@ pub struct IActiveScriptParseProcedureOld64_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IActiveScriptParseProcedureOld64_Impl: windows_core::IUnknownImpl { - fn ParseProcedureText(&self, pstrcode: &windows_core::PCWSTR, pstrformalparams: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: Option<&windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32) -> windows_core::Result; + fn ParseProcedureText(&self, pstrcode: &windows_core::PCWSTR, pstrformalparams: &windows_core::PCWSTR, pstritemname: &windows_core::PCWSTR, punkcontext: windows_core::Ref<'_, windows_core::IUnknown>, pstrdelimiter: &windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IActiveScriptParseProcedureOld64_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ParseProcedureText(this: *mut core::ffi::c_void, pstrcode: windows_core::PCWSTR, pstrformalparams: windows_core::PCWSTR, pstritemname: windows_core::PCWSTR, punkcontext: *mut core::ffi::c_void, pstrdelimiter: windows_core::PCWSTR, dwsourcecontextcookie: u64, ulstartinglinenumber: u32, dwflags: u32, ppdisp: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IActiveScriptParseProcedureOld64_Impl::ParseProcedureText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstrformalparams), core::mem::transmute(&pstritemname), windows_core::from_raw_borrowed(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags)) { + match IActiveScriptParseProcedureOld64_Impl::ParseProcedureText(this, core::mem::transmute(&pstrcode), core::mem::transmute(&pstrformalparams), core::mem::transmute(&pstritemname), core::mem::transmute_copy(&punkcontext), core::mem::transmute(&pstrdelimiter), core::mem::transmute_copy(&dwsourcecontextcookie), core::mem::transmute_copy(&ulstartinglinenumber), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppdisp.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1631,8 +1631,8 @@ pub struct IActiveScriptProfilerCallback_Vtbl { pub trait IActiveScriptProfilerCallback_Impl: windows_core::IUnknownImpl { fn Initialize(&self, dwcontext: u32) -> windows_core::Result<()>; fn Shutdown(&self, hrreason: windows_core::HRESULT) -> windows_core::Result<()>; - fn ScriptCompiled(&self, scriptid: i32, r#type: PROFILER_SCRIPT_TYPE, pidebugdocumentcontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn FunctionCompiled(&self, functionid: i32, scriptid: i32, pwszfunctionname: &windows_core::PCWSTR, pwszfunctionnamehint: &windows_core::PCWSTR, pidebugdocumentcontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ScriptCompiled(&self, scriptid: i32, r#type: PROFILER_SCRIPT_TYPE, pidebugdocumentcontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn FunctionCompiled(&self, functionid: i32, scriptid: i32, pwszfunctionname: &windows_core::PCWSTR, pwszfunctionnamehint: &windows_core::PCWSTR, pidebugdocumentcontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn OnFunctionEnter(&self, scriptid: i32, functionid: i32) -> windows_core::Result<()>; fn OnFunctionExit(&self, scriptid: i32, functionid: i32) -> windows_core::Result<()>; } @@ -1648,11 +1648,11 @@ impl IActiveScriptProfilerCallback_Vtbl { } unsafe extern "system" fn ScriptCompiled(this: *mut core::ffi::c_void, scriptid: i32, r#type: PROFILER_SCRIPT_TYPE, pidebugdocumentcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptProfilerCallback_Impl::ScriptCompiled(this, core::mem::transmute_copy(&scriptid), core::mem::transmute_copy(&r#type), windows_core::from_raw_borrowed(&pidebugdocumentcontext)).into() + IActiveScriptProfilerCallback_Impl::ScriptCompiled(this, core::mem::transmute_copy(&scriptid), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&pidebugdocumentcontext)).into() } unsafe extern "system" fn FunctionCompiled(this: *mut core::ffi::c_void, functionid: i32, scriptid: i32, pwszfunctionname: windows_core::PCWSTR, pwszfunctionnamehint: windows_core::PCWSTR, pidebugdocumentcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptProfilerCallback_Impl::FunctionCompiled(this, core::mem::transmute_copy(&functionid), core::mem::transmute_copy(&scriptid), core::mem::transmute(&pwszfunctionname), core::mem::transmute(&pwszfunctionnamehint), windows_core::from_raw_borrowed(&pidebugdocumentcontext)).into() + IActiveScriptProfilerCallback_Impl::FunctionCompiled(this, core::mem::transmute_copy(&functionid), core::mem::transmute_copy(&scriptid), core::mem::transmute(&pwszfunctionname), core::mem::transmute(&pwszfunctionnamehint), core::mem::transmute_copy(&pidebugdocumentcontext)).into() } unsafe extern "system" fn OnFunctionEnter(this: *mut core::ffi::c_void, scriptid: i32, functionid: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2192,11 +2192,11 @@ pub struct IActiveScriptSite_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IActiveScriptSite_Impl: windows_core::IUnknownImpl { fn GetLCID(&self) -> windows_core::Result; - fn GetItemInfo(&self, pstrname: &windows_core::PCWSTR, dwreturnmask: u32, ppiunkitem: *mut Option, ppti: *mut Option) -> windows_core::Result<()>; + fn GetItemInfo(&self, pstrname: &windows_core::PCWSTR, dwreturnmask: u32, ppiunkitem: windows_core::OutRef<'_, windows_core::IUnknown>, ppti: windows_core::OutRef<'_, super::super::super::Com::ITypeInfo>) -> windows_core::Result<()>; fn GetDocVersionString(&self) -> windows_core::Result; fn OnScriptTerminate(&self, pvarresult: *const super::super::super::Variant::VARIANT, pexcepinfo: *const super::super::super::Com::EXCEPINFO) -> windows_core::Result<()>; fn OnStateChange(&self, ssscriptstate: SCRIPTSTATE) -> windows_core::Result<()>; - fn OnScriptError(&self, pscripterror: Option<&IActiveScriptError>) -> windows_core::Result<()>; + fn OnScriptError(&self, pscripterror: windows_core::Ref<'_, IActiveScriptError>) -> windows_core::Result<()>; fn OnEnterScript(&self) -> windows_core::Result<()>; fn OnLeaveScript(&self) -> windows_core::Result<()>; } @@ -2237,7 +2237,7 @@ impl IActiveScriptSite_Vtbl { } unsafe extern "system" fn OnScriptError(this: *mut core::ffi::c_void, pscripterror: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptSite_Impl::OnScriptError(this, windows_core::from_raw_borrowed(&pscripterror)).into() + IActiveScriptSite_Impl::OnScriptError(this, core::mem::transmute_copy(&pscripterror)).into() } unsafe extern "system" fn OnEnterScript(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2299,7 +2299,7 @@ pub trait IActiveScriptSiteDebug32_Impl: windows_core::IUnknownImpl { fn GetDocumentContextFromPosition(&self, dwsourcecontext: u32, ucharacteroffset: u32, unumchars: u32) -> windows_core::Result; fn GetApplication(&self) -> windows_core::Result; fn GetRootApplicationNode(&self) -> windows_core::Result; - fn OnScriptErrorDebug(&self, perrordebug: Option<&IActiveScriptErrorDebug>, pfenterdebugger: *mut super::super::super::super::Foundation::BOOL, pfcallonscripterrorwhencontinuing: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnScriptErrorDebug(&self, perrordebug: windows_core::Ref<'_, IActiveScriptErrorDebug>, pfenterdebugger: *mut super::super::super::super::Foundation::BOOL, pfcallonscripterrorwhencontinuing: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IActiveScriptSiteDebug32_Vtbl { pub const fn new() -> Self { @@ -2335,7 +2335,7 @@ impl IActiveScriptSiteDebug32_Vtbl { } unsafe extern "system" fn OnScriptErrorDebug(this: *mut core::ffi::c_void, perrordebug: *mut core::ffi::c_void, pfenterdebugger: *mut super::super::super::super::Foundation::BOOL, pfcallonscripterrorwhencontinuing: *mut super::super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptSiteDebug32_Impl::OnScriptErrorDebug(this, windows_core::from_raw_borrowed(&perrordebug), core::mem::transmute_copy(&pfenterdebugger), core::mem::transmute_copy(&pfcallonscripterrorwhencontinuing)).into() + IActiveScriptSiteDebug32_Impl::OnScriptErrorDebug(this, core::mem::transmute_copy(&perrordebug), core::mem::transmute_copy(&pfenterdebugger), core::mem::transmute_copy(&pfcallonscripterrorwhencontinuing)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2384,7 +2384,7 @@ pub trait IActiveScriptSiteDebug64_Impl: windows_core::IUnknownImpl { fn GetDocumentContextFromPosition(&self, dwsourcecontext: u64, ucharacteroffset: u32, unumchars: u32) -> windows_core::Result; fn GetApplication(&self) -> windows_core::Result; fn GetRootApplicationNode(&self) -> windows_core::Result; - fn OnScriptErrorDebug(&self, perrordebug: Option<&IActiveScriptErrorDebug>, pfenterdebugger: *mut super::super::super::super::Foundation::BOOL, pfcallonscripterrorwhencontinuing: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnScriptErrorDebug(&self, perrordebug: windows_core::Ref<'_, IActiveScriptErrorDebug>, pfenterdebugger: *mut super::super::super::super::Foundation::BOOL, pfcallonscripterrorwhencontinuing: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IActiveScriptSiteDebug64_Vtbl { pub const fn new() -> Self { @@ -2420,7 +2420,7 @@ impl IActiveScriptSiteDebug64_Vtbl { } unsafe extern "system" fn OnScriptErrorDebug(this: *mut core::ffi::c_void, perrordebug: *mut core::ffi::c_void, pfenterdebugger: *mut super::super::super::super::Foundation::BOOL, pfcallonscripterrorwhencontinuing: *mut super::super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptSiteDebug64_Impl::OnScriptErrorDebug(this, windows_core::from_raw_borrowed(&perrordebug), core::mem::transmute_copy(&pfenterdebugger), core::mem::transmute_copy(&pfcallonscripterrorwhencontinuing)).into() + IActiveScriptSiteDebug64_Impl::OnScriptErrorDebug(this, core::mem::transmute_copy(&perrordebug), core::mem::transmute_copy(&pfenterdebugger), core::mem::transmute_copy(&pfcallonscripterrorwhencontinuing)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2452,13 +2452,13 @@ pub struct IActiveScriptSiteDebugEx_Vtbl { pub OnCanNotJITScriptErrorDebug: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut super::super::super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IActiveScriptSiteDebugEx_Impl: windows_core::IUnknownImpl { - fn OnCanNotJITScriptErrorDebug(&self, perrordebug: Option<&IActiveScriptErrorDebug>) -> windows_core::Result; + fn OnCanNotJITScriptErrorDebug(&self, perrordebug: windows_core::Ref<'_, IActiveScriptErrorDebug>) -> windows_core::Result; } impl IActiveScriptSiteDebugEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnCanNotJITScriptErrorDebug(this: *mut core::ffi::c_void, perrordebug: *mut core::ffi::c_void, pfcallonscripterrorwhencontinuing: *mut super::super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IActiveScriptSiteDebugEx_Impl::OnCanNotJITScriptErrorDebug(this, windows_core::from_raw_borrowed(&perrordebug)) { + match IActiveScriptSiteDebugEx_Impl::OnCanNotJITScriptErrorDebug(this, core::mem::transmute_copy(&perrordebug)) { Ok(ok__) => { pfcallonscripterrorwhencontinuing.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2718,14 +2718,14 @@ pub struct IActiveScriptTraceInfo_Vtbl { pub StopScriptTracing: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IActiveScriptTraceInfo_Impl: windows_core::IUnknownImpl { - fn StartScriptTracing(&self, psitetraceinfo: Option<&IActiveScriptSiteTraceInfo>, guidcontextid: &windows_core::GUID) -> windows_core::Result<()>; + fn StartScriptTracing(&self, psitetraceinfo: windows_core::Ref<'_, IActiveScriptSiteTraceInfo>, guidcontextid: &windows_core::GUID) -> windows_core::Result<()>; fn StopScriptTracing(&self) -> windows_core::Result<()>; } impl IActiveScriptTraceInfo_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartScriptTracing(this: *mut core::ffi::c_void, psitetraceinfo: *mut core::ffi::c_void, guidcontextid: windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IActiveScriptTraceInfo_Impl::StartScriptTracing(this, windows_core::from_raw_borrowed(&psitetraceinfo), core::mem::transmute(&guidcontextid)).into() + IActiveScriptTraceInfo_Impl::StartScriptTracing(this, core::mem::transmute_copy(&psitetraceinfo), core::mem::transmute(&guidcontextid)).into() } unsafe extern "system" fn StopScriptTracing(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2871,11 +2871,11 @@ pub struct IApplicationDebugger_Vtbl { } pub trait IApplicationDebugger_Impl: windows_core::IUnknownImpl { fn QueryAlive(&self) -> windows_core::Result<()>; - fn CreateInstanceAtDebugger(&self, rclsid: *const windows_core::GUID, punkouter: Option<&windows_core::IUnknown>, dwclscontext: u32, riid: *const windows_core::GUID) -> windows_core::Result; + fn CreateInstanceAtDebugger(&self, rclsid: *const windows_core::GUID, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, dwclscontext: u32, riid: *const windows_core::GUID) -> windows_core::Result; fn onDebugOutput(&self, pstr: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn onHandleBreakPoint(&self, prpt: Option<&IRemoteDebugApplicationThread>, br: BREAKREASON, perror: Option<&IActiveScriptErrorDebug>) -> windows_core::Result<()>; + fn onHandleBreakPoint(&self, prpt: windows_core::Ref<'_, IRemoteDebugApplicationThread>, br: BREAKREASON, perror: windows_core::Ref<'_, IActiveScriptErrorDebug>) -> windows_core::Result<()>; fn onClose(&self) -> windows_core::Result<()>; - fn onDebuggerEvent(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn onDebuggerEvent(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IApplicationDebugger_Vtbl { pub const fn new() -> Self { @@ -2885,7 +2885,7 @@ impl IApplicationDebugger_Vtbl { } unsafe extern "system" fn CreateInstanceAtDebugger(this: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, punkouter: *mut core::ffi::c_void, dwclscontext: u32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IApplicationDebugger_Impl::CreateInstanceAtDebugger(this, core::mem::transmute_copy(&rclsid), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid)) { + match IApplicationDebugger_Impl::CreateInstanceAtDebugger(this, core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppvobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2899,7 +2899,7 @@ impl IApplicationDebugger_Vtbl { } unsafe extern "system" fn onHandleBreakPoint(this: *mut core::ffi::c_void, prpt: *mut core::ffi::c_void, br: BREAKREASON, perror: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IApplicationDebugger_Impl::onHandleBreakPoint(this, windows_core::from_raw_borrowed(&prpt), core::mem::transmute_copy(&br), windows_core::from_raw_borrowed(&perror)).into() + IApplicationDebugger_Impl::onHandleBreakPoint(this, core::mem::transmute_copy(&prpt), core::mem::transmute_copy(&br), core::mem::transmute_copy(&perror)).into() } unsafe extern "system" fn onClose(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2907,7 +2907,7 @@ impl IApplicationDebugger_Vtbl { } unsafe extern "system" fn onDebuggerEvent(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IApplicationDebugger_Impl::onDebuggerEvent(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)).into() + IApplicationDebugger_Impl::onDebuggerEvent(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2947,18 +2947,18 @@ pub struct IApplicationDebuggerUI_Vtbl { pub BringDocumentContextToTop: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IApplicationDebuggerUI_Impl: windows_core::IUnknownImpl { - fn BringDocumentToTop(&self, pddt: Option<&IDebugDocumentText>) -> windows_core::Result<()>; - fn BringDocumentContextToTop(&self, pddc: Option<&IDebugDocumentContext>) -> windows_core::Result<()>; + fn BringDocumentToTop(&self, pddt: windows_core::Ref<'_, IDebugDocumentText>) -> windows_core::Result<()>; + fn BringDocumentContextToTop(&self, pddc: windows_core::Ref<'_, IDebugDocumentContext>) -> windows_core::Result<()>; } impl IApplicationDebuggerUI_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BringDocumentToTop(this: *mut core::ffi::c_void, pddt: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IApplicationDebuggerUI_Impl::BringDocumentToTop(this, windows_core::from_raw_borrowed(&pddt)).into() + IApplicationDebuggerUI_Impl::BringDocumentToTop(this, core::mem::transmute_copy(&pddt)).into() } unsafe extern "system" fn BringDocumentContextToTop(this: *mut core::ffi::c_void, pddc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IApplicationDebuggerUI_Impl::BringDocumentContextToTop(this, windows_core::from_raw_borrowed(&pddc)).into() + IApplicationDebuggerUI_Impl::BringDocumentContextToTop(this, core::mem::transmute_copy(&pddc)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2993,14 +2993,14 @@ pub struct IBindEventHandler_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IBindEventHandler_Impl: windows_core::IUnknownImpl { - fn BindHandler(&self, pstrevent: &windows_core::PCWSTR, pdisp: Option<&super::super::super::Com::IDispatch>) -> windows_core::Result<()>; + fn BindHandler(&self, pstrevent: &windows_core::PCWSTR, pdisp: windows_core::Ref<'_, super::super::super::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IBindEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BindHandler(this: *mut core::ffi::c_void, pstrevent: windows_core::PCWSTR, pdisp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindEventHandler_Impl::BindHandler(this, core::mem::transmute(&pstrevent), windows_core::from_raw_borrowed(&pdisp)).into() + IBindEventHandler_Impl::BindHandler(this, core::mem::transmute(&pstrevent), core::mem::transmute_copy(&pdisp)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), BindHandler: BindHandler:: } } @@ -3044,19 +3044,19 @@ pub struct IDebugApplication11032_Vtbl { pub CallableWaitForHandles: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::super::super::Foundation::HANDLE, *mut u32) -> windows_core::HRESULT, } pub trait IDebugApplication11032_Impl: IRemoteDebugApplication110_Impl { - fn SynchronousCallInMainThread(&self, pptc: Option<&IDebugThreadCall32>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; - fn AsynchronousCallInMainThread(&self, pptc: Option<&IDebugThreadCall32>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; + fn SynchronousCallInMainThread(&self, pptc: windows_core::Ref<'_, IDebugThreadCall32>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; + fn AsynchronousCallInMainThread(&self, pptc: windows_core::Ref<'_, IDebugThreadCall32>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; fn CallableWaitForHandles(&self, handlecount: u32, phandles: *const super::super::super::super::Foundation::HANDLE) -> windows_core::Result; } impl IDebugApplication11032_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SynchronousCallInMainThread(this: *mut core::ffi::c_void, pptc: *mut core::ffi::c_void, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication11032_Impl::SynchronousCallInMainThread(this, windows_core::from_raw_borrowed(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplication11032_Impl::SynchronousCallInMainThread(this, core::mem::transmute_copy(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } unsafe extern "system" fn AsynchronousCallInMainThread(this: *mut core::ffi::c_void, pptc: *mut core::ffi::c_void, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication11032_Impl::AsynchronousCallInMainThread(this, windows_core::from_raw_borrowed(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplication11032_Impl::AsynchronousCallInMainThread(this, core::mem::transmute_copy(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } unsafe extern "system" fn CallableWaitForHandles(this: *mut core::ffi::c_void, handlecount: u32, phandles: *const super::super::super::super::Foundation::HANDLE, pindex: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3114,19 +3114,19 @@ pub struct IDebugApplication11064_Vtbl { pub CallableWaitForHandles: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const super::super::super::super::Foundation::HANDLE, *mut u32) -> windows_core::HRESULT, } pub trait IDebugApplication11064_Impl: IRemoteDebugApplication110_Impl { - fn SynchronousCallInMainThread(&self, pptc: Option<&IDebugThreadCall64>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; - fn AsynchronousCallInMainThread(&self, pptc: Option<&IDebugThreadCall64>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; + fn SynchronousCallInMainThread(&self, pptc: windows_core::Ref<'_, IDebugThreadCall64>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; + fn AsynchronousCallInMainThread(&self, pptc: windows_core::Ref<'_, IDebugThreadCall64>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; fn CallableWaitForHandles(&self, handlecount: u32, phandles: *const super::super::super::super::Foundation::HANDLE) -> windows_core::Result; } impl IDebugApplication11064_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SynchronousCallInMainThread(this: *mut core::ffi::c_void, pptc: *mut core::ffi::c_void, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication11064_Impl::SynchronousCallInMainThread(this, windows_core::from_raw_borrowed(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplication11064_Impl::SynchronousCallInMainThread(this, core::mem::transmute_copy(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } unsafe extern "system" fn AsynchronousCallInMainThread(this: *mut core::ffi::c_void, pptc: *mut core::ffi::c_void, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication11064_Impl::AsynchronousCallInMainThread(this, windows_core::from_raw_borrowed(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplication11064_Impl::AsynchronousCallInMainThread(this, core::mem::transmute_copy(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } unsafe extern "system" fn CallableWaitForHandles(this: *mut core::ffi::c_void, handlecount: u32, phandles: *const super::super::super::super::Foundation::HANDLE, pindex: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3282,19 +3282,19 @@ pub trait IDebugApplication32_Impl: IRemoteDebugApplication_Impl { fn StartDebugSession(&self) -> windows_core::Result<()>; fn HandleBreakPoint(&self, br: BREAKREASON) -> windows_core::Result; fn Close(&self) -> windows_core::Result<()>; - fn GetBreakFlags(&self, pabf: *mut u32, pprdatsteppingthread: *mut Option) -> windows_core::Result<()>; + fn GetBreakFlags(&self, pabf: *mut u32, pprdatsteppingthread: windows_core::OutRef<'_, IRemoteDebugApplicationThread>) -> windows_core::Result<()>; fn GetCurrentThread(&self) -> windows_core::Result; - fn CreateAsyncDebugOperation(&self, psdo: Option<&IDebugSyncOperation>) -> windows_core::Result; - fn AddStackFrameSniffer(&self, pdsfs: Option<&IDebugStackFrameSniffer>) -> windows_core::Result; + fn CreateAsyncDebugOperation(&self, psdo: windows_core::Ref<'_, IDebugSyncOperation>) -> windows_core::Result; + fn AddStackFrameSniffer(&self, pdsfs: windows_core::Ref<'_, IDebugStackFrameSniffer>) -> windows_core::Result; fn RemoveStackFrameSniffer(&self, dwcookie: u32) -> windows_core::Result<()>; fn QueryCurrentThreadIsDebuggerThread(&self) -> windows_core::Result<()>; - fn SynchronousCallInDebuggerThread(&self, pptc: Option<&IDebugThreadCall32>, dwparam1: u32, dwparam2: u32, dwparam3: u32) -> windows_core::Result<()>; + fn SynchronousCallInDebuggerThread(&self, pptc: windows_core::Ref<'_, IDebugThreadCall32>, dwparam1: u32, dwparam2: u32, dwparam3: u32) -> windows_core::Result<()>; fn CreateApplicationNode(&self) -> windows_core::Result; - fn FireDebuggerEvent(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn HandleRuntimeError(&self, perrordebug: Option<&IActiveScriptErrorDebug>, pscriptsite: Option<&IActiveScriptSite>, pbra: *mut BREAKRESUMEACTION, perra: *mut ERRORRESUMEACTION, pfcallonscripterror: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn FireDebuggerEvent(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn HandleRuntimeError(&self, perrordebug: windows_core::Ref<'_, IActiveScriptErrorDebug>, pscriptsite: windows_core::Ref<'_, IActiveScriptSite>, pbra: *mut BREAKRESUMEACTION, perra: *mut ERRORRESUMEACTION, pfcallonscripterror: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn FCanJitDebug(&self) -> super::super::super::super::Foundation::BOOL; fn FIsAutoJitDebugEnabled(&self) -> super::super::super::super::Foundation::BOOL; - fn AddGlobalExpressionContextProvider(&self, pdsfs: Option<&IProvideExpressionContexts>) -> windows_core::Result; + fn AddGlobalExpressionContextProvider(&self, pdsfs: windows_core::Ref<'_, IProvideExpressionContexts>) -> windows_core::Result; fn RemoveGlobalExpressionContextProvider(&self, dwcookie: u32) -> windows_core::Result<()>; } impl IDebugApplication32_Vtbl { @@ -3345,7 +3345,7 @@ impl IDebugApplication32_Vtbl { } unsafe extern "system" fn CreateAsyncDebugOperation(this: *mut core::ffi::c_void, psdo: *mut core::ffi::c_void, ppado: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugApplication32_Impl::CreateAsyncDebugOperation(this, windows_core::from_raw_borrowed(&psdo)) { + match IDebugApplication32_Impl::CreateAsyncDebugOperation(this, core::mem::transmute_copy(&psdo)) { Ok(ok__) => { ppado.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3355,7 +3355,7 @@ impl IDebugApplication32_Vtbl { } unsafe extern "system" fn AddStackFrameSniffer(this: *mut core::ffi::c_void, pdsfs: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugApplication32_Impl::AddStackFrameSniffer(this, windows_core::from_raw_borrowed(&pdsfs)) { + match IDebugApplication32_Impl::AddStackFrameSniffer(this, core::mem::transmute_copy(&pdsfs)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3373,7 +3373,7 @@ impl IDebugApplication32_Vtbl { } unsafe extern "system" fn SynchronousCallInDebuggerThread(this: *mut core::ffi::c_void, pptc: *mut core::ffi::c_void, dwparam1: u32, dwparam2: u32, dwparam3: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication32_Impl::SynchronousCallInDebuggerThread(this, windows_core::from_raw_borrowed(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplication32_Impl::SynchronousCallInDebuggerThread(this, core::mem::transmute_copy(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } unsafe extern "system" fn CreateApplicationNode(this: *mut core::ffi::c_void, ppdannew: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3387,11 +3387,11 @@ impl IDebugApplication32_Vtbl { } unsafe extern "system" fn FireDebuggerEvent(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication32_Impl::FireDebuggerEvent(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)).into() + IDebugApplication32_Impl::FireDebuggerEvent(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn HandleRuntimeError(this: *mut core::ffi::c_void, perrordebug: *mut core::ffi::c_void, pscriptsite: *mut core::ffi::c_void, pbra: *mut BREAKRESUMEACTION, perra: *mut ERRORRESUMEACTION, pfcallonscripterror: *mut super::super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication32_Impl::HandleRuntimeError(this, windows_core::from_raw_borrowed(&perrordebug), windows_core::from_raw_borrowed(&pscriptsite), core::mem::transmute_copy(&pbra), core::mem::transmute_copy(&perra), core::mem::transmute_copy(&pfcallonscripterror)).into() + IDebugApplication32_Impl::HandleRuntimeError(this, core::mem::transmute_copy(&perrordebug), core::mem::transmute_copy(&pscriptsite), core::mem::transmute_copy(&pbra), core::mem::transmute_copy(&perra), core::mem::transmute_copy(&pfcallonscripterror)).into() } unsafe extern "system" fn FCanJitDebug(this: *mut core::ffi::c_void) -> super::super::super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3403,7 +3403,7 @@ impl IDebugApplication32_Vtbl { } unsafe extern "system" fn AddGlobalExpressionContextProvider(this: *mut core::ffi::c_void, pdsfs: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugApplication32_Impl::AddGlobalExpressionContextProvider(this, windows_core::from_raw_borrowed(&pdsfs)) { + match IDebugApplication32_Impl::AddGlobalExpressionContextProvider(this, core::mem::transmute_copy(&pdsfs)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3576,19 +3576,19 @@ pub trait IDebugApplication64_Impl: IRemoteDebugApplication_Impl { fn StartDebugSession(&self) -> windows_core::Result<()>; fn HandleBreakPoint(&self, br: BREAKREASON) -> windows_core::Result; fn Close(&self) -> windows_core::Result<()>; - fn GetBreakFlags(&self, pabf: *mut u32, pprdatsteppingthread: *mut Option) -> windows_core::Result<()>; + fn GetBreakFlags(&self, pabf: *mut u32, pprdatsteppingthread: windows_core::OutRef<'_, IRemoteDebugApplicationThread>) -> windows_core::Result<()>; fn GetCurrentThread(&self) -> windows_core::Result; - fn CreateAsyncDebugOperation(&self, psdo: Option<&IDebugSyncOperation>) -> windows_core::Result; - fn AddStackFrameSniffer(&self, pdsfs: Option<&IDebugStackFrameSniffer>) -> windows_core::Result; + fn CreateAsyncDebugOperation(&self, psdo: windows_core::Ref<'_, IDebugSyncOperation>) -> windows_core::Result; + fn AddStackFrameSniffer(&self, pdsfs: windows_core::Ref<'_, IDebugStackFrameSniffer>) -> windows_core::Result; fn RemoveStackFrameSniffer(&self, dwcookie: u32) -> windows_core::Result<()>; fn QueryCurrentThreadIsDebuggerThread(&self) -> windows_core::Result<()>; - fn SynchronousCallInDebuggerThread(&self, pptc: Option<&IDebugThreadCall64>, dwparam1: u64, dwparam2: u64, dwparam3: u64) -> windows_core::Result<()>; + fn SynchronousCallInDebuggerThread(&self, pptc: windows_core::Ref<'_, IDebugThreadCall64>, dwparam1: u64, dwparam2: u64, dwparam3: u64) -> windows_core::Result<()>; fn CreateApplicationNode(&self) -> windows_core::Result; - fn FireDebuggerEvent(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn HandleRuntimeError(&self, perrordebug: Option<&IActiveScriptErrorDebug>, pscriptsite: Option<&IActiveScriptSite>, pbra: *mut BREAKRESUMEACTION, perra: *mut ERRORRESUMEACTION, pfcallonscripterror: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn FireDebuggerEvent(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn HandleRuntimeError(&self, perrordebug: windows_core::Ref<'_, IActiveScriptErrorDebug>, pscriptsite: windows_core::Ref<'_, IActiveScriptSite>, pbra: *mut BREAKRESUMEACTION, perra: *mut ERRORRESUMEACTION, pfcallonscripterror: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn FCanJitDebug(&self) -> super::super::super::super::Foundation::BOOL; fn FIsAutoJitDebugEnabled(&self) -> super::super::super::super::Foundation::BOOL; - fn AddGlobalExpressionContextProvider(&self, pdsfs: Option<&IProvideExpressionContexts>) -> windows_core::Result; + fn AddGlobalExpressionContextProvider(&self, pdsfs: windows_core::Ref<'_, IProvideExpressionContexts>) -> windows_core::Result; fn RemoveGlobalExpressionContextProvider(&self, dwcookie: u64) -> windows_core::Result<()>; } impl IDebugApplication64_Vtbl { @@ -3639,7 +3639,7 @@ impl IDebugApplication64_Vtbl { } unsafe extern "system" fn CreateAsyncDebugOperation(this: *mut core::ffi::c_void, psdo: *mut core::ffi::c_void, ppado: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugApplication64_Impl::CreateAsyncDebugOperation(this, windows_core::from_raw_borrowed(&psdo)) { + match IDebugApplication64_Impl::CreateAsyncDebugOperation(this, core::mem::transmute_copy(&psdo)) { Ok(ok__) => { ppado.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3649,7 +3649,7 @@ impl IDebugApplication64_Vtbl { } unsafe extern "system" fn AddStackFrameSniffer(this: *mut core::ffi::c_void, pdsfs: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugApplication64_Impl::AddStackFrameSniffer(this, windows_core::from_raw_borrowed(&pdsfs)) { + match IDebugApplication64_Impl::AddStackFrameSniffer(this, core::mem::transmute_copy(&pdsfs)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3667,7 +3667,7 @@ impl IDebugApplication64_Vtbl { } unsafe extern "system" fn SynchronousCallInDebuggerThread(this: *mut core::ffi::c_void, pptc: *mut core::ffi::c_void, dwparam1: u64, dwparam2: u64, dwparam3: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication64_Impl::SynchronousCallInDebuggerThread(this, windows_core::from_raw_borrowed(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplication64_Impl::SynchronousCallInDebuggerThread(this, core::mem::transmute_copy(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } unsafe extern "system" fn CreateApplicationNode(this: *mut core::ffi::c_void, ppdannew: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3681,11 +3681,11 @@ impl IDebugApplication64_Vtbl { } unsafe extern "system" fn FireDebuggerEvent(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication64_Impl::FireDebuggerEvent(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)).into() + IDebugApplication64_Impl::FireDebuggerEvent(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn HandleRuntimeError(this: *mut core::ffi::c_void, perrordebug: *mut core::ffi::c_void, pscriptsite: *mut core::ffi::c_void, pbra: *mut BREAKRESUMEACTION, perra: *mut ERRORRESUMEACTION, pfcallonscripterror: *mut super::super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplication64_Impl::HandleRuntimeError(this, windows_core::from_raw_borrowed(&perrordebug), windows_core::from_raw_borrowed(&pscriptsite), core::mem::transmute_copy(&pbra), core::mem::transmute_copy(&perra), core::mem::transmute_copy(&pfcallonscripterror)).into() + IDebugApplication64_Impl::HandleRuntimeError(this, core::mem::transmute_copy(&perrordebug), core::mem::transmute_copy(&pscriptsite), core::mem::transmute_copy(&pbra), core::mem::transmute_copy(&perra), core::mem::transmute_copy(&pfcallonscripterror)).into() } unsafe extern "system" fn FCanJitDebug(this: *mut core::ffi::c_void) -> super::super::super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3697,7 +3697,7 @@ impl IDebugApplication64_Vtbl { } unsafe extern "system" fn AddGlobalExpressionContextProvider(this: *mut core::ffi::c_void, pdsfs: *mut core::ffi::c_void, pdwcookie: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugApplication64_Impl::AddGlobalExpressionContextProvider(this, windows_core::from_raw_borrowed(&pdsfs)) { + match IDebugApplication64_Impl::AddGlobalExpressionContextProvider(this, core::mem::transmute_copy(&pdsfs)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3787,9 +3787,9 @@ pub struct IDebugApplicationNode_Vtbl { pub trait IDebugApplicationNode_Impl: IDebugDocumentProvider_Impl { fn EnumChildren(&self) -> windows_core::Result; fn GetParent(&self) -> windows_core::Result; - fn SetDocumentProvider(&self, pddp: Option<&IDebugDocumentProvider>) -> windows_core::Result<()>; + fn SetDocumentProvider(&self, pddp: windows_core::Ref<'_, IDebugDocumentProvider>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; - fn Attach(&self, pdanparent: Option<&IDebugApplicationNode>) -> windows_core::Result<()>; + fn Attach(&self, pdanparent: windows_core::Ref<'_, IDebugApplicationNode>) -> windows_core::Result<()>; fn Detach(&self) -> windows_core::Result<()>; } impl IDebugApplicationNode_Vtbl { @@ -3816,7 +3816,7 @@ impl IDebugApplicationNode_Vtbl { } unsafe extern "system" fn SetDocumentProvider(this: *mut core::ffi::c_void, pddp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationNode_Impl::SetDocumentProvider(this, windows_core::from_raw_borrowed(&pddp)).into() + IDebugApplicationNode_Impl::SetDocumentProvider(this, core::mem::transmute_copy(&pddp)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3824,7 +3824,7 @@ impl IDebugApplicationNode_Vtbl { } unsafe extern "system" fn Attach(this: *mut core::ffi::c_void, pdanparent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationNode_Impl::Attach(this, windows_core::from_raw_borrowed(&pdanparent)).into() + IDebugApplicationNode_Impl::Attach(this, core::mem::transmute_copy(&pdanparent)).into() } unsafe extern "system" fn Detach(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3872,7 +3872,7 @@ pub struct IDebugApplicationNode100_Vtbl { pub trait IDebugApplicationNode100_Impl: windows_core::IUnknownImpl { fn SetFilterForEventSink(&self, dwcookie: u32, filter: APPLICATION_NODE_EVENT_FILTER) -> windows_core::Result<()>; fn GetExcludedDocuments(&self, filter: APPLICATION_NODE_EVENT_FILTER) -> windows_core::Result; - fn QueryIsChildNode(&self, psearchkey: Option<&IDebugDocument>) -> windows_core::Result<()>; + fn QueryIsChildNode(&self, psearchkey: windows_core::Ref<'_, IDebugDocument>) -> windows_core::Result<()>; } impl IDebugApplicationNode100_Vtbl { pub const fn new() -> Self { @@ -3892,7 +3892,7 @@ impl IDebugApplicationNode100_Vtbl { } unsafe extern "system" fn QueryIsChildNode(this: *mut core::ffi::c_void, psearchkey: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationNode100_Impl::QueryIsChildNode(this, windows_core::from_raw_borrowed(&psearchkey)).into() + IDebugApplicationNode100_Impl::QueryIsChildNode(this, core::mem::transmute_copy(&psearchkey)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3940,20 +3940,20 @@ pub struct IDebugApplicationNodeEvents_Vtbl { pub onAttach: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugApplicationNodeEvents_Impl: windows_core::IUnknownImpl { - fn onAddChild(&self, prddpchild: Option<&IDebugApplicationNode>) -> windows_core::Result<()>; - fn onRemoveChild(&self, prddpchild: Option<&IDebugApplicationNode>) -> windows_core::Result<()>; + fn onAddChild(&self, prddpchild: windows_core::Ref<'_, IDebugApplicationNode>) -> windows_core::Result<()>; + fn onRemoveChild(&self, prddpchild: windows_core::Ref<'_, IDebugApplicationNode>) -> windows_core::Result<()>; fn onDetach(&self) -> windows_core::Result<()>; - fn onAttach(&self, prddpparent: Option<&IDebugApplicationNode>) -> windows_core::Result<()>; + fn onAttach(&self, prddpparent: windows_core::Ref<'_, IDebugApplicationNode>) -> windows_core::Result<()>; } impl IDebugApplicationNodeEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn onAddChild(this: *mut core::ffi::c_void, prddpchild: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationNodeEvents_Impl::onAddChild(this, windows_core::from_raw_borrowed(&prddpchild)).into() + IDebugApplicationNodeEvents_Impl::onAddChild(this, core::mem::transmute_copy(&prddpchild)).into() } unsafe extern "system" fn onRemoveChild(this: *mut core::ffi::c_void, prddpchild: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationNodeEvents_Impl::onRemoveChild(this, windows_core::from_raw_borrowed(&prddpchild)).into() + IDebugApplicationNodeEvents_Impl::onRemoveChild(this, core::mem::transmute_copy(&prddpchild)).into() } unsafe extern "system" fn onDetach(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3961,7 +3961,7 @@ impl IDebugApplicationNodeEvents_Vtbl { } unsafe extern "system" fn onAttach(this: *mut core::ffi::c_void, prddpparent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationNodeEvents_Impl::onAttach(this, windows_core::from_raw_borrowed(&prddpparent)).into() + IDebugApplicationNodeEvents_Impl::onAttach(this, core::mem::transmute_copy(&prddpparent)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4020,7 +4020,7 @@ pub struct IDebugApplicationThread_Vtbl { pub SetStateString: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT, } pub trait IDebugApplicationThread_Impl: IRemoteDebugApplicationThread_Impl { - fn SynchronousCallIntoThread32(&self, pstcb: Option<&IDebugThreadCall32>, dwparam1: u32, dwparam2: u32, dwparam3: u32) -> windows_core::Result<()>; + fn SynchronousCallIntoThread32(&self, pstcb: windows_core::Ref<'_, IDebugThreadCall32>, dwparam1: u32, dwparam2: u32, dwparam3: u32) -> windows_core::Result<()>; fn QueryIsCurrentThread(&self) -> windows_core::Result<()>; fn QueryIsDebuggerThread(&self) -> windows_core::Result<()>; fn SetDescription(&self, pstrdescription: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -4030,7 +4030,7 @@ impl IDebugApplicationThread_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SynchronousCallIntoThread32(this: *mut core::ffi::c_void, pstcb: *mut core::ffi::c_void, dwparam1: u32, dwparam2: u32, dwparam3: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationThread_Impl::SynchronousCallIntoThread32(this, windows_core::from_raw_borrowed(&pstcb), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplicationThread_Impl::SynchronousCallIntoThread32(this, core::mem::transmute_copy(&pstcb), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } unsafe extern "system" fn QueryIsCurrentThread(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4096,7 +4096,7 @@ pub trait IDebugApplicationThread11032_Impl: windows_core::IUnknownImpl { fn GetActiveThreadRequestCount(&self) -> windows_core::Result; fn IsSuspendedForBreakPoint(&self) -> windows_core::Result; fn IsThreadCallable(&self) -> windows_core::Result; - fn AsynchronousCallIntoThread(&self, pptc: Option<&IDebugThreadCall32>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; + fn AsynchronousCallIntoThread(&self, pptc: windows_core::Ref<'_, IDebugThreadCall32>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; } impl IDebugApplicationThread11032_Vtbl { pub const fn new() -> Self { @@ -4132,7 +4132,7 @@ impl IDebugApplicationThread11032_Vtbl { } unsafe extern "system" fn AsynchronousCallIntoThread(this: *mut core::ffi::c_void, pptc: *mut core::ffi::c_void, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationThread11032_Impl::AsynchronousCallIntoThread(this, windows_core::from_raw_borrowed(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplicationThread11032_Impl::AsynchronousCallIntoThread(this, core::mem::transmute_copy(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4181,7 +4181,7 @@ pub trait IDebugApplicationThread11064_Impl: windows_core::IUnknownImpl { fn GetActiveThreadRequestCount(&self) -> windows_core::Result; fn IsSuspendedForBreakPoint(&self) -> windows_core::Result; fn IsThreadCallable(&self) -> windows_core::Result; - fn AsynchronousCallIntoThread(&self, pptc: Option<&IDebugThreadCall64>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; + fn AsynchronousCallIntoThread(&self, pptc: windows_core::Ref<'_, IDebugThreadCall64>, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::Result<()>; } impl IDebugApplicationThread11064_Vtbl { pub const fn new() -> Self { @@ -4217,7 +4217,7 @@ impl IDebugApplicationThread11064_Vtbl { } unsafe extern "system" fn AsynchronousCallIntoThread(this: *mut core::ffi::c_void, pptc: *mut core::ffi::c_void, dwparam1: usize, dwparam2: usize, dwparam3: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationThread11064_Impl::AsynchronousCallIntoThread(this, windows_core::from_raw_borrowed(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplicationThread11064_Impl::AsynchronousCallIntoThread(this, core::mem::transmute_copy(&pptc), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4254,13 +4254,13 @@ pub struct IDebugApplicationThread64_Vtbl { pub SynchronousCallIntoThread64: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64, u64, u64) -> windows_core::HRESULT, } pub trait IDebugApplicationThread64_Impl: IDebugApplicationThread_Impl { - fn SynchronousCallIntoThread64(&self, pstcb: Option<&IDebugThreadCall64>, dwparam1: u64, dwparam2: u64, dwparam3: u64) -> windows_core::Result<()>; + fn SynchronousCallIntoThread64(&self, pstcb: windows_core::Ref<'_, IDebugThreadCall64>, dwparam1: u64, dwparam2: u64, dwparam3: u64) -> windows_core::Result<()>; } impl IDebugApplicationThread64_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SynchronousCallIntoThread64(this: *mut core::ffi::c_void, pstcb: *mut core::ffi::c_void, dwparam1: u64, dwparam2: u64, dwparam3: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugApplicationThread64_Impl::SynchronousCallIntoThread64(this, windows_core::from_raw_borrowed(&pstcb), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() + IDebugApplicationThread64_Impl::SynchronousCallIntoThread64(this, core::mem::transmute_copy(&pstcb), core::mem::transmute_copy(&dwparam1), core::mem::transmute_copy(&dwparam2), core::mem::transmute_copy(&dwparam3)).into() } Self { base__: IDebugApplicationThread_Vtbl::new::(), SynchronousCallIntoThread64: SynchronousCallIntoThread64:: } } @@ -4364,10 +4364,10 @@ pub struct IDebugAsyncOperation_Vtbl { } pub trait IDebugAsyncOperation_Impl: windows_core::IUnknownImpl { fn GetSyncDebugOperation(&self) -> windows_core::Result; - fn Start(&self, padocb: Option<&IDebugAsyncOperationCallBack>) -> windows_core::Result<()>; + fn Start(&self, padocb: windows_core::Ref<'_, IDebugAsyncOperationCallBack>) -> windows_core::Result<()>; fn Abort(&self) -> windows_core::Result<()>; fn QueryIsComplete(&self) -> windows_core::Result<()>; - fn GetResult(&self, phrresult: *mut windows_core::HRESULT, ppunkresult: *mut Option) -> windows_core::Result<()>; + fn GetResult(&self, phrresult: *mut windows_core::HRESULT, ppunkresult: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IDebugAsyncOperation_Vtbl { pub const fn new() -> Self { @@ -4383,7 +4383,7 @@ impl IDebugAsyncOperation_Vtbl { } unsafe extern "system" fn Start(this: *mut core::ffi::c_void, padocb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugAsyncOperation_Impl::Start(this, windows_core::from_raw_borrowed(&padocb)).into() + IDebugAsyncOperation_Impl::Start(this, core::mem::transmute_copy(&padocb)).into() } unsafe extern "system" fn Abort(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4705,34 +4705,34 @@ pub struct IDebugDocumentHelper32_Vtbl { pub BringDocumentContextToTop: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugDocumentHelper32_Impl: windows_core::IUnknownImpl { - fn Init(&self, pda: Option<&IDebugApplication32>, pszshortname: &windows_core::PCWSTR, pszlongname: &windows_core::PCWSTR, docattr: u32) -> windows_core::Result<()>; - fn Attach(&self, pddhparent: Option<&IDebugDocumentHelper32>) -> windows_core::Result<()>; + fn Init(&self, pda: windows_core::Ref<'_, IDebugApplication32>, pszshortname: &windows_core::PCWSTR, pszlongname: &windows_core::PCWSTR, docattr: u32) -> windows_core::Result<()>; + fn Attach(&self, pddhparent: windows_core::Ref<'_, IDebugDocumentHelper32>) -> windows_core::Result<()>; fn Detach(&self) -> windows_core::Result<()>; fn AddUnicodeText(&self, psztext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn AddDBCSText(&self, psztext: &windows_core::PCSTR) -> windows_core::Result<()>; - fn SetDebugDocumentHost(&self, pddh: Option<&IDebugDocumentHost>) -> windows_core::Result<()>; + fn SetDebugDocumentHost(&self, pddh: windows_core::Ref<'_, IDebugDocumentHost>) -> windows_core::Result<()>; fn AddDeferredText(&self, cchars: u32, dwtextstartcookie: u32) -> windows_core::Result<()>; - fn DefineScriptBlock(&self, ulcharoffset: u32, cchars: u32, pas: Option<&IActiveScript>, fscriptlet: super::super::super::super::Foundation::BOOL) -> windows_core::Result; + fn DefineScriptBlock(&self, ulcharoffset: u32, cchars: u32, pas: windows_core::Ref<'_, IActiveScript>, fscriptlet: super::super::super::super::Foundation::BOOL) -> windows_core::Result; fn SetDefaultTextAttr(&self, statextattr: u16) -> windows_core::Result<()>; fn SetTextAttributes(&self, ulcharoffset: u32, cchars: u32, pstatextattr: *const u16) -> windows_core::Result<()>; fn SetLongName(&self, pszlongname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetShortName(&self, pszshortname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetDocumentAttr(&self, pszattributes: u32) -> windows_core::Result<()>; fn GetDebugApplicationNode(&self) -> windows_core::Result; - fn GetScriptBlockInfo(&self, dwsourcecontext: u32, ppasd: *mut Option, picharpos: *mut u32, pcchars: *mut u32) -> windows_core::Result<()>; + fn GetScriptBlockInfo(&self, dwsourcecontext: u32, ppasd: windows_core::OutRef<'_, IActiveScript>, picharpos: *mut u32, pcchars: *mut u32) -> windows_core::Result<()>; fn CreateDebugDocumentContext(&self, icharpos: u32, cchars: u32) -> windows_core::Result; fn BringDocumentToTop(&self) -> windows_core::Result<()>; - fn BringDocumentContextToTop(&self, pddc: Option<&IDebugDocumentContext>) -> windows_core::Result<()>; + fn BringDocumentContextToTop(&self, pddc: windows_core::Ref<'_, IDebugDocumentContext>) -> windows_core::Result<()>; } impl IDebugDocumentHelper32_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, pda: *mut core::ffi::c_void, pszshortname: windows_core::PCWSTR, pszlongname: windows_core::PCWSTR, docattr: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentHelper32_Impl::Init(this, windows_core::from_raw_borrowed(&pda), core::mem::transmute(&pszshortname), core::mem::transmute(&pszlongname), core::mem::transmute_copy(&docattr)).into() + IDebugDocumentHelper32_Impl::Init(this, core::mem::transmute_copy(&pda), core::mem::transmute(&pszshortname), core::mem::transmute(&pszlongname), core::mem::transmute_copy(&docattr)).into() } unsafe extern "system" fn Attach(this: *mut core::ffi::c_void, pddhparent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentHelper32_Impl::Attach(this, windows_core::from_raw_borrowed(&pddhparent)).into() + IDebugDocumentHelper32_Impl::Attach(this, core::mem::transmute_copy(&pddhparent)).into() } unsafe extern "system" fn Detach(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4748,7 +4748,7 @@ impl IDebugDocumentHelper32_Vtbl { } unsafe extern "system" fn SetDebugDocumentHost(this: *mut core::ffi::c_void, pddh: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentHelper32_Impl::SetDebugDocumentHost(this, windows_core::from_raw_borrowed(&pddh)).into() + IDebugDocumentHelper32_Impl::SetDebugDocumentHost(this, core::mem::transmute_copy(&pddh)).into() } unsafe extern "system" fn AddDeferredText(this: *mut core::ffi::c_void, cchars: u32, dwtextstartcookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4756,7 +4756,7 @@ impl IDebugDocumentHelper32_Vtbl { } unsafe extern "system" fn DefineScriptBlock(this: *mut core::ffi::c_void, ulcharoffset: u32, cchars: u32, pas: *mut core::ffi::c_void, fscriptlet: super::super::super::super::Foundation::BOOL, pdwsourcecontext: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugDocumentHelper32_Impl::DefineScriptBlock(this, core::mem::transmute_copy(&ulcharoffset), core::mem::transmute_copy(&cchars), windows_core::from_raw_borrowed(&pas), core::mem::transmute_copy(&fscriptlet)) { + match IDebugDocumentHelper32_Impl::DefineScriptBlock(this, core::mem::transmute_copy(&ulcharoffset), core::mem::transmute_copy(&cchars), core::mem::transmute_copy(&pas), core::mem::transmute_copy(&fscriptlet)) { Ok(ok__) => { pdwsourcecontext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4814,7 +4814,7 @@ impl IDebugDocumentHelper32_Vtbl { } unsafe extern "system" fn BringDocumentContextToTop(this: *mut core::ffi::c_void, pddc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentHelper32_Impl::BringDocumentContextToTop(this, windows_core::from_raw_borrowed(&pddc)).into() + IDebugDocumentHelper32_Impl::BringDocumentContextToTop(this, core::mem::transmute_copy(&pddc)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4956,34 +4956,34 @@ pub struct IDebugDocumentHelper64_Vtbl { pub BringDocumentContextToTop: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugDocumentHelper64_Impl: windows_core::IUnknownImpl { - fn Init(&self, pda: Option<&IDebugApplication64>, pszshortname: &windows_core::PCWSTR, pszlongname: &windows_core::PCWSTR, docattr: u32) -> windows_core::Result<()>; - fn Attach(&self, pddhparent: Option<&IDebugDocumentHelper64>) -> windows_core::Result<()>; + fn Init(&self, pda: windows_core::Ref<'_, IDebugApplication64>, pszshortname: &windows_core::PCWSTR, pszlongname: &windows_core::PCWSTR, docattr: u32) -> windows_core::Result<()>; + fn Attach(&self, pddhparent: windows_core::Ref<'_, IDebugDocumentHelper64>) -> windows_core::Result<()>; fn Detach(&self) -> windows_core::Result<()>; fn AddUnicodeText(&self, psztext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn AddDBCSText(&self, psztext: &windows_core::PCSTR) -> windows_core::Result<()>; - fn SetDebugDocumentHost(&self, pddh: Option<&IDebugDocumentHost>) -> windows_core::Result<()>; + fn SetDebugDocumentHost(&self, pddh: windows_core::Ref<'_, IDebugDocumentHost>) -> windows_core::Result<()>; fn AddDeferredText(&self, cchars: u32, dwtextstartcookie: u32) -> windows_core::Result<()>; - fn DefineScriptBlock(&self, ulcharoffset: u32, cchars: u32, pas: Option<&IActiveScript>, fscriptlet: super::super::super::super::Foundation::BOOL) -> windows_core::Result; + fn DefineScriptBlock(&self, ulcharoffset: u32, cchars: u32, pas: windows_core::Ref<'_, IActiveScript>, fscriptlet: super::super::super::super::Foundation::BOOL) -> windows_core::Result; fn SetDefaultTextAttr(&self, statextattr: u16) -> windows_core::Result<()>; fn SetTextAttributes(&self, ulcharoffset: u32, cchars: u32, pstatextattr: *const u16) -> windows_core::Result<()>; fn SetLongName(&self, pszlongname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetShortName(&self, pszshortname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetDocumentAttr(&self, pszattributes: u32) -> windows_core::Result<()>; fn GetDebugApplicationNode(&self) -> windows_core::Result; - fn GetScriptBlockInfo(&self, dwsourcecontext: u64, ppasd: *mut Option, picharpos: *mut u32, pcchars: *mut u32) -> windows_core::Result<()>; + fn GetScriptBlockInfo(&self, dwsourcecontext: u64, ppasd: windows_core::OutRef<'_, IActiveScript>, picharpos: *mut u32, pcchars: *mut u32) -> windows_core::Result<()>; fn CreateDebugDocumentContext(&self, icharpos: u32, cchars: u32) -> windows_core::Result; fn BringDocumentToTop(&self) -> windows_core::Result<()>; - fn BringDocumentContextToTop(&self, pddc: Option<&IDebugDocumentContext>) -> windows_core::Result<()>; + fn BringDocumentContextToTop(&self, pddc: windows_core::Ref<'_, IDebugDocumentContext>) -> windows_core::Result<()>; } impl IDebugDocumentHelper64_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, pda: *mut core::ffi::c_void, pszshortname: windows_core::PCWSTR, pszlongname: windows_core::PCWSTR, docattr: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentHelper64_Impl::Init(this, windows_core::from_raw_borrowed(&pda), core::mem::transmute(&pszshortname), core::mem::transmute(&pszlongname), core::mem::transmute_copy(&docattr)).into() + IDebugDocumentHelper64_Impl::Init(this, core::mem::transmute_copy(&pda), core::mem::transmute(&pszshortname), core::mem::transmute(&pszlongname), core::mem::transmute_copy(&docattr)).into() } unsafe extern "system" fn Attach(this: *mut core::ffi::c_void, pddhparent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentHelper64_Impl::Attach(this, windows_core::from_raw_borrowed(&pddhparent)).into() + IDebugDocumentHelper64_Impl::Attach(this, core::mem::transmute_copy(&pddhparent)).into() } unsafe extern "system" fn Detach(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4999,7 +4999,7 @@ impl IDebugDocumentHelper64_Vtbl { } unsafe extern "system" fn SetDebugDocumentHost(this: *mut core::ffi::c_void, pddh: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentHelper64_Impl::SetDebugDocumentHost(this, windows_core::from_raw_borrowed(&pddh)).into() + IDebugDocumentHelper64_Impl::SetDebugDocumentHost(this, core::mem::transmute_copy(&pddh)).into() } unsafe extern "system" fn AddDeferredText(this: *mut core::ffi::c_void, cchars: u32, dwtextstartcookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5007,7 +5007,7 @@ impl IDebugDocumentHelper64_Vtbl { } unsafe extern "system" fn DefineScriptBlock(this: *mut core::ffi::c_void, ulcharoffset: u32, cchars: u32, pas: *mut core::ffi::c_void, fscriptlet: super::super::super::super::Foundation::BOOL, pdwsourcecontext: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugDocumentHelper64_Impl::DefineScriptBlock(this, core::mem::transmute_copy(&ulcharoffset), core::mem::transmute_copy(&cchars), windows_core::from_raw_borrowed(&pas), core::mem::transmute_copy(&fscriptlet)) { + match IDebugDocumentHelper64_Impl::DefineScriptBlock(this, core::mem::transmute_copy(&ulcharoffset), core::mem::transmute_copy(&cchars), core::mem::transmute_copy(&pas), core::mem::transmute_copy(&fscriptlet)) { Ok(ok__) => { pdwsourcecontext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5065,7 +5065,7 @@ impl IDebugDocumentHelper64_Vtbl { } unsafe extern "system" fn BringDocumentContextToTop(this: *mut core::ffi::c_void, pddc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentHelper64_Impl::BringDocumentContextToTop(this, windows_core::from_raw_borrowed(&pddc)).into() + IDebugDocumentHelper64_Impl::BringDocumentContextToTop(this, core::mem::transmute_copy(&pddc)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5343,7 +5343,7 @@ pub trait IDebugDocumentText_Impl: IDebugDocument_Impl { fn GetPositionOfLine(&self, clinenumber: u32) -> windows_core::Result; fn GetLineOfPosition(&self, ccharacterposition: u32, pclinenumber: *mut u32, pccharacteroffsetinline: *mut u32) -> windows_core::Result<()>; fn GetText(&self, ccharacterposition: u32, pchartext: &windows_core::PWSTR, pstatextattr: *mut u16, pcnumchars: *mut u32, cmaxchars: u32) -> windows_core::Result<()>; - fn GetPositionOfContext(&self, psc: Option<&IDebugDocumentContext>, pccharacterposition: *mut u32, cnumchars: *mut u32) -> windows_core::Result<()>; + fn GetPositionOfContext(&self, psc: windows_core::Ref<'_, IDebugDocumentContext>, pccharacterposition: *mut u32, cnumchars: *mut u32) -> windows_core::Result<()>; fn GetContextOfPosition(&self, ccharacterposition: u32, cnumchars: u32) -> windows_core::Result; } impl IDebugDocumentText_Vtbl { @@ -5382,7 +5382,7 @@ impl IDebugDocumentText_Vtbl { } unsafe extern "system" fn GetPositionOfContext(this: *mut core::ffi::c_void, psc: *mut core::ffi::c_void, pccharacterposition: *mut u32, cnumchars: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugDocumentText_Impl::GetPositionOfContext(this, windows_core::from_raw_borrowed(&psc), core::mem::transmute_copy(&pccharacterposition), core::mem::transmute_copy(&cnumchars)).into() + IDebugDocumentText_Impl::GetPositionOfContext(this, core::mem::transmute_copy(&psc), core::mem::transmute_copy(&pccharacterposition), core::mem::transmute_copy(&cnumchars)).into() } unsafe extern "system" fn GetContextOfPosition(this: *mut core::ffi::c_void, ccharacterposition: u32, cnumchars: u32, ppsc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5638,17 +5638,17 @@ pub struct IDebugExpression_Vtbl { pub GetResultAsDebugProperty: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::HRESULT, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugExpression_Impl: windows_core::IUnknownImpl { - fn Start(&self, pdecb: Option<&IDebugExpressionCallBack>) -> windows_core::Result<()>; + fn Start(&self, pdecb: windows_core::Ref<'_, IDebugExpressionCallBack>) -> windows_core::Result<()>; fn Abort(&self) -> windows_core::Result<()>; fn QueryIsComplete(&self) -> windows_core::Result<()>; fn GetResultAsString(&self, phrresult: *mut windows_core::HRESULT, pbstrresult: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn GetResultAsDebugProperty(&self, phrresult: *mut windows_core::HRESULT, ppdp: *mut Option) -> windows_core::Result<()>; + fn GetResultAsDebugProperty(&self, phrresult: *mut windows_core::HRESULT, ppdp: windows_core::OutRef<'_, super::IDebugProperty>) -> windows_core::Result<()>; } impl IDebugExpression_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Start(this: *mut core::ffi::c_void, pdecb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugExpression_Impl::Start(this, windows_core::from_raw_borrowed(&pdecb)).into() + IDebugExpression_Impl::Start(this, core::mem::transmute_copy(&pdecb)).into() } unsafe extern "system" fn Abort(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5899,16 +5899,16 @@ pub struct IDebugHelper_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDebugHelper_Impl: windows_core::IUnknownImpl { - fn CreatePropertyBrowser(&self, pvar: *const super::super::super::Variant::VARIANT, bstrname: &windows_core::PCWSTR, pdat: Option<&IDebugApplicationThread>) -> windows_core::Result; - fn CreatePropertyBrowserEx(&self, pvar: *const super::super::super::Variant::VARIANT, bstrname: &windows_core::PCWSTR, pdat: Option<&IDebugApplicationThread>, pdf: Option<&IDebugFormatter>) -> windows_core::Result; - fn CreateSimpleConnectionPoint(&self, pdisp: Option<&super::super::super::Com::IDispatch>) -> windows_core::Result; + fn CreatePropertyBrowser(&self, pvar: *const super::super::super::Variant::VARIANT, bstrname: &windows_core::PCWSTR, pdat: windows_core::Ref<'_, IDebugApplicationThread>) -> windows_core::Result; + fn CreatePropertyBrowserEx(&self, pvar: *const super::super::super::Variant::VARIANT, bstrname: &windows_core::PCWSTR, pdat: windows_core::Ref<'_, IDebugApplicationThread>, pdf: windows_core::Ref<'_, IDebugFormatter>) -> windows_core::Result; + fn CreateSimpleConnectionPoint(&self, pdisp: windows_core::Ref<'_, super::super::super::Com::IDispatch>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IDebugHelper_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreatePropertyBrowser(this: *mut core::ffi::c_void, pvar: *const super::super::super::Variant::VARIANT, bstrname: windows_core::PCWSTR, pdat: *mut core::ffi::c_void, ppdob: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHelper_Impl::CreatePropertyBrowser(this, core::mem::transmute_copy(&pvar), core::mem::transmute(&bstrname), windows_core::from_raw_borrowed(&pdat)) { + match IDebugHelper_Impl::CreatePropertyBrowser(this, core::mem::transmute_copy(&pvar), core::mem::transmute(&bstrname), core::mem::transmute_copy(&pdat)) { Ok(ok__) => { ppdob.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5918,7 +5918,7 @@ impl IDebugHelper_Vtbl { } unsafe extern "system" fn CreatePropertyBrowserEx(this: *mut core::ffi::c_void, pvar: *const super::super::super::Variant::VARIANT, bstrname: windows_core::PCWSTR, pdat: *mut core::ffi::c_void, pdf: *mut core::ffi::c_void, ppdob: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHelper_Impl::CreatePropertyBrowserEx(this, core::mem::transmute_copy(&pvar), core::mem::transmute(&bstrname), windows_core::from_raw_borrowed(&pdat), windows_core::from_raw_borrowed(&pdf)) { + match IDebugHelper_Impl::CreatePropertyBrowserEx(this, core::mem::transmute_copy(&pvar), core::mem::transmute(&bstrname), core::mem::transmute_copy(&pdat), core::mem::transmute_copy(&pdf)) { Ok(ok__) => { ppdob.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5928,7 +5928,7 @@ impl IDebugHelper_Vtbl { } unsafe extern "system" fn CreateSimpleConnectionPoint(this: *mut core::ffi::c_void, pdisp: *mut core::ffi::c_void, ppscp: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHelper_Impl::CreateSimpleConnectionPoint(this, windows_core::from_raw_borrowed(&pdisp)) { + match IDebugHelper_Impl::CreateSimpleConnectionPoint(this, core::mem::transmute_copy(&pdisp)) { Ok(ok__) => { ppscp.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5965,13 +5965,13 @@ pub struct IDebugSessionProvider_Vtbl { pub StartDebugSession: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugSessionProvider_Impl: windows_core::IUnknownImpl { - fn StartDebugSession(&self, pda: Option<&IRemoteDebugApplication>) -> windows_core::Result<()>; + fn StartDebugSession(&self, pda: windows_core::Ref<'_, IRemoteDebugApplication>) -> windows_core::Result<()>; } impl IDebugSessionProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartDebugSession(this: *mut core::ffi::c_void, pda: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugSessionProvider_Impl::StartDebugSession(this, windows_core::from_raw_borrowed(&pda)).into() + IDebugSessionProvider_Impl::StartDebugSession(this, core::mem::transmute_copy(&pda)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), StartDebugSession: StartDebugSession:: } } @@ -6411,7 +6411,7 @@ pub struct IEnumDebugApplicationNodes_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumDebugApplicationNodes_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, pprddp: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, pprddp: windows_core::OutRef<'_, IDebugApplicationNode>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -6479,7 +6479,7 @@ pub struct IEnumDebugCodeContexts_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumDebugCodeContexts_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, pscc: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, pscc: windows_core::OutRef<'_, IDebugCodeContext>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -6547,7 +6547,7 @@ pub struct IEnumDebugExpressionContexts_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumDebugExpressionContexts_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppdec: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppdec: windows_core::OutRef<'_, IDebugExpressionContext>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -6754,7 +6754,7 @@ pub struct IEnumRemoteDebugApplicationThreads_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumRemoteDebugApplicationThreads_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, pprdat: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, pprdat: windows_core::OutRef<'_, IRemoteDebugApplicationThread>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -6822,7 +6822,7 @@ pub struct IEnumRemoteDebugApplications_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumRemoteDebugApplications_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppda: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppda: windows_core::OutRef<'_, IRemoteDebugApplication>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -6881,13 +6881,13 @@ pub struct IJsDebug_Vtbl { pub OpenVirtualProcess: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u64, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IJsDebug_Impl: windows_core::IUnknownImpl { - fn OpenVirtualProcess(&self, processid: u32, runtimejsbaseaddress: u64, pdatatarget: Option<&IJsDebugDataTarget>) -> windows_core::Result; + fn OpenVirtualProcess(&self, processid: u32, runtimejsbaseaddress: u64, pdatatarget: windows_core::Ref<'_, IJsDebugDataTarget>) -> windows_core::Result; } impl IJsDebug_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OpenVirtualProcess(this: *mut core::ffi::c_void, processid: u32, runtimejsbaseaddress: u64, pdatatarget: *mut core::ffi::c_void, ppprocess: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IJsDebug_Impl::OpenVirtualProcess(this, core::mem::transmute_copy(&processid), core::mem::transmute_copy(&runtimejsbaseaddress), windows_core::from_raw_borrowed(&pdatatarget)) { + match IJsDebug_Impl::OpenVirtualProcess(this, core::mem::transmute_copy(&processid), core::mem::transmute_copy(&runtimejsbaseaddress), core::mem::transmute_copy(&pdatatarget)) { Ok(ok__) => { ppprocess.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7175,7 +7175,7 @@ pub trait IJsDebugFrame_Impl: windows_core::IUnknownImpl { fn GetDocumentPositionWithName(&self, pdocumentname: *mut windows_core::BSTR, pline: *mut u32, pcolumn: *mut u32) -> windows_core::Result<()>; fn GetDebugProperty(&self) -> windows_core::Result; fn GetReturnAddress(&self) -> windows_core::Result; - fn Evaluate(&self, pexpressiontext: &windows_core::PCWSTR, ppdebugproperty: *mut Option, perror: *mut windows_core::BSTR) -> windows_core::Result<()>; + fn Evaluate(&self, pexpressiontext: &windows_core::PCWSTR, ppdebugproperty: windows_core::OutRef<'_, IJsDebugProperty>, perror: *mut windows_core::BSTR) -> windows_core::Result<()>; } impl IJsDebugFrame_Vtbl { pub const fn new() -> Self { @@ -7424,7 +7424,7 @@ pub struct IJsEnumDebugProperty_Vtbl { pub GetCount: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IJsEnumDebugProperty_Impl: windows_core::IUnknownImpl { - fn Next(&self, count: u32, ppdebugproperty: *mut Option, pactualcount: *mut u32) -> windows_core::Result<()>; + fn Next(&self, count: u32, ppdebugproperty: windows_core::OutRef<'_, IJsDebugProperty>, pactualcount: *mut u32) -> windows_core::Result<()>; fn GetCount(&self) -> windows_core::Result; } impl IJsEnumDebugProperty_Vtbl { @@ -7476,7 +7476,7 @@ pub struct IMachineDebugManager_Vtbl { pub EnumApplications: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMachineDebugManager_Impl: windows_core::IUnknownImpl { - fn AddApplication(&self, pda: Option<&IRemoteDebugApplication>) -> windows_core::Result; + fn AddApplication(&self, pda: windows_core::Ref<'_, IRemoteDebugApplication>) -> windows_core::Result; fn RemoveApplication(&self, dwappcookie: u32) -> windows_core::Result<()>; fn EnumApplications(&self) -> windows_core::Result; } @@ -7484,7 +7484,7 @@ impl IMachineDebugManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddApplication(this: *mut core::ffi::c_void, pda: *mut core::ffi::c_void, pdwappcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMachineDebugManager_Impl::AddApplication(this, windows_core::from_raw_borrowed(&pda)) { + match IMachineDebugManager_Impl::AddApplication(this, core::mem::transmute_copy(&pda)) { Ok(ok__) => { pdwappcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7544,7 +7544,7 @@ pub struct IMachineDebugManagerCookie_Vtbl { pub EnumApplications: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMachineDebugManagerCookie_Impl: windows_core::IUnknownImpl { - fn AddApplication(&self, pda: Option<&IRemoteDebugApplication>, dwdebugappcookie: u32) -> windows_core::Result; + fn AddApplication(&self, pda: windows_core::Ref<'_, IRemoteDebugApplication>, dwdebugappcookie: u32) -> windows_core::Result; fn RemoveApplication(&self, dwdebugappcookie: u32, dwappcookie: u32) -> windows_core::Result<()>; fn EnumApplications(&self) -> windows_core::Result; } @@ -7552,7 +7552,7 @@ impl IMachineDebugManagerCookie_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddApplication(this: *mut core::ffi::c_void, pda: *mut core::ffi::c_void, dwdebugappcookie: u32, pdwappcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMachineDebugManagerCookie_Impl::AddApplication(this, windows_core::from_raw_borrowed(&pda), core::mem::transmute_copy(&dwdebugappcookie)) { + match IMachineDebugManagerCookie_Impl::AddApplication(this, core::mem::transmute_copy(&pda), core::mem::transmute_copy(&dwdebugappcookie)) { Ok(ok__) => { pdwappcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7609,18 +7609,18 @@ pub struct IMachineDebugManagerEvents_Vtbl { pub onRemoveApplication: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IMachineDebugManagerEvents_Impl: windows_core::IUnknownImpl { - fn onAddApplication(&self, pda: Option<&IRemoteDebugApplication>, dwappcookie: u32) -> windows_core::Result<()>; - fn onRemoveApplication(&self, pda: Option<&IRemoteDebugApplication>, dwappcookie: u32) -> windows_core::Result<()>; + fn onAddApplication(&self, pda: windows_core::Ref<'_, IRemoteDebugApplication>, dwappcookie: u32) -> windows_core::Result<()>; + fn onRemoveApplication(&self, pda: windows_core::Ref<'_, IRemoteDebugApplication>, dwappcookie: u32) -> windows_core::Result<()>; } impl IMachineDebugManagerEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn onAddApplication(this: *mut core::ffi::c_void, pda: *mut core::ffi::c_void, dwappcookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMachineDebugManagerEvents_Impl::onAddApplication(this, windows_core::from_raw_borrowed(&pda), core::mem::transmute_copy(&dwappcookie)).into() + IMachineDebugManagerEvents_Impl::onAddApplication(this, core::mem::transmute_copy(&pda), core::mem::transmute_copy(&dwappcookie)).into() } unsafe extern "system" fn onRemoveApplication(this: *mut core::ffi::c_void, pda: *mut core::ffi::c_void, dwappcookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMachineDebugManagerEvents_Impl::onRemoveApplication(this, windows_core::from_raw_borrowed(&pda), core::mem::transmute_copy(&dwappcookie)).into() + IMachineDebugManagerEvents_Impl::onRemoveApplication(this, core::mem::transmute_copy(&pda), core::mem::transmute_copy(&dwappcookie)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7674,9 +7674,9 @@ pub struct IProcessDebugManager32_Vtbl { pub trait IProcessDebugManager32_Impl: windows_core::IUnknownImpl { fn CreateApplication(&self) -> windows_core::Result; fn GetDefaultApplication(&self) -> windows_core::Result; - fn AddApplication(&self, pda: Option<&IDebugApplication32>) -> windows_core::Result; + fn AddApplication(&self, pda: windows_core::Ref<'_, IDebugApplication32>) -> windows_core::Result; fn RemoveApplication(&self, dwappcookie: u32) -> windows_core::Result<()>; - fn CreateDebugDocumentHelper(&self, punkouter: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateDebugDocumentHelper(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } impl IProcessDebugManager32_Vtbl { pub const fn new() -> Self { @@ -7702,7 +7702,7 @@ impl IProcessDebugManager32_Vtbl { } unsafe extern "system" fn AddApplication(this: *mut core::ffi::c_void, pda: *mut core::ffi::c_void, pdwappcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IProcessDebugManager32_Impl::AddApplication(this, windows_core::from_raw_borrowed(&pda)) { + match IProcessDebugManager32_Impl::AddApplication(this, core::mem::transmute_copy(&pda)) { Ok(ok__) => { pdwappcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7716,7 +7716,7 @@ impl IProcessDebugManager32_Vtbl { } unsafe extern "system" fn CreateDebugDocumentHelper(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, pddh: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IProcessDebugManager32_Impl::CreateDebugDocumentHelper(this, windows_core::from_raw_borrowed(&punkouter)) { + match IProcessDebugManager32_Impl::CreateDebugDocumentHelper(this, core::mem::transmute_copy(&punkouter)) { Ok(ok__) => { pddh.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7779,9 +7779,9 @@ pub struct IProcessDebugManager64_Vtbl { pub trait IProcessDebugManager64_Impl: windows_core::IUnknownImpl { fn CreateApplication(&self) -> windows_core::Result; fn GetDefaultApplication(&self) -> windows_core::Result; - fn AddApplication(&self, pda: Option<&IDebugApplication64>) -> windows_core::Result; + fn AddApplication(&self, pda: windows_core::Ref<'_, IDebugApplication64>) -> windows_core::Result; fn RemoveApplication(&self, dwappcookie: u32) -> windows_core::Result<()>; - fn CreateDebugDocumentHelper(&self, punkouter: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateDebugDocumentHelper(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } impl IProcessDebugManager64_Vtbl { pub const fn new() -> Self { @@ -7807,7 +7807,7 @@ impl IProcessDebugManager64_Vtbl { } unsafe extern "system" fn AddApplication(this: *mut core::ffi::c_void, pda: *mut core::ffi::c_void, pdwappcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IProcessDebugManager64_Impl::AddApplication(this, windows_core::from_raw_borrowed(&pda)) { + match IProcessDebugManager64_Impl::AddApplication(this, core::mem::transmute_copy(&pda)) { Ok(ok__) => { pdwappcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7821,7 +7821,7 @@ impl IProcessDebugManager64_Vtbl { } unsafe extern "system" fn CreateDebugDocumentHelper(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, pddh: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IProcessDebugManager64_Impl::CreateDebugDocumentHelper(this, windows_core::from_raw_borrowed(&punkouter)) { + match IProcessDebugManager64_Impl::CreateDebugDocumentHelper(this, core::mem::transmute_copy(&punkouter)) { Ok(ok__) => { pddh.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7946,12 +7946,12 @@ pub struct IRemoteDebugApplication_Vtbl { pub EnumGlobalExpressionContexts: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRemoteDebugApplication_Impl: windows_core::IUnknownImpl { - fn ResumeFromBreakPoint(&self, prptfocus: Option<&IRemoteDebugApplicationThread>, bra: BREAKRESUMEACTION, era: ERRORRESUMEACTION) -> windows_core::Result<()>; + fn ResumeFromBreakPoint(&self, prptfocus: windows_core::Ref<'_, IRemoteDebugApplicationThread>, bra: BREAKRESUMEACTION, era: ERRORRESUMEACTION) -> windows_core::Result<()>; fn CauseBreak(&self) -> windows_core::Result<()>; - fn ConnectDebugger(&self, pad: Option<&IApplicationDebugger>) -> windows_core::Result<()>; + fn ConnectDebugger(&self, pad: windows_core::Ref<'_, IApplicationDebugger>) -> windows_core::Result<()>; fn DisconnectDebugger(&self) -> windows_core::Result<()>; fn GetDebugger(&self) -> windows_core::Result; - fn CreateInstanceAtApplication(&self, rclsid: *const windows_core::GUID, punkouter: Option<&windows_core::IUnknown>, dwclscontext: u32, riid: *const windows_core::GUID) -> windows_core::Result; + fn CreateInstanceAtApplication(&self, rclsid: *const windows_core::GUID, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, dwclscontext: u32, riid: *const windows_core::GUID) -> windows_core::Result; fn QueryAlive(&self) -> windows_core::Result<()>; fn EnumThreads(&self) -> windows_core::Result; fn GetName(&self) -> windows_core::Result; @@ -7962,7 +7962,7 @@ impl IRemoteDebugApplication_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ResumeFromBreakPoint(this: *mut core::ffi::c_void, prptfocus: *mut core::ffi::c_void, bra: BREAKRESUMEACTION, era: ERRORRESUMEACTION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDebugApplication_Impl::ResumeFromBreakPoint(this, windows_core::from_raw_borrowed(&prptfocus), core::mem::transmute_copy(&bra), core::mem::transmute_copy(&era)).into() + IRemoteDebugApplication_Impl::ResumeFromBreakPoint(this, core::mem::transmute_copy(&prptfocus), core::mem::transmute_copy(&bra), core::mem::transmute_copy(&era)).into() } unsafe extern "system" fn CauseBreak(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7970,7 +7970,7 @@ impl IRemoteDebugApplication_Vtbl { } unsafe extern "system" fn ConnectDebugger(this: *mut core::ffi::c_void, pad: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDebugApplication_Impl::ConnectDebugger(this, windows_core::from_raw_borrowed(&pad)).into() + IRemoteDebugApplication_Impl::ConnectDebugger(this, core::mem::transmute_copy(&pad)).into() } unsafe extern "system" fn DisconnectDebugger(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7988,7 +7988,7 @@ impl IRemoteDebugApplication_Vtbl { } unsafe extern "system" fn CreateInstanceAtApplication(this: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, punkouter: *mut core::ffi::c_void, dwclscontext: u32, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRemoteDebugApplication_Impl::CreateInstanceAtApplication(this, core::mem::transmute_copy(&rclsid), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid)) { + match IRemoteDebugApplication_Impl::CreateInstanceAtApplication(this, core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppvobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8198,22 +8198,22 @@ pub struct IRemoteDebugApplicationEvents_Vtbl { pub OnBreakFlagChange: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRemoteDebugApplicationEvents_Impl: windows_core::IUnknownImpl { - fn OnConnectDebugger(&self, pad: Option<&IApplicationDebugger>) -> windows_core::Result<()>; + fn OnConnectDebugger(&self, pad: windows_core::Ref<'_, IApplicationDebugger>) -> windows_core::Result<()>; fn OnDisconnectDebugger(&self) -> windows_core::Result<()>; fn OnSetName(&self, pstrname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn OnDebugOutput(&self, pstr: &windows_core::PCWSTR) -> windows_core::Result<()>; fn OnClose(&self) -> windows_core::Result<()>; - fn OnEnterBreakPoint(&self, prdat: Option<&IRemoteDebugApplicationThread>) -> windows_core::Result<()>; - fn OnLeaveBreakPoint(&self, prdat: Option<&IRemoteDebugApplicationThread>) -> windows_core::Result<()>; - fn OnCreateThread(&self, prdat: Option<&IRemoteDebugApplicationThread>) -> windows_core::Result<()>; - fn OnDestroyThread(&self, prdat: Option<&IRemoteDebugApplicationThread>) -> windows_core::Result<()>; - fn OnBreakFlagChange(&self, abf: u32, prdatsteppingthread: Option<&IRemoteDebugApplicationThread>) -> windows_core::Result<()>; + fn OnEnterBreakPoint(&self, prdat: windows_core::Ref<'_, IRemoteDebugApplicationThread>) -> windows_core::Result<()>; + fn OnLeaveBreakPoint(&self, prdat: windows_core::Ref<'_, IRemoteDebugApplicationThread>) -> windows_core::Result<()>; + fn OnCreateThread(&self, prdat: windows_core::Ref<'_, IRemoteDebugApplicationThread>) -> windows_core::Result<()>; + fn OnDestroyThread(&self, prdat: windows_core::Ref<'_, IRemoteDebugApplicationThread>) -> windows_core::Result<()>; + fn OnBreakFlagChange(&self, abf: u32, prdatsteppingthread: windows_core::Ref<'_, IRemoteDebugApplicationThread>) -> windows_core::Result<()>; } impl IRemoteDebugApplicationEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnConnectDebugger(this: *mut core::ffi::c_void, pad: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDebugApplicationEvents_Impl::OnConnectDebugger(this, windows_core::from_raw_borrowed(&pad)).into() + IRemoteDebugApplicationEvents_Impl::OnConnectDebugger(this, core::mem::transmute_copy(&pad)).into() } unsafe extern "system" fn OnDisconnectDebugger(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8233,23 +8233,23 @@ impl IRemoteDebugApplicationEvents_Vtbl { } unsafe extern "system" fn OnEnterBreakPoint(this: *mut core::ffi::c_void, prdat: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDebugApplicationEvents_Impl::OnEnterBreakPoint(this, windows_core::from_raw_borrowed(&prdat)).into() + IRemoteDebugApplicationEvents_Impl::OnEnterBreakPoint(this, core::mem::transmute_copy(&prdat)).into() } unsafe extern "system" fn OnLeaveBreakPoint(this: *mut core::ffi::c_void, prdat: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDebugApplicationEvents_Impl::OnLeaveBreakPoint(this, windows_core::from_raw_borrowed(&prdat)).into() + IRemoteDebugApplicationEvents_Impl::OnLeaveBreakPoint(this, core::mem::transmute_copy(&prdat)).into() } unsafe extern "system" fn OnCreateThread(this: *mut core::ffi::c_void, prdat: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDebugApplicationEvents_Impl::OnCreateThread(this, windows_core::from_raw_borrowed(&prdat)).into() + IRemoteDebugApplicationEvents_Impl::OnCreateThread(this, core::mem::transmute_copy(&prdat)).into() } unsafe extern "system" fn OnDestroyThread(this: *mut core::ffi::c_void, prdat: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDebugApplicationEvents_Impl::OnDestroyThread(this, windows_core::from_raw_borrowed(&prdat)).into() + IRemoteDebugApplicationEvents_Impl::OnDestroyThread(this, core::mem::transmute_copy(&prdat)).into() } unsafe extern "system" fn OnBreakFlagChange(this: *mut core::ffi::c_void, abf: u32, prdatsteppingthread: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDebugApplicationEvents_Impl::OnBreakFlagChange(this, core::mem::transmute_copy(&abf), windows_core::from_raw_borrowed(&prdatsteppingthread)).into() + IRemoteDebugApplicationEvents_Impl::OnBreakFlagChange(this, core::mem::transmute_copy(&abf), core::mem::transmute_copy(&prdatsteppingthread)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -8330,7 +8330,7 @@ pub trait IRemoteDebugApplicationThread_Impl: windows_core::IUnknownImpl { fn GetApplication(&self) -> windows_core::Result; fn EnumStackFrames(&self) -> windows_core::Result; fn GetDescription(&self, pbstrdescription: *mut windows_core::BSTR, pbstrstate: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn SetNextStatement(&self, pstackframe: Option<&IDebugStackFrame>, pcodecontext: Option<&IDebugCodeContext>) -> windows_core::Result<()>; + fn SetNextStatement(&self, pstackframe: windows_core::Ref<'_, IDebugStackFrame>, pcodecontext: windows_core::Ref<'_, IDebugCodeContext>) -> windows_core::Result<()>; fn GetState(&self) -> windows_core::Result; fn Suspend(&self) -> windows_core::Result; fn Resume(&self) -> windows_core::Result; @@ -8374,7 +8374,7 @@ impl IRemoteDebugApplicationThread_Vtbl { } unsafe extern "system" fn SetNextStatement(this: *mut core::ffi::c_void, pstackframe: *mut core::ffi::c_void, pcodecontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDebugApplicationThread_Impl::SetNextStatement(this, windows_core::from_raw_borrowed(&pstackframe), windows_core::from_raw_borrowed(&pcodecontext)).into() + IRemoteDebugApplicationThread_Impl::SetNextStatement(this, core::mem::transmute_copy(&pstackframe), core::mem::transmute_copy(&pcodecontext)).into() } unsafe extern "system" fn GetState(this: *mut core::ffi::c_void, pstate: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8447,7 +8447,7 @@ pub struct IRemoteDebugCriticalErrorEvent110_Vtbl { pub GetErrorInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut i32, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRemoteDebugCriticalErrorEvent110_Impl: windows_core::IUnknownImpl { - fn GetErrorInfo(&self, pbstrsource: *mut windows_core::BSTR, pmessageid: *mut i32, pbstrmessage: *mut windows_core::BSTR, pplocation: *mut Option) -> windows_core::Result<()>; + fn GetErrorInfo(&self, pbstrsource: *mut windows_core::BSTR, pmessageid: *mut i32, pbstrmessage: *mut windows_core::BSTR, pplocation: windows_core::OutRef<'_, IDebugDocumentContext>) -> windows_core::Result<()>; } impl IRemoteDebugCriticalErrorEvent110_Vtbl { pub const fn new() -> Self { @@ -8475,7 +8475,7 @@ pub struct IRemoteDebugInfoEvent110_Vtbl { pub GetEventInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut DEBUG_EVENT_INFO_TYPE, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRemoteDebugInfoEvent110_Impl: windows_core::IUnknownImpl { - fn GetEventInfo(&self, pmessagetype: *mut DEBUG_EVENT_INFO_TYPE, pbstrmessage: *mut windows_core::BSTR, pbstrurl: *mut windows_core::BSTR, pplocation: *mut Option) -> windows_core::Result<()>; + fn GetEventInfo(&self, pmessagetype: *mut DEBUG_EVENT_INFO_TYPE, pbstrmessage: *mut windows_core::BSTR, pbstrurl: *mut windows_core::BSTR, pplocation: windows_core::OutRef<'_, IDebugDocumentContext>) -> windows_core::Result<()>; } impl IRemoteDebugInfoEvent110_Vtbl { pub const fn new() -> Self { @@ -8585,8 +8585,8 @@ pub trait IScriptEntry_Impl: IScriptNode_Impl { fn SetName(&self, psz: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetItemName(&self) -> windows_core::Result; fn SetItemName(&self, psz: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn GetSignature(&self, ppti: *mut Option, pimethod: *mut u32) -> windows_core::Result<()>; - fn SetSignature(&self, pti: Option<&super::super::super::Com::ITypeInfo>, imethod: u32) -> windows_core::Result<()>; + fn GetSignature(&self, ppti: windows_core::OutRef<'_, super::super::super::Com::ITypeInfo>, pimethod: *mut u32) -> windows_core::Result<()>; + fn SetSignature(&self, pti: windows_core::Ref<'_, super::super::super::Com::ITypeInfo>, imethod: u32) -> windows_core::Result<()>; fn GetRange(&self, pichmin: *mut u32, pcch: *mut u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -8654,7 +8654,7 @@ impl IScriptEntry_Vtbl { } unsafe extern "system" fn SetSignature(this: *mut core::ffi::c_void, pti: *mut core::ffi::c_void, imethod: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IScriptEntry_Impl::SetSignature(this, windows_core::from_raw_borrowed(&pti), core::mem::transmute_copy(&imethod)).into() + IScriptEntry_Impl::SetSignature(this, core::mem::transmute_copy(&pti), core::mem::transmute_copy(&imethod)).into() } unsafe extern "system" fn GetRange(this: *mut core::ffi::c_void, pichmin: *mut u32, pcch: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8833,7 +8833,7 @@ pub trait IScriptNode_Impl: windows_core::IUnknownImpl { fn GetChild(&self, isn: u32) -> windows_core::Result; fn GetLanguage(&self) -> windows_core::Result; fn CreateChildEntry(&self, isn: u32, dwcookie: u32, pszdelimiter: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateChildHandler(&self, pszdefaultname: &windows_core::PCWSTR, prgpsznames: *const windows_core::PCWSTR, cpsznames: u32, pszevent: &windows_core::PCWSTR, pszdelimiter: &windows_core::PCWSTR, ptisignature: Option<&super::super::super::Com::ITypeInfo>, imethodsignature: u32, isn: u32, dwcookie: u32) -> windows_core::Result; + fn CreateChildHandler(&self, pszdefaultname: &windows_core::PCWSTR, prgpsznames: *const windows_core::PCWSTR, cpsznames: u32, pszevent: &windows_core::PCWSTR, pszdelimiter: &windows_core::PCWSTR, ptisignature: windows_core::Ref<'_, super::super::super::Com::ITypeInfo>, imethodsignature: u32, isn: u32, dwcookie: u32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IScriptNode_Vtbl { @@ -8918,7 +8918,7 @@ impl IScriptNode_Vtbl { } unsafe extern "system" fn CreateChildHandler(this: *mut core::ffi::c_void, pszdefaultname: windows_core::PCWSTR, prgpsznames: *const windows_core::PCWSTR, cpsznames: u32, pszevent: windows_core::PCWSTR, pszdelimiter: windows_core::PCWSTR, ptisignature: *mut core::ffi::c_void, imethodsignature: u32, isn: u32, dwcookie: u32, ppse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IScriptNode_Impl::CreateChildHandler(this, core::mem::transmute(&pszdefaultname), core::mem::transmute_copy(&prgpsznames), core::mem::transmute_copy(&cpsznames), core::mem::transmute(&pszevent), core::mem::transmute(&pszdelimiter), windows_core::from_raw_borrowed(&ptisignature), core::mem::transmute_copy(&imethodsignature), core::mem::transmute_copy(&isn), core::mem::transmute_copy(&dwcookie)) { + match IScriptNode_Impl::CreateChildHandler(this, core::mem::transmute(&pszdefaultname), core::mem::transmute_copy(&prgpsznames), core::mem::transmute_copy(&cpsznames), core::mem::transmute(&pszevent), core::mem::transmute(&pszdelimiter), core::mem::transmute_copy(&ptisignature), core::mem::transmute_copy(&imethodsignature), core::mem::transmute_copy(&isn), core::mem::transmute_copy(&dwcookie)) { Ok(ok__) => { ppse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9103,7 +9103,7 @@ pub struct ISimpleConnectionPoint_Vtbl { pub trait ISimpleConnectionPoint_Impl: windows_core::IUnknownImpl { fn GetEventCount(&self) -> windows_core::Result; fn DescribeEvents(&self, ievent: u32, cevents: u32, prgid: *mut i32, prgbstr: *mut windows_core::BSTR, pceventsfetched: *mut u32) -> windows_core::Result<()>; - fn Advise(&self, pdisp: Option<&super::super::super::Com::IDispatch>) -> windows_core::Result; + fn Advise(&self, pdisp: windows_core::Ref<'_, super::super::super::Com::IDispatch>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -9125,7 +9125,7 @@ impl ISimpleConnectionPoint_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pdisp: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISimpleConnectionPoint_Impl::Advise(this, windows_core::from_raw_borrowed(&pdisp)) { + match ISimpleConnectionPoint_Impl::Advise(this, core::mem::transmute_copy(&pdisp)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9205,13 +9205,13 @@ pub struct IWebAppDiagnosticsObjectInitialization_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::super::super::Foundation::HANDLE_PTR, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWebAppDiagnosticsObjectInitialization_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, hpassedhandle: super::super::super::super::Foundation::HANDLE_PTR, pdebugapplication: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, hpassedhandle: super::super::super::super::Foundation::HANDLE_PTR, pdebugapplication: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IWebAppDiagnosticsObjectInitialization_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, hpassedhandle: super::super::super::super::Foundation::HANDLE_PTR, pdebugapplication: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebAppDiagnosticsObjectInitialization_Impl::Initialize(this, core::mem::transmute_copy(&hpassedhandle), windows_core::from_raw_borrowed(&pdebugapplication)).into() + IWebAppDiagnosticsObjectInitialization_Impl::Initialize(this, core::mem::transmute_copy(&hpassedhandle), core::mem::transmute_copy(&pdebugapplication)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/mod.rs index 032e6c1221..b73b6c2a1f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/mod.rs @@ -3206,13 +3206,13 @@ pub struct ICodeAddressConcept_Vtbl { pub GetContainingSymbol: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICodeAddressConcept_Impl: windows_core::IUnknownImpl { - fn GetContainingSymbol(&self, pcontextobject: Option<&IModelObject>) -> windows_core::Result; + fn GetContainingSymbol(&self, pcontextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; } impl ICodeAddressConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetContainingSymbol(this: *mut core::ffi::c_void, pcontextobject: *mut core::ffi::c_void, ppsymbol: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICodeAddressConcept_Impl::GetContainingSymbol(this, windows_core::from_raw_borrowed(&pcontextobject)) { + match ICodeAddressConcept_Impl::GetContainingSymbol(this, core::mem::transmute_copy(&pcontextobject)) { Ok(ok__) => { ppsymbol.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3245,13 +3245,13 @@ pub struct IComparableConcept_Vtbl { pub CompareObjects: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT, } pub trait IComparableConcept_Impl: windows_core::IUnknownImpl { - fn CompareObjects(&self, contextobject: Option<&IModelObject>, otherobject: Option<&IModelObject>) -> windows_core::Result; + fn CompareObjects(&self, contextobject: windows_core::Ref<'_, IModelObject>, otherobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; } impl IComparableConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CompareObjects(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, otherobject: *mut core::ffi::c_void, comparisonresult: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IComparableConcept_Impl::CompareObjects(this, windows_core::from_raw_borrowed(&contextobject), windows_core::from_raw_borrowed(&otherobject)) { + match IComparableConcept_Impl::CompareObjects(this, core::mem::transmute_copy(&contextobject), core::mem::transmute_copy(&otherobject)) { Ok(ok__) => { comparisonresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3289,14 +3289,14 @@ pub struct IDataModelConcept_Vtbl { pub GetName: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDataModelConcept_Impl: windows_core::IUnknownImpl { - fn InitializeObject(&self, modelobject: Option<&IModelObject>, matchingtypesignature: Option<&IDebugHostTypeSignature>, wildcardmatches: Option<&IDebugHostSymbolEnumerator>) -> windows_core::Result<()>; + fn InitializeObject(&self, modelobject: windows_core::Ref<'_, IModelObject>, matchingtypesignature: windows_core::Ref<'_, IDebugHostTypeSignature>, wildcardmatches: windows_core::Ref<'_, IDebugHostSymbolEnumerator>) -> windows_core::Result<()>; fn GetName(&self) -> windows_core::Result; } impl IDataModelConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeObject(this: *mut core::ffi::c_void, modelobject: *mut core::ffi::c_void, matchingtypesignature: *mut core::ffi::c_void, wildcardmatches: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelConcept_Impl::InitializeObject(this, windows_core::from_raw_borrowed(&modelobject), windows_core::from_raw_borrowed(&matchingtypesignature), windows_core::from_raw_borrowed(&wildcardmatches)).into() + IDataModelConcept_Impl::InitializeObject(this, core::mem::transmute_copy(&modelobject), core::mem::transmute_copy(&matchingtypesignature), core::mem::transmute_copy(&wildcardmatches)).into() } unsafe extern "system" fn GetName(this: *mut core::ffi::c_void, modelname: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3487,21 +3487,21 @@ pub trait IDataModelManager_Impl: windows_core::IUnknownImpl { fn Close(&self) -> windows_core::Result<()>; fn CreateNoValue(&self) -> windows_core::Result; fn CreateErrorObject(&self, hrerror: windows_core::HRESULT, pwszmessage: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateTypedObject(&self, context: Option<&IDebugHostContext>, objectlocation: &Location, objecttype: Option<&IDebugHostType>) -> windows_core::Result; - fn CreateTypedObjectReference(&self, context: Option<&IDebugHostContext>, objectlocation: &Location, objecttype: Option<&IDebugHostType>) -> windows_core::Result; - fn CreateSyntheticObject(&self, context: Option<&IDebugHostContext>) -> windows_core::Result; - fn CreateDataModelObject(&self, datamodel: Option<&IDataModelConcept>) -> windows_core::Result; + fn CreateTypedObject(&self, context: windows_core::Ref<'_, IDebugHostContext>, objectlocation: &Location, objecttype: windows_core::Ref<'_, IDebugHostType>) -> windows_core::Result; + fn CreateTypedObjectReference(&self, context: windows_core::Ref<'_, IDebugHostContext>, objectlocation: &Location, objecttype: windows_core::Ref<'_, IDebugHostType>) -> windows_core::Result; + fn CreateSyntheticObject(&self, context: windows_core::Ref<'_, IDebugHostContext>) -> windows_core::Result; + fn CreateDataModelObject(&self, datamodel: windows_core::Ref<'_, IDataModelConcept>) -> windows_core::Result; fn CreateIntrinsicObject(&self, objectkind: ModelObjectKind, intrinsicdata: *const super::super::super::Variant::VARIANT) -> windows_core::Result; - fn CreateTypedIntrinsicObject(&self, intrinsicdata: *const super::super::super::Variant::VARIANT, r#type: Option<&IDebugHostType>) -> windows_core::Result; - fn GetModelForTypeSignature(&self, typesignature: Option<&IDebugHostTypeSignature>) -> windows_core::Result; - fn GetModelForType(&self, r#type: Option<&IDebugHostType>, datamodel: *mut Option, typesignature: *mut Option, wildcardmatches: *mut Option) -> windows_core::Result<()>; - fn RegisterModelForTypeSignature(&self, typesignature: Option<&IDebugHostTypeSignature>, datamodel: Option<&IModelObject>) -> windows_core::Result<()>; - fn UnregisterModelForTypeSignature(&self, datamodel: Option<&IModelObject>, typesignature: Option<&IDebugHostTypeSignature>) -> windows_core::Result<()>; - fn RegisterExtensionForTypeSignature(&self, typesignature: Option<&IDebugHostTypeSignature>, datamodel: Option<&IModelObject>) -> windows_core::Result<()>; - fn UnregisterExtensionForTypeSignature(&self, datamodel: Option<&IModelObject>, typesignature: Option<&IDebugHostTypeSignature>) -> windows_core::Result<()>; - fn CreateMetadataStore(&self, parentstore: Option<&IKeyStore>) -> windows_core::Result; + fn CreateTypedIntrinsicObject(&self, intrinsicdata: *const super::super::super::Variant::VARIANT, r#type: windows_core::Ref<'_, IDebugHostType>) -> windows_core::Result; + fn GetModelForTypeSignature(&self, typesignature: windows_core::Ref<'_, IDebugHostTypeSignature>) -> windows_core::Result; + fn GetModelForType(&self, r#type: windows_core::Ref<'_, IDebugHostType>, datamodel: windows_core::OutRef<'_, IModelObject>, typesignature: windows_core::OutRef<'_, IDebugHostTypeSignature>, wildcardmatches: windows_core::OutRef<'_, IDebugHostSymbolEnumerator>) -> windows_core::Result<()>; + fn RegisterModelForTypeSignature(&self, typesignature: windows_core::Ref<'_, IDebugHostTypeSignature>, datamodel: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; + fn UnregisterModelForTypeSignature(&self, datamodel: windows_core::Ref<'_, IModelObject>, typesignature: windows_core::Ref<'_, IDebugHostTypeSignature>) -> windows_core::Result<()>; + fn RegisterExtensionForTypeSignature(&self, typesignature: windows_core::Ref<'_, IDebugHostTypeSignature>, datamodel: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; + fn UnregisterExtensionForTypeSignature(&self, datamodel: windows_core::Ref<'_, IModelObject>, typesignature: windows_core::Ref<'_, IDebugHostTypeSignature>) -> windows_core::Result<()>; + fn CreateMetadataStore(&self, parentstore: windows_core::Ref<'_, IKeyStore>) -> windows_core::Result; fn GetRootNamespace(&self) -> windows_core::Result; - fn RegisterNamedModel(&self, modelname: &windows_core::PCWSTR, modeobject: Option<&IModelObject>) -> windows_core::Result<()>; + fn RegisterNamedModel(&self, modelname: &windows_core::PCWSTR, modeobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; fn UnregisterNamedModel(&self, modelname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn AcquireNamedModel(&self, modelname: &windows_core::PCWSTR) -> windows_core::Result; } @@ -3534,7 +3534,7 @@ impl IDataModelManager_Vtbl { } unsafe extern "system" fn CreateTypedObject(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, objectlocation: Location, objecttype: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelManager_Impl::CreateTypedObject(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&objectlocation), windows_core::from_raw_borrowed(&objecttype)) { + match IDataModelManager_Impl::CreateTypedObject(this, core::mem::transmute_copy(&context), core::mem::transmute(&objectlocation), core::mem::transmute_copy(&objecttype)) { Ok(ok__) => { object.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3544,7 +3544,7 @@ impl IDataModelManager_Vtbl { } unsafe extern "system" fn CreateTypedObjectReference(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, objectlocation: Location, objecttype: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelManager_Impl::CreateTypedObjectReference(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&objectlocation), windows_core::from_raw_borrowed(&objecttype)) { + match IDataModelManager_Impl::CreateTypedObjectReference(this, core::mem::transmute_copy(&context), core::mem::transmute(&objectlocation), core::mem::transmute_copy(&objecttype)) { Ok(ok__) => { object.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3554,7 +3554,7 @@ impl IDataModelManager_Vtbl { } unsafe extern "system" fn CreateSyntheticObject(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelManager_Impl::CreateSyntheticObject(this, windows_core::from_raw_borrowed(&context)) { + match IDataModelManager_Impl::CreateSyntheticObject(this, core::mem::transmute_copy(&context)) { Ok(ok__) => { object.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3564,7 +3564,7 @@ impl IDataModelManager_Vtbl { } unsafe extern "system" fn CreateDataModelObject(this: *mut core::ffi::c_void, datamodel: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelManager_Impl::CreateDataModelObject(this, windows_core::from_raw_borrowed(&datamodel)) { + match IDataModelManager_Impl::CreateDataModelObject(this, core::mem::transmute_copy(&datamodel)) { Ok(ok__) => { object.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3584,7 +3584,7 @@ impl IDataModelManager_Vtbl { } unsafe extern "system" fn CreateTypedIntrinsicObject(this: *mut core::ffi::c_void, intrinsicdata: *const super::super::super::Variant::VARIANT, r#type: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelManager_Impl::CreateTypedIntrinsicObject(this, core::mem::transmute_copy(&intrinsicdata), windows_core::from_raw_borrowed(&r#type)) { + match IDataModelManager_Impl::CreateTypedIntrinsicObject(this, core::mem::transmute_copy(&intrinsicdata), core::mem::transmute_copy(&r#type)) { Ok(ok__) => { object.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3594,7 +3594,7 @@ impl IDataModelManager_Vtbl { } unsafe extern "system" fn GetModelForTypeSignature(this: *mut core::ffi::c_void, typesignature: *mut core::ffi::c_void, datamodel: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelManager_Impl::GetModelForTypeSignature(this, windows_core::from_raw_borrowed(&typesignature)) { + match IDataModelManager_Impl::GetModelForTypeSignature(this, core::mem::transmute_copy(&typesignature)) { Ok(ok__) => { datamodel.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3604,27 +3604,27 @@ impl IDataModelManager_Vtbl { } unsafe extern "system" fn GetModelForType(this: *mut core::ffi::c_void, r#type: *mut core::ffi::c_void, datamodel: *mut *mut core::ffi::c_void, typesignature: *mut *mut core::ffi::c_void, wildcardmatches: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelManager_Impl::GetModelForType(this, windows_core::from_raw_borrowed(&r#type), core::mem::transmute_copy(&datamodel), core::mem::transmute_copy(&typesignature), core::mem::transmute_copy(&wildcardmatches)).into() + IDataModelManager_Impl::GetModelForType(this, core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&datamodel), core::mem::transmute_copy(&typesignature), core::mem::transmute_copy(&wildcardmatches)).into() } unsafe extern "system" fn RegisterModelForTypeSignature(this: *mut core::ffi::c_void, typesignature: *mut core::ffi::c_void, datamodel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelManager_Impl::RegisterModelForTypeSignature(this, windows_core::from_raw_borrowed(&typesignature), windows_core::from_raw_borrowed(&datamodel)).into() + IDataModelManager_Impl::RegisterModelForTypeSignature(this, core::mem::transmute_copy(&typesignature), core::mem::transmute_copy(&datamodel)).into() } unsafe extern "system" fn UnregisterModelForTypeSignature(this: *mut core::ffi::c_void, datamodel: *mut core::ffi::c_void, typesignature: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelManager_Impl::UnregisterModelForTypeSignature(this, windows_core::from_raw_borrowed(&datamodel), windows_core::from_raw_borrowed(&typesignature)).into() + IDataModelManager_Impl::UnregisterModelForTypeSignature(this, core::mem::transmute_copy(&datamodel), core::mem::transmute_copy(&typesignature)).into() } unsafe extern "system" fn RegisterExtensionForTypeSignature(this: *mut core::ffi::c_void, typesignature: *mut core::ffi::c_void, datamodel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelManager_Impl::RegisterExtensionForTypeSignature(this, windows_core::from_raw_borrowed(&typesignature), windows_core::from_raw_borrowed(&datamodel)).into() + IDataModelManager_Impl::RegisterExtensionForTypeSignature(this, core::mem::transmute_copy(&typesignature), core::mem::transmute_copy(&datamodel)).into() } unsafe extern "system" fn UnregisterExtensionForTypeSignature(this: *mut core::ffi::c_void, datamodel: *mut core::ffi::c_void, typesignature: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelManager_Impl::UnregisterExtensionForTypeSignature(this, windows_core::from_raw_borrowed(&datamodel), windows_core::from_raw_borrowed(&typesignature)).into() + IDataModelManager_Impl::UnregisterExtensionForTypeSignature(this, core::mem::transmute_copy(&datamodel), core::mem::transmute_copy(&typesignature)).into() } unsafe extern "system" fn CreateMetadataStore(this: *mut core::ffi::c_void, parentstore: *mut core::ffi::c_void, metadatastore: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelManager_Impl::CreateMetadataStore(this, windows_core::from_raw_borrowed(&parentstore)) { + match IDataModelManager_Impl::CreateMetadataStore(this, core::mem::transmute_copy(&parentstore)) { Ok(ok__) => { metadatastore.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3644,7 +3644,7 @@ impl IDataModelManager_Vtbl { } unsafe extern "system" fn RegisterNamedModel(this: *mut core::ffi::c_void, modelname: windows_core::PCWSTR, modeobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelManager_Impl::RegisterNamedModel(this, core::mem::transmute(&modelname), windows_core::from_raw_borrowed(&modeobject)).into() + IDataModelManager_Impl::RegisterNamedModel(this, core::mem::transmute(&modelname), core::mem::transmute_copy(&modeobject)).into() } unsafe extern "system" fn UnregisterNamedModel(this: *mut core::ffi::c_void, modelname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3730,15 +3730,15 @@ pub struct IDataModelManager2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDataModelManager2_Impl: IDataModelManager_Impl { - fn AcquireSubNamespace(&self, modelname: &windows_core::PCWSTR, subnamespacemodelname: &windows_core::PCWSTR, accessname: &windows_core::PCWSTR, metadata: Option<&IKeyStore>) -> windows_core::Result; - fn CreateTypedIntrinsicObjectEx(&self, context: Option<&IDebugHostContext>, intrinsicdata: *const super::super::super::Variant::VARIANT, r#type: Option<&IDebugHostType>) -> windows_core::Result; + fn AcquireSubNamespace(&self, modelname: &windows_core::PCWSTR, subnamespacemodelname: &windows_core::PCWSTR, accessname: &windows_core::PCWSTR, metadata: windows_core::Ref<'_, IKeyStore>) -> windows_core::Result; + fn CreateTypedIntrinsicObjectEx(&self, context: windows_core::Ref<'_, IDebugHostContext>, intrinsicdata: *const super::super::super::Variant::VARIANT, r#type: windows_core::Ref<'_, IDebugHostType>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IDataModelManager2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AcquireSubNamespace(this: *mut core::ffi::c_void, modelname: windows_core::PCWSTR, subnamespacemodelname: windows_core::PCWSTR, accessname: windows_core::PCWSTR, metadata: *mut core::ffi::c_void, namespacemodelobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelManager2_Impl::AcquireSubNamespace(this, core::mem::transmute(&modelname), core::mem::transmute(&subnamespacemodelname), core::mem::transmute(&accessname), windows_core::from_raw_borrowed(&metadata)) { + match IDataModelManager2_Impl::AcquireSubNamespace(this, core::mem::transmute(&modelname), core::mem::transmute(&subnamespacemodelname), core::mem::transmute(&accessname), core::mem::transmute_copy(&metadata)) { Ok(ok__) => { namespacemodelobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3748,7 +3748,7 @@ impl IDataModelManager2_Vtbl { } unsafe extern "system" fn CreateTypedIntrinsicObjectEx(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, intrinsicdata: *const super::super::super::Variant::VARIANT, r#type: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelManager2_Impl::CreateTypedIntrinsicObjectEx(this, windows_core::from_raw_borrowed(&context), core::mem::transmute_copy(&intrinsicdata), windows_core::from_raw_borrowed(&r#type)) { + match IDataModelManager2_Impl::CreateTypedIntrinsicObjectEx(this, core::mem::transmute_copy(&context), core::mem::transmute_copy(&intrinsicdata), core::mem::transmute_copy(&r#type)) { Ok(ok__) => { object.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3809,24 +3809,24 @@ pub struct IDataModelNameBinder_Vtbl { pub EnumerateReferences: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDataModelNameBinder_Impl: windows_core::IUnknownImpl { - fn BindValue(&self, contextobject: Option<&IModelObject>, name: &windows_core::PCWSTR, value: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn BindReference(&self, contextobject: Option<&IModelObject>, name: &windows_core::PCWSTR, reference: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn EnumerateValues(&self, contextobject: Option<&IModelObject>) -> windows_core::Result; - fn EnumerateReferences(&self, contextobject: Option<&IModelObject>) -> windows_core::Result; + fn BindValue(&self, contextobject: windows_core::Ref<'_, IModelObject>, name: &windows_core::PCWSTR, value: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn BindReference(&self, contextobject: windows_core::Ref<'_, IModelObject>, name: &windows_core::PCWSTR, reference: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn EnumerateValues(&self, contextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; + fn EnumerateReferences(&self, contextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; } impl IDataModelNameBinder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BindValue(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, name: windows_core::PCWSTR, value: *mut *mut core::ffi::c_void, metadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelNameBinder_Impl::BindValue(this, windows_core::from_raw_borrowed(&contextobject), core::mem::transmute(&name), core::mem::transmute_copy(&value), core::mem::transmute_copy(&metadata)).into() + IDataModelNameBinder_Impl::BindValue(this, core::mem::transmute_copy(&contextobject), core::mem::transmute(&name), core::mem::transmute_copy(&value), core::mem::transmute_copy(&metadata)).into() } unsafe extern "system" fn BindReference(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, name: windows_core::PCWSTR, reference: *mut *mut core::ffi::c_void, metadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelNameBinder_Impl::BindReference(this, windows_core::from_raw_borrowed(&contextobject), core::mem::transmute(&name), core::mem::transmute_copy(&reference), core::mem::transmute_copy(&metadata)).into() + IDataModelNameBinder_Impl::BindReference(this, core::mem::transmute_copy(&contextobject), core::mem::transmute(&name), core::mem::transmute_copy(&reference), core::mem::transmute_copy(&metadata)).into() } unsafe extern "system" fn EnumerateValues(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, enumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelNameBinder_Impl::EnumerateValues(this, windows_core::from_raw_borrowed(&contextobject)) { + match IDataModelNameBinder_Impl::EnumerateValues(this, core::mem::transmute_copy(&contextobject)) { Ok(ok__) => { enumerator.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3836,7 +3836,7 @@ impl IDataModelNameBinder_Vtbl { } unsafe extern "system" fn EnumerateReferences(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, enumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataModelNameBinder_Impl::EnumerateReferences(this, windows_core::from_raw_borrowed(&contextobject)) { + match IDataModelNameBinder_Impl::EnumerateReferences(this, core::mem::transmute_copy(&contextobject)) { Ok(ok__) => { enumerator.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3915,11 +3915,11 @@ pub struct IDataModelScript_Vtbl { pub trait IDataModelScript_Impl: windows_core::IUnknownImpl { fn GetName(&self) -> windows_core::Result; fn Rename(&self, scriptname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn Populate(&self, contentstream: Option<&super::super::super::Com::IStream>) -> windows_core::Result<()>; - fn Execute(&self, client: Option<&IDataModelScriptClient>) -> windows_core::Result<()>; + fn Populate(&self, contentstream: windows_core::Ref<'_, super::super::super::Com::IStream>) -> windows_core::Result<()>; + fn Execute(&self, client: windows_core::Ref<'_, IDataModelScriptClient>) -> windows_core::Result<()>; fn Unlink(&self) -> windows_core::Result<()>; fn IsInvocable(&self) -> windows_core::Result; - fn InvokeMain(&self, client: Option<&IDataModelScriptClient>) -> windows_core::Result<()>; + fn InvokeMain(&self, client: windows_core::Ref<'_, IDataModelScriptClient>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IDataModelScript_Vtbl { @@ -3940,11 +3940,11 @@ impl IDataModelScript_Vtbl { } unsafe extern "system" fn Populate(this: *mut core::ffi::c_void, contentstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelScript_Impl::Populate(this, windows_core::from_raw_borrowed(&contentstream)).into() + IDataModelScript_Impl::Populate(this, core::mem::transmute_copy(&contentstream)).into() } unsafe extern "system" fn Execute(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelScript_Impl::Execute(this, windows_core::from_raw_borrowed(&client)).into() + IDataModelScript_Impl::Execute(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn Unlink(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3962,7 +3962,7 @@ impl IDataModelScript_Vtbl { } unsafe extern "system" fn InvokeMain(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelScript_Impl::InvokeMain(this, windows_core::from_raw_borrowed(&client)).into() + IDataModelScript_Impl::InvokeMain(this, core::mem::transmute_copy(&client)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4080,8 +4080,8 @@ pub trait IDataModelScriptDebug_Impl: windows_core::IUnknownImpl { fn EnumerateBreakpoints(&self) -> windows_core::Result; fn GetEventFilter(&self, eventfilter: ScriptDebugEventFilter) -> windows_core::Result; fn SetEventFilter(&self, eventfilter: ScriptDebugEventFilter, isbreakenabled: u8) -> windows_core::Result<()>; - fn StartDebugging(&self, debugclient: Option<&IDataModelScriptDebugClient>) -> windows_core::Result<()>; - fn StopDebugging(&self, debugclient: Option<&IDataModelScriptDebugClient>) -> windows_core::Result<()>; + fn StartDebugging(&self, debugclient: windows_core::Ref<'_, IDataModelScriptDebugClient>) -> windows_core::Result<()>; + fn StopDebugging(&self, debugclient: windows_core::Ref<'_, IDataModelScriptDebugClient>) -> windows_core::Result<()>; } impl IDataModelScriptDebug_Vtbl { pub const fn new() -> Self { @@ -4149,11 +4149,11 @@ impl IDataModelScriptDebug_Vtbl { } unsafe extern "system" fn StartDebugging(this: *mut core::ffi::c_void, debugclient: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelScriptDebug_Impl::StartDebugging(this, windows_core::from_raw_borrowed(&debugclient)).into() + IDataModelScriptDebug_Impl::StartDebugging(this, core::mem::transmute_copy(&debugclient)).into() } unsafe extern "system" fn StopDebugging(this: *mut core::ffi::c_void, debugclient: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelScriptDebug_Impl::StopDebugging(this, windows_core::from_raw_borrowed(&debugclient)).into() + IDataModelScriptDebug_Impl::StopDebugging(this, core::mem::transmute_copy(&debugclient)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4360,13 +4360,13 @@ pub struct IDataModelScriptDebugClient_Vtbl { pub NotifyDebugEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *const ScriptDebugEventInformation, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut ScriptExecutionKind) -> windows_core::HRESULT, } pub trait IDataModelScriptDebugClient_Impl: windows_core::IUnknownImpl { - fn NotifyDebugEvent(&self, peventinfo: *const ScriptDebugEventInformation, pscript: Option<&IDataModelScript>, peventdataobject: Option<&IModelObject>, resumeeventkind: *mut ScriptExecutionKind) -> windows_core::Result<()>; + fn NotifyDebugEvent(&self, peventinfo: *const ScriptDebugEventInformation, pscript: windows_core::Ref<'_, IDataModelScript>, peventdataobject: windows_core::Ref<'_, IModelObject>, resumeeventkind: *mut ScriptExecutionKind) -> windows_core::Result<()>; } impl IDataModelScriptDebugClient_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn NotifyDebugEvent(this: *mut core::ffi::c_void, peventinfo: *const ScriptDebugEventInformation, pscript: *mut core::ffi::c_void, peventdataobject: *mut core::ffi::c_void, resumeeventkind: *mut ScriptExecutionKind) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelScriptDebugClient_Impl::NotifyDebugEvent(this, core::mem::transmute_copy(&peventinfo), windows_core::from_raw_borrowed(&pscript), windows_core::from_raw_borrowed(&peventdataobject), core::mem::transmute_copy(&resumeeventkind)).into() + IDataModelScriptDebugClient_Impl::NotifyDebugEvent(this, core::mem::transmute_copy(&peventinfo), core::mem::transmute_copy(&pscript), core::mem::transmute_copy(&peventdataobject), core::mem::transmute_copy(&resumeeventkind)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), NotifyDebugEvent: NotifyDebugEvent:: } } @@ -4471,7 +4471,7 @@ pub trait IDataModelScriptDebugStackFrame_Impl: windows_core::IUnknownImpl { fn GetName(&self) -> windows_core::Result; fn GetPosition(&self, position: *mut ScriptDebugPosition, positionspanend: *mut ScriptDebugPosition, linetext: *mut windows_core::BSTR) -> windows_core::Result<()>; fn IsTransitionPoint(&self) -> windows_core::Result; - fn GetTransition(&self, transitionscript: *mut Option, istransitioncontiguous: *mut bool) -> windows_core::Result<()>; + fn GetTransition(&self, transitionscript: windows_core::OutRef<'_, IDataModelScript>, istransitioncontiguous: *mut bool) -> windows_core::Result<()>; fn Evaluate(&self, pwszexpression: &windows_core::PCWSTR) -> windows_core::Result; fn EnumerateLocals(&self) -> windows_core::Result; fn EnumerateArguments(&self) -> windows_core::Result; @@ -4570,7 +4570,7 @@ pub struct IDataModelScriptDebugVariableSetEnumerator_Vtbl { } pub trait IDataModelScriptDebugVariableSetEnumerator_Impl: windows_core::IUnknownImpl { fn Reset(&self) -> windows_core::Result<()>; - fn GetNext(&self, variablename: *mut windows_core::BSTR, variablevalue: *mut Option, variablemetadata: *mut Option) -> windows_core::Result<()>; + fn GetNext(&self, variablename: *mut windows_core::BSTR, variablevalue: windows_core::OutRef<'_, IModelObject>, variablemetadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; } impl IDataModelScriptDebugVariableSetEnumerator_Vtbl { pub const fn new() -> Self { @@ -4610,14 +4610,14 @@ pub struct IDataModelScriptHostContext_Vtbl { pub GetNamespaceObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDataModelScriptHostContext_Impl: windows_core::IUnknownImpl { - fn NotifyScriptChange(&self, script: Option<&IDataModelScript>, changekind: ScriptChangeKind) -> windows_core::Result<()>; + fn NotifyScriptChange(&self, script: windows_core::Ref<'_, IDataModelScript>, changekind: ScriptChangeKind) -> windows_core::Result<()>; fn GetNamespaceObject(&self) -> windows_core::Result; } impl IDataModelScriptHostContext_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn NotifyScriptChange(this: *mut core::ffi::c_void, script: *mut core::ffi::c_void, changekind: ScriptChangeKind) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelScriptHostContext_Impl::NotifyScriptChange(this, windows_core::from_raw_borrowed(&script), core::mem::transmute_copy(&changekind)).into() + IDataModelScriptHostContext_Impl::NotifyScriptChange(this, core::mem::transmute_copy(&script), core::mem::transmute_copy(&changekind)).into() } unsafe extern "system" fn GetNamespaceObject(this: *mut core::ffi::c_void, namespaceobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4690,8 +4690,8 @@ pub struct IDataModelScriptManager_Vtbl { } pub trait IDataModelScriptManager_Impl: windows_core::IUnknownImpl { fn GetDefaultNameBinder(&self) -> windows_core::Result; - fn RegisterScriptProvider(&self, provider: Option<&IDataModelScriptProvider>) -> windows_core::Result<()>; - fn UnregisterScriptProvider(&self, provider: Option<&IDataModelScriptProvider>) -> windows_core::Result<()>; + fn RegisterScriptProvider(&self, provider: windows_core::Ref<'_, IDataModelScriptProvider>) -> windows_core::Result<()>; + fn UnregisterScriptProvider(&self, provider: windows_core::Ref<'_, IDataModelScriptProvider>) -> windows_core::Result<()>; fn FindProviderForScriptType(&self, scripttype: &windows_core::PCWSTR) -> windows_core::Result; fn FindProviderForScriptExtension(&self, scriptextension: &windows_core::PCWSTR) -> windows_core::Result; fn EnumerateScriptProviders(&self) -> windows_core::Result; @@ -4710,11 +4710,11 @@ impl IDataModelScriptManager_Vtbl { } unsafe extern "system" fn RegisterScriptProvider(this: *mut core::ffi::c_void, provider: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelScriptManager_Impl::RegisterScriptProvider(this, windows_core::from_raw_borrowed(&provider)).into() + IDataModelScriptManager_Impl::RegisterScriptProvider(this, core::mem::transmute_copy(&provider)).into() } unsafe extern "system" fn UnregisterScriptProvider(this: *mut core::ffi::c_void, provider: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataModelScriptManager_Impl::UnregisterScriptProvider(this, windows_core::from_raw_borrowed(&provider)).into() + IDataModelScriptManager_Impl::UnregisterScriptProvider(this, core::mem::transmute_copy(&provider)).into() } unsafe extern "system" fn FindProviderForScriptType(this: *mut core::ffi::c_void, scripttype: windows_core::PCWSTR, provider: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6723,16 +6723,16 @@ pub trait IDebugClient_Impl: windows_core::IUnknownImpl { fn EndSession(&self, flags: u32) -> windows_core::Result<()>; fn GetExitCode(&self) -> windows_core::Result; fn DispatchCallbacks(&self, timeout: u32) -> windows_core::Result<()>; - fn ExitDispatch(&self, client: Option<&IDebugClient>) -> windows_core::Result<()>; + fn ExitDispatch(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result<()>; fn CreateClient(&self) -> windows_core::Result; fn GetInputCallbacks(&self) -> windows_core::Result; - fn SetInputCallbacks(&self, callbacks: Option<&IDebugInputCallbacks>) -> windows_core::Result<()>; + fn SetInputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugInputCallbacks>) -> windows_core::Result<()>; fn GetOutputCallbacks(&self) -> windows_core::Result; - fn SetOutputCallbacks(&self, callbacks: Option<&IDebugOutputCallbacks>) -> windows_core::Result<()>; + fn SetOutputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacks>) -> windows_core::Result<()>; fn GetOutputMask(&self) -> windows_core::Result; fn SetOutputMask(&self, mask: u32) -> windows_core::Result<()>; - fn GetOtherOutputMask(&self, client: Option<&IDebugClient>) -> windows_core::Result; - fn SetOtherOutputMask(&self, client: Option<&IDebugClient>, mask: u32) -> windows_core::Result<()>; + fn GetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result; + fn SetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>, mask: u32) -> windows_core::Result<()>; fn GetOutputWidth(&self) -> windows_core::Result; fn SetOutputWidth(&self, columns: u32) -> windows_core::Result<()>; fn GetOutputLinePrefix(&self, buffer: windows_core::PSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; @@ -6740,7 +6740,7 @@ pub trait IDebugClient_Impl: windows_core::IUnknownImpl { fn GetIdentity(&self, buffer: windows_core::PSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetEventCallbacks(&self) -> windows_core::Result; - fn SetEventCallbacks(&self, callbacks: Option<&IDebugEventCallbacks>) -> windows_core::Result<()>; + fn SetEventCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacks>) -> windows_core::Result<()>; fn FlushCallbacks(&self) -> windows_core::Result<()>; } impl IDebugClient_Vtbl { @@ -6875,7 +6875,7 @@ impl IDebugClient_Vtbl { } unsafe extern "system" fn ExitDispatch(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient_Impl::ExitDispatch(this, windows_core::from_raw_borrowed(&client)).into() + IDebugClient_Impl::ExitDispatch(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn CreateClient(this: *mut core::ffi::c_void, client: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6899,7 +6899,7 @@ impl IDebugClient_Vtbl { } unsafe extern "system" fn SetInputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient_Impl::SetInputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient_Impl::SetInputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6913,7 +6913,7 @@ impl IDebugClient_Vtbl { } unsafe extern "system" fn SetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient_Impl::SetOutputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient_Impl::SetOutputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputMask(this: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6931,7 +6931,7 @@ impl IDebugClient_Vtbl { } unsafe extern "system" fn GetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugClient_Impl::GetOtherOutputMask(this, windows_core::from_raw_borrowed(&client)) { + match IDebugClient_Impl::GetOtherOutputMask(this, core::mem::transmute_copy(&client)) { Ok(ok__) => { mask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6941,7 +6941,7 @@ impl IDebugClient_Vtbl { } unsafe extern "system" fn SetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient_Impl::SetOtherOutputMask(this, windows_core::from_raw_borrowed(&client), core::mem::transmute_copy(&mask)).into() + IDebugClient_Impl::SetOtherOutputMask(this, core::mem::transmute_copy(&client), core::mem::transmute_copy(&mask)).into() } unsafe extern "system" fn GetOutputWidth(this: *mut core::ffi::c_void, columns: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6985,7 +6985,7 @@ impl IDebugClient_Vtbl { } unsafe extern "system" fn SetEventCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient_Impl::SetEventCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient_Impl::SetEventCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn FlushCallbacks(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7379,16 +7379,16 @@ pub trait IDebugClient2_Impl: windows_core::IUnknownImpl { fn EndSession(&self, flags: u32) -> windows_core::Result<()>; fn GetExitCode(&self) -> windows_core::Result; fn DispatchCallbacks(&self, timeout: u32) -> windows_core::Result<()>; - fn ExitDispatch(&self, client: Option<&IDebugClient>) -> windows_core::Result<()>; + fn ExitDispatch(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result<()>; fn CreateClient(&self) -> windows_core::Result; fn GetInputCallbacks(&self) -> windows_core::Result; - fn SetInputCallbacks(&self, callbacks: Option<&IDebugInputCallbacks>) -> windows_core::Result<()>; + fn SetInputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugInputCallbacks>) -> windows_core::Result<()>; fn GetOutputCallbacks(&self) -> windows_core::Result; - fn SetOutputCallbacks(&self, callbacks: Option<&IDebugOutputCallbacks>) -> windows_core::Result<()>; + fn SetOutputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacks>) -> windows_core::Result<()>; fn GetOutputMask(&self) -> windows_core::Result; fn SetOutputMask(&self, mask: u32) -> windows_core::Result<()>; - fn GetOtherOutputMask(&self, client: Option<&IDebugClient>) -> windows_core::Result; - fn SetOtherOutputMask(&self, client: Option<&IDebugClient>, mask: u32) -> windows_core::Result<()>; + fn GetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result; + fn SetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>, mask: u32) -> windows_core::Result<()>; fn GetOutputWidth(&self) -> windows_core::Result; fn SetOutputWidth(&self, columns: u32) -> windows_core::Result<()>; fn GetOutputLinePrefix(&self, buffer: windows_core::PSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; @@ -7396,7 +7396,7 @@ pub trait IDebugClient2_Impl: windows_core::IUnknownImpl { fn GetIdentity(&self, buffer: windows_core::PSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetEventCallbacks(&self) -> windows_core::Result; - fn SetEventCallbacks(&self, callbacks: Option<&IDebugEventCallbacks>) -> windows_core::Result<()>; + fn SetEventCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacks>) -> windows_core::Result<()>; fn FlushCallbacks(&self) -> windows_core::Result<()>; fn WriteDumpFile2(&self, dumpfile: &windows_core::PCSTR, qualifier: u32, formatflags: u32, comment: &windows_core::PCSTR) -> windows_core::Result<()>; fn AddDumpInformationFile(&self, infofile: &windows_core::PCSTR, r#type: u32) -> windows_core::Result<()>; @@ -7539,7 +7539,7 @@ impl IDebugClient2_Vtbl { } unsafe extern "system" fn ExitDispatch(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient2_Impl::ExitDispatch(this, windows_core::from_raw_borrowed(&client)).into() + IDebugClient2_Impl::ExitDispatch(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn CreateClient(this: *mut core::ffi::c_void, client: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7563,7 +7563,7 @@ impl IDebugClient2_Vtbl { } unsafe extern "system" fn SetInputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient2_Impl::SetInputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient2_Impl::SetInputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7577,7 +7577,7 @@ impl IDebugClient2_Vtbl { } unsafe extern "system" fn SetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient2_Impl::SetOutputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient2_Impl::SetOutputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputMask(this: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7595,7 +7595,7 @@ impl IDebugClient2_Vtbl { } unsafe extern "system" fn GetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugClient2_Impl::GetOtherOutputMask(this, windows_core::from_raw_borrowed(&client)) { + match IDebugClient2_Impl::GetOtherOutputMask(this, core::mem::transmute_copy(&client)) { Ok(ok__) => { mask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7605,7 +7605,7 @@ impl IDebugClient2_Vtbl { } unsafe extern "system" fn SetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient2_Impl::SetOtherOutputMask(this, windows_core::from_raw_borrowed(&client), core::mem::transmute_copy(&mask)).into() + IDebugClient2_Impl::SetOtherOutputMask(this, core::mem::transmute_copy(&client), core::mem::transmute_copy(&mask)).into() } unsafe extern "system" fn GetOutputWidth(this: *mut core::ffi::c_void, columns: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7649,7 +7649,7 @@ impl IDebugClient2_Vtbl { } unsafe extern "system" fn SetEventCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient2_Impl::SetEventCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient2_Impl::SetEventCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn FlushCallbacks(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8121,16 +8121,16 @@ pub trait IDebugClient3_Impl: windows_core::IUnknownImpl { fn EndSession(&self, flags: u32) -> windows_core::Result<()>; fn GetExitCode(&self) -> windows_core::Result; fn DispatchCallbacks(&self, timeout: u32) -> windows_core::Result<()>; - fn ExitDispatch(&self, client: Option<&IDebugClient>) -> windows_core::Result<()>; + fn ExitDispatch(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result<()>; fn CreateClient(&self) -> windows_core::Result; fn GetInputCallbacks(&self) -> windows_core::Result; - fn SetInputCallbacks(&self, callbacks: Option<&IDebugInputCallbacks>) -> windows_core::Result<()>; + fn SetInputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugInputCallbacks>) -> windows_core::Result<()>; fn GetOutputCallbacks(&self) -> windows_core::Result; - fn SetOutputCallbacks(&self, callbacks: Option<&IDebugOutputCallbacks>) -> windows_core::Result<()>; + fn SetOutputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacks>) -> windows_core::Result<()>; fn GetOutputMask(&self) -> windows_core::Result; fn SetOutputMask(&self, mask: u32) -> windows_core::Result<()>; - fn GetOtherOutputMask(&self, client: Option<&IDebugClient>) -> windows_core::Result; - fn SetOtherOutputMask(&self, client: Option<&IDebugClient>, mask: u32) -> windows_core::Result<()>; + fn GetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result; + fn SetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>, mask: u32) -> windows_core::Result<()>; fn GetOutputWidth(&self) -> windows_core::Result; fn SetOutputWidth(&self, columns: u32) -> windows_core::Result<()>; fn GetOutputLinePrefix(&self, buffer: windows_core::PSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; @@ -8138,7 +8138,7 @@ pub trait IDebugClient3_Impl: windows_core::IUnknownImpl { fn GetIdentity(&self, buffer: windows_core::PSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetEventCallbacks(&self) -> windows_core::Result; - fn SetEventCallbacks(&self, callbacks: Option<&IDebugEventCallbacks>) -> windows_core::Result<()>; + fn SetEventCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacks>) -> windows_core::Result<()>; fn FlushCallbacks(&self) -> windows_core::Result<()>; fn WriteDumpFile2(&self, dumpfile: &windows_core::PCSTR, qualifier: u32, formatflags: u32, comment: &windows_core::PCSTR) -> windows_core::Result<()>; fn AddDumpInformationFile(&self, infofile: &windows_core::PCSTR, r#type: u32) -> windows_core::Result<()>; @@ -8285,7 +8285,7 @@ impl IDebugClient3_Vtbl { } unsafe extern "system" fn ExitDispatch(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient3_Impl::ExitDispatch(this, windows_core::from_raw_borrowed(&client)).into() + IDebugClient3_Impl::ExitDispatch(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn CreateClient(this: *mut core::ffi::c_void, client: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8309,7 +8309,7 @@ impl IDebugClient3_Vtbl { } unsafe extern "system" fn SetInputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient3_Impl::SetInputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient3_Impl::SetInputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8323,7 +8323,7 @@ impl IDebugClient3_Vtbl { } unsafe extern "system" fn SetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient3_Impl::SetOutputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient3_Impl::SetOutputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputMask(this: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8341,7 +8341,7 @@ impl IDebugClient3_Vtbl { } unsafe extern "system" fn GetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugClient3_Impl::GetOtherOutputMask(this, windows_core::from_raw_borrowed(&client)) { + match IDebugClient3_Impl::GetOtherOutputMask(this, core::mem::transmute_copy(&client)) { Ok(ok__) => { mask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8351,7 +8351,7 @@ impl IDebugClient3_Vtbl { } unsafe extern "system" fn SetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient3_Impl::SetOtherOutputMask(this, windows_core::from_raw_borrowed(&client), core::mem::transmute_copy(&mask)).into() + IDebugClient3_Impl::SetOtherOutputMask(this, core::mem::transmute_copy(&client), core::mem::transmute_copy(&mask)).into() } unsafe extern "system" fn GetOutputWidth(this: *mut core::ffi::c_void, columns: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8395,7 +8395,7 @@ impl IDebugClient3_Vtbl { } unsafe extern "system" fn SetEventCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient3_Impl::SetEventCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient3_Impl::SetEventCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn FlushCallbacks(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8928,16 +8928,16 @@ pub trait IDebugClient4_Impl: windows_core::IUnknownImpl { fn EndSession(&self, flags: u32) -> windows_core::Result<()>; fn GetExitCode(&self) -> windows_core::Result; fn DispatchCallbacks(&self, timeout: u32) -> windows_core::Result<()>; - fn ExitDispatch(&self, client: Option<&IDebugClient>) -> windows_core::Result<()>; + fn ExitDispatch(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result<()>; fn CreateClient(&self) -> windows_core::Result; fn GetInputCallbacks(&self) -> windows_core::Result; - fn SetInputCallbacks(&self, callbacks: Option<&IDebugInputCallbacks>) -> windows_core::Result<()>; + fn SetInputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugInputCallbacks>) -> windows_core::Result<()>; fn GetOutputCallbacks(&self) -> windows_core::Result; - fn SetOutputCallbacks(&self, callbacks: Option<&IDebugOutputCallbacks>) -> windows_core::Result<()>; + fn SetOutputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacks>) -> windows_core::Result<()>; fn GetOutputMask(&self) -> windows_core::Result; fn SetOutputMask(&self, mask: u32) -> windows_core::Result<()>; - fn GetOtherOutputMask(&self, client: Option<&IDebugClient>) -> windows_core::Result; - fn SetOtherOutputMask(&self, client: Option<&IDebugClient>, mask: u32) -> windows_core::Result<()>; + fn GetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result; + fn SetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>, mask: u32) -> windows_core::Result<()>; fn GetOutputWidth(&self) -> windows_core::Result; fn SetOutputWidth(&self, columns: u32) -> windows_core::Result<()>; fn GetOutputLinePrefix(&self, buffer: windows_core::PSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; @@ -8945,7 +8945,7 @@ pub trait IDebugClient4_Impl: windows_core::IUnknownImpl { fn GetIdentity(&self, buffer: windows_core::PSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetEventCallbacks(&self) -> windows_core::Result; - fn SetEventCallbacks(&self, callbacks: Option<&IDebugEventCallbacks>) -> windows_core::Result<()>; + fn SetEventCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacks>) -> windows_core::Result<()>; fn FlushCallbacks(&self) -> windows_core::Result<()>; fn WriteDumpFile2(&self, dumpfile: &windows_core::PCSTR, qualifier: u32, formatflags: u32, comment: &windows_core::PCSTR) -> windows_core::Result<()>; fn AddDumpInformationFile(&self, infofile: &windows_core::PCSTR, r#type: u32) -> windows_core::Result<()>; @@ -9098,7 +9098,7 @@ impl IDebugClient4_Vtbl { } unsafe extern "system" fn ExitDispatch(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient4_Impl::ExitDispatch(this, windows_core::from_raw_borrowed(&client)).into() + IDebugClient4_Impl::ExitDispatch(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn CreateClient(this: *mut core::ffi::c_void, client: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9122,7 +9122,7 @@ impl IDebugClient4_Vtbl { } unsafe extern "system" fn SetInputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient4_Impl::SetInputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient4_Impl::SetInputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9136,7 +9136,7 @@ impl IDebugClient4_Vtbl { } unsafe extern "system" fn SetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient4_Impl::SetOutputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient4_Impl::SetOutputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputMask(this: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9154,7 +9154,7 @@ impl IDebugClient4_Vtbl { } unsafe extern "system" fn GetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugClient4_Impl::GetOtherOutputMask(this, windows_core::from_raw_borrowed(&client)) { + match IDebugClient4_Impl::GetOtherOutputMask(this, core::mem::transmute_copy(&client)) { Ok(ok__) => { mask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9164,7 +9164,7 @@ impl IDebugClient4_Vtbl { } unsafe extern "system" fn SetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient4_Impl::SetOtherOutputMask(this, windows_core::from_raw_borrowed(&client), core::mem::transmute_copy(&mask)).into() + IDebugClient4_Impl::SetOtherOutputMask(this, core::mem::transmute_copy(&client), core::mem::transmute_copy(&mask)).into() } unsafe extern "system" fn GetOutputWidth(this: *mut core::ffi::c_void, columns: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9208,7 +9208,7 @@ impl IDebugClient4_Vtbl { } unsafe extern "system" fn SetEventCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient4_Impl::SetEventCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient4_Impl::SetEventCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn FlushCallbacks(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9963,16 +9963,16 @@ pub trait IDebugClient5_Impl: windows_core::IUnknownImpl { fn EndSession(&self, flags: u32) -> windows_core::Result<()>; fn GetExitCode(&self) -> windows_core::Result; fn DispatchCallbacks(&self, timeout: u32) -> windows_core::Result<()>; - fn ExitDispatch(&self, client: Option<&IDebugClient>) -> windows_core::Result<()>; + fn ExitDispatch(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result<()>; fn CreateClient(&self) -> windows_core::Result; fn GetInputCallbacks(&self) -> windows_core::Result; - fn SetInputCallbacks(&self, callbacks: Option<&IDebugInputCallbacks>) -> windows_core::Result<()>; + fn SetInputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugInputCallbacks>) -> windows_core::Result<()>; fn GetOutputCallbacks(&self) -> windows_core::Result; - fn SetOutputCallbacks(&self, callbacks: Option<&IDebugOutputCallbacks>) -> windows_core::Result<()>; + fn SetOutputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacks>) -> windows_core::Result<()>; fn GetOutputMask(&self) -> windows_core::Result; fn SetOutputMask(&self, mask: u32) -> windows_core::Result<()>; - fn GetOtherOutputMask(&self, client: Option<&IDebugClient>) -> windows_core::Result; - fn SetOtherOutputMask(&self, client: Option<&IDebugClient>, mask: u32) -> windows_core::Result<()>; + fn GetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result; + fn SetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>, mask: u32) -> windows_core::Result<()>; fn GetOutputWidth(&self) -> windows_core::Result; fn SetOutputWidth(&self, columns: u32) -> windows_core::Result<()>; fn GetOutputLinePrefix(&self, buffer: windows_core::PSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; @@ -9980,7 +9980,7 @@ pub trait IDebugClient5_Impl: windows_core::IUnknownImpl { fn GetIdentity(&self, buffer: windows_core::PSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetEventCallbacks(&self) -> windows_core::Result; - fn SetEventCallbacks(&self, callbacks: Option<&IDebugEventCallbacks>) -> windows_core::Result<()>; + fn SetEventCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacks>) -> windows_core::Result<()>; fn FlushCallbacks(&self) -> windows_core::Result<()>; fn WriteDumpFile2(&self, dumpfile: &windows_core::PCSTR, qualifier: u32, formatflags: u32, comment: &windows_core::PCSTR) -> windows_core::Result<()>; fn AddDumpInformationFile(&self, infofile: &windows_core::PCSTR, r#type: u32) -> windows_core::Result<()>; @@ -10008,13 +10008,13 @@ pub trait IDebugClient5_Impl: windows_core::IUnknownImpl { fn StartServerWide(&self, options: &windows_core::PCWSTR) -> windows_core::Result<()>; fn OutputServersWide(&self, outputcontrol: u32, machine: &windows_core::PCWSTR, flags: u32) -> windows_core::Result<()>; fn GetOutputCallbacksWide(&self) -> windows_core::Result; - fn SetOutputCallbacksWide(&self, callbacks: Option<&IDebugOutputCallbacksWide>) -> windows_core::Result<()>; + fn SetOutputCallbacksWide(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacksWide>) -> windows_core::Result<()>; fn GetOutputLinePrefixWide(&self, buffer: windows_core::PWSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; fn SetOutputLinePrefixWide(&self, prefix: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetIdentityWide(&self, buffer: windows_core::PWSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetEventCallbacksWide(&self) -> windows_core::Result; - fn SetEventCallbacksWide(&self, callbacks: Option<&IDebugEventCallbacksWide>) -> windows_core::Result<()>; + fn SetEventCallbacksWide(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacksWide>) -> windows_core::Result<()>; fn CreateProcess2(&self, server: u64, commandline: &windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCSTR, environment: &windows_core::PCSTR) -> windows_core::Result<()>; fn CreateProcess2Wide(&self, server: u64, commandline: &windows_core::PCWSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCWSTR, environment: &windows_core::PCWSTR) -> windows_core::Result<()>; fn CreateProcessAndAttach2(&self, server: u64, commandline: &windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCSTR, environment: &windows_core::PCSTR, processid: u32, attachflags: u32) -> windows_core::Result<()>; @@ -10162,7 +10162,7 @@ impl IDebugClient5_Vtbl { } unsafe extern "system" fn ExitDispatch(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient5_Impl::ExitDispatch(this, windows_core::from_raw_borrowed(&client)).into() + IDebugClient5_Impl::ExitDispatch(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn CreateClient(this: *mut core::ffi::c_void, client: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10186,7 +10186,7 @@ impl IDebugClient5_Vtbl { } unsafe extern "system" fn SetInputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient5_Impl::SetInputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient5_Impl::SetInputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10200,7 +10200,7 @@ impl IDebugClient5_Vtbl { } unsafe extern "system" fn SetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient5_Impl::SetOutputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient5_Impl::SetOutputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputMask(this: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10218,7 +10218,7 @@ impl IDebugClient5_Vtbl { } unsafe extern "system" fn GetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugClient5_Impl::GetOtherOutputMask(this, windows_core::from_raw_borrowed(&client)) { + match IDebugClient5_Impl::GetOtherOutputMask(this, core::mem::transmute_copy(&client)) { Ok(ok__) => { mask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10228,7 +10228,7 @@ impl IDebugClient5_Vtbl { } unsafe extern "system" fn SetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient5_Impl::SetOtherOutputMask(this, windows_core::from_raw_borrowed(&client), core::mem::transmute_copy(&mask)).into() + IDebugClient5_Impl::SetOtherOutputMask(this, core::mem::transmute_copy(&client), core::mem::transmute_copy(&mask)).into() } unsafe extern "system" fn GetOutputWidth(this: *mut core::ffi::c_void, columns: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10272,7 +10272,7 @@ impl IDebugClient5_Vtbl { } unsafe extern "system" fn SetEventCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient5_Impl::SetEventCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient5_Impl::SetEventCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn FlushCallbacks(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10408,7 +10408,7 @@ impl IDebugClient5_Vtbl { } unsafe extern "system" fn SetOutputCallbacksWide(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient5_Impl::SetOutputCallbacksWide(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient5_Impl::SetOutputCallbacksWide(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputLinePrefixWide(this: *mut core::ffi::c_void, buffer: windows_core::PWSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10438,7 +10438,7 @@ impl IDebugClient5_Vtbl { } unsafe extern "system" fn SetEventCallbacksWide(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient5_Impl::SetEventCallbacksWide(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient5_Impl::SetEventCallbacksWide(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn CreateProcess2(this: *mut core::ffi::c_void, server: u64, commandline: windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: windows_core::PCSTR, environment: windows_core::PCSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11227,16 +11227,16 @@ pub trait IDebugClient6_Impl: windows_core::IUnknownImpl { fn EndSession(&self, flags: u32) -> windows_core::Result<()>; fn GetExitCode(&self) -> windows_core::Result; fn DispatchCallbacks(&self, timeout: u32) -> windows_core::Result<()>; - fn ExitDispatch(&self, client: Option<&IDebugClient>) -> windows_core::Result<()>; + fn ExitDispatch(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result<()>; fn CreateClient(&self) -> windows_core::Result; fn GetInputCallbacks(&self) -> windows_core::Result; - fn SetInputCallbacks(&self, callbacks: Option<&IDebugInputCallbacks>) -> windows_core::Result<()>; + fn SetInputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugInputCallbacks>) -> windows_core::Result<()>; fn GetOutputCallbacks(&self) -> windows_core::Result; - fn SetOutputCallbacks(&self, callbacks: Option<&IDebugOutputCallbacks>) -> windows_core::Result<()>; + fn SetOutputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacks>) -> windows_core::Result<()>; fn GetOutputMask(&self) -> windows_core::Result; fn SetOutputMask(&self, mask: u32) -> windows_core::Result<()>; - fn GetOtherOutputMask(&self, client: Option<&IDebugClient>) -> windows_core::Result; - fn SetOtherOutputMask(&self, client: Option<&IDebugClient>, mask: u32) -> windows_core::Result<()>; + fn GetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result; + fn SetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>, mask: u32) -> windows_core::Result<()>; fn GetOutputWidth(&self) -> windows_core::Result; fn SetOutputWidth(&self, columns: u32) -> windows_core::Result<()>; fn GetOutputLinePrefix(&self, buffer: windows_core::PSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; @@ -11244,7 +11244,7 @@ pub trait IDebugClient6_Impl: windows_core::IUnknownImpl { fn GetIdentity(&self, buffer: windows_core::PSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetEventCallbacks(&self) -> windows_core::Result; - fn SetEventCallbacks(&self, callbacks: Option<&IDebugEventCallbacks>) -> windows_core::Result<()>; + fn SetEventCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacks>) -> windows_core::Result<()>; fn FlushCallbacks(&self) -> windows_core::Result<()>; fn WriteDumpFile2(&self, dumpfile: &windows_core::PCSTR, qualifier: u32, formatflags: u32, comment: &windows_core::PCSTR) -> windows_core::Result<()>; fn AddDumpInformationFile(&self, infofile: &windows_core::PCSTR, r#type: u32) -> windows_core::Result<()>; @@ -11272,13 +11272,13 @@ pub trait IDebugClient6_Impl: windows_core::IUnknownImpl { fn StartServerWide(&self, options: &windows_core::PCWSTR) -> windows_core::Result<()>; fn OutputServersWide(&self, outputcontrol: u32, machine: &windows_core::PCWSTR, flags: u32) -> windows_core::Result<()>; fn GetOutputCallbacksWide(&self) -> windows_core::Result; - fn SetOutputCallbacksWide(&self, callbacks: Option<&IDebugOutputCallbacksWide>) -> windows_core::Result<()>; + fn SetOutputCallbacksWide(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacksWide>) -> windows_core::Result<()>; fn GetOutputLinePrefixWide(&self, buffer: windows_core::PWSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; fn SetOutputLinePrefixWide(&self, prefix: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetIdentityWide(&self, buffer: windows_core::PWSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetEventCallbacksWide(&self) -> windows_core::Result; - fn SetEventCallbacksWide(&self, callbacks: Option<&IDebugEventCallbacksWide>) -> windows_core::Result<()>; + fn SetEventCallbacksWide(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacksWide>) -> windows_core::Result<()>; fn CreateProcess2(&self, server: u64, commandline: &windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCSTR, environment: &windows_core::PCSTR) -> windows_core::Result<()>; fn CreateProcess2Wide(&self, server: u64, commandline: &windows_core::PCWSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCWSTR, environment: &windows_core::PCWSTR) -> windows_core::Result<()>; fn CreateProcessAndAttach2(&self, server: u64, commandline: &windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCSTR, environment: &windows_core::PCSTR, processid: u32, attachflags: u32) -> windows_core::Result<()>; @@ -11293,7 +11293,7 @@ pub trait IDebugClient6_Impl: windows_core::IUnknownImpl { fn SetQuitLockString(&self, string: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetQuitLockStringWide(&self, buffer: windows_core::PWSTR, buffersize: u32, stringsize: *mut u32) -> windows_core::Result<()>; fn SetQuitLockStringWide(&self, string: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetEventContextCallbacks(&self, callbacks: Option<&IDebugEventContextCallbacks>) -> windows_core::Result<()>; + fn SetEventContextCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventContextCallbacks>) -> windows_core::Result<()>; } impl IDebugClient6_Vtbl { pub const fn new() -> Self { @@ -11427,7 +11427,7 @@ impl IDebugClient6_Vtbl { } unsafe extern "system" fn ExitDispatch(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient6_Impl::ExitDispatch(this, windows_core::from_raw_borrowed(&client)).into() + IDebugClient6_Impl::ExitDispatch(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn CreateClient(this: *mut core::ffi::c_void, client: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11451,7 +11451,7 @@ impl IDebugClient6_Vtbl { } unsafe extern "system" fn SetInputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient6_Impl::SetInputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient6_Impl::SetInputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11465,7 +11465,7 @@ impl IDebugClient6_Vtbl { } unsafe extern "system" fn SetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient6_Impl::SetOutputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient6_Impl::SetOutputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputMask(this: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11483,7 +11483,7 @@ impl IDebugClient6_Vtbl { } unsafe extern "system" fn GetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugClient6_Impl::GetOtherOutputMask(this, windows_core::from_raw_borrowed(&client)) { + match IDebugClient6_Impl::GetOtherOutputMask(this, core::mem::transmute_copy(&client)) { Ok(ok__) => { mask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11493,7 +11493,7 @@ impl IDebugClient6_Vtbl { } unsafe extern "system" fn SetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient6_Impl::SetOtherOutputMask(this, windows_core::from_raw_borrowed(&client), core::mem::transmute_copy(&mask)).into() + IDebugClient6_Impl::SetOtherOutputMask(this, core::mem::transmute_copy(&client), core::mem::transmute_copy(&mask)).into() } unsafe extern "system" fn GetOutputWidth(this: *mut core::ffi::c_void, columns: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11537,7 +11537,7 @@ impl IDebugClient6_Vtbl { } unsafe extern "system" fn SetEventCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient6_Impl::SetEventCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient6_Impl::SetEventCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn FlushCallbacks(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11673,7 +11673,7 @@ impl IDebugClient6_Vtbl { } unsafe extern "system" fn SetOutputCallbacksWide(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient6_Impl::SetOutputCallbacksWide(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient6_Impl::SetOutputCallbacksWide(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputLinePrefixWide(this: *mut core::ffi::c_void, buffer: windows_core::PWSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11703,7 +11703,7 @@ impl IDebugClient6_Vtbl { } unsafe extern "system" fn SetEventCallbacksWide(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient6_Impl::SetEventCallbacksWide(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient6_Impl::SetEventCallbacksWide(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn CreateProcess2(this: *mut core::ffi::c_void, server: u64, commandline: windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: windows_core::PCSTR, environment: windows_core::PCSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11793,7 +11793,7 @@ impl IDebugClient6_Vtbl { } unsafe extern "system" fn SetEventContextCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient6_Impl::SetEventContextCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient6_Impl::SetEventContextCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -12501,16 +12501,16 @@ pub trait IDebugClient7_Impl: windows_core::IUnknownImpl { fn EndSession(&self, flags: u32) -> windows_core::Result<()>; fn GetExitCode(&self) -> windows_core::Result; fn DispatchCallbacks(&self, timeout: u32) -> windows_core::Result<()>; - fn ExitDispatch(&self, client: Option<&IDebugClient>) -> windows_core::Result<()>; + fn ExitDispatch(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result<()>; fn CreateClient(&self) -> windows_core::Result; fn GetInputCallbacks(&self) -> windows_core::Result; - fn SetInputCallbacks(&self, callbacks: Option<&IDebugInputCallbacks>) -> windows_core::Result<()>; + fn SetInputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugInputCallbacks>) -> windows_core::Result<()>; fn GetOutputCallbacks(&self) -> windows_core::Result; - fn SetOutputCallbacks(&self, callbacks: Option<&IDebugOutputCallbacks>) -> windows_core::Result<()>; + fn SetOutputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacks>) -> windows_core::Result<()>; fn GetOutputMask(&self) -> windows_core::Result; fn SetOutputMask(&self, mask: u32) -> windows_core::Result<()>; - fn GetOtherOutputMask(&self, client: Option<&IDebugClient>) -> windows_core::Result; - fn SetOtherOutputMask(&self, client: Option<&IDebugClient>, mask: u32) -> windows_core::Result<()>; + fn GetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result; + fn SetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>, mask: u32) -> windows_core::Result<()>; fn GetOutputWidth(&self) -> windows_core::Result; fn SetOutputWidth(&self, columns: u32) -> windows_core::Result<()>; fn GetOutputLinePrefix(&self, buffer: windows_core::PSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; @@ -12518,7 +12518,7 @@ pub trait IDebugClient7_Impl: windows_core::IUnknownImpl { fn GetIdentity(&self, buffer: windows_core::PSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetEventCallbacks(&self) -> windows_core::Result; - fn SetEventCallbacks(&self, callbacks: Option<&IDebugEventCallbacks>) -> windows_core::Result<()>; + fn SetEventCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacks>) -> windows_core::Result<()>; fn FlushCallbacks(&self) -> windows_core::Result<()>; fn WriteDumpFile2(&self, dumpfile: &windows_core::PCSTR, qualifier: u32, formatflags: u32, comment: &windows_core::PCSTR) -> windows_core::Result<()>; fn AddDumpInformationFile(&self, infofile: &windows_core::PCSTR, r#type: u32) -> windows_core::Result<()>; @@ -12546,13 +12546,13 @@ pub trait IDebugClient7_Impl: windows_core::IUnknownImpl { fn StartServerWide(&self, options: &windows_core::PCWSTR) -> windows_core::Result<()>; fn OutputServersWide(&self, outputcontrol: u32, machine: &windows_core::PCWSTR, flags: u32) -> windows_core::Result<()>; fn GetOutputCallbacksWide(&self) -> windows_core::Result; - fn SetOutputCallbacksWide(&self, callbacks: Option<&IDebugOutputCallbacksWide>) -> windows_core::Result<()>; + fn SetOutputCallbacksWide(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacksWide>) -> windows_core::Result<()>; fn GetOutputLinePrefixWide(&self, buffer: windows_core::PWSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; fn SetOutputLinePrefixWide(&self, prefix: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetIdentityWide(&self, buffer: windows_core::PWSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetEventCallbacksWide(&self) -> windows_core::Result; - fn SetEventCallbacksWide(&self, callbacks: Option<&IDebugEventCallbacksWide>) -> windows_core::Result<()>; + fn SetEventCallbacksWide(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacksWide>) -> windows_core::Result<()>; fn CreateProcess2(&self, server: u64, commandline: &windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCSTR, environment: &windows_core::PCSTR) -> windows_core::Result<()>; fn CreateProcess2Wide(&self, server: u64, commandline: &windows_core::PCWSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCWSTR, environment: &windows_core::PCWSTR) -> windows_core::Result<()>; fn CreateProcessAndAttach2(&self, server: u64, commandline: &windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCSTR, environment: &windows_core::PCSTR, processid: u32, attachflags: u32) -> windows_core::Result<()>; @@ -12567,7 +12567,7 @@ pub trait IDebugClient7_Impl: windows_core::IUnknownImpl { fn SetQuitLockString(&self, string: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetQuitLockStringWide(&self, buffer: windows_core::PWSTR, buffersize: u32, stringsize: *mut u32) -> windows_core::Result<()>; fn SetQuitLockStringWide(&self, string: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetEventContextCallbacks(&self, callbacks: Option<&IDebugEventContextCallbacks>) -> windows_core::Result<()>; + fn SetEventContextCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventContextCallbacks>) -> windows_core::Result<()>; fn SetClientContext(&self, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()>; } impl IDebugClient7_Vtbl { @@ -12702,7 +12702,7 @@ impl IDebugClient7_Vtbl { } unsafe extern "system" fn ExitDispatch(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient7_Impl::ExitDispatch(this, windows_core::from_raw_borrowed(&client)).into() + IDebugClient7_Impl::ExitDispatch(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn CreateClient(this: *mut core::ffi::c_void, client: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12726,7 +12726,7 @@ impl IDebugClient7_Vtbl { } unsafe extern "system" fn SetInputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient7_Impl::SetInputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient7_Impl::SetInputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12740,7 +12740,7 @@ impl IDebugClient7_Vtbl { } unsafe extern "system" fn SetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient7_Impl::SetOutputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient7_Impl::SetOutputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputMask(this: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12758,7 +12758,7 @@ impl IDebugClient7_Vtbl { } unsafe extern "system" fn GetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugClient7_Impl::GetOtherOutputMask(this, windows_core::from_raw_borrowed(&client)) { + match IDebugClient7_Impl::GetOtherOutputMask(this, core::mem::transmute_copy(&client)) { Ok(ok__) => { mask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12768,7 +12768,7 @@ impl IDebugClient7_Vtbl { } unsafe extern "system" fn SetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient7_Impl::SetOtherOutputMask(this, windows_core::from_raw_borrowed(&client), core::mem::transmute_copy(&mask)).into() + IDebugClient7_Impl::SetOtherOutputMask(this, core::mem::transmute_copy(&client), core::mem::transmute_copy(&mask)).into() } unsafe extern "system" fn GetOutputWidth(this: *mut core::ffi::c_void, columns: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12812,7 +12812,7 @@ impl IDebugClient7_Vtbl { } unsafe extern "system" fn SetEventCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient7_Impl::SetEventCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient7_Impl::SetEventCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn FlushCallbacks(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12948,7 +12948,7 @@ impl IDebugClient7_Vtbl { } unsafe extern "system" fn SetOutputCallbacksWide(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient7_Impl::SetOutputCallbacksWide(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient7_Impl::SetOutputCallbacksWide(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputLinePrefixWide(this: *mut core::ffi::c_void, buffer: windows_core::PWSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12978,7 +12978,7 @@ impl IDebugClient7_Vtbl { } unsafe extern "system" fn SetEventCallbacksWide(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient7_Impl::SetEventCallbacksWide(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient7_Impl::SetEventCallbacksWide(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn CreateProcess2(this: *mut core::ffi::c_void, server: u64, commandline: windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: windows_core::PCSTR, environment: windows_core::PCSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13068,7 +13068,7 @@ impl IDebugClient7_Vtbl { } unsafe extern "system" fn SetEventContextCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient7_Impl::SetEventContextCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient7_Impl::SetEventContextCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn SetClientContext(this: *mut core::ffi::c_void, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13788,16 +13788,16 @@ pub trait IDebugClient8_Impl: windows_core::IUnknownImpl { fn EndSession(&self, flags: u32) -> windows_core::Result<()>; fn GetExitCode(&self) -> windows_core::Result; fn DispatchCallbacks(&self, timeout: u32) -> windows_core::Result<()>; - fn ExitDispatch(&self, client: Option<&IDebugClient>) -> windows_core::Result<()>; + fn ExitDispatch(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result<()>; fn CreateClient(&self) -> windows_core::Result; fn GetInputCallbacks(&self) -> windows_core::Result; - fn SetInputCallbacks(&self, callbacks: Option<&IDebugInputCallbacks>) -> windows_core::Result<()>; + fn SetInputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugInputCallbacks>) -> windows_core::Result<()>; fn GetOutputCallbacks(&self) -> windows_core::Result; - fn SetOutputCallbacks(&self, callbacks: Option<&IDebugOutputCallbacks>) -> windows_core::Result<()>; + fn SetOutputCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacks>) -> windows_core::Result<()>; fn GetOutputMask(&self) -> windows_core::Result; fn SetOutputMask(&self, mask: u32) -> windows_core::Result<()>; - fn GetOtherOutputMask(&self, client: Option<&IDebugClient>) -> windows_core::Result; - fn SetOtherOutputMask(&self, client: Option<&IDebugClient>, mask: u32) -> windows_core::Result<()>; + fn GetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>) -> windows_core::Result; + fn SetOtherOutputMask(&self, client: windows_core::Ref<'_, IDebugClient>, mask: u32) -> windows_core::Result<()>; fn GetOutputWidth(&self) -> windows_core::Result; fn SetOutputWidth(&self, columns: u32) -> windows_core::Result<()>; fn GetOutputLinePrefix(&self, buffer: windows_core::PSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; @@ -13805,7 +13805,7 @@ pub trait IDebugClient8_Impl: windows_core::IUnknownImpl { fn GetIdentity(&self, buffer: windows_core::PSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetEventCallbacks(&self) -> windows_core::Result; - fn SetEventCallbacks(&self, callbacks: Option<&IDebugEventCallbacks>) -> windows_core::Result<()>; + fn SetEventCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacks>) -> windows_core::Result<()>; fn FlushCallbacks(&self) -> windows_core::Result<()>; fn WriteDumpFile2(&self, dumpfile: &windows_core::PCSTR, qualifier: u32, formatflags: u32, comment: &windows_core::PCSTR) -> windows_core::Result<()>; fn AddDumpInformationFile(&self, infofile: &windows_core::PCSTR, r#type: u32) -> windows_core::Result<()>; @@ -13833,13 +13833,13 @@ pub trait IDebugClient8_Impl: windows_core::IUnknownImpl { fn StartServerWide(&self, options: &windows_core::PCWSTR) -> windows_core::Result<()>; fn OutputServersWide(&self, outputcontrol: u32, machine: &windows_core::PCWSTR, flags: u32) -> windows_core::Result<()>; fn GetOutputCallbacksWide(&self) -> windows_core::Result; - fn SetOutputCallbacksWide(&self, callbacks: Option<&IDebugOutputCallbacksWide>) -> windows_core::Result<()>; + fn SetOutputCallbacksWide(&self, callbacks: windows_core::Ref<'_, IDebugOutputCallbacksWide>) -> windows_core::Result<()>; fn GetOutputLinePrefixWide(&self, buffer: windows_core::PWSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::Result<()>; fn SetOutputLinePrefixWide(&self, prefix: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetIdentityWide(&self, buffer: windows_core::PWSTR, buffersize: u32, identitysize: *mut u32) -> windows_core::Result<()>; fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetEventCallbacksWide(&self) -> windows_core::Result; - fn SetEventCallbacksWide(&self, callbacks: Option<&IDebugEventCallbacksWide>) -> windows_core::Result<()>; + fn SetEventCallbacksWide(&self, callbacks: windows_core::Ref<'_, IDebugEventCallbacksWide>) -> windows_core::Result<()>; fn CreateProcess2(&self, server: u64, commandline: &windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCSTR, environment: &windows_core::PCSTR) -> windows_core::Result<()>; fn CreateProcess2Wide(&self, server: u64, commandline: &windows_core::PCWSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCWSTR, environment: &windows_core::PCWSTR) -> windows_core::Result<()>; fn CreateProcessAndAttach2(&self, server: u64, commandline: &windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: &windows_core::PCSTR, environment: &windows_core::PCSTR, processid: u32, attachflags: u32) -> windows_core::Result<()>; @@ -13854,7 +13854,7 @@ pub trait IDebugClient8_Impl: windows_core::IUnknownImpl { fn SetQuitLockString(&self, string: &windows_core::PCSTR) -> windows_core::Result<()>; fn GetQuitLockStringWide(&self, buffer: windows_core::PWSTR, buffersize: u32, stringsize: *mut u32) -> windows_core::Result<()>; fn SetQuitLockStringWide(&self, string: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetEventContextCallbacks(&self, callbacks: Option<&IDebugEventContextCallbacks>) -> windows_core::Result<()>; + fn SetEventContextCallbacks(&self, callbacks: windows_core::Ref<'_, IDebugEventContextCallbacks>) -> windows_core::Result<()>; fn SetClientContext(&self, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()>; fn OpenDumpFileWide2(&self, filename: &windows_core::PCWSTR, filehandle: u64, alternatearch: u32) -> windows_core::Result<()>; } @@ -13990,7 +13990,7 @@ impl IDebugClient8_Vtbl { } unsafe extern "system" fn ExitDispatch(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient8_Impl::ExitDispatch(this, windows_core::from_raw_borrowed(&client)).into() + IDebugClient8_Impl::ExitDispatch(this, core::mem::transmute_copy(&client)).into() } unsafe extern "system" fn CreateClient(this: *mut core::ffi::c_void, client: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14014,7 +14014,7 @@ impl IDebugClient8_Vtbl { } unsafe extern "system" fn SetInputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient8_Impl::SetInputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient8_Impl::SetInputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14028,7 +14028,7 @@ impl IDebugClient8_Vtbl { } unsafe extern "system" fn SetOutputCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient8_Impl::SetOutputCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient8_Impl::SetOutputCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputMask(this: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14046,7 +14046,7 @@ impl IDebugClient8_Vtbl { } unsafe extern "system" fn GetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugClient8_Impl::GetOtherOutputMask(this, windows_core::from_raw_borrowed(&client)) { + match IDebugClient8_Impl::GetOtherOutputMask(this, core::mem::transmute_copy(&client)) { Ok(ok__) => { mask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -14056,7 +14056,7 @@ impl IDebugClient8_Vtbl { } unsafe extern "system" fn SetOtherOutputMask(this: *mut core::ffi::c_void, client: *mut core::ffi::c_void, mask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient8_Impl::SetOtherOutputMask(this, windows_core::from_raw_borrowed(&client), core::mem::transmute_copy(&mask)).into() + IDebugClient8_Impl::SetOtherOutputMask(this, core::mem::transmute_copy(&client), core::mem::transmute_copy(&mask)).into() } unsafe extern "system" fn GetOutputWidth(this: *mut core::ffi::c_void, columns: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14100,7 +14100,7 @@ impl IDebugClient8_Vtbl { } unsafe extern "system" fn SetEventCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient8_Impl::SetEventCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient8_Impl::SetEventCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn FlushCallbacks(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14236,7 +14236,7 @@ impl IDebugClient8_Vtbl { } unsafe extern "system" fn SetOutputCallbacksWide(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient8_Impl::SetOutputCallbacksWide(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient8_Impl::SetOutputCallbacksWide(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn GetOutputLinePrefixWide(this: *mut core::ffi::c_void, buffer: windows_core::PWSTR, buffersize: u32, prefixsize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14266,7 +14266,7 @@ impl IDebugClient8_Vtbl { } unsafe extern "system" fn SetEventCallbacksWide(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient8_Impl::SetEventCallbacksWide(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient8_Impl::SetEventCallbacksWide(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn CreateProcess2(this: *mut core::ffi::c_void, server: u64, commandline: windows_core::PCSTR, optionsbuffer: *const core::ffi::c_void, optionsbuffersize: u32, initialdirectory: windows_core::PCSTR, environment: windows_core::PCSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14356,7 +14356,7 @@ impl IDebugClient8_Vtbl { } unsafe extern "system" fn SetEventContextCallbacks(this: *mut core::ffi::c_void, callbacks: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugClient8_Impl::SetEventContextCallbacks(this, windows_core::from_raw_borrowed(&callbacks)).into() + IDebugClient8_Impl::SetEventContextCallbacks(this, core::mem::transmute_copy(&callbacks)).into() } unsafe extern "system" fn SetClientContext(this: *mut core::ffi::c_void, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15051,7 +15051,7 @@ pub trait IDebugControl_Impl: windows_core::IUnknownImpl { fn GetBreakpointById(&self, id: u32) -> windows_core::Result; fn GetBreakpointParameters(&self, count: u32, ids: *const u32, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()>; fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint(&self, bp: Option<&IDebugBreakpoint>) -> windows_core::Result<()>; + fn RemoveBreakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint>) -> windows_core::Result<()>; fn AddExtension(&self, path: &windows_core::PCSTR, flags: u32) -> windows_core::Result; fn RemoveExtension(&self, handle: u64) -> windows_core::Result<()>; fn GetExtensionByPath(&self, path: &windows_core::PCSTR) -> windows_core::Result; @@ -15497,7 +15497,7 @@ impl IDebugControl_Vtbl { } unsafe extern "system" fn RemoveBreakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl_Impl::RemoveBreakpoint(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl_Impl::RemoveBreakpoint(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtension(this: *mut core::ffi::c_void, path: windows_core::PCSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16338,7 +16338,7 @@ pub trait IDebugControl2_Impl: windows_core::IUnknownImpl { fn GetBreakpointById(&self, id: u32) -> windows_core::Result; fn GetBreakpointParameters(&self, count: u32, ids: *const u32, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()>; fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint(&self, bp: Option<&IDebugBreakpoint>) -> windows_core::Result<()>; + fn RemoveBreakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint>) -> windows_core::Result<()>; fn AddExtension(&self, path: &windows_core::PCSTR, flags: u32) -> windows_core::Result; fn RemoveExtension(&self, handle: u64) -> windows_core::Result<()>; fn GetExtensionByPath(&self, path: &windows_core::PCSTR) -> windows_core::Result; @@ -16792,7 +16792,7 @@ impl IDebugControl2_Vtbl { } unsafe extern "system" fn RemoveBreakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl2_Impl::RemoveBreakpoint(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl2_Impl::RemoveBreakpoint(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtension(this: *mut core::ffi::c_void, path: windows_core::PCSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17771,7 +17771,7 @@ pub trait IDebugControl3_Impl: windows_core::IUnknownImpl { fn GetBreakpointById(&self, id: u32) -> windows_core::Result; fn GetBreakpointParameters(&self, count: u32, ids: *const u32, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()>; fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint(&self, bp: Option<&IDebugBreakpoint>) -> windows_core::Result<()>; + fn RemoveBreakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint>) -> windows_core::Result<()>; fn AddExtension(&self, path: &windows_core::PCSTR, flags: u32) -> windows_core::Result; fn RemoveExtension(&self, handle: u64) -> windows_core::Result<()>; fn GetExtensionByPath(&self, path: &windows_core::PCSTR) -> windows_core::Result; @@ -18238,7 +18238,7 @@ impl IDebugControl3_Vtbl { } unsafe extern "system" fn RemoveBreakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl3_Impl::RemoveBreakpoint(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl3_Impl::RemoveBreakpoint(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtension(this: *mut core::ffi::c_void, path: windows_core::PCSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19663,7 +19663,7 @@ pub trait IDebugControl4_Impl: windows_core::IUnknownImpl { fn GetBreakpointById(&self, id: u32) -> windows_core::Result; fn GetBreakpointParameters(&self, count: u32, ids: *const u32, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()>; fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint(&self, bp: Option<&IDebugBreakpoint>) -> windows_core::Result<()>; + fn RemoveBreakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint>) -> windows_core::Result<()>; fn AddExtension(&self, path: &windows_core::PCSTR, flags: u32) -> windows_core::Result; fn RemoveExtension(&self, handle: u64) -> windows_core::Result<()>; fn GetExtensionByPath(&self, path: &windows_core::PCSTR) -> windows_core::Result; @@ -19728,7 +19728,7 @@ pub trait IDebugControl4_Impl: windows_core::IUnknownImpl { fn GetBreakpointByIndex2(&self, index: u32) -> windows_core::Result; fn GetBreakpointById2(&self, id: u32) -> windows_core::Result; fn AddBreakpoint2(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint2(&self, bp: Option<&IDebugBreakpoint2>) -> windows_core::Result<()>; + fn RemoveBreakpoint2(&self, bp: windows_core::Ref<'_, IDebugBreakpoint2>) -> windows_core::Result<()>; fn AddExtensionWide(&self, path: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; fn GetExtensionByPathWide(&self, path: &windows_core::PCWSTR) -> windows_core::Result; fn CallExtensionWide(&self, handle: u64, function: &windows_core::PCWSTR, arguments: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -20183,7 +20183,7 @@ impl IDebugControl4_Vtbl { } unsafe extern "system" fn RemoveBreakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl4_Impl::RemoveBreakpoint(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl4_Impl::RemoveBreakpoint(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtension(this: *mut core::ffi::c_void, path: windows_core::PCSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20545,7 +20545,7 @@ impl IDebugControl4_Vtbl { } unsafe extern "system" fn RemoveBreakpoint2(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl4_Impl::RemoveBreakpoint2(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl4_Impl::RemoveBreakpoint2(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtensionWide(this: *mut core::ffi::c_void, path: windows_core::PCWSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21936,7 +21936,7 @@ pub trait IDebugControl5_Impl: windows_core::IUnknownImpl { fn GetBreakpointById(&self, id: u32) -> windows_core::Result; fn GetBreakpointParameters(&self, count: u32, ids: *const u32, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()>; fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint(&self, bp: Option<&IDebugBreakpoint>) -> windows_core::Result<()>; + fn RemoveBreakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint>) -> windows_core::Result<()>; fn AddExtension(&self, path: &windows_core::PCSTR, flags: u32) -> windows_core::Result; fn RemoveExtension(&self, handle: u64) -> windows_core::Result<()>; fn GetExtensionByPath(&self, path: &windows_core::PCSTR) -> windows_core::Result; @@ -22001,7 +22001,7 @@ pub trait IDebugControl5_Impl: windows_core::IUnknownImpl { fn GetBreakpointByIndex2(&self, index: u32) -> windows_core::Result; fn GetBreakpointById2(&self, id: u32) -> windows_core::Result; fn AddBreakpoint2(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint2(&self, bp: Option<&IDebugBreakpoint2>) -> windows_core::Result<()>; + fn RemoveBreakpoint2(&self, bp: windows_core::Ref<'_, IDebugBreakpoint2>) -> windows_core::Result<()>; fn AddExtensionWide(&self, path: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; fn GetExtensionByPathWide(&self, path: &windows_core::PCWSTR) -> windows_core::Result; fn CallExtensionWide(&self, handle: u64, function: &windows_core::PCWSTR, arguments: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -22461,7 +22461,7 @@ impl IDebugControl5_Vtbl { } unsafe extern "system" fn RemoveBreakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl5_Impl::RemoveBreakpoint(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl5_Impl::RemoveBreakpoint(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtension(this: *mut core::ffi::c_void, path: windows_core::PCSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22823,7 +22823,7 @@ impl IDebugControl5_Vtbl { } unsafe extern "system" fn RemoveBreakpoint2(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl5_Impl::RemoveBreakpoint2(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl5_Impl::RemoveBreakpoint2(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtensionWide(this: *mut core::ffi::c_void, path: windows_core::PCWSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24254,7 +24254,7 @@ pub trait IDebugControl6_Impl: windows_core::IUnknownImpl { fn GetBreakpointById(&self, id: u32) -> windows_core::Result; fn GetBreakpointParameters(&self, count: u32, ids: *const u32, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()>; fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint(&self, bp: Option<&IDebugBreakpoint>) -> windows_core::Result<()>; + fn RemoveBreakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint>) -> windows_core::Result<()>; fn AddExtension(&self, path: &windows_core::PCSTR, flags: u32) -> windows_core::Result; fn RemoveExtension(&self, handle: u64) -> windows_core::Result<()>; fn GetExtensionByPath(&self, path: &windows_core::PCSTR) -> windows_core::Result; @@ -24319,7 +24319,7 @@ pub trait IDebugControl6_Impl: windows_core::IUnknownImpl { fn GetBreakpointByIndex2(&self, index: u32) -> windows_core::Result; fn GetBreakpointById2(&self, id: u32) -> windows_core::Result; fn AddBreakpoint2(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint2(&self, bp: Option<&IDebugBreakpoint2>) -> windows_core::Result<()>; + fn RemoveBreakpoint2(&self, bp: windows_core::Ref<'_, IDebugBreakpoint2>) -> windows_core::Result<()>; fn AddExtensionWide(&self, path: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; fn GetExtensionByPathWide(&self, path: &windows_core::PCWSTR) -> windows_core::Result; fn CallExtensionWide(&self, handle: u64, function: &windows_core::PCWSTR, arguments: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -24781,7 +24781,7 @@ impl IDebugControl6_Vtbl { } unsafe extern "system" fn RemoveBreakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl6_Impl::RemoveBreakpoint(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl6_Impl::RemoveBreakpoint(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtension(this: *mut core::ffi::c_void, path: windows_core::PCSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -25143,7 +25143,7 @@ impl IDebugControl6_Vtbl { } unsafe extern "system" fn RemoveBreakpoint2(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl6_Impl::RemoveBreakpoint2(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl6_Impl::RemoveBreakpoint2(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtensionWide(this: *mut core::ffi::c_void, path: windows_core::PCWSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -26594,7 +26594,7 @@ pub trait IDebugControl7_Impl: windows_core::IUnknownImpl { fn GetBreakpointById(&self, id: u32) -> windows_core::Result; fn GetBreakpointParameters(&self, count: u32, ids: *const u32, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()>; fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint(&self, bp: Option<&IDebugBreakpoint>) -> windows_core::Result<()>; + fn RemoveBreakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint>) -> windows_core::Result<()>; fn AddExtension(&self, path: &windows_core::PCSTR, flags: u32) -> windows_core::Result; fn RemoveExtension(&self, handle: u64) -> windows_core::Result<()>; fn GetExtensionByPath(&self, path: &windows_core::PCSTR) -> windows_core::Result; @@ -26659,7 +26659,7 @@ pub trait IDebugControl7_Impl: windows_core::IUnknownImpl { fn GetBreakpointByIndex2(&self, index: u32) -> windows_core::Result; fn GetBreakpointById2(&self, id: u32) -> windows_core::Result; fn AddBreakpoint2(&self, r#type: u32, desiredid: u32) -> windows_core::Result; - fn RemoveBreakpoint2(&self, bp: Option<&IDebugBreakpoint2>) -> windows_core::Result<()>; + fn RemoveBreakpoint2(&self, bp: windows_core::Ref<'_, IDebugBreakpoint2>) -> windows_core::Result<()>; fn AddExtensionWide(&self, path: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; fn GetExtensionByPathWide(&self, path: &windows_core::PCWSTR) -> windows_core::Result; fn CallExtensionWide(&self, handle: u64, function: &windows_core::PCWSTR, arguments: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -27122,7 +27122,7 @@ impl IDebugControl7_Vtbl { } unsafe extern "system" fn RemoveBreakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl7_Impl::RemoveBreakpoint(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl7_Impl::RemoveBreakpoint(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtension(this: *mut core::ffi::c_void, path: windows_core::PCSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -27484,7 +27484,7 @@ impl IDebugControl7_Vtbl { } unsafe extern "system" fn RemoveBreakpoint2(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugControl7_Impl::RemoveBreakpoint2(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugControl7_Impl::RemoveBreakpoint2(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn AddExtensionWide(this: *mut core::ffi::c_void, path: windows_core::PCWSTR, flags: u32, handle: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29331,7 +29331,7 @@ pub struct IDebugEventCallbacks_Vtbl { } pub trait IDebugEventCallbacks_Impl: windows_core::IUnknownImpl { fn GetInterestMask(&self) -> windows_core::Result; - fn Breakpoint(&self, bp: Option<&IDebugBreakpoint>) -> windows_core::Result<()>; + fn Breakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint>) -> windows_core::Result<()>; fn Exception(&self, exception: *const super::EXCEPTION_RECORD64, firstchance: u32) -> windows_core::Result<()>; fn CreateThread(&self, handle: u64, dataoffset: u64, startoffset: u64) -> windows_core::Result<()>; fn ExitThread(&self, exitcode: u32) -> windows_core::Result<()>; @@ -29359,7 +29359,7 @@ impl IDebugEventCallbacks_Vtbl { } unsafe extern "system" fn Breakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugEventCallbacks_Impl::Breakpoint(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugEventCallbacks_Impl::Breakpoint(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn Exception(this: *mut core::ffi::c_void, exception: *const super::EXCEPTION_RECORD64, firstchance: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29513,7 +29513,7 @@ pub struct IDebugEventCallbacksWide_Vtbl { } pub trait IDebugEventCallbacksWide_Impl: windows_core::IUnknownImpl { fn GetInterestMask(&self) -> windows_core::Result; - fn Breakpoint(&self, bp: Option<&IDebugBreakpoint2>) -> windows_core::Result<()>; + fn Breakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint2>) -> windows_core::Result<()>; fn Exception(&self, exception: *const super::EXCEPTION_RECORD64, firstchance: u32) -> windows_core::Result<()>; fn CreateThread(&self, handle: u64, dataoffset: u64, startoffset: u64) -> windows_core::Result<()>; fn ExitThread(&self, exitcode: u32) -> windows_core::Result<()>; @@ -29541,7 +29541,7 @@ impl IDebugEventCallbacksWide_Vtbl { } unsafe extern "system" fn Breakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugEventCallbacksWide_Impl::Breakpoint(this, windows_core::from_raw_borrowed(&bp)).into() + IDebugEventCallbacksWide_Impl::Breakpoint(this, core::mem::transmute_copy(&bp)).into() } unsafe extern "system" fn Exception(this: *mut core::ffi::c_void, exception: *const super::EXCEPTION_RECORD64, firstchance: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29695,7 +29695,7 @@ pub struct IDebugEventContextCallbacks_Vtbl { } pub trait IDebugEventContextCallbacks_Impl: windows_core::IUnknownImpl { fn GetInterestMask(&self) -> windows_core::Result; - fn Breakpoint(&self, bp: Option<&IDebugBreakpoint2>, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()>; + fn Breakpoint(&self, bp: windows_core::Ref<'_, IDebugBreakpoint2>, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()>; fn Exception(&self, exception: *const super::EXCEPTION_RECORD64, firstchance: u32, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()>; fn CreateThread(&self, handle: u64, dataoffset: u64, startoffset: u64, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()>; fn ExitThread(&self, exitcode: u32, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::Result<()>; @@ -29723,7 +29723,7 @@ impl IDebugEventContextCallbacks_Vtbl { } unsafe extern "system" fn Breakpoint(this: *mut core::ffi::c_void, bp: *mut core::ffi::c_void, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugEventContextCallbacks_Impl::Breakpoint(this, windows_core::from_raw_borrowed(&bp), core::mem::transmute_copy(&context), core::mem::transmute_copy(&contextsize)).into() + IDebugEventContextCallbacks_Impl::Breakpoint(this, core::mem::transmute_copy(&bp), core::mem::transmute_copy(&context), core::mem::transmute_copy(&contextsize)).into() } unsafe extern "system" fn Exception(this: *mut core::ffi::c_void, exception: *const super::EXCEPTION_RECORD64, firstchance: u32, context: *const core::ffi::c_void, contextsize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30184,7 +30184,7 @@ pub trait IDebugFailureAnalysis2_Impl: windows_core::IUnknownImpl { fn AddBuffer(&self, tag: DEBUG_FLR_PARAM_TYPE, entrytype: FA_ENTRY_TYPE, buf: *const core::ffi::c_void, size: u32) -> *mut FA_ENTRY; fn GetDebugFATagControl(&self) -> windows_core::Result; fn GetAnalysisXml(&self) -> windows_core::Result; - fn AddStructuredAnalysisData(&self, tag: DEBUG_FLR_PARAM_TYPE, analysis: Option<&IDebugFailureAnalysis2>) -> windows_core::Result<()>; + fn AddStructuredAnalysisData(&self, tag: DEBUG_FLR_PARAM_TYPE, analysis: windows_core::Ref<'_, IDebugFailureAnalysis2>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] impl IDebugFailureAnalysis2_Vtbl { @@ -30291,7 +30291,7 @@ impl IDebugFailureAnalysis2_Vtbl { } unsafe extern "system" fn AddStructuredAnalysisData(this: *mut core::ffi::c_void, tag: DEBUG_FLR_PARAM_TYPE, analysis: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugFailureAnalysis2_Impl::AddStructuredAnalysisData(this, core::mem::transmute_copy(&tag), windows_core::from_raw_borrowed(&analysis)).into() + IDebugFailureAnalysis2_Impl::AddStructuredAnalysisData(this, core::mem::transmute_copy(&tag), core::mem::transmute_copy(&analysis)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -30563,22 +30563,22 @@ pub trait IDebugFailureAnalysis3_Impl: windows_core::IUnknownImpl { fn AddBuffer(&self, tag: DEBUG_FLR_PARAM_TYPE, entrytype: FA_ENTRY_TYPE, buf: *const core::ffi::c_void, size: u32) -> *mut FA_ENTRY; fn GetDebugFATagControl(&self) -> windows_core::Result; fn GetAnalysisXml(&self) -> windows_core::Result; - fn AddStructuredAnalysisData(&self, tag: DEBUG_FLR_PARAM_TYPE, analysis: Option<&IDebugFailureAnalysis2>) -> windows_core::Result<()>; - fn AddThreads(&self, pdebugfailurethreadenum: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddStructuredAnalysisData(&self, tag: DEBUG_FLR_PARAM_TYPE, analysis: windows_core::Ref<'_, IDebugFailureAnalysis2>) -> windows_core::Result<()>; + fn AddThreads(&self, pdebugfailurethreadenum: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn AttributeGet(&self, nindex: u32) -> windows_core::Result; fn AttributeGetName(&self, nindex: u32) -> windows_core::Result; fn AttributeSet(&self, nindex: u32, value: &super::super::super::Variant::VARIANT) -> windows_core::Result<()>; fn BlameApplication(&self, postfix: &windows_core::BSTR) -> windows_core::Result<()>; fn BlameProcess(&self, postfix: &windows_core::BSTR) -> windows_core::Result<()>; - fn BlameThread(&self, pthread: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn BlameStitch(&self, pthread: Option<&windows_core::IUnknown>, stitch: &windows_core::BSTR) -> windows_core::Result<()>; + fn BlameThread(&self, pthread: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn BlameStitch(&self, pthread: windows_core::Ref<'_, windows_core::IUnknown>, stitch: &windows_core::BSTR) -> windows_core::Result<()>; fn BlameTEB(&self, address: u64) -> windows_core::Result<()>; fn BlameETHREAD(&self, address: u64) -> windows_core::Result<()>; fn ProblemClassIsSet(&self, nindex: u32) -> windows_core::Result; fn ProblemClassDelete(&self, nindex: u32) -> windows_core::Result<()>; fn ProblemClassSet(&self, nindex: u32) -> windows_core::Result<()>; fn ProblemClassSetBSTR(&self, nindex: u32, value: &windows_core::BSTR) -> windows_core::Result<()>; - fn SetAdditionalXML(&self, key: &windows_core::BSTR, pxmldomelement: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetAdditionalXML(&self, key: &windows_core::BSTR, pxmldomelement: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetAdditionalXML(&self, key: &windows_core::BSTR) -> windows_core::Result; fn DeleteAdditionalXML(&self, key: &windows_core::BSTR) -> windows_core::Result<()>; } @@ -30687,11 +30687,11 @@ impl IDebugFailureAnalysis3_Vtbl { } unsafe extern "system" fn AddStructuredAnalysisData(this: *mut core::ffi::c_void, tag: DEBUG_FLR_PARAM_TYPE, analysis: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugFailureAnalysis3_Impl::AddStructuredAnalysisData(this, core::mem::transmute_copy(&tag), windows_core::from_raw_borrowed(&analysis)).into() + IDebugFailureAnalysis3_Impl::AddStructuredAnalysisData(this, core::mem::transmute_copy(&tag), core::mem::transmute_copy(&analysis)).into() } unsafe extern "system" fn AddThreads(this: *mut core::ffi::c_void, pdebugfailurethreadenum: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugFailureAnalysis3_Impl::AddThreads(this, windows_core::from_raw_borrowed(&pdebugfailurethreadenum)).into() + IDebugFailureAnalysis3_Impl::AddThreads(this, core::mem::transmute_copy(&pdebugfailurethreadenum)).into() } unsafe extern "system" fn AttributeGet(this: *mut core::ffi::c_void, nindex: u32, pvalue: *mut super::super::super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30727,11 +30727,11 @@ impl IDebugFailureAnalysis3_Vtbl { } unsafe extern "system" fn BlameThread(this: *mut core::ffi::c_void, pthread: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugFailureAnalysis3_Impl::BlameThread(this, windows_core::from_raw_borrowed(&pthread)).into() + IDebugFailureAnalysis3_Impl::BlameThread(this, core::mem::transmute_copy(&pthread)).into() } unsafe extern "system" fn BlameStitch(this: *mut core::ffi::c_void, pthread: *mut core::ffi::c_void, stitch: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugFailureAnalysis3_Impl::BlameStitch(this, windows_core::from_raw_borrowed(&pthread), core::mem::transmute(&stitch)).into() + IDebugFailureAnalysis3_Impl::BlameStitch(this, core::mem::transmute_copy(&pthread), core::mem::transmute(&stitch)).into() } unsafe extern "system" fn BlameTEB(this: *mut core::ffi::c_void, address: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30765,7 +30765,7 @@ impl IDebugFailureAnalysis3_Vtbl { } unsafe extern "system" fn SetAdditionalXML(this: *mut core::ffi::c_void, key: *mut core::ffi::c_void, pxmldomelement: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugFailureAnalysis3_Impl::SetAdditionalXML(this, core::mem::transmute(&key), windows_core::from_raw_borrowed(&pxmldomelement)).into() + IDebugFailureAnalysis3_Impl::SetAdditionalXML(this, core::mem::transmute(&key), core::mem::transmute_copy(&pxmldomelement)).into() } unsafe extern "system" fn GetAdditionalXML(this: *mut core::ffi::c_void, key: *mut core::ffi::c_void, ppxmldomelement: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31009,13 +31009,13 @@ pub struct IDebugHostContext_Vtbl { pub IsEqualTo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT, } pub trait IDebugHostContext_Impl: windows_core::IUnknownImpl { - fn IsEqualTo(&self, pcontext: Option<&IDebugHostContext>) -> windows_core::Result; + fn IsEqualTo(&self, pcontext: windows_core::Ref<'_, IDebugHostContext>) -> windows_core::Result; } impl IDebugHostContext_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsEqualTo(this: *mut core::ffi::c_void, pcontext: *mut core::ffi::c_void, pisequal: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostContext_Impl::IsEqualTo(this, windows_core::from_raw_borrowed(&pcontext)) { + match IDebugHostContext_Impl::IsEqualTo(this, core::mem::transmute_copy(&pcontext)) { Ok(ok__) => { pisequal.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -31173,18 +31173,18 @@ pub struct IDebugHostEvaluator_Vtbl { pub EvaluateExtendedExpression: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugHostEvaluator_Impl: windows_core::IUnknownImpl { - fn EvaluateExpression(&self, context: Option<&IDebugHostContext>, expression: &windows_core::PCWSTR, bindingcontext: Option<&IModelObject>, result: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn EvaluateExtendedExpression(&self, context: Option<&IDebugHostContext>, expression: &windows_core::PCWSTR, bindingcontext: Option<&IModelObject>, result: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; + fn EvaluateExpression(&self, context: windows_core::Ref<'_, IDebugHostContext>, expression: &windows_core::PCWSTR, bindingcontext: windows_core::Ref<'_, IModelObject>, result: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn EvaluateExtendedExpression(&self, context: windows_core::Ref<'_, IDebugHostContext>, expression: &windows_core::PCWSTR, bindingcontext: windows_core::Ref<'_, IModelObject>, result: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; } impl IDebugHostEvaluator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EvaluateExpression(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, expression: windows_core::PCWSTR, bindingcontext: *mut core::ffi::c_void, result: *mut *mut core::ffi::c_void, metadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostEvaluator_Impl::EvaluateExpression(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&expression), windows_core::from_raw_borrowed(&bindingcontext), core::mem::transmute_copy(&result), core::mem::transmute_copy(&metadata)).into() + IDebugHostEvaluator_Impl::EvaluateExpression(this, core::mem::transmute_copy(&context), core::mem::transmute(&expression), core::mem::transmute_copy(&bindingcontext), core::mem::transmute_copy(&result), core::mem::transmute_copy(&metadata)).into() } unsafe extern "system" fn EvaluateExtendedExpression(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, expression: windows_core::PCWSTR, bindingcontext: *mut core::ffi::c_void, result: *mut *mut core::ffi::c_void, metadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostEvaluator_Impl::EvaluateExtendedExpression(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&expression), windows_core::from_raw_borrowed(&bindingcontext), core::mem::transmute_copy(&result), core::mem::transmute_copy(&metadata)).into() + IDebugHostEvaluator_Impl::EvaluateExtendedExpression(this, core::mem::transmute_copy(&context), core::mem::transmute(&expression), core::mem::transmute_copy(&bindingcontext), core::mem::transmute_copy(&result), core::mem::transmute_copy(&metadata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -31220,13 +31220,13 @@ pub struct IDebugHostEvaluator2_Vtbl { pub AssignTo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugHostEvaluator2_Impl: IDebugHostEvaluator_Impl { - fn AssignTo(&self, assignmentreference: Option<&IModelObject>, assignmentvalue: Option<&IModelObject>, assignmentresult: *mut Option, assignmentmetadata: *mut Option) -> windows_core::Result<()>; + fn AssignTo(&self, assignmentreference: windows_core::Ref<'_, IModelObject>, assignmentvalue: windows_core::Ref<'_, IModelObject>, assignmentresult: windows_core::OutRef<'_, IModelObject>, assignmentmetadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; } impl IDebugHostEvaluator2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AssignTo(this: *mut core::ffi::c_void, assignmentreference: *mut core::ffi::c_void, assignmentvalue: *mut core::ffi::c_void, assignmentresult: *mut *mut core::ffi::c_void, assignmentmetadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostEvaluator2_Impl::AssignTo(this, windows_core::from_raw_borrowed(&assignmentreference), windows_core::from_raw_borrowed(&assignmentvalue), core::mem::transmute_copy(&assignmentresult), core::mem::transmute_copy(&assignmentmetadata)).into() + IDebugHostEvaluator2_Impl::AssignTo(this, core::mem::transmute_copy(&assignmentreference), core::mem::transmute_copy(&assignmentvalue), core::mem::transmute_copy(&assignmentresult), core::mem::transmute_copy(&assignmentmetadata)).into() } Self { base__: IDebugHostEvaluator_Vtbl::new::(), AssignTo: AssignTo:: } } @@ -31259,14 +31259,14 @@ pub struct IDebugHostExtensibility_Vtbl { pub DestroyFunctionAlias: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR) -> windows_core::HRESULT, } pub trait IDebugHostExtensibility_Impl: windows_core::IUnknownImpl { - fn CreateFunctionAlias(&self, aliasname: &windows_core::PCWSTR, functionobject: Option<&IModelObject>) -> windows_core::Result<()>; + fn CreateFunctionAlias(&self, aliasname: &windows_core::PCWSTR, functionobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; fn DestroyFunctionAlias(&self, aliasname: &windows_core::PCWSTR) -> windows_core::Result<()>; } impl IDebugHostExtensibility_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFunctionAlias(this: *mut core::ffi::c_void, aliasname: windows_core::PCWSTR, functionobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostExtensibility_Impl::CreateFunctionAlias(this, core::mem::transmute(&aliasname), windows_core::from_raw_borrowed(&functionobject)).into() + IDebugHostExtensibility_Impl::CreateFunctionAlias(this, core::mem::transmute(&aliasname), core::mem::transmute_copy(&functionobject)).into() } unsafe extern "system" fn DestroyFunctionAlias(this: *mut core::ffi::c_void, aliasname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31430,33 +31430,33 @@ pub struct IDebugHostMemory_Vtbl { pub GetDisplayStringForLocation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, Location, u8, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugHostMemory_Impl: windows_core::IUnknownImpl { - fn ReadBytes(&self, context: Option<&IDebugHostContext>, location: &Location, buffer: *mut core::ffi::c_void, buffersize: u64, bytesread: *mut u64) -> windows_core::Result<()>; - fn WriteBytes(&self, context: Option<&IDebugHostContext>, location: &Location, buffer: *const core::ffi::c_void, buffersize: u64, byteswritten: *mut u64) -> windows_core::Result<()>; - fn ReadPointers(&self, context: Option<&IDebugHostContext>, location: &Location, count: u64, pointers: *mut u64) -> windows_core::Result<()>; - fn WritePointers(&self, context: Option<&IDebugHostContext>, location: &Location, count: u64, pointers: *const u64) -> windows_core::Result<()>; - fn GetDisplayStringForLocation(&self, context: Option<&IDebugHostContext>, location: &Location, verbose: u8) -> windows_core::Result; + fn ReadBytes(&self, context: windows_core::Ref<'_, IDebugHostContext>, location: &Location, buffer: *mut core::ffi::c_void, buffersize: u64, bytesread: *mut u64) -> windows_core::Result<()>; + fn WriteBytes(&self, context: windows_core::Ref<'_, IDebugHostContext>, location: &Location, buffer: *const core::ffi::c_void, buffersize: u64, byteswritten: *mut u64) -> windows_core::Result<()>; + fn ReadPointers(&self, context: windows_core::Ref<'_, IDebugHostContext>, location: &Location, count: u64, pointers: *mut u64) -> windows_core::Result<()>; + fn WritePointers(&self, context: windows_core::Ref<'_, IDebugHostContext>, location: &Location, count: u64, pointers: *const u64) -> windows_core::Result<()>; + fn GetDisplayStringForLocation(&self, context: windows_core::Ref<'_, IDebugHostContext>, location: &Location, verbose: u8) -> windows_core::Result; } impl IDebugHostMemory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ReadBytes(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, location: Location, buffer: *mut core::ffi::c_void, buffersize: u64, bytesread: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostMemory_Impl::ReadBytes(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&location), core::mem::transmute_copy(&buffer), core::mem::transmute_copy(&buffersize), core::mem::transmute_copy(&bytesread)).into() + IDebugHostMemory_Impl::ReadBytes(this, core::mem::transmute_copy(&context), core::mem::transmute(&location), core::mem::transmute_copy(&buffer), core::mem::transmute_copy(&buffersize), core::mem::transmute_copy(&bytesread)).into() } unsafe extern "system" fn WriteBytes(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, location: Location, buffer: *const core::ffi::c_void, buffersize: u64, byteswritten: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostMemory_Impl::WriteBytes(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&location), core::mem::transmute_copy(&buffer), core::mem::transmute_copy(&buffersize), core::mem::transmute_copy(&byteswritten)).into() + IDebugHostMemory_Impl::WriteBytes(this, core::mem::transmute_copy(&context), core::mem::transmute(&location), core::mem::transmute_copy(&buffer), core::mem::transmute_copy(&buffersize), core::mem::transmute_copy(&byteswritten)).into() } unsafe extern "system" fn ReadPointers(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, location: Location, count: u64, pointers: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostMemory_Impl::ReadPointers(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&location), core::mem::transmute_copy(&count), core::mem::transmute_copy(&pointers)).into() + IDebugHostMemory_Impl::ReadPointers(this, core::mem::transmute_copy(&context), core::mem::transmute(&location), core::mem::transmute_copy(&count), core::mem::transmute_copy(&pointers)).into() } unsafe extern "system" fn WritePointers(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, location: Location, count: u64, pointers: *const u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostMemory_Impl::WritePointers(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&location), core::mem::transmute_copy(&count), core::mem::transmute_copy(&pointers)).into() + IDebugHostMemory_Impl::WritePointers(this, core::mem::transmute_copy(&context), core::mem::transmute(&location), core::mem::transmute_copy(&count), core::mem::transmute_copy(&pointers)).into() } unsafe extern "system" fn GetDisplayStringForLocation(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, location: Location, verbose: u8, locationname: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostMemory_Impl::GetDisplayStringForLocation(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&location), core::mem::transmute_copy(&verbose)) { + match IDebugHostMemory_Impl::GetDisplayStringForLocation(this, core::mem::transmute_copy(&context), core::mem::transmute(&location), core::mem::transmute_copy(&verbose)) { Ok(ok__) => { locationname.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -31501,13 +31501,13 @@ pub struct IDebugHostMemory2_Vtbl { pub LinearizeLocation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, Location, *mut Location) -> windows_core::HRESULT, } pub trait IDebugHostMemory2_Impl: IDebugHostMemory_Impl { - fn LinearizeLocation(&self, context: Option<&IDebugHostContext>, location: &Location) -> windows_core::Result; + fn LinearizeLocation(&self, context: windows_core::Ref<'_, IDebugHostContext>, location: &Location) -> windows_core::Result; } impl IDebugHostMemory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn LinearizeLocation(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, location: Location, plinearizedlocation: *mut Location) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostMemory2_Impl::LinearizeLocation(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&location)) { + match IDebugHostMemory2_Impl::LinearizeLocation(this, core::mem::transmute_copy(&context), core::mem::transmute(&location)) { Ok(ok__) => { plinearizedlocation.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -31669,7 +31669,7 @@ pub struct IDebugHostModule2_Vtbl { pub FindContainingSymbolByRVA: unsafe extern "system" fn(*mut core::ffi::c_void, u64, *mut *mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT, } pub trait IDebugHostModule2_Impl: IDebugHostModule_Impl { - fn FindContainingSymbolByRVA(&self, rva: u64, symbol: *mut Option, offset: *mut u64) -> windows_core::Result<()>; + fn FindContainingSymbolByRVA(&self, rva: u64, symbol: windows_core::OutRef<'_, IDebugHostSymbol>, offset: *mut u64) -> windows_core::Result<()>; } impl IDebugHostModule2_Vtbl { pub const fn new() -> Self { @@ -31701,13 +31701,13 @@ pub struct IDebugHostModuleSignature_Vtbl { pub IsMatch: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT, } pub trait IDebugHostModuleSignature_Impl: windows_core::IUnknownImpl { - fn IsMatch(&self, pmodule: Option<&IDebugHostModule>) -> windows_core::Result; + fn IsMatch(&self, pmodule: windows_core::Ref<'_, IDebugHostModule>) -> windows_core::Result; } impl IDebugHostModuleSignature_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsMatch(this: *mut core::ffi::c_void, pmodule: *mut core::ffi::c_void, ismatch: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostModuleSignature_Impl::IsMatch(this, windows_core::from_raw_borrowed(&pmodule)) { + match IDebugHostModuleSignature_Impl::IsMatch(this, core::mem::transmute_copy(&pmodule)) { Ok(ok__) => { ismatch.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -31800,13 +31800,13 @@ pub struct IDebugHostScriptHost_Vtbl { pub CreateContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDebugHostScriptHost_Impl: windows_core::IUnknownImpl { - fn CreateContext(&self, script: Option<&IDataModelScript>) -> windows_core::Result; + fn CreateContext(&self, script: windows_core::Ref<'_, IDataModelScript>) -> windows_core::Result; } impl IDebugHostScriptHost_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateContext(this: *mut core::ffi::c_void, script: *mut core::ffi::c_void, scriptcontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostScriptHost_Impl::CreateContext(this, windows_core::from_raw_borrowed(&script)) { + match IDebugHostScriptHost_Impl::CreateContext(this, core::mem::transmute_copy(&script)) { Ok(ok__) => { scriptcontext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -31912,7 +31912,7 @@ pub trait IDebugHostSymbol_Impl: windows_core::IUnknownImpl { fn GetName(&self) -> windows_core::Result; fn GetType(&self) -> windows_core::Result; fn GetContainingModule(&self) -> windows_core::Result; - fn CompareAgainst(&self, pcomparisonsymbol: Option<&IDebugHostSymbol>, comparisonflags: u32) -> windows_core::Result; + fn CompareAgainst(&self, pcomparisonsymbol: windows_core::Ref<'_, IDebugHostSymbol>, comparisonflags: u32) -> windows_core::Result; } impl IDebugHostSymbol_Vtbl { pub const fn new() -> Self { @@ -31978,7 +31978,7 @@ impl IDebugHostSymbol_Vtbl { } unsafe extern "system" fn CompareAgainst(this: *mut core::ffi::c_void, pcomparisonsymbol: *mut core::ffi::c_void, comparisonflags: u32, pmatches: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostSymbol_Impl::CompareAgainst(this, windows_core::from_raw_borrowed(&pcomparisonsymbol), core::mem::transmute_copy(&comparisonflags)) { + match IDebugHostSymbol_Impl::CompareAgainst(this, core::mem::transmute_copy(&pcomparisonsymbol), core::mem::transmute_copy(&comparisonflags)) { Ok(ok__) => { pmatches.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32160,12 +32160,12 @@ pub struct IDebugHostSymbols_Vtbl { } pub trait IDebugHostSymbols_Impl: windows_core::IUnknownImpl { fn CreateModuleSignature(&self, pwszmodulename: &windows_core::PCWSTR, pwszminversion: &windows_core::PCWSTR, pwszmaxversion: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateTypeSignature(&self, signaturespecification: &windows_core::PCWSTR, module: Option<&IDebugHostModule>) -> windows_core::Result; + fn CreateTypeSignature(&self, signaturespecification: &windows_core::PCWSTR, module: windows_core::Ref<'_, IDebugHostModule>) -> windows_core::Result; fn CreateTypeSignatureForModuleRange(&self, signaturespecification: &windows_core::PCWSTR, modulename: &windows_core::PCWSTR, minversion: &windows_core::PCWSTR, maxversion: &windows_core::PCWSTR) -> windows_core::Result; - fn EnumerateModules(&self, context: Option<&IDebugHostContext>) -> windows_core::Result; - fn FindModuleByName(&self, context: Option<&IDebugHostContext>, modulename: &windows_core::PCWSTR) -> windows_core::Result; - fn FindModuleByLocation(&self, context: Option<&IDebugHostContext>, modulelocation: &Location) -> windows_core::Result; - fn GetMostDerivedObject(&self, pcontext: Option<&IDebugHostContext>, location: &Location, objecttype: Option<&IDebugHostType>, derivedlocation: *mut Location, derivedtype: *mut Option) -> windows_core::Result<()>; + fn EnumerateModules(&self, context: windows_core::Ref<'_, IDebugHostContext>) -> windows_core::Result; + fn FindModuleByName(&self, context: windows_core::Ref<'_, IDebugHostContext>, modulename: &windows_core::PCWSTR) -> windows_core::Result; + fn FindModuleByLocation(&self, context: windows_core::Ref<'_, IDebugHostContext>, modulelocation: &Location) -> windows_core::Result; + fn GetMostDerivedObject(&self, pcontext: windows_core::Ref<'_, IDebugHostContext>, location: &Location, objecttype: windows_core::Ref<'_, IDebugHostType>, derivedlocation: *mut Location, derivedtype: windows_core::OutRef<'_, IDebugHostType>) -> windows_core::Result<()>; } impl IDebugHostSymbols_Vtbl { pub const fn new() -> Self { @@ -32181,7 +32181,7 @@ impl IDebugHostSymbols_Vtbl { } unsafe extern "system" fn CreateTypeSignature(this: *mut core::ffi::c_void, signaturespecification: windows_core::PCWSTR, module: *mut core::ffi::c_void, typesignature: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostSymbols_Impl::CreateTypeSignature(this, core::mem::transmute(&signaturespecification), windows_core::from_raw_borrowed(&module)) { + match IDebugHostSymbols_Impl::CreateTypeSignature(this, core::mem::transmute(&signaturespecification), core::mem::transmute_copy(&module)) { Ok(ok__) => { typesignature.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32201,7 +32201,7 @@ impl IDebugHostSymbols_Vtbl { } unsafe extern "system" fn EnumerateModules(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, moduleenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostSymbols_Impl::EnumerateModules(this, windows_core::from_raw_borrowed(&context)) { + match IDebugHostSymbols_Impl::EnumerateModules(this, core::mem::transmute_copy(&context)) { Ok(ok__) => { moduleenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32211,7 +32211,7 @@ impl IDebugHostSymbols_Vtbl { } unsafe extern "system" fn FindModuleByName(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, modulename: windows_core::PCWSTR, module: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostSymbols_Impl::FindModuleByName(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&modulename)) { + match IDebugHostSymbols_Impl::FindModuleByName(this, core::mem::transmute_copy(&context), core::mem::transmute(&modulename)) { Ok(ok__) => { module.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32221,7 +32221,7 @@ impl IDebugHostSymbols_Vtbl { } unsafe extern "system" fn FindModuleByLocation(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void, modulelocation: Location, module: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostSymbols_Impl::FindModuleByLocation(this, windows_core::from_raw_borrowed(&context), core::mem::transmute(&modulelocation)) { + match IDebugHostSymbols_Impl::FindModuleByLocation(this, core::mem::transmute_copy(&context), core::mem::transmute(&modulelocation)) { Ok(ok__) => { module.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -32231,7 +32231,7 @@ impl IDebugHostSymbols_Vtbl { } unsafe extern "system" fn GetMostDerivedObject(this: *mut core::ffi::c_void, pcontext: *mut core::ffi::c_void, location: Location, objecttype: *mut core::ffi::c_void, derivedlocation: *mut Location, derivedtype: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostSymbols_Impl::GetMostDerivedObject(this, windows_core::from_raw_borrowed(&pcontext), core::mem::transmute(&location), windows_core::from_raw_borrowed(&objecttype), core::mem::transmute_copy(&derivedlocation), core::mem::transmute_copy(&derivedtype)).into() + IDebugHostSymbols_Impl::GetMostDerivedObject(this, core::mem::transmute_copy(&pcontext), core::mem::transmute(&location), core::mem::transmute_copy(&objecttype), core::mem::transmute_copy(&derivedlocation), core::mem::transmute_copy(&derivedtype)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -32720,8 +32720,8 @@ pub struct IDebugHostTypeSignature_Vtbl { } pub trait IDebugHostTypeSignature_Impl: windows_core::IUnknownImpl { fn GetHashCode(&self) -> windows_core::Result; - fn IsMatch(&self, r#type: Option<&IDebugHostType>, ismatch: *mut bool, wildcardmatches: *mut Option) -> windows_core::Result<()>; - fn CompareAgainst(&self, typesignature: Option<&IDebugHostTypeSignature>) -> windows_core::Result; + fn IsMatch(&self, r#type: windows_core::Ref<'_, IDebugHostType>, ismatch: *mut bool, wildcardmatches: windows_core::OutRef<'_, IDebugHostSymbolEnumerator>) -> windows_core::Result<()>; + fn CompareAgainst(&self, typesignature: windows_core::Ref<'_, IDebugHostTypeSignature>) -> windows_core::Result; } impl IDebugHostTypeSignature_Vtbl { pub const fn new() -> Self { @@ -32737,11 +32737,11 @@ impl IDebugHostTypeSignature_Vtbl { } unsafe extern "system" fn IsMatch(this: *mut core::ffi::c_void, r#type: *mut core::ffi::c_void, ismatch: *mut bool, wildcardmatches: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugHostTypeSignature_Impl::IsMatch(this, windows_core::from_raw_borrowed(&r#type), core::mem::transmute_copy(&ismatch), core::mem::transmute_copy(&wildcardmatches)).into() + IDebugHostTypeSignature_Impl::IsMatch(this, core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&ismatch), core::mem::transmute_copy(&wildcardmatches)).into() } unsafe extern "system" fn CompareAgainst(this: *mut core::ffi::c_void, typesignature: *mut core::ffi::c_void, result: *mut SignatureComparison) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugHostTypeSignature_Impl::CompareAgainst(this, windows_core::from_raw_borrowed(&typesignature)) { + match IDebugHostTypeSignature_Impl::CompareAgainst(this, core::mem::transmute_copy(&typesignature)) { Ok(ok__) => { result.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -33137,8 +33137,8 @@ pub struct IDebugPlmClient3_Vtbl { pub trait IDebugPlmClient3_Impl: windows_core::IUnknownImpl { fn LaunchPlmPackageForDebugWide(&self, server: u64, timeout: u32, packagefullname: &windows_core::PCWSTR, appname: &windows_core::PCWSTR, arguments: &windows_core::PCWSTR, processid: *mut u32, threadid: *mut u32) -> windows_core::Result<()>; fn LaunchPlmBgTaskForDebugWide(&self, server: u64, timeout: u32, packagefullname: &windows_core::PCWSTR, backgroundtaskid: &windows_core::PCWSTR, processid: *mut u32, threadid: *mut u32) -> windows_core::Result<()>; - fn QueryPlmPackageWide(&self, server: u64, packagefullname: &windows_core::PCWSTR, stream: Option<&IDebugOutputStream>) -> windows_core::Result<()>; - fn QueryPlmPackageList(&self, server: u64, stream: Option<&IDebugOutputStream>) -> windows_core::Result<()>; + fn QueryPlmPackageWide(&self, server: u64, packagefullname: &windows_core::PCWSTR, stream: windows_core::Ref<'_, IDebugOutputStream>) -> windows_core::Result<()>; + fn QueryPlmPackageList(&self, server: u64, stream: windows_core::Ref<'_, IDebugOutputStream>) -> windows_core::Result<()>; fn EnablePlmPackageDebugWide(&self, server: u64, packagefullname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn DisablePlmPackageDebugWide(&self, server: u64, packagefullname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SuspendPlmPackageWide(&self, server: u64, packagefullname: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -33159,11 +33159,11 @@ impl IDebugPlmClient3_Vtbl { } unsafe extern "system" fn QueryPlmPackageWide(this: *mut core::ffi::c_void, server: u64, packagefullname: windows_core::PCWSTR, stream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugPlmClient3_Impl::QueryPlmPackageWide(this, core::mem::transmute_copy(&server), core::mem::transmute(&packagefullname), windows_core::from_raw_borrowed(&stream)).into() + IDebugPlmClient3_Impl::QueryPlmPackageWide(this, core::mem::transmute_copy(&server), core::mem::transmute(&packagefullname), core::mem::transmute_copy(&stream)).into() } unsafe extern "system" fn QueryPlmPackageList(this: *mut core::ffi::c_void, server: u64, stream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDebugPlmClient3_Impl::QueryPlmPackageList(this, core::mem::transmute_copy(&server), windows_core::from_raw_borrowed(&stream)).into() + IDebugPlmClient3_Impl::QueryPlmPackageList(this, core::mem::transmute_copy(&server), core::mem::transmute_copy(&stream)).into() } unsafe extern "system" fn EnablePlmPackageDebugWide(this: *mut core::ffi::c_void, server: u64, packagefullname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -34517,7 +34517,7 @@ pub trait IDebugSymbols_Impl: windows_core::IUnknownImpl { fn GetScope(&self, instructionoffset: *mut u64, scopeframe: *mut DEBUG_STACK_FRAME, scopecontext: *mut core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn SetScope(&self, instructionoffset: u64, scopeframe: *const DEBUG_STACK_FRAME, scopecontext: *const core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn ResetScope(&self) -> windows_core::Result<()>; - fn GetScopeSymbolGroup(&self, flags: u32, update: Option<&IDebugSymbolGroup>) -> windows_core::Result; + fn GetScopeSymbolGroup(&self, flags: u32, update: windows_core::Ref<'_, IDebugSymbolGroup>) -> windows_core::Result; fn CreateSymbolGroup(&self) -> windows_core::Result; fn StartSymbolMatch(&self, pattern: &windows_core::PCSTR) -> windows_core::Result; fn GetNextSymbolMatch(&self, handle: u64, buffer: windows_core::PSTR, buffersize: u32, matchsize: *mut u32, offset: *mut u64) -> windows_core::Result<()>; @@ -34726,7 +34726,7 @@ impl IDebugSymbols_Vtbl { } unsafe extern "system" fn GetScopeSymbolGroup(this: *mut core::ffi::c_void, flags: u32, update: *mut core::ffi::c_void, symbols: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugSymbols_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&update)) { + match IDebugSymbols_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&update)) { Ok(ok__) => { symbols.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -35223,7 +35223,7 @@ pub trait IDebugSymbols2_Impl: windows_core::IUnknownImpl { fn GetScope(&self, instructionoffset: *mut u64, scopeframe: *mut DEBUG_STACK_FRAME, scopecontext: *mut core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn SetScope(&self, instructionoffset: u64, scopeframe: *const DEBUG_STACK_FRAME, scopecontext: *const core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn ResetScope(&self) -> windows_core::Result<()>; - fn GetScopeSymbolGroup(&self, flags: u32, update: Option<&IDebugSymbolGroup>) -> windows_core::Result; + fn GetScopeSymbolGroup(&self, flags: u32, update: windows_core::Ref<'_, IDebugSymbolGroup>) -> windows_core::Result; fn CreateSymbolGroup(&self) -> windows_core::Result; fn StartSymbolMatch(&self, pattern: &windows_core::PCSTR) -> windows_core::Result; fn GetNextSymbolMatch(&self, handle: u64, buffer: windows_core::PSTR, buffersize: u32, matchsize: *mut u32, offset: *mut u64) -> windows_core::Result<()>; @@ -35440,7 +35440,7 @@ impl IDebugSymbols2_Vtbl { } unsafe extern "system" fn GetScopeSymbolGroup(this: *mut core::ffi::c_void, flags: u32, update: *mut core::ffi::c_void, symbols: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugSymbols2_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&update)) { + match IDebugSymbols2_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&update)) { Ok(ok__) => { symbols.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -36353,7 +36353,7 @@ pub trait IDebugSymbols3_Impl: windows_core::IUnknownImpl { fn GetScope(&self, instructionoffset: *mut u64, scopeframe: *mut DEBUG_STACK_FRAME, scopecontext: *mut core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn SetScope(&self, instructionoffset: u64, scopeframe: *const DEBUG_STACK_FRAME, scopecontext: *const core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn ResetScope(&self) -> windows_core::Result<()>; - fn GetScopeSymbolGroup(&self, flags: u32, update: Option<&IDebugSymbolGroup>) -> windows_core::Result; + fn GetScopeSymbolGroup(&self, flags: u32, update: windows_core::Ref<'_, IDebugSymbolGroup>) -> windows_core::Result; fn CreateSymbolGroup(&self) -> windows_core::Result; fn StartSymbolMatch(&self, pattern: &windows_core::PCSTR) -> windows_core::Result; fn GetNextSymbolMatch(&self, handle: u64, buffer: windows_core::PSTR, buffersize: u32, matchsize: *mut u32, offset: *mut u64) -> windows_core::Result<()>; @@ -36390,7 +36390,7 @@ pub trait IDebugSymbols3_Impl: windows_core::IUnknownImpl { fn GetTypeIdWide(&self, module: u64, name: &windows_core::PCWSTR) -> windows_core::Result; fn GetFieldOffsetWide(&self, module: u64, typeid: u32, field: &windows_core::PCWSTR) -> windows_core::Result; fn GetSymbolTypeIdWide(&self, symbol: &windows_core::PCWSTR, typeid: *mut u32, module: *mut u64) -> windows_core::Result<()>; - fn GetScopeSymbolGroup2(&self, flags: u32, update: Option<&IDebugSymbolGroup2>) -> windows_core::Result; + fn GetScopeSymbolGroup2(&self, flags: u32, update: windows_core::Ref<'_, IDebugSymbolGroup2>) -> windows_core::Result; fn CreateSymbolGroup2(&self) -> windows_core::Result; fn StartSymbolMatchWide(&self, pattern: &windows_core::PCWSTR) -> windows_core::Result; fn GetNextSymbolMatchWide(&self, handle: u64, buffer: windows_core::PWSTR, buffersize: u32, matchsize: *mut u32, offset: *mut u64) -> windows_core::Result<()>; @@ -36636,7 +36636,7 @@ impl IDebugSymbols3_Vtbl { } unsafe extern "system" fn GetScopeSymbolGroup(this: *mut core::ffi::c_void, flags: u32, update: *mut core::ffi::c_void, symbols: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugSymbols3_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&update)) { + match IDebugSymbols3_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&update)) { Ok(ok__) => { symbols.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -36838,7 +36838,7 @@ impl IDebugSymbols3_Vtbl { } unsafe extern "system" fn GetScopeSymbolGroup2(this: *mut core::ffi::c_void, flags: u32, update: *mut core::ffi::c_void, symbols: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugSymbols3_Impl::GetScopeSymbolGroup2(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&update)) { + match IDebugSymbols3_Impl::GetScopeSymbolGroup2(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&update)) { Ok(ok__) => { symbols.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -37973,7 +37973,7 @@ pub trait IDebugSymbols4_Impl: windows_core::IUnknownImpl { fn GetScope(&self, instructionoffset: *mut u64, scopeframe: *mut DEBUG_STACK_FRAME, scopecontext: *mut core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn SetScope(&self, instructionoffset: u64, scopeframe: *const DEBUG_STACK_FRAME, scopecontext: *const core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn ResetScope(&self) -> windows_core::Result<()>; - fn GetScopeSymbolGroup(&self, flags: u32, update: Option<&IDebugSymbolGroup>) -> windows_core::Result; + fn GetScopeSymbolGroup(&self, flags: u32, update: windows_core::Ref<'_, IDebugSymbolGroup>) -> windows_core::Result; fn CreateSymbolGroup(&self) -> windows_core::Result; fn StartSymbolMatch(&self, pattern: &windows_core::PCSTR) -> windows_core::Result; fn GetNextSymbolMatch(&self, handle: u64, buffer: windows_core::PSTR, buffersize: u32, matchsize: *mut u32, offset: *mut u64) -> windows_core::Result<()>; @@ -38010,7 +38010,7 @@ pub trait IDebugSymbols4_Impl: windows_core::IUnknownImpl { fn GetTypeIdWide(&self, module: u64, name: &windows_core::PCWSTR) -> windows_core::Result; fn GetFieldOffsetWide(&self, module: u64, typeid: u32, field: &windows_core::PCWSTR) -> windows_core::Result; fn GetSymbolTypeIdWide(&self, symbol: &windows_core::PCWSTR, typeid: *mut u32, module: *mut u64) -> windows_core::Result<()>; - fn GetScopeSymbolGroup2(&self, flags: u32, update: Option<&IDebugSymbolGroup2>) -> windows_core::Result; + fn GetScopeSymbolGroup2(&self, flags: u32, update: windows_core::Ref<'_, IDebugSymbolGroup2>) -> windows_core::Result; fn CreateSymbolGroup2(&self) -> windows_core::Result; fn StartSymbolMatchWide(&self, pattern: &windows_core::PCWSTR) -> windows_core::Result; fn GetNextSymbolMatchWide(&self, handle: u64, buffer: windows_core::PWSTR, buffersize: u32, matchsize: *mut u32, offset: *mut u64) -> windows_core::Result<()>; @@ -38263,7 +38263,7 @@ impl IDebugSymbols4_Vtbl { } unsafe extern "system" fn GetScopeSymbolGroup(this: *mut core::ffi::c_void, flags: u32, update: *mut core::ffi::c_void, symbols: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugSymbols4_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&update)) { + match IDebugSymbols4_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&update)) { Ok(ok__) => { symbols.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -38465,7 +38465,7 @@ impl IDebugSymbols4_Vtbl { } unsafe extern "system" fn GetScopeSymbolGroup2(this: *mut core::ffi::c_void, flags: u32, update: *mut core::ffi::c_void, symbols: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugSymbols4_Impl::GetScopeSymbolGroup2(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&update)) { + match IDebugSymbols4_Impl::GetScopeSymbolGroup2(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&update)) { Ok(ok__) => { symbols.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -39644,7 +39644,7 @@ pub trait IDebugSymbols5_Impl: windows_core::IUnknownImpl { fn GetScope(&self, instructionoffset: *mut u64, scopeframe: *mut DEBUG_STACK_FRAME, scopecontext: *mut core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn SetScope(&self, instructionoffset: u64, scopeframe: *const DEBUG_STACK_FRAME, scopecontext: *const core::ffi::c_void, scopecontextsize: u32) -> windows_core::Result<()>; fn ResetScope(&self) -> windows_core::Result<()>; - fn GetScopeSymbolGroup(&self, flags: u32, update: Option<&IDebugSymbolGroup>) -> windows_core::Result; + fn GetScopeSymbolGroup(&self, flags: u32, update: windows_core::Ref<'_, IDebugSymbolGroup>) -> windows_core::Result; fn CreateSymbolGroup(&self) -> windows_core::Result; fn StartSymbolMatch(&self, pattern: &windows_core::PCSTR) -> windows_core::Result; fn GetNextSymbolMatch(&self, handle: u64, buffer: windows_core::PSTR, buffersize: u32, matchsize: *mut u32, offset: *mut u64) -> windows_core::Result<()>; @@ -39681,7 +39681,7 @@ pub trait IDebugSymbols5_Impl: windows_core::IUnknownImpl { fn GetTypeIdWide(&self, module: u64, name: &windows_core::PCWSTR) -> windows_core::Result; fn GetFieldOffsetWide(&self, module: u64, typeid: u32, field: &windows_core::PCWSTR) -> windows_core::Result; fn GetSymbolTypeIdWide(&self, symbol: &windows_core::PCWSTR, typeid: *mut u32, module: *mut u64) -> windows_core::Result<()>; - fn GetScopeSymbolGroup2(&self, flags: u32, update: Option<&IDebugSymbolGroup2>) -> windows_core::Result; + fn GetScopeSymbolGroup2(&self, flags: u32, update: windows_core::Ref<'_, IDebugSymbolGroup2>) -> windows_core::Result; fn CreateSymbolGroup2(&self) -> windows_core::Result; fn StartSymbolMatchWide(&self, pattern: &windows_core::PCWSTR) -> windows_core::Result; fn GetNextSymbolMatchWide(&self, handle: u64, buffer: windows_core::PWSTR, buffersize: u32, matchsize: *mut u32, offset: *mut u64) -> windows_core::Result<()>; @@ -39936,7 +39936,7 @@ impl IDebugSymbols5_Vtbl { } unsafe extern "system" fn GetScopeSymbolGroup(this: *mut core::ffi::c_void, flags: u32, update: *mut core::ffi::c_void, symbols: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugSymbols5_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&update)) { + match IDebugSymbols5_Impl::GetScopeSymbolGroup(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&update)) { Ok(ok__) => { symbols.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -40138,7 +40138,7 @@ impl IDebugSymbols5_Vtbl { } unsafe extern "system" fn GetScopeSymbolGroup2(this: *mut core::ffi::c_void, flags: u32, update: *mut core::ffi::c_void, symbols: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDebugSymbols5_Impl::GetScopeSymbolGroup2(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&update)) { + match IDebugSymbols5_Impl::GetScopeSymbolGroup2(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&update)) { Ok(ok__) => { symbols.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -42989,29 +42989,29 @@ pub struct IDynamicConceptProviderConcept_Vtbl { pub NotifyDestruct: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDynamicConceptProviderConcept_Impl: windows_core::IUnknownImpl { - fn GetConcept(&self, contextobject: Option<&IModelObject>, conceptid: *const windows_core::GUID, conceptinterface: *mut Option, conceptmetadata: *mut Option, hasconcept: *mut bool) -> windows_core::Result<()>; - fn SetConcept(&self, contextobject: Option<&IModelObject>, conceptid: *const windows_core::GUID, conceptinterface: Option<&windows_core::IUnknown>, conceptmetadata: Option<&IKeyStore>) -> windows_core::Result<()>; - fn NotifyParent(&self, parentmodel: Option<&IModelObject>) -> windows_core::Result<()>; - fn NotifyParentChange(&self, parentmodel: Option<&IModelObject>) -> windows_core::Result<()>; + fn GetConcept(&self, contextobject: windows_core::Ref<'_, IModelObject>, conceptid: *const windows_core::GUID, conceptinterface: windows_core::OutRef<'_, windows_core::IUnknown>, conceptmetadata: windows_core::OutRef<'_, IKeyStore>, hasconcept: *mut bool) -> windows_core::Result<()>; + fn SetConcept(&self, contextobject: windows_core::Ref<'_, IModelObject>, conceptid: *const windows_core::GUID, conceptinterface: windows_core::Ref<'_, windows_core::IUnknown>, conceptmetadata: windows_core::Ref<'_, IKeyStore>) -> windows_core::Result<()>; + fn NotifyParent(&self, parentmodel: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; + fn NotifyParentChange(&self, parentmodel: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; fn NotifyDestruct(&self) -> windows_core::Result<()>; } impl IDynamicConceptProviderConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetConcept(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, conceptid: *const windows_core::GUID, conceptinterface: *mut *mut core::ffi::c_void, conceptmetadata: *mut *mut core::ffi::c_void, hasconcept: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDynamicConceptProviderConcept_Impl::GetConcept(this, windows_core::from_raw_borrowed(&contextobject), core::mem::transmute_copy(&conceptid), core::mem::transmute_copy(&conceptinterface), core::mem::transmute_copy(&conceptmetadata), core::mem::transmute_copy(&hasconcept)).into() + IDynamicConceptProviderConcept_Impl::GetConcept(this, core::mem::transmute_copy(&contextobject), core::mem::transmute_copy(&conceptid), core::mem::transmute_copy(&conceptinterface), core::mem::transmute_copy(&conceptmetadata), core::mem::transmute_copy(&hasconcept)).into() } unsafe extern "system" fn SetConcept(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, conceptid: *const windows_core::GUID, conceptinterface: *mut core::ffi::c_void, conceptmetadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDynamicConceptProviderConcept_Impl::SetConcept(this, windows_core::from_raw_borrowed(&contextobject), core::mem::transmute_copy(&conceptid), windows_core::from_raw_borrowed(&conceptinterface), windows_core::from_raw_borrowed(&conceptmetadata)).into() + IDynamicConceptProviderConcept_Impl::SetConcept(this, core::mem::transmute_copy(&contextobject), core::mem::transmute_copy(&conceptid), core::mem::transmute_copy(&conceptinterface), core::mem::transmute_copy(&conceptmetadata)).into() } unsafe extern "system" fn NotifyParent(this: *mut core::ffi::c_void, parentmodel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDynamicConceptProviderConcept_Impl::NotifyParent(this, windows_core::from_raw_borrowed(&parentmodel)).into() + IDynamicConceptProviderConcept_Impl::NotifyParent(this, core::mem::transmute_copy(&parentmodel)).into() } unsafe extern "system" fn NotifyParentChange(this: *mut core::ffi::c_void, parentmodel: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDynamicConceptProviderConcept_Impl::NotifyParentChange(this, windows_core::from_raw_borrowed(&parentmodel)).into() + IDynamicConceptProviderConcept_Impl::NotifyParentChange(this, core::mem::transmute_copy(&parentmodel)).into() } unsafe extern "system" fn NotifyDestruct(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -43066,23 +43066,23 @@ pub struct IDynamicKeyProviderConcept_Vtbl { pub EnumerateKeys: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDynamicKeyProviderConcept_Impl: windows_core::IUnknownImpl { - fn GetKey(&self, contextobject: Option<&IModelObject>, key: &windows_core::PCWSTR, keyvalue: *mut Option, metadata: *mut Option, haskey: *mut bool) -> windows_core::Result<()>; - fn SetKey(&self, contextobject: Option<&IModelObject>, key: &windows_core::PCWSTR, keyvalue: Option<&IModelObject>, metadata: Option<&IKeyStore>) -> windows_core::Result<()>; - fn EnumerateKeys(&self, contextobject: Option<&IModelObject>) -> windows_core::Result; + fn GetKey(&self, contextobject: windows_core::Ref<'_, IModelObject>, key: &windows_core::PCWSTR, keyvalue: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>, haskey: *mut bool) -> windows_core::Result<()>; + fn SetKey(&self, contextobject: windows_core::Ref<'_, IModelObject>, key: &windows_core::PCWSTR, keyvalue: windows_core::Ref<'_, IModelObject>, metadata: windows_core::Ref<'_, IKeyStore>) -> windows_core::Result<()>; + fn EnumerateKeys(&self, contextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; } impl IDynamicKeyProviderConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetKey(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, key: windows_core::PCWSTR, keyvalue: *mut *mut core::ffi::c_void, metadata: *mut *mut core::ffi::c_void, haskey: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDynamicKeyProviderConcept_Impl::GetKey(this, windows_core::from_raw_borrowed(&contextobject), core::mem::transmute(&key), core::mem::transmute_copy(&keyvalue), core::mem::transmute_copy(&metadata), core::mem::transmute_copy(&haskey)).into() + IDynamicKeyProviderConcept_Impl::GetKey(this, core::mem::transmute_copy(&contextobject), core::mem::transmute(&key), core::mem::transmute_copy(&keyvalue), core::mem::transmute_copy(&metadata), core::mem::transmute_copy(&haskey)).into() } unsafe extern "system" fn SetKey(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, key: windows_core::PCWSTR, keyvalue: *mut core::ffi::c_void, metadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDynamicKeyProviderConcept_Impl::SetKey(this, windows_core::from_raw_borrowed(&contextobject), core::mem::transmute(&key), windows_core::from_raw_borrowed(&keyvalue), windows_core::from_raw_borrowed(&metadata)).into() + IDynamicKeyProviderConcept_Impl::SetKey(this, core::mem::transmute_copy(&contextobject), core::mem::transmute(&key), core::mem::transmute_copy(&keyvalue), core::mem::transmute_copy(&metadata)).into() } unsafe extern "system" fn EnumerateKeys(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, ppenumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDynamicKeyProviderConcept_Impl::EnumerateKeys(this, windows_core::from_raw_borrowed(&contextobject)) { + match IDynamicKeyProviderConcept_Impl::EnumerateKeys(this, core::mem::transmute_copy(&contextobject)) { Ok(ok__) => { ppenumerator.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43120,13 +43120,13 @@ pub struct IEquatableConcept_Vtbl { pub AreObjectsEqual: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT, } pub trait IEquatableConcept_Impl: windows_core::IUnknownImpl { - fn AreObjectsEqual(&self, contextobject: Option<&IModelObject>, otherobject: Option<&IModelObject>) -> windows_core::Result; + fn AreObjectsEqual(&self, contextobject: windows_core::Ref<'_, IModelObject>, otherobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; } impl IEquatableConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AreObjectsEqual(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, otherobject: *mut core::ffi::c_void, isequal: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IEquatableConcept_Impl::AreObjectsEqual(this, windows_core::from_raw_borrowed(&contextobject), windows_core::from_raw_borrowed(&otherobject)) { + match IEquatableConcept_Impl::AreObjectsEqual(this, core::mem::transmute_copy(&contextobject), core::mem::transmute_copy(&otherobject)) { Ok(ok__) => { isequal.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43204,7 +43204,7 @@ pub struct IHostDataModelAccess_Vtbl { pub GetDataModel: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IHostDataModelAccess_Impl: windows_core::IUnknownImpl { - fn GetDataModel(&self, manager: *mut Option, host: *mut Option) -> windows_core::Result<()>; + fn GetDataModel(&self, manager: windows_core::OutRef<'_, IDataModelManager>, host: windows_core::OutRef<'_, IDebugHost>) -> windows_core::Result<()>; } impl IHostDataModelAccess_Vtbl { pub const fn new() -> Self { @@ -43251,15 +43251,15 @@ pub struct IIndexableConcept_Vtbl { pub SetAt: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64, *const *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IIndexableConcept_Impl: windows_core::IUnknownImpl { - fn GetDimensionality(&self, contextobject: Option<&IModelObject>) -> windows_core::Result; - fn GetAt(&self, contextobject: Option<&IModelObject>, indexercount: u64, indexers: *const Option, object: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn SetAt(&self, contextobject: Option<&IModelObject>, indexercount: u64, indexers: *const Option, value: Option<&IModelObject>) -> windows_core::Result<()>; + fn GetDimensionality(&self, contextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; + fn GetAt(&self, contextobject: windows_core::Ref<'_, IModelObject>, indexercount: u64, indexers: *const Option, object: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn SetAt(&self, contextobject: windows_core::Ref<'_, IModelObject>, indexercount: u64, indexers: *const Option, value: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; } impl IIndexableConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetDimensionality(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, dimensionality: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IIndexableConcept_Impl::GetDimensionality(this, windows_core::from_raw_borrowed(&contextobject)) { + match IIndexableConcept_Impl::GetDimensionality(this, core::mem::transmute_copy(&contextobject)) { Ok(ok__) => { dimensionality.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43269,11 +43269,11 @@ impl IIndexableConcept_Vtbl { } unsafe extern "system" fn GetAt(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, indexercount: u64, indexers: *const *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void, metadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IIndexableConcept_Impl::GetAt(this, windows_core::from_raw_borrowed(&contextobject), core::mem::transmute_copy(&indexercount), core::mem::transmute_copy(&indexers), core::mem::transmute_copy(&object), core::mem::transmute_copy(&metadata)).into() + IIndexableConcept_Impl::GetAt(this, core::mem::transmute_copy(&contextobject), core::mem::transmute_copy(&indexercount), core::mem::transmute_copy(&indexers), core::mem::transmute_copy(&object), core::mem::transmute_copy(&metadata)).into() } unsafe extern "system" fn SetAt(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, indexercount: u64, indexers: *const *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IIndexableConcept_Impl::SetAt(this, windows_core::from_raw_borrowed(&contextobject), core::mem::transmute_copy(&indexercount), core::mem::transmute_copy(&indexers), windows_core::from_raw_borrowed(&value)).into() + IIndexableConcept_Impl::SetAt(this, core::mem::transmute_copy(&contextobject), core::mem::transmute_copy(&indexercount), core::mem::transmute_copy(&indexers), core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -43312,14 +43312,14 @@ pub struct IIterableConcept_Vtbl { pub GetIterator: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IIterableConcept_Impl: windows_core::IUnknownImpl { - fn GetDefaultIndexDimensionality(&self, contextobject: Option<&IModelObject>) -> windows_core::Result; - fn GetIterator(&self, contextobject: Option<&IModelObject>) -> windows_core::Result; + fn GetDefaultIndexDimensionality(&self, contextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; + fn GetIterator(&self, contextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; } impl IIterableConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetDefaultIndexDimensionality(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, dimensionality: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IIterableConcept_Impl::GetDefaultIndexDimensionality(this, windows_core::from_raw_borrowed(&contextobject)) { + match IIterableConcept_Impl::GetDefaultIndexDimensionality(this, core::mem::transmute_copy(&contextobject)) { Ok(ok__) => { dimensionality.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43329,7 +43329,7 @@ impl IIterableConcept_Vtbl { } unsafe extern "system" fn GetIterator(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, iterator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IIterableConcept_Impl::GetIterator(this, windows_core::from_raw_borrowed(&contextobject)) { + match IIterableConcept_Impl::GetIterator(this, core::mem::transmute_copy(&contextobject)) { Ok(ok__) => { iterator.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43366,7 +43366,7 @@ pub struct IKeyEnumerator_Vtbl { } pub trait IKeyEnumerator_Impl: windows_core::IUnknownImpl { fn Reset(&self) -> windows_core::Result<()>; - fn GetNext(&self, key: *mut windows_core::BSTR, value: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; + fn GetNext(&self, key: *mut windows_core::BSTR, value: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; } impl IKeyEnumerator_Vtbl { pub const fn new() -> Self { @@ -43429,10 +43429,10 @@ pub struct IKeyStore_Vtbl { pub ClearKeys: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IKeyStore_Impl: windows_core::IUnknownImpl { - fn GetKey(&self, key: &windows_core::PCWSTR, object: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn SetKey(&self, key: &windows_core::PCWSTR, object: Option<&IModelObject>, metadata: Option<&IKeyStore>) -> windows_core::Result<()>; - fn GetKeyValue(&self, key: &windows_core::PCWSTR, object: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn SetKeyValue(&self, key: &windows_core::PCWSTR, object: Option<&IModelObject>) -> windows_core::Result<()>; + fn GetKey(&self, key: &windows_core::PCWSTR, object: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn SetKey(&self, key: &windows_core::PCWSTR, object: windows_core::Ref<'_, IModelObject>, metadata: windows_core::Ref<'_, IKeyStore>) -> windows_core::Result<()>; + fn GetKeyValue(&self, key: &windows_core::PCWSTR, object: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn SetKeyValue(&self, key: &windows_core::PCWSTR, object: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; fn ClearKeys(&self) -> windows_core::Result<()>; } impl IKeyStore_Vtbl { @@ -43443,7 +43443,7 @@ impl IKeyStore_Vtbl { } unsafe extern "system" fn SetKey(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, object: *mut core::ffi::c_void, metadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKeyStore_Impl::SetKey(this, core::mem::transmute(&key), windows_core::from_raw_borrowed(&object), windows_core::from_raw_borrowed(&metadata)).into() + IKeyStore_Impl::SetKey(this, core::mem::transmute(&key), core::mem::transmute_copy(&object), core::mem::transmute_copy(&metadata)).into() } unsafe extern "system" fn GetKeyValue(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, object: *mut *mut core::ffi::c_void, metadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -43451,7 +43451,7 @@ impl IKeyStore_Vtbl { } unsafe extern "system" fn SetKeyValue(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKeyStore_Impl::SetKeyValue(this, core::mem::transmute(&key), windows_core::from_raw_borrowed(&object)).into() + IKeyStore_Impl::SetKeyValue(this, core::mem::transmute(&key), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn ClearKeys(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -43489,7 +43489,7 @@ pub struct IModelIterator_Vtbl { } pub trait IModelIterator_Impl: windows_core::IUnknownImpl { fn Reset(&self) -> windows_core::Result<()>; - fn GetNext(&self, object: *mut Option, dimensions: u64, indexers: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; + fn GetNext(&self, object: windows_core::OutRef<'_, IModelObject>, dimensions: u64, indexers: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; } impl IModelIterator_Vtbl { pub const fn new() -> Self { @@ -43558,10 +43558,10 @@ pub trait IModelKeyReference_Impl: windows_core::IUnknownImpl { fn GetKeyName(&self) -> windows_core::Result; fn GetOriginalObject(&self) -> windows_core::Result; fn GetContextObject(&self) -> windows_core::Result; - fn GetKey(&self, object: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn GetKeyValue(&self, object: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn SetKey(&self, object: Option<&IModelObject>, metadata: Option<&IKeyStore>) -> windows_core::Result<()>; - fn SetKeyValue(&self, object: Option<&IModelObject>) -> windows_core::Result<()>; + fn GetKey(&self, object: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn GetKeyValue(&self, object: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn SetKey(&self, object: windows_core::Ref<'_, IModelObject>, metadata: windows_core::Ref<'_, IKeyStore>) -> windows_core::Result<()>; + fn SetKeyValue(&self, object: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; } impl IModelKeyReference_Vtbl { pub const fn new() -> Self { @@ -43605,11 +43605,11 @@ impl IModelKeyReference_Vtbl { } unsafe extern "system" fn SetKey(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, metadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelKeyReference_Impl::SetKey(this, windows_core::from_raw_borrowed(&object), windows_core::from_raw_borrowed(&metadata)).into() + IModelKeyReference_Impl::SetKey(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&metadata)).into() } unsafe extern "system" fn SetKeyValue(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelKeyReference_Impl::SetKeyValue(this, windows_core::from_raw_borrowed(&object)).into() + IModelKeyReference_Impl::SetKeyValue(this, core::mem::transmute_copy(&object)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -43649,13 +43649,13 @@ pub struct IModelKeyReference2_Vtbl { pub OverrideContextObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IModelKeyReference2_Impl: IModelKeyReference_Impl { - fn OverrideContextObject(&self, newcontextobject: Option<&IModelObject>) -> windows_core::Result<()>; + fn OverrideContextObject(&self, newcontextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; } impl IModelKeyReference2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OverrideContextObject(this: *mut core::ffi::c_void, newcontextobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelKeyReference2_Impl::OverrideContextObject(this, windows_core::from_raw_borrowed(&newcontextobject)).into() + IModelKeyReference2_Impl::OverrideContextObject(this, core::mem::transmute_copy(&newcontextobject)).into() } Self { base__: IModelKeyReference_Vtbl::new::(), OverrideContextObject: OverrideContextObject:: } } @@ -43680,13 +43680,13 @@ pub struct IModelMethod_Vtbl { pub Call: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64, *const *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IModelMethod_Impl: windows_core::IUnknownImpl { - fn Call(&self, pcontextobject: Option<&IModelObject>, argcount: u64, pparguments: *const Option, ppresult: *mut Option, ppmetadata: *mut Option) -> windows_core::Result<()>; + fn Call(&self, pcontextobject: windows_core::Ref<'_, IModelObject>, argcount: u64, pparguments: *const Option, ppresult: windows_core::OutRef<'_, IModelObject>, ppmetadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; } impl IModelMethod_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Call(this: *mut core::ffi::c_void, pcontextobject: *mut core::ffi::c_void, argcount: u64, pparguments: *const *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void, ppmetadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelMethod_Impl::Call(this, windows_core::from_raw_borrowed(&pcontextobject), core::mem::transmute_copy(&argcount), core::mem::transmute_copy(&pparguments), core::mem::transmute_copy(&ppresult), core::mem::transmute_copy(&ppmetadata)).into() + IModelMethod_Impl::Call(this, core::mem::transmute_copy(&pcontextobject), core::mem::transmute_copy(&argcount), core::mem::transmute_copy(&pparguments), core::mem::transmute_copy(&ppresult), core::mem::transmute_copy(&ppmetadata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Call: Call:: } } @@ -43915,35 +43915,35 @@ pub trait IModelObject_Impl: windows_core::IUnknownImpl { fn GetKind(&self) -> windows_core::Result; fn GetIntrinsicValue(&self) -> windows_core::Result; fn GetIntrinsicValueAs(&self, vt: super::super::super::Variant::VARENUM) -> windows_core::Result; - fn GetKeyValue(&self, key: &windows_core::PCWSTR, object: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn SetKeyValue(&self, key: &windows_core::PCWSTR, object: Option<&IModelObject>) -> windows_core::Result<()>; + fn GetKeyValue(&self, key: &windows_core::PCWSTR, object: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn SetKeyValue(&self, key: &windows_core::PCWSTR, object: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; fn EnumerateKeyValues(&self) -> windows_core::Result; fn GetRawValue(&self, kind: SymbolKind, name: &windows_core::PCWSTR, searchflags: u32) -> windows_core::Result; fn EnumerateRawValues(&self, kind: SymbolKind, searchflags: u32) -> windows_core::Result; fn Dereference(&self) -> windows_core::Result; fn TryCastToRuntimeType(&self) -> windows_core::Result; - fn GetConcept(&self, conceptid: *const windows_core::GUID, conceptinterface: *mut Option, conceptmetadata: *mut Option) -> windows_core::Result<()>; + fn GetConcept(&self, conceptid: *const windows_core::GUID, conceptinterface: windows_core::OutRef<'_, windows_core::IUnknown>, conceptmetadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; fn GetLocation(&self) -> windows_core::Result; fn GetTypeInfo(&self) -> windows_core::Result; - fn GetTargetInfo(&self, location: *mut Location, r#type: *mut Option) -> windows_core::Result<()>; + fn GetTargetInfo(&self, location: *mut Location, r#type: windows_core::OutRef<'_, IDebugHostType>) -> windows_core::Result<()>; fn GetNumberOfParentModels(&self) -> windows_core::Result; - fn GetParentModel(&self, i: u64, model: *mut Option, contextobject: *mut Option) -> windows_core::Result<()>; - fn AddParentModel(&self, model: Option<&IModelObject>, contextobject: Option<&IModelObject>, r#override: u8) -> windows_core::Result<()>; - fn RemoveParentModel(&self, model: Option<&IModelObject>) -> windows_core::Result<()>; - fn GetKey(&self, key: &windows_core::PCWSTR, object: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn GetKeyReference(&self, key: &windows_core::PCWSTR, objectreference: *mut Option, metadata: *mut Option) -> windows_core::Result<()>; - fn SetKey(&self, key: &windows_core::PCWSTR, object: Option<&IModelObject>, metadata: Option<&IKeyStore>) -> windows_core::Result<()>; + fn GetParentModel(&self, i: u64, model: windows_core::OutRef<'_, IModelObject>, contextobject: windows_core::OutRef<'_, IModelObject>) -> windows_core::Result<()>; + fn AddParentModel(&self, model: windows_core::Ref<'_, IModelObject>, contextobject: windows_core::Ref<'_, IModelObject>, r#override: u8) -> windows_core::Result<()>; + fn RemoveParentModel(&self, model: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; + fn GetKey(&self, key: &windows_core::PCWSTR, object: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn GetKeyReference(&self, key: &windows_core::PCWSTR, objectreference: windows_core::OutRef<'_, IModelObject>, metadata: windows_core::OutRef<'_, IKeyStore>) -> windows_core::Result<()>; + fn SetKey(&self, key: &windows_core::PCWSTR, object: windows_core::Ref<'_, IModelObject>, metadata: windows_core::Ref<'_, IKeyStore>) -> windows_core::Result<()>; fn ClearKeys(&self) -> windows_core::Result<()>; fn EnumerateKeys(&self) -> windows_core::Result; fn EnumerateKeyReferences(&self) -> windows_core::Result; - fn SetConcept(&self, conceptid: *const windows_core::GUID, conceptinterface: Option<&windows_core::IUnknown>, conceptmetadata: Option<&IKeyStore>) -> windows_core::Result<()>; + fn SetConcept(&self, conceptid: *const windows_core::GUID, conceptinterface: windows_core::Ref<'_, windows_core::IUnknown>, conceptmetadata: windows_core::Ref<'_, IKeyStore>) -> windows_core::Result<()>; fn ClearConcepts(&self) -> windows_core::Result<()>; fn GetRawReference(&self, kind: SymbolKind, name: &windows_core::PCWSTR, searchflags: u32) -> windows_core::Result; fn EnumerateRawReferences(&self, kind: SymbolKind, searchflags: u32) -> windows_core::Result; - fn SetContextForDataModel(&self, datamodelobject: Option<&IModelObject>, context: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn GetContextForDataModel(&self, datamodelobject: Option<&IModelObject>) -> windows_core::Result; - fn Compare(&self, other: Option<&IModelObject>, ppresult: *mut Option) -> windows_core::Result<()>; - fn IsEqualTo(&self, other: Option<&IModelObject>) -> windows_core::Result; + fn SetContextForDataModel(&self, datamodelobject: windows_core::Ref<'_, IModelObject>, context: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetContextForDataModel(&self, datamodelobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; + fn Compare(&self, other: windows_core::Ref<'_, IModelObject>, ppresult: windows_core::OutRef<'_, IModelObject>) -> windows_core::Result<()>; + fn IsEqualTo(&self, other: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IModelObject_Vtbl { @@ -43994,7 +43994,7 @@ impl IModelObject_Vtbl { } unsafe extern "system" fn SetKeyValue(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, object: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelObject_Impl::SetKeyValue(this, core::mem::transmute(&key), windows_core::from_raw_borrowed(&object)).into() + IModelObject_Impl::SetKeyValue(this, core::mem::transmute(&key), core::mem::transmute_copy(&object)).into() } unsafe extern "system" fn EnumerateKeyValues(this: *mut core::ffi::c_void, enumerator: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -44090,11 +44090,11 @@ impl IModelObject_Vtbl { } unsafe extern "system" fn AddParentModel(this: *mut core::ffi::c_void, model: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, r#override: u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelObject_Impl::AddParentModel(this, windows_core::from_raw_borrowed(&model), windows_core::from_raw_borrowed(&contextobject), core::mem::transmute_copy(&r#override)).into() + IModelObject_Impl::AddParentModel(this, core::mem::transmute_copy(&model), core::mem::transmute_copy(&contextobject), core::mem::transmute_copy(&r#override)).into() } unsafe extern "system" fn RemoveParentModel(this: *mut core::ffi::c_void, model: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelObject_Impl::RemoveParentModel(this, windows_core::from_raw_borrowed(&model)).into() + IModelObject_Impl::RemoveParentModel(this, core::mem::transmute_copy(&model)).into() } unsafe extern "system" fn GetKey(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, object: *mut *mut core::ffi::c_void, metadata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -44106,7 +44106,7 @@ impl IModelObject_Vtbl { } unsafe extern "system" fn SetKey(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, object: *mut core::ffi::c_void, metadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelObject_Impl::SetKey(this, core::mem::transmute(&key), windows_core::from_raw_borrowed(&object), windows_core::from_raw_borrowed(&metadata)).into() + IModelObject_Impl::SetKey(this, core::mem::transmute(&key), core::mem::transmute_copy(&object), core::mem::transmute_copy(&metadata)).into() } unsafe extern "system" fn ClearKeys(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -44134,7 +44134,7 @@ impl IModelObject_Vtbl { } unsafe extern "system" fn SetConcept(this: *mut core::ffi::c_void, conceptid: *const windows_core::GUID, conceptinterface: *mut core::ffi::c_void, conceptmetadata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelObject_Impl::SetConcept(this, core::mem::transmute_copy(&conceptid), windows_core::from_raw_borrowed(&conceptinterface), windows_core::from_raw_borrowed(&conceptmetadata)).into() + IModelObject_Impl::SetConcept(this, core::mem::transmute_copy(&conceptid), core::mem::transmute_copy(&conceptinterface), core::mem::transmute_copy(&conceptmetadata)).into() } unsafe extern "system" fn ClearConcepts(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -44162,11 +44162,11 @@ impl IModelObject_Vtbl { } unsafe extern "system" fn SetContextForDataModel(this: *mut core::ffi::c_void, datamodelobject: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelObject_Impl::SetContextForDataModel(this, windows_core::from_raw_borrowed(&datamodelobject), windows_core::from_raw_borrowed(&context)).into() + IModelObject_Impl::SetContextForDataModel(this, core::mem::transmute_copy(&datamodelobject), core::mem::transmute_copy(&context)).into() } unsafe extern "system" fn GetContextForDataModel(this: *mut core::ffi::c_void, datamodelobject: *mut core::ffi::c_void, context: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IModelObject_Impl::GetContextForDataModel(this, windows_core::from_raw_borrowed(&datamodelobject)) { + match IModelObject_Impl::GetContextForDataModel(this, core::mem::transmute_copy(&datamodelobject)) { Ok(ok__) => { context.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -44176,11 +44176,11 @@ impl IModelObject_Vtbl { } unsafe extern "system" fn Compare(this: *mut core::ffi::c_void, other: *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelObject_Impl::Compare(this, windows_core::from_raw_borrowed(&other), core::mem::transmute_copy(&ppresult)).into() + IModelObject_Impl::Compare(this, core::mem::transmute_copy(&other), core::mem::transmute_copy(&ppresult)).into() } unsafe extern "system" fn IsEqualTo(this: *mut core::ffi::c_void, other: *mut core::ffi::c_void, equal: *mut bool) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IModelObject_Impl::IsEqualTo(this, windows_core::from_raw_borrowed(&other)) { + match IModelObject_Impl::IsEqualTo(this, core::mem::transmute_copy(&other)) { Ok(ok__) => { equal.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -44258,14 +44258,14 @@ pub struct IModelPropertyAccessor_Vtbl { pub SetValue: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IModelPropertyAccessor_Impl: windows_core::IUnknownImpl { - fn GetValue(&self, key: &windows_core::PCWSTR, contextobject: Option<&IModelObject>) -> windows_core::Result; - fn SetValue(&self, key: &windows_core::PCWSTR, contextobject: Option<&IModelObject>, value: Option<&IModelObject>) -> windows_core::Result<()>; + fn GetValue(&self, key: &windows_core::PCWSTR, contextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; + fn SetValue(&self, key: &windows_core::PCWSTR, contextobject: windows_core::Ref<'_, IModelObject>, value: windows_core::Ref<'_, IModelObject>) -> windows_core::Result<()>; } impl IModelPropertyAccessor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetValue(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, contextobject: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IModelPropertyAccessor_Impl::GetValue(this, core::mem::transmute(&key), windows_core::from_raw_borrowed(&contextobject)) { + match IModelPropertyAccessor_Impl::GetValue(this, core::mem::transmute(&key), core::mem::transmute_copy(&contextobject)) { Ok(ok__) => { value.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -44275,7 +44275,7 @@ impl IModelPropertyAccessor_Vtbl { } unsafe extern "system" fn SetValue(this: *mut core::ffi::c_void, key: windows_core::PCWSTR, contextobject: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IModelPropertyAccessor_Impl::SetValue(this, core::mem::transmute(&key), windows_core::from_raw_borrowed(&contextobject), windows_core::from_raw_borrowed(&value)).into() + IModelPropertyAccessor_Impl::SetValue(this, core::mem::transmute(&key), core::mem::transmute_copy(&contextobject), core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), GetValue: GetValue::, SetValue: SetValue:: } } @@ -44407,13 +44407,13 @@ pub struct IPreferredRuntimeTypeConcept_Vtbl { pub CastToPreferredRuntimeType: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPreferredRuntimeTypeConcept_Impl: windows_core::IUnknownImpl { - fn CastToPreferredRuntimeType(&self, contextobject: Option<&IModelObject>) -> windows_core::Result; + fn CastToPreferredRuntimeType(&self, contextobject: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; } impl IPreferredRuntimeTypeConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CastToPreferredRuntimeType(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPreferredRuntimeTypeConcept_Impl::CastToPreferredRuntimeType(this, windows_core::from_raw_borrowed(&contextobject)) { + match IPreferredRuntimeTypeConcept_Impl::CastToPreferredRuntimeType(this, core::mem::transmute_copy(&contextobject)) { Ok(ok__) => { object.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -44446,7 +44446,7 @@ pub struct IRawEnumerator_Vtbl { } pub trait IRawEnumerator_Impl: windows_core::IUnknownImpl { fn Reset(&self) -> windows_core::Result<()>; - fn GetNext(&self, name: *mut windows_core::BSTR, kind: *mut SymbolKind, value: *mut Option) -> windows_core::Result<()>; + fn GetNext(&self, name: *mut windows_core::BSTR, kind: *mut SymbolKind, value: windows_core::OutRef<'_, IModelObject>) -> windows_core::Result<()>; } impl IRawEnumerator_Vtbl { pub const fn new() -> Self { @@ -44483,13 +44483,13 @@ pub struct IStringDisplayableConcept_Vtbl { pub ToDisplayString: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IStringDisplayableConcept_Impl: windows_core::IUnknownImpl { - fn ToDisplayString(&self, contextobject: Option<&IModelObject>, metadata: Option<&IKeyStore>) -> windows_core::Result; + fn ToDisplayString(&self, contextobject: windows_core::Ref<'_, IModelObject>, metadata: windows_core::Ref<'_, IKeyStore>) -> windows_core::Result; } impl IStringDisplayableConcept_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ToDisplayString(this: *mut core::ffi::c_void, contextobject: *mut core::ffi::c_void, metadata: *mut core::ffi::c_void, displaystring: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStringDisplayableConcept_Impl::ToDisplayString(this, windows_core::from_raw_borrowed(&contextobject), windows_core::from_raw_borrowed(&metadata)) { + match IStringDisplayableConcept_Impl::ToDisplayString(this, core::mem::transmute_copy(&contextobject), core::mem::transmute_copy(&metadata)) { Ok(ok__) => { displaystring.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs index 7176de098b..984c2c279e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs @@ -2264,23 +2264,23 @@ pub struct ITraceEventCallback_Vtbl { pub OnEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITraceEventCallback_Impl: windows_core::IUnknownImpl { - fn OnBeginProcessTrace(&self, headerevent: Option<&ITraceEvent>, relogger: Option<&ITraceRelogger>) -> windows_core::Result<()>; - fn OnFinalizeProcessTrace(&self, relogger: Option<&ITraceRelogger>) -> windows_core::Result<()>; - fn OnEvent(&self, event: Option<&ITraceEvent>, relogger: Option<&ITraceRelogger>) -> windows_core::Result<()>; + fn OnBeginProcessTrace(&self, headerevent: windows_core::Ref<'_, ITraceEvent>, relogger: windows_core::Ref<'_, ITraceRelogger>) -> windows_core::Result<()>; + fn OnFinalizeProcessTrace(&self, relogger: windows_core::Ref<'_, ITraceRelogger>) -> windows_core::Result<()>; + fn OnEvent(&self, event: windows_core::Ref<'_, ITraceEvent>, relogger: windows_core::Ref<'_, ITraceRelogger>) -> windows_core::Result<()>; } impl ITraceEventCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnBeginProcessTrace(this: *mut core::ffi::c_void, headerevent: *mut core::ffi::c_void, relogger: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITraceEventCallback_Impl::OnBeginProcessTrace(this, windows_core::from_raw_borrowed(&headerevent), windows_core::from_raw_borrowed(&relogger)).into() + ITraceEventCallback_Impl::OnBeginProcessTrace(this, core::mem::transmute_copy(&headerevent), core::mem::transmute_copy(&relogger)).into() } unsafe extern "system" fn OnFinalizeProcessTrace(this: *mut core::ffi::c_void, relogger: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITraceEventCallback_Impl::OnFinalizeProcessTrace(this, windows_core::from_raw_borrowed(&relogger)).into() + ITraceEventCallback_Impl::OnFinalizeProcessTrace(this, core::mem::transmute_copy(&relogger)).into() } unsafe extern "system" fn OnEvent(this: *mut core::ffi::c_void, event: *mut core::ffi::c_void, relogger: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITraceEventCallback_Impl::OnEvent(this, windows_core::from_raw_borrowed(&event), windows_core::from_raw_borrowed(&relogger)).into() + ITraceEventCallback_Impl::OnEvent(this, core::mem::transmute_copy(&event), core::mem::transmute_copy(&relogger)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2350,8 +2350,8 @@ pub struct ITraceRelogger_Vtbl { pub trait ITraceRelogger_Impl: windows_core::IUnknownImpl { fn AddLogfileTraceStream(&self, logfilename: &windows_core::BSTR, usercontext: *const core::ffi::c_void) -> windows_core::Result; fn AddRealtimeTraceStream(&self, loggername: &windows_core::BSTR, usercontext: *const core::ffi::c_void) -> windows_core::Result; - fn RegisterCallback(&self, callback: Option<&ITraceEventCallback>) -> windows_core::Result<()>; - fn Inject(&self, event: Option<&ITraceEvent>) -> windows_core::Result<()>; + fn RegisterCallback(&self, callback: windows_core::Ref<'_, ITraceEventCallback>) -> windows_core::Result<()>; + fn Inject(&self, event: windows_core::Ref<'_, ITraceEvent>) -> windows_core::Result<()>; fn CreateEventInstance(&self, tracehandle: &RELOGSTREAM_HANDLE, flags: u32) -> windows_core::Result; fn ProcessTrace(&self) -> windows_core::Result<()>; fn SetOutputFilename(&self, logfilename: &windows_core::BSTR) -> windows_core::Result<()>; @@ -2382,11 +2382,11 @@ impl ITraceRelogger_Vtbl { } unsafe extern "system" fn RegisterCallback(this: *mut core::ffi::c_void, callback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITraceRelogger_Impl::RegisterCallback(this, windows_core::from_raw_borrowed(&callback)).into() + ITraceRelogger_Impl::RegisterCallback(this, core::mem::transmute_copy(&callback)).into() } unsafe extern "system" fn Inject(this: *mut core::ffi::c_void, event: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITraceRelogger_Impl::Inject(this, windows_core::from_raw_borrowed(&event)).into() + ITraceRelogger_Impl::Inject(this, core::mem::transmute_copy(&event)).into() } unsafe extern "system" fn CreateEventInstance(this: *mut core::ffi::c_void, tracehandle: RELOGSTREAM_HANDLE, flags: u32, event: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs index ef0e4eb637..2bbfb91955 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs @@ -657,13 +657,13 @@ pub struct IDtcLuRmEnlistmentFactory_Vtbl { pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, u32, *mut core::ffi::c_void, *mut u8, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDtcLuRmEnlistmentFactory_Impl: windows_core::IUnknownImpl { - fn Create(&self, puclupair: *mut u8, cblupair: u32, pitransaction: Option<&ITransaction>, ptransid: *mut u8, cbtransid: u32, prmenlistmentsink: Option<&IDtcLuRmEnlistmentSink>, pprmenlistment: *mut Option) -> windows_core::Result<()>; + fn Create(&self, puclupair: *mut u8, cblupair: u32, pitransaction: windows_core::Ref<'_, ITransaction>, ptransid: *mut u8, cbtransid: u32, prmenlistmentsink: windows_core::Ref<'_, IDtcLuRmEnlistmentSink>, pprmenlistment: windows_core::OutRef<'_, IDtcLuRmEnlistment>) -> windows_core::Result<()>; } impl IDtcLuRmEnlistmentFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, puclupair: *mut u8, cblupair: u32, pitransaction: *mut core::ffi::c_void, ptransid: *mut u8, cbtransid: u32, prmenlistmentsink: *mut core::ffi::c_void, pprmenlistment: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDtcLuRmEnlistmentFactory_Impl::Create(this, core::mem::transmute_copy(&puclupair), core::mem::transmute_copy(&cblupair), windows_core::from_raw_borrowed(&pitransaction), core::mem::transmute_copy(&ptransid), core::mem::transmute_copy(&cbtransid), windows_core::from_raw_borrowed(&prmenlistmentsink), core::mem::transmute_copy(&pprmenlistment)).into() + IDtcLuRmEnlistmentFactory_Impl::Create(this, core::mem::transmute_copy(&puclupair), core::mem::transmute_copy(&cblupair), core::mem::transmute_copy(&pitransaction), core::mem::transmute_copy(&ptransid), core::mem::transmute_copy(&cbtransid), core::mem::transmute_copy(&prmenlistmentsink), core::mem::transmute_copy(&pprmenlistment)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Create: Create:: } } @@ -892,13 +892,13 @@ pub struct IDtcLuSubordinateDtcFactory_Vtbl { pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, u32, *mut core::ffi::c_void, i32, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut u8, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDtcLuSubordinateDtcFactory_Impl: windows_core::IUnknownImpl { - fn Create(&self, puclupair: *mut u8, cblupair: u32, punktransactionouter: Option<&windows_core::IUnknown>, isolevel: i32, isoflags: u32, poptions: Option<&ITransactionOptions>, pptransaction: *mut Option, ptransid: *mut u8, cbtransid: u32, psubordinatedtcsink: Option<&IDtcLuSubordinateDtcSink>, ppsubordinatedtc: *mut Option) -> windows_core::Result<()>; + fn Create(&self, puclupair: *mut u8, cblupair: u32, punktransactionouter: windows_core::Ref<'_, windows_core::IUnknown>, isolevel: i32, isoflags: u32, poptions: windows_core::Ref<'_, ITransactionOptions>, pptransaction: windows_core::OutRef<'_, ITransaction>, ptransid: *mut u8, cbtransid: u32, psubordinatedtcsink: windows_core::Ref<'_, IDtcLuSubordinateDtcSink>, ppsubordinatedtc: windows_core::OutRef<'_, IDtcLuSubordinateDtc>) -> windows_core::Result<()>; } impl IDtcLuSubordinateDtcFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, puclupair: *mut u8, cblupair: u32, punktransactionouter: *mut core::ffi::c_void, isolevel: i32, isoflags: u32, poptions: *mut core::ffi::c_void, pptransaction: *mut *mut core::ffi::c_void, ptransid: *mut u8, cbtransid: u32, psubordinatedtcsink: *mut core::ffi::c_void, ppsubordinatedtc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDtcLuSubordinateDtcFactory_Impl::Create(this, core::mem::transmute_copy(&puclupair), core::mem::transmute_copy(&cblupair), windows_core::from_raw_borrowed(&punktransactionouter), core::mem::transmute_copy(&isolevel), core::mem::transmute_copy(&isoflags), windows_core::from_raw_borrowed(&poptions), core::mem::transmute_copy(&pptransaction), core::mem::transmute_copy(&ptransid), core::mem::transmute_copy(&cbtransid), windows_core::from_raw_borrowed(&psubordinatedtcsink), core::mem::transmute_copy(&ppsubordinatedtc)).into() + IDtcLuSubordinateDtcFactory_Impl::Create(this, core::mem::transmute_copy(&puclupair), core::mem::transmute_copy(&cblupair), core::mem::transmute_copy(&punktransactionouter), core::mem::transmute_copy(&isolevel), core::mem::transmute_copy(&isoflags), core::mem::transmute_copy(&poptions), core::mem::transmute_copy(&pptransaction), core::mem::transmute_copy(&ptransid), core::mem::transmute_copy(&cbtransid), core::mem::transmute_copy(&psubordinatedtcsink), core::mem::transmute_copy(&ppsubordinatedtc)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Create: Create:: } } @@ -1384,7 +1384,7 @@ pub struct IDtcToXaHelper_Vtbl { } pub trait IDtcToXaHelper_Impl: windows_core::IUnknownImpl { fn Close(&self, i_fdorecovery: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn TranslateTridToXid(&self, pitransaction: Option<&ITransaction>, pguidbqual: *const windows_core::GUID, pxid: *mut XID) -> windows_core::Result<()>; + fn TranslateTridToXid(&self, pitransaction: windows_core::Ref<'_, ITransaction>, pguidbqual: *const windows_core::GUID, pxid: *mut XID) -> windows_core::Result<()>; } impl IDtcToXaHelper_Vtbl { pub const fn new() -> Self { @@ -1394,7 +1394,7 @@ impl IDtcToXaHelper_Vtbl { } unsafe extern "system" fn TranslateTridToXid(this: *mut core::ffi::c_void, pitransaction: *mut core::ffi::c_void, pguidbqual: *const windows_core::GUID, pxid: *mut XID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDtcToXaHelper_Impl::TranslateTridToXid(this, windows_core::from_raw_borrowed(&pitransaction), core::mem::transmute_copy(&pguidbqual), core::mem::transmute_copy(&pxid)).into() + IDtcToXaHelper_Impl::TranslateTridToXid(this, core::mem::transmute_copy(&pitransaction), core::mem::transmute_copy(&pguidbqual), core::mem::transmute_copy(&pxid)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1424,7 +1424,7 @@ pub struct IDtcToXaHelperFactory_Vtbl { pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCSTR, windows_core::PCSTR, *mut windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDtcToXaHelperFactory_Impl: windows_core::IUnknownImpl { - fn Create(&self, pszdsn: &windows_core::PCSTR, pszclientdllname: &windows_core::PCSTR, pguidrm: *mut windows_core::GUID, ppxahelper: *mut Option) -> windows_core::Result<()>; + fn Create(&self, pszdsn: &windows_core::PCSTR, pszclientdllname: &windows_core::PCSTR, pguidrm: *mut windows_core::GUID, ppxahelper: windows_core::OutRef<'_, IDtcToXaHelper>) -> windows_core::Result<()>; } impl IDtcToXaHelperFactory_Vtbl { pub const fn new() -> Self { @@ -1475,7 +1475,7 @@ pub struct IDtcToXaHelperSinglePipe_Vtbl { pub trait IDtcToXaHelperSinglePipe_Impl: windows_core::IUnknownImpl { fn XARMCreate(&self, pszdsn: &windows_core::PCSTR, pszclientdll: &windows_core::PCSTR, pdwrmcookie: *mut u32) -> windows_core::Result<()>; fn ConvertTridToXID(&self, pdwitrans: *mut u32, dwrmcookie: u32, pxid: *mut XID) -> windows_core::Result<()>; - fn EnlistWithRM(&self, dwrmcookie: u32, i_pitransaction: Option<&ITransaction>, i_pitransres: Option<&ITransactionResourceAsync>) -> windows_core::Result; + fn EnlistWithRM(&self, dwrmcookie: u32, i_pitransaction: windows_core::Ref<'_, ITransaction>, i_pitransres: windows_core::Ref<'_, ITransactionResourceAsync>) -> windows_core::Result; fn ReleaseRMCookie(&self, i_dwrmcookie: u32, i_fnormal: super::super::Foundation::BOOL); } impl IDtcToXaHelperSinglePipe_Vtbl { @@ -1490,7 +1490,7 @@ impl IDtcToXaHelperSinglePipe_Vtbl { } unsafe extern "system" fn EnlistWithRM(this: *mut core::ffi::c_void, dwrmcookie: u32, i_pitransaction: *mut core::ffi::c_void, i_pitransres: *mut core::ffi::c_void, o_ppitransenslitment: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDtcToXaHelperSinglePipe_Impl::EnlistWithRM(this, core::mem::transmute_copy(&dwrmcookie), windows_core::from_raw_borrowed(&i_pitransaction), windows_core::from_raw_borrowed(&i_pitransres)) { + match IDtcToXaHelperSinglePipe_Impl::EnlistWithRM(this, core::mem::transmute_copy(&dwrmcookie), core::mem::transmute_copy(&i_pitransaction), core::mem::transmute_copy(&i_pitransres)) { Ok(ok__) => { o_ppitransenslitment.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1845,7 +1845,7 @@ pub struct IResourceManager_Vtbl { pub GetDistributedTransactionManager: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IResourceManager_Impl: windows_core::IUnknownImpl { - fn Enlist(&self, ptransaction: Option<&ITransaction>, pres: Option<&ITransactionResourceAsync>, puow: *mut BOID, pisolevel: *mut i32, ppenlist: *mut Option) -> windows_core::Result<()>; + fn Enlist(&self, ptransaction: windows_core::Ref<'_, ITransaction>, pres: windows_core::Ref<'_, ITransactionResourceAsync>, puow: *mut BOID, pisolevel: *mut i32, ppenlist: windows_core::OutRef<'_, ITransactionEnlistmentAsync>) -> windows_core::Result<()>; fn Reenlist(&self, pprepinfo: *const u8, cbprepinfo: u32, ltimeout: u32) -> windows_core::Result; fn ReenlistmentComplete(&self) -> windows_core::Result<()>; fn GetDistributedTransactionManager(&self, iid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; @@ -1854,7 +1854,7 @@ impl IResourceManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Enlist(this: *mut core::ffi::c_void, ptransaction: *mut core::ffi::c_void, pres: *mut core::ffi::c_void, puow: *mut BOID, pisolevel: *mut i32, ppenlist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResourceManager_Impl::Enlist(this, windows_core::from_raw_borrowed(&ptransaction), windows_core::from_raw_borrowed(&pres), core::mem::transmute_copy(&puow), core::mem::transmute_copy(&pisolevel), core::mem::transmute_copy(&ppenlist)).into() + IResourceManager_Impl::Enlist(this, core::mem::transmute_copy(&ptransaction), core::mem::transmute_copy(&pres), core::mem::transmute_copy(&puow), core::mem::transmute_copy(&pisolevel), core::mem::transmute_copy(&ppenlist)).into() } unsafe extern "system" fn Reenlist(this: *mut core::ffi::c_void, pprepinfo: *const u8, cbprepinfo: u32, ltimeout: u32, pxactstat: *mut XACTSTAT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1915,14 +1915,14 @@ pub struct IResourceManager2_Vtbl { pub Reenlist2: unsafe extern "system" fn(*mut core::ffi::c_void, *const XID, u32, *mut XACTSTAT) -> windows_core::HRESULT, } pub trait IResourceManager2_Impl: IResourceManager_Impl { - fn Enlist2(&self, ptransaction: Option<&ITransaction>, presasync: Option<&ITransactionResourceAsync>, puow: *mut BOID, pisolevel: *mut i32, pxid: *mut XID, ppenlist: *mut Option) -> windows_core::Result<()>; + fn Enlist2(&self, ptransaction: windows_core::Ref<'_, ITransaction>, presasync: windows_core::Ref<'_, ITransactionResourceAsync>, puow: *mut BOID, pisolevel: *mut i32, pxid: *mut XID, ppenlist: windows_core::OutRef<'_, ITransactionEnlistmentAsync>) -> windows_core::Result<()>; fn Reenlist2(&self, pxid: *const XID, dwtimeout: u32) -> windows_core::Result; } impl IResourceManager2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Enlist2(this: *mut core::ffi::c_void, ptransaction: *mut core::ffi::c_void, presasync: *mut core::ffi::c_void, puow: *mut BOID, pisolevel: *mut i32, pxid: *mut XID, ppenlist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResourceManager2_Impl::Enlist2(this, windows_core::from_raw_borrowed(&ptransaction), windows_core::from_raw_borrowed(&presasync), core::mem::transmute_copy(&puow), core::mem::transmute_copy(&pisolevel), core::mem::transmute_copy(&pxid), core::mem::transmute_copy(&ppenlist)).into() + IResourceManager2_Impl::Enlist2(this, core::mem::transmute_copy(&ptransaction), core::mem::transmute_copy(&presasync), core::mem::transmute_copy(&puow), core::mem::transmute_copy(&pisolevel), core::mem::transmute_copy(&pxid), core::mem::transmute_copy(&ppenlist)).into() } unsafe extern "system" fn Reenlist2(this: *mut core::ffi::c_void, pxid: *const XID, dwtimeout: u32, pxactstat: *mut XACTSTAT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1959,13 +1959,13 @@ pub struct IResourceManagerFactory_Vtbl { pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, windows_core::PCSTR, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IResourceManagerFactory_Impl: windows_core::IUnknownImpl { - fn Create(&self, pguidrm: *const windows_core::GUID, pszrmname: &windows_core::PCSTR, piresmgrsink: Option<&IResourceManagerSink>) -> windows_core::Result; + fn Create(&self, pguidrm: *const windows_core::GUID, pszrmname: &windows_core::PCSTR, piresmgrsink: windows_core::Ref<'_, IResourceManagerSink>) -> windows_core::Result; } impl IResourceManagerFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, pguidrm: *const windows_core::GUID, pszrmname: windows_core::PCSTR, piresmgrsink: *mut core::ffi::c_void, ppresmgr: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IResourceManagerFactory_Impl::Create(this, core::mem::transmute_copy(&pguidrm), core::mem::transmute(&pszrmname), windows_core::from_raw_borrowed(&piresmgrsink)) { + match IResourceManagerFactory_Impl::Create(this, core::mem::transmute_copy(&pguidrm), core::mem::transmute(&pszrmname), core::mem::transmute_copy(&piresmgrsink)) { Ok(ok__) => { ppresmgr.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2003,13 +2003,13 @@ pub struct IResourceManagerFactory2_Vtbl { pub CreateEx: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, windows_core::PCSTR, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IResourceManagerFactory2_Impl: IResourceManagerFactory_Impl { - fn CreateEx(&self, pguidrm: *const windows_core::GUID, pszrmname: &windows_core::PCSTR, piresmgrsink: Option<&IResourceManagerSink>, riidrequested: *const windows_core::GUID, ppvresmgr: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateEx(&self, pguidrm: *const windows_core::GUID, pszrmname: &windows_core::PCSTR, piresmgrsink: windows_core::Ref<'_, IResourceManagerSink>, riidrequested: *const windows_core::GUID, ppvresmgr: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IResourceManagerFactory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateEx(this: *mut core::ffi::c_void, pguidrm: *const windows_core::GUID, pszrmname: windows_core::PCSTR, piresmgrsink: *mut core::ffi::c_void, riidrequested: *const windows_core::GUID, ppvresmgr: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResourceManagerFactory2_Impl::CreateEx(this, core::mem::transmute_copy(&pguidrm), core::mem::transmute(&pszrmname), windows_core::from_raw_borrowed(&piresmgrsink), core::mem::transmute_copy(&riidrequested), core::mem::transmute_copy(&ppvresmgr)).into() + IResourceManagerFactory2_Impl::CreateEx(this, core::mem::transmute_copy(&pguidrm), core::mem::transmute(&pszrmname), core::mem::transmute_copy(&piresmgrsink), core::mem::transmute_copy(&riidrequested), core::mem::transmute_copy(&ppvresmgr)).into() } Self { base__: IResourceManagerFactory_Vtbl::new::(), CreateEx: CreateEx:: } } @@ -2141,7 +2141,7 @@ pub struct ITipHelper_Vtbl { } pub trait ITipHelper_Impl: windows_core::IUnknownImpl { fn Pull(&self, i_psztxurl: *const u8) -> windows_core::Result; - fn PullAsync(&self, i_psztxurl: *const u8, i_ptippullsink: Option<&ITipPullSink>) -> windows_core::Result; + fn PullAsync(&self, i_psztxurl: *const u8, i_ptippullsink: windows_core::Ref<'_, ITipPullSink>) -> windows_core::Result; fn GetLocalTmUrl(&self) -> windows_core::Result<*mut u8>; } impl ITipHelper_Vtbl { @@ -2158,7 +2158,7 @@ impl ITipHelper_Vtbl { } unsafe extern "system" fn PullAsync(this: *mut core::ffi::c_void, i_psztxurl: *const u8, i_ptippullsink: *mut core::ffi::c_void, o_ppitransaction: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITipHelper_Impl::PullAsync(this, core::mem::transmute_copy(&i_psztxurl), windows_core::from_raw_borrowed(&i_ptippullsink)) { + match ITipHelper_Impl::PullAsync(this, core::mem::transmute_copy(&i_psztxurl), core::mem::transmute_copy(&i_ptippullsink)) { Ok(ok__) => { o_ppitransaction.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2469,7 +2469,7 @@ pub struct ITransactionDispenser_Vtbl { } pub trait ITransactionDispenser_Impl: windows_core::IUnknownImpl { fn GetOptionsObject(&self) -> windows_core::Result; - fn BeginTransaction(&self, punkouter: Option<&windows_core::IUnknown>, isolevel: i32, isoflags: u32, poptions: Option<&ITransactionOptions>) -> windows_core::Result; + fn BeginTransaction(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, isolevel: i32, isoflags: u32, poptions: windows_core::Ref<'_, ITransactionOptions>) -> windows_core::Result; } impl ITransactionDispenser_Vtbl { pub const fn new() -> Self { @@ -2485,7 +2485,7 @@ impl ITransactionDispenser_Vtbl { } unsafe extern "system" fn BeginTransaction(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, isolevel: i32, isoflags: u32, poptions: *mut core::ffi::c_void, pptransaction: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransactionDispenser_Impl::BeginTransaction(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&isolevel), core::mem::transmute_copy(&isoflags), windows_core::from_raw_borrowed(&poptions)) { + match ITransactionDispenser_Impl::BeginTransaction(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&isolevel), core::mem::transmute_copy(&isoflags), core::mem::transmute_copy(&poptions)) { Ok(ok__) => { pptransaction.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2533,7 +2533,7 @@ pub struct ITransactionEnlistmentAsync_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITransactionEnlistmentAsync_Impl: windows_core::IUnknownImpl { - fn PrepareRequestDone(&self, hr: windows_core::HRESULT, pmk: Option<&super::Com::IMoniker>, pboidreason: *const BOID) -> windows_core::Result<()>; + fn PrepareRequestDone(&self, hr: windows_core::HRESULT, pmk: windows_core::Ref<'_, super::Com::IMoniker>, pboidreason: *const BOID) -> windows_core::Result<()>; fn CommitRequestDone(&self, hr: windows_core::HRESULT) -> windows_core::Result<()>; fn AbortRequestDone(&self, hr: windows_core::HRESULT) -> windows_core::Result<()>; } @@ -2542,7 +2542,7 @@ impl ITransactionEnlistmentAsync_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PrepareRequestDone(this: *mut core::ffi::c_void, hr: windows_core::HRESULT, pmk: *mut core::ffi::c_void, pboidreason: *const BOID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransactionEnlistmentAsync_Impl::PrepareRequestDone(this, core::mem::transmute_copy(&hr), windows_core::from_raw_borrowed(&pmk), core::mem::transmute_copy(&pboidreason)).into() + ITransactionEnlistmentAsync_Impl::PrepareRequestDone(this, core::mem::transmute_copy(&hr), core::mem::transmute_copy(&pmk), core::mem::transmute_copy(&pboidreason)).into() } unsafe extern "system" fn CommitRequestDone(this: *mut core::ffi::c_void, hr: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2589,14 +2589,14 @@ pub struct ITransactionExport_Vtbl { pub GetTransactionCookie: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, *mut u8, *mut u32) -> windows_core::HRESULT, } pub trait ITransactionExport_Impl: windows_core::IUnknownImpl { - fn Export(&self, punktransaction: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn GetTransactionCookie(&self, punktransaction: Option<&windows_core::IUnknown>, cbtransactioncookie: u32, rgbtransactioncookie: *mut u8, pcbused: *mut u32) -> windows_core::Result<()>; + fn Export(&self, punktransaction: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn GetTransactionCookie(&self, punktransaction: windows_core::Ref<'_, windows_core::IUnknown>, cbtransactioncookie: u32, rgbtransactioncookie: *mut u8, pcbused: *mut u32) -> windows_core::Result<()>; } impl ITransactionExport_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Export(this: *mut core::ffi::c_void, punktransaction: *mut core::ffi::c_void, pcbtransactioncookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransactionExport_Impl::Export(this, windows_core::from_raw_borrowed(&punktransaction)) { + match ITransactionExport_Impl::Export(this, core::mem::transmute_copy(&punktransaction)) { Ok(ok__) => { pcbtransactioncookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2606,7 +2606,7 @@ impl ITransactionExport_Vtbl { } unsafe extern "system" fn GetTransactionCookie(this: *mut core::ffi::c_void, punktransaction: *mut core::ffi::c_void, cbtransactioncookie: u32, rgbtransactioncookie: *mut u8, pcbused: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransactionExport_Impl::GetTransactionCookie(this, windows_core::from_raw_borrowed(&punktransaction), core::mem::transmute_copy(&cbtransactioncookie), core::mem::transmute_copy(&rgbtransactioncookie), core::mem::transmute_copy(&pcbused)).into() + ITransactionExport_Impl::GetTransactionCookie(this, core::mem::transmute_copy(&punktransaction), core::mem::transmute_copy(&cbtransactioncookie), core::mem::transmute_copy(&rgbtransactioncookie), core::mem::transmute_copy(&pcbused)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3020,13 +3020,13 @@ pub struct ITransactionPhase0Factory_Vtbl { pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITransactionPhase0Factory_Impl: windows_core::IUnknownImpl { - fn Create(&self, pphase0notify: Option<&ITransactionPhase0NotifyAsync>) -> windows_core::Result; + fn Create(&self, pphase0notify: windows_core::Ref<'_, ITransactionPhase0NotifyAsync>) -> windows_core::Result; } impl ITransactionPhase0Factory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, pphase0notify: *mut core::ffi::c_void, ppphase0enlistment: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransactionPhase0Factory_Impl::Create(this, windows_core::from_raw_borrowed(&pphase0notify)) { + match ITransactionPhase0Factory_Impl::Create(this, core::mem::transmute_copy(&pphase0notify)) { Ok(ok__) => { ppphase0enlistment.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3347,7 +3347,7 @@ pub struct ITransactionTransmitter_Vtbl { pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITransactionTransmitter_Impl: windows_core::IUnknownImpl { - fn Set(&self, ptransaction: Option<&ITransaction>) -> windows_core::Result<()>; + fn Set(&self, ptransaction: windows_core::Ref<'_, ITransaction>) -> windows_core::Result<()>; fn GetPropagationTokenSize(&self) -> windows_core::Result; fn MarshalPropagationToken(&self, cbtoken: u32, rgbtoken: *mut u8, pcbused: *mut u32) -> windows_core::Result<()>; fn UnmarshalReturnToken(&self, cbreturntoken: u32, rgbreturntoken: *const u8) -> windows_core::Result<()>; @@ -3357,7 +3357,7 @@ impl ITransactionTransmitter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Set(this: *mut core::ffi::c_void, ptransaction: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransactionTransmitter_Impl::Set(this, windows_core::from_raw_borrowed(&ptransaction)).into() + ITransactionTransmitter_Impl::Set(this, core::mem::transmute_copy(&ptransaction)).into() } unsafe extern "system" fn GetPropagationTokenSize(this: *mut core::ffi::c_void, pcbtoken: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3476,13 +3476,13 @@ pub struct ITransactionVoterFactory2_Vtbl { pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITransactionVoterFactory2_Impl: windows_core::IUnknownImpl { - fn Create(&self, ptransaction: Option<&ITransaction>, pvoternotify: Option<&ITransactionVoterNotifyAsync2>) -> windows_core::Result; + fn Create(&self, ptransaction: windows_core::Ref<'_, ITransaction>, pvoternotify: windows_core::Ref<'_, ITransactionVoterNotifyAsync2>) -> windows_core::Result; } impl ITransactionVoterFactory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, ptransaction: *mut core::ffi::c_void, pvoternotify: *mut core::ffi::c_void, ppvoterballot: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransactionVoterFactory2_Impl::Create(this, windows_core::from_raw_borrowed(&ptransaction), windows_core::from_raw_borrowed(&pvoternotify)) { + match ITransactionVoterFactory2_Impl::Create(this, core::mem::transmute_copy(&ptransaction), core::mem::transmute_copy(&pvoternotify)) { Ok(ok__) => { ppvoterballot.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3588,13 +3588,13 @@ pub struct IXAObtainRMInfo_Vtbl { pub ObtainRMInfo: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IXAObtainRMInfo_Impl: windows_core::IUnknownImpl { - fn ObtainRMInfo(&self, pirmhelper: Option<&IRMHelper>) -> windows_core::Result<()>; + fn ObtainRMInfo(&self, pirmhelper: windows_core::Ref<'_, IRMHelper>) -> windows_core::Result<()>; } impl IXAObtainRMInfo_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ObtainRMInfo(this: *mut core::ffi::c_void, pirmhelper: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IXAObtainRMInfo_Impl::ObtainRMInfo(this, windows_core::from_raw_borrowed(&pirmhelper)).into() + IXAObtainRMInfo_Impl::ObtainRMInfo(this, core::mem::transmute_copy(&pirmhelper)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ObtainRMInfo: ObtainRMInfo:: } } diff --git a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs index b19074a748..a0c99a48bf 100644 --- a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs @@ -992,14 +992,14 @@ pub struct IGPMAsyncProgress_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IGPMAsyncProgress_Impl: super::Com::IDispatch_Impl { - fn Status(&self, lprogressnumerator: i32, lprogressdenominator: i32, hrstatus: windows_core::HRESULT, presult: *const super::Variant::VARIANT, ppigpmstatusmsgcollection: Option<&IGPMStatusMsgCollection>) -> windows_core::Result<()>; + fn Status(&self, lprogressnumerator: i32, lprogressdenominator: i32, hrstatus: windows_core::HRESULT, presult: *const super::Variant::VARIANT, ppigpmstatusmsgcollection: windows_core::Ref<'_, IGPMStatusMsgCollection>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IGPMAsyncProgress_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Status(this: *mut core::ffi::c_void, lprogressnumerator: i32, lprogressdenominator: i32, hrstatus: windows_core::HRESULT, presult: *const super::Variant::VARIANT, ppigpmstatusmsgcollection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGPMAsyncProgress_Impl::Status(this, core::mem::transmute_copy(&lprogressnumerator), core::mem::transmute_copy(&lprogressdenominator), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&presult), windows_core::from_raw_borrowed(&ppigpmstatusmsgcollection)).into() + IGPMAsyncProgress_Impl::Status(this, core::mem::transmute_copy(&lprogressnumerator), core::mem::transmute_copy(&lprogressdenominator), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&presult), core::mem::transmute_copy(&ppigpmstatusmsgcollection)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), Status: Status:: } } @@ -1346,7 +1346,7 @@ pub struct IGPMBackupDir_Vtbl { pub trait IGPMBackupDir_Impl: super::Com::IDispatch_Impl { fn BackupDirectory(&self) -> windows_core::Result; fn GetBackup(&self, bstrid: &windows_core::BSTR) -> windows_core::Result; - fn SearchBackups(&self, pigpmsearchcriteria: Option<&IGPMSearchCriteria>) -> windows_core::Result; + fn SearchBackups(&self, pigpmsearchcriteria: windows_core::Ref<'_, IGPMSearchCriteria>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IGPMBackupDir_Vtbl { @@ -1373,7 +1373,7 @@ impl IGPMBackupDir_Vtbl { } unsafe extern "system" fn SearchBackups(this: *mut core::ffi::c_void, pigpmsearchcriteria: *mut core::ffi::c_void, ppigpmbackupcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMBackupDir_Impl::SearchBackups(this, windows_core::from_raw_borrowed(&pigpmsearchcriteria)) { + match IGPMBackupDir_Impl::SearchBackups(this, core::mem::transmute_copy(&pigpmsearchcriteria)) { Ok(ok__) => { ppigpmbackupcollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1449,7 +1449,7 @@ pub trait IGPMBackupDirEx_Impl: super::Com::IDispatch_Impl { fn BackupDir(&self) -> windows_core::Result; fn BackupType(&self) -> windows_core::Result; fn GetBackup(&self, bstrid: &windows_core::BSTR) -> windows_core::Result; - fn SearchBackups(&self, pigpmsearchcriteria: Option<&IGPMSearchCriteria>) -> windows_core::Result; + fn SearchBackups(&self, pigpmsearchcriteria: windows_core::Ref<'_, IGPMSearchCriteria>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IGPMBackupDirEx_Vtbl { @@ -1486,7 +1486,7 @@ impl IGPMBackupDirEx_Vtbl { } unsafe extern "system" fn SearchBackups(this: *mut core::ffi::c_void, pigpmsearchcriteria: *mut core::ffi::c_void, pvarbackupcollection: *mut super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMBackupDirEx_Impl::SearchBackups(this, windows_core::from_raw_borrowed(&pigpmsearchcriteria)) { + match IGPMBackupDirEx_Impl::SearchBackups(this, core::mem::transmute_copy(&pigpmsearchcriteria)) { Ok(ok__) => { pvarbackupcollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3141,12 +3141,12 @@ pub trait IGPMDomain_Impl: super::Com::IDispatch_Impl { fn Domain(&self) -> windows_core::Result; fn CreateGPO(&self) -> windows_core::Result; fn GetGPO(&self, bstrguid: &windows_core::BSTR) -> windows_core::Result; - fn SearchGPOs(&self, pigpmsearchcriteria: Option<&IGPMSearchCriteria>) -> windows_core::Result; - fn RestoreGPO(&self, pigpmbackup: Option<&IGPMBackup>, ldcflags: i32, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; + fn SearchGPOs(&self, pigpmsearchcriteria: windows_core::Ref<'_, IGPMSearchCriteria>) -> windows_core::Result; + fn RestoreGPO(&self, pigpmbackup: windows_core::Ref<'_, IGPMBackup>, ldcflags: i32, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; fn GetSOM(&self, bstrpath: &windows_core::BSTR) -> windows_core::Result; - fn SearchSOMs(&self, pigpmsearchcriteria: Option<&IGPMSearchCriteria>) -> windows_core::Result; + fn SearchSOMs(&self, pigpmsearchcriteria: windows_core::Ref<'_, IGPMSearchCriteria>) -> windows_core::Result; fn GetWMIFilter(&self, bstrpath: &windows_core::BSTR) -> windows_core::Result; - fn SearchWMIFilters(&self, pigpmsearchcriteria: Option<&IGPMSearchCriteria>) -> windows_core::Result; + fn SearchWMIFilters(&self, pigpmsearchcriteria: windows_core::Ref<'_, IGPMSearchCriteria>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IGPMDomain_Vtbl { @@ -3193,7 +3193,7 @@ impl IGPMDomain_Vtbl { } unsafe extern "system" fn SearchGPOs(this: *mut core::ffi::c_void, pigpmsearchcriteria: *mut core::ffi::c_void, ppigpmgpocollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMDomain_Impl::SearchGPOs(this, windows_core::from_raw_borrowed(&pigpmsearchcriteria)) { + match IGPMDomain_Impl::SearchGPOs(this, core::mem::transmute_copy(&pigpmsearchcriteria)) { Ok(ok__) => { ppigpmgpocollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3203,7 +3203,7 @@ impl IGPMDomain_Vtbl { } unsafe extern "system" fn RestoreGPO(this: *mut core::ffi::c_void, pigpmbackup: *mut core::ffi::c_void, ldcflags: i32, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT, ppigpmresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMDomain_Impl::RestoreGPO(this, windows_core::from_raw_borrowed(&pigpmbackup), core::mem::transmute_copy(&ldcflags), core::mem::transmute_copy(&pvargpmprogress), core::mem::transmute_copy(&pvargpmcancel)) { + match IGPMDomain_Impl::RestoreGPO(this, core::mem::transmute_copy(&pigpmbackup), core::mem::transmute_copy(&ldcflags), core::mem::transmute_copy(&pvargpmprogress), core::mem::transmute_copy(&pvargpmcancel)) { Ok(ok__) => { ppigpmresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3223,7 +3223,7 @@ impl IGPMDomain_Vtbl { } unsafe extern "system" fn SearchSOMs(this: *mut core::ffi::c_void, pigpmsearchcriteria: *mut core::ffi::c_void, ppigpmsomcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMDomain_Impl::SearchSOMs(this, windows_core::from_raw_borrowed(&pigpmsearchcriteria)) { + match IGPMDomain_Impl::SearchSOMs(this, core::mem::transmute_copy(&pigpmsearchcriteria)) { Ok(ok__) => { ppigpmsomcollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3243,7 +3243,7 @@ impl IGPMDomain_Vtbl { } unsafe extern "system" fn SearchWMIFilters(this: *mut core::ffi::c_void, pigpmsearchcriteria: *mut core::ffi::c_void, ppigpmwmifiltercollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMDomain_Impl::SearchWMIFilters(this, windows_core::from_raw_borrowed(&pigpmsearchcriteria)) { + match IGPMDomain_Impl::SearchWMIFilters(this, core::mem::transmute_copy(&pigpmsearchcriteria)) { Ok(ok__) => { ppigpmwmifiltercollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3340,11 +3340,11 @@ pub struct IGPMDomain2_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IGPMDomain2_Impl: IGPMDomain_Impl { fn CreateStarterGPO(&self) -> windows_core::Result; - fn CreateGPOFromStarterGPO(&self, pgpotemplate: Option<&IGPMStarterGPO>) -> windows_core::Result; + fn CreateGPOFromStarterGPO(&self, pgpotemplate: windows_core::Ref<'_, IGPMStarterGPO>) -> windows_core::Result; fn GetStarterGPO(&self, bstrguid: &windows_core::BSTR) -> windows_core::Result; - fn SearchStarterGPOs(&self, pigpmsearchcriteria: Option<&IGPMSearchCriteria>) -> windows_core::Result; + fn SearchStarterGPOs(&self, pigpmsearchcriteria: windows_core::Ref<'_, IGPMSearchCriteria>) -> windows_core::Result; fn LoadStarterGPO(&self, bstrloadfile: &windows_core::BSTR, boverwrite: super::super::Foundation::VARIANT_BOOL, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; - fn RestoreStarterGPO(&self, pigpmtmplbackup: Option<&IGPMStarterGPOBackup>, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; + fn RestoreStarterGPO(&self, pigpmtmplbackup: windows_core::Ref<'_, IGPMStarterGPOBackup>, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IGPMDomain2_Vtbl { @@ -3361,7 +3361,7 @@ impl IGPMDomain2_Vtbl { } unsafe extern "system" fn CreateGPOFromStarterGPO(this: *mut core::ffi::c_void, pgpotemplate: *mut core::ffi::c_void, ppnewgpo: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMDomain2_Impl::CreateGPOFromStarterGPO(this, windows_core::from_raw_borrowed(&pgpotemplate)) { + match IGPMDomain2_Impl::CreateGPOFromStarterGPO(this, core::mem::transmute_copy(&pgpotemplate)) { Ok(ok__) => { ppnewgpo.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3381,7 +3381,7 @@ impl IGPMDomain2_Vtbl { } unsafe extern "system" fn SearchStarterGPOs(this: *mut core::ffi::c_void, pigpmsearchcriteria: *mut core::ffi::c_void, ppigpmtemplatecollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMDomain2_Impl::SearchStarterGPOs(this, windows_core::from_raw_borrowed(&pigpmsearchcriteria)) { + match IGPMDomain2_Impl::SearchStarterGPOs(this, core::mem::transmute_copy(&pigpmsearchcriteria)) { Ok(ok__) => { ppigpmtemplatecollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3401,7 +3401,7 @@ impl IGPMDomain2_Vtbl { } unsafe extern "system" fn RestoreStarterGPO(this: *mut core::ffi::c_void, pigpmtmplbackup: *mut core::ffi::c_void, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT, ppigpmresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMDomain2_Impl::RestoreStarterGPO(this, windows_core::from_raw_borrowed(&pigpmtmplbackup), core::mem::transmute_copy(&pvargpmprogress), core::mem::transmute_copy(&pvargpmcancel)) { + match IGPMDomain2_Impl::RestoreStarterGPO(this, core::mem::transmute_copy(&pigpmtmplbackup), core::mem::transmute_copy(&pvargpmprogress), core::mem::transmute_copy(&pvargpmcancel)) { Ok(ok__) => { ppigpmresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3719,20 +3719,20 @@ pub trait IGPMGPO_Impl: super::Com::IDispatch_Impl { fn UserSysvolVersionNumber(&self) -> windows_core::Result; fn ComputerSysvolVersionNumber(&self) -> windows_core::Result; fn GetWMIFilter(&self) -> windows_core::Result; - fn SetWMIFilter(&self, pigpmwmifilter: Option<&IGPMWMIFilter>) -> windows_core::Result<()>; + fn SetWMIFilter(&self, pigpmwmifilter: windows_core::Ref<'_, IGPMWMIFilter>) -> windows_core::Result<()>; fn SetUserEnabled(&self, vbenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SetComputerEnabled(&self, vbenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn IsUserEnabled(&self) -> windows_core::Result; fn IsComputerEnabled(&self) -> windows_core::Result; fn GetSecurityInfo(&self) -> windows_core::Result; - fn SetSecurityInfo(&self, psecurityinfo: Option<&IGPMSecurityInfo>) -> windows_core::Result<()>; + fn SetSecurityInfo(&self, psecurityinfo: windows_core::Ref<'_, IGPMSecurityInfo>) -> windows_core::Result<()>; fn Delete(&self) -> windows_core::Result<()>; fn Backup(&self, bstrbackupdir: &windows_core::BSTR, bstrcomment: &windows_core::BSTR, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; - fn Import(&self, lflags: i32, pigpmbackup: Option<&IGPMBackup>, pvarmigrationtable: *const super::Variant::VARIANT, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; + fn Import(&self, lflags: i32, pigpmbackup: windows_core::Ref<'_, IGPMBackup>, pvarmigrationtable: *const super::Variant::VARIANT, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; fn GenerateReport(&self, gpmreporttype: GPMReportType, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; fn GenerateReportToFile(&self, gpmreporttype: GPMReportType, bstrtargetfilepath: &windows_core::BSTR) -> windows_core::Result; - fn CopyTo(&self, lflags: i32, pigpmdomain: Option<&IGPMDomain>, pvarnewdisplayname: *const super::Variant::VARIANT, pvarmigrationtable: *const super::Variant::VARIANT, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; - fn SetSecurityDescriptor(&self, lflags: i32, psd: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn CopyTo(&self, lflags: i32, pigpmdomain: windows_core::Ref<'_, IGPMDomain>, pvarnewdisplayname: *const super::Variant::VARIANT, pvarmigrationtable: *const super::Variant::VARIANT, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT) -> windows_core::Result; + fn SetSecurityDescriptor(&self, lflags: i32, psd: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; fn GetSecurityDescriptor(&self, lflags: i32) -> windows_core::Result; fn IsACLConsistent(&self) -> windows_core::Result; fn MakeACLConsistent(&self) -> windows_core::Result<()>; @@ -3856,7 +3856,7 @@ impl IGPMGPO_Vtbl { } unsafe extern "system" fn SetWMIFilter(this: *mut core::ffi::c_void, pigpmwmifilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGPMGPO_Impl::SetWMIFilter(this, windows_core::from_raw_borrowed(&pigpmwmifilter)).into() + IGPMGPO_Impl::SetWMIFilter(this, core::mem::transmute_copy(&pigpmwmifilter)).into() } unsafe extern "system" fn SetUserEnabled(this: *mut core::ffi::c_void, vbenabled: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3898,7 +3898,7 @@ impl IGPMGPO_Vtbl { } unsafe extern "system" fn SetSecurityInfo(this: *mut core::ffi::c_void, psecurityinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGPMGPO_Impl::SetSecurityInfo(this, windows_core::from_raw_borrowed(&psecurityinfo)).into() + IGPMGPO_Impl::SetSecurityInfo(this, core::mem::transmute_copy(&psecurityinfo)).into() } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3916,7 +3916,7 @@ impl IGPMGPO_Vtbl { } unsafe extern "system" fn Import(this: *mut core::ffi::c_void, lflags: i32, pigpmbackup: *mut core::ffi::c_void, pvarmigrationtable: *const super::Variant::VARIANT, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT, ppigpmresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMGPO_Impl::Import(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pigpmbackup), core::mem::transmute_copy(&pvarmigrationtable), core::mem::transmute_copy(&pvargpmprogress), core::mem::transmute_copy(&pvargpmcancel)) { + match IGPMGPO_Impl::Import(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pigpmbackup), core::mem::transmute_copy(&pvarmigrationtable), core::mem::transmute_copy(&pvargpmprogress), core::mem::transmute_copy(&pvargpmcancel)) { Ok(ok__) => { ppigpmresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3946,7 +3946,7 @@ impl IGPMGPO_Vtbl { } unsafe extern "system" fn CopyTo(this: *mut core::ffi::c_void, lflags: i32, pigpmdomain: *mut core::ffi::c_void, pvarnewdisplayname: *const super::Variant::VARIANT, pvarmigrationtable: *const super::Variant::VARIANT, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *mut super::Variant::VARIANT, ppigpmresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMGPO_Impl::CopyTo(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pigpmdomain), core::mem::transmute_copy(&pvarnewdisplayname), core::mem::transmute_copy(&pvarmigrationtable), core::mem::transmute_copy(&pvargpmprogress), core::mem::transmute_copy(&pvargpmcancel)) { + match IGPMGPO_Impl::CopyTo(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pigpmdomain), core::mem::transmute_copy(&pvarnewdisplayname), core::mem::transmute_copy(&pvarmigrationtable), core::mem::transmute_copy(&pvargpmprogress), core::mem::transmute_copy(&pvargpmcancel)) { Ok(ok__) => { ppigpmresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3956,7 +3956,7 @@ impl IGPMGPO_Vtbl { } unsafe extern "system" fn SetSecurityDescriptor(this: *mut core::ffi::c_void, lflags: i32, psd: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGPMGPO_Impl::SetSecurityDescriptor(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&psd)).into() + IGPMGPO_Impl::SetSecurityDescriptor(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&psd)).into() } unsafe extern "system" fn GetSecurityDescriptor(this: *mut core::ffi::c_void, lflags: i32, ppsd: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5709,12 +5709,12 @@ pub trait IGPMSOM_Impl: super::Com::IDispatch_Impl { fn SetGPOInheritanceBlocked(&self, newval: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn Name(&self) -> windows_core::Result; fn Path(&self) -> windows_core::Result; - fn CreateGPOLink(&self, llinkpos: i32, pgpo: Option<&IGPMGPO>) -> windows_core::Result; + fn CreateGPOLink(&self, llinkpos: i32, pgpo: windows_core::Ref<'_, IGPMGPO>) -> windows_core::Result; fn Type(&self) -> windows_core::Result; fn GetGPOLinks(&self) -> windows_core::Result; fn GetInheritedGPOLinks(&self) -> windows_core::Result; fn GetSecurityInfo(&self) -> windows_core::Result; - fn SetSecurityInfo(&self, psecurityinfo: Option<&IGPMSecurityInfo>) -> windows_core::Result<()>; + fn SetSecurityInfo(&self, psecurityinfo: windows_core::Ref<'_, IGPMSecurityInfo>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IGPMSOM_Vtbl { @@ -5755,7 +5755,7 @@ impl IGPMSOM_Vtbl { } unsafe extern "system" fn CreateGPOLink(this: *mut core::ffi::c_void, llinkpos: i32, pgpo: *mut core::ffi::c_void, ppnewgpolink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMSOM_Impl::CreateGPOLink(this, core::mem::transmute_copy(&llinkpos), windows_core::from_raw_borrowed(&pgpo)) { + match IGPMSOM_Impl::CreateGPOLink(this, core::mem::transmute_copy(&llinkpos), core::mem::transmute_copy(&pgpo)) { Ok(ok__) => { ppnewgpolink.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5805,7 +5805,7 @@ impl IGPMSOM_Vtbl { } unsafe extern "system" fn SetSecurityInfo(this: *mut core::ffi::c_void, psecurityinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGPMSOM_Impl::SetSecurityInfo(this, windows_core::from_raw_borrowed(&psecurityinfo)).into() + IGPMSOM_Impl::SetSecurityInfo(this, core::mem::transmute_copy(&psecurityinfo)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), @@ -6032,8 +6032,8 @@ pub trait IGPMSecurityInfo_Impl: super::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; fn get_Item(&self, lindex: i32) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pperm: Option<&IGPMPermission>) -> windows_core::Result<()>; - fn Remove(&self, pperm: Option<&IGPMPermission>) -> windows_core::Result<()>; + fn Add(&self, pperm: windows_core::Ref<'_, IGPMPermission>) -> windows_core::Result<()>; + fn Remove(&self, pperm: windows_core::Ref<'_, IGPMPermission>) -> windows_core::Result<()>; fn RemoveTrustee(&self, bstrtrustee: &windows_core::BSTR) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -6071,11 +6071,11 @@ impl IGPMSecurityInfo_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pperm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGPMSecurityInfo_Impl::Add(this, windows_core::from_raw_borrowed(&pperm)).into() + IGPMSecurityInfo_Impl::Add(this, core::mem::transmute_copy(&pperm)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, pperm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGPMSecurityInfo_Impl::Remove(this, windows_core::from_raw_borrowed(&pperm)).into() + IGPMSecurityInfo_Impl::Remove(this, core::mem::transmute_copy(&pperm)).into() } unsafe extern "system" fn RemoveTrustee(this: *mut core::ffi::c_void, bstrtrustee: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6150,7 +6150,7 @@ pub trait IGPMSitesContainer_Impl: super::Com::IDispatch_Impl { fn Domain(&self) -> windows_core::Result; fn Forest(&self) -> windows_core::Result; fn GetSite(&self, bstrsitename: &windows_core::BSTR) -> windows_core::Result; - fn SearchSites(&self, pigpmsearchcriteria: Option<&IGPMSearchCriteria>) -> windows_core::Result; + fn SearchSites(&self, pigpmsearchcriteria: windows_core::Ref<'_, IGPMSearchCriteria>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IGPMSitesContainer_Vtbl { @@ -6197,7 +6197,7 @@ impl IGPMSitesContainer_Vtbl { } unsafe extern "system" fn SearchSites(this: *mut core::ffi::c_void, pigpmsearchcriteria: *mut core::ffi::c_void, ppigpmsomcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGPMSitesContainer_Impl::SearchSites(this, windows_core::from_raw_borrowed(&pigpmsearchcriteria)) { + match IGPMSitesContainer_Impl::SearchSites(this, core::mem::transmute_copy(&pigpmsearchcriteria)) { Ok(ok__) => { ppigpmsomcollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6381,7 +6381,7 @@ pub trait IGPMStarterGPO_Impl: super::Com::IDispatch_Impl { fn GenerateReport(&self, gpmreporttype: GPMReportType, pvargpmprogress: *const super::Variant::VARIANT, pvargpmcancel: *const super::Variant::VARIANT) -> windows_core::Result; fn GenerateReportToFile(&self, gpmreporttype: GPMReportType, bstrtargetfilepath: &windows_core::BSTR) -> windows_core::Result; fn GetSecurityInfo(&self) -> windows_core::Result; - fn SetSecurityInfo(&self, psecurityinfo: Option<&IGPMSecurityInfo>) -> windows_core::Result<()>; + fn SetSecurityInfo(&self, psecurityinfo: windows_core::Ref<'_, IGPMSecurityInfo>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IGPMStarterGPO_Vtbl { @@ -6570,7 +6570,7 @@ impl IGPMStarterGPO_Vtbl { } unsafe extern "system" fn SetSecurityInfo(this: *mut core::ffi::c_void, psecurityinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGPMStarterGPO_Impl::SetSecurityInfo(this, windows_core::from_raw_borrowed(&psecurityinfo)).into() + IGPMStarterGPO_Impl::SetSecurityInfo(this, core::mem::transmute_copy(&psecurityinfo)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), @@ -7419,7 +7419,7 @@ pub trait IGPMWMIFilter_Impl: super::Com::IDispatch_Impl { fn Description(&self) -> windows_core::Result; fn GetQueryList(&self) -> windows_core::Result; fn GetSecurityInfo(&self) -> windows_core::Result; - fn SetSecurityInfo(&self, psecurityinfo: Option<&IGPMSecurityInfo>) -> windows_core::Result<()>; + fn SetSecurityInfo(&self, psecurityinfo: windows_core::Ref<'_, IGPMSecurityInfo>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IGPMWMIFilter_Vtbl { @@ -7484,7 +7484,7 @@ impl IGPMWMIFilter_Vtbl { } unsafe extern "system" fn SetSecurityInfo(this: *mut core::ffi::c_void, psecurityinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGPMWMIFilter_Impl::SetSecurityInfo(this, windows_core::from_raw_borrowed(&psecurityinfo)).into() + IGPMWMIFilter_Impl::SetSecurityInfo(this, core::mem::transmute_copy(&psecurityinfo)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs index 0756707e95..ba0c1056c4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs @@ -1023,7 +1023,7 @@ pub trait IMSMQDestination_Impl: super::Com::IDispatch_Impl { fn Close(&self) -> windows_core::Result<()>; fn IsOpen(&self) -> windows_core::Result; fn IADs(&self) -> windows_core::Result; - fn putref_IADs(&self, piads: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn putref_IADs(&self, piads: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; fn ADsPath(&self) -> windows_core::Result; fn SetADsPath(&self, bstradspath: &windows_core::BSTR) -> windows_core::Result<()>; fn PathName(&self) -> windows_core::Result; @@ -1031,7 +1031,7 @@ pub trait IMSMQDestination_Impl: super::Com::IDispatch_Impl { fn FormatName(&self) -> windows_core::Result; fn SetFormatName(&self, bstrformatname: &windows_core::BSTR) -> windows_core::Result<()>; fn Destinations(&self) -> windows_core::Result; - fn putref_Destinations(&self, pdestinations: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn putref_Destinations(&self, pdestinations: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; fn Properties(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -1067,7 +1067,7 @@ impl IMSMQDestination_Vtbl { } unsafe extern "system" fn putref_IADs(this: *mut core::ffi::c_void, piads: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQDestination_Impl::putref_IADs(this, windows_core::from_raw_borrowed(&piads)).into() + IMSMQDestination_Impl::putref_IADs(this, core::mem::transmute_copy(&piads)).into() } unsafe extern "system" fn ADsPath(this: *mut core::ffi::c_void, pbstradspath: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1123,7 +1123,7 @@ impl IMSMQDestination_Vtbl { } unsafe extern "system" fn putref_Destinations(this: *mut core::ffi::c_void, pdestinations: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQDestination_Impl::putref_Destinations(this, windows_core::from_raw_borrowed(&pdestinations)).into() + IMSMQDestination_Impl::putref_Destinations(this, core::mem::transmute_copy(&pdestinations)).into() } unsafe extern "system" fn Properties(this: *mut core::ffi::c_void, ppcolproperties: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1768,7 +1768,7 @@ pub trait IMSMQMessage_Impl: super::Com::IDispatch_Impl { fn Journal(&self) -> windows_core::Result; fn SetJournal(&self, ljournal: i32) -> windows_core::Result<()>; fn ResponseQueueInfo(&self) -> windows_core::Result; - fn putref_ResponseQueueInfo(&self, pqinforesponse: Option<&IMSMQQueueInfo>) -> windows_core::Result<()>; + fn putref_ResponseQueueInfo(&self, pqinforesponse: windows_core::Ref<'_, IMSMQQueueInfo>) -> windows_core::Result<()>; fn AppSpecific(&self) -> windows_core::Result; fn SetAppSpecific(&self, lappspecific: i32) -> windows_core::Result<()>; fn SourceMachineGuid(&self) -> windows_core::Result; @@ -1776,7 +1776,7 @@ pub trait IMSMQMessage_Impl: super::Com::IDispatch_Impl { fn Body(&self) -> windows_core::Result; fn SetBody(&self, varbody: &super::Variant::VARIANT) -> windows_core::Result<()>; fn AdminQueueInfo(&self) -> windows_core::Result; - fn putref_AdminQueueInfo(&self, pqinfoadmin: Option<&IMSMQQueueInfo>) -> windows_core::Result<()>; + fn putref_AdminQueueInfo(&self, pqinfoadmin: windows_core::Ref<'_, IMSMQQueueInfo>) -> windows_core::Result<()>; fn Id(&self) -> windows_core::Result; fn CorrelationId(&self) -> windows_core::Result; fn SetCorrelationId(&self, varmsgid: &super::Variant::VARIANT) -> windows_core::Result<()>; @@ -1800,7 +1800,7 @@ pub trait IMSMQMessage_Impl: super::Com::IDispatch_Impl { fn SenderId(&self) -> windows_core::Result; fn SenderIdType(&self) -> windows_core::Result; fn SetSenderIdType(&self, lsenderidtype: i32) -> windows_core::Result<()>; - fn Send(&self, destinationqueue: Option<&IMSMQQueue>, transaction: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn Send(&self, destinationqueue: windows_core::Ref<'_, IMSMQQueue>, transaction: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn AttachCurrentSecurityContext(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -1922,7 +1922,7 @@ impl IMSMQMessage_Vtbl { } unsafe extern "system" fn putref_ResponseQueueInfo(this: *mut core::ffi::c_void, pqinforesponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage_Impl::putref_ResponseQueueInfo(this, windows_core::from_raw_borrowed(&pqinforesponse)).into() + IMSMQMessage_Impl::putref_ResponseQueueInfo(this, core::mem::transmute_copy(&pqinforesponse)).into() } unsafe extern "system" fn AppSpecific(this: *mut core::ffi::c_void, plappspecific: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1984,7 +1984,7 @@ impl IMSMQMessage_Vtbl { } unsafe extern "system" fn putref_AdminQueueInfo(this: *mut core::ffi::c_void, pqinfoadmin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage_Impl::putref_AdminQueueInfo(this, windows_core::from_raw_borrowed(&pqinfoadmin)).into() + IMSMQMessage_Impl::putref_AdminQueueInfo(this, core::mem::transmute_copy(&pqinfoadmin)).into() } unsafe extern "system" fn Id(this: *mut core::ffi::c_void, pvarmsgid: *mut super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2164,7 +2164,7 @@ impl IMSMQMessage_Vtbl { } unsafe extern "system" fn Send(this: *mut core::ffi::c_void, destinationqueue: *mut core::ffi::c_void, transaction: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage_Impl::Send(this, windows_core::from_raw_borrowed(&destinationqueue), core::mem::transmute_copy(&transaction)).into() + IMSMQMessage_Impl::Send(this, core::mem::transmute_copy(&destinationqueue), core::mem::transmute_copy(&transaction)).into() } unsafe extern "system" fn AttachCurrentSecurityContext(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2700,7 +2700,7 @@ pub trait IMSMQMessage2_Impl: super::Com::IDispatch_Impl { fn Journal(&self) -> windows_core::Result; fn SetJournal(&self, ljournal: i32) -> windows_core::Result<()>; fn ResponseQueueInfo_v1(&self) -> windows_core::Result; - fn putref_ResponseQueueInfo_v1(&self, pqinforesponse: Option<&IMSMQQueueInfo>) -> windows_core::Result<()>; + fn putref_ResponseQueueInfo_v1(&self, pqinforesponse: windows_core::Ref<'_, IMSMQQueueInfo>) -> windows_core::Result<()>; fn AppSpecific(&self) -> windows_core::Result; fn SetAppSpecific(&self, lappspecific: i32) -> windows_core::Result<()>; fn SourceMachineGuid(&self) -> windows_core::Result; @@ -2708,7 +2708,7 @@ pub trait IMSMQMessage2_Impl: super::Com::IDispatch_Impl { fn Body(&self) -> windows_core::Result; fn SetBody(&self, varbody: &super::Variant::VARIANT) -> windows_core::Result<()>; fn AdminQueueInfo_v1(&self) -> windows_core::Result; - fn putref_AdminQueueInfo_v1(&self, pqinfoadmin: Option<&IMSMQQueueInfo>) -> windows_core::Result<()>; + fn putref_AdminQueueInfo_v1(&self, pqinfoadmin: windows_core::Ref<'_, IMSMQQueueInfo>) -> windows_core::Result<()>; fn Id(&self) -> windows_core::Result; fn CorrelationId(&self) -> windows_core::Result; fn SetCorrelationId(&self, varmsgid: &super::Variant::VARIANT) -> windows_core::Result<()>; @@ -2732,7 +2732,7 @@ pub trait IMSMQMessage2_Impl: super::Com::IDispatch_Impl { fn SenderId(&self) -> windows_core::Result; fn SenderIdType(&self) -> windows_core::Result; fn SetSenderIdType(&self, lsenderidtype: i32) -> windows_core::Result<()>; - fn Send(&self, destinationqueue: Option<&IMSMQQueue2>, transaction: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn Send(&self, destinationqueue: windows_core::Ref<'_, IMSMQQueue2>, transaction: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn AttachCurrentSecurityContext(&self) -> windows_core::Result<()>; fn SenderVersion(&self) -> windows_core::Result; fn Extension(&self) -> windows_core::Result; @@ -2756,9 +2756,9 @@ pub trait IMSMQMessage2_Impl: super::Com::IDispatch_Impl { fn IsFirstInTransaction(&self) -> windows_core::Result; fn IsLastInTransaction(&self) -> windows_core::Result; fn ResponseQueueInfo(&self) -> windows_core::Result; - fn putref_ResponseQueueInfo(&self, pqinforesponse: Option<&IMSMQQueueInfo2>) -> windows_core::Result<()>; + fn putref_ResponseQueueInfo(&self, pqinforesponse: windows_core::Ref<'_, IMSMQQueueInfo2>) -> windows_core::Result<()>; fn AdminQueueInfo(&self) -> windows_core::Result; - fn putref_AdminQueueInfo(&self, pqinfoadmin: Option<&IMSMQQueueInfo2>) -> windows_core::Result<()>; + fn putref_AdminQueueInfo(&self, pqinfoadmin: windows_core::Ref<'_, IMSMQQueueInfo2>) -> windows_core::Result<()>; fn ReceivedAuthenticationLevel(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -2880,7 +2880,7 @@ impl IMSMQMessage2_Vtbl { } unsafe extern "system" fn putref_ResponseQueueInfo_v1(this: *mut core::ffi::c_void, pqinforesponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage2_Impl::putref_ResponseQueueInfo_v1(this, windows_core::from_raw_borrowed(&pqinforesponse)).into() + IMSMQMessage2_Impl::putref_ResponseQueueInfo_v1(this, core::mem::transmute_copy(&pqinforesponse)).into() } unsafe extern "system" fn AppSpecific(this: *mut core::ffi::c_void, plappspecific: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2942,7 +2942,7 @@ impl IMSMQMessage2_Vtbl { } unsafe extern "system" fn putref_AdminQueueInfo_v1(this: *mut core::ffi::c_void, pqinfoadmin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage2_Impl::putref_AdminQueueInfo_v1(this, windows_core::from_raw_borrowed(&pqinfoadmin)).into() + IMSMQMessage2_Impl::putref_AdminQueueInfo_v1(this, core::mem::transmute_copy(&pqinfoadmin)).into() } unsafe extern "system" fn Id(this: *mut core::ffi::c_void, pvarmsgid: *mut super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3122,7 +3122,7 @@ impl IMSMQMessage2_Vtbl { } unsafe extern "system" fn Send(this: *mut core::ffi::c_void, destinationqueue: *mut core::ffi::c_void, transaction: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage2_Impl::Send(this, windows_core::from_raw_borrowed(&destinationqueue), core::mem::transmute_copy(&transaction)).into() + IMSMQMessage2_Impl::Send(this, core::mem::transmute_copy(&destinationqueue), core::mem::transmute_copy(&transaction)).into() } unsafe extern "system" fn AttachCurrentSecurityContext(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3302,7 +3302,7 @@ impl IMSMQMessage2_Vtbl { } unsafe extern "system" fn putref_ResponseQueueInfo(this: *mut core::ffi::c_void, pqinforesponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage2_Impl::putref_ResponseQueueInfo(this, windows_core::from_raw_borrowed(&pqinforesponse)).into() + IMSMQMessage2_Impl::putref_ResponseQueueInfo(this, core::mem::transmute_copy(&pqinforesponse)).into() } unsafe extern "system" fn AdminQueueInfo(this: *mut core::ffi::c_void, ppqinfoadmin: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3316,7 +3316,7 @@ impl IMSMQMessage2_Vtbl { } unsafe extern "system" fn putref_AdminQueueInfo(this: *mut core::ffi::c_void, pqinfoadmin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage2_Impl::putref_AdminQueueInfo(this, windows_core::from_raw_borrowed(&pqinfoadmin)).into() + IMSMQMessage2_Impl::putref_AdminQueueInfo(this, core::mem::transmute_copy(&pqinfoadmin)).into() } unsafe extern "system" fn ReceivedAuthenticationLevel(this: *mut core::ffi::c_void, psreceivedauthenticationlevel: *mut i16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3975,7 +3975,7 @@ pub trait IMSMQMessage3_Impl: super::Com::IDispatch_Impl { fn Journal(&self) -> windows_core::Result; fn SetJournal(&self, ljournal: i32) -> windows_core::Result<()>; fn ResponseQueueInfo_v1(&self) -> windows_core::Result; - fn putref_ResponseQueueInfo_v1(&self, pqinforesponse: Option<&IMSMQQueueInfo>) -> windows_core::Result<()>; + fn putref_ResponseQueueInfo_v1(&self, pqinforesponse: windows_core::Ref<'_, IMSMQQueueInfo>) -> windows_core::Result<()>; fn AppSpecific(&self) -> windows_core::Result; fn SetAppSpecific(&self, lappspecific: i32) -> windows_core::Result<()>; fn SourceMachineGuid(&self) -> windows_core::Result; @@ -3983,7 +3983,7 @@ pub trait IMSMQMessage3_Impl: super::Com::IDispatch_Impl { fn Body(&self) -> windows_core::Result; fn SetBody(&self, varbody: &super::Variant::VARIANT) -> windows_core::Result<()>; fn AdminQueueInfo_v1(&self) -> windows_core::Result; - fn putref_AdminQueueInfo_v1(&self, pqinfoadmin: Option<&IMSMQQueueInfo>) -> windows_core::Result<()>; + fn putref_AdminQueueInfo_v1(&self, pqinfoadmin: windows_core::Ref<'_, IMSMQQueueInfo>) -> windows_core::Result<()>; fn Id(&self) -> windows_core::Result; fn CorrelationId(&self) -> windows_core::Result; fn SetCorrelationId(&self, varmsgid: &super::Variant::VARIANT) -> windows_core::Result<()>; @@ -4007,7 +4007,7 @@ pub trait IMSMQMessage3_Impl: super::Com::IDispatch_Impl { fn SenderId(&self) -> windows_core::Result; fn SenderIdType(&self) -> windows_core::Result; fn SetSenderIdType(&self, lsenderidtype: i32) -> windows_core::Result<()>; - fn Send(&self, destinationqueue: Option<&super::Com::IDispatch>, transaction: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn Send(&self, destinationqueue: windows_core::Ref<'_, super::Com::IDispatch>, transaction: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn AttachCurrentSecurityContext(&self) -> windows_core::Result<()>; fn SenderVersion(&self) -> windows_core::Result; fn Extension(&self) -> windows_core::Result; @@ -4031,16 +4031,16 @@ pub trait IMSMQMessage3_Impl: super::Com::IDispatch_Impl { fn IsFirstInTransaction(&self) -> windows_core::Result; fn IsLastInTransaction(&self) -> windows_core::Result; fn ResponseQueueInfo_v2(&self) -> windows_core::Result; - fn putref_ResponseQueueInfo_v2(&self, pqinforesponse: Option<&IMSMQQueueInfo2>) -> windows_core::Result<()>; + fn putref_ResponseQueueInfo_v2(&self, pqinforesponse: windows_core::Ref<'_, IMSMQQueueInfo2>) -> windows_core::Result<()>; fn AdminQueueInfo_v2(&self) -> windows_core::Result; - fn putref_AdminQueueInfo_v2(&self, pqinfoadmin: Option<&IMSMQQueueInfo2>) -> windows_core::Result<()>; + fn putref_AdminQueueInfo_v2(&self, pqinfoadmin: windows_core::Ref<'_, IMSMQQueueInfo2>) -> windows_core::Result<()>; fn ReceivedAuthenticationLevel(&self) -> windows_core::Result; fn ResponseQueueInfo(&self) -> windows_core::Result; - fn putref_ResponseQueueInfo(&self, pqinforesponse: Option<&IMSMQQueueInfo3>) -> windows_core::Result<()>; + fn putref_ResponseQueueInfo(&self, pqinforesponse: windows_core::Ref<'_, IMSMQQueueInfo3>) -> windows_core::Result<()>; fn AdminQueueInfo(&self) -> windows_core::Result; - fn putref_AdminQueueInfo(&self, pqinfoadmin: Option<&IMSMQQueueInfo3>) -> windows_core::Result<()>; + fn putref_AdminQueueInfo(&self, pqinfoadmin: windows_core::Ref<'_, IMSMQQueueInfo3>) -> windows_core::Result<()>; fn ResponseDestination(&self) -> windows_core::Result; - fn putref_ResponseDestination(&self, pdestresponse: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn putref_ResponseDestination(&self, pdestresponse: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; fn Destination(&self) -> windows_core::Result; fn LookupId(&self) -> windows_core::Result; fn IsAuthenticated2(&self) -> windows_core::Result; @@ -4171,7 +4171,7 @@ impl IMSMQMessage3_Vtbl { } unsafe extern "system" fn putref_ResponseQueueInfo_v1(this: *mut core::ffi::c_void, pqinforesponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage3_Impl::putref_ResponseQueueInfo_v1(this, windows_core::from_raw_borrowed(&pqinforesponse)).into() + IMSMQMessage3_Impl::putref_ResponseQueueInfo_v1(this, core::mem::transmute_copy(&pqinforesponse)).into() } unsafe extern "system" fn AppSpecific(this: *mut core::ffi::c_void, plappspecific: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4233,7 +4233,7 @@ impl IMSMQMessage3_Vtbl { } unsafe extern "system" fn putref_AdminQueueInfo_v1(this: *mut core::ffi::c_void, pqinfoadmin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage3_Impl::putref_AdminQueueInfo_v1(this, windows_core::from_raw_borrowed(&pqinfoadmin)).into() + IMSMQMessage3_Impl::putref_AdminQueueInfo_v1(this, core::mem::transmute_copy(&pqinfoadmin)).into() } unsafe extern "system" fn Id(this: *mut core::ffi::c_void, pvarmsgid: *mut super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4413,7 +4413,7 @@ impl IMSMQMessage3_Vtbl { } unsafe extern "system" fn Send(this: *mut core::ffi::c_void, destinationqueue: *mut core::ffi::c_void, transaction: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage3_Impl::Send(this, windows_core::from_raw_borrowed(&destinationqueue), core::mem::transmute_copy(&transaction)).into() + IMSMQMessage3_Impl::Send(this, core::mem::transmute_copy(&destinationqueue), core::mem::transmute_copy(&transaction)).into() } unsafe extern "system" fn AttachCurrentSecurityContext(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4593,7 +4593,7 @@ impl IMSMQMessage3_Vtbl { } unsafe extern "system" fn putref_ResponseQueueInfo_v2(this: *mut core::ffi::c_void, pqinforesponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage3_Impl::putref_ResponseQueueInfo_v2(this, windows_core::from_raw_borrowed(&pqinforesponse)).into() + IMSMQMessage3_Impl::putref_ResponseQueueInfo_v2(this, core::mem::transmute_copy(&pqinforesponse)).into() } unsafe extern "system" fn AdminQueueInfo_v2(this: *mut core::ffi::c_void, ppqinfoadmin: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4607,7 +4607,7 @@ impl IMSMQMessage3_Vtbl { } unsafe extern "system" fn putref_AdminQueueInfo_v2(this: *mut core::ffi::c_void, pqinfoadmin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage3_Impl::putref_AdminQueueInfo_v2(this, windows_core::from_raw_borrowed(&pqinfoadmin)).into() + IMSMQMessage3_Impl::putref_AdminQueueInfo_v2(this, core::mem::transmute_copy(&pqinfoadmin)).into() } unsafe extern "system" fn ReceivedAuthenticationLevel(this: *mut core::ffi::c_void, psreceivedauthenticationlevel: *mut i16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4631,7 +4631,7 @@ impl IMSMQMessage3_Vtbl { } unsafe extern "system" fn putref_ResponseQueueInfo(this: *mut core::ffi::c_void, pqinforesponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage3_Impl::putref_ResponseQueueInfo(this, windows_core::from_raw_borrowed(&pqinforesponse)).into() + IMSMQMessage3_Impl::putref_ResponseQueueInfo(this, core::mem::transmute_copy(&pqinforesponse)).into() } unsafe extern "system" fn AdminQueueInfo(this: *mut core::ffi::c_void, ppqinfoadmin: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4645,7 +4645,7 @@ impl IMSMQMessage3_Vtbl { } unsafe extern "system" fn putref_AdminQueueInfo(this: *mut core::ffi::c_void, pqinfoadmin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage3_Impl::putref_AdminQueueInfo(this, windows_core::from_raw_borrowed(&pqinfoadmin)).into() + IMSMQMessage3_Impl::putref_AdminQueueInfo(this, core::mem::transmute_copy(&pqinfoadmin)).into() } unsafe extern "system" fn ResponseDestination(this: *mut core::ffi::c_void, ppdestresponse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4659,7 +4659,7 @@ impl IMSMQMessage3_Vtbl { } unsafe extern "system" fn putref_ResponseDestination(this: *mut core::ffi::c_void, pdestresponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage3_Impl::putref_ResponseDestination(this, windows_core::from_raw_borrowed(&pdestresponse)).into() + IMSMQMessage3_Impl::putref_ResponseDestination(this, core::mem::transmute_copy(&pdestresponse)).into() } unsafe extern "system" fn Destination(this: *mut core::ffi::c_void, ppdestdestination: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5406,7 +5406,7 @@ pub trait IMSMQMessage4_Impl: super::Com::IDispatch_Impl { fn Journal(&self) -> windows_core::Result; fn SetJournal(&self, ljournal: i32) -> windows_core::Result<()>; fn ResponseQueueInfo_v1(&self) -> windows_core::Result; - fn putref_ResponseQueueInfo_v1(&self, pqinforesponse: Option<&IMSMQQueueInfo>) -> windows_core::Result<()>; + fn putref_ResponseQueueInfo_v1(&self, pqinforesponse: windows_core::Ref<'_, IMSMQQueueInfo>) -> windows_core::Result<()>; fn AppSpecific(&self) -> windows_core::Result; fn SetAppSpecific(&self, lappspecific: i32) -> windows_core::Result<()>; fn SourceMachineGuid(&self) -> windows_core::Result; @@ -5414,7 +5414,7 @@ pub trait IMSMQMessage4_Impl: super::Com::IDispatch_Impl { fn Body(&self) -> windows_core::Result; fn SetBody(&self, varbody: &super::Variant::VARIANT) -> windows_core::Result<()>; fn AdminQueueInfo_v1(&self) -> windows_core::Result; - fn putref_AdminQueueInfo_v1(&self, pqinfoadmin: Option<&IMSMQQueueInfo>) -> windows_core::Result<()>; + fn putref_AdminQueueInfo_v1(&self, pqinfoadmin: windows_core::Ref<'_, IMSMQQueueInfo>) -> windows_core::Result<()>; fn Id(&self) -> windows_core::Result; fn CorrelationId(&self) -> windows_core::Result; fn SetCorrelationId(&self, varmsgid: &super::Variant::VARIANT) -> windows_core::Result<()>; @@ -5438,7 +5438,7 @@ pub trait IMSMQMessage4_Impl: super::Com::IDispatch_Impl { fn SenderId(&self) -> windows_core::Result; fn SenderIdType(&self) -> windows_core::Result; fn SetSenderIdType(&self, lsenderidtype: i32) -> windows_core::Result<()>; - fn Send(&self, destinationqueue: Option<&super::Com::IDispatch>, transaction: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn Send(&self, destinationqueue: windows_core::Ref<'_, super::Com::IDispatch>, transaction: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn AttachCurrentSecurityContext(&self) -> windows_core::Result<()>; fn SenderVersion(&self) -> windows_core::Result; fn Extension(&self) -> windows_core::Result; @@ -5462,16 +5462,16 @@ pub trait IMSMQMessage4_Impl: super::Com::IDispatch_Impl { fn IsFirstInTransaction(&self) -> windows_core::Result; fn IsLastInTransaction(&self) -> windows_core::Result; fn ResponseQueueInfo_v2(&self) -> windows_core::Result; - fn putref_ResponseQueueInfo_v2(&self, pqinforesponse: Option<&IMSMQQueueInfo2>) -> windows_core::Result<()>; + fn putref_ResponseQueueInfo_v2(&self, pqinforesponse: windows_core::Ref<'_, IMSMQQueueInfo2>) -> windows_core::Result<()>; fn AdminQueueInfo_v2(&self) -> windows_core::Result; - fn putref_AdminQueueInfo_v2(&self, pqinfoadmin: Option<&IMSMQQueueInfo2>) -> windows_core::Result<()>; + fn putref_AdminQueueInfo_v2(&self, pqinfoadmin: windows_core::Ref<'_, IMSMQQueueInfo2>) -> windows_core::Result<()>; fn ReceivedAuthenticationLevel(&self) -> windows_core::Result; fn ResponseQueueInfo(&self) -> windows_core::Result; - fn putref_ResponseQueueInfo(&self, pqinforesponse: Option<&IMSMQQueueInfo4>) -> windows_core::Result<()>; + fn putref_ResponseQueueInfo(&self, pqinforesponse: windows_core::Ref<'_, IMSMQQueueInfo4>) -> windows_core::Result<()>; fn AdminQueueInfo(&self) -> windows_core::Result; - fn putref_AdminQueueInfo(&self, pqinfoadmin: Option<&IMSMQQueueInfo4>) -> windows_core::Result<()>; + fn putref_AdminQueueInfo(&self, pqinfoadmin: windows_core::Ref<'_, IMSMQQueueInfo4>) -> windows_core::Result<()>; fn ResponseDestination(&self) -> windows_core::Result; - fn putref_ResponseDestination(&self, pdestresponse: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn putref_ResponseDestination(&self, pdestresponse: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; fn Destination(&self) -> windows_core::Result; fn LookupId(&self) -> windows_core::Result; fn IsAuthenticated2(&self) -> windows_core::Result; @@ -5602,7 +5602,7 @@ impl IMSMQMessage4_Vtbl { } unsafe extern "system" fn putref_ResponseQueueInfo_v1(this: *mut core::ffi::c_void, pqinforesponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage4_Impl::putref_ResponseQueueInfo_v1(this, windows_core::from_raw_borrowed(&pqinforesponse)).into() + IMSMQMessage4_Impl::putref_ResponseQueueInfo_v1(this, core::mem::transmute_copy(&pqinforesponse)).into() } unsafe extern "system" fn AppSpecific(this: *mut core::ffi::c_void, plappspecific: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5664,7 +5664,7 @@ impl IMSMQMessage4_Vtbl { } unsafe extern "system" fn putref_AdminQueueInfo_v1(this: *mut core::ffi::c_void, pqinfoadmin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage4_Impl::putref_AdminQueueInfo_v1(this, windows_core::from_raw_borrowed(&pqinfoadmin)).into() + IMSMQMessage4_Impl::putref_AdminQueueInfo_v1(this, core::mem::transmute_copy(&pqinfoadmin)).into() } unsafe extern "system" fn Id(this: *mut core::ffi::c_void, pvarmsgid: *mut super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5844,7 +5844,7 @@ impl IMSMQMessage4_Vtbl { } unsafe extern "system" fn Send(this: *mut core::ffi::c_void, destinationqueue: *mut core::ffi::c_void, transaction: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage4_Impl::Send(this, windows_core::from_raw_borrowed(&destinationqueue), core::mem::transmute_copy(&transaction)).into() + IMSMQMessage4_Impl::Send(this, core::mem::transmute_copy(&destinationqueue), core::mem::transmute_copy(&transaction)).into() } unsafe extern "system" fn AttachCurrentSecurityContext(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6024,7 +6024,7 @@ impl IMSMQMessage4_Vtbl { } unsafe extern "system" fn putref_ResponseQueueInfo_v2(this: *mut core::ffi::c_void, pqinforesponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage4_Impl::putref_ResponseQueueInfo_v2(this, windows_core::from_raw_borrowed(&pqinforesponse)).into() + IMSMQMessage4_Impl::putref_ResponseQueueInfo_v2(this, core::mem::transmute_copy(&pqinforesponse)).into() } unsafe extern "system" fn AdminQueueInfo_v2(this: *mut core::ffi::c_void, ppqinfoadmin: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6038,7 +6038,7 @@ impl IMSMQMessage4_Vtbl { } unsafe extern "system" fn putref_AdminQueueInfo_v2(this: *mut core::ffi::c_void, pqinfoadmin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage4_Impl::putref_AdminQueueInfo_v2(this, windows_core::from_raw_borrowed(&pqinfoadmin)).into() + IMSMQMessage4_Impl::putref_AdminQueueInfo_v2(this, core::mem::transmute_copy(&pqinfoadmin)).into() } unsafe extern "system" fn ReceivedAuthenticationLevel(this: *mut core::ffi::c_void, psreceivedauthenticationlevel: *mut i16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6062,7 +6062,7 @@ impl IMSMQMessage4_Vtbl { } unsafe extern "system" fn putref_ResponseQueueInfo(this: *mut core::ffi::c_void, pqinforesponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage4_Impl::putref_ResponseQueueInfo(this, windows_core::from_raw_borrowed(&pqinforesponse)).into() + IMSMQMessage4_Impl::putref_ResponseQueueInfo(this, core::mem::transmute_copy(&pqinforesponse)).into() } unsafe extern "system" fn AdminQueueInfo(this: *mut core::ffi::c_void, ppqinfoadmin: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6076,7 +6076,7 @@ impl IMSMQMessage4_Vtbl { } unsafe extern "system" fn putref_AdminQueueInfo(this: *mut core::ffi::c_void, pqinfoadmin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage4_Impl::putref_AdminQueueInfo(this, windows_core::from_raw_borrowed(&pqinfoadmin)).into() + IMSMQMessage4_Impl::putref_AdminQueueInfo(this, core::mem::transmute_copy(&pqinfoadmin)).into() } unsafe extern "system" fn ResponseDestination(this: *mut core::ffi::c_void, ppdestresponse: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6090,7 +6090,7 @@ impl IMSMQMessage4_Vtbl { } unsafe extern "system" fn putref_ResponseDestination(this: *mut core::ffi::c_void, pdestresponse: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQMessage4_Impl::putref_ResponseDestination(this, windows_core::from_raw_borrowed(&pdestresponse)).into() + IMSMQMessage4_Impl::putref_ResponseDestination(this, core::mem::transmute_copy(&pdestresponse)).into() } unsafe extern "system" fn Destination(this: *mut core::ffi::c_void, ppdestdestination: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6502,8 +6502,8 @@ pub struct IMSMQPrivateEvent_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMSMQPrivateEvent_Impl: super::Com::IDispatch_Impl { fn Hwnd(&self) -> windows_core::Result; - fn FireArrivedEvent(&self, pq: Option<&IMSMQQueue>, msgcursor: i32) -> windows_core::Result<()>; - fn FireArrivedErrorEvent(&self, pq: Option<&IMSMQQueue>, hrstatus: windows_core::HRESULT, msgcursor: i32) -> windows_core::Result<()>; + fn FireArrivedEvent(&self, pq: windows_core::Ref<'_, IMSMQQueue>, msgcursor: i32) -> windows_core::Result<()>; + fn FireArrivedErrorEvent(&self, pq: windows_core::Ref<'_, IMSMQQueue>, hrstatus: windows_core::HRESULT, msgcursor: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMSMQPrivateEvent_Vtbl { @@ -6520,11 +6520,11 @@ impl IMSMQPrivateEvent_Vtbl { } unsafe extern "system" fn FireArrivedEvent(this: *mut core::ffi::c_void, pq: *mut core::ffi::c_void, msgcursor: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQPrivateEvent_Impl::FireArrivedEvent(this, windows_core::from_raw_borrowed(&pq), core::mem::transmute_copy(&msgcursor)).into() + IMSMQPrivateEvent_Impl::FireArrivedEvent(this, core::mem::transmute_copy(&pq), core::mem::transmute_copy(&msgcursor)).into() } unsafe extern "system" fn FireArrivedErrorEvent(this: *mut core::ffi::c_void, pq: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT, msgcursor: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQPrivateEvent_Impl::FireArrivedErrorEvent(this, windows_core::from_raw_borrowed(&pq), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&msgcursor)).into() + IMSMQPrivateEvent_Impl::FireArrivedErrorEvent(this, core::mem::transmute_copy(&pq), core::mem::transmute_copy(&hrstatus), core::mem::transmute_copy(&msgcursor)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), @@ -6971,7 +6971,7 @@ pub trait IMSMQQueue_Impl: super::Com::IDispatch_Impl { fn Close(&self) -> windows_core::Result<()>; fn Receive(&self, transaction: *const super::Variant::VARIANT, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; fn Peek(&self, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; - fn EnableNotification(&self, event: Option<&IMSMQEvent>, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn EnableNotification(&self, event: windows_core::Ref<'_, IMSMQEvent>, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn ReceiveCurrent(&self, transaction: *const super::Variant::VARIANT, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; fn PeekNext(&self, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; @@ -7056,7 +7056,7 @@ impl IMSMQQueue_Vtbl { } unsafe extern "system" fn EnableNotification(this: *mut core::ffi::c_void, event: *mut core::ffi::c_void, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQQueue_Impl::EnableNotification(this, windows_core::from_raw_borrowed(&event), core::mem::transmute_copy(&cursor), core::mem::transmute_copy(&receivetimeout)).into() + IMSMQQueue_Impl::EnableNotification(this, core::mem::transmute_copy(&event), core::mem::transmute_copy(&cursor), core::mem::transmute_copy(&receivetimeout)).into() } unsafe extern "system" fn Reset(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7283,7 +7283,7 @@ pub trait IMSMQQueue2_Impl: super::Com::IDispatch_Impl { fn Close(&self) -> windows_core::Result<()>; fn Receive_v1(&self, transaction: *const super::Variant::VARIANT, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; fn Peek_v1(&self, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; - fn EnableNotification(&self, event: Option<&IMSMQEvent2>, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn EnableNotification(&self, event: windows_core::Ref<'_, IMSMQEvent2>, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn ReceiveCurrent_v1(&self, transaction: *const super::Variant::VARIANT, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; fn PeekNext_v1(&self, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; @@ -7374,7 +7374,7 @@ impl IMSMQQueue2_Vtbl { } unsafe extern "system" fn EnableNotification(this: *mut core::ffi::c_void, event: *mut core::ffi::c_void, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQQueue2_Impl::EnableNotification(this, windows_core::from_raw_borrowed(&event), core::mem::transmute_copy(&cursor), core::mem::transmute_copy(&receivetimeout)).into() + IMSMQQueue2_Impl::EnableNotification(this, core::mem::transmute_copy(&event), core::mem::transmute_copy(&cursor), core::mem::transmute_copy(&receivetimeout)).into() } unsafe extern "system" fn Reset(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7775,7 +7775,7 @@ pub trait IMSMQQueue3_Impl: super::Com::IDispatch_Impl { fn Close(&self) -> windows_core::Result<()>; fn Receive_v1(&self, transaction: *const super::Variant::VARIANT, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; fn Peek_v1(&self, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; - fn EnableNotification(&self, event: Option<&IMSMQEvent3>, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn EnableNotification(&self, event: windows_core::Ref<'_, IMSMQEvent3>, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn ReceiveCurrent_v1(&self, transaction: *const super::Variant::VARIANT, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; fn PeekNext_v1(&self, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; @@ -7879,7 +7879,7 @@ impl IMSMQQueue3_Vtbl { } unsafe extern "system" fn EnableNotification(this: *mut core::ffi::c_void, event: *mut core::ffi::c_void, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQQueue3_Impl::EnableNotification(this, windows_core::from_raw_borrowed(&event), core::mem::transmute_copy(&cursor), core::mem::transmute_copy(&receivetimeout)).into() + IMSMQQueue3_Impl::EnableNotification(this, core::mem::transmute_copy(&event), core::mem::transmute_copy(&cursor), core::mem::transmute_copy(&receivetimeout)).into() } unsafe extern "system" fn Reset(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8426,7 +8426,7 @@ pub trait IMSMQQueue4_Impl: super::Com::IDispatch_Impl { fn Close(&self) -> windows_core::Result<()>; fn Receive_v1(&self, transaction: *const super::Variant::VARIANT, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; fn Peek_v1(&self, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; - fn EnableNotification(&self, event: Option<&IMSMQEvent3>, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn EnableNotification(&self, event: windows_core::Ref<'_, IMSMQEvent3>, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn ReceiveCurrent_v1(&self, transaction: *const super::Variant::VARIANT, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; fn PeekNext_v1(&self, wantdestinationqueue: *const super::Variant::VARIANT, wantbody: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::Result; @@ -8531,7 +8531,7 @@ impl IMSMQQueue4_Vtbl { } unsafe extern "system" fn EnableNotification(this: *mut core::ffi::c_void, event: *mut core::ffi::c_void, cursor: *const super::Variant::VARIANT, receivetimeout: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMSMQQueue4_Impl::EnableNotification(this, windows_core::from_raw_borrowed(&event), core::mem::transmute_copy(&cursor), core::mem::transmute_copy(&receivetimeout)).into() + IMSMQQueue4_Impl::EnableNotification(this, core::mem::transmute_copy(&event), core::mem::transmute_copy(&cursor), core::mem::transmute_copy(&receivetimeout)).into() } unsafe extern "system" fn Reset(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs index 8bedd938c8..7e131ed52e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs @@ -1264,24 +1264,24 @@ pub struct IComponent_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IComponent_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, lpconsole: Option<&IConsole>) -> windows_core::Result<()>; - fn Notify(&self, lpdataobject: Option<&super::Com::IDataObject>, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param3: super::super::Foundation::LPARAM) -> windows_core::Result<()>; + fn Initialize(&self, lpconsole: windows_core::Ref<'_, IConsole>) -> windows_core::Result<()>; + fn Notify(&self, lpdataobject: windows_core::Ref<'_, super::Com::IDataObject>, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param3: super::super::Foundation::LPARAM) -> windows_core::Result<()>; fn Destroy(&self, cookie: isize) -> windows_core::Result<()>; fn QueryDataObject(&self, cookie: isize, r#type: DATA_OBJECT_TYPES) -> windows_core::Result; fn GetResultViewType(&self, cookie: isize, ppviewtype: *mut windows_core::PWSTR, pviewoptions: *mut i32) -> windows_core::Result<()>; fn GetDisplayInfo(&self, presultdataitem: *mut RESULTDATAITEM) -> windows_core::Result<()>; - fn CompareObjects(&self, lpdataobjecta: Option<&super::Com::IDataObject>, lpdataobjectb: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; + fn CompareObjects(&self, lpdataobjecta: windows_core::Ref<'_, super::Com::IDataObject>, lpdataobjectb: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IComponent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, lpconsole: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComponent_Impl::Initialize(this, windows_core::from_raw_borrowed(&lpconsole)).into() + IComponent_Impl::Initialize(this, core::mem::transmute_copy(&lpconsole)).into() } unsafe extern "system" fn Notify(this: *mut core::ffi::c_void, lpdataobject: *mut core::ffi::c_void, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param3: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComponent_Impl::Notify(this, windows_core::from_raw_borrowed(&lpdataobject), core::mem::transmute_copy(&event), core::mem::transmute_copy(&arg), core::mem::transmute_copy(¶m3)).into() + IComponent_Impl::Notify(this, core::mem::transmute_copy(&lpdataobject), core::mem::transmute_copy(&event), core::mem::transmute_copy(&arg), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn Destroy(this: *mut core::ffi::c_void, cookie: isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1307,7 +1307,7 @@ impl IComponent_Vtbl { } unsafe extern "system" fn CompareObjects(this: *mut core::ffi::c_void, lpdataobjecta: *mut core::ffi::c_void, lpdataobjectb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComponent_Impl::CompareObjects(this, windows_core::from_raw_borrowed(&lpdataobjecta), windows_core::from_raw_borrowed(&lpdataobjectb)).into() + IComponent_Impl::CompareObjects(this, core::mem::transmute_copy(&lpdataobjecta), core::mem::transmute_copy(&lpdataobjectb)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1459,20 +1459,20 @@ pub struct IComponentData_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IComponentData_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, punknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, punknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn CreateComponent(&self) -> windows_core::Result; - fn Notify(&self, lpdataobject: Option<&super::Com::IDataObject>, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param3: super::super::Foundation::LPARAM) -> windows_core::Result<()>; + fn Notify(&self, lpdataobject: windows_core::Ref<'_, super::Com::IDataObject>, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param3: super::super::Foundation::LPARAM) -> windows_core::Result<()>; fn Destroy(&self) -> windows_core::Result<()>; fn QueryDataObject(&self, cookie: isize, r#type: DATA_OBJECT_TYPES) -> windows_core::Result; fn GetDisplayInfo(&self, pscopedataitem: *mut SCOPEDATAITEM) -> windows_core::Result<()>; - fn CompareObjects(&self, lpdataobjecta: Option<&super::Com::IDataObject>, lpdataobjectb: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; + fn CompareObjects(&self, lpdataobjecta: windows_core::Ref<'_, super::Com::IDataObject>, lpdataobjectb: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IComponentData_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, punknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComponentData_Impl::Initialize(this, windows_core::from_raw_borrowed(&punknown)).into() + IComponentData_Impl::Initialize(this, core::mem::transmute_copy(&punknown)).into() } unsafe extern "system" fn CreateComponent(this: *mut core::ffi::c_void, ppcomponent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1486,7 +1486,7 @@ impl IComponentData_Vtbl { } unsafe extern "system" fn Notify(this: *mut core::ffi::c_void, lpdataobject: *mut core::ffi::c_void, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param3: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComponentData_Impl::Notify(this, windows_core::from_raw_borrowed(&lpdataobject), core::mem::transmute_copy(&event), core::mem::transmute_copy(&arg), core::mem::transmute_copy(¶m3)).into() + IComponentData_Impl::Notify(this, core::mem::transmute_copy(&lpdataobject), core::mem::transmute_copy(&event), core::mem::transmute_copy(&arg), core::mem::transmute_copy(¶m3)).into() } unsafe extern "system" fn Destroy(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1508,7 +1508,7 @@ impl IComponentData_Vtbl { } unsafe extern "system" fn CompareObjects(this: *mut core::ffi::c_void, lpdataobjecta: *mut core::ffi::c_void, lpdataobjectb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IComponentData_Impl::CompareObjects(this, windows_core::from_raw_borrowed(&lpdataobjecta), windows_core::from_raw_borrowed(&lpdataobjectb)).into() + IComponentData_Impl::CompareObjects(this, core::mem::transmute_copy(&lpdataobjecta), core::mem::transmute_copy(&lpdataobjectb)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1652,12 +1652,12 @@ pub struct IConsole_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IConsole_Impl: windows_core::IUnknownImpl { - fn SetHeader(&self, pheader: Option<&IHeaderCtrl>) -> windows_core::Result<()>; - fn SetToolbar(&self, ptoolbar: Option<&IToolbar>) -> windows_core::Result<()>; + fn SetHeader(&self, pheader: windows_core::Ref<'_, IHeaderCtrl>) -> windows_core::Result<()>; + fn SetToolbar(&self, ptoolbar: windows_core::Ref<'_, IToolbar>) -> windows_core::Result<()>; fn QueryResultView(&self) -> windows_core::Result; fn QueryScopeImageList(&self) -> windows_core::Result; fn QueryResultImageList(&self) -> windows_core::Result; - fn UpdateAllViews(&self, lpdataobject: Option<&super::Com::IDataObject>, data: super::super::Foundation::LPARAM, hint: isize) -> windows_core::Result<()>; + fn UpdateAllViews(&self, lpdataobject: windows_core::Ref<'_, super::Com::IDataObject>, data: super::super::Foundation::LPARAM, hint: isize) -> windows_core::Result<()>; fn MessageBox(&self, lpsztext: &windows_core::PCWSTR, lpsztitle: &windows_core::PCWSTR, fustyle: u32) -> windows_core::Result; fn QueryConsoleVerb(&self) -> windows_core::Result; fn SelectScopeItem(&self, hscopeitem: isize) -> windows_core::Result<()>; @@ -1669,11 +1669,11 @@ impl IConsole_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetHeader(this: *mut core::ffi::c_void, pheader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConsole_Impl::SetHeader(this, windows_core::from_raw_borrowed(&pheader)).into() + IConsole_Impl::SetHeader(this, core::mem::transmute_copy(&pheader)).into() } unsafe extern "system" fn SetToolbar(this: *mut core::ffi::c_void, ptoolbar: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConsole_Impl::SetToolbar(this, windows_core::from_raw_borrowed(&ptoolbar)).into() + IConsole_Impl::SetToolbar(this, core::mem::transmute_copy(&ptoolbar)).into() } unsafe extern "system" fn QueryResultView(this: *mut core::ffi::c_void, punknown: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1707,7 +1707,7 @@ impl IConsole_Vtbl { } unsafe extern "system" fn UpdateAllViews(this: *mut core::ffi::c_void, lpdataobject: *mut core::ffi::c_void, data: super::super::Foundation::LPARAM, hint: isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConsole_Impl::UpdateAllViews(this, windows_core::from_raw_borrowed(&lpdataobject), core::mem::transmute_copy(&data), core::mem::transmute_copy(&hint)).into() + IConsole_Impl::UpdateAllViews(this, core::mem::transmute_copy(&lpdataobject), core::mem::transmute_copy(&data), core::mem::transmute_copy(&hint)).into() } unsafe extern "system" fn MessageBox(this: *mut core::ffi::c_void, lpsztext: windows_core::PCWSTR, lpsztitle: windows_core::PCWSTR, fustyle: u32, piretval: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2258,8 +2258,8 @@ pub struct IContextMenuProvider_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IContextMenuProvider_Impl: IContextMenuCallback_Impl { fn EmptyMenuList(&self) -> windows_core::Result<()>; - fn AddPrimaryExtensionItems(&self, piextension: Option<&windows_core::IUnknown>, pidataobject: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; - fn AddThirdPartyExtensionItems(&self, pidataobject: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; + fn AddPrimaryExtensionItems(&self, piextension: windows_core::Ref<'_, windows_core::IUnknown>, pidataobject: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; + fn AddThirdPartyExtensionItems(&self, pidataobject: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; fn ShowContextMenu(&self, hwndparent: super::super::Foundation::HWND, xpos: i32, ypos: i32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -2271,11 +2271,11 @@ impl IContextMenuProvider_Vtbl { } unsafe extern "system" fn AddPrimaryExtensionItems(this: *mut core::ffi::c_void, piextension: *mut core::ffi::c_void, pidataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContextMenuProvider_Impl::AddPrimaryExtensionItems(this, windows_core::from_raw_borrowed(&piextension), windows_core::from_raw_borrowed(&pidataobject)).into() + IContextMenuProvider_Impl::AddPrimaryExtensionItems(this, core::mem::transmute_copy(&piextension), core::mem::transmute_copy(&pidataobject)).into() } unsafe extern "system" fn AddThirdPartyExtensionItems(this: *mut core::ffi::c_void, pidataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContextMenuProvider_Impl::AddThirdPartyExtensionItems(this, windows_core::from_raw_borrowed(&pidataobject)).into() + IContextMenuProvider_Impl::AddThirdPartyExtensionItems(this, core::mem::transmute_copy(&pidataobject)).into() } unsafe extern "system" fn ShowContextMenu(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, xpos: i32, ypos: i32, plselected: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2332,15 +2332,15 @@ pub struct IControlbar_Vtbl { pub Detach: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IControlbar_Impl: windows_core::IUnknownImpl { - fn Create(&self, ntype: MMC_CONTROL_TYPE, pextendcontrolbar: Option<&IExtendControlbar>) -> windows_core::Result; - fn Attach(&self, ntype: MMC_CONTROL_TYPE, lpunknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn Detach(&self, lpunknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Create(&self, ntype: MMC_CONTROL_TYPE, pextendcontrolbar: windows_core::Ref<'_, IExtendControlbar>) -> windows_core::Result; + fn Attach(&self, ntype: MMC_CONTROL_TYPE, lpunknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn Detach(&self, lpunknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IControlbar_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, ntype: MMC_CONTROL_TYPE, pextendcontrolbar: *mut core::ffi::c_void, ppunknown: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IControlbar_Impl::Create(this, core::mem::transmute_copy(&ntype), windows_core::from_raw_borrowed(&pextendcontrolbar)) { + match IControlbar_Impl::Create(this, core::mem::transmute_copy(&ntype), core::mem::transmute_copy(&pextendcontrolbar)) { Ok(ok__) => { ppunknown.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2350,11 +2350,11 @@ impl IControlbar_Vtbl { } unsafe extern "system" fn Attach(this: *mut core::ffi::c_void, ntype: MMC_CONTROL_TYPE, lpunknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IControlbar_Impl::Attach(this, core::mem::transmute_copy(&ntype), windows_core::from_raw_borrowed(&lpunknown)).into() + IControlbar_Impl::Attach(this, core::mem::transmute_copy(&ntype), core::mem::transmute_copy(&lpunknown)).into() } unsafe extern "system" fn Detach(this: *mut core::ffi::c_void, lpunknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IControlbar_Impl::Detach(this, windows_core::from_raw_borrowed(&lpunknown)).into() + IControlbar_Impl::Detach(this, core::mem::transmute_copy(&lpunknown)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2500,19 +2500,19 @@ pub struct IExtendContextMenu_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IExtendContextMenu_Impl: windows_core::IUnknownImpl { - fn AddMenuItems(&self, pidataobject: Option<&super::Com::IDataObject>, picallback: Option<&IContextMenuCallback>, pinsertionallowed: *mut i32) -> windows_core::Result<()>; - fn Command(&self, lcommandid: i32, pidataobject: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; + fn AddMenuItems(&self, pidataobject: windows_core::Ref<'_, super::Com::IDataObject>, picallback: windows_core::Ref<'_, IContextMenuCallback>, pinsertionallowed: *mut i32) -> windows_core::Result<()>; + fn Command(&self, lcommandid: i32, pidataobject: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IExtendContextMenu_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddMenuItems(this: *mut core::ffi::c_void, pidataobject: *mut core::ffi::c_void, picallback: *mut core::ffi::c_void, pinsertionallowed: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExtendContextMenu_Impl::AddMenuItems(this, windows_core::from_raw_borrowed(&pidataobject), windows_core::from_raw_borrowed(&picallback), core::mem::transmute_copy(&pinsertionallowed)).into() + IExtendContextMenu_Impl::AddMenuItems(this, core::mem::transmute_copy(&pidataobject), core::mem::transmute_copy(&picallback), core::mem::transmute_copy(&pinsertionallowed)).into() } unsafe extern "system" fn Command(this: *mut core::ffi::c_void, lcommandid: i32, pidataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExtendContextMenu_Impl::Command(this, core::mem::transmute_copy(&lcommandid), windows_core::from_raw_borrowed(&pidataobject)).into() + IExtendContextMenu_Impl::Command(this, core::mem::transmute_copy(&lcommandid), core::mem::transmute_copy(&pidataobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2546,14 +2546,14 @@ pub struct IExtendControlbar_Vtbl { pub ControlbarNotify: unsafe extern "system" fn(*mut core::ffi::c_void, MMC_NOTIFY_TYPE, super::super::Foundation::LPARAM, super::super::Foundation::LPARAM) -> windows_core::HRESULT, } pub trait IExtendControlbar_Impl: windows_core::IUnknownImpl { - fn SetControlbar(&self, pcontrolbar: Option<&IControlbar>) -> windows_core::Result<()>; + fn SetControlbar(&self, pcontrolbar: windows_core::Ref<'_, IControlbar>) -> windows_core::Result<()>; fn ControlbarNotify(&self, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param2: super::super::Foundation::LPARAM) -> windows_core::Result<()>; } impl IExtendControlbar_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetControlbar(this: *mut core::ffi::c_void, pcontrolbar: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExtendControlbar_Impl::SetControlbar(this, windows_core::from_raw_borrowed(&pcontrolbar)).into() + IExtendControlbar_Impl::SetControlbar(this, core::mem::transmute_copy(&pcontrolbar)).into() } unsafe extern "system" fn ControlbarNotify(this: *mut core::ffi::c_void, event: MMC_NOTIFY_TYPE, arg: super::super::Foundation::LPARAM, param2: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2603,19 +2603,19 @@ pub struct IExtendPropertySheet_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IExtendPropertySheet_Impl: windows_core::IUnknownImpl { - fn CreatePropertyPages(&self, lpprovider: Option<&IPropertySheetCallback>, handle: isize, lpidataobject: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; - fn QueryPagesFor(&self, lpdataobject: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; + fn CreatePropertyPages(&self, lpprovider: windows_core::Ref<'_, IPropertySheetCallback>, handle: isize, lpidataobject: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; + fn QueryPagesFor(&self, lpdataobject: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IExtendPropertySheet_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreatePropertyPages(this: *mut core::ffi::c_void, lpprovider: *mut core::ffi::c_void, handle: isize, lpidataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExtendPropertySheet_Impl::CreatePropertyPages(this, windows_core::from_raw_borrowed(&lpprovider), core::mem::transmute_copy(&handle), windows_core::from_raw_borrowed(&lpidataobject)).into() + IExtendPropertySheet_Impl::CreatePropertyPages(this, core::mem::transmute_copy(&lpprovider), core::mem::transmute_copy(&handle), core::mem::transmute_copy(&lpidataobject)).into() } unsafe extern "system" fn QueryPagesFor(this: *mut core::ffi::c_void, lpdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExtendPropertySheet_Impl::QueryPagesFor(this, windows_core::from_raw_borrowed(&lpdataobject)).into() + IExtendPropertySheet_Impl::QueryPagesFor(this, core::mem::transmute_copy(&lpdataobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2656,14 +2656,14 @@ pub struct IExtendPropertySheet2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] pub trait IExtendPropertySheet2_Impl: IExtendPropertySheet_Impl { - fn GetWatermarks(&self, lpidataobject: Option<&super::Com::IDataObject>, lphwatermark: *mut super::super::Graphics::Gdi::HBITMAP, lphheader: *mut super::super::Graphics::Gdi::HBITMAP, lphpalette: *mut super::super::Graphics::Gdi::HPALETTE, bstretch: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn GetWatermarks(&self, lpidataobject: windows_core::Ref<'_, super::Com::IDataObject>, lphwatermark: *mut super::super::Graphics::Gdi::HBITMAP, lphheader: *mut super::super::Graphics::Gdi::HBITMAP, lphpalette: *mut super::super::Graphics::Gdi::HPALETTE, bstretch: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] impl IExtendPropertySheet2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetWatermarks(this: *mut core::ffi::c_void, lpidataobject: *mut core::ffi::c_void, lphwatermark: *mut super::super::Graphics::Gdi::HBITMAP, lphheader: *mut super::super::Graphics::Gdi::HBITMAP, lphpalette: *mut super::super::Graphics::Gdi::HPALETTE, bstretch: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExtendPropertySheet2_Impl::GetWatermarks(this, windows_core::from_raw_borrowed(&lpidataobject), core::mem::transmute_copy(&lphwatermark), core::mem::transmute_copy(&lphheader), core::mem::transmute_copy(&lphpalette), core::mem::transmute_copy(&bstretch)).into() + IExtendPropertySheet2_Impl::GetWatermarks(this, core::mem::transmute_copy(&lpidataobject), core::mem::transmute_copy(&lphwatermark), core::mem::transmute_copy(&lphheader), core::mem::transmute_copy(&lphpalette), core::mem::transmute_copy(&bstretch)).into() } Self { base__: IExtendPropertySheet_Vtbl::new::(), GetWatermarks: GetWatermarks:: } } @@ -2739,8 +2739,8 @@ pub struct IExtendTaskPad_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IExtendTaskPad_Impl: windows_core::IUnknownImpl { - fn TaskNotify(&self, pdo: Option<&super::Com::IDataObject>, arg: *const super::Variant::VARIANT, param2: *const super::Variant::VARIANT) -> windows_core::Result<()>; - fn EnumTasks(&self, pdo: Option<&super::Com::IDataObject>, sztaskgroup: &windows_core::PCWSTR) -> windows_core::Result; + fn TaskNotify(&self, pdo: windows_core::Ref<'_, super::Com::IDataObject>, arg: *const super::Variant::VARIANT, param2: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn EnumTasks(&self, pdo: windows_core::Ref<'_, super::Com::IDataObject>, sztaskgroup: &windows_core::PCWSTR) -> windows_core::Result; fn GetTitle(&self, pszgroup: &windows_core::PCWSTR) -> windows_core::Result; fn GetDescriptiveText(&self, pszgroup: &windows_core::PCWSTR) -> windows_core::Result; fn GetBackground(&self, pszgroup: &windows_core::PCWSTR) -> windows_core::Result; @@ -2751,11 +2751,11 @@ impl IExtendTaskPad_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TaskNotify(this: *mut core::ffi::c_void, pdo: *mut core::ffi::c_void, arg: *const super::Variant::VARIANT, param2: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExtendTaskPad_Impl::TaskNotify(this, windows_core::from_raw_borrowed(&pdo), core::mem::transmute_copy(&arg), core::mem::transmute_copy(¶m2)).into() + IExtendTaskPad_Impl::TaskNotify(this, core::mem::transmute_copy(&pdo), core::mem::transmute_copy(&arg), core::mem::transmute_copy(¶m2)).into() } unsafe extern "system" fn EnumTasks(this: *mut core::ffi::c_void, pdo: *mut core::ffi::c_void, sztaskgroup: windows_core::PCWSTR, ppenumtask: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IExtendTaskPad_Impl::EnumTasks(this, windows_core::from_raw_borrowed(&pdo), core::mem::transmute(&sztaskgroup)) { + match IExtendTaskPad_Impl::EnumTasks(this, core::mem::transmute_copy(&pdo), core::mem::transmute(&sztaskgroup)) { Ok(ok__) => { ppenumtask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2841,14 +2841,14 @@ pub struct IExtendView_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IExtendView_Impl: windows_core::IUnknownImpl { - fn GetViews(&self, pdataobject: Option<&super::Com::IDataObject>, pviewextensioncallback: Option<&IViewExtensionCallback>) -> windows_core::Result<()>; + fn GetViews(&self, pdataobject: windows_core::Ref<'_, super::Com::IDataObject>, pviewextensioncallback: windows_core::Ref<'_, IViewExtensionCallback>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IExtendView_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetViews(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void, pviewextensioncallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExtendView_Impl::GetViews(this, windows_core::from_raw_borrowed(&pdataobject), windows_core::from_raw_borrowed(&pviewextensioncallback)).into() + IExtendView_Impl::GetViews(this, core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&pviewextensioncallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), GetViews: GetViews:: } } @@ -3236,14 +3236,14 @@ pub struct INodeProperties_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait INodeProperties_Impl: windows_core::IUnknownImpl { - fn GetProperty(&self, pdataobject: Option<&super::Com::IDataObject>, szpropertyname: &windows_core::BSTR) -> windows_core::Result; + fn GetProperty(&self, pdataobject: windows_core::Ref<'_, super::Com::IDataObject>, szpropertyname: &windows_core::BSTR) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl INodeProperties_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetProperty(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void, szpropertyname: *mut core::ffi::c_void, pbstrproperty: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INodeProperties_Impl::GetProperty(this, windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute(&szpropertyname)) { + match INodeProperties_Impl::GetProperty(this, core::mem::transmute_copy(&pdataobject), core::mem::transmute(&szpropertyname)) { Ok(ok__) => { pbstrproperty.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3356,9 +3356,9 @@ pub struct IPropertySheetProvider_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IPropertySheetProvider_Impl: windows_core::IUnknownImpl { - fn CreatePropertySheet(&self, title: &windows_core::PCWSTR, r#type: u8, cookie: isize, pidataobjectm: Option<&super::Com::IDataObject>, dwoptions: u32) -> windows_core::Result<()>; - fn FindPropertySheet(&self, hitem: isize, lpcomponent: Option<&IComponent>, lpdataobject: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; - fn AddPrimaryPages(&self, lpunknown: Option<&windows_core::IUnknown>, bcreatehandle: super::super::Foundation::BOOL, hnotifywindow: super::super::Foundation::HWND, bscopepane: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn CreatePropertySheet(&self, title: &windows_core::PCWSTR, r#type: u8, cookie: isize, pidataobjectm: windows_core::Ref<'_, super::Com::IDataObject>, dwoptions: u32) -> windows_core::Result<()>; + fn FindPropertySheet(&self, hitem: isize, lpcomponent: windows_core::Ref<'_, IComponent>, lpdataobject: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; + fn AddPrimaryPages(&self, lpunknown: windows_core::Ref<'_, windows_core::IUnknown>, bcreatehandle: super::super::Foundation::BOOL, hnotifywindow: super::super::Foundation::HWND, bscopepane: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn AddExtensionPages(&self) -> windows_core::Result<()>; fn Show(&self, window: isize, page: i32) -> windows_core::Result<()>; } @@ -3367,15 +3367,15 @@ impl IPropertySheetProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreatePropertySheet(this: *mut core::ffi::c_void, title: windows_core::PCWSTR, r#type: u8, cookie: isize, pidataobjectm: *mut core::ffi::c_void, dwoptions: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertySheetProvider_Impl::CreatePropertySheet(this, core::mem::transmute(&title), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&cookie), windows_core::from_raw_borrowed(&pidataobjectm), core::mem::transmute_copy(&dwoptions)).into() + IPropertySheetProvider_Impl::CreatePropertySheet(this, core::mem::transmute(&title), core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&cookie), core::mem::transmute_copy(&pidataobjectm), core::mem::transmute_copy(&dwoptions)).into() } unsafe extern "system" fn FindPropertySheet(this: *mut core::ffi::c_void, hitem: isize, lpcomponent: *mut core::ffi::c_void, lpdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertySheetProvider_Impl::FindPropertySheet(this, core::mem::transmute_copy(&hitem), windows_core::from_raw_borrowed(&lpcomponent), windows_core::from_raw_borrowed(&lpdataobject)).into() + IPropertySheetProvider_Impl::FindPropertySheet(this, core::mem::transmute_copy(&hitem), core::mem::transmute_copy(&lpcomponent), core::mem::transmute_copy(&lpdataobject)).into() } unsafe extern "system" fn AddPrimaryPages(this: *mut core::ffi::c_void, lpunknown: *mut core::ffi::c_void, bcreatehandle: super::super::Foundation::BOOL, hnotifywindow: super::super::Foundation::HWND, bscopepane: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertySheetProvider_Impl::AddPrimaryPages(this, windows_core::from_raw_borrowed(&lpunknown), core::mem::transmute_copy(&bcreatehandle), core::mem::transmute_copy(&hnotifywindow), core::mem::transmute_copy(&bscopepane)).into() + IPropertySheetProvider_Impl::AddPrimaryPages(this, core::mem::transmute_copy(&lpunknown), core::mem::transmute_copy(&bcreatehandle), core::mem::transmute_copy(&hnotifywindow), core::mem::transmute_copy(&bscopepane)).into() } unsafe extern "system" fn AddExtensionPages(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4030,8 +4030,8 @@ pub struct ISnapinProperties_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISnapinProperties_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pproperties: Option<&Properties>) -> windows_core::Result<()>; - fn QueryPropertyNames(&self, pcallback: Option<&ISnapinPropertiesCallback>) -> windows_core::Result<()>; + fn Initialize(&self, pproperties: windows_core::Ref<'_, Properties>) -> windows_core::Result<()>; + fn QueryPropertyNames(&self, pcallback: windows_core::Ref<'_, ISnapinPropertiesCallback>) -> windows_core::Result<()>; fn PropertiesChanged(&self, cproperties: i32, pproperties: *const MMC_SNAPIN_PROPERTY) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -4039,11 +4039,11 @@ impl ISnapinProperties_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pproperties: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISnapinProperties_Impl::Initialize(this, windows_core::from_raw_borrowed(&pproperties)).into() + ISnapinProperties_Impl::Initialize(this, core::mem::transmute_copy(&pproperties)).into() } unsafe extern "system" fn QueryPropertyNames(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISnapinProperties_Impl::QueryPropertyNames(this, windows_core::from_raw_borrowed(&pcallback)).into() + ISnapinProperties_Impl::QueryPropertyNames(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn PropertiesChanged(this: *mut core::ffi::c_void, cproperties: i32, pproperties: *const MMC_SNAPIN_PROPERTY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5570,18 +5570,18 @@ pub struct ScopeNamespace_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ScopeNamespace_Impl: super::Com::IDispatch_Impl { - fn GetParent(&self, node: Option<&Node>) -> windows_core::Result; - fn GetChild(&self, node: Option<&Node>) -> windows_core::Result; - fn GetNext(&self, node: Option<&Node>) -> windows_core::Result; + fn GetParent(&self, node: windows_core::Ref<'_, Node>) -> windows_core::Result; + fn GetChild(&self, node: windows_core::Ref<'_, Node>) -> windows_core::Result; + fn GetNext(&self, node: windows_core::Ref<'_, Node>) -> windows_core::Result; fn GetRoot(&self) -> windows_core::Result; - fn Expand(&self, node: Option<&Node>) -> windows_core::Result<()>; + fn Expand(&self, node: windows_core::Ref<'_, Node>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ScopeNamespace_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetParent(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void, parent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ScopeNamespace_Impl::GetParent(this, windows_core::from_raw_borrowed(&node)) { + match ScopeNamespace_Impl::GetParent(this, core::mem::transmute_copy(&node)) { Ok(ok__) => { parent.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5591,7 +5591,7 @@ impl ScopeNamespace_Vtbl { } unsafe extern "system" fn GetChild(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void, child: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ScopeNamespace_Impl::GetChild(this, windows_core::from_raw_borrowed(&node)) { + match ScopeNamespace_Impl::GetChild(this, core::mem::transmute_copy(&node)) { Ok(ok__) => { child.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5601,7 +5601,7 @@ impl ScopeNamespace_Vtbl { } unsafe extern "system" fn GetNext(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void, next: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ScopeNamespace_Impl::GetNext(this, windows_core::from_raw_borrowed(&node)) { + match ScopeNamespace_Impl::GetNext(this, core::mem::transmute_copy(&node)) { Ok(ok__) => { next.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5621,7 +5621,7 @@ impl ScopeNamespace_Vtbl { } unsafe extern "system" fn Expand(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ScopeNamespace_Impl::Expand(this, windows_core::from_raw_borrowed(&node)).into() + ScopeNamespace_Impl::Expand(this, core::mem::transmute_copy(&node)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), @@ -5841,7 +5841,7 @@ pub trait SnapIns_Impl: super::Com::IDispatch_Impl { fn Item(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn Add(&self, snapinnameorclsid: &windows_core::BSTR, parentsnapin: &super::Variant::VARIANT, properties: &super::Variant::VARIANT) -> windows_core::Result; - fn Remove(&self, snapin: Option<&SnapIn>) -> windows_core::Result<()>; + fn Remove(&self, snapin: windows_core::Ref<'_, SnapIn>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl SnapIns_Vtbl { @@ -5888,7 +5888,7 @@ impl SnapIns_Vtbl { } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, snapin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - SnapIns_Impl::Remove(this, windows_core::from_raw_borrowed(&snapin)).into() + SnapIns_Impl::Remove(this, core::mem::transmute_copy(&snapin)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), @@ -6165,17 +6165,17 @@ pub struct View_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait View_Impl: super::Com::IDispatch_Impl { fn ActiveScopeNode(&self) -> windows_core::Result; - fn SetActiveScopeNode(&self, node: Option<&Node>) -> windows_core::Result<()>; + fn SetActiveScopeNode(&self, node: windows_core::Ref<'_, Node>) -> windows_core::Result<()>; fn Selection(&self) -> windows_core::Result; fn ListItems(&self) -> windows_core::Result; fn SnapinScopeObject(&self, scopenode: &super::Variant::VARIANT) -> windows_core::Result; fn SnapinSelectionObject(&self) -> windows_core::Result; - fn Is(&self, view: Option<&View>) -> windows_core::Result; + fn Is(&self, view: windows_core::Ref<'_, View>) -> windows_core::Result; fn Document(&self) -> windows_core::Result; fn SelectAll(&self) -> windows_core::Result<()>; - fn Select(&self, node: Option<&Node>) -> windows_core::Result<()>; - fn Deselect(&self, node: Option<&Node>) -> windows_core::Result<()>; - fn IsSelected(&self, node: Option<&Node>) -> windows_core::Result; + fn Select(&self, node: windows_core::Ref<'_, Node>) -> windows_core::Result<()>; + fn Deselect(&self, node: windows_core::Ref<'_, Node>) -> windows_core::Result<()>; + fn IsSelected(&self, node: windows_core::Ref<'_, Node>) -> windows_core::Result; fn DisplayScopeNodePropertySheet(&self, scopenode: &super::Variant::VARIANT) -> windows_core::Result<()>; fn DisplaySelectionPropertySheet(&self) -> windows_core::Result<()>; fn CopyScopeNode(&self, scopenode: &super::Variant::VARIANT) -> windows_core::Result<()>; @@ -6201,7 +6201,7 @@ pub trait View_Impl: super::Com::IDispatch_Impl { fn Memento(&self) -> windows_core::Result; fn ViewMemento(&self, memento: &windows_core::BSTR) -> windows_core::Result<()>; fn Columns(&self) -> windows_core::Result; - fn get_CellContents(&self, node: Option<&Node>, column: i32) -> windows_core::Result; + fn get_CellContents(&self, node: windows_core::Ref<'_, Node>, column: i32) -> windows_core::Result; fn ExportList(&self, file: &windows_core::BSTR, exportoptions: _ExportListOptions) -> windows_core::Result<()>; fn ListViewMode(&self) -> windows_core::Result<_ListViewMode>; fn SetListViewMode(&self, mode: _ListViewMode) -> windows_core::Result<()>; @@ -6222,7 +6222,7 @@ impl View_Vtbl { } unsafe extern "system" fn SetActiveScopeNode(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - View_Impl::SetActiveScopeNode(this, windows_core::from_raw_borrowed(&node)).into() + View_Impl::SetActiveScopeNode(this, core::mem::transmute_copy(&node)).into() } unsafe extern "system" fn Selection(this: *mut core::ffi::c_void, nodes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6266,7 +6266,7 @@ impl View_Vtbl { } unsafe extern "system" fn Is(this: *mut core::ffi::c_void, view: *mut core::ffi::c_void, thesame: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match View_Impl::Is(this, windows_core::from_raw_borrowed(&view)) { + match View_Impl::Is(this, core::mem::transmute_copy(&view)) { Ok(ok__) => { thesame.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6290,15 +6290,15 @@ impl View_Vtbl { } unsafe extern "system" fn Select(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - View_Impl::Select(this, windows_core::from_raw_borrowed(&node)).into() + View_Impl::Select(this, core::mem::transmute_copy(&node)).into() } unsafe extern "system" fn Deselect(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - View_Impl::Deselect(this, windows_core::from_raw_borrowed(&node)).into() + View_Impl::Deselect(this, core::mem::transmute_copy(&node)).into() } unsafe extern "system" fn IsSelected(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void, isselected: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match View_Impl::IsSelected(this, windows_core::from_raw_borrowed(&node)) { + match View_Impl::IsSelected(this, core::mem::transmute_copy(&node)) { Ok(ok__) => { isselected.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6444,7 +6444,7 @@ impl View_Vtbl { } unsafe extern "system" fn get_CellContents(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void, column: i32, cellcontents: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match View_Impl::get_CellContents(this, windows_core::from_raw_borrowed(&node), core::mem::transmute_copy(&column)) { + match View_Impl::get_CellContents(this, core::mem::transmute_copy(&node), core::mem::transmute_copy(&column)) { Ok(ok__) => { cellcontents.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6582,7 +6582,7 @@ pub struct Views_Vtbl { pub trait Views_Impl: super::Com::IDispatch_Impl { fn Item(&self, index: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; - fn Add(&self, node: Option<&Node>, viewoptions: _ViewOptions) -> windows_core::Result<()>; + fn Add(&self, node: windows_core::Ref<'_, Node>, viewoptions: _ViewOptions) -> windows_core::Result<()>; fn _NewEnum(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -6610,7 +6610,7 @@ impl Views_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, node: *mut core::ffi::c_void, viewoptions: _ViewOptions) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - Views_Impl::Add(this, windows_core::from_raw_borrowed(&node), core::mem::transmute_copy(&viewoptions)).into() + Views_Impl::Add(this, core::mem::transmute_copy(&node), core::mem::transmute_copy(&viewoptions)).into() } unsafe extern "system" fn _NewEnum(this: *mut core::ffi::c_void, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6742,61 +6742,61 @@ pub struct _AppEvents_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait _AppEvents_Impl: super::Com::IDispatch_Impl { - fn OnQuit(&self, application: Option<&_Application>) -> windows_core::Result<()>; - fn OnDocumentOpen(&self, document: Option<&Document>, new: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn OnDocumentClose(&self, document: Option<&Document>) -> windows_core::Result<()>; - fn OnSnapInAdded(&self, document: Option<&Document>, snapin: Option<&SnapIn>) -> windows_core::Result<()>; - fn OnSnapInRemoved(&self, document: Option<&Document>, snapin: Option<&SnapIn>) -> windows_core::Result<()>; - fn OnNewView(&self, view: Option<&View>) -> windows_core::Result<()>; - fn OnViewClose(&self, view: Option<&View>) -> windows_core::Result<()>; - fn OnViewChange(&self, view: Option<&View>, newownernode: Option<&Node>) -> windows_core::Result<()>; - fn OnSelectionChange(&self, view: Option<&View>, newnodes: Option<&Nodes>) -> windows_core::Result<()>; - fn OnContextMenuExecuted(&self, menuitem: Option<&MenuItem>) -> windows_core::Result<()>; + fn OnQuit(&self, application: windows_core::Ref<'_, _Application>) -> windows_core::Result<()>; + fn OnDocumentOpen(&self, document: windows_core::Ref<'_, Document>, new: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnDocumentClose(&self, document: windows_core::Ref<'_, Document>) -> windows_core::Result<()>; + fn OnSnapInAdded(&self, document: windows_core::Ref<'_, Document>, snapin: windows_core::Ref<'_, SnapIn>) -> windows_core::Result<()>; + fn OnSnapInRemoved(&self, document: windows_core::Ref<'_, Document>, snapin: windows_core::Ref<'_, SnapIn>) -> windows_core::Result<()>; + fn OnNewView(&self, view: windows_core::Ref<'_, View>) -> windows_core::Result<()>; + fn OnViewClose(&self, view: windows_core::Ref<'_, View>) -> windows_core::Result<()>; + fn OnViewChange(&self, view: windows_core::Ref<'_, View>, newownernode: windows_core::Ref<'_, Node>) -> windows_core::Result<()>; + fn OnSelectionChange(&self, view: windows_core::Ref<'_, View>, newnodes: windows_core::Ref<'_, Nodes>) -> windows_core::Result<()>; + fn OnContextMenuExecuted(&self, menuitem: windows_core::Ref<'_, MenuItem>) -> windows_core::Result<()>; fn OnToolbarButtonClicked(&self) -> windows_core::Result<()>; - fn OnListUpdated(&self, view: Option<&View>) -> windows_core::Result<()>; + fn OnListUpdated(&self, view: windows_core::Ref<'_, View>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl _AppEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnQuit(this: *mut core::ffi::c_void, application: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnQuit(this, windows_core::from_raw_borrowed(&application)).into() + _AppEvents_Impl::OnQuit(this, core::mem::transmute_copy(&application)).into() } unsafe extern "system" fn OnDocumentOpen(this: *mut core::ffi::c_void, document: *mut core::ffi::c_void, new: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnDocumentOpen(this, windows_core::from_raw_borrowed(&document), core::mem::transmute_copy(&new)).into() + _AppEvents_Impl::OnDocumentOpen(this, core::mem::transmute_copy(&document), core::mem::transmute_copy(&new)).into() } unsafe extern "system" fn OnDocumentClose(this: *mut core::ffi::c_void, document: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnDocumentClose(this, windows_core::from_raw_borrowed(&document)).into() + _AppEvents_Impl::OnDocumentClose(this, core::mem::transmute_copy(&document)).into() } unsafe extern "system" fn OnSnapInAdded(this: *mut core::ffi::c_void, document: *mut core::ffi::c_void, snapin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnSnapInAdded(this, windows_core::from_raw_borrowed(&document), windows_core::from_raw_borrowed(&snapin)).into() + _AppEvents_Impl::OnSnapInAdded(this, core::mem::transmute_copy(&document), core::mem::transmute_copy(&snapin)).into() } unsafe extern "system" fn OnSnapInRemoved(this: *mut core::ffi::c_void, document: *mut core::ffi::c_void, snapin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnSnapInRemoved(this, windows_core::from_raw_borrowed(&document), windows_core::from_raw_borrowed(&snapin)).into() + _AppEvents_Impl::OnSnapInRemoved(this, core::mem::transmute_copy(&document), core::mem::transmute_copy(&snapin)).into() } unsafe extern "system" fn OnNewView(this: *mut core::ffi::c_void, view: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnNewView(this, windows_core::from_raw_borrowed(&view)).into() + _AppEvents_Impl::OnNewView(this, core::mem::transmute_copy(&view)).into() } unsafe extern "system" fn OnViewClose(this: *mut core::ffi::c_void, view: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnViewClose(this, windows_core::from_raw_borrowed(&view)).into() + _AppEvents_Impl::OnViewClose(this, core::mem::transmute_copy(&view)).into() } unsafe extern "system" fn OnViewChange(this: *mut core::ffi::c_void, view: *mut core::ffi::c_void, newownernode: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnViewChange(this, windows_core::from_raw_borrowed(&view), windows_core::from_raw_borrowed(&newownernode)).into() + _AppEvents_Impl::OnViewChange(this, core::mem::transmute_copy(&view), core::mem::transmute_copy(&newownernode)).into() } unsafe extern "system" fn OnSelectionChange(this: *mut core::ffi::c_void, view: *mut core::ffi::c_void, newnodes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnSelectionChange(this, windows_core::from_raw_borrowed(&view), windows_core::from_raw_borrowed(&newnodes)).into() + _AppEvents_Impl::OnSelectionChange(this, core::mem::transmute_copy(&view), core::mem::transmute_copy(&newnodes)).into() } unsafe extern "system" fn OnContextMenuExecuted(this: *mut core::ffi::c_void, menuitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnContextMenuExecuted(this, windows_core::from_raw_borrowed(&menuitem)).into() + _AppEvents_Impl::OnContextMenuExecuted(this, core::mem::transmute_copy(&menuitem)).into() } unsafe extern "system" fn OnToolbarButtonClicked(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6804,7 +6804,7 @@ impl _AppEvents_Vtbl { } unsafe extern "system" fn OnListUpdated(this: *mut core::ffi::c_void, view: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _AppEvents_Impl::OnListUpdated(this, windows_core::from_raw_borrowed(&view)).into() + _AppEvents_Impl::OnListUpdated(this, core::mem::transmute_copy(&view)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), @@ -7063,7 +7063,7 @@ pub struct _EventConnector_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait _EventConnector_Impl: super::Com::IDispatch_Impl { - fn ConnectTo(&self, application: Option<&_Application>) -> windows_core::Result<()>; + fn ConnectTo(&self, application: windows_core::Ref<'_, _Application>) -> windows_core::Result<()>; fn Disconnect(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -7071,7 +7071,7 @@ impl _EventConnector_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConnectTo(this: *mut core::ffi::c_void, application: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _EventConnector_Impl::ConnectTo(this, windows_core::from_raw_borrowed(&application)).into() + _EventConnector_Impl::ConnectTo(this, core::mem::transmute_copy(&application)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs index 0987e16242..075f6771eb 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs @@ -3881,7 +3881,7 @@ pub struct IClassFactory2_Vtbl { pub trait IClassFactory2_Impl: super::Com::IClassFactory_Impl { fn GetLicInfo(&self, plicinfo: *mut LICINFO) -> windows_core::Result<()>; fn RequestLicKey(&self, dwreserved: u32) -> windows_core::Result; - fn CreateInstanceLic(&self, punkouter: Option<&windows_core::IUnknown>, punkreserved: Option, riid: *const windows_core::GUID, bstrkey: &windows_core::BSTR, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateInstanceLic(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, punkreserved: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, bstrkey: &windows_core::BSTR, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IClassFactory2_Vtbl { @@ -3902,7 +3902,7 @@ impl IClassFactory2_Vtbl { } unsafe extern "system" fn CreateInstanceLic(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, punkreserved: *mut core::ffi::c_void, riid: *const windows_core::GUID, bstrkey: *mut core::ffi::c_void, ppvobj: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IClassFactory2_Impl::CreateInstanceLic(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute(&punkreserved), core::mem::transmute_copy(&riid), core::mem::transmute(&bstrkey), core::mem::transmute_copy(&ppvobj)).into() + IClassFactory2_Impl::CreateInstanceLic(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&punkreserved), core::mem::transmute_copy(&riid), core::mem::transmute(&bstrkey), core::mem::transmute_copy(&ppvobj)).into() } Self { base__: super::Com::IClassFactory_Vtbl::new::(), @@ -4222,7 +4222,7 @@ pub trait ICreateTypeInfo_Impl: windows_core::IUnknownImpl { fn SetDocString(&self, pstrdoc: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetHelpContext(&self, dwhelpcontext: u32) -> windows_core::Result<()>; fn SetVersion(&self, wmajorvernum: u16, wminorvernum: u16) -> windows_core::Result<()>; - fn AddRefTypeInfo(&self, ptinfo: Option<&super::Com::ITypeInfo>, phreftype: *const u32) -> windows_core::Result<()>; + fn AddRefTypeInfo(&self, ptinfo: windows_core::Ref<'_, super::Com::ITypeInfo>, phreftype: *const u32) -> windows_core::Result<()>; fn AddFuncDesc(&self, index: u32, pfuncdesc: *const super::Com::FUNCDESC) -> windows_core::Result<()>; fn AddImplType(&self, index: u32, hreftype: u32) -> windows_core::Result<()>; fn SetImplTypeFlags(&self, index: u32, impltypeflags: super::Com::IMPLTYPEFLAGS) -> windows_core::Result<()>; @@ -4266,7 +4266,7 @@ impl ICreateTypeInfo_Vtbl { } unsafe extern "system" fn AddRefTypeInfo(this: *mut core::ffi::c_void, ptinfo: *mut core::ffi::c_void, phreftype: *const u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICreateTypeInfo_Impl::AddRefTypeInfo(this, windows_core::from_raw_borrowed(&ptinfo), core::mem::transmute_copy(&phreftype)).into() + ICreateTypeInfo_Impl::AddRefTypeInfo(this, core::mem::transmute_copy(&ptinfo), core::mem::transmute_copy(&phreftype)).into() } unsafe extern "system" fn AddFuncDesc(this: *mut core::ffi::c_void, index: u32, pfuncdesc: *const super::Com::FUNCDESC) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5119,7 +5119,7 @@ pub struct IDispatchEx_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] pub trait IDispatchEx_Impl: super::Com::IDispatch_Impl { fn GetDispID(&self, bstrname: &windows_core::BSTR, grfdex: u32) -> windows_core::Result; - fn InvokeEx(&self, id: i32, lcid: u32, wflags: u16, pdp: *const super::Com::DISPPARAMS, pvarres: *mut super::Variant::VARIANT, pei: *mut super::Com::EXCEPINFO, pspcaller: Option<&super::Com::IServiceProvider>) -> windows_core::Result<()>; + fn InvokeEx(&self, id: i32, lcid: u32, wflags: u16, pdp: *const super::Com::DISPPARAMS, pvarres: *mut super::Variant::VARIANT, pei: *mut super::Com::EXCEPINFO, pspcaller: windows_core::Ref<'_, super::Com::IServiceProvider>) -> windows_core::Result<()>; fn DeleteMemberByName(&self, bstrname: &windows_core::BSTR, grfdex: u32) -> windows_core::Result<()>; fn DeleteMemberByDispID(&self, id: i32) -> windows_core::Result<()>; fn GetMemberProperties(&self, id: i32, grfdexfetch: u32) -> windows_core::Result; @@ -5142,7 +5142,7 @@ impl IDispatchEx_Vtbl { } unsafe extern "system" fn InvokeEx(this: *mut core::ffi::c_void, id: i32, lcid: u32, wflags: u16, pdp: *const super::Com::DISPPARAMS, pvarres: *mut super::Variant::VARIANT, pei: *mut super::Com::EXCEPINFO, pspcaller: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDispatchEx_Impl::InvokeEx(this, core::mem::transmute_copy(&id), core::mem::transmute_copy(&lcid), core::mem::transmute_copy(&wflags), core::mem::transmute_copy(&pdp), core::mem::transmute_copy(&pvarres), core::mem::transmute_copy(&pei), windows_core::from_raw_borrowed(&pspcaller)).into() + IDispatchEx_Impl::InvokeEx(this, core::mem::transmute_copy(&id), core::mem::transmute_copy(&lcid), core::mem::transmute_copy(&wflags), core::mem::transmute_copy(&pdp), core::mem::transmute_copy(&pvarres), core::mem::transmute_copy(&pei), core::mem::transmute_copy(&pspcaller)).into() } unsafe extern "system" fn DeleteMemberByName(this: *mut core::ffi::c_void, bstrname: *mut core::ffi::c_void, grfdex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5343,17 +5343,17 @@ pub struct IDropTarget_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_SystemServices"))] pub trait IDropTarget_Impl: windows_core::IUnknownImpl { - fn DragEnter(&self, pdataobj: Option<&super::Com::IDataObject>, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS, pt: &super::super::Foundation::POINTL, pdweffect: *mut DROPEFFECT) -> windows_core::Result<()>; + fn DragEnter(&self, pdataobj: windows_core::Ref<'_, super::Com::IDataObject>, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS, pt: &super::super::Foundation::POINTL, pdweffect: *mut DROPEFFECT) -> windows_core::Result<()>; fn DragOver(&self, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS, pt: &super::super::Foundation::POINTL, pdweffect: *mut DROPEFFECT) -> windows_core::Result<()>; fn DragLeave(&self) -> windows_core::Result<()>; - fn Drop(&self, pdataobj: Option<&super::Com::IDataObject>, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS, pt: &super::super::Foundation::POINTL, pdweffect: *mut DROPEFFECT) -> windows_core::Result<()>; + fn Drop(&self, pdataobj: windows_core::Ref<'_, super::Com::IDataObject>, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS, pt: &super::super::Foundation::POINTL, pdweffect: *mut DROPEFFECT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_SystemServices"))] impl IDropTarget_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DragEnter(this: *mut core::ffi::c_void, pdataobj: *mut core::ffi::c_void, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS, pt: super::super::Foundation::POINTL, pdweffect: *mut DROPEFFECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDropTarget_Impl::DragEnter(this, windows_core::from_raw_borrowed(&pdataobj), core::mem::transmute_copy(&grfkeystate), core::mem::transmute(&pt), core::mem::transmute_copy(&pdweffect)).into() + IDropTarget_Impl::DragEnter(this, core::mem::transmute_copy(&pdataobj), core::mem::transmute_copy(&grfkeystate), core::mem::transmute(&pt), core::mem::transmute_copy(&pdweffect)).into() } unsafe extern "system" fn DragOver(this: *mut core::ffi::c_void, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS, pt: super::super::Foundation::POINTL, pdweffect: *mut DROPEFFECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5365,7 +5365,7 @@ impl IDropTarget_Vtbl { } unsafe extern "system" fn Drop(this: *mut core::ffi::c_void, pdataobj: *mut core::ffi::c_void, grfkeystate: super::SystemServices::MODIFIERKEYS_FLAGS, pt: super::super::Foundation::POINTL, pdweffect: *mut DROPEFFECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDropTarget_Impl::Drop(this, windows_core::from_raw_borrowed(&pdataobj), core::mem::transmute_copy(&grfkeystate), core::mem::transmute(&pt), core::mem::transmute_copy(&pdweffect)).into() + IDropTarget_Impl::Drop(this, core::mem::transmute_copy(&pdataobj), core::mem::transmute_copy(&grfkeystate), core::mem::transmute(&pt), core::mem::transmute_copy(&pdweffect)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5533,7 +5533,7 @@ pub struct IEnumOleDocumentViews_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumOleDocumentViews_Impl: windows_core::IUnknownImpl { - fn Next(&self, cviews: u32, rgpview: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cviews: u32, rgpview: windows_core::OutRef<'_, IOleDocumentView>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cviews: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -5601,7 +5601,7 @@ pub struct IEnumOleUndoUnits_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumOleUndoUnits_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::HRESULT; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IOleUndoUnit>, pceltfetched: *mut u32) -> windows_core::HRESULT; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -5883,7 +5883,7 @@ pub trait IFont_Impl: windows_core::IUnknownImpl { fn SetCharset(&self, charset: i16) -> windows_core::Result<()>; fn hFont(&self) -> windows_core::Result; fn Clone(&self) -> windows_core::Result; - fn IsEqual(&self, pfontother: Option<&IFont>) -> windows_core::Result<()>; + fn IsEqual(&self, pfontother: windows_core::Ref<'_, IFont>) -> windows_core::Result<()>; fn SetRatio(&self, cylogical: i32, cyhimetric: i32) -> windows_core::Result<()>; fn QueryTextMetrics(&self, ptm: *mut super::super::Graphics::Gdi::TEXTMETRICW) -> windows_core::Result<()>; fn AddRefHfont(&self, hfont: super::super::Graphics::Gdi::HFONT) -> windows_core::Result<()>; @@ -6027,7 +6027,7 @@ impl IFont_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, pfontother: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFont_Impl::IsEqual(this, windows_core::from_raw_borrowed(&pfontother)).into() + IFont_Impl::IsEqual(this, core::mem::transmute_copy(&pfontother)).into() } unsafe extern "system" fn SetRatio(this: *mut core::ffi::c_void, cylogical: i32, cyhimetric: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6284,13 +6284,13 @@ pub struct IObjectIdentity_Vtbl { pub IsEqualObject: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IObjectIdentity_Impl: windows_core::IUnknownImpl { - fn IsEqualObject(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn IsEqualObject(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IObjectIdentity_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsEqualObject(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjectIdentity_Impl::IsEqualObject(this, windows_core::from_raw_borrowed(&punk)).into() + IObjectIdentity_Impl::IsEqualObject(this, core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), IsEqualObject: IsEqualObject:: } } @@ -6323,14 +6323,14 @@ pub struct IObjectWithSite_Vtbl { pub GetSite: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IObjectWithSite_Impl: windows_core::IUnknownImpl { - fn SetSite(&self, punksite: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetSite(&self, punksite: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetSite(&self, riid: *const windows_core::GUID, ppvsite: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IObjectWithSite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSite(this: *mut core::ffi::c_void, punksite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjectWithSite_Impl::SetSite(this, windows_core::from_raw_borrowed(&punksite)).into() + IObjectWithSite_Impl::SetSite(this, core::mem::transmute_copy(&punksite)).into() } unsafe extern "system" fn GetSite(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvsite: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6397,10 +6397,10 @@ pub struct IOleAdviseHolder_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOleAdviseHolder_Impl: windows_core::IUnknownImpl { - fn Advise(&self, padvise: Option<&super::Com::IAdviseSink>) -> windows_core::Result; + fn Advise(&self, padvise: windows_core::Ref<'_, super::Com::IAdviseSink>) -> windows_core::Result; fn Unadvise(&self, dwconnection: u32) -> windows_core::Result<()>; fn EnumAdvise(&self) -> windows_core::Result; - fn SendOnRename(&self, pmk: Option<&super::Com::IMoniker>) -> windows_core::Result<()>; + fn SendOnRename(&self, pmk: windows_core::Ref<'_, super::Com::IMoniker>) -> windows_core::Result<()>; fn SendOnSave(&self) -> windows_core::Result<()>; fn SendOnClose(&self) -> windows_core::Result<()>; } @@ -6409,7 +6409,7 @@ impl IOleAdviseHolder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, padvise: *mut core::ffi::c_void, pdwconnection: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOleAdviseHolder_Impl::Advise(this, windows_core::from_raw_borrowed(&padvise)) { + match IOleAdviseHolder_Impl::Advise(this, core::mem::transmute_copy(&padvise)) { Ok(ok__) => { pdwconnection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6433,7 +6433,7 @@ impl IOleAdviseHolder_Vtbl { } unsafe extern "system" fn SendOnRename(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleAdviseHolder_Impl::SendOnRename(this, windows_core::from_raw_borrowed(&pmk)).into() + IOleAdviseHolder_Impl::SendOnRename(this, core::mem::transmute_copy(&pmk)).into() } unsafe extern "system" fn SendOnSave(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6513,7 +6513,7 @@ pub trait IOleCache_Impl: windows_core::IUnknownImpl { fn Cache(&self, pformatetc: *const super::Com::FORMATETC, advf: u32) -> windows_core::Result; fn Uncache(&self, dwconnection: u32) -> windows_core::Result<()>; fn EnumCache(&self) -> windows_core::Result; - fn InitCache(&self, pdataobject: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; + fn InitCache(&self, pdataobject: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; fn SetData(&self, pformatetc: *const super::Com::FORMATETC, pmedium: *const super::Com::STGMEDIUM, frelease: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] @@ -6545,7 +6545,7 @@ impl IOleCache_Vtbl { } unsafe extern "system" fn InitCache(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleCache_Impl::InitCache(this, windows_core::from_raw_borrowed(&pdataobject)).into() + IOleCache_Impl::InitCache(this, core::mem::transmute_copy(&pdataobject)).into() } unsafe extern "system" fn SetData(this: *mut core::ffi::c_void, pformatetc: *const super::Com::FORMATETC, pmedium: *const super::Com::STGMEDIUM, frelease: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6597,7 +6597,7 @@ pub struct IOleCache2_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] pub trait IOleCache2_Impl: IOleCache_Impl { - fn UpdateCache(&self, pdataobject: Option<&super::Com::IDataObject>, grfupdf: UPDFCACHE_FLAGS, preserved: *const core::ffi::c_void) -> windows_core::Result<()>; + fn UpdateCache(&self, pdataobject: windows_core::Ref<'_, super::Com::IDataObject>, grfupdf: UPDFCACHE_FLAGS, preserved: *const core::ffi::c_void) -> windows_core::Result<()>; fn DiscardCache(&self, dwdiscardoptions: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] @@ -6605,7 +6605,7 @@ impl IOleCache2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UpdateCache(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void, grfupdf: UPDFCACHE_FLAGS, preserved: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleCache2_Impl::UpdateCache(this, windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute_copy(&grfupdf), core::mem::transmute_copy(&preserved)).into() + IOleCache2_Impl::UpdateCache(this, core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&grfupdf), core::mem::transmute_copy(&preserved)).into() } unsafe extern "system" fn DiscardCache(this: *mut core::ffi::c_void, dwdiscardoptions: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6644,7 +6644,7 @@ pub struct IOleCacheControl_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOleCacheControl_Impl: windows_core::IUnknownImpl { - fn OnRun(&self, pdataobject: Option<&super::Com::IDataObject>) -> windows_core::Result<()>; + fn OnRun(&self, pdataobject: windows_core::Ref<'_, super::Com::IDataObject>) -> windows_core::Result<()>; fn OnStop(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -6652,7 +6652,7 @@ impl IOleCacheControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnRun(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleCacheControl_Impl::OnRun(this, windows_core::from_raw_borrowed(&pdataobject)).into() + IOleCacheControl_Impl::OnRun(this, core::mem::transmute_copy(&pdataobject)).into() } unsafe extern "system" fn OnStop(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7086,16 +7086,16 @@ pub struct IOleDocument_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOleDocument_Impl: windows_core::IUnknownImpl { - fn CreateView(&self, pipsite: Option<&IOleInPlaceSite>, pstm: Option<&super::Com::IStream>, dwreserved: u32) -> windows_core::Result; + fn CreateView(&self, pipsite: windows_core::Ref<'_, IOleInPlaceSite>, pstm: windows_core::Ref<'_, super::Com::IStream>, dwreserved: u32) -> windows_core::Result; fn GetDocMiscStatus(&self) -> windows_core::Result; - fn EnumViews(&self, ppenum: *mut Option, ppview: *mut Option) -> windows_core::Result<()>; + fn EnumViews(&self, ppenum: windows_core::OutRef<'_, IEnumOleDocumentViews>, ppview: windows_core::OutRef<'_, IOleDocumentView>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IOleDocument_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateView(this: *mut core::ffi::c_void, pipsite: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void, dwreserved: u32, ppview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOleDocument_Impl::CreateView(this, windows_core::from_raw_borrowed(&pipsite), windows_core::from_raw_borrowed(&pstm), core::mem::transmute_copy(&dwreserved)) { + match IOleDocument_Impl::CreateView(this, core::mem::transmute_copy(&pipsite), core::mem::transmute_copy(&pstm), core::mem::transmute_copy(&dwreserved)) { Ok(ok__) => { ppview.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7146,13 +7146,13 @@ pub struct IOleDocumentSite_Vtbl { pub ActivateMe: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IOleDocumentSite_Impl: windows_core::IUnknownImpl { - fn ActivateMe(&self, pviewtoactivate: Option<&IOleDocumentView>) -> windows_core::Result<()>; + fn ActivateMe(&self, pviewtoactivate: windows_core::Ref<'_, IOleDocumentView>) -> windows_core::Result<()>; } impl IOleDocumentSite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ActivateMe(this: *mut core::ffi::c_void, pviewtoactivate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleDocumentSite_Impl::ActivateMe(this, windows_core::from_raw_borrowed(&pviewtoactivate)).into() + IOleDocumentSite_Impl::ActivateMe(this, core::mem::transmute_copy(&pviewtoactivate)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ActivateMe: ActivateMe:: } } @@ -7247,7 +7247,7 @@ pub struct IOleDocumentView_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOleDocumentView_Impl: windows_core::IUnknownImpl { - fn SetInPlaceSite(&self, pipsite: Option<&IOleInPlaceSite>) -> windows_core::Result<()>; + fn SetInPlaceSite(&self, pipsite: windows_core::Ref<'_, IOleInPlaceSite>) -> windows_core::Result<()>; fn GetInPlaceSite(&self) -> windows_core::Result; fn GetDocument(&self) -> windows_core::Result; fn SetRect(&self, prcview: *const super::super::Foundation::RECT) -> windows_core::Result<()>; @@ -7257,16 +7257,16 @@ pub trait IOleDocumentView_Impl: windows_core::IUnknownImpl { fn UIActivate(&self, fuiactivate: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn Open(&self) -> windows_core::Result<()>; fn CloseView(&self, dwreserved: u32) -> windows_core::Result<()>; - fn SaveViewState(&self, pstm: Option<&super::Com::IStream>) -> windows_core::Result<()>; - fn ApplyViewState(&self, pstm: Option<&super::Com::IStream>) -> windows_core::Result<()>; - fn Clone(&self, pipsitenew: Option<&IOleInPlaceSite>) -> windows_core::Result; + fn SaveViewState(&self, pstm: windows_core::Ref<'_, super::Com::IStream>) -> windows_core::Result<()>; + fn ApplyViewState(&self, pstm: windows_core::Ref<'_, super::Com::IStream>) -> windows_core::Result<()>; + fn Clone(&self, pipsitenew: windows_core::Ref<'_, IOleInPlaceSite>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IOleDocumentView_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetInPlaceSite(this: *mut core::ffi::c_void, pipsite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleDocumentView_Impl::SetInPlaceSite(this, windows_core::from_raw_borrowed(&pipsite)).into() + IOleDocumentView_Impl::SetInPlaceSite(this, core::mem::transmute_copy(&pipsite)).into() } unsafe extern "system" fn GetInPlaceSite(this: *mut core::ffi::c_void, ppipsite: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7324,15 +7324,15 @@ impl IOleDocumentView_Vtbl { } unsafe extern "system" fn SaveViewState(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleDocumentView_Impl::SaveViewState(this, windows_core::from_raw_borrowed(&pstm)).into() + IOleDocumentView_Impl::SaveViewState(this, core::mem::transmute_copy(&pstm)).into() } unsafe extern "system" fn ApplyViewState(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleDocumentView_Impl::ApplyViewState(this, windows_core::from_raw_borrowed(&pstm)).into() + IOleDocumentView_Impl::ApplyViewState(this, core::mem::transmute_copy(&pstm)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, pipsitenew: *mut core::ffi::c_void, ppviewnew: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOleDocumentView_Impl::Clone(this, windows_core::from_raw_borrowed(&pipsitenew)) { + match IOleDocumentView_Impl::Clone(this, core::mem::transmute_copy(&pipsitenew)) { Ok(ok__) => { ppviewnew.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7409,7 +7409,7 @@ pub trait IOleInPlaceActiveObject_Impl: IOleWindow_Impl { fn TranslateAccelerator(&self, lpmsg: *const super::super::UI::WindowsAndMessaging::MSG) -> windows_core::Result<()>; fn OnFrameWindowActivate(&self, factivate: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn OnDocWindowActivate(&self, factivate: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn ResizeBorder(&self, prcborder: *const super::super::Foundation::RECT, puiwindow: Option<&IOleInPlaceUIWindow>, fframewindow: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn ResizeBorder(&self, prcborder: *const super::super::Foundation::RECT, puiwindow: windows_core::Ref<'_, IOleInPlaceUIWindow>, fframewindow: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn EnableModeless(&self, fenable: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -7429,7 +7429,7 @@ impl IOleInPlaceActiveObject_Vtbl { } unsafe extern "system" fn ResizeBorder(this: *mut core::ffi::c_void, prcborder: *const super::super::Foundation::RECT, puiwindow: *mut core::ffi::c_void, fframewindow: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleInPlaceActiveObject_Impl::ResizeBorder(this, core::mem::transmute_copy(&prcborder), windows_core::from_raw_borrowed(&puiwindow), core::mem::transmute_copy(&fframewindow)).into() + IOleInPlaceActiveObject_Impl::ResizeBorder(this, core::mem::transmute_copy(&prcborder), core::mem::transmute_copy(&puiwindow), core::mem::transmute_copy(&fframewindow)).into() } unsafe extern "system" fn EnableModeless(this: *mut core::ffi::c_void, fenable: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7750,7 +7750,7 @@ pub trait IOleInPlaceSite_Impl: IOleWindow_Impl { fn CanInPlaceActivate(&self) -> windows_core::Result<()>; fn OnInPlaceActivate(&self) -> windows_core::Result<()>; fn OnUIActivate(&self) -> windows_core::Result<()>; - fn GetWindowContext(&self, ppframe: *mut Option, ppdoc: *mut Option, lprcposrect: *mut super::super::Foundation::RECT, lprccliprect: *mut super::super::Foundation::RECT, lpframeinfo: *mut OLEINPLACEFRAMEINFO) -> windows_core::Result<()>; + fn GetWindowContext(&self, ppframe: windows_core::OutRef<'_, IOleInPlaceFrame>, ppdoc: windows_core::OutRef<'_, IOleInPlaceUIWindow>, lprcposrect: *mut super::super::Foundation::RECT, lprccliprect: *mut super::super::Foundation::RECT, lpframeinfo: *mut OLEINPLACEFRAMEINFO) -> windows_core::Result<()>; fn Scroll(&self, scrollextant: &super::super::Foundation::SIZE) -> windows_core::Result<()>; fn OnUIDeactivate(&self, fundoable: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn OnInPlaceDeactivate(&self) -> windows_core::Result<()>; @@ -8096,7 +8096,7 @@ pub trait IOleInPlaceUIWindow_Impl: IOleWindow_Impl { fn GetBorder(&self) -> windows_core::Result; fn RequestBorderSpace(&self, pborderwidths: *const super::super::Foundation::RECT) -> windows_core::Result<()>; fn SetBorderSpace(&self, pborderwidths: *const super::super::Foundation::RECT) -> windows_core::Result<()>; - fn SetActiveObject(&self, pactiveobject: Option<&IOleInPlaceActiveObject>, pszobjname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn SetActiveObject(&self, pactiveobject: windows_core::Ref<'_, IOleInPlaceActiveObject>, pszobjname: &windows_core::PCWSTR) -> windows_core::Result<()>; } impl IOleInPlaceUIWindow_Vtbl { pub const fn new() -> Self { @@ -8120,7 +8120,7 @@ impl IOleInPlaceUIWindow_Vtbl { } unsafe extern "system" fn SetActiveObject(this: *mut core::ffi::c_void, pactiveobject: *mut core::ffi::c_void, pszobjname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleInPlaceUIWindow_Impl::SetActiveObject(this, windows_core::from_raw_borrowed(&pactiveobject), core::mem::transmute(&pszobjname)).into() + IOleInPlaceUIWindow_Impl::SetActiveObject(this, core::mem::transmute_copy(&pactiveobject), core::mem::transmute(&pszobjname)).into() } Self { base__: IOleWindow_Vtbl::new::(), @@ -8186,8 +8186,8 @@ pub struct IOleItemContainer_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOleItemContainer_Impl: IOleContainer_Impl { - fn GetObject(&self, pszitem: &windows_core::PCWSTR, dwspeedneeded: u32, pbc: Option<&super::Com::IBindCtx>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn GetObjectStorage(&self, pszitem: &windows_core::PCWSTR, pbc: Option<&super::Com::IBindCtx>, riid: *const windows_core::GUID, ppvstorage: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn GetObject(&self, pszitem: &windows_core::PCWSTR, dwspeedneeded: u32, pbc: windows_core::Ref<'_, super::Com::IBindCtx>, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn GetObjectStorage(&self, pszitem: &windows_core::PCWSTR, pbc: windows_core::Ref<'_, super::Com::IBindCtx>, riid: *const windows_core::GUID, ppvstorage: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn IsRunning(&self, pszitem: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -8195,11 +8195,11 @@ impl IOleItemContainer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetObject(this: *mut core::ffi::c_void, pszitem: windows_core::PCWSTR, dwspeedneeded: u32, pbc: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleItemContainer_Impl::GetObject(this, core::mem::transmute(&pszitem), core::mem::transmute_copy(&dwspeedneeded), windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() + IOleItemContainer_Impl::GetObject(this, core::mem::transmute(&pszitem), core::mem::transmute_copy(&dwspeedneeded), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvobject)).into() } unsafe extern "system" fn GetObjectStorage(this: *mut core::ffi::c_void, pszitem: windows_core::PCWSTR, pbc: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvstorage: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleItemContainer_Impl::GetObjectStorage(this, core::mem::transmute(&pszitem), windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvstorage)).into() + IOleItemContainer_Impl::GetObjectStorage(this, core::mem::transmute(&pszitem), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvstorage)).into() } unsafe extern "system" fn IsRunning(this: *mut core::ffi::c_void, pszitem: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8306,15 +8306,15 @@ pub struct IOleLink_Vtbl { pub trait IOleLink_Impl: windows_core::IUnknownImpl { fn SetUpdateOptions(&self, dwupdateopt: u32) -> windows_core::Result<()>; fn GetUpdateOptions(&self) -> windows_core::Result; - fn SetSourceMoniker(&self, pmk: Option<&super::Com::IMoniker>, rclsid: *const windows_core::GUID) -> windows_core::Result<()>; + fn SetSourceMoniker(&self, pmk: windows_core::Ref<'_, super::Com::IMoniker>, rclsid: *const windows_core::GUID) -> windows_core::Result<()>; fn GetSourceMoniker(&self) -> windows_core::Result; fn SetSourceDisplayName(&self, pszstatustext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetSourceDisplayName(&self) -> windows_core::Result; - fn BindToSource(&self, bindflags: u32, pbc: Option<&super::Com::IBindCtx>) -> windows_core::Result<()>; + fn BindToSource(&self, bindflags: u32, pbc: windows_core::Ref<'_, super::Com::IBindCtx>) -> windows_core::Result<()>; fn BindIfRunning(&self) -> windows_core::Result<()>; fn GetBoundSource(&self) -> windows_core::Result; fn UnbindSource(&self) -> windows_core::Result<()>; - fn Update(&self, pbc: Option<&super::Com::IBindCtx>) -> windows_core::Result<()>; + fn Update(&self, pbc: windows_core::Ref<'_, super::Com::IBindCtx>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IOleLink_Vtbl { @@ -8335,7 +8335,7 @@ impl IOleLink_Vtbl { } unsafe extern "system" fn SetSourceMoniker(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void, rclsid: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleLink_Impl::SetSourceMoniker(this, windows_core::from_raw_borrowed(&pmk), core::mem::transmute_copy(&rclsid)).into() + IOleLink_Impl::SetSourceMoniker(this, core::mem::transmute_copy(&pmk), core::mem::transmute_copy(&rclsid)).into() } unsafe extern "system" fn GetSourceMoniker(this: *mut core::ffi::c_void, ppmk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8363,7 +8363,7 @@ impl IOleLink_Vtbl { } unsafe extern "system" fn BindToSource(this: *mut core::ffi::c_void, bindflags: u32, pbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleLink_Impl::BindToSource(this, core::mem::transmute_copy(&bindflags), windows_core::from_raw_borrowed(&pbc)).into() + IOleLink_Impl::BindToSource(this, core::mem::transmute_copy(&bindflags), core::mem::transmute_copy(&pbc)).into() } unsafe extern "system" fn BindIfRunning(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8385,7 +8385,7 @@ impl IOleLink_Vtbl { } unsafe extern "system" fn Update(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleLink_Impl::Update(this, windows_core::from_raw_borrowed(&pbc)).into() + IOleLink_Impl::Update(this, core::mem::transmute_copy(&pbc)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -8575,15 +8575,15 @@ pub struct IOleObject_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IOleObject_Impl: windows_core::IUnknownImpl { - fn SetClientSite(&self, pclientsite: Option<&IOleClientSite>) -> windows_core::Result<()>; + fn SetClientSite(&self, pclientsite: windows_core::Ref<'_, IOleClientSite>) -> windows_core::Result<()>; fn GetClientSite(&self) -> windows_core::Result; fn SetHostNames(&self, szcontainerapp: &windows_core::PCWSTR, szcontainerobj: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Close(&self, dwsaveoption: &OLECLOSE) -> windows_core::Result<()>; - fn SetMoniker(&self, dwwhichmoniker: &OLEWHICHMK, pmk: Option<&super::Com::IMoniker>) -> windows_core::Result<()>; + fn SetMoniker(&self, dwwhichmoniker: &OLEWHICHMK, pmk: windows_core::Ref<'_, super::Com::IMoniker>) -> windows_core::Result<()>; fn GetMoniker(&self, dwassign: &OLEGETMONIKER, dwwhichmoniker: &OLEWHICHMK) -> windows_core::Result; - fn InitFromData(&self, pdataobject: Option<&super::Com::IDataObject>, fcreation: super::super::Foundation::BOOL, dwreserved: u32) -> windows_core::Result<()>; + fn InitFromData(&self, pdataobject: windows_core::Ref<'_, super::Com::IDataObject>, fcreation: super::super::Foundation::BOOL, dwreserved: u32) -> windows_core::Result<()>; fn GetClipboardData(&self, dwreserved: u32) -> windows_core::Result; - fn DoVerb(&self, iverb: i32, lpmsg: *const super::super::UI::WindowsAndMessaging::MSG, pactivesite: Option<&IOleClientSite>, lindex: i32, hwndparent: super::super::Foundation::HWND, lprcposrect: *const super::super::Foundation::RECT) -> windows_core::Result<()>; + fn DoVerb(&self, iverb: i32, lpmsg: *const super::super::UI::WindowsAndMessaging::MSG, pactivesite: windows_core::Ref<'_, IOleClientSite>, lindex: i32, hwndparent: super::super::Foundation::HWND, lprcposrect: *const super::super::Foundation::RECT) -> windows_core::Result<()>; fn EnumVerbs(&self) -> windows_core::Result; fn Update(&self) -> windows_core::Result<()>; fn IsUpToDate(&self) -> windows_core::Result<()>; @@ -8591,7 +8591,7 @@ pub trait IOleObject_Impl: windows_core::IUnknownImpl { fn GetUserType(&self, dwformoftype: &USERCLASSTYPE) -> windows_core::Result; fn SetExtent(&self, dwdrawaspect: super::Com::DVASPECT, psizel: *const super::super::Foundation::SIZE) -> windows_core::Result<()>; fn GetExtent(&self, dwdrawaspect: super::Com::DVASPECT) -> windows_core::Result; - fn Advise(&self, padvsink: Option<&super::Com::IAdviseSink>) -> windows_core::Result; + fn Advise(&self, padvsink: windows_core::Ref<'_, super::Com::IAdviseSink>) -> windows_core::Result; fn Unadvise(&self, dwconnection: u32) -> windows_core::Result<()>; fn EnumAdvise(&self) -> windows_core::Result; fn GetMiscStatus(&self, dwaspect: super::Com::DVASPECT) -> windows_core::Result; @@ -8602,7 +8602,7 @@ impl IOleObject_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetClientSite(this: *mut core::ffi::c_void, pclientsite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleObject_Impl::SetClientSite(this, windows_core::from_raw_borrowed(&pclientsite)).into() + IOleObject_Impl::SetClientSite(this, core::mem::transmute_copy(&pclientsite)).into() } unsafe extern "system" fn GetClientSite(this: *mut core::ffi::c_void, ppclientsite: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8624,7 +8624,7 @@ impl IOleObject_Vtbl { } unsafe extern "system" fn SetMoniker(this: *mut core::ffi::c_void, dwwhichmoniker: u32, pmk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleObject_Impl::SetMoniker(this, core::mem::transmute(&dwwhichmoniker), windows_core::from_raw_borrowed(&pmk)).into() + IOleObject_Impl::SetMoniker(this, core::mem::transmute(&dwwhichmoniker), core::mem::transmute_copy(&pmk)).into() } unsafe extern "system" fn GetMoniker(this: *mut core::ffi::c_void, dwassign: u32, dwwhichmoniker: u32, ppmk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8638,7 +8638,7 @@ impl IOleObject_Vtbl { } unsafe extern "system" fn InitFromData(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void, fcreation: super::super::Foundation::BOOL, dwreserved: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleObject_Impl::InitFromData(this, windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute_copy(&fcreation), core::mem::transmute_copy(&dwreserved)).into() + IOleObject_Impl::InitFromData(this, core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&fcreation), core::mem::transmute_copy(&dwreserved)).into() } unsafe extern "system" fn GetClipboardData(this: *mut core::ffi::c_void, dwreserved: u32, ppdataobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8652,7 +8652,7 @@ impl IOleObject_Vtbl { } unsafe extern "system" fn DoVerb(this: *mut core::ffi::c_void, iverb: i32, lpmsg: *const super::super::UI::WindowsAndMessaging::MSG, pactivesite: *mut core::ffi::c_void, lindex: i32, hwndparent: super::super::Foundation::HWND, lprcposrect: *const super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleObject_Impl::DoVerb(this, core::mem::transmute_copy(&iverb), core::mem::transmute_copy(&lpmsg), windows_core::from_raw_borrowed(&pactivesite), core::mem::transmute_copy(&lindex), core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&lprcposrect)).into() + IOleObject_Impl::DoVerb(this, core::mem::transmute_copy(&iverb), core::mem::transmute_copy(&lpmsg), core::mem::transmute_copy(&pactivesite), core::mem::transmute_copy(&lindex), core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&lprcposrect)).into() } unsafe extern "system" fn EnumVerbs(this: *mut core::ffi::c_void, ppenumoleverb: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8708,7 +8708,7 @@ impl IOleObject_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, padvsink: *mut core::ffi::c_void, pdwconnection: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOleObject_Impl::Advise(this, windows_core::from_raw_borrowed(&padvsink)) { + match IOleObject_Impl::Advise(this, core::mem::transmute_copy(&padvsink)) { Ok(ok__) => { pdwconnection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8823,29 +8823,29 @@ pub struct IOleParentUndoUnit_Vtbl { pub GetParentState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IOleParentUndoUnit_Impl: IOleUndoUnit_Impl { - fn Open(&self, ppuu: Option<&IOleParentUndoUnit>) -> windows_core::Result<()>; - fn Close(&self, ppuu: Option<&IOleParentUndoUnit>, fcommit: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn Add(&self, puu: Option<&IOleUndoUnit>) -> windows_core::Result<()>; - fn FindUnit(&self, puu: Option<&IOleUndoUnit>) -> windows_core::Result<()>; + fn Open(&self, ppuu: windows_core::Ref<'_, IOleParentUndoUnit>) -> windows_core::Result<()>; + fn Close(&self, ppuu: windows_core::Ref<'_, IOleParentUndoUnit>, fcommit: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Add(&self, puu: windows_core::Ref<'_, IOleUndoUnit>) -> windows_core::Result<()>; + fn FindUnit(&self, puu: windows_core::Ref<'_, IOleUndoUnit>) -> windows_core::Result<()>; fn GetParentState(&self) -> windows_core::Result; } impl IOleParentUndoUnit_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, ppuu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleParentUndoUnit_Impl::Open(this, windows_core::from_raw_borrowed(&ppuu)).into() + IOleParentUndoUnit_Impl::Open(this, core::mem::transmute_copy(&ppuu)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void, ppuu: *mut core::ffi::c_void, fcommit: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleParentUndoUnit_Impl::Close(this, windows_core::from_raw_borrowed(&ppuu), core::mem::transmute_copy(&fcommit)).into() + IOleParentUndoUnit_Impl::Close(this, core::mem::transmute_copy(&ppuu), core::mem::transmute_copy(&fcommit)).into() } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, puu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleParentUndoUnit_Impl::Add(this, windows_core::from_raw_borrowed(&puu)).into() + IOleParentUndoUnit_Impl::Add(this, core::mem::transmute_copy(&puu)).into() } unsafe extern "system" fn FindUnit(this: *mut core::ffi::c_void, puu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleParentUndoUnit_Impl::FindUnit(this, windows_core::from_raw_borrowed(&puu)).into() + IOleParentUndoUnit_Impl::FindUnit(this, core::mem::transmute_copy(&puu)).into() } unsafe extern "system" fn GetParentState(this: *mut core::ffi::c_void, pdwstate: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9397,13 +9397,13 @@ pub struct IOleUndoManager_Vtbl { pub Enable: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IOleUndoManager_Impl: windows_core::IUnknownImpl { - fn Open(&self, ppuu: Option<&IOleParentUndoUnit>) -> windows_core::Result<()>; - fn Close(&self, ppuu: Option<&IOleParentUndoUnit>, fcommit: super::super::Foundation::BOOL) -> windows_core::HRESULT; - fn Add(&self, puu: Option<&IOleUndoUnit>) -> windows_core::Result<()>; + fn Open(&self, ppuu: windows_core::Ref<'_, IOleParentUndoUnit>) -> windows_core::Result<()>; + fn Close(&self, ppuu: windows_core::Ref<'_, IOleParentUndoUnit>, fcommit: super::super::Foundation::BOOL) -> windows_core::HRESULT; + fn Add(&self, puu: windows_core::Ref<'_, IOleUndoUnit>) -> windows_core::Result<()>; fn GetOpenParentState(&self) -> windows_core::Result; - fn DiscardFrom(&self, puu: Option<&IOleUndoUnit>) -> windows_core::Result<()>; - fn UndoTo(&self, puu: Option<&IOleUndoUnit>) -> windows_core::Result<()>; - fn RedoTo(&self, puu: Option<&IOleUndoUnit>) -> windows_core::Result<()>; + fn DiscardFrom(&self, puu: windows_core::Ref<'_, IOleUndoUnit>) -> windows_core::Result<()>; + fn UndoTo(&self, puu: windows_core::Ref<'_, IOleUndoUnit>) -> windows_core::Result<()>; + fn RedoTo(&self, puu: windows_core::Ref<'_, IOleUndoUnit>) -> windows_core::Result<()>; fn EnumUndoable(&self) -> windows_core::Result; fn EnumRedoable(&self) -> windows_core::Result; fn GetLastUndoDescription(&self) -> windows_core::Result; @@ -9414,15 +9414,15 @@ impl IOleUndoManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, ppuu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleUndoManager_Impl::Open(this, windows_core::from_raw_borrowed(&ppuu)).into() + IOleUndoManager_Impl::Open(this, core::mem::transmute_copy(&ppuu)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void, ppuu: *mut core::ffi::c_void, fcommit: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleUndoManager_Impl::Close(this, windows_core::from_raw_borrowed(&ppuu), core::mem::transmute_copy(&fcommit)) + IOleUndoManager_Impl::Close(this, core::mem::transmute_copy(&ppuu), core::mem::transmute_copy(&fcommit)) } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, puu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleUndoManager_Impl::Add(this, windows_core::from_raw_borrowed(&puu)).into() + IOleUndoManager_Impl::Add(this, core::mem::transmute_copy(&puu)).into() } unsafe extern "system" fn GetOpenParentState(this: *mut core::ffi::c_void, pdwstate: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9436,15 +9436,15 @@ impl IOleUndoManager_Vtbl { } unsafe extern "system" fn DiscardFrom(this: *mut core::ffi::c_void, puu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleUndoManager_Impl::DiscardFrom(this, windows_core::from_raw_borrowed(&puu)).into() + IOleUndoManager_Impl::DiscardFrom(this, core::mem::transmute_copy(&puu)).into() } unsafe extern "system" fn UndoTo(this: *mut core::ffi::c_void, puu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleUndoManager_Impl::UndoTo(this, windows_core::from_raw_borrowed(&puu)).into() + IOleUndoManager_Impl::UndoTo(this, core::mem::transmute_copy(&puu)).into() } unsafe extern "system" fn RedoTo(this: *mut core::ffi::c_void, puu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleUndoManager_Impl::RedoTo(this, windows_core::from_raw_borrowed(&puu)).into() + IOleUndoManager_Impl::RedoTo(this, core::mem::transmute_copy(&puu)).into() } unsafe extern "system" fn EnumUndoable(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9540,7 +9540,7 @@ pub struct IOleUndoUnit_Vtbl { pub OnNextAdd: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IOleUndoUnit_Impl: windows_core::IUnknownImpl { - fn Do(&self, pundomanager: Option<&IOleUndoManager>) -> windows_core::Result<()>; + fn Do(&self, pundomanager: windows_core::Ref<'_, IOleUndoManager>) -> windows_core::Result<()>; fn GetDescription(&self) -> windows_core::Result; fn GetUnitType(&self, pclsid: *mut windows_core::GUID, plid: *mut i32) -> windows_core::Result<()>; fn OnNextAdd(&self) -> windows_core::Result<()>; @@ -9549,7 +9549,7 @@ impl IOleUndoUnit_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Do(this: *mut core::ffi::c_void, pundomanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOleUndoUnit_Impl::Do(this, windows_core::from_raw_borrowed(&pundomanager)).into() + IOleUndoUnit_Impl::Do(this, core::mem::transmute_copy(&pundomanager)).into() } unsafe extern "system" fn GetDescription(this: *mut core::ffi::c_void, pbstr: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9652,14 +9652,14 @@ pub struct IParseDisplayName_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IParseDisplayName_Impl: windows_core::IUnknownImpl { - fn ParseDisplayName(&self, pbc: Option<&super::Com::IBindCtx>, pszdisplayname: &windows_core::PCWSTR, pcheaten: *mut u32, ppmkout: *mut Option) -> windows_core::Result<()>; + fn ParseDisplayName(&self, pbc: windows_core::Ref<'_, super::Com::IBindCtx>, pszdisplayname: &windows_core::PCWSTR, pcheaten: *mut u32, ppmkout: windows_core::OutRef<'_, super::Com::IMoniker>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IParseDisplayName_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ParseDisplayName(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pszdisplayname: windows_core::PCWSTR, pcheaten: *mut u32, ppmkout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IParseDisplayName_Impl::ParseDisplayName(this, windows_core::from_raw_borrowed(&pbc), core::mem::transmute(&pszdisplayname), core::mem::transmute_copy(&pcheaten), core::mem::transmute_copy(&ppmkout)).into() + IParseDisplayName_Impl::ParseDisplayName(this, core::mem::transmute_copy(&pbc), core::mem::transmute(&pszdisplayname), core::mem::transmute_copy(&pcheaten), core::mem::transmute_copy(&ppmkout)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ParseDisplayName: ParseDisplayName:: } } @@ -9807,8 +9807,8 @@ pub struct IPersistPropertyBag_Vtbl { #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait IPersistPropertyBag_Impl: super::Com::IPersist_Impl { fn InitNew(&self) -> windows_core::Result<()>; - fn Load(&self, ppropbag: Option<&super::Com::StructuredStorage::IPropertyBag>, perrorlog: Option<&super::Com::IErrorLog>) -> windows_core::Result<()>; - fn Save(&self, ppropbag: Option<&super::Com::StructuredStorage::IPropertyBag>, fcleardirty: super::super::Foundation::BOOL, fsaveallproperties: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Load(&self, ppropbag: windows_core::Ref<'_, super::Com::StructuredStorage::IPropertyBag>, perrorlog: windows_core::Ref<'_, super::Com::IErrorLog>) -> windows_core::Result<()>; + fn Save(&self, ppropbag: windows_core::Ref<'_, super::Com::StructuredStorage::IPropertyBag>, fcleardirty: super::super::Foundation::BOOL, fsaveallproperties: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl IPersistPropertyBag_Vtbl { @@ -9819,11 +9819,11 @@ impl IPersistPropertyBag_Vtbl { } unsafe extern "system" fn Load(this: *mut core::ffi::c_void, ppropbag: *mut core::ffi::c_void, perrorlog: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistPropertyBag_Impl::Load(this, windows_core::from_raw_borrowed(&ppropbag), windows_core::from_raw_borrowed(&perrorlog)).into() + IPersistPropertyBag_Impl::Load(this, core::mem::transmute_copy(&ppropbag), core::mem::transmute_copy(&perrorlog)).into() } unsafe extern "system" fn Save(this: *mut core::ffi::c_void, ppropbag: *mut core::ffi::c_void, fcleardirty: super::super::Foundation::BOOL, fsaveallproperties: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistPropertyBag_Impl::Save(this, windows_core::from_raw_borrowed(&ppropbag), core::mem::transmute_copy(&fcleardirty), core::mem::transmute_copy(&fsaveallproperties)).into() + IPersistPropertyBag_Impl::Save(this, core::mem::transmute_copy(&ppropbag), core::mem::transmute_copy(&fcleardirty), core::mem::transmute_copy(&fsaveallproperties)).into() } Self { base__: super::Com::IPersist_Vtbl::new::(), @@ -9891,8 +9891,8 @@ pub struct IPersistPropertyBag2_Vtbl { #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait IPersistPropertyBag2_Impl: super::Com::IPersist_Impl { fn InitNew(&self) -> windows_core::Result<()>; - fn Load(&self, ppropbag: Option<&super::Com::StructuredStorage::IPropertyBag2>, perrlog: Option<&super::Com::IErrorLog>) -> windows_core::Result<()>; - fn Save(&self, ppropbag: Option<&super::Com::StructuredStorage::IPropertyBag2>, fcleardirty: super::super::Foundation::BOOL, fsaveallproperties: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Load(&self, ppropbag: windows_core::Ref<'_, super::Com::StructuredStorage::IPropertyBag2>, perrlog: windows_core::Ref<'_, super::Com::IErrorLog>) -> windows_core::Result<()>; + fn Save(&self, ppropbag: windows_core::Ref<'_, super::Com::StructuredStorage::IPropertyBag2>, fcleardirty: super::super::Foundation::BOOL, fsaveallproperties: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn IsDirty(&self) -> windows_core::HRESULT; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] @@ -9904,11 +9904,11 @@ impl IPersistPropertyBag2_Vtbl { } unsafe extern "system" fn Load(this: *mut core::ffi::c_void, ppropbag: *mut core::ffi::c_void, perrlog: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistPropertyBag2_Impl::Load(this, windows_core::from_raw_borrowed(&ppropbag), windows_core::from_raw_borrowed(&perrlog)).into() + IPersistPropertyBag2_Impl::Load(this, core::mem::transmute_copy(&ppropbag), core::mem::transmute_copy(&perrlog)).into() } unsafe extern "system" fn Save(this: *mut core::ffi::c_void, ppropbag: *mut core::ffi::c_void, fcleardirty: super::super::Foundation::BOOL, fsaveallproperties: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistPropertyBag2_Impl::Save(this, windows_core::from_raw_borrowed(&ppropbag), core::mem::transmute_copy(&fcleardirty), core::mem::transmute_copy(&fsaveallproperties)).into() + IPersistPropertyBag2_Impl::Save(this, core::mem::transmute_copy(&ppropbag), core::mem::transmute_copy(&fcleardirty), core::mem::transmute_copy(&fsaveallproperties)).into() } unsafe extern "system" fn IsDirty(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10034,7 +10034,7 @@ pub trait IPicture_Impl: windows_core::IUnknownImpl { fn KeepOriginalFormat(&self) -> windows_core::Result; fn SetKeepOriginalFormat(&self, keep: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn PictureChanged(&self) -> windows_core::Result<()>; - fn SaveAsFile(&self, pstream: Option<&super::Com::IStream>, fsavememcopy: super::super::Foundation::BOOL) -> windows_core::Result; + fn SaveAsFile(&self, pstream: windows_core::Ref<'_, super::Com::IStream>, fsavememcopy: super::super::Foundation::BOOL) -> windows_core::Result; fn Attributes(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] @@ -10132,7 +10132,7 @@ impl IPicture_Vtbl { } unsafe extern "system" fn SaveAsFile(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, fsavememcopy: super::super::Foundation::BOOL, pcbsize: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPicture_Impl::SaveAsFile(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&fsavememcopy)) { + match IPicture_Impl::SaveAsFile(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&fsavememcopy)) { Ok(ok__) => { pcbsize.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10280,7 +10280,7 @@ pub trait IPicture2_Impl: windows_core::IUnknownImpl { fn KeepOriginalFormat(&self) -> windows_core::Result; fn SetKeepOriginalFormat(&self, keep: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn PictureChanged(&self) -> windows_core::Result<()>; - fn SaveAsFile(&self, pstream: Option<&super::Com::IStream>, fsavememcopy: super::super::Foundation::BOOL) -> windows_core::Result; + fn SaveAsFile(&self, pstream: windows_core::Ref<'_, super::Com::IStream>, fsavememcopy: super::super::Foundation::BOOL) -> windows_core::Result; fn Attributes(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] @@ -10378,7 +10378,7 @@ impl IPicture2_Vtbl { } unsafe extern "system" fn SaveAsFile(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, fsavememcopy: super::super::Foundation::BOOL, pcbsize: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPicture2_Impl::SaveAsFile(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&fsavememcopy)) { + match IPicture2_Impl::SaveAsFile(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&fsavememcopy)) { Ok(ok__) => { pcbsize.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10538,7 +10538,7 @@ pub struct IPrint_Vtbl { pub trait IPrint_Impl: windows_core::IUnknownImpl { fn SetInitialPageNum(&self, nfirstpage: i32) -> windows_core::Result<()>; fn GetPageInfo(&self, pnfirstpage: *mut i32, pcpages: *mut i32) -> windows_core::Result<()>; - fn Print(&self, grfflags: u32, pptd: *mut *mut super::Com::DVTARGETDEVICE, pppageset: *mut *mut PAGESET, pstgmoptions: *mut super::Com::STGMEDIUM, pcallback: Option<&IContinueCallback>, nfirstpage: i32, pcpagesprinted: *mut i32, pnlastpage: *mut i32) -> windows_core::Result<()>; + fn Print(&self, grfflags: u32, pptd: *mut *mut super::Com::DVTARGETDEVICE, pppageset: *mut *mut PAGESET, pstgmoptions: *mut super::Com::STGMEDIUM, pcallback: windows_core::Ref<'_, IContinueCallback>, nfirstpage: i32, pcpagesprinted: *mut i32, pnlastpage: *mut i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] impl IPrint_Vtbl { @@ -10553,7 +10553,7 @@ impl IPrint_Vtbl { } unsafe extern "system" fn Print(this: *mut core::ffi::c_void, grfflags: u32, pptd: *mut *mut super::Com::DVTARGETDEVICE, pppageset: *mut *mut PAGESET, pstgmoptions: *mut super::Com::STGMEDIUM, pcallback: *mut core::ffi::c_void, nfirstpage: i32, pcpagesprinted: *mut i32, pnlastpage: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrint_Impl::Print(this, core::mem::transmute_copy(&grfflags), core::mem::transmute_copy(&pptd), core::mem::transmute_copy(&pppageset), core::mem::transmute_copy(&pstgmoptions), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&nfirstpage), core::mem::transmute_copy(&pcpagesprinted), core::mem::transmute_copy(&pnlastpage)).into() + IPrint_Impl::Print(this, core::mem::transmute_copy(&grfflags), core::mem::transmute_copy(&pptd), core::mem::transmute_copy(&pppageset), core::mem::transmute_copy(&pstgmoptions), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&nfirstpage), core::mem::transmute_copy(&pcpagesprinted), core::mem::transmute_copy(&pnlastpage)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10673,7 +10673,7 @@ pub struct IPropertyPage_Vtbl { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub trait IPropertyPage_Impl: windows_core::IUnknownImpl { - fn SetPageSite(&self, ppagesite: Option<&IPropertyPageSite>) -> windows_core::Result<()>; + fn SetPageSite(&self, ppagesite: windows_core::Ref<'_, IPropertyPageSite>) -> windows_core::Result<()>; fn Activate(&self, hwndparent: super::super::Foundation::HWND, prect: *const super::super::Foundation::RECT, bmodal: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn Deactivate(&self) -> windows_core::Result<()>; fn GetPageInfo(&self, ppageinfo: *mut PROPPAGEINFO) -> windows_core::Result<()>; @@ -10690,7 +10690,7 @@ impl IPropertyPage_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPageSite(this: *mut core::ffi::c_void, ppagesite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertyPage_Impl::SetPageSite(this, windows_core::from_raw_borrowed(&ppagesite)).into() + IPropertyPage_Impl::SetPageSite(this, core::mem::transmute_copy(&ppagesite)).into() } unsafe extern "system" fn Activate(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, prect: *const super::super::Foundation::RECT, bmodal: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11117,7 +11117,7 @@ pub struct IProvideMultipleClassInfo_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IProvideMultipleClassInfo_Impl: IProvideClassInfo2_Impl { fn GetMultiTypeInfoCount(&self) -> windows_core::Result; - fn GetInfoOfIndex(&self, iti: u32, dwflags: MULTICLASSINFO_FLAGS, ppticoclass: *mut Option, pdwtiflags: *mut u32, pcdispidreserved: *mut u32, piidprimary: *mut windows_core::GUID, piidsource: *mut windows_core::GUID) -> windows_core::Result<()>; + fn GetInfoOfIndex(&self, iti: u32, dwflags: MULTICLASSINFO_FLAGS, ppticoclass: windows_core::OutRef<'_, super::Com::ITypeInfo>, pdwtiflags: *mut u32, pcdispidreserved: *mut u32, piidprimary: *mut windows_core::GUID, piidsource: *mut windows_core::GUID) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IProvideMultipleClassInfo_Vtbl { @@ -11367,7 +11367,7 @@ pub trait IRecordInfo_Impl: windows_core::IUnknownImpl { fn PutField(&self, wflags: u32, pvdata: *mut core::ffi::c_void, szfieldname: &windows_core::PCWSTR, pvarfield: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn PutFieldNoCopy(&self, wflags: u32, pvdata: *mut core::ffi::c_void, szfieldname: &windows_core::PCWSTR, pvarfield: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn GetFieldNames(&self, pcnames: *mut u32, rgbstrnames: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn IsMatchingType(&self, precordinfo: Option<&IRecordInfo>) -> super::super::Foundation::BOOL; + fn IsMatchingType(&self, precordinfo: windows_core::Ref<'_, IRecordInfo>) -> super::super::Foundation::BOOL; fn RecordCreate(&self) -> *mut core::ffi::c_void; fn RecordCreateCopy(&self, pvsource: *const core::ffi::c_void, ppvdest: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn RecordDestroy(&self, pvrecord: *const core::ffi::c_void) -> windows_core::Result<()>; @@ -11455,7 +11455,7 @@ impl IRecordInfo_Vtbl { } unsafe extern "system" fn IsMatchingType(this: *mut core::ffi::c_void, precordinfo: *mut core::ffi::c_void) -> super::super::Foundation::BOOL { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRecordInfo_Impl::IsMatchingType(this, windows_core::from_raw_borrowed(&precordinfo)) + IRecordInfo_Impl::IsMatchingType(this, core::mem::transmute_copy(&precordinfo)) } unsafe extern "system" fn RecordCreate(this: *mut core::ffi::c_void) -> *mut core::ffi::c_void { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11606,15 +11606,15 @@ pub struct ITypeChangeEvents_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITypeChangeEvents_Impl: windows_core::IUnknownImpl { - fn RequestTypeChange(&self, changekind: CHANGEKIND, ptinfobefore: Option<&super::Com::ITypeInfo>, pstrname: &windows_core::PCWSTR) -> windows_core::Result; - fn AfterTypeChange(&self, changekind: CHANGEKIND, ptinfoafter: Option<&super::Com::ITypeInfo>, pstrname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn RequestTypeChange(&self, changekind: CHANGEKIND, ptinfobefore: windows_core::Ref<'_, super::Com::ITypeInfo>, pstrname: &windows_core::PCWSTR) -> windows_core::Result; + fn AfterTypeChange(&self, changekind: CHANGEKIND, ptinfoafter: windows_core::Ref<'_, super::Com::ITypeInfo>, pstrname: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ITypeChangeEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RequestTypeChange(this: *mut core::ffi::c_void, changekind: CHANGEKIND, ptinfobefore: *mut core::ffi::c_void, pstrname: windows_core::PCWSTR, pfcancel: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITypeChangeEvents_Impl::RequestTypeChange(this, core::mem::transmute_copy(&changekind), windows_core::from_raw_borrowed(&ptinfobefore), core::mem::transmute(&pstrname)) { + match ITypeChangeEvents_Impl::RequestTypeChange(this, core::mem::transmute_copy(&changekind), core::mem::transmute_copy(&ptinfobefore), core::mem::transmute(&pstrname)) { Ok(ok__) => { pfcancel.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11624,7 +11624,7 @@ impl ITypeChangeEvents_Vtbl { } unsafe extern "system" fn AfterTypeChange(this: *mut core::ffi::c_void, changekind: CHANGEKIND, ptinfoafter: *mut core::ffi::c_void, pstrname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITypeChangeEvents_Impl::AfterTypeChange(this, core::mem::transmute_copy(&changekind), windows_core::from_raw_borrowed(&ptinfoafter), core::mem::transmute(&pstrname)).into() + ITypeChangeEvents_Impl::AfterTypeChange(this, core::mem::transmute_copy(&changekind), core::mem::transmute_copy(&ptinfoafter), core::mem::transmute(&pstrname)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -11660,14 +11660,14 @@ pub struct ITypeFactory_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITypeFactory_Impl: windows_core::IUnknownImpl { - fn CreateFromTypeInfo(&self, ptypeinfo: Option<&super::Com::ITypeInfo>, riid: *const windows_core::GUID) -> windows_core::Result; + fn CreateFromTypeInfo(&self, ptypeinfo: windows_core::Ref<'_, super::Com::ITypeInfo>, riid: *const windows_core::GUID) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl ITypeFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFromTypeInfo(this: *mut core::ffi::c_void, ptypeinfo: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITypeFactory_Impl::CreateFromTypeInfo(this, windows_core::from_raw_borrowed(&ptypeinfo), core::mem::transmute_copy(&riid)) { + match ITypeFactory_Impl::CreateFromTypeInfo(this, core::mem::transmute_copy(&ptypeinfo), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppv.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11924,8 +11924,8 @@ pub trait IViewObject_Impl: windows_core::IUnknownImpl { fn GetColorSet(&self, dwdrawaspect: super::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: *const super::Com::DVTARGETDEVICE, hictargetdev: super::super::Graphics::Gdi::HDC, ppcolorset: *mut *mut super::super::Graphics::Gdi::LOGPALETTE) -> windows_core::Result<()>; fn Freeze(&self, dwdrawaspect: super::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, pdwfreeze: *mut u32) -> windows_core::Result<()>; fn Unfreeze(&self, dwfreeze: u32) -> windows_core::Result<()>; - fn SetAdvise(&self, aspects: super::Com::DVASPECT, advf: u32, padvsink: Option<&super::Com::IAdviseSink>) -> windows_core::Result<()>; - fn GetAdvise(&self, paspects: *mut u32, padvf: *mut u32, ppadvsink: *mut Option) -> windows_core::Result<()>; + fn SetAdvise(&self, aspects: super::Com::DVASPECT, advf: u32, padvsink: windows_core::Ref<'_, super::Com::IAdviseSink>) -> windows_core::Result<()>; + fn GetAdvise(&self, paspects: *mut u32, padvf: *mut u32, ppadvsink: windows_core::OutRef<'_, super::Com::IAdviseSink>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] impl IViewObject_Vtbl { @@ -11948,7 +11948,7 @@ impl IViewObject_Vtbl { } unsafe extern "system" fn SetAdvise(this: *mut core::ffi::c_void, aspects: super::Com::DVASPECT, advf: u32, padvsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IViewObject_Impl::SetAdvise(this, core::mem::transmute_copy(&aspects), core::mem::transmute_copy(&advf), windows_core::from_raw_borrowed(&padvsink)).into() + IViewObject_Impl::SetAdvise(this, core::mem::transmute_copy(&aspects), core::mem::transmute_copy(&advf), core::mem::transmute_copy(&padvsink)).into() } unsafe extern "system" fn GetAdvise(this: *mut core::ffi::c_void, paspects: *mut u32, padvf: *mut u32, ppadvsink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs index 49204273ff..82a14e5cfe 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs @@ -2488,7 +2488,7 @@ pub struct IDataCollector_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDataCollector_Impl: super::Com::IDispatch_Impl { fn DataCollectorSet(&self) -> windows_core::Result; - fn SetDataCollectorSet(&self, group: Option<&IDataCollectorSet>) -> windows_core::Result<()>; + fn SetDataCollectorSet(&self, group: windows_core::Ref<'_, IDataCollectorSet>) -> windows_core::Result<()>; fn DataCollectorType(&self) -> windows_core::Result; fn FileName(&self) -> windows_core::Result; fn SetFileName(&self, name: &windows_core::BSTR) -> windows_core::Result<()>; @@ -2528,7 +2528,7 @@ impl IDataCollector_Vtbl { } unsafe extern "system" fn SetDataCollectorSet(this: *mut core::ffi::c_void, group: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataCollector_Impl::SetDataCollectorSet(this, windows_core::from_raw_borrowed(&group)).into() + IDataCollector_Impl::SetDataCollectorSet(this, core::mem::transmute_copy(&group)).into() } unsafe extern "system" fn DataCollectorType(this: *mut core::ffi::c_void, r#type: *mut DataCollectorType) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2819,11 +2819,11 @@ pub trait IDataCollectorCollection_Impl: super::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; fn get_Item(&self, index: &super::Variant::VARIANT) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, collector: Option<&IDataCollector>) -> windows_core::Result<()>; + fn Add(&self, collector: windows_core::Ref<'_, IDataCollector>) -> windows_core::Result<()>; fn Remove(&self, collector: &super::Variant::VARIANT) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn AddRange(&self, collectors: Option<&IDataCollectorCollection>) -> windows_core::Result<()>; - fn CreateDataCollectorFromXml(&self, bstrxml: &windows_core::BSTR, pvalidation: *mut Option, pcollector: *mut Option) -> windows_core::Result<()>; + fn AddRange(&self, collectors: windows_core::Ref<'_, IDataCollectorCollection>) -> windows_core::Result<()>; + fn CreateDataCollectorFromXml(&self, bstrxml: &windows_core::BSTR, pvalidation: windows_core::OutRef<'_, IValueMap>, pcollector: windows_core::OutRef<'_, IDataCollector>) -> windows_core::Result<()>; fn CreateDataCollector(&self, r#type: DataCollectorType) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -2861,7 +2861,7 @@ impl IDataCollectorCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, collector: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataCollectorCollection_Impl::Add(this, windows_core::from_raw_borrowed(&collector)).into() + IDataCollectorCollection_Impl::Add(this, core::mem::transmute_copy(&collector)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, collector: super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2873,7 +2873,7 @@ impl IDataCollectorCollection_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, collectors: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataCollectorCollection_Impl::AddRange(this, windows_core::from_raw_borrowed(&collectors)).into() + IDataCollectorCollection_Impl::AddRange(this, core::mem::transmute_copy(&collectors)).into() } unsafe extern "system" fn CreateDataCollectorFromXml(this: *mut core::ffi::c_void, bstrxml: *mut core::ffi::c_void, pvalidation: *mut *mut core::ffi::c_void, pcollector: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3862,10 +3862,10 @@ pub trait IDataCollectorSetCollection_Impl: super::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; fn get_Item(&self, index: &super::Variant::VARIANT) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, set: Option<&IDataCollectorSet>) -> windows_core::Result<()>; + fn Add(&self, set: windows_core::Ref<'_, IDataCollectorSet>) -> windows_core::Result<()>; fn Remove(&self, set: &super::Variant::VARIANT) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn AddRange(&self, sets: Option<&IDataCollectorSetCollection>) -> windows_core::Result<()>; + fn AddRange(&self, sets: windows_core::Ref<'_, IDataCollectorSetCollection>) -> windows_core::Result<()>; fn GetDataCollectorSets(&self, server: &windows_core::BSTR, filter: &windows_core::BSTR) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -3903,7 +3903,7 @@ impl IDataCollectorSetCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, set: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataCollectorSetCollection_Impl::Add(this, windows_core::from_raw_borrowed(&set)).into() + IDataCollectorSetCollection_Impl::Add(this, core::mem::transmute_copy(&set)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, set: super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3915,7 +3915,7 @@ impl IDataCollectorSetCollection_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, sets: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataCollectorSetCollection_Impl::AddRange(this, windows_core::from_raw_borrowed(&sets)).into() + IDataCollectorSetCollection_Impl::AddRange(this, core::mem::transmute_copy(&sets)).into() } unsafe extern "system" fn GetDataCollectorSets(this: *mut core::ffi::c_void, server: *mut core::ffi::c_void, filter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4532,10 +4532,10 @@ pub trait IFolderActionCollection_Impl: super::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; fn get_Item(&self, index: &super::Variant::VARIANT) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, action: Option<&IFolderAction>) -> windows_core::Result<()>; + fn Add(&self, action: windows_core::Ref<'_, IFolderAction>) -> windows_core::Result<()>; fn Remove(&self, index: &super::Variant::VARIANT) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn AddRange(&self, actions: Option<&IFolderActionCollection>) -> windows_core::Result<()>; + fn AddRange(&self, actions: windows_core::Ref<'_, IFolderActionCollection>) -> windows_core::Result<()>; fn CreateFolderAction(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -4573,7 +4573,7 @@ impl IFolderActionCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, action: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFolderActionCollection_Impl::Add(this, windows_core::from_raw_borrowed(&action)).into() + IFolderActionCollection_Impl::Add(this, core::mem::transmute_copy(&action)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, index: super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4585,7 +4585,7 @@ impl IFolderActionCollection_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, actions: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFolderActionCollection_Impl::AddRange(this, windows_core::from_raw_borrowed(&actions)).into() + IFolderActionCollection_Impl::AddRange(this, core::mem::transmute_copy(&actions)).into() } unsafe extern "system" fn CreateFolderAction(this: *mut core::ffi::c_void, folderaction: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5190,10 +5190,10 @@ pub trait IScheduleCollection_Impl: super::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; fn get_Item(&self, index: &super::Variant::VARIANT) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pschedule: Option<&ISchedule>) -> windows_core::Result<()>; + fn Add(&self, pschedule: windows_core::Ref<'_, ISchedule>) -> windows_core::Result<()>; fn Remove(&self, vschedule: &super::Variant::VARIANT) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn AddRange(&self, pschedules: Option<&IScheduleCollection>) -> windows_core::Result<()>; + fn AddRange(&self, pschedules: windows_core::Ref<'_, IScheduleCollection>) -> windows_core::Result<()>; fn CreateSchedule(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -5231,7 +5231,7 @@ impl IScheduleCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pschedule: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IScheduleCollection_Impl::Add(this, windows_core::from_raw_borrowed(&pschedule)).into() + IScheduleCollection_Impl::Add(this, core::mem::transmute_copy(&pschedule)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, vschedule: super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5243,7 +5243,7 @@ impl IScheduleCollection_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, pschedules: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IScheduleCollection_Impl::AddRange(this, windows_core::from_raw_borrowed(&pschedules)).into() + IScheduleCollection_Impl::AddRange(this, core::mem::transmute_copy(&pschedules)).into() } unsafe extern "system" fn CreateSchedule(this: *mut core::ffi::c_void, schedule: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5654,7 +5654,7 @@ pub trait ISystemMonitor_Impl: windows_core::IUnknownImpl { fn ForeColor(&self) -> windows_core::Result; fn SetForeColor(&self, color: u32) -> windows_core::Result<()>; fn Font(&self) -> windows_core::Result; - fn putref_Font(&self, pfont: Option<&super::Ole::IFontDisp>) -> windows_core::Result<()>; + fn putref_Font(&self, pfont: windows_core::Ref<'_, super::Ole::IFontDisp>) -> windows_core::Result<()>; fn Counters(&self) -> windows_core::Result; fn SetShowVerticalGrid(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn ShowVerticalGrid(&self) -> windows_core::Result; @@ -5686,7 +5686,7 @@ pub trait ISystemMonitor_Impl: windows_core::IUnknownImpl { fn DisplayProperties(&self) -> windows_core::Result<()>; fn Counter(&self, iindex: i32) -> windows_core::Result; fn AddCounter(&self, bspath: &windows_core::BSTR) -> windows_core::Result; - fn DeleteCounter(&self, pctr: Option<&ICounterItem>) -> windows_core::Result<()>; + fn DeleteCounter(&self, pctr: windows_core::Ref<'_, ICounterItem>) -> windows_core::Result<()>; fn BackColorCtl(&self) -> windows_core::Result; fn SetBackColorCtl(&self, color: u32) -> windows_core::Result<()>; fn SetLogFileName(&self, bsfilename: &windows_core::BSTR) -> windows_core::Result<()>; @@ -5793,7 +5793,7 @@ impl ISystemMonitor_Vtbl { } unsafe extern "system" fn putref_Font(this: *mut core::ffi::c_void, pfont: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISystemMonitor_Impl::putref_Font(this, windows_core::from_raw_borrowed(&pfont)).into() + ISystemMonitor_Impl::putref_Font(this, core::mem::transmute_copy(&pfont)).into() } unsafe extern "system" fn Counters(this: *mut core::ffi::c_void, ppicounters: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6011,7 +6011,7 @@ impl ISystemMonitor_Vtbl { } unsafe extern "system" fn DeleteCounter(this: *mut core::ffi::c_void, pctr: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISystemMonitor_Impl::DeleteCounter(this, windows_core::from_raw_borrowed(&pctr)).into() + ISystemMonitor_Impl::DeleteCounter(this, core::mem::transmute_copy(&pctr)).into() } unsafe extern "system" fn BackColorCtl(this: *mut core::ffi::c_void, pcolor: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7397,7 +7397,7 @@ pub trait ITraceDataProvider_Impl: super::Com::IDispatch_Impl { fn FilterData(&self) -> windows_core::Result<*mut super::Com::SAFEARRAY>; fn SetFilterData(&self, pdata: *const super::Com::SAFEARRAY) -> windows_core::Result<()>; fn Query(&self, bstrname: &windows_core::BSTR, bstrserver: &windows_core::BSTR) -> windows_core::Result<()>; - fn Resolve(&self, pfrom: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn Resolve(&self, pfrom: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; fn SetSecurity(&self, sddl: &windows_core::BSTR) -> windows_core::Result<()>; fn GetSecurity(&self, securityinfo: u32) -> windows_core::Result; fn GetRegisteredProcesses(&self) -> windows_core::Result; @@ -7521,7 +7521,7 @@ impl ITraceDataProvider_Vtbl { } unsafe extern "system" fn Resolve(this: *mut core::ffi::c_void, pfrom: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITraceDataProvider_Impl::Resolve(this, windows_core::from_raw_borrowed(&pfrom)).into() + ITraceDataProvider_Impl::Resolve(this, core::mem::transmute_copy(&pfrom)).into() } unsafe extern "system" fn SetSecurity(this: *mut core::ffi::c_void, sddl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7658,10 +7658,10 @@ pub trait ITraceDataProviderCollection_Impl: super::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; fn get_Item(&self, index: &super::Variant::VARIANT) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Add(&self, pprovider: Option<&ITraceDataProvider>) -> windows_core::Result<()>; + fn Add(&self, pprovider: windows_core::Ref<'_, ITraceDataProvider>) -> windows_core::Result<()>; fn Remove(&self, vprovider: &super::Variant::VARIANT) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn AddRange(&self, providers: Option<&ITraceDataProviderCollection>) -> windows_core::Result<()>; + fn AddRange(&self, providers: windows_core::Ref<'_, ITraceDataProviderCollection>) -> windows_core::Result<()>; fn CreateTraceDataProvider(&self) -> windows_core::Result; fn GetTraceDataProviders(&self, server: &windows_core::BSTR) -> windows_core::Result<()>; fn GetTraceDataProvidersByProcess(&self, server: &windows_core::BSTR, pid: u32) -> windows_core::Result<()>; @@ -7701,7 +7701,7 @@ impl ITraceDataProviderCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, pprovider: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITraceDataProviderCollection_Impl::Add(this, windows_core::from_raw_borrowed(&pprovider)).into() + ITraceDataProviderCollection_Impl::Add(this, core::mem::transmute_copy(&pprovider)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, vprovider: super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7713,7 +7713,7 @@ impl ITraceDataProviderCollection_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, providers: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITraceDataProviderCollection_Impl::AddRange(this, windows_core::from_raw_borrowed(&providers)).into() + ITraceDataProviderCollection_Impl::AddRange(this, core::mem::transmute_copy(&providers)).into() } unsafe extern "system" fn CreateTraceDataProvider(this: *mut core::ffi::c_void, provider: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7872,7 +7872,7 @@ pub trait IValueMap_Impl: super::Com::IDispatch_Impl { fn Add(&self, value: &super::Variant::VARIANT) -> windows_core::Result<()>; fn Remove(&self, value: &super::Variant::VARIANT) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; - fn AddRange(&self, map: Option<&IValueMap>) -> windows_core::Result<()>; + fn AddRange(&self, map: windows_core::Ref<'_, IValueMap>) -> windows_core::Result<()>; fn CreateValueMapItem(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -7964,7 +7964,7 @@ impl IValueMap_Vtbl { } unsafe extern "system" fn AddRange(this: *mut core::ffi::c_void, map: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IValueMap_Impl::AddRange(this, windows_core::from_raw_borrowed(&map)).into() + IValueMap_Impl::AddRange(this, core::mem::transmute_copy(&map)).into() } unsafe extern "system" fn CreateValueMapItem(this: *mut core::ffi::c_void, item: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10112,7 +10112,7 @@ pub trait _ISystemMonitorUnion_Impl: windows_core::IUnknownImpl { fn ForeColor(&self) -> windows_core::Result; fn SetForeColor(&self, color: u32) -> windows_core::Result<()>; fn Font(&self) -> windows_core::Result; - fn putref_Font(&self, pfont: Option<&super::Ole::IFontDisp>) -> windows_core::Result<()>; + fn putref_Font(&self, pfont: windows_core::Ref<'_, super::Ole::IFontDisp>) -> windows_core::Result<()>; fn Counters(&self) -> windows_core::Result; fn SetShowVerticalGrid(&self, bstate: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn ShowVerticalGrid(&self) -> windows_core::Result; @@ -10144,7 +10144,7 @@ pub trait _ISystemMonitorUnion_Impl: windows_core::IUnknownImpl { fn DisplayProperties(&self) -> windows_core::Result<()>; fn Counter(&self, iindex: i32) -> windows_core::Result; fn AddCounter(&self, bspath: &windows_core::BSTR) -> windows_core::Result; - fn DeleteCounter(&self, pctr: Option<&ICounterItem>) -> windows_core::Result<()>; + fn DeleteCounter(&self, pctr: windows_core::Ref<'_, ICounterItem>) -> windows_core::Result<()>; fn BackColorCtl(&self) -> windows_core::Result; fn SetBackColorCtl(&self, color: u32) -> windows_core::Result<()>; fn SetLogFileName(&self, bsfilename: &windows_core::BSTR) -> windows_core::Result<()>; @@ -10271,7 +10271,7 @@ impl _ISystemMonitorUnion_Vtbl { } unsafe extern "system" fn putref_Font(this: *mut core::ffi::c_void, pfont: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _ISystemMonitorUnion_Impl::putref_Font(this, windows_core::from_raw_borrowed(&pfont)).into() + _ISystemMonitorUnion_Impl::putref_Font(this, core::mem::transmute_copy(&pfont)).into() } unsafe extern "system" fn Counters(this: *mut core::ffi::c_void, ppicounters: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10489,7 +10489,7 @@ impl _ISystemMonitorUnion_Vtbl { } unsafe extern "system" fn DeleteCounter(this: *mut core::ffi::c_void, pctr: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - _ISystemMonitorUnion_Impl::DeleteCounter(this, windows_core::from_raw_borrowed(&pctr)).into() + _ISystemMonitorUnion_Impl::DeleteCounter(this, core::mem::transmute_copy(&pctr)).into() } unsafe extern "system" fn BackColorCtl(this: *mut core::ffi::c_void, pcolor: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs index 6646ab936d..d32b398941 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs @@ -516,8 +516,8 @@ pub struct IRTCBuddyGroup_Vtbl { pub trait IRTCBuddyGroup_Impl: windows_core::IUnknownImpl { fn Name(&self) -> windows_core::Result; fn SetName(&self, bstrgroupname: &windows_core::BSTR) -> windows_core::Result<()>; - fn AddBuddy(&self, pbuddy: Option<&IRTCBuddy>) -> windows_core::Result<()>; - fn RemoveBuddy(&self, pbuddy: Option<&IRTCBuddy>) -> windows_core::Result<()>; + fn AddBuddy(&self, pbuddy: windows_core::Ref<'_, IRTCBuddy>) -> windows_core::Result<()>; + fn RemoveBuddy(&self, pbuddy: windows_core::Ref<'_, IRTCBuddy>) -> windows_core::Result<()>; fn EnumerateBuddies(&self) -> windows_core::Result; fn Buddies(&self) -> windows_core::Result; fn Data(&self) -> windows_core::Result; @@ -543,11 +543,11 @@ impl IRTCBuddyGroup_Vtbl { } unsafe extern "system" fn AddBuddy(this: *mut core::ffi::c_void, pbuddy: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCBuddyGroup_Impl::AddBuddy(this, windows_core::from_raw_borrowed(&pbuddy)).into() + IRTCBuddyGroup_Impl::AddBuddy(this, core::mem::transmute_copy(&pbuddy)).into() } unsafe extern "system" fn RemoveBuddy(this: *mut core::ffi::c_void, pbuddy: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCBuddyGroup_Impl::RemoveBuddy(this, windows_core::from_raw_borrowed(&pbuddy)).into() + IRTCBuddyGroup_Impl::RemoveBuddy(this, core::mem::transmute_copy(&pbuddy)).into() } unsafe extern "system" fn EnumerateBuddies(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -933,7 +933,7 @@ pub trait IRTCClient_Impl: windows_core::IUnknownImpl { fn SetPreferredMediaTypes(&self, lmediatypes: i32, fpersistent: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn PreferredMediaTypes(&self) -> windows_core::Result; fn MediaCapabilities(&self) -> windows_core::Result; - fn CreateSession(&self, entype: RTC_SESSION_TYPE, bstrlocalphoneuri: &windows_core::BSTR, pprofile: Option<&IRTCProfile>, lflags: i32) -> windows_core::Result; + fn CreateSession(&self, entype: RTC_SESSION_TYPE, bstrlocalphoneuri: &windows_core::BSTR, pprofile: windows_core::Ref<'_, IRTCProfile>, lflags: i32) -> windows_core::Result; fn SetListenForIncomingSessions(&self, enlisten: RTC_LISTEN_MODE) -> windows_core::Result<()>; fn ListenForIncomingSessions(&self) -> windows_core::Result; fn get_NetworkAddresses(&self, ftcp: super::super::Foundation::VARIANT_BOOL, fexternal: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; @@ -1023,7 +1023,7 @@ impl IRTCClient_Vtbl { } unsafe extern "system" fn CreateSession(this: *mut core::ffi::c_void, entype: RTC_SESSION_TYPE, bstrlocalphoneuri: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void, lflags: i32, ppsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRTCClient_Impl::CreateSession(this, core::mem::transmute_copy(&entype), core::mem::transmute(&bstrlocalphoneuri), windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lflags)) { + match IRTCClient_Impl::CreateSession(this, core::mem::transmute_copy(&entype), core::mem::transmute(&bstrlocalphoneuri), core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lflags)) { Ok(ok__) => { ppsession.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1403,8 +1403,8 @@ pub trait IRTCClient2_Impl: IRTCClient_Impl { fn SetClientName(&self, bstrclientname: &windows_core::BSTR) -> windows_core::Result<()>; fn SetClientCurVer(&self, bstrclientcurver: &windows_core::BSTR) -> windows_core::Result<()>; fn InitializeEx(&self, lflags: i32) -> windows_core::Result<()>; - fn CreateSessionWithDescription(&self, bstrcontenttype: &windows_core::BSTR, bstrsessiondescription: &windows_core::BSTR, pprofile: Option<&IRTCProfile>, lflags: i32) -> windows_core::Result; - fn SetSessionDescriptionManager(&self, psessiondescriptionmanager: Option<&IRTCSessionDescriptionManager>) -> windows_core::Result<()>; + fn CreateSessionWithDescription(&self, bstrcontenttype: &windows_core::BSTR, bstrsessiondescription: &windows_core::BSTR, pprofile: windows_core::Ref<'_, IRTCProfile>, lflags: i32) -> windows_core::Result; + fn SetSessionDescriptionManager(&self, psessiondescriptionmanager: windows_core::Ref<'_, IRTCSessionDescriptionManager>) -> windows_core::Result<()>; fn put_PreferredSecurityLevel(&self, ensecuritytype: RTC_SECURITY_TYPE, ensecuritylevel: RTC_SECURITY_LEVEL) -> windows_core::Result<()>; fn get_PreferredSecurityLevel(&self, ensecuritytype: RTC_SECURITY_TYPE) -> windows_core::Result; fn put_AllowedPorts(&self, ltransport: i32, enlistenmode: RTC_LISTEN_MODE) -> windows_core::Result<()>; @@ -1455,7 +1455,7 @@ impl IRTCClient2_Vtbl { } unsafe extern "system" fn CreateSessionWithDescription(this: *mut core::ffi::c_void, bstrcontenttype: *mut core::ffi::c_void, bstrsessiondescription: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void, lflags: i32, ppsession2: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRTCClient2_Impl::CreateSessionWithDescription(this, core::mem::transmute(&bstrcontenttype), core::mem::transmute(&bstrsessiondescription), windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lflags)) { + match IRTCClient2_Impl::CreateSessionWithDescription(this, core::mem::transmute(&bstrcontenttype), core::mem::transmute(&bstrsessiondescription), core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lflags)) { Ok(ok__) => { ppsession2.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1465,7 +1465,7 @@ impl IRTCClient2_Vtbl { } unsafe extern "system" fn SetSessionDescriptionManager(this: *mut core::ffi::c_void, psessiondescriptionmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCClient2_Impl::SetSessionDescriptionManager(this, windows_core::from_raw_borrowed(&psessiondescriptionmanager)).into() + IRTCClient2_Impl::SetSessionDescriptionManager(this, core::mem::transmute_copy(&psessiondescriptionmanager)).into() } unsafe extern "system" fn put_PreferredSecurityLevel(this: *mut core::ffi::c_void, ensecuritytype: RTC_SECURITY_TYPE, ensecuritylevel: RTC_SECURITY_LEVEL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1761,13 +1761,13 @@ pub trait IRTCClientPresence_Impl: windows_core::IUnknownImpl { fn EnumerateBuddies(&self) -> windows_core::Result; fn Buddies(&self) -> windows_core::Result; fn get_Buddy(&self, bstrpresentityuri: &windows_core::BSTR) -> windows_core::Result; - fn AddBuddy(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fpersistent: super::super::Foundation::VARIANT_BOOL, pprofile: Option<&IRTCProfile>, lflags: i32) -> windows_core::Result; - fn RemoveBuddy(&self, pbuddy: Option<&IRTCBuddy>) -> windows_core::Result<()>; + fn AddBuddy(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fpersistent: super::super::Foundation::VARIANT_BOOL, pprofile: windows_core::Ref<'_, IRTCProfile>, lflags: i32) -> windows_core::Result; + fn RemoveBuddy(&self, pbuddy: windows_core::Ref<'_, IRTCBuddy>) -> windows_core::Result<()>; fn EnumerateWatchers(&self) -> windows_core::Result; fn Watchers(&self) -> windows_core::Result; fn get_Watcher(&self, bstrpresentityuri: &windows_core::BSTR) -> windows_core::Result; fn AddWatcher(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fblocked: super::super::Foundation::VARIANT_BOOL, fpersistent: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; - fn RemoveWatcher(&self, pwatcher: Option<&IRTCWatcher>) -> windows_core::Result<()>; + fn RemoveWatcher(&self, pwatcher: windows_core::Ref<'_, IRTCWatcher>) -> windows_core::Result<()>; fn SetLocalPresenceInfo(&self, enstatus: RTC_PRESENCE_STATUS, bstrnotes: &windows_core::BSTR) -> windows_core::Result<()>; fn OfferWatcherMode(&self) -> windows_core::Result; fn SetOfferWatcherMode(&self, enmode: RTC_OFFER_WATCHER_MODE) -> windows_core::Result<()>; @@ -1821,7 +1821,7 @@ impl IRTCClientPresence_Vtbl { } unsafe extern "system" fn AddBuddy(this: *mut core::ffi::c_void, bstrpresentityuri: *mut core::ffi::c_void, bstrusername: *mut core::ffi::c_void, bstrdata: *mut core::ffi::c_void, fpersistent: super::super::Foundation::VARIANT_BOOL, pprofile: *mut core::ffi::c_void, lflags: i32, ppbuddy: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRTCClientPresence_Impl::AddBuddy(this, core::mem::transmute(&bstrpresentityuri), core::mem::transmute(&bstrusername), core::mem::transmute(&bstrdata), core::mem::transmute_copy(&fpersistent), windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lflags)) { + match IRTCClientPresence_Impl::AddBuddy(this, core::mem::transmute(&bstrpresentityuri), core::mem::transmute(&bstrusername), core::mem::transmute(&bstrdata), core::mem::transmute_copy(&fpersistent), core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lflags)) { Ok(ok__) => { ppbuddy.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1831,7 +1831,7 @@ impl IRTCClientPresence_Vtbl { } unsafe extern "system" fn RemoveBuddy(this: *mut core::ffi::c_void, pbuddy: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCClientPresence_Impl::RemoveBuddy(this, windows_core::from_raw_borrowed(&pbuddy)).into() + IRTCClientPresence_Impl::RemoveBuddy(this, core::mem::transmute_copy(&pbuddy)).into() } unsafe extern "system" fn EnumerateWatchers(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1875,7 +1875,7 @@ impl IRTCClientPresence_Vtbl { } unsafe extern "system" fn RemoveWatcher(this: *mut core::ffi::c_void, pwatcher: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCClientPresence_Impl::RemoveWatcher(this, windows_core::from_raw_borrowed(&pwatcher)).into() + IRTCClientPresence_Impl::RemoveWatcher(this, core::mem::transmute_copy(&pwatcher)).into() } unsafe extern "system" fn SetLocalPresenceInfo(this: *mut core::ffi::c_void, enstatus: RTC_PRESENCE_STATUS, bstrnotes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2044,28 +2044,28 @@ pub struct IRTCClientPresence2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IRTCClientPresence2_Impl: IRTCClientPresence_Impl { - fn EnablePresenceEx(&self, pprofile: Option<&IRTCProfile>, varstorage: &super::Variant::VARIANT, lflags: i32) -> windows_core::Result<()>; + fn EnablePresenceEx(&self, pprofile: windows_core::Ref<'_, IRTCProfile>, varstorage: &super::Variant::VARIANT, lflags: i32) -> windows_core::Result<()>; fn DisablePresence(&self) -> windows_core::Result<()>; - fn AddGroup(&self, bstrgroupname: &windows_core::BSTR, bstrdata: &windows_core::BSTR, pprofile: Option<&IRTCProfile>, lflags: i32) -> windows_core::Result; - fn RemoveGroup(&self, pgroup: Option<&IRTCBuddyGroup>) -> windows_core::Result<()>; + fn AddGroup(&self, bstrgroupname: &windows_core::BSTR, bstrdata: &windows_core::BSTR, pprofile: windows_core::Ref<'_, IRTCProfile>, lflags: i32) -> windows_core::Result; + fn RemoveGroup(&self, pgroup: windows_core::Ref<'_, IRTCBuddyGroup>) -> windows_core::Result<()>; fn EnumerateGroups(&self) -> windows_core::Result; fn Groups(&self) -> windows_core::Result; fn get_Group(&self, bstrgroupname: &windows_core::BSTR) -> windows_core::Result; - fn AddWatcherEx(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, enstate: RTC_WATCHER_STATE, fpersistent: super::super::Foundation::VARIANT_BOOL, enscope: RTC_ACE_SCOPE, pprofile: Option<&IRTCProfile>, lflags: i32) -> windows_core::Result; + fn AddWatcherEx(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, enstate: RTC_WATCHER_STATE, fpersistent: super::super::Foundation::VARIANT_BOOL, enscope: RTC_ACE_SCOPE, pprofile: windows_core::Ref<'_, IRTCProfile>, lflags: i32) -> windows_core::Result; fn get_WatcherEx(&self, enmode: RTC_WATCHER_MATCH_MODE, bstrpresentityuri: &windows_core::BSTR) -> windows_core::Result; fn put_PresenceProperty(&self, enproperty: RTC_PRESENCE_PROPERTY, bstrproperty: &windows_core::BSTR) -> windows_core::Result<()>; fn get_PresenceProperty(&self, enproperty: RTC_PRESENCE_PROPERTY) -> windows_core::Result; fn SetPresenceData(&self, bstrnamespace: &windows_core::BSTR, bstrdata: &windows_core::BSTR) -> windows_core::Result<()>; fn GetPresenceData(&self, pbstrnamespace: *mut windows_core::BSTR, pbstrdata: *mut windows_core::BSTR) -> windows_core::Result<()>; fn GetLocalPresenceInfo(&self, penstatus: *mut RTC_PRESENCE_STATUS, pbstrnotes: *mut windows_core::BSTR) -> windows_core::Result<()>; - fn AddBuddyEx(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fpersistent: super::super::Foundation::VARIANT_BOOL, ensubscriptiontype: RTC_BUDDY_SUBSCRIPTION_TYPE, pprofile: Option<&IRTCProfile>, lflags: i32) -> windows_core::Result; + fn AddBuddyEx(&self, bstrpresentityuri: &windows_core::BSTR, bstrusername: &windows_core::BSTR, bstrdata: &windows_core::BSTR, fpersistent: super::super::Foundation::VARIANT_BOOL, ensubscriptiontype: RTC_BUDDY_SUBSCRIPTION_TYPE, pprofile: windows_core::Ref<'_, IRTCProfile>, lflags: i32) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IRTCClientPresence2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EnablePresenceEx(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void, varstorage: super::Variant::VARIANT, lflags: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCClientPresence2_Impl::EnablePresenceEx(this, windows_core::from_raw_borrowed(&pprofile), core::mem::transmute(&varstorage), core::mem::transmute_copy(&lflags)).into() + IRTCClientPresence2_Impl::EnablePresenceEx(this, core::mem::transmute_copy(&pprofile), core::mem::transmute(&varstorage), core::mem::transmute_copy(&lflags)).into() } unsafe extern "system" fn DisablePresence(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2073,7 +2073,7 @@ impl IRTCClientPresence2_Vtbl { } unsafe extern "system" fn AddGroup(this: *mut core::ffi::c_void, bstrgroupname: *mut core::ffi::c_void, bstrdata: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void, lflags: i32, ppgroup: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRTCClientPresence2_Impl::AddGroup(this, core::mem::transmute(&bstrgroupname), core::mem::transmute(&bstrdata), windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lflags)) { + match IRTCClientPresence2_Impl::AddGroup(this, core::mem::transmute(&bstrgroupname), core::mem::transmute(&bstrdata), core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lflags)) { Ok(ok__) => { ppgroup.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2083,7 +2083,7 @@ impl IRTCClientPresence2_Vtbl { } unsafe extern "system" fn RemoveGroup(this: *mut core::ffi::c_void, pgroup: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCClientPresence2_Impl::RemoveGroup(this, windows_core::from_raw_borrowed(&pgroup)).into() + IRTCClientPresence2_Impl::RemoveGroup(this, core::mem::transmute_copy(&pgroup)).into() } unsafe extern "system" fn EnumerateGroups(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2117,7 +2117,7 @@ impl IRTCClientPresence2_Vtbl { } unsafe extern "system" fn AddWatcherEx(this: *mut core::ffi::c_void, bstrpresentityuri: *mut core::ffi::c_void, bstrusername: *mut core::ffi::c_void, bstrdata: *mut core::ffi::c_void, enstate: RTC_WATCHER_STATE, fpersistent: super::super::Foundation::VARIANT_BOOL, enscope: RTC_ACE_SCOPE, pprofile: *mut core::ffi::c_void, lflags: i32, ppwatcher: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRTCClientPresence2_Impl::AddWatcherEx(this, core::mem::transmute(&bstrpresentityuri), core::mem::transmute(&bstrusername), core::mem::transmute(&bstrdata), core::mem::transmute_copy(&enstate), core::mem::transmute_copy(&fpersistent), core::mem::transmute_copy(&enscope), windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lflags)) { + match IRTCClientPresence2_Impl::AddWatcherEx(this, core::mem::transmute(&bstrpresentityuri), core::mem::transmute(&bstrusername), core::mem::transmute(&bstrdata), core::mem::transmute_copy(&enstate), core::mem::transmute_copy(&fpersistent), core::mem::transmute_copy(&enscope), core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lflags)) { Ok(ok__) => { ppwatcher.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2163,7 +2163,7 @@ impl IRTCClientPresence2_Vtbl { } unsafe extern "system" fn AddBuddyEx(this: *mut core::ffi::c_void, bstrpresentityuri: *mut core::ffi::c_void, bstrusername: *mut core::ffi::c_void, bstrdata: *mut core::ffi::c_void, fpersistent: super::super::Foundation::VARIANT_BOOL, ensubscriptiontype: RTC_BUDDY_SUBSCRIPTION_TYPE, pprofile: *mut core::ffi::c_void, lflags: i32, ppbuddy: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRTCClientPresence2_Impl::AddBuddyEx(this, core::mem::transmute(&bstrpresentityuri), core::mem::transmute(&bstrusername), core::mem::transmute(&bstrdata), core::mem::transmute_copy(&fpersistent), core::mem::transmute_copy(&ensubscriptiontype), windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lflags)) { + match IRTCClientPresence2_Impl::AddBuddyEx(this, core::mem::transmute(&bstrpresentityuri), core::mem::transmute(&bstrusername), core::mem::transmute(&bstrdata), core::mem::transmute_copy(&fpersistent), core::mem::transmute_copy(&ensubscriptiontype), core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lflags)) { Ok(ok__) => { ppbuddy.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2249,8 +2249,8 @@ pub struct IRTCClientProvisioning_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IRTCClientProvisioning_Impl: windows_core::IUnknownImpl { fn CreateProfile(&self, bstrprofilexml: &windows_core::BSTR) -> windows_core::Result; - fn EnableProfile(&self, pprofile: Option<&IRTCProfile>, lregisterflags: i32) -> windows_core::Result<()>; - fn DisableProfile(&self, pprofile: Option<&IRTCProfile>) -> windows_core::Result<()>; + fn EnableProfile(&self, pprofile: windows_core::Ref<'_, IRTCProfile>, lregisterflags: i32) -> windows_core::Result<()>; + fn DisableProfile(&self, pprofile: windows_core::Ref<'_, IRTCProfile>) -> windows_core::Result<()>; fn EnumerateProfiles(&self) -> windows_core::Result; fn Profiles(&self) -> windows_core::Result; fn GetProfile(&self, bstruseraccount: &windows_core::BSTR, bstruserpassword: &windows_core::BSTR, bstruseruri: &windows_core::BSTR, bstrserver: &windows_core::BSTR, ltransport: i32, lcookie: isize) -> windows_core::Result<()>; @@ -2271,11 +2271,11 @@ impl IRTCClientProvisioning_Vtbl { } unsafe extern "system" fn EnableProfile(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void, lregisterflags: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCClientProvisioning_Impl::EnableProfile(this, windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lregisterflags)).into() + IRTCClientProvisioning_Impl::EnableProfile(this, core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lregisterflags)).into() } unsafe extern "system" fn DisableProfile(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCClientProvisioning_Impl::DisableProfile(this, windows_core::from_raw_borrowed(&pprofile)).into() + IRTCClientProvisioning_Impl::DisableProfile(this, core::mem::transmute_copy(&pprofile)).into() } unsafe extern "system" fn EnumerateProfiles(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2351,14 +2351,14 @@ pub struct IRTCClientProvisioning2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IRTCClientProvisioning2_Impl: IRTCClientProvisioning_Impl { - fn EnableProfileEx(&self, pprofile: Option<&IRTCProfile>, lregisterflags: i32, lroamingflags: i32) -> windows_core::Result<()>; + fn EnableProfileEx(&self, pprofile: windows_core::Ref<'_, IRTCProfile>, lregisterflags: i32, lroamingflags: i32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IRTCClientProvisioning2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn EnableProfileEx(this: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void, lregisterflags: i32, lroamingflags: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCClientProvisioning2_Impl::EnableProfileEx(this, windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lregisterflags), core::mem::transmute_copy(&lroamingflags)).into() + IRTCClientProvisioning2_Impl::EnableProfileEx(this, core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lregisterflags), core::mem::transmute_copy(&lroamingflags)).into() } Self { base__: IRTCClientProvisioning_Vtbl::new::(), EnableProfileEx: EnableProfileEx:: } } @@ -2513,7 +2513,7 @@ pub struct IRTCEnumBuddies_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRTCEnumBuddies_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, IRTCBuddy>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2581,7 +2581,7 @@ pub struct IRTCEnumGroups_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRTCEnumGroups_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, IRTCBuddyGroup>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2649,7 +2649,7 @@ pub struct IRTCEnumParticipants_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRTCEnumParticipants_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, IRTCParticipant>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2717,7 +2717,7 @@ pub struct IRTCEnumPresenceDevices_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRTCEnumPresenceDevices_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, IRTCPresenceDevice>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2785,7 +2785,7 @@ pub struct IRTCEnumProfiles_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRTCEnumProfiles_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, IRTCProfile>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2853,7 +2853,7 @@ pub struct IRTCEnumUserSearchResults_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRTCEnumUserSearchResults_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, IRTCUserSearchResult>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2921,7 +2921,7 @@ pub struct IRTCEnumWatchers_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRTCEnumWatchers_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, ppelements: windows_core::OutRef<'_, IRTCWatcher>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -2984,14 +2984,14 @@ pub struct IRTCEventNotification_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IRTCEventNotification_Impl: windows_core::IUnknownImpl { - fn Event(&self, rtcevent: RTC_EVENT, pevent: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn Event(&self, rtcevent: RTC_EVENT, pevent: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IRTCEventNotification_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Event(this: *mut core::ffi::c_void, rtcevent: RTC_EVENT, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCEventNotification_Impl::Event(this, core::mem::transmute_copy(&rtcevent), windows_core::from_raw_borrowed(&pevent)).into() + IRTCEventNotification_Impl::Event(this, core::mem::transmute_copy(&rtcevent), core::mem::transmute_copy(&pevent)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Event: Event:: } } @@ -5243,9 +5243,9 @@ pub trait IRTCSession_Impl: windows_core::IUnknownImpl { fn Participants(&self) -> windows_core::Result; fn Answer(&self) -> windows_core::Result<()>; fn Terminate(&self, enreason: RTC_TERMINATE_REASON) -> windows_core::Result<()>; - fn Redirect(&self, entype: RTC_SESSION_TYPE, bstrlocalphoneuri: &windows_core::BSTR, pprofile: Option<&IRTCProfile>, lflags: i32) -> windows_core::Result<()>; + fn Redirect(&self, entype: RTC_SESSION_TYPE, bstrlocalphoneuri: &windows_core::BSTR, pprofile: windows_core::Ref<'_, IRTCProfile>, lflags: i32) -> windows_core::Result<()>; fn AddParticipant(&self, bstraddress: &windows_core::BSTR, bstrname: &windows_core::BSTR) -> windows_core::Result; - fn RemoveParticipant(&self, pparticipant: Option<&IRTCParticipant>) -> windows_core::Result<()>; + fn RemoveParticipant(&self, pparticipant: windows_core::Ref<'_, IRTCParticipant>) -> windows_core::Result<()>; fn EnumerateParticipants(&self) -> windows_core::Result; fn CanAddParticipants(&self) -> windows_core::Result; fn RedirectedUserURI(&self) -> windows_core::Result; @@ -5320,7 +5320,7 @@ impl IRTCSession_Vtbl { } unsafe extern "system" fn Redirect(this: *mut core::ffi::c_void, entype: RTC_SESSION_TYPE, bstrlocalphoneuri: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void, lflags: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCSession_Impl::Redirect(this, core::mem::transmute_copy(&entype), core::mem::transmute(&bstrlocalphoneuri), windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lflags)).into() + IRTCSession_Impl::Redirect(this, core::mem::transmute_copy(&entype), core::mem::transmute(&bstrlocalphoneuri), core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lflags)).into() } unsafe extern "system" fn AddParticipant(this: *mut core::ffi::c_void, bstraddress: *mut core::ffi::c_void, bstrname: *mut core::ffi::c_void, ppparticipant: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5334,7 +5334,7 @@ impl IRTCSession_Vtbl { } unsafe extern "system" fn RemoveParticipant(this: *mut core::ffi::c_void, pparticipant: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCSession_Impl::RemoveParticipant(this, windows_core::from_raw_borrowed(&pparticipant)).into() + IRTCSession_Impl::RemoveParticipant(this, core::mem::transmute_copy(&pparticipant)).into() } unsafe extern "system" fn EnumerateParticipants(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5875,13 +5875,13 @@ pub struct IRTCSessionPortManagement_Vtbl { pub SetPortManager: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRTCSessionPortManagement_Impl: windows_core::IUnknownImpl { - fn SetPortManager(&self, pportmanager: Option<&IRTCPortManager>) -> windows_core::Result<()>; + fn SetPortManager(&self, pportmanager: windows_core::Ref<'_, IRTCPortManager>) -> windows_core::Result<()>; } impl IRTCSessionPortManagement_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPortManager(this: *mut core::ffi::c_void, pportmanager: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCSessionPortManagement_Impl::SetPortManager(this, windows_core::from_raw_borrowed(&pportmanager)).into() + IRTCSessionPortManagement_Impl::SetPortManager(this, core::mem::transmute_copy(&pportmanager)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetPortManager: SetPortManager:: } } @@ -6348,7 +6348,7 @@ pub struct IRTCUserSearch_Vtbl { } pub trait IRTCUserSearch_Impl: windows_core::IUnknownImpl { fn CreateQuery(&self) -> windows_core::Result; - fn ExecuteSearch(&self, pquery: Option<&IRTCUserSearchQuery>, pprofile: Option<&IRTCProfile>, lcookie: isize) -> windows_core::Result<()>; + fn ExecuteSearch(&self, pquery: windows_core::Ref<'_, IRTCUserSearchQuery>, pprofile: windows_core::Ref<'_, IRTCProfile>, lcookie: isize) -> windows_core::Result<()>; } impl IRTCUserSearch_Vtbl { pub const fn new() -> Self { @@ -6364,7 +6364,7 @@ impl IRTCUserSearch_Vtbl { } unsafe extern "system" fn ExecuteSearch(this: *mut core::ffi::c_void, pquery: *mut core::ffi::c_void, pprofile: *mut core::ffi::c_void, lcookie: isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRTCUserSearch_Impl::ExecuteSearch(this, windows_core::from_raw_borrowed(&pquery), windows_core::from_raw_borrowed(&pprofile), core::mem::transmute_copy(&lcookie)).into() + IRTCUserSearch_Impl::ExecuteSearch(this, core::mem::transmute_copy(&pquery), core::mem::transmute_copy(&pprofile), core::mem::transmute_copy(&lcookie)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/RemoteAssistance/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RemoteAssistance/mod.rs index e1f7e4852c..65e50df19f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteAssistance/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteAssistance/mod.rs @@ -47,13 +47,13 @@ pub struct IRendezvousApplication_Vtbl { pub SetRendezvousSession: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRendezvousApplication_Impl: windows_core::IUnknownImpl { - fn SetRendezvousSession(&self, prendezvoussession: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetRendezvousSession(&self, prendezvoussession: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IRendezvousApplication_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRendezvousSession(this: *mut core::ffi::c_void, prendezvoussession: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRendezvousApplication_Impl::SetRendezvousSession(this, windows_core::from_raw_borrowed(&prendezvoussession)).into() + IRendezvousApplication_Impl::SetRendezvousSession(this, core::mem::transmute_copy(&prendezvoussession)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetRendezvousSession: SetRendezvousSession:: } } diff --git a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs index acb56e40d1..bcffac391c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs @@ -1577,8 +1577,8 @@ pub trait IRemoteDesktopClient_Impl: super::Com::IDispatch_Impl { fn TouchPointer(&self) -> windows_core::Result; fn DeleteSavedCredentials(&self, servername: &windows_core::BSTR) -> windows_core::Result<()>; fn UpdateSessionDisplaySettings(&self, width: u32, height: u32) -> windows_core::Result<()>; - fn attachEvent(&self, eventname: &windows_core::BSTR, callback: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn detachEvent(&self, eventname: &windows_core::BSTR, callback: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn attachEvent(&self, eventname: &windows_core::BSTR, callback: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn detachEvent(&self, eventname: &windows_core::BSTR, callback: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IRemoteDesktopClient_Vtbl { @@ -1635,11 +1635,11 @@ impl IRemoteDesktopClient_Vtbl { } unsafe extern "system" fn attachEvent(this: *mut core::ffi::c_void, eventname: *mut core::ffi::c_void, callback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDesktopClient_Impl::attachEvent(this, core::mem::transmute(&eventname), windows_core::from_raw_borrowed(&callback)).into() + IRemoteDesktopClient_Impl::attachEvent(this, core::mem::transmute(&eventname), core::mem::transmute_copy(&callback)).into() } unsafe extern "system" fn detachEvent(this: *mut core::ffi::c_void, eventname: *mut core::ffi::c_void, callback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRemoteDesktopClient_Impl::detachEvent(this, core::mem::transmute(&eventname), windows_core::from_raw_borrowed(&callback)).into() + IRemoteDesktopClient_Impl::detachEvent(this, core::mem::transmute(&eventname), core::mem::transmute_copy(&callback)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), @@ -2097,14 +2097,14 @@ pub struct ITSGAuthenticationEngine_Vtbl { pub CancelAuthentication: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::GUID, usize) -> windows_core::HRESULT, } pub trait ITSGAuthenticationEngine_Impl: windows_core::IUnknownImpl { - fn AuthenticateUser(&self, mainsessionid: &windows_core::GUID, cookiedata: *const u8, numcookiebytes: u32, context: usize, psink: Option<&ITSGAuthenticateUserSink>) -> windows_core::Result<()>; + fn AuthenticateUser(&self, mainsessionid: &windows_core::GUID, cookiedata: *const u8, numcookiebytes: u32, context: usize, psink: windows_core::Ref<'_, ITSGAuthenticateUserSink>) -> windows_core::Result<()>; fn CancelAuthentication(&self, mainsessionid: &windows_core::GUID, context: usize) -> windows_core::Result<()>; } impl ITSGAuthenticationEngine_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AuthenticateUser(this: *mut core::ffi::c_void, mainsessionid: windows_core::GUID, cookiedata: *const u8, numcookiebytes: u32, context: usize, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITSGAuthenticationEngine_Impl::AuthenticateUser(this, core::mem::transmute(&mainsessionid), core::mem::transmute_copy(&cookiedata), core::mem::transmute_copy(&numcookiebytes), core::mem::transmute_copy(&context), windows_core::from_raw_borrowed(&psink)).into() + ITSGAuthenticationEngine_Impl::AuthenticateUser(this, core::mem::transmute(&mainsessionid), core::mem::transmute_copy(&cookiedata), core::mem::transmute_copy(&numcookiebytes), core::mem::transmute_copy(&context), core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn CancelAuthentication(this: *mut core::ffi::c_void, mainsessionid: windows_core::GUID, context: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2209,8 +2209,8 @@ pub struct ITSGPolicyEngine_Vtbl { pub IsQuarantineEnabled: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait ITSGPolicyEngine_Impl: windows_core::IUnknownImpl { - fn AuthorizeConnection(&self, mainsessionid: &windows_core::GUID, username: &windows_core::BSTR, authtype: AAAuthSchemes, clientmachineip: &windows_core::BSTR, clientmachinename: &windows_core::BSTR, sohdata: *const u8, numsohbytes: u32, cookiedata: *const u8, numcookiebytes: u32, usertoken: super::super::Foundation::HANDLE_PTR, psink: Option<&ITSGAuthorizeConnectionSink>) -> windows_core::Result<()>; - fn AuthorizeResource(&self, mainsessionid: &windows_core::GUID, subsessionid: i32, username: &windows_core::BSTR, resourcenames: *const windows_core::BSTR, numresources: u32, alternateresourcenames: *const windows_core::BSTR, numalternateresourcename: u32, portnumber: u32, operation: &windows_core::BSTR, cookie: *const u8, numbytesincookie: u32, psink: Option<&ITSGAuthorizeResourceSink>) -> windows_core::Result<()>; + fn AuthorizeConnection(&self, mainsessionid: &windows_core::GUID, username: &windows_core::BSTR, authtype: AAAuthSchemes, clientmachineip: &windows_core::BSTR, clientmachinename: &windows_core::BSTR, sohdata: *const u8, numsohbytes: u32, cookiedata: *const u8, numcookiebytes: u32, usertoken: super::super::Foundation::HANDLE_PTR, psink: windows_core::Ref<'_, ITSGAuthorizeConnectionSink>) -> windows_core::Result<()>; + fn AuthorizeResource(&self, mainsessionid: &windows_core::GUID, subsessionid: i32, username: &windows_core::BSTR, resourcenames: *const windows_core::BSTR, numresources: u32, alternateresourcenames: *const windows_core::BSTR, numalternateresourcename: u32, portnumber: u32, operation: &windows_core::BSTR, cookie: *const u8, numbytesincookie: u32, psink: windows_core::Ref<'_, ITSGAuthorizeResourceSink>) -> windows_core::Result<()>; fn Refresh(&self) -> windows_core::Result<()>; fn IsQuarantineEnabled(&self) -> windows_core::Result; } @@ -2218,7 +2218,7 @@ impl ITSGPolicyEngine_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AuthorizeConnection(this: *mut core::ffi::c_void, mainsessionid: windows_core::GUID, username: *mut core::ffi::c_void, authtype: AAAuthSchemes, clientmachineip: *mut core::ffi::c_void, clientmachinename: *mut core::ffi::c_void, sohdata: *const u8, numsohbytes: u32, cookiedata: *const u8, numcookiebytes: u32, usertoken: super::super::Foundation::HANDLE_PTR, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITSGPolicyEngine_Impl::AuthorizeConnection(this, core::mem::transmute(&mainsessionid), core::mem::transmute(&username), core::mem::transmute_copy(&authtype), core::mem::transmute(&clientmachineip), core::mem::transmute(&clientmachinename), core::mem::transmute_copy(&sohdata), core::mem::transmute_copy(&numsohbytes), core::mem::transmute_copy(&cookiedata), core::mem::transmute_copy(&numcookiebytes), core::mem::transmute_copy(&usertoken), windows_core::from_raw_borrowed(&psink)).into() + ITSGPolicyEngine_Impl::AuthorizeConnection(this, core::mem::transmute(&mainsessionid), core::mem::transmute(&username), core::mem::transmute_copy(&authtype), core::mem::transmute(&clientmachineip), core::mem::transmute(&clientmachinename), core::mem::transmute_copy(&sohdata), core::mem::transmute_copy(&numsohbytes), core::mem::transmute_copy(&cookiedata), core::mem::transmute_copy(&numcookiebytes), core::mem::transmute_copy(&usertoken), core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn AuthorizeResource(this: *mut core::ffi::c_void, mainsessionid: windows_core::GUID, subsessionid: i32, username: *mut core::ffi::c_void, resourcenames: *const *mut core::ffi::c_void, numresources: u32, alternateresourcenames: *const *mut core::ffi::c_void, numalternateresourcename: u32, portnumber: u32, operation: *mut core::ffi::c_void, cookie: *const u8, numbytesincookie: u32, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2235,7 +2235,7 @@ impl ITSGPolicyEngine_Vtbl { core::mem::transmute(&operation), core::mem::transmute_copy(&cookie), core::mem::transmute_copy(&numbytesincookie), - windows_core::from_raw_borrowed(&psink), + core::mem::transmute_copy(&psink), ) .into() } @@ -2656,7 +2656,7 @@ pub trait ITsSbEnvironment_Impl: windows_core::IUnknownImpl { fn Name(&self) -> windows_core::Result; fn ServerWeight(&self) -> windows_core::Result; fn EnvironmentPropertySet(&self) -> windows_core::Result; - fn SetEnvironmentPropertySet(&self, pval: Option<&ITsSbEnvironmentPropertySet>) -> windows_core::Result<()>; + fn SetEnvironmentPropertySet(&self, pval: windows_core::Ref<'_, ITsSbEnvironmentPropertySet>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ITsSbEnvironment_Vtbl { @@ -2693,7 +2693,7 @@ impl ITsSbEnvironment_Vtbl { } unsafe extern "system" fn SetEnvironmentPropertySet(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbEnvironment_Impl::SetEnvironmentPropertySet(this, windows_core::from_raw_borrowed(&pval)).into() + ITsSbEnvironment_Impl::SetEnvironmentPropertySet(this, core::mem::transmute_copy(&pval)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2772,7 +2772,7 @@ pub struct ITsSbFilterPluginStore_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait ITsSbFilterPluginStore_Impl: windows_core::IUnknownImpl { - fn SaveProperties(&self, ppropertyset: Option<&ITsSbPropertySet>) -> windows_core::Result<()>; + fn SaveProperties(&self, ppropertyset: windows_core::Ref<'_, ITsSbPropertySet>) -> windows_core::Result<()>; fn EnumerateProperties(&self) -> windows_core::Result; fn DeleteProperties(&self, propertyname: &windows_core::BSTR) -> windows_core::Result<()>; } @@ -2781,7 +2781,7 @@ impl ITsSbFilterPluginStore_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SaveProperties(this: *mut core::ffi::c_void, ppropertyset: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbFilterPluginStore_Impl::SaveProperties(this, windows_core::from_raw_borrowed(&ppropertyset)).into() + ITsSbFilterPluginStore_Impl::SaveProperties(this, core::mem::transmute_copy(&ppropertyset)).into() } unsafe extern "system" fn EnumerateProperties(this: *mut core::ffi::c_void, pppropertyset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3033,14 +3033,14 @@ pub struct ITsSbLoadBalancing_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait ITsSbLoadBalancing_Impl: ITsSbPlugin_Impl { - fn GetMostSuitableTarget(&self, pconnection: Option<&ITsSbClientConnection>, plbsink: Option<&ITsSbLoadBalancingNotifySink>) -> windows_core::Result<()>; + fn GetMostSuitableTarget(&self, pconnection: windows_core::Ref<'_, ITsSbClientConnection>, plbsink: windows_core::Ref<'_, ITsSbLoadBalancingNotifySink>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ITsSbLoadBalancing_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetMostSuitableTarget(this: *mut core::ffi::c_void, pconnection: *mut core::ffi::c_void, plbsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbLoadBalancing_Impl::GetMostSuitableTarget(this, windows_core::from_raw_borrowed(&pconnection), windows_core::from_raw_borrowed(&plbsink)).into() + ITsSbLoadBalancing_Impl::GetMostSuitableTarget(this, core::mem::transmute_copy(&pconnection), core::mem::transmute_copy(&plbsink)).into() } Self { base__: ITsSbPlugin_Vtbl::new::(), GetMostSuitableTarget: GetMostSuitableTarget:: } } @@ -3072,13 +3072,13 @@ pub struct ITsSbLoadBalancingNotifySink_Vtbl { pub OnGetMostSuitableTarget: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait ITsSbLoadBalancingNotifySink_Impl: ITsSbBaseNotifySink_Impl { - fn OnGetMostSuitableTarget(&self, plbresult: Option<&ITsSbLoadBalanceResult>, fisnewconnection: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnGetMostSuitableTarget(&self, plbresult: windows_core::Ref<'_, ITsSbLoadBalanceResult>, fisnewconnection: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl ITsSbLoadBalancingNotifySink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnGetMostSuitableTarget(this: *mut core::ffi::c_void, plbresult: *mut core::ffi::c_void, fisnewconnection: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbLoadBalancingNotifySink_Impl::OnGetMostSuitableTarget(this, windows_core::from_raw_borrowed(&plbresult), core::mem::transmute_copy(&fisnewconnection)).into() + ITsSbLoadBalancingNotifySink_Impl::OnGetMostSuitableTarget(this, core::mem::transmute_copy(&plbresult), core::mem::transmute_copy(&fisnewconnection)).into() } Self { base__: ITsSbBaseNotifySink_Vtbl::new::(), OnGetMostSuitableTarget: OnGetMostSuitableTarget:: } } @@ -3111,14 +3111,14 @@ pub struct ITsSbOrchestration_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait ITsSbOrchestration_Impl: ITsSbPlugin_Impl { - fn PrepareTargetForConnect(&self, pconnection: Option<&ITsSbClientConnection>, porchestrationnotifysink: Option<&ITsSbOrchestrationNotifySink>) -> windows_core::Result<()>; + fn PrepareTargetForConnect(&self, pconnection: windows_core::Ref<'_, ITsSbClientConnection>, porchestrationnotifysink: windows_core::Ref<'_, ITsSbOrchestrationNotifySink>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ITsSbOrchestration_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PrepareTargetForConnect(this: *mut core::ffi::c_void, pconnection: *mut core::ffi::c_void, porchestrationnotifysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbOrchestration_Impl::PrepareTargetForConnect(this, windows_core::from_raw_borrowed(&pconnection), windows_core::from_raw_borrowed(&porchestrationnotifysink)).into() + ITsSbOrchestration_Impl::PrepareTargetForConnect(this, core::mem::transmute_copy(&pconnection), core::mem::transmute_copy(&porchestrationnotifysink)).into() } Self { base__: ITsSbPlugin_Vtbl::new::(), PrepareTargetForConnect: PrepareTargetForConnect:: } } @@ -3150,13 +3150,13 @@ pub struct ITsSbOrchestrationNotifySink_Vtbl { pub OnReadyToConnect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITsSbOrchestrationNotifySink_Impl: ITsSbBaseNotifySink_Impl { - fn OnReadyToConnect(&self, ptarget: Option<&ITsSbTarget>) -> windows_core::Result<()>; + fn OnReadyToConnect(&self, ptarget: windows_core::Ref<'_, ITsSbTarget>) -> windows_core::Result<()>; } impl ITsSbOrchestrationNotifySink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnReadyToConnect(this: *mut core::ffi::c_void, ptarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbOrchestrationNotifySink_Impl::OnReadyToConnect(this, windows_core::from_raw_borrowed(&ptarget)).into() + ITsSbOrchestrationNotifySink_Impl::OnReadyToConnect(this, core::mem::transmute_copy(&ptarget)).into() } Self { base__: ITsSbBaseNotifySink_Vtbl::new::(), OnReadyToConnect: OnReadyToConnect:: } } @@ -3189,14 +3189,14 @@ pub struct ITsSbPlacement_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait ITsSbPlacement_Impl: ITsSbPlugin_Impl { - fn QueryEnvironmentForTarget(&self, pconnection: Option<&ITsSbClientConnection>, pplacementsink: Option<&ITsSbPlacementNotifySink>) -> windows_core::Result<()>; + fn QueryEnvironmentForTarget(&self, pconnection: windows_core::Ref<'_, ITsSbClientConnection>, pplacementsink: windows_core::Ref<'_, ITsSbPlacementNotifySink>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl ITsSbPlacement_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryEnvironmentForTarget(this: *mut core::ffi::c_void, pconnection: *mut core::ffi::c_void, pplacementsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbPlacement_Impl::QueryEnvironmentForTarget(this, windows_core::from_raw_borrowed(&pconnection), windows_core::from_raw_borrowed(&pplacementsink)).into() + ITsSbPlacement_Impl::QueryEnvironmentForTarget(this, core::mem::transmute_copy(&pconnection), core::mem::transmute_copy(&pplacementsink)).into() } Self { base__: ITsSbPlugin_Vtbl::new::(), QueryEnvironmentForTarget: QueryEnvironmentForTarget:: } } @@ -3228,13 +3228,13 @@ pub struct ITsSbPlacementNotifySink_Vtbl { pub OnQueryEnvironmentCompleted: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITsSbPlacementNotifySink_Impl: ITsSbBaseNotifySink_Impl { - fn OnQueryEnvironmentCompleted(&self, penvironment: Option<&ITsSbEnvironment>) -> windows_core::Result<()>; + fn OnQueryEnvironmentCompleted(&self, penvironment: windows_core::Ref<'_, ITsSbEnvironment>) -> windows_core::Result<()>; } impl ITsSbPlacementNotifySink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnQueryEnvironmentCompleted(this: *mut core::ffi::c_void, penvironment: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbPlacementNotifySink_Impl::OnQueryEnvironmentCompleted(this, windows_core::from_raw_borrowed(&penvironment)).into() + ITsSbPlacementNotifySink_Impl::OnQueryEnvironmentCompleted(this, core::mem::transmute_copy(&penvironment)).into() } Self { base__: ITsSbBaseNotifySink_Vtbl::new::(), OnQueryEnvironmentCompleted: OnQueryEnvironmentCompleted:: } } @@ -3270,7 +3270,7 @@ pub struct ITsSbPlugin_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait ITsSbPlugin_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pprovider: Option<&ITsSbProvider>, pnotifysink: Option<&ITsSbPluginNotifySink>, ppropertyset: Option<&ITsSbPluginPropertySet>) -> windows_core::Result<()>; + fn Initialize(&self, pprovider: windows_core::Ref<'_, ITsSbProvider>, pnotifysink: windows_core::Ref<'_, ITsSbPluginNotifySink>, ppropertyset: windows_core::Ref<'_, ITsSbPluginPropertySet>) -> windows_core::Result<()>; fn Terminate(&self, hr: windows_core::HRESULT) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] @@ -3278,7 +3278,7 @@ impl ITsSbPlugin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pprovider: *mut core::ffi::c_void, pnotifysink: *mut core::ffi::c_void, ppropertyset: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbPlugin_Impl::Initialize(this, windows_core::from_raw_borrowed(&pprovider), windows_core::from_raw_borrowed(&pnotifysink), windows_core::from_raw_borrowed(&ppropertyset)).into() + ITsSbPlugin_Impl::Initialize(this, core::mem::transmute_copy(&pprovider), core::mem::transmute_copy(&pnotifysink), core::mem::transmute_copy(&ppropertyset)).into() } unsafe extern "system" fn Terminate(this: *mut core::ffi::c_void, hr: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3492,7 +3492,7 @@ pub trait ITsSbProvider_Impl: windows_core::IUnknownImpl { fn CreateEnvironmentObject(&self, name: &windows_core::BSTR, serverweight: u32) -> windows_core::Result; fn GetResourcePluginStore(&self) -> windows_core::Result; fn GetFilterPluginStore(&self) -> windows_core::Result; - fn RegisterForNotification(&self, notificationtype: u32, resourcetomonitor: &windows_core::BSTR, ppluginnotification: Option<&ITsSbResourceNotification>) -> windows_core::Result<()>; + fn RegisterForNotification(&self, notificationtype: u32, resourcetomonitor: &windows_core::BSTR, ppluginnotification: windows_core::Ref<'_, ITsSbResourceNotification>) -> windows_core::Result<()>; fn UnRegisterForNotification(&self, notificationtype: u32, resourcetomonitor: &windows_core::BSTR) -> windows_core::Result<()>; fn GetInstanceOfGlobalStore(&self) -> windows_core::Result; fn CreateEnvironmentPropertySetObject(&self) -> windows_core::Result; @@ -3582,7 +3582,7 @@ impl ITsSbProvider_Vtbl { } unsafe extern "system" fn RegisterForNotification(this: *mut core::ffi::c_void, notificationtype: u32, resourcetomonitor: *mut core::ffi::c_void, ppluginnotification: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbProvider_Impl::RegisterForNotification(this, core::mem::transmute_copy(¬ificationtype), core::mem::transmute(&resourcetomonitor), windows_core::from_raw_borrowed(&ppluginnotification)).into() + ITsSbProvider_Impl::RegisterForNotification(this, core::mem::transmute_copy(¬ificationtype), core::mem::transmute(&resourcetomonitor), core::mem::transmute_copy(&ppluginnotification)).into() } unsafe extern "system" fn UnRegisterForNotification(this: *mut core::ffi::c_void, notificationtype: u32, resourcetomonitor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3671,9 +3671,9 @@ pub struct ITsSbProvisioning_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait ITsSbProvisioning_Impl: ITsSbPlugin_Impl { - fn CreateVirtualMachines(&self, jobxmlstring: &windows_core::BSTR, jobguid: &windows_core::BSTR, psink: Option<&ITsSbProvisioningPluginNotifySink>) -> windows_core::Result<()>; - fn PatchVirtualMachines(&self, jobxmlstring: &windows_core::BSTR, jobguid: &windows_core::BSTR, psink: Option<&ITsSbProvisioningPluginNotifySink>, pvmpatchinfo: *const VM_PATCH_INFO) -> windows_core::Result<()>; - fn DeleteVirtualMachines(&self, jobxmlstring: &windows_core::BSTR, jobguid: &windows_core::BSTR, psink: Option<&ITsSbProvisioningPluginNotifySink>) -> windows_core::Result<()>; + fn CreateVirtualMachines(&self, jobxmlstring: &windows_core::BSTR, jobguid: &windows_core::BSTR, psink: windows_core::Ref<'_, ITsSbProvisioningPluginNotifySink>) -> windows_core::Result<()>; + fn PatchVirtualMachines(&self, jobxmlstring: &windows_core::BSTR, jobguid: &windows_core::BSTR, psink: windows_core::Ref<'_, ITsSbProvisioningPluginNotifySink>, pvmpatchinfo: *const VM_PATCH_INFO) -> windows_core::Result<()>; + fn DeleteVirtualMachines(&self, jobxmlstring: &windows_core::BSTR, jobguid: &windows_core::BSTR, psink: windows_core::Ref<'_, ITsSbProvisioningPluginNotifySink>) -> windows_core::Result<()>; fn CancelJob(&self, jobguid: &windows_core::BSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] @@ -3681,15 +3681,15 @@ impl ITsSbProvisioning_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateVirtualMachines(this: *mut core::ffi::c_void, jobxmlstring: *mut core::ffi::c_void, jobguid: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbProvisioning_Impl::CreateVirtualMachines(this, core::mem::transmute(&jobxmlstring), core::mem::transmute(&jobguid), windows_core::from_raw_borrowed(&psink)).into() + ITsSbProvisioning_Impl::CreateVirtualMachines(this, core::mem::transmute(&jobxmlstring), core::mem::transmute(&jobguid), core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn PatchVirtualMachines(this: *mut core::ffi::c_void, jobxmlstring: *mut core::ffi::c_void, jobguid: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, pvmpatchinfo: *const VM_PATCH_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbProvisioning_Impl::PatchVirtualMachines(this, core::mem::transmute(&jobxmlstring), core::mem::transmute(&jobguid), windows_core::from_raw_borrowed(&psink), core::mem::transmute_copy(&pvmpatchinfo)).into() + ITsSbProvisioning_Impl::PatchVirtualMachines(this, core::mem::transmute(&jobxmlstring), core::mem::transmute(&jobguid), core::mem::transmute_copy(&psink), core::mem::transmute_copy(&pvmpatchinfo)).into() } unsafe extern "system" fn DeleteVirtualMachines(this: *mut core::ffi::c_void, jobxmlstring: *mut core::ffi::c_void, jobguid: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbProvisioning_Impl::DeleteVirtualMachines(this, core::mem::transmute(&jobxmlstring), core::mem::transmute(&jobguid), windows_core::from_raw_borrowed(&psink)).into() + ITsSbProvisioning_Impl::DeleteVirtualMachines(this, core::mem::transmute(&jobxmlstring), core::mem::transmute(&jobguid), core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn CancelJob(this: *mut core::ffi::c_void, jobguid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3820,23 +3820,23 @@ pub struct ITsSbResourceNotification_Vtbl { pub NotifyClientConnectionStateChange: unsafe extern "system" fn(*mut core::ffi::c_void, CONNECTION_CHANGE_NOTIFICATION, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITsSbResourceNotification_Impl: windows_core::IUnknownImpl { - fn NotifySessionChange(&self, changetype: TSSESSION_STATE, psession: Option<&ITsSbSession>) -> windows_core::Result<()>; - fn NotifyTargetChange(&self, targetchangetype: u32, ptarget: Option<&ITsSbTarget>) -> windows_core::Result<()>; - fn NotifyClientConnectionStateChange(&self, changetype: CONNECTION_CHANGE_NOTIFICATION, pconnection: Option<&ITsSbClientConnection>) -> windows_core::Result<()>; + fn NotifySessionChange(&self, changetype: TSSESSION_STATE, psession: windows_core::Ref<'_, ITsSbSession>) -> windows_core::Result<()>; + fn NotifyTargetChange(&self, targetchangetype: u32, ptarget: windows_core::Ref<'_, ITsSbTarget>) -> windows_core::Result<()>; + fn NotifyClientConnectionStateChange(&self, changetype: CONNECTION_CHANGE_NOTIFICATION, pconnection: windows_core::Ref<'_, ITsSbClientConnection>) -> windows_core::Result<()>; } impl ITsSbResourceNotification_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn NotifySessionChange(this: *mut core::ffi::c_void, changetype: TSSESSION_STATE, psession: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourceNotification_Impl::NotifySessionChange(this, core::mem::transmute_copy(&changetype), windows_core::from_raw_borrowed(&psession)).into() + ITsSbResourceNotification_Impl::NotifySessionChange(this, core::mem::transmute_copy(&changetype), core::mem::transmute_copy(&psession)).into() } unsafe extern "system" fn NotifyTargetChange(this: *mut core::ffi::c_void, targetchangetype: u32, ptarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourceNotification_Impl::NotifyTargetChange(this, core::mem::transmute_copy(&targetchangetype), windows_core::from_raw_borrowed(&ptarget)).into() + ITsSbResourceNotification_Impl::NotifyTargetChange(this, core::mem::transmute_copy(&targetchangetype), core::mem::transmute_copy(&ptarget)).into() } unsafe extern "system" fn NotifyClientConnectionStateChange(this: *mut core::ffi::c_void, changetype: CONNECTION_CHANGE_NOTIFICATION, pconnection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourceNotification_Impl::NotifyClientConnectionStateChange(this, core::mem::transmute_copy(&changetype), windows_core::from_raw_borrowed(&pconnection)).into() + ITsSbResourceNotification_Impl::NotifyClientConnectionStateChange(this, core::mem::transmute_copy(&changetype), core::mem::transmute_copy(&pconnection)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4111,28 +4111,28 @@ pub struct ITsSbResourcePluginStore_Vtbl { pub trait ITsSbResourcePluginStore_Impl: windows_core::IUnknownImpl { fn QueryTarget(&self, targetname: &windows_core::BSTR, farmname: &windows_core::BSTR) -> windows_core::Result; fn QuerySessionBySessionId(&self, dwsessionid: u32, targetname: &windows_core::BSTR) -> windows_core::Result; - fn AddTargetToStore(&self, ptarget: Option<&ITsSbTarget>) -> windows_core::Result<()>; - fn AddSessionToStore(&self, psession: Option<&ITsSbSession>) -> windows_core::Result<()>; - fn AddEnvironmentToStore(&self, penvironment: Option<&ITsSbEnvironment>) -> windows_core::Result<()>; + fn AddTargetToStore(&self, ptarget: windows_core::Ref<'_, ITsSbTarget>) -> windows_core::Result<()>; + fn AddSessionToStore(&self, psession: windows_core::Ref<'_, ITsSbSession>) -> windows_core::Result<()>; + fn AddEnvironmentToStore(&self, penvironment: windows_core::Ref<'_, ITsSbEnvironment>) -> windows_core::Result<()>; fn RemoveEnvironmentFromStore(&self, environmentname: &windows_core::BSTR, bignoreowner: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn EnumerateFarms(&self, pdwcount: *mut u32, pval: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()>; fn QueryEnvironment(&self, environmentname: &windows_core::BSTR) -> windows_core::Result; fn EnumerateEnvironments(&self, pdwcount: *mut u32, pval: *mut *mut Option) -> windows_core::Result<()>; - fn SaveTarget(&self, ptarget: Option<&ITsSbTarget>, bforcewrite: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SaveEnvironment(&self, penvironment: Option<&ITsSbEnvironment>, bforcewrite: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SaveSession(&self, psession: Option<&ITsSbSession>) -> windows_core::Result<()>; + fn SaveTarget(&self, ptarget: windows_core::Ref<'_, ITsSbTarget>, bforcewrite: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SaveEnvironment(&self, penvironment: windows_core::Ref<'_, ITsSbEnvironment>, bforcewrite: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SaveSession(&self, psession: windows_core::Ref<'_, ITsSbSession>) -> windows_core::Result<()>; fn SetTargetProperty(&self, targetname: &windows_core::BSTR, propertyname: &windows_core::BSTR, pproperty: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn SetEnvironmentProperty(&self, environmentname: &windows_core::BSTR, propertyname: &windows_core::BSTR, pproperty: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn SetTargetState(&self, targetname: &windows_core::BSTR, newstate: TARGET_STATE) -> windows_core::Result; - fn SetSessionState(&self, sbsession: Option<&ITsSbSession>) -> windows_core::Result<()>; + fn SetSessionState(&self, sbsession: windows_core::Ref<'_, ITsSbSession>) -> windows_core::Result<()>; fn EnumerateTargets(&self, farmname: &windows_core::BSTR, envname: &windows_core::BSTR, sortbyfieldid: TS_SB_SORT_BY, sortybypropname: &windows_core::BSTR, pdwcount: *mut u32, pval: *mut *mut Option) -> windows_core::Result<()>; fn EnumerateSessions(&self, targetname: &windows_core::BSTR, username: &windows_core::BSTR, userdomain: &windows_core::BSTR, poolname: &windows_core::BSTR, initialprogram: &windows_core::BSTR, psessionstate: *const TSSESSION_STATE, pdwcount: *mut u32, ppval: *mut *mut Option) -> windows_core::Result<()>; fn GetFarmProperty(&self, farmname: &windows_core::BSTR, propertyname: &windows_core::BSTR, pvarvalue: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn DeleteTarget(&self, targetname: &windows_core::BSTR, hostname: &windows_core::BSTR) -> windows_core::Result<()>; - fn SetTargetPropertyWithVersionCheck(&self, ptarget: Option<&ITsSbTarget>, propertyname: &windows_core::BSTR, pproperty: *const super::Variant::VARIANT) -> windows_core::Result<()>; - fn SetEnvironmentPropertyWithVersionCheck(&self, penvironment: Option<&ITsSbEnvironment>, propertyname: &windows_core::BSTR, pproperty: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn SetTargetPropertyWithVersionCheck(&self, ptarget: windows_core::Ref<'_, ITsSbTarget>, propertyname: &windows_core::BSTR, pproperty: *const super::Variant::VARIANT) -> windows_core::Result<()>; + fn SetEnvironmentPropertyWithVersionCheck(&self, penvironment: windows_core::Ref<'_, ITsSbEnvironment>, propertyname: &windows_core::BSTR, pproperty: *const super::Variant::VARIANT) -> windows_core::Result<()>; fn AcquireTargetLock(&self, targetname: &windows_core::BSTR, dwtimeout: u32) -> windows_core::Result; - fn ReleaseTargetLock(&self, pcontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ReleaseTargetLock(&self, pcontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn TestAndSetServerState(&self, poolname: &windows_core::BSTR, serverfqdn: &windows_core::BSTR, newstate: TARGET_STATE, teststate: TARGET_STATE) -> windows_core::Result; fn SetServerWaitingToStart(&self, poolname: &windows_core::BSTR, servername: &windows_core::BSTR) -> windows_core::Result<()>; fn GetServerState(&self, poolname: &windows_core::BSTR, serverfqdn: &windows_core::BSTR) -> windows_core::Result; @@ -4163,15 +4163,15 @@ impl ITsSbResourcePluginStore_Vtbl { } unsafe extern "system" fn AddTargetToStore(this: *mut core::ffi::c_void, ptarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::AddTargetToStore(this, windows_core::from_raw_borrowed(&ptarget)).into() + ITsSbResourcePluginStore_Impl::AddTargetToStore(this, core::mem::transmute_copy(&ptarget)).into() } unsafe extern "system" fn AddSessionToStore(this: *mut core::ffi::c_void, psession: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::AddSessionToStore(this, windows_core::from_raw_borrowed(&psession)).into() + ITsSbResourcePluginStore_Impl::AddSessionToStore(this, core::mem::transmute_copy(&psession)).into() } unsafe extern "system" fn AddEnvironmentToStore(this: *mut core::ffi::c_void, penvironment: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::AddEnvironmentToStore(this, windows_core::from_raw_borrowed(&penvironment)).into() + ITsSbResourcePluginStore_Impl::AddEnvironmentToStore(this, core::mem::transmute_copy(&penvironment)).into() } unsafe extern "system" fn RemoveEnvironmentFromStore(this: *mut core::ffi::c_void, environmentname: *mut core::ffi::c_void, bignoreowner: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4197,15 +4197,15 @@ impl ITsSbResourcePluginStore_Vtbl { } unsafe extern "system" fn SaveTarget(this: *mut core::ffi::c_void, ptarget: *mut core::ffi::c_void, bforcewrite: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::SaveTarget(this, windows_core::from_raw_borrowed(&ptarget), core::mem::transmute_copy(&bforcewrite)).into() + ITsSbResourcePluginStore_Impl::SaveTarget(this, core::mem::transmute_copy(&ptarget), core::mem::transmute_copy(&bforcewrite)).into() } unsafe extern "system" fn SaveEnvironment(this: *mut core::ffi::c_void, penvironment: *mut core::ffi::c_void, bforcewrite: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::SaveEnvironment(this, windows_core::from_raw_borrowed(&penvironment), core::mem::transmute_copy(&bforcewrite)).into() + ITsSbResourcePluginStore_Impl::SaveEnvironment(this, core::mem::transmute_copy(&penvironment), core::mem::transmute_copy(&bforcewrite)).into() } unsafe extern "system" fn SaveSession(this: *mut core::ffi::c_void, psession: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::SaveSession(this, windows_core::from_raw_borrowed(&psession)).into() + ITsSbResourcePluginStore_Impl::SaveSession(this, core::mem::transmute_copy(&psession)).into() } unsafe extern "system" fn SetTargetProperty(this: *mut core::ffi::c_void, targetname: *mut core::ffi::c_void, propertyname: *mut core::ffi::c_void, pproperty: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4227,7 +4227,7 @@ impl ITsSbResourcePluginStore_Vtbl { } unsafe extern "system" fn SetSessionState(this: *mut core::ffi::c_void, sbsession: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::SetSessionState(this, windows_core::from_raw_borrowed(&sbsession)).into() + ITsSbResourcePluginStore_Impl::SetSessionState(this, core::mem::transmute_copy(&sbsession)).into() } unsafe extern "system" fn EnumerateTargets(this: *mut core::ffi::c_void, farmname: *mut core::ffi::c_void, envname: *mut core::ffi::c_void, sortbyfieldid: TS_SB_SORT_BY, sortybypropname: *mut core::ffi::c_void, pdwcount: *mut u32, pval: *mut *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4247,11 +4247,11 @@ impl ITsSbResourcePluginStore_Vtbl { } unsafe extern "system" fn SetTargetPropertyWithVersionCheck(this: *mut core::ffi::c_void, ptarget: *mut core::ffi::c_void, propertyname: *mut core::ffi::c_void, pproperty: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::SetTargetPropertyWithVersionCheck(this, windows_core::from_raw_borrowed(&ptarget), core::mem::transmute(&propertyname), core::mem::transmute_copy(&pproperty)).into() + ITsSbResourcePluginStore_Impl::SetTargetPropertyWithVersionCheck(this, core::mem::transmute_copy(&ptarget), core::mem::transmute(&propertyname), core::mem::transmute_copy(&pproperty)).into() } unsafe extern "system" fn SetEnvironmentPropertyWithVersionCheck(this: *mut core::ffi::c_void, penvironment: *mut core::ffi::c_void, propertyname: *mut core::ffi::c_void, pproperty: *const super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::SetEnvironmentPropertyWithVersionCheck(this, windows_core::from_raw_borrowed(&penvironment), core::mem::transmute(&propertyname), core::mem::transmute_copy(&pproperty)).into() + ITsSbResourcePluginStore_Impl::SetEnvironmentPropertyWithVersionCheck(this, core::mem::transmute_copy(&penvironment), core::mem::transmute(&propertyname), core::mem::transmute_copy(&pproperty)).into() } unsafe extern "system" fn AcquireTargetLock(this: *mut core::ffi::c_void, targetname: *mut core::ffi::c_void, dwtimeout: u32, ppcontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4265,7 +4265,7 @@ impl ITsSbResourcePluginStore_Vtbl { } unsafe extern "system" fn ReleaseTargetLock(this: *mut core::ffi::c_void, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbResourcePluginStore_Impl::ReleaseTargetLock(this, windows_core::from_raw_borrowed(&pcontext)).into() + ITsSbResourcePluginStore_Impl::ReleaseTargetLock(this, core::mem::transmute_copy(&pcontext)).into() } unsafe extern "system" fn TestAndSetServerState(this: *mut core::ffi::c_void, poolname: *mut core::ffi::c_void, serverfqdn: *mut core::ffi::c_void, newstate: TARGET_STATE, teststate: TARGET_STATE, pinitstate: *mut TARGET_STATE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4755,7 +4755,7 @@ pub trait ITsSbTarget_Impl: windows_core::IUnknownImpl { fn TargetState(&self) -> windows_core::Result; fn SetTargetState(&self, state: TARGET_STATE) -> windows_core::Result<()>; fn TargetPropertySet(&self) -> windows_core::Result; - fn SetTargetPropertySet(&self, pval: Option<&ITsSbTargetPropertySet>) -> windows_core::Result<()>; + fn SetTargetPropertySet(&self, pval: windows_core::Ref<'_, ITsSbTargetPropertySet>) -> windows_core::Result<()>; fn EnvironmentName(&self) -> windows_core::Result; fn SetEnvironmentName(&self, val: &windows_core::BSTR) -> windows_core::Result<()>; fn NumSessions(&self) -> windows_core::Result; @@ -4855,7 +4855,7 @@ impl ITsSbTarget_Vtbl { } unsafe extern "system" fn SetTargetPropertySet(this: *mut core::ffi::c_void, pval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbTarget_Impl::SetTargetPropertySet(this, windows_core::from_raw_borrowed(&pval)).into() + ITsSbTarget_Impl::SetTargetPropertySet(this, core::mem::transmute_copy(&pval)).into() } unsafe extern "system" fn EnvironmentName(this: *mut core::ffi::c_void, pval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5167,7 +5167,7 @@ pub struct ITsSbTaskPlugin_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait ITsSbTaskPlugin_Impl: ITsSbPlugin_Impl { - fn InitializeTaskPlugin(&self, pitssbtaskpluginnotifysink: Option<&ITsSbTaskPluginNotifySink>) -> windows_core::Result<()>; + fn InitializeTaskPlugin(&self, pitssbtaskpluginnotifysink: windows_core::Ref<'_, ITsSbTaskPluginNotifySink>) -> windows_core::Result<()>; fn SetTaskQueue(&self, pszhostname: &windows_core::BSTR, sbtaskinfosize: u32, pitssbtaskinfo: *const Option) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] @@ -5175,7 +5175,7 @@ impl ITsSbTaskPlugin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeTaskPlugin(this: *mut core::ffi::c_void, pitssbtaskpluginnotifysink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITsSbTaskPlugin_Impl::InitializeTaskPlugin(this, windows_core::from_raw_borrowed(&pitssbtaskpluginnotifysink)).into() + ITsSbTaskPlugin_Impl::InitializeTaskPlugin(this, core::mem::transmute_copy(&pitssbtaskpluginnotifysink)).into() } unsafe extern "system" fn SetTaskQueue(this: *mut core::ffi::c_void, pszhostname: *mut core::ffi::c_void, sbtaskinfosize: u32, pitssbtaskinfo: *const *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5333,15 +5333,15 @@ pub struct IWRdsGraphicsChannel_Vtbl { pub Open: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWRdsGraphicsChannel_Impl: windows_core::IUnknownImpl { - fn Write(&self, cbsize: u32, pbuffer: *const u8, pcontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Write(&self, cbsize: u32, pbuffer: *const u8, pcontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; - fn Open(&self, pchannelevents: Option<&IWRdsGraphicsChannelEvents>, popencontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Open(&self, pchannelevents: windows_core::Ref<'_, IWRdsGraphicsChannelEvents>, popencontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IWRdsGraphicsChannel_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Write(this: *mut core::ffi::c_void, cbsize: u32, pbuffer: *const u8, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWRdsGraphicsChannel_Impl::Write(this, core::mem::transmute_copy(&cbsize), core::mem::transmute_copy(&pbuffer), windows_core::from_raw_borrowed(&pcontext)).into() + IWRdsGraphicsChannel_Impl::Write(this, core::mem::transmute_copy(&cbsize), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&pcontext)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5349,7 +5349,7 @@ impl IWRdsGraphicsChannel_Vtbl { } unsafe extern "system" fn Open(this: *mut core::ffi::c_void, pchannelevents: *mut core::ffi::c_void, popencontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWRdsGraphicsChannel_Impl::Open(this, windows_core::from_raw_borrowed(&pchannelevents), windows_core::from_raw_borrowed(&popencontext)).into() + IWRdsGraphicsChannel_Impl::Open(this, core::mem::transmute_copy(&pchannelevents), core::mem::transmute_copy(&popencontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5400,8 +5400,8 @@ pub struct IWRdsGraphicsChannelEvents_Vtbl { pub trait IWRdsGraphicsChannelEvents_Impl: windows_core::IUnknownImpl { fn OnDataReceived(&self, cbsize: u32, pbuffer: *const u8) -> windows_core::Result<()>; fn OnClose(&self) -> windows_core::Result<()>; - fn OnChannelOpened(&self, openresult: windows_core::HRESULT, popencontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn OnDataSent(&self, pwritecontext: Option<&windows_core::IUnknown>, bcancelled: super::super::Foundation::BOOL, pbuffer: *const u8, cbbuffer: u32) -> windows_core::Result<()>; + fn OnChannelOpened(&self, openresult: windows_core::HRESULT, popencontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnDataSent(&self, pwritecontext: windows_core::Ref<'_, windows_core::IUnknown>, bcancelled: super::super::Foundation::BOOL, pbuffer: *const u8, cbbuffer: u32) -> windows_core::Result<()>; fn OnMetricsUpdate(&self, bandwidth: u32, rtt: u32, lastsentbyteindex: u64) -> windows_core::Result<()>; } impl IWRdsGraphicsChannelEvents_Vtbl { @@ -5416,11 +5416,11 @@ impl IWRdsGraphicsChannelEvents_Vtbl { } unsafe extern "system" fn OnChannelOpened(this: *mut core::ffi::c_void, openresult: windows_core::HRESULT, popencontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWRdsGraphicsChannelEvents_Impl::OnChannelOpened(this, core::mem::transmute_copy(&openresult), windows_core::from_raw_borrowed(&popencontext)).into() + IWRdsGraphicsChannelEvents_Impl::OnChannelOpened(this, core::mem::transmute_copy(&openresult), core::mem::transmute_copy(&popencontext)).into() } unsafe extern "system" fn OnDataSent(this: *mut core::ffi::c_void, pwritecontext: *mut core::ffi::c_void, bcancelled: super::super::Foundation::BOOL, pbuffer: *const u8, cbbuffer: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWRdsGraphicsChannelEvents_Impl::OnDataSent(this, windows_core::from_raw_borrowed(&pwritecontext), core::mem::transmute_copy(&bcancelled), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&cbbuffer)).into() + IWRdsGraphicsChannelEvents_Impl::OnDataSent(this, core::mem::transmute_copy(&pwritecontext), core::mem::transmute_copy(&bcancelled), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&cbbuffer)).into() } unsafe extern "system" fn OnMetricsUpdate(this: *mut core::ffi::c_void, bandwidth: u32, rtt: u32, lastsentbyteindex: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5995,7 +5995,7 @@ pub struct IWRdsProtocolListener_Vtbl { } pub trait IWRdsProtocolListener_Impl: windows_core::IUnknownImpl { fn GetSettings(&self, wrdslistenersettinglevel: WRDS_LISTENER_SETTING_LEVEL) -> windows_core::Result; - fn StartListen(&self, pcallback: Option<&IWRdsProtocolListenerCallback>) -> windows_core::Result<()>; + fn StartListen(&self, pcallback: windows_core::Ref<'_, IWRdsProtocolListenerCallback>) -> windows_core::Result<()>; fn StopListen(&self) -> windows_core::Result<()>; } impl IWRdsProtocolListener_Vtbl { @@ -6012,7 +6012,7 @@ impl IWRdsProtocolListener_Vtbl { } unsafe extern "system" fn StartListen(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWRdsProtocolListener_Impl::StartListen(this, windows_core::from_raw_borrowed(&pcallback)).into() + IWRdsProtocolListener_Impl::StartListen(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn StopListen(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6047,13 +6047,13 @@ pub struct IWRdsProtocolListenerCallback_Vtbl { pub OnConnected: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const WRDS_CONNECTION_SETTINGS, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWRdsProtocolListenerCallback_Impl: windows_core::IUnknownImpl { - fn OnConnected(&self, pconnection: Option<&IWRdsProtocolConnection>, pwrdsconnectionsettings: *const WRDS_CONNECTION_SETTINGS) -> windows_core::Result; + fn OnConnected(&self, pconnection: windows_core::Ref<'_, IWRdsProtocolConnection>, pwrdsconnectionsettings: *const WRDS_CONNECTION_SETTINGS) -> windows_core::Result; } impl IWRdsProtocolListenerCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnConnected(this: *mut core::ffi::c_void, pconnection: *mut core::ffi::c_void, pwrdsconnectionsettings: *const WRDS_CONNECTION_SETTINGS, pcallback: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWRdsProtocolListenerCallback_Impl::OnConnected(this, windows_core::from_raw_borrowed(&pconnection), core::mem::transmute_copy(&pwrdsconnectionsettings)) { + match IWRdsProtocolListenerCallback_Impl::OnConnected(this, core::mem::transmute_copy(&pconnection), core::mem::transmute_copy(&pwrdsconnectionsettings)) { Ok(ok__) => { pcallback.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6209,7 +6209,7 @@ pub struct IWRdsProtocolManager_Vtbl { pub Uninitialize: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWRdsProtocolManager_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, piwrdssettings: Option<&IWRdsProtocolSettings>, pwrdssettings: *const WRDS_SETTINGS) -> windows_core::Result<()>; + fn Initialize(&self, piwrdssettings: windows_core::Ref<'_, IWRdsProtocolSettings>, pwrdssettings: *const WRDS_SETTINGS) -> windows_core::Result<()>; fn CreateListener(&self, wszlistenername: &windows_core::PCWSTR) -> windows_core::Result; fn NotifyServiceStateChange(&self, ptsservicestatechange: *const WTS_SERVICE_STATE) -> windows_core::Result<()>; fn NotifySessionOfServiceStart(&self, sessionid: *const WTS_SESSION_ID) -> windows_core::Result<()>; @@ -6222,7 +6222,7 @@ impl IWRdsProtocolManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, piwrdssettings: *mut core::ffi::c_void, pwrdssettings: *const WRDS_SETTINGS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWRdsProtocolManager_Impl::Initialize(this, windows_core::from_raw_borrowed(&piwrdssettings), core::mem::transmute_copy(&pwrdssettings)).into() + IWRdsProtocolManager_Impl::Initialize(this, core::mem::transmute_copy(&piwrdssettings), core::mem::transmute_copy(&pwrdssettings)).into() } unsafe extern "system" fn CreateListener(this: *mut core::ffi::c_void, wszlistenername: windows_core::PCWSTR, pprotocollistener: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6389,7 +6389,7 @@ pub struct IWRdsProtocolShadowConnection_Vtbl { pub DoTarget: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *const u8, u32, *const u8, u32, *const u8, u32, windows_core::PCWSTR) -> windows_core::HRESULT, } pub trait IWRdsProtocolShadowConnection_Impl: windows_core::IUnknownImpl { - fn Start(&self, ptargetservername: &windows_core::PCWSTR, targetsessionid: u32, hotkeyvk: u8, hotkeymodifiers: u16, pshadowcallback: Option<&IWRdsProtocolShadowCallback>) -> windows_core::Result<()>; + fn Start(&self, ptargetservername: &windows_core::PCWSTR, targetsessionid: u32, hotkeyvk: u8, hotkeymodifiers: u16, pshadowcallback: windows_core::Ref<'_, IWRdsProtocolShadowCallback>) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; fn DoTarget(&self, pparam1: *const u8, param1size: u32, pparam2: *const u8, param2size: u32, pparam3: *const u8, param3size: u32, pparam4: *const u8, param4size: u32, pclientname: &windows_core::PCWSTR) -> windows_core::Result<()>; } @@ -6397,7 +6397,7 @@ impl IWRdsProtocolShadowConnection_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Start(this: *mut core::ffi::c_void, ptargetservername: windows_core::PCWSTR, targetsessionid: u32, hotkeyvk: u8, hotkeymodifiers: u16, pshadowcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWRdsProtocolShadowConnection_Impl::Start(this, core::mem::transmute(&ptargetservername), core::mem::transmute_copy(&targetsessionid), core::mem::transmute_copy(&hotkeyvk), core::mem::transmute_copy(&hotkeymodifiers), windows_core::from_raw_borrowed(&pshadowcallback)).into() + IWRdsProtocolShadowConnection_Impl::Start(this, core::mem::transmute(&ptargetservername), core::mem::transmute_copy(&targetsessionid), core::mem::transmute_copy(&hotkeyvk), core::mem::transmute_copy(&hotkeymodifiers), core::mem::transmute_copy(&pshadowcallback)).into() } unsafe extern "system" fn Stop(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6551,13 +6551,13 @@ pub struct IWTSBitmapRenderService_Vtbl { pub GetMappedRenderer: unsafe extern "system" fn(*mut core::ffi::c_void, u64, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWTSBitmapRenderService_Impl: windows_core::IUnknownImpl { - fn GetMappedRenderer(&self, mappingid: u64, pmappedrenderercallback: Option<&IWTSBitmapRendererCallback>) -> windows_core::Result; + fn GetMappedRenderer(&self, mappingid: u64, pmappedrenderercallback: windows_core::Ref<'_, IWTSBitmapRendererCallback>) -> windows_core::Result; } impl IWTSBitmapRenderService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetMappedRenderer(this: *mut core::ffi::c_void, mappingid: u64, pmappedrenderercallback: *mut core::ffi::c_void, ppmappedrenderer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWTSBitmapRenderService_Impl::GetMappedRenderer(this, core::mem::transmute_copy(&mappingid), windows_core::from_raw_borrowed(&pmappedrenderercallback)) { + match IWTSBitmapRenderService_Impl::GetMappedRenderer(this, core::mem::transmute_copy(&mappingid), core::mem::transmute_copy(&pmappedrenderercallback)) { Ok(ok__) => { ppmappedrenderer.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6716,13 +6716,13 @@ pub struct IWTSListenerCallback_Vtbl { pub OnNewChannelConnection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut super::super::Foundation::BOOL, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWTSListenerCallback_Impl: windows_core::IUnknownImpl { - fn OnNewChannelConnection(&self, pchannel: Option<&IWTSVirtualChannel>, data: &windows_core::BSTR, pbaccept: *mut super::super::Foundation::BOOL, ppcallback: *mut Option) -> windows_core::Result<()>; + fn OnNewChannelConnection(&self, pchannel: windows_core::Ref<'_, IWTSVirtualChannel>, data: &windows_core::BSTR, pbaccept: *mut super::super::Foundation::BOOL, ppcallback: windows_core::OutRef<'_, IWTSVirtualChannelCallback>) -> windows_core::Result<()>; } impl IWTSListenerCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnNewChannelConnection(this: *mut core::ffi::c_void, pchannel: *mut core::ffi::c_void, data: *mut core::ffi::c_void, pbaccept: *mut super::super::Foundation::BOOL, ppcallback: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWTSListenerCallback_Impl::OnNewChannelConnection(this, windows_core::from_raw_borrowed(&pchannel), core::mem::transmute(&data), core::mem::transmute_copy(&pbaccept), core::mem::transmute_copy(&ppcallback)).into() + IWTSListenerCallback_Impl::OnNewChannelConnection(this, core::mem::transmute_copy(&pchannel), core::mem::transmute(&data), core::mem::transmute_copy(&pbaccept), core::mem::transmute_copy(&ppcallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnNewChannelConnection: OnNewChannelConnection:: } } @@ -6759,7 +6759,7 @@ pub struct IWTSPlugin_Vtbl { pub Terminated: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWTSPlugin_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pchannelmgr: Option<&IWTSVirtualChannelManager>) -> windows_core::Result<()>; + fn Initialize(&self, pchannelmgr: windows_core::Ref<'_, IWTSVirtualChannelManager>) -> windows_core::Result<()>; fn Connected(&self) -> windows_core::Result<()>; fn Disconnected(&self, dwdisconnectcode: u32) -> windows_core::Result<()>; fn Terminated(&self) -> windows_core::Result<()>; @@ -6768,7 +6768,7 @@ impl IWTSPlugin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pchannelmgr: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWTSPlugin_Impl::Initialize(this, windows_core::from_raw_borrowed(&pchannelmgr)).into() + IWTSPlugin_Impl::Initialize(this, core::mem::transmute_copy(&pchannelmgr)).into() } unsafe extern "system" fn Connected(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7279,14 +7279,14 @@ pub struct IWTSProtocolListener_Vtbl { pub StopListen: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWTSProtocolListener_Impl: windows_core::IUnknownImpl { - fn StartListen(&self, pcallback: Option<&IWTSProtocolListenerCallback>) -> windows_core::Result<()>; + fn StartListen(&self, pcallback: windows_core::Ref<'_, IWTSProtocolListenerCallback>) -> windows_core::Result<()>; fn StopListen(&self) -> windows_core::Result<()>; } impl IWTSProtocolListener_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartListen(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWTSProtocolListener_Impl::StartListen(this, windows_core::from_raw_borrowed(&pcallback)).into() + IWTSProtocolListener_Impl::StartListen(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn StopListen(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7320,13 +7320,13 @@ pub struct IWTSProtocolListenerCallback_Vtbl { pub OnConnected: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWTSProtocolListenerCallback_Impl: windows_core::IUnknownImpl { - fn OnConnected(&self, pconnection: Option<&IWTSProtocolConnection>) -> windows_core::Result; + fn OnConnected(&self, pconnection: windows_core::Ref<'_, IWTSProtocolConnection>) -> windows_core::Result; } impl IWTSProtocolListenerCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnConnected(this: *mut core::ffi::c_void, pconnection: *mut core::ffi::c_void, pcallback: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWTSProtocolListenerCallback_Impl::OnConnected(this, windows_core::from_raw_borrowed(&pconnection)) { + match IWTSProtocolListenerCallback_Impl::OnConnected(this, core::mem::transmute_copy(&pconnection)) { Ok(ok__) => { pcallback.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7588,7 +7588,7 @@ pub struct IWTSProtocolShadowConnection_Vtbl { pub DoTarget: unsafe extern "system" fn(*mut core::ffi::c_void, *const u8, u32, *const u8, u32, *const u8, u32, *const u8, u32, windows_core::PCWSTR) -> windows_core::HRESULT, } pub trait IWTSProtocolShadowConnection_Impl: windows_core::IUnknownImpl { - fn Start(&self, ptargetservername: &windows_core::PCWSTR, targetsessionid: u32, hotkeyvk: u8, hotkeymodifiers: u16, pshadowcallback: Option<&IWTSProtocolShadowCallback>) -> windows_core::Result<()>; + fn Start(&self, ptargetservername: &windows_core::PCWSTR, targetsessionid: u32, hotkeyvk: u8, hotkeymodifiers: u16, pshadowcallback: windows_core::Ref<'_, IWTSProtocolShadowCallback>) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result<()>; fn DoTarget(&self, pparam1: *const u8, param1size: u32, pparam2: *const u8, param2size: u32, pparam3: *const u8, param3size: u32, pparam4: *const u8, param4size: u32, pclientname: &windows_core::PCWSTR) -> windows_core::Result<()>; } @@ -7596,7 +7596,7 @@ impl IWTSProtocolShadowConnection_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Start(this: *mut core::ffi::c_void, ptargetservername: windows_core::PCWSTR, targetsessionid: u32, hotkeyvk: u8, hotkeymodifiers: u16, pshadowcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWTSProtocolShadowConnection_Impl::Start(this, core::mem::transmute(&ptargetservername), core::mem::transmute_copy(&targetsessionid), core::mem::transmute_copy(&hotkeyvk), core::mem::transmute_copy(&hotkeymodifiers), windows_core::from_raw_borrowed(&pshadowcallback)).into() + IWTSProtocolShadowConnection_Impl::Start(this, core::mem::transmute(&ptargetservername), core::mem::transmute_copy(&targetsessionid), core::mem::transmute_copy(&hotkeyvk), core::mem::transmute_copy(&hotkeymodifiers), core::mem::transmute_copy(&pshadowcallback)).into() } unsafe extern "system" fn Stop(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7737,14 +7737,14 @@ pub struct IWTSVirtualChannel_Vtbl { pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWTSVirtualChannel_Impl: windows_core::IUnknownImpl { - fn Write(&self, cbsize: u32, pbuffer: *const u8, preserved: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Write(&self, cbsize: u32, pbuffer: *const u8, preserved: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } impl IWTSVirtualChannel_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Write(this: *mut core::ffi::c_void, cbsize: u32, pbuffer: *const u8, preserved: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWTSVirtualChannel_Impl::Write(this, core::mem::transmute_copy(&cbsize), core::mem::transmute_copy(&pbuffer), windows_core::from_raw_borrowed(&preserved)).into() + IWTSVirtualChannel_Impl::Write(this, core::mem::transmute_copy(&cbsize), core::mem::transmute_copy(&pbuffer), core::mem::transmute_copy(&preserved)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7816,13 +7816,13 @@ pub struct IWTSVirtualChannelManager_Vtbl { pub CreateListener: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCSTR, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWTSVirtualChannelManager_Impl: windows_core::IUnknownImpl { - fn CreateListener(&self, pszchannelname: &windows_core::PCSTR, uflags: u32, plistenercallback: Option<&IWTSListenerCallback>) -> windows_core::Result; + fn CreateListener(&self, pszchannelname: &windows_core::PCSTR, uflags: u32, plistenercallback: windows_core::Ref<'_, IWTSListenerCallback>) -> windows_core::Result; } impl IWTSVirtualChannelManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateListener(this: *mut core::ffi::c_void, pszchannelname: windows_core::PCSTR, uflags: u32, plistenercallback: *mut core::ffi::c_void, pplistener: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWTSVirtualChannelManager_Impl::CreateListener(this, core::mem::transmute(&pszchannelname), core::mem::transmute_copy(&uflags), windows_core::from_raw_borrowed(&plistenercallback)) { + match IWTSVirtualChannelManager_Impl::CreateListener(this, core::mem::transmute(&pszchannelname), core::mem::transmute_copy(&uflags), core::mem::transmute_copy(&plistenercallback)) { Ok(ok__) => { pplistener.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8097,14 +8097,14 @@ pub struct IWorkspaceRegistration_Vtbl { pub RemoveResource: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IWorkspaceRegistration_Impl: windows_core::IUnknownImpl { - fn AddResource(&self, punk: Option<&IWorkspaceClientExt>) -> windows_core::Result; + fn AddResource(&self, punk: windows_core::Ref<'_, IWorkspaceClientExt>) -> windows_core::Result; fn RemoveResource(&self, dwcookieconnection: u32) -> windows_core::Result<()>; } impl IWorkspaceRegistration_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddResource(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWorkspaceRegistration_Impl::AddResource(this, windows_core::from_raw_borrowed(&punk)) { + match IWorkspaceRegistration_Impl::AddResource(this, core::mem::transmute_copy(&punk)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8153,14 +8153,14 @@ pub struct IWorkspaceRegistration2_Vtbl { pub RemoveResourceEx: unsafe extern "system" fn(*mut core::ffi::c_void, u32, windows_core::GUID) -> windows_core::HRESULT, } pub trait IWorkspaceRegistration2_Impl: IWorkspaceRegistration_Impl { - fn AddResourceEx(&self, punk: Option<&IWorkspaceClientExt>, bstreventloguploadaddress: &windows_core::BSTR, pdwcookie: *mut u32, correlationid: &windows_core::GUID) -> windows_core::Result<()>; + fn AddResourceEx(&self, punk: windows_core::Ref<'_, IWorkspaceClientExt>, bstreventloguploadaddress: &windows_core::BSTR, pdwcookie: *mut u32, correlationid: &windows_core::GUID) -> windows_core::Result<()>; fn RemoveResourceEx(&self, dwcookieconnection: u32, correlationid: &windows_core::GUID) -> windows_core::Result<()>; } impl IWorkspaceRegistration2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddResourceEx(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, bstreventloguploadaddress: *mut core::ffi::c_void, pdwcookie: *mut u32, correlationid: windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWorkspaceRegistration2_Impl::AddResourceEx(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute(&bstreventloguploadaddress), core::mem::transmute_copy(&pdwcookie), core::mem::transmute(&correlationid)).into() + IWorkspaceRegistration2_Impl::AddResourceEx(this, core::mem::transmute_copy(&punk), core::mem::transmute(&bstreventloguploadaddress), core::mem::transmute_copy(&pdwcookie), core::mem::transmute(&correlationid)).into() } unsafe extern "system" fn RemoveResourceEx(this: *mut core::ffi::c_void, dwcookieconnection: u32, correlationid: windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs index b3ec0d0992..a03ec834b5 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs @@ -786,7 +786,7 @@ pub struct IWSMan_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IWSMan_Impl: super::Com::IDispatch_Impl { - fn CreateSession(&self, connection: &windows_core::BSTR, flags: i32, connectionoptions: Option<&super::Com::IDispatch>) -> windows_core::Result; + fn CreateSession(&self, connection: &windows_core::BSTR, flags: i32, connectionoptions: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; fn CreateConnectionOptions(&self) -> windows_core::Result; fn CommandLine(&self) -> windows_core::Result; fn Error(&self) -> windows_core::Result; @@ -796,7 +796,7 @@ impl IWSMan_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateSession(this: *mut core::ffi::c_void, connection: *mut core::ffi::c_void, flags: i32, connectionoptions: *mut core::ffi::c_void, session: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWSMan_Impl::CreateSession(this, core::mem::transmute(&connection), core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&connectionoptions)) { + match IWSMan_Impl::CreateSession(this, core::mem::transmute(&connection), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&connectionoptions)) { Ok(ok__) => { session.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1843,14 +1843,14 @@ pub struct IWSManInternal_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IWSManInternal_Impl: super::Com::IDispatch_Impl { - fn ConfigSDDL(&self, session: Option<&super::Com::IDispatch>, resourceuri: &super::Variant::VARIANT, flags: i32) -> windows_core::Result; + fn ConfigSDDL(&self, session: windows_core::Ref<'_, super::Com::IDispatch>, resourceuri: &super::Variant::VARIANT, flags: i32) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IWSManInternal_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConfigSDDL(this: *mut core::ffi::c_void, session: *mut core::ffi::c_void, resourceuri: super::Variant::VARIANT, flags: i32, resource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWSManInternal_Impl::ConfigSDDL(this, windows_core::from_raw_borrowed(&session), core::mem::transmute(&resourceuri), core::mem::transmute_copy(&flags)) { + match IWSManInternal_Impl::ConfigSDDL(this, core::mem::transmute_copy(&session), core::mem::transmute(&resourceuri), core::mem::transmute_copy(&flags)) { Ok(ok__) => { resource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs index 40b7579119..27f3dbfaca 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs @@ -4423,8 +4423,8 @@ pub trait DataSource_Impl: windows_core::IUnknownImpl { fn getDataMember(&self, bstrdm: *const u16, riid: *const windows_core::GUID) -> windows_core::Result; fn getDataMemberName(&self, lindex: i32) -> windows_core::Result<*mut u16>; fn getDataMemberCount(&self) -> windows_core::Result; - fn addDataSourceListener(&self, pdsl: Option<&DataSourceListener>) -> windows_core::Result<()>; - fn removeDataSourceListener(&self, pdsl: Option<&DataSourceListener>) -> windows_core::Result<()>; + fn addDataSourceListener(&self, pdsl: windows_core::Ref<'_, DataSourceListener>) -> windows_core::Result<()>; + fn removeDataSourceListener(&self, pdsl: windows_core::Ref<'_, DataSourceListener>) -> windows_core::Result<()>; } impl DataSource_Vtbl { pub const fn new() -> Self { @@ -4460,11 +4460,11 @@ impl DataSource_Vtbl { } unsafe extern "system" fn addDataSourceListener(this: *mut core::ffi::c_void, pdsl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DataSource_Impl::addDataSourceListener(this, windows_core::from_raw_borrowed(&pdsl)).into() + DataSource_Impl::addDataSourceListener(this, core::mem::transmute_copy(&pdsl)).into() } unsafe extern "system" fn removeDataSourceListener(this: *mut core::ffi::c_void, pdsl: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - DataSource_Impl::removeDataSourceListener(this, windows_core::from_raw_borrowed(&pdsl)).into() + DataSource_Impl::removeDataSourceListener(this, core::mem::transmute_copy(&pdsl)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5280,14 +5280,14 @@ pub struct IBindResource_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IBindResource_Impl: windows_core::IUnknownImpl { - fn Bind(&self, punkouter: Option<&windows_core::IUnknown>, pwszurl: &windows_core::PCWSTR, dwbindurlflags: u32, rguid: *const windows_core::GUID, riid: *const windows_core::GUID, pauthenticate: Option<&super::Com::IAuthenticate>, pimplsession: *mut DBIMPLICITSESSION, pdwbindstatus: *mut u32, ppunk: *mut Option) -> windows_core::Result<()>; + fn Bind(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, pwszurl: &windows_core::PCWSTR, dwbindurlflags: u32, rguid: *const windows_core::GUID, riid: *const windows_core::GUID, pauthenticate: windows_core::Ref<'_, super::Com::IAuthenticate>, pimplsession: *mut DBIMPLICITSESSION, pdwbindstatus: *mut u32, ppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IBindResource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Bind(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwbindurlflags: u32, rguid: *const windows_core::GUID, riid: *const windows_core::GUID, pauthenticate: *mut core::ffi::c_void, pimplsession: *mut DBIMPLICITSESSION, pdwbindstatus: *mut u32, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBindResource_Impl::Bind(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwbindurlflags), core::mem::transmute_copy(&rguid), core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&pauthenticate), core::mem::transmute_copy(&pimplsession), core::mem::transmute_copy(&pdwbindstatus), core::mem::transmute_copy(&ppunk)).into() + IBindResource_Impl::Bind(this, core::mem::transmute_copy(&punkouter), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwbindurlflags), core::mem::transmute_copy(&rguid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pauthenticate), core::mem::transmute_copy(&pimplsession), core::mem::transmute_copy(&pdwbindstatus), core::mem::transmute_copy(&ppunk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Bind: Bind:: } } @@ -5579,7 +5579,7 @@ pub struct IColumnsRowset_Vtbl { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IColumnsRowset_Impl: windows_core::IUnknownImpl { fn GetAvailableColumns(&self, pcoptcolumns: *mut usize, prgoptcolumns: *mut *mut super::super::Storage::IndexServer::DBID) -> windows_core::Result<()>; - fn GetColumnsRowset(&self, punkouter: Option<&windows_core::IUnknown>, coptcolumns: usize, rgoptcolumns: *const super::super::Storage::IndexServer::DBID, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, ppcolrowset: *mut Option) -> windows_core::Result<()>; + fn GetColumnsRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, coptcolumns: usize, rgoptcolumns: *const super::super::Storage::IndexServer::DBID, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, ppcolrowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IColumnsRowset_Vtbl { @@ -5590,7 +5590,7 @@ impl IColumnsRowset_Vtbl { } unsafe extern "system" fn GetColumnsRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, coptcolumns: usize, rgoptcolumns: *const super::super::Storage::IndexServer::DBID, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, ppcolrowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IColumnsRowset_Impl::GetColumnsRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&coptcolumns), core::mem::transmute_copy(&rgoptcolumns), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&ppcolrowset)).into() + IColumnsRowset_Impl::GetColumnsRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&coptcolumns), core::mem::transmute_copy(&rgoptcolumns), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&ppcolrowset)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5630,7 +5630,7 @@ pub struct ICommand_Vtbl { } pub trait ICommand_Impl: windows_core::IUnknownImpl { fn Cancel(&self) -> windows_core::Result<()>; - fn Execute(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, pparams: *mut DBPARAMS, pcrowsaffected: *mut isize, pprowset: *mut Option) -> windows_core::Result<()>; + fn Execute(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, pparams: *mut DBPARAMS, pcrowsaffected: *mut isize, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetDBSession(&self, riid: *const windows_core::GUID) -> windows_core::Result; } impl ICommand_Vtbl { @@ -5641,7 +5641,7 @@ impl ICommand_Vtbl { } unsafe extern "system" fn Execute(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, pparams: *mut DBPARAMS, pcrowsaffected: *mut isize, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICommand_Impl::Execute(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pparams), core::mem::transmute_copy(&pcrowsaffected), core::mem::transmute_copy(&pprowset)).into() + ICommand_Impl::Execute(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pparams), core::mem::transmute_copy(&pcrowsaffected), core::mem::transmute_copy(&pprowset)).into() } unsafe extern "system" fn GetDBSession(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5960,8 +5960,8 @@ pub struct ICommandStream_Vtbl { pub SetCommandStream: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICommandStream_Impl: windows_core::IUnknownImpl { - fn GetCommandStream(&self, piid: *mut windows_core::GUID, pguiddialect: *mut windows_core::GUID, ppcommandstream: *mut Option) -> windows_core::Result<()>; - fn SetCommandStream(&self, riid: *const windows_core::GUID, rguiddialect: *const windows_core::GUID, pcommandstream: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetCommandStream(&self, piid: *mut windows_core::GUID, pguiddialect: *mut windows_core::GUID, ppcommandstream: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetCommandStream(&self, riid: *const windows_core::GUID, rguiddialect: *const windows_core::GUID, pcommandstream: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ICommandStream_Vtbl { pub const fn new() -> Self { @@ -5971,7 +5971,7 @@ impl ICommandStream_Vtbl { } unsafe extern "system" fn SetCommandStream(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, rguiddialect: *const windows_core::GUID, pcommandstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICommandStream_Impl::SetCommandStream(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&rguiddialect), windows_core::from_raw_borrowed(&pcommandstream)).into() + ICommandStream_Impl::SetCommandStream(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&rguiddialect), core::mem::transmute_copy(&pcommandstream)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6210,7 +6210,7 @@ pub trait ICondition_Impl: super::Com::IPersistStream_Impl { fn GetComparisonInfo(&self, ppszpropertyname: *mut windows_core::PWSTR, pcop: *mut Common::CONDITION_OPERATION, ppropvar: *mut super::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn GetValueType(&self) -> windows_core::Result; fn GetValueNormalization(&self) -> windows_core::Result; - fn GetInputTerms(&self, pppropertyterm: *mut Option, ppoperationterm: *mut Option, ppvalueterm: *mut Option) -> windows_core::Result<()>; + fn GetInputTerms(&self, pppropertyterm: windows_core::OutRef<'_, IRichChunk>, ppoperationterm: windows_core::OutRef<'_, IRichChunk>, ppvalueterm: windows_core::OutRef<'_, IRichChunk>) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] @@ -6413,17 +6413,17 @@ pub struct IConditionFactory_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] pub trait IConditionFactory_Impl: windows_core::IUnknownImpl { - fn MakeNot(&self, pcsub: Option<&ICondition>, fsimplify: super::super::Foundation::BOOL) -> windows_core::Result; - fn MakeAndOr(&self, ct: Common::CONDITION_TYPE, peusubs: Option<&super::Com::IEnumUnknown>, fsimplify: super::super::Foundation::BOOL) -> windows_core::Result; - fn MakeLeaf(&self, pszpropertyname: &windows_core::PCWSTR, cop: Common::CONDITION_OPERATION, pszvaluetype: &windows_core::PCWSTR, ppropvar: *const super::Com::StructuredStorage::PROPVARIANT, ppropertynameterm: Option<&IRichChunk>, poperationterm: Option<&IRichChunk>, pvalueterm: Option<&IRichChunk>, fexpand: super::super::Foundation::BOOL) -> windows_core::Result; - fn Resolve(&self, pc: Option<&ICondition>, sqro: STRUCTURED_QUERY_RESOLVE_OPTION, pstreferencetime: *const super::super::Foundation::SYSTEMTIME) -> windows_core::Result; + fn MakeNot(&self, pcsub: windows_core::Ref<'_, ICondition>, fsimplify: super::super::Foundation::BOOL) -> windows_core::Result; + fn MakeAndOr(&self, ct: Common::CONDITION_TYPE, peusubs: windows_core::Ref<'_, super::Com::IEnumUnknown>, fsimplify: super::super::Foundation::BOOL) -> windows_core::Result; + fn MakeLeaf(&self, pszpropertyname: &windows_core::PCWSTR, cop: Common::CONDITION_OPERATION, pszvaluetype: &windows_core::PCWSTR, ppropvar: *const super::Com::StructuredStorage::PROPVARIANT, ppropertynameterm: windows_core::Ref<'_, IRichChunk>, poperationterm: windows_core::Ref<'_, IRichChunk>, pvalueterm: windows_core::Ref<'_, IRichChunk>, fexpand: super::super::Foundation::BOOL) -> windows_core::Result; + fn Resolve(&self, pc: windows_core::Ref<'_, ICondition>, sqro: STRUCTURED_QUERY_RESOLVE_OPTION, pstreferencetime: *const super::super::Foundation::SYSTEMTIME) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] impl IConditionFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn MakeNot(this: *mut core::ffi::c_void, pcsub: *mut core::ffi::c_void, fsimplify: super::super::Foundation::BOOL, ppcresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IConditionFactory_Impl::MakeNot(this, windows_core::from_raw_borrowed(&pcsub), core::mem::transmute_copy(&fsimplify)) { + match IConditionFactory_Impl::MakeNot(this, core::mem::transmute_copy(&pcsub), core::mem::transmute_copy(&fsimplify)) { Ok(ok__) => { ppcresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6433,7 +6433,7 @@ impl IConditionFactory_Vtbl { } unsafe extern "system" fn MakeAndOr(this: *mut core::ffi::c_void, ct: Common::CONDITION_TYPE, peusubs: *mut core::ffi::c_void, fsimplify: super::super::Foundation::BOOL, ppcresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IConditionFactory_Impl::MakeAndOr(this, core::mem::transmute_copy(&ct), windows_core::from_raw_borrowed(&peusubs), core::mem::transmute_copy(&fsimplify)) { + match IConditionFactory_Impl::MakeAndOr(this, core::mem::transmute_copy(&ct), core::mem::transmute_copy(&peusubs), core::mem::transmute_copy(&fsimplify)) { Ok(ok__) => { ppcresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6443,7 +6443,7 @@ impl IConditionFactory_Vtbl { } unsafe extern "system" fn MakeLeaf(this: *mut core::ffi::c_void, pszpropertyname: windows_core::PCWSTR, cop: Common::CONDITION_OPERATION, pszvaluetype: windows_core::PCWSTR, ppropvar: *const super::Com::StructuredStorage::PROPVARIANT, ppropertynameterm: *mut core::ffi::c_void, poperationterm: *mut core::ffi::c_void, pvalueterm: *mut core::ffi::c_void, fexpand: super::super::Foundation::BOOL, ppcresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IConditionFactory_Impl::MakeLeaf(this, core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&cop), core::mem::transmute(&pszvaluetype), core::mem::transmute_copy(&ppropvar), windows_core::from_raw_borrowed(&ppropertynameterm), windows_core::from_raw_borrowed(&poperationterm), windows_core::from_raw_borrowed(&pvalueterm), core::mem::transmute_copy(&fexpand)) { + match IConditionFactory_Impl::MakeLeaf(this, core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&cop), core::mem::transmute(&pszvaluetype), core::mem::transmute_copy(&ppropvar), core::mem::transmute_copy(&ppropertynameterm), core::mem::transmute_copy(&poperationterm), core::mem::transmute_copy(&pvalueterm), core::mem::transmute_copy(&fexpand)) { Ok(ok__) => { ppcresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6453,7 +6453,7 @@ impl IConditionFactory_Vtbl { } unsafe extern "system" fn Resolve(this: *mut core::ffi::c_void, pc: *mut core::ffi::c_void, sqro: STRUCTURED_QUERY_RESOLVE_OPTION, pstreferencetime: *const super::super::Foundation::SYSTEMTIME, ppcresolved: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IConditionFactory_Impl::Resolve(this, windows_core::from_raw_borrowed(&pc), core::mem::transmute_copy(&sqro), core::mem::transmute_copy(&pstreferencetime)) { + match IConditionFactory_Impl::Resolve(this, core::mem::transmute_copy(&pc), core::mem::transmute_copy(&sqro), core::mem::transmute_copy(&pstreferencetime)) { Ok(ok__) => { ppcresolved.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6606,14 +6606,14 @@ pub struct IConditionFactory2_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] pub trait IConditionFactory2_Impl: IConditionFactory_Impl { fn CreateTrueFalse(&self, fval: super::super::Foundation::BOOL, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateNegation(&self, pcsub: Option<&ICondition>, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateCompoundFromObjectArray(&self, ct: Common::CONDITION_TYPE, poasubs: Option<&super::super::UI::Shell::Common::IObjectArray>, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateNegation(&self, pcsub: windows_core::Ref<'_, ICondition>, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateCompoundFromObjectArray(&self, ct: Common::CONDITION_TYPE, poasubs: windows_core::Ref<'_, super::super::UI::Shell::Common::IObjectArray>, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateCompoundFromArray(&self, ct: Common::CONDITION_TYPE, ppcondsubs: *const Option, csubs: u32, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateStringLeaf(&self, propkey: *const super::super::Foundation::PROPERTYKEY, cop: Common::CONDITION_OPERATION, pszvalue: &windows_core::PCWSTR, pszlocalename: &windows_core::PCWSTR, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateIntegerLeaf(&self, propkey: *const super::super::Foundation::PROPERTYKEY, cop: Common::CONDITION_OPERATION, lvalue: i32, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CreateBooleanLeaf(&self, propkey: *const super::super::Foundation::PROPERTYKEY, cop: Common::CONDITION_OPERATION, fvalue: super::super::Foundation::BOOL, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateLeaf(&self, propkey: *const super::super::Foundation::PROPERTYKEY, cop: Common::CONDITION_OPERATION, propvar: *const super::Com::StructuredStorage::PROPVARIANT, pszsemantictype: &windows_core::PCWSTR, pszlocalename: &windows_core::PCWSTR, ppropertynameterm: Option<&IRichChunk>, poperationterm: Option<&IRichChunk>, pvalueterm: Option<&IRichChunk>, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn ResolveCondition(&self, pc: Option<&ICondition>, sqro: STRUCTURED_QUERY_RESOLVE_OPTION, pstreferencetime: *const super::super::Foundation::SYSTEMTIME, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateLeaf(&self, propkey: *const super::super::Foundation::PROPERTYKEY, cop: Common::CONDITION_OPERATION, propvar: *const super::Com::StructuredStorage::PROPVARIANT, pszsemantictype: &windows_core::PCWSTR, pszlocalename: &windows_core::PCWSTR, ppropertynameterm: windows_core::Ref<'_, IRichChunk>, poperationterm: windows_core::Ref<'_, IRichChunk>, pvalueterm: windows_core::Ref<'_, IRichChunk>, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ResolveCondition(&self, pc: windows_core::Ref<'_, ICondition>, sqro: STRUCTURED_QUERY_RESOLVE_OPTION, pstreferencetime: *const super::super::Foundation::SYSTEMTIME, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] impl IConditionFactory2_Vtbl { @@ -6624,11 +6624,11 @@ impl IConditionFactory2_Vtbl { } unsafe extern "system" fn CreateNegation(this: *mut core::ffi::c_void, pcsub: *mut core::ffi::c_void, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConditionFactory2_Impl::CreateNegation(this, windows_core::from_raw_borrowed(&pcsub), core::mem::transmute_copy(&cco), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IConditionFactory2_Impl::CreateNegation(this, core::mem::transmute_copy(&pcsub), core::mem::transmute_copy(&cco), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn CreateCompoundFromObjectArray(this: *mut core::ffi::c_void, ct: Common::CONDITION_TYPE, poasubs: *mut core::ffi::c_void, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConditionFactory2_Impl::CreateCompoundFromObjectArray(this, core::mem::transmute_copy(&ct), windows_core::from_raw_borrowed(&poasubs), core::mem::transmute_copy(&cco), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IConditionFactory2_Impl::CreateCompoundFromObjectArray(this, core::mem::transmute_copy(&ct), core::mem::transmute_copy(&poasubs), core::mem::transmute_copy(&cco), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn CreateCompoundFromArray(this: *mut core::ffi::c_void, ct: Common::CONDITION_TYPE, ppcondsubs: *const *mut core::ffi::c_void, csubs: u32, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6648,11 +6648,11 @@ impl IConditionFactory2_Vtbl { } unsafe extern "system" fn CreateLeaf(this: *mut core::ffi::c_void, propkey: *const super::super::Foundation::PROPERTYKEY, cop: Common::CONDITION_OPERATION, propvar: *const super::Com::StructuredStorage::PROPVARIANT, pszsemantictype: windows_core::PCWSTR, pszlocalename: windows_core::PCWSTR, ppropertynameterm: *mut core::ffi::c_void, poperationterm: *mut core::ffi::c_void, pvalueterm: *mut core::ffi::c_void, cco: CONDITION_CREATION_OPTIONS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConditionFactory2_Impl::CreateLeaf(this, core::mem::transmute_copy(&propkey), core::mem::transmute_copy(&cop), core::mem::transmute_copy(&propvar), core::mem::transmute(&pszsemantictype), core::mem::transmute(&pszlocalename), windows_core::from_raw_borrowed(&ppropertynameterm), windows_core::from_raw_borrowed(&poperationterm), windows_core::from_raw_borrowed(&pvalueterm), core::mem::transmute_copy(&cco), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IConditionFactory2_Impl::CreateLeaf(this, core::mem::transmute_copy(&propkey), core::mem::transmute_copy(&cop), core::mem::transmute_copy(&propvar), core::mem::transmute(&pszsemantictype), core::mem::transmute(&pszlocalename), core::mem::transmute_copy(&ppropertynameterm), core::mem::transmute_copy(&poperationterm), core::mem::transmute_copy(&pvalueterm), core::mem::transmute_copy(&cco), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn ResolveCondition(this: *mut core::ffi::c_void, pc: *mut core::ffi::c_void, sqro: STRUCTURED_QUERY_RESOLVE_OPTION, pstreferencetime: *const super::super::Foundation::SYSTEMTIME, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConditionFactory2_Impl::ResolveCondition(this, windows_core::from_raw_borrowed(&pc), core::mem::transmute_copy(&sqro), core::mem::transmute_copy(&pstreferencetime), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IConditionFactory2_Impl::ResolveCondition(this, core::mem::transmute_copy(&pc), core::mem::transmute_copy(&sqro), core::mem::transmute_copy(&pstreferencetime), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: IConditionFactory_Vtbl::new::(), @@ -6729,9 +6729,9 @@ pub struct IConditionGenerator_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] pub trait IConditionGenerator_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pschemaprovider: Option<&ISchemaProvider>) -> windows_core::Result<()>; - fn RecognizeNamedEntities(&self, pszinputstring: &windows_core::PCWSTR, lciduserlocale: u32, ptokencollection: Option<&ITokenCollection>, pnamedentities: Option<&INamedEntityCollector>) -> windows_core::Result<()>; - fn GenerateForLeaf(&self, pconditionfactory: Option<&IConditionFactory>, pszpropertyname: &windows_core::PCWSTR, cop: Common::CONDITION_OPERATION, pszvaluetype: &windows_core::PCWSTR, pszvalue: &windows_core::PCWSTR, pszvalue2: &windows_core::PCWSTR, ppropertynameterm: Option<&IRichChunk>, poperationterm: Option<&IRichChunk>, pvalueterm: Option<&IRichChunk>, automaticwildcard: super::super::Foundation::BOOL, pnostringquery: *mut super::super::Foundation::BOOL) -> windows_core::Result; + fn Initialize(&self, pschemaprovider: windows_core::Ref<'_, ISchemaProvider>) -> windows_core::Result<()>; + fn RecognizeNamedEntities(&self, pszinputstring: &windows_core::PCWSTR, lciduserlocale: u32, ptokencollection: windows_core::Ref<'_, ITokenCollection>, pnamedentities: windows_core::Ref<'_, INamedEntityCollector>) -> windows_core::Result<()>; + fn GenerateForLeaf(&self, pconditionfactory: windows_core::Ref<'_, IConditionFactory>, pszpropertyname: &windows_core::PCWSTR, cop: Common::CONDITION_OPERATION, pszvaluetype: &windows_core::PCWSTR, pszvalue: &windows_core::PCWSTR, pszvalue2: &windows_core::PCWSTR, ppropertynameterm: windows_core::Ref<'_, IRichChunk>, poperationterm: windows_core::Ref<'_, IRichChunk>, pvalueterm: windows_core::Ref<'_, IRichChunk>, automaticwildcard: super::super::Foundation::BOOL, pnostringquery: *mut super::super::Foundation::BOOL) -> windows_core::Result; fn DefaultPhrase(&self, pszvaluetype: &windows_core::PCWSTR, ppropvar: *const super::Com::StructuredStorage::PROPVARIANT, fuseenglish: super::super::Foundation::BOOL, ppszphrase: *mut windows_core::PWSTR) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] @@ -6739,15 +6739,15 @@ impl IConditionGenerator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pschemaprovider: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConditionGenerator_Impl::Initialize(this, windows_core::from_raw_borrowed(&pschemaprovider)).into() + IConditionGenerator_Impl::Initialize(this, core::mem::transmute_copy(&pschemaprovider)).into() } unsafe extern "system" fn RecognizeNamedEntities(this: *mut core::ffi::c_void, pszinputstring: windows_core::PCWSTR, lciduserlocale: u32, ptokencollection: *mut core::ffi::c_void, pnamedentities: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConditionGenerator_Impl::RecognizeNamedEntities(this, core::mem::transmute(&pszinputstring), core::mem::transmute_copy(&lciduserlocale), windows_core::from_raw_borrowed(&ptokencollection), windows_core::from_raw_borrowed(&pnamedentities)).into() + IConditionGenerator_Impl::RecognizeNamedEntities(this, core::mem::transmute(&pszinputstring), core::mem::transmute_copy(&lciduserlocale), core::mem::transmute_copy(&ptokencollection), core::mem::transmute_copy(&pnamedentities)).into() } unsafe extern "system" fn GenerateForLeaf(this: *mut core::ffi::c_void, pconditionfactory: *mut core::ffi::c_void, pszpropertyname: windows_core::PCWSTR, cop: Common::CONDITION_OPERATION, pszvaluetype: windows_core::PCWSTR, pszvalue: windows_core::PCWSTR, pszvalue2: windows_core::PCWSTR, ppropertynameterm: *mut core::ffi::c_void, poperationterm: *mut core::ffi::c_void, pvalueterm: *mut core::ffi::c_void, automaticwildcard: super::super::Foundation::BOOL, pnostringquery: *mut super::super::Foundation::BOOL, ppqueryexpression: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IConditionGenerator_Impl::GenerateForLeaf(this, windows_core::from_raw_borrowed(&pconditionfactory), core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&cop), core::mem::transmute(&pszvaluetype), core::mem::transmute(&pszvalue), core::mem::transmute(&pszvalue2), windows_core::from_raw_borrowed(&ppropertynameterm), windows_core::from_raw_borrowed(&poperationterm), windows_core::from_raw_borrowed(&pvalueterm), core::mem::transmute_copy(&automaticwildcard), core::mem::transmute_copy(&pnostringquery)) { + match IConditionGenerator_Impl::GenerateForLeaf(this, core::mem::transmute_copy(&pconditionfactory), core::mem::transmute(&pszpropertyname), core::mem::transmute_copy(&cop), core::mem::transmute(&pszvaluetype), core::mem::transmute(&pszvalue), core::mem::transmute(&pszvalue2), core::mem::transmute_copy(&ppropertynameterm), core::mem::transmute_copy(&poperationterm), core::mem::transmute_copy(&pvalueterm), core::mem::transmute_copy(&automaticwildcard), core::mem::transmute_copy(&pnostringquery)) { Ok(ok__) => { ppqueryexpression.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6824,14 +6824,14 @@ pub struct ICreateRow_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ICreateRow_Impl: windows_core::IUnknownImpl { - fn CreateRow(&self, punkouter: Option<&windows_core::IUnknown>, pwszurl: &windows_core::PCWSTR, dwbindurlflags: u32, rguid: *const windows_core::GUID, riid: *const windows_core::GUID, pauthenticate: Option<&super::Com::IAuthenticate>, pimplsession: *mut DBIMPLICITSESSION, pdwbindstatus: *mut u32, ppwsznewurl: *mut windows_core::PWSTR, ppunk: *mut Option) -> windows_core::Result<()>; + fn CreateRow(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, pwszurl: &windows_core::PCWSTR, dwbindurlflags: u32, rguid: *const windows_core::GUID, riid: *const windows_core::GUID, pauthenticate: windows_core::Ref<'_, super::Com::IAuthenticate>, pimplsession: *mut DBIMPLICITSESSION, pdwbindstatus: *mut u32, ppwsznewurl: *mut windows_core::PWSTR, ppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ICreateRow_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateRow(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, pwszurl: windows_core::PCWSTR, dwbindurlflags: u32, rguid: *const windows_core::GUID, riid: *const windows_core::GUID, pauthenticate: *mut core::ffi::c_void, pimplsession: *mut DBIMPLICITSESSION, pdwbindstatus: *mut u32, ppwsznewurl: *mut windows_core::PWSTR, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICreateRow_Impl::CreateRow(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwbindurlflags), core::mem::transmute_copy(&rguid), core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&pauthenticate), core::mem::transmute_copy(&pimplsession), core::mem::transmute_copy(&pdwbindstatus), core::mem::transmute_copy(&ppwsznewurl), core::mem::transmute_copy(&ppunk)).into() + ICreateRow_Impl::CreateRow(this, core::mem::transmute_copy(&punkouter), core::mem::transmute(&pwszurl), core::mem::transmute_copy(&dwbindurlflags), core::mem::transmute_copy(&rguid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pauthenticate), core::mem::transmute_copy(&pimplsession), core::mem::transmute_copy(&pdwbindstatus), core::mem::transmute_copy(&ppwsznewurl), core::mem::transmute_copy(&ppunk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreateRow: CreateRow:: } } @@ -6989,13 +6989,13 @@ pub struct IDBCreateCommand_Vtbl { pub CreateCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDBCreateCommand_Impl: windows_core::IUnknownImpl { - fn CreateCommand(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; + fn CreateCommand(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; } impl IDBCreateCommand_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateCommand(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppcommand: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDBCreateCommand_Impl::CreateCommand(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid)) { + match IDBCreateCommand_Impl::CreateCommand(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppcommand.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7027,13 +7027,13 @@ pub struct IDBCreateSession_Vtbl { pub CreateSession: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDBCreateSession_Impl: windows_core::IUnknownImpl { - fn CreateSession(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; + fn CreateSession(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; } impl IDBCreateSession_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateSession(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppdbsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDBCreateSession_Impl::CreateSession(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid)) { + match IDBCreateSession_Impl::CreateSession(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppdbsession.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7089,7 +7089,7 @@ pub struct IDBDataSourceAdmin_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDBDataSourceAdmin_Impl: windows_core::IUnknownImpl { - fn CreateDataSource(&self, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, ppdbsession: *mut Option) -> windows_core::Result<()>; + fn CreateDataSource(&self, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, ppdbsession: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn DestroyDataSource(&self) -> windows_core::Result<()>; fn GetCreationProperties(&self, cpropertyidsets: u32, rgpropertyidsets: *const DBPROPIDSET, pcpropertyinfosets: *mut u32, prgpropertyinfosets: *mut *mut DBPROPINFOSET, ppdescbuffer: *mut *mut u16) -> windows_core::Result<()>; fn ModifyDataSource(&self, cpropertysets: u32, rgpropertysets: *mut DBPROPSET) -> windows_core::Result<()>; @@ -7099,7 +7099,7 @@ impl IDBDataSourceAdmin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDataSource(this: *mut core::ffi::c_void, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppdbsession: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDBDataSourceAdmin_Impl::CreateDataSource(this, core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppdbsession)).into() + IDBDataSourceAdmin_Impl::CreateDataSource(this, core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppdbsession)).into() } unsafe extern "system" fn DestroyDataSource(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7242,14 +7242,14 @@ pub struct IDBPromptInitialize_Vtbl { pub PromptFileName: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HWND, u32, windows_core::PCWSTR, windows_core::PCWSTR, *mut windows_core::PWSTR) -> windows_core::HRESULT, } pub trait IDBPromptInitialize_Impl: windows_core::IUnknownImpl { - fn PromptDataSource(&self, punkouter: Option<&windows_core::IUnknown>, hwndparent: super::super::Foundation::HWND, dwpromptoptions: u32, csourcetypefilter: u32, rgsourcetypefilter: *const u32, pwszszzproviderfilter: &windows_core::PCWSTR, riid: *const windows_core::GUID, ppdatasource: *mut Option) -> windows_core::Result<()>; + fn PromptDataSource(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, hwndparent: super::super::Foundation::HWND, dwpromptoptions: u32, csourcetypefilter: u32, rgsourcetypefilter: *const u32, pwszszzproviderfilter: &windows_core::PCWSTR, riid: *const windows_core::GUID, ppdatasource: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn PromptFileName(&self, hwndparent: super::super::Foundation::HWND, dwpromptoptions: u32, pwszinitialdirectory: &windows_core::PCWSTR, pwszinitialfile: &windows_core::PCWSTR) -> windows_core::Result; } impl IDBPromptInitialize_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PromptDataSource(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, dwpromptoptions: u32, csourcetypefilter: u32, rgsourcetypefilter: *const u32, pwszszzproviderfilter: windows_core::PCWSTR, riid: *const windows_core::GUID, ppdatasource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDBPromptInitialize_Impl::PromptDataSource(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&dwpromptoptions), core::mem::transmute_copy(&csourcetypefilter), core::mem::transmute_copy(&rgsourcetypefilter), core::mem::transmute(&pwszszzproviderfilter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppdatasource)).into() + IDBPromptInitialize_Impl::PromptDataSource(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&dwpromptoptions), core::mem::transmute_copy(&csourcetypefilter), core::mem::transmute_copy(&rgsourcetypefilter), core::mem::transmute(&pwszszzproviderfilter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppdatasource)).into() } unsafe extern "system" fn PromptFileName(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, dwpromptoptions: u32, pwszinitialdirectory: windows_core::PCWSTR, pwszinitialfile: windows_core::PCWSTR, ppwszselectedfile: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7359,14 +7359,14 @@ pub struct IDBSchemaCommand_Vtbl { pub GetSchemas: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32, *mut *mut windows_core::GUID) -> windows_core::HRESULT, } pub trait IDBSchemaCommand_Impl: windows_core::IUnknownImpl { - fn GetCommand(&self, punkouter: Option<&windows_core::IUnknown>, rguidschema: *const windows_core::GUID) -> windows_core::Result; + fn GetCommand(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, rguidschema: *const windows_core::GUID) -> windows_core::Result; fn GetSchemas(&self, pcschemas: *mut u32, prgschemas: *mut *mut windows_core::GUID) -> windows_core::Result<()>; } impl IDBSchemaCommand_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetCommand(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, rguidschema: *const windows_core::GUID, ppcommand: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDBSchemaCommand_Impl::GetCommand(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&rguidschema)) { + match IDBSchemaCommand_Impl::GetCommand(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&rguidschema)) { Ok(ok__) => { ppcommand.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7414,7 +7414,7 @@ pub struct IDBSchemaRowset_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDBSchemaRowset_Impl: windows_core::IUnknownImpl { - fn GetRowset(&self, punkouter: Option<&windows_core::IUnknown>, rguidschema: *const windows_core::GUID, crestrictions: u32, rgrestrictions: *const super::Variant::VARIANT, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut Option) -> windows_core::Result<()>; + fn GetRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, rguidschema: *const windows_core::GUID, crestrictions: u32, rgrestrictions: *const super::Variant::VARIANT, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetSchemas(&self, pcschemas: *mut u32, prgschemas: *mut *mut windows_core::GUID, prgrestrictionsupport: *mut *mut u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -7422,7 +7422,7 @@ impl IDBSchemaRowset_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, rguidschema: *const windows_core::GUID, crestrictions: u32, rgrestrictions: *const super::Variant::VARIANT, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDBSchemaRowset_Impl::GetRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&rguidschema), core::mem::transmute_copy(&crestrictions), core::mem::transmute_copy(&rgrestrictions), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() + IDBSchemaRowset_Impl::GetRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&rguidschema), core::mem::transmute_copy(&crestrictions), core::mem::transmute_copy(&rgrestrictions), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() } unsafe extern "system" fn GetSchemas(this: *mut core::ffi::c_void, pcschemas: *mut u32, prgschemas: *mut *mut windows_core::GUID, prgrestrictionsupport: *mut *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7667,10 +7667,10 @@ pub struct IDataInitialize_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IDataInitialize_Impl: windows_core::IUnknownImpl { - fn GetDataSource(&self, punkouter: Option<&windows_core::IUnknown>, dwclsctx: u32, pwszinitializationstring: &windows_core::PCWSTR, riid: *const windows_core::GUID, ppdatasource: *mut Option) -> windows_core::Result<()>; - fn GetInitializationString(&self, pdatasource: Option<&windows_core::IUnknown>, fincludepassword: u8) -> windows_core::Result; - fn CreateDBInstance(&self, clsidprovider: *const windows_core::GUID, punkouter: Option<&windows_core::IUnknown>, dwclsctx: u32, pwszreserved: &windows_core::PCWSTR, riid: *const windows_core::GUID) -> windows_core::Result; - fn CreateDBInstanceEx(&self, clsidprovider: *const windows_core::GUID, punkouter: Option<&windows_core::IUnknown>, dwclsctx: u32, pwszreserved: &windows_core::PCWSTR, pserverinfo: *const super::Com::COSERVERINFO, cmq: u32, rgmqresults: *mut super::Com::MULTI_QI) -> windows_core::Result<()>; + fn GetDataSource(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, dwclsctx: u32, pwszinitializationstring: &windows_core::PCWSTR, riid: *const windows_core::GUID, ppdatasource: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetInitializationString(&self, pdatasource: windows_core::Ref<'_, windows_core::IUnknown>, fincludepassword: u8) -> windows_core::Result; + fn CreateDBInstance(&self, clsidprovider: *const windows_core::GUID, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, dwclsctx: u32, pwszreserved: &windows_core::PCWSTR, riid: *const windows_core::GUID) -> windows_core::Result; + fn CreateDBInstanceEx(&self, clsidprovider: *const windows_core::GUID, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, dwclsctx: u32, pwszreserved: &windows_core::PCWSTR, pserverinfo: *const super::Com::COSERVERINFO, cmq: u32, rgmqresults: *mut super::Com::MULTI_QI) -> windows_core::Result<()>; fn LoadStringFromStorage(&self, pwszfilename: &windows_core::PCWSTR) -> windows_core::Result; fn WriteStringToStorage(&self, pwszfilename: &windows_core::PCWSTR, pwszinitializationstring: &windows_core::PCWSTR, dwcreationdisposition: u32) -> windows_core::Result<()>; } @@ -7679,11 +7679,11 @@ impl IDataInitialize_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetDataSource(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, dwclsctx: u32, pwszinitializationstring: windows_core::PCWSTR, riid: *const windows_core::GUID, ppdatasource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataInitialize_Impl::GetDataSource(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&dwclsctx), core::mem::transmute(&pwszinitializationstring), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppdatasource)).into() + IDataInitialize_Impl::GetDataSource(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&dwclsctx), core::mem::transmute(&pwszinitializationstring), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppdatasource)).into() } unsafe extern "system" fn GetInitializationString(this: *mut core::ffi::c_void, pdatasource: *mut core::ffi::c_void, fincludepassword: u8, ppwszinitstring: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataInitialize_Impl::GetInitializationString(this, windows_core::from_raw_borrowed(&pdatasource), core::mem::transmute_copy(&fincludepassword)) { + match IDataInitialize_Impl::GetInitializationString(this, core::mem::transmute_copy(&pdatasource), core::mem::transmute_copy(&fincludepassword)) { Ok(ok__) => { ppwszinitstring.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7693,7 +7693,7 @@ impl IDataInitialize_Vtbl { } unsafe extern "system" fn CreateDBInstance(this: *mut core::ffi::c_void, clsidprovider: *const windows_core::GUID, punkouter: *mut core::ffi::c_void, dwclsctx: u32, pwszreserved: windows_core::PCWSTR, riid: *const windows_core::GUID, ppdatasource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDataInitialize_Impl::CreateDBInstance(this, core::mem::transmute_copy(&clsidprovider), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&dwclsctx), core::mem::transmute(&pwszreserved), core::mem::transmute_copy(&riid)) { + match IDataInitialize_Impl::CreateDBInstance(this, core::mem::transmute_copy(&clsidprovider), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&dwclsctx), core::mem::transmute(&pwszreserved), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppdatasource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7703,7 +7703,7 @@ impl IDataInitialize_Vtbl { } unsafe extern "system" fn CreateDBInstanceEx(this: *mut core::ffi::c_void, clsidprovider: *const windows_core::GUID, punkouter: *mut core::ffi::c_void, dwclsctx: u32, pwszreserved: windows_core::PCWSTR, pserverinfo: *const super::Com::COSERVERINFO, cmq: u32, rgmqresults: *mut super::Com::MULTI_QI) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataInitialize_Impl::CreateDBInstanceEx(this, core::mem::transmute_copy(&clsidprovider), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&dwclsctx), core::mem::transmute(&pwszreserved), core::mem::transmute_copy(&pserverinfo), core::mem::transmute_copy(&cmq), core::mem::transmute_copy(&rgmqresults)).into() + IDataInitialize_Impl::CreateDBInstanceEx(this, core::mem::transmute_copy(&clsidprovider), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&dwclsctx), core::mem::transmute(&pwszreserved), core::mem::transmute_copy(&pserverinfo), core::mem::transmute_copy(&cmq), core::mem::transmute_copy(&rgmqresults)).into() } unsafe extern "system" fn LoadStringFromStorage(this: *mut core::ffi::c_void, pwszfilename: windows_core::PCWSTR, ppwszinitializationstring: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7777,7 +7777,7 @@ pub trait IDataSourceLocator_Impl: super::Com::IDispatch_Impl { fn hWnd(&self) -> windows_core::Result; fn SethWnd(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()>; fn PromptNew(&self) -> windows_core::Result; - fn PromptEdit(&self, ppadoconnection: *mut Option, pbsuccess: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn PromptEdit(&self, ppadoconnection: windows_core::OutRef<'_, super::Com::IDispatch>, pbsuccess: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IDataSourceLocator_Vtbl { @@ -8082,7 +8082,7 @@ pub struct IEnumSearchRoots_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumSearchRoots_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, ISearchRoot>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -8150,7 +8150,7 @@ pub struct IEnumSearchScopeRules_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumSearchScopeRules_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, pprgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, pprgelt: windows_core::OutRef<'_, ISearchScopeRule>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -8388,7 +8388,7 @@ pub struct IErrorRecords_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IErrorRecords_Impl: windows_core::IUnknownImpl { - fn AddErrorRecord(&self, perrorinfo: *const ERRORINFO, dwlookupid: u32, pdispparams: *const super::Com::DISPPARAMS, punkcustomerror: Option<&windows_core::IUnknown>, dwdynamicerrorid: u32) -> windows_core::Result<()>; + fn AddErrorRecord(&self, perrorinfo: *const ERRORINFO, dwlookupid: u32, pdispparams: *const super::Com::DISPPARAMS, punkcustomerror: windows_core::Ref<'_, windows_core::IUnknown>, dwdynamicerrorid: u32) -> windows_core::Result<()>; fn GetBasicErrorInfo(&self, ulrecordnum: u32, perrorinfo: *mut ERRORINFO) -> windows_core::Result<()>; fn GetCustomErrorObject(&self, ulrecordnum: u32, riid: *const windows_core::GUID) -> windows_core::Result; fn GetErrorInfo(&self, ulrecordnum: u32, lcid: u32) -> windows_core::Result; @@ -8400,7 +8400,7 @@ impl IErrorRecords_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddErrorRecord(this: *mut core::ffi::c_void, perrorinfo: *const ERRORINFO, dwlookupid: u32, pdispparams: *const super::Com::DISPPARAMS, punkcustomerror: *mut core::ffi::c_void, dwdynamicerrorid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IErrorRecords_Impl::AddErrorRecord(this, core::mem::transmute_copy(&perrorinfo), core::mem::transmute_copy(&dwlookupid), core::mem::transmute_copy(&pdispparams), windows_core::from_raw_borrowed(&punkcustomerror), core::mem::transmute_copy(&dwdynamicerrorid)).into() + IErrorRecords_Impl::AddErrorRecord(this, core::mem::transmute_copy(&perrorinfo), core::mem::transmute_copy(&dwlookupid), core::mem::transmute_copy(&pdispparams), core::mem::transmute_copy(&punkcustomerror), core::mem::transmute_copy(&dwdynamicerrorid)).into() } unsafe extern "system" fn GetBasicErrorInfo(this: *mut core::ffi::c_void, ulrecordnum: u32, perrorinfo: *mut ERRORINFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8519,14 +8519,14 @@ pub struct IGetRow_Vtbl { pub GetURLFromHROW: unsafe extern "system" fn(*mut core::ffi::c_void, usize, *mut windows_core::PWSTR) -> windows_core::HRESULT, } pub trait IGetRow_Impl: windows_core::IUnknownImpl { - fn GetRowFromHROW(&self, punkouter: Option<&windows_core::IUnknown>, hrow: usize, riid: *const windows_core::GUID) -> windows_core::Result; + fn GetRowFromHROW(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, hrow: usize, riid: *const windows_core::GUID) -> windows_core::Result; fn GetURLFromHROW(&self, hrow: usize) -> windows_core::Result; } impl IGetRow_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetRowFromHROW(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, hrow: usize, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGetRow_Impl::GetRowFromHROW(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&hrow), core::mem::transmute_copy(&riid)) { + match IGetRow_Impl::GetRowFromHROW(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&hrow), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppunk.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8763,24 +8763,24 @@ pub struct ILoadFilter_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com_StructuredStorage"))] pub trait ILoadFilter_Impl: windows_core::IUnknownImpl { - fn LoadIFilter(&self, pwcspath: &windows_core::PCWSTR, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: Option<&windows_core::IUnknown>, fusedefault: super::super::Foundation::BOOL, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()>; - fn LoadIFilterFromStorage(&self, pstg: Option<&super::Com::StructuredStorage::IStorage>, punkouter: Option<&windows_core::IUnknown>, pwcsoverride: &windows_core::PCWSTR, fusedefault: super::super::Foundation::BOOL, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()>; - fn LoadIFilterFromStream(&self, pstm: Option<&super::Com::IStream>, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: Option<&windows_core::IUnknown>, fusedefault: super::super::Foundation::BOOL, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut Option) -> windows_core::Result<()>; + fn LoadIFilter(&self, pwcspath: &windows_core::PCWSTR, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, fusedefault: super::super::Foundation::BOOL, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: windows_core::OutRef<'_, super::super::Storage::IndexServer::IFilter>) -> windows_core::Result<()>; + fn LoadIFilterFromStorage(&self, pstg: windows_core::Ref<'_, super::Com::StructuredStorage::IStorage>, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, pwcsoverride: &windows_core::PCWSTR, fusedefault: super::super::Foundation::BOOL, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: windows_core::OutRef<'_, super::super::Storage::IndexServer::IFilter>) -> windows_core::Result<()>; + fn LoadIFilterFromStream(&self, pstm: windows_core::Ref<'_, super::Com::IStream>, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, fusedefault: super::super::Foundation::BOOL, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: windows_core::OutRef<'_, super::super::Storage::IndexServer::IFilter>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com_StructuredStorage"))] impl ILoadFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn LoadIFilter(this: *mut core::ffi::c_void, pwcspath: windows_core::PCWSTR, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: *mut core::ffi::c_void, fusedefault: super::super::Foundation::BOOL, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoadFilter_Impl::LoadIFilter(this, core::mem::transmute(&pwcspath), core::mem::transmute_copy(&pfilteredsources), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&fusedefault), core::mem::transmute_copy(&pfilterclsid), core::mem::transmute_copy(&searchdecsize), core::mem::transmute_copy(&pwcssearchdesc), core::mem::transmute_copy(&ppifilt)).into() + ILoadFilter_Impl::LoadIFilter(this, core::mem::transmute(&pwcspath), core::mem::transmute_copy(&pfilteredsources), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&fusedefault), core::mem::transmute_copy(&pfilterclsid), core::mem::transmute_copy(&searchdecsize), core::mem::transmute_copy(&pwcssearchdesc), core::mem::transmute_copy(&ppifilt)).into() } unsafe extern "system" fn LoadIFilterFromStorage(this: *mut core::ffi::c_void, pstg: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, pwcsoverride: windows_core::PCWSTR, fusedefault: super::super::Foundation::BOOL, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoadFilter_Impl::LoadIFilterFromStorage(this, windows_core::from_raw_borrowed(&pstg), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute(&pwcsoverride), core::mem::transmute_copy(&fusedefault), core::mem::transmute_copy(&pfilterclsid), core::mem::transmute_copy(&searchdecsize), core::mem::transmute_copy(&pwcssearchdesc), core::mem::transmute_copy(&ppifilt)).into() + ILoadFilter_Impl::LoadIFilterFromStorage(this, core::mem::transmute_copy(&pstg), core::mem::transmute_copy(&punkouter), core::mem::transmute(&pwcsoverride), core::mem::transmute_copy(&fusedefault), core::mem::transmute_copy(&pfilterclsid), core::mem::transmute_copy(&searchdecsize), core::mem::transmute_copy(&pwcssearchdesc), core::mem::transmute_copy(&ppifilt)).into() } unsafe extern "system" fn LoadIFilterFromStream(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void, pfilteredsources: *const FILTERED_DATA_SOURCES, punkouter: *mut core::ffi::c_void, fusedefault: super::super::Foundation::BOOL, pfilterclsid: *mut windows_core::GUID, searchdecsize: *mut i32, pwcssearchdesc: *mut *mut u16, ppifilt: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoadFilter_Impl::LoadIFilterFromStream(this, windows_core::from_raw_borrowed(&pstm), core::mem::transmute_copy(&pfilteredsources), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&fusedefault), core::mem::transmute_copy(&pfilterclsid), core::mem::transmute_copy(&searchdecsize), core::mem::transmute_copy(&pwcssearchdesc), core::mem::transmute_copy(&ppifilt)).into() + ILoadFilter_Impl::LoadIFilterFromStream(this, core::mem::transmute_copy(&pstm), core::mem::transmute_copy(&pfilteredsources), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&fusedefault), core::mem::transmute_copy(&pfilterclsid), core::mem::transmute_copy(&searchdecsize), core::mem::transmute_copy(&pwcssearchdesc), core::mem::transmute_copy(&ppifilt)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -8819,7 +8819,7 @@ pub struct ILoadFilterWithPrivateComActivation_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com_StructuredStorage"))] pub trait ILoadFilterWithPrivateComActivation_Impl: ILoadFilter_Impl { - fn LoadIFilterWithPrivateComActivation(&self, filteredsources: *const FILTERED_DATA_SOURCES, usedefault: super::super::Foundation::BOOL, filterclsid: *mut windows_core::GUID, isfilterprivatecomactivated: *mut super::super::Foundation::BOOL, filterobj: *mut Option) -> windows_core::Result<()>; + fn LoadIFilterWithPrivateComActivation(&self, filteredsources: *const FILTERED_DATA_SOURCES, usedefault: super::super::Foundation::BOOL, filterclsid: *mut windows_core::GUID, isfilterprivatecomactivated: *mut super::super::Foundation::BOOL, filterobj: windows_core::OutRef<'_, super::super::Storage::IndexServer::IFilter>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com_StructuredStorage"))] impl ILoadFilterWithPrivateComActivation_Vtbl { @@ -8879,7 +8879,7 @@ pub struct IMDDataset_Vtbl { pub trait IMDDataset_Impl: windows_core::IUnknownImpl { fn FreeAxisInfo(&self, caxes: usize, rgaxisinfo: *const MDAXISINFO) -> windows_core::Result<()>; fn GetAxisInfo(&self, pcaxes: *mut usize, prgaxisinfo: *mut *mut MDAXISINFO) -> windows_core::Result<()>; - fn GetAxisRowset(&self, punkouter: Option<&windows_core::IUnknown>, iaxis: usize, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut Option) -> windows_core::Result<()>; + fn GetAxisRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, iaxis: usize, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetCellData(&self, haccessor: HACCESSOR, ulstartcell: usize, ulendcell: usize, pdata: *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetSpecification(&self, riid: *const windows_core::GUID) -> windows_core::Result; } @@ -8896,7 +8896,7 @@ impl IMDDataset_Vtbl { } unsafe extern "system" fn GetAxisRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, iaxis: usize, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMDDataset_Impl::GetAxisRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&iaxis), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() + IMDDataset_Impl::GetAxisRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&iaxis), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() } unsafe extern "system" fn GetCellData(this: *mut core::ffi::c_void, haccessor: HACCESSOR, ulstartcell: usize, ulendcell: usize, pdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8999,14 +8999,14 @@ pub struct IMDRangeRowset_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IMDRangeRowset_Impl: windows_core::IUnknownImpl { - fn GetRangeRowset(&self, punkouter: Option<&windows_core::IUnknown>, ulstartcell: usize, ulendcell: usize, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut Option) -> windows_core::Result<()>; + fn GetRangeRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, ulstartcell: usize, ulendcell: usize, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IMDRangeRowset_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetRangeRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, ulstartcell: usize, ulendcell: usize, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMDRangeRowset_Impl::GetRangeRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&ulstartcell), core::mem::transmute_copy(&ulendcell), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() + IMDRangeRowset_Impl::GetRangeRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&ulstartcell), core::mem::transmute_copy(&ulendcell), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), GetRangeRowset: GetRangeRowset:: } } @@ -9060,13 +9060,13 @@ pub struct IMultipleResults_Vtbl { pub GetResult: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, isize, *const windows_core::GUID, *mut isize, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMultipleResults_Impl: windows_core::IUnknownImpl { - fn GetResult(&self, punkouter: Option<&windows_core::IUnknown>, lresultflag: isize, riid: *const windows_core::GUID, pcrowsaffected: *mut isize, pprowset: *mut Option) -> windows_core::Result<()>; + fn GetResult(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, lresultflag: isize, riid: *const windows_core::GUID, pcrowsaffected: *mut isize, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IMultipleResults_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetResult(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, lresultflag: isize, riid: *const windows_core::GUID, pcrowsaffected: *mut isize, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMultipleResults_Impl::GetResult(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&lresultflag), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pcrowsaffected), core::mem::transmute_copy(&pprowset)).into() + IMultipleResults_Impl::GetResult(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&lresultflag), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pcrowsaffected), core::mem::transmute_copy(&pprowset)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), GetResult: GetResult:: } } @@ -9164,13 +9164,13 @@ pub struct INamedEntityCollector_Vtbl { pub Add: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32, u32, u32, *mut core::ffi::c_void, windows_core::PCWSTR, NAMED_ENTITY_CERTAINTY) -> windows_core::HRESULT, } pub trait INamedEntityCollector_Impl: windows_core::IUnknownImpl { - fn Add(&self, beginspan: u32, endspan: u32, beginactual: u32, endactual: u32, ptype: Option<&IEntity>, pszvalue: &windows_core::PCWSTR, certainty: NAMED_ENTITY_CERTAINTY) -> windows_core::Result<()>; + fn Add(&self, beginspan: u32, endspan: u32, beginactual: u32, endactual: u32, ptype: windows_core::Ref<'_, IEntity>, pszvalue: &windows_core::PCWSTR, certainty: NAMED_ENTITY_CERTAINTY) -> windows_core::Result<()>; } impl INamedEntityCollector_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Add(this: *mut core::ffi::c_void, beginspan: u32, endspan: u32, beginactual: u32, endactual: u32, ptype: *mut core::ffi::c_void, pszvalue: windows_core::PCWSTR, certainty: NAMED_ENTITY_CERTAINTY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INamedEntityCollector_Impl::Add(this, core::mem::transmute_copy(&beginspan), core::mem::transmute_copy(&endspan), core::mem::transmute_copy(&beginactual), core::mem::transmute_copy(&endactual), windows_core::from_raw_borrowed(&ptype), core::mem::transmute(&pszvalue), core::mem::transmute_copy(&certainty)).into() + INamedEntityCollector_Impl::Add(this, core::mem::transmute_copy(&beginspan), core::mem::transmute_copy(&endspan), core::mem::transmute_copy(&beginactual), core::mem::transmute_copy(&endactual), core::mem::transmute_copy(&ptype), core::mem::transmute(&pszvalue), core::mem::transmute_copy(&certainty)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Add: Add:: } } @@ -9380,14 +9380,14 @@ pub struct IOpenRowset_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IOpenRowset_Impl: windows_core::IUnknownImpl { - fn OpenRowset(&self, punkouter: Option<&windows_core::IUnknown>, ptableid: *const super::super::Storage::IndexServer::DBID, pindexid: *const super::super::Storage::IndexServer::DBID, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut Option) -> windows_core::Result<()>; + fn OpenRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, ptableid: *const super::super::Storage::IndexServer::DBID, pindexid: *const super::super::Storage::IndexServer::DBID, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IOpenRowset_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OpenRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, ptableid: *const super::super::Storage::IndexServer::DBID, pindexid: *const super::super::Storage::IndexServer::DBID, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpenRowset_Impl::OpenRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&ptableid), core::mem::transmute_copy(&pindexid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() + IOpenRowset_Impl::OpenRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&ptableid), core::mem::transmute_copy(&pindexid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OpenRowset: OpenRowset:: } } @@ -9414,13 +9414,13 @@ pub struct IParentRowset_Vtbl { pub GetChildRowset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, usize, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IParentRowset_Impl: windows_core::IUnknownImpl { - fn GetChildRowset(&self, punkouter: Option<&windows_core::IUnknown>, iordinal: usize, riid: *const windows_core::GUID) -> windows_core::Result; + fn GetChildRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, iordinal: usize, riid: *const windows_core::GUID) -> windows_core::Result; } impl IParentRowset_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetChildRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, iordinal: usize, riid: *const windows_core::GUID, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IParentRowset_Impl::GetChildRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&iordinal), core::mem::transmute_copy(&riid)) { + match IParentRowset_Impl::GetChildRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&iordinal), core::mem::transmute_copy(&riid)) { Ok(ok__) => { pprowset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9611,21 +9611,21 @@ pub struct IQueryParser_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IQueryParser_Impl: windows_core::IUnknownImpl { - fn Parse(&self, pszinputstring: &windows_core::PCWSTR, pcustomproperties: Option<&super::Com::IEnumUnknown>) -> windows_core::Result; + fn Parse(&self, pszinputstring: &windows_core::PCWSTR, pcustomproperties: windows_core::Ref<'_, super::Com::IEnumUnknown>) -> windows_core::Result; fn SetOption(&self, option: STRUCTURED_QUERY_SINGLE_OPTION, poptionvalue: *const super::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn GetOption(&self, option: STRUCTURED_QUERY_SINGLE_OPTION) -> windows_core::Result; fn SetMultiOption(&self, option: STRUCTURED_QUERY_MULTIOPTION, pszoptionkey: &windows_core::PCWSTR, poptionvalue: *const super::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; fn GetSchemaProvider(&self) -> windows_core::Result; - fn RestateToString(&self, pcondition: Option<&ICondition>, fuseenglish: super::super::Foundation::BOOL) -> windows_core::Result; + fn RestateToString(&self, pcondition: windows_core::Ref<'_, ICondition>, fuseenglish: super::super::Foundation::BOOL) -> windows_core::Result; fn ParsePropertyValue(&self, pszpropertyname: &windows_core::PCWSTR, pszinputstring: &windows_core::PCWSTR) -> windows_core::Result; - fn RestatePropertyValueToString(&self, pcondition: Option<&ICondition>, fuseenglish: super::super::Foundation::BOOL, ppszpropertyname: *mut windows_core::PWSTR, ppszquerystring: *mut windows_core::PWSTR) -> windows_core::Result<()>; + fn RestatePropertyValueToString(&self, pcondition: windows_core::Ref<'_, ICondition>, fuseenglish: super::super::Foundation::BOOL, ppszpropertyname: *mut windows_core::PWSTR, ppszquerystring: *mut windows_core::PWSTR) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl IQueryParser_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Parse(this: *mut core::ffi::c_void, pszinputstring: windows_core::PCWSTR, pcustomproperties: *mut core::ffi::c_void, ppsolution: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IQueryParser_Impl::Parse(this, core::mem::transmute(&pszinputstring), windows_core::from_raw_borrowed(&pcustomproperties)) { + match IQueryParser_Impl::Parse(this, core::mem::transmute(&pszinputstring), core::mem::transmute_copy(&pcustomproperties)) { Ok(ok__) => { ppsolution.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9663,7 +9663,7 @@ impl IQueryParser_Vtbl { } unsafe extern "system" fn RestateToString(this: *mut core::ffi::c_void, pcondition: *mut core::ffi::c_void, fuseenglish: super::super::Foundation::BOOL, ppszquerystring: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IQueryParser_Impl::RestateToString(this, windows_core::from_raw_borrowed(&pcondition), core::mem::transmute_copy(&fuseenglish)) { + match IQueryParser_Impl::RestateToString(this, core::mem::transmute_copy(&pcondition), core::mem::transmute_copy(&fuseenglish)) { Ok(ok__) => { ppszquerystring.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9683,7 +9683,7 @@ impl IQueryParser_Vtbl { } unsafe extern "system" fn RestatePropertyValueToString(this: *mut core::ffi::c_void, pcondition: *mut core::ffi::c_void, fuseenglish: super::super::Foundation::BOOL, ppszpropertyname: *mut windows_core::PWSTR, ppszquerystring: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IQueryParser_Impl::RestatePropertyValueToString(this, windows_core::from_raw_borrowed(&pcondition), core::mem::transmute_copy(&fuseenglish), core::mem::transmute_copy(&ppszpropertyname), core::mem::transmute_copy(&ppszquerystring)).into() + IQueryParser_Impl::RestatePropertyValueToString(this, core::mem::transmute_copy(&pcondition), core::mem::transmute_copy(&fuseenglish), core::mem::transmute_copy(&ppszpropertyname), core::mem::transmute_copy(&ppszquerystring)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -9738,7 +9738,7 @@ pub struct IQueryParserManager_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IQueryParserManager_Impl: windows_core::IUnknownImpl { fn CreateLoadedParser(&self, pszcatalog: &windows_core::PCWSTR, langidforkeywords: u16, riid: *const windows_core::GUID, ppqueryparser: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn InitializeOptions(&self, funderstandnqs: super::super::Foundation::BOOL, fautowildcard: super::super::Foundation::BOOL, pqueryparser: Option<&IQueryParser>) -> windows_core::Result<()>; + fn InitializeOptions(&self, funderstandnqs: super::super::Foundation::BOOL, fautowildcard: super::super::Foundation::BOOL, pqueryparser: windows_core::Ref<'_, IQueryParser>) -> windows_core::Result<()>; fn SetOption(&self, option: QUERY_PARSER_MANAGER_OPTION, poptionvalue: *const super::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -9750,7 +9750,7 @@ impl IQueryParserManager_Vtbl { } unsafe extern "system" fn InitializeOptions(this: *mut core::ffi::c_void, funderstandnqs: super::super::Foundation::BOOL, fautowildcard: super::super::Foundation::BOOL, pqueryparser: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IQueryParserManager_Impl::InitializeOptions(this, core::mem::transmute_copy(&funderstandnqs), core::mem::transmute_copy(&fautowildcard), windows_core::from_raw_borrowed(&pqueryparser)).into() + IQueryParserManager_Impl::InitializeOptions(this, core::mem::transmute_copy(&funderstandnqs), core::mem::transmute_copy(&fautowildcard), core::mem::transmute_copy(&pqueryparser)).into() } unsafe extern "system" fn SetOption(this: *mut core::ffi::c_void, option: QUERY_PARSER_MANAGER_OPTION, poptionvalue: *const super::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9805,9 +9805,9 @@ pub struct IQuerySolution_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] pub trait IQuerySolution_Impl: IConditionFactory_Impl { - fn GetQuery(&self, ppquerynode: *mut Option, ppmaintype: *mut Option) -> windows_core::Result<()>; + fn GetQuery(&self, ppquerynode: windows_core::OutRef<'_, ICondition>, ppmaintype: windows_core::OutRef<'_, IEntity>) -> windows_core::Result<()>; fn GetErrors(&self, riid: *const windows_core::GUID, ppparseerrors: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn GetLexicalData(&self, ppszinputstring: *mut windows_core::PWSTR, pptokens: *mut Option, plcid: *mut u32, ppwordbreaker: *mut Option) -> windows_core::Result<()>; + fn GetLexicalData(&self, ppszinputstring: *mut windows_core::PWSTR, pptokens: windows_core::OutRef<'_, ITokenCollection>, plcid: *mut u32, ppwordbreaker: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] impl IQuerySolution_Vtbl { @@ -10103,8 +10103,8 @@ pub struct IRow_Vtbl { #[cfg(feature = "Win32_Storage_IndexServer")] pub trait IRow_Impl: windows_core::IUnknownImpl { fn GetColumns(&self, ccolumns: usize, rgcolumns: *mut DBCOLUMNACCESS) -> windows_core::Result<()>; - fn GetSourceRowset(&self, riid: *const windows_core::GUID, pprowset: *mut Option, phrow: *mut usize) -> windows_core::Result<()>; - fn Open(&self, punkouter: Option<&windows_core::IUnknown>, pcolumnid: *const super::super::Storage::IndexServer::DBID, rguidcolumntype: *const windows_core::GUID, dwbindflags: u32, riid: *const windows_core::GUID, ppunk: *mut Option) -> windows_core::Result<()>; + fn GetSourceRowset(&self, riid: *const windows_core::GUID, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>, phrow: *mut usize) -> windows_core::Result<()>; + fn Open(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, pcolumnid: *const super::super::Storage::IndexServer::DBID, rguidcolumntype: *const windows_core::GUID, dwbindflags: u32, riid: *const windows_core::GUID, ppunk: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Storage_IndexServer")] impl IRow_Vtbl { @@ -10119,7 +10119,7 @@ impl IRow_Vtbl { } unsafe extern "system" fn Open(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, pcolumnid: *const super::super::Storage::IndexServer::DBID, rguidcolumntype: *const windows_core::GUID, dwbindflags: u32, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRow_Impl::Open(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&pcolumnid), core::mem::transmute_copy(&rguidcolumntype), core::mem::transmute_copy(&dwbindflags), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppunk)).into() + IRow_Impl::Open(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&pcolumnid), core::mem::transmute_copy(&rguidcolumntype), core::mem::transmute_copy(&dwbindflags), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppunk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10205,7 +10205,7 @@ pub trait IRowPosition_Impl: windows_core::IUnknownImpl { fn ClearRowPosition(&self) -> windows_core::Result<()>; fn GetRowPosition(&self, phchapter: *mut usize, phrow: *mut usize, pdwpositionflags: *mut u32) -> windows_core::Result<()>; fn GetRowset(&self, riid: *const windows_core::GUID) -> windows_core::Result; - fn Initialize(&self, prowset: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, prowset: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetRowPosition(&self, hchapter: usize, hrow: usize, dwpositionflags: u32) -> windows_core::Result<()>; } impl IRowPosition_Vtbl { @@ -10230,7 +10230,7 @@ impl IRowPosition_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, prowset: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRowPosition_Impl::Initialize(this, windows_core::from_raw_borrowed(&prowset)).into() + IRowPosition_Impl::Initialize(this, core::mem::transmute_copy(&prowset)).into() } unsafe extern "system" fn SetRowPosition(this: *mut core::ffi::c_void, hchapter: usize, hrow: usize, dwpositionflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10635,7 +10635,7 @@ pub trait IRowsetCopyRows_Impl: windows_core::IUnknownImpl { fn CloseSource(&self, hsourceid: u16) -> windows_core::Result<()>; fn CopyByHROWS(&self, hsourceid: u16, hreserved: usize, crows: isize, rghrows: *const usize, bflags: u32) -> windows_core::Result<()>; fn CopyRows(&self, hsourceid: u16, hreserved: usize, crows: isize, bflags: u32) -> windows_core::Result; - fn DefineSource(&self, prowsetsource: Option<&IRowset>, ccolids: usize, rgsourcecolumns: *const isize, rgtargetcolumns: *const isize) -> windows_core::Result; + fn DefineSource(&self, prowsetsource: windows_core::Ref<'_, IRowset>, ccolids: usize, rgsourcecolumns: *const isize, rgtargetcolumns: *const isize) -> windows_core::Result; } impl IRowsetCopyRows_Vtbl { pub const fn new() -> Self { @@ -10659,7 +10659,7 @@ impl IRowsetCopyRows_Vtbl { } unsafe extern "system" fn DefineSource(this: *mut core::ffi::c_void, prowsetsource: *mut core::ffi::c_void, ccolids: usize, rgsourcecolumns: *const isize, rgtargetcolumns: *const isize, phsourceid: *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRowsetCopyRows_Impl::DefineSource(this, windows_core::from_raw_borrowed(&prowsetsource), core::mem::transmute_copy(&ccolids), core::mem::transmute_copy(&rgsourcecolumns), core::mem::transmute_copy(&rgtargetcolumns)) { + match IRowsetCopyRows_Impl::DefineSource(this, core::mem::transmute_copy(&prowsetsource), core::mem::transmute_copy(&ccolids), core::mem::transmute_copy(&rgsourcecolumns), core::mem::transmute_copy(&rgtargetcolumns)) { Ok(ok__) => { phsourceid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11232,13 +11232,13 @@ pub struct IRowsetNextRowset_Vtbl { pub GetNextRowset: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRowsetNextRowset_Impl: windows_core::IUnknownImpl { - fn GetNextRowset(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; + fn GetNextRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; } impl IRowsetNextRowset_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetNextRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppnextrowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRowsetNextRowset_Impl::GetNextRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid)) { + match IRowsetNextRowset_Impl::GetNextRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppnextrowset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11283,23 +11283,23 @@ pub struct IRowsetNotify_Vtbl { pub OnRowsetChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IRowsetNotify_Impl: windows_core::IUnknownImpl { - fn OnFieldChange(&self, prowset: Option<&IRowset>, hrow: usize, ccolumns: usize, rgcolumns: *const usize, ereason: u32, ephase: u32, fcantdeny: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn OnRowChange(&self, prowset: Option<&IRowset>, crows: usize, rghrows: *const usize, ereason: u32, ephase: u32, fcantdeny: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn OnRowsetChange(&self, prowset: Option<&IRowset>, ereason: u32, ephase: u32, fcantdeny: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnFieldChange(&self, prowset: windows_core::Ref<'_, IRowset>, hrow: usize, ccolumns: usize, rgcolumns: *const usize, ereason: u32, ephase: u32, fcantdeny: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnRowChange(&self, prowset: windows_core::Ref<'_, IRowset>, crows: usize, rghrows: *const usize, ereason: u32, ephase: u32, fcantdeny: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnRowsetChange(&self, prowset: windows_core::Ref<'_, IRowset>, ereason: u32, ephase: u32, fcantdeny: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IRowsetNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnFieldChange(this: *mut core::ffi::c_void, prowset: *mut core::ffi::c_void, hrow: usize, ccolumns: usize, rgcolumns: *const usize, ereason: u32, ephase: u32, fcantdeny: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRowsetNotify_Impl::OnFieldChange(this, windows_core::from_raw_borrowed(&prowset), core::mem::transmute_copy(&hrow), core::mem::transmute_copy(&ccolumns), core::mem::transmute_copy(&rgcolumns), core::mem::transmute_copy(&ereason), core::mem::transmute_copy(&ephase), core::mem::transmute_copy(&fcantdeny)).into() + IRowsetNotify_Impl::OnFieldChange(this, core::mem::transmute_copy(&prowset), core::mem::transmute_copy(&hrow), core::mem::transmute_copy(&ccolumns), core::mem::transmute_copy(&rgcolumns), core::mem::transmute_copy(&ereason), core::mem::transmute_copy(&ephase), core::mem::transmute_copy(&fcantdeny)).into() } unsafe extern "system" fn OnRowChange(this: *mut core::ffi::c_void, prowset: *mut core::ffi::c_void, crows: usize, rghrows: *const usize, ereason: u32, ephase: u32, fcantdeny: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRowsetNotify_Impl::OnRowChange(this, windows_core::from_raw_borrowed(&prowset), core::mem::transmute_copy(&crows), core::mem::transmute_copy(&rghrows), core::mem::transmute_copy(&ereason), core::mem::transmute_copy(&ephase), core::mem::transmute_copy(&fcantdeny)).into() + IRowsetNotify_Impl::OnRowChange(this, core::mem::transmute_copy(&prowset), core::mem::transmute_copy(&crows), core::mem::transmute_copy(&rghrows), core::mem::transmute_copy(&ereason), core::mem::transmute_copy(&ephase), core::mem::transmute_copy(&fcantdeny)).into() } unsafe extern "system" fn OnRowsetChange(this: *mut core::ffi::c_void, prowset: *mut core::ffi::c_void, ereason: u32, ephase: u32, fcantdeny: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRowsetNotify_Impl::OnRowsetChange(this, windows_core::from_raw_borrowed(&prowset), core::mem::transmute_copy(&ereason), core::mem::transmute_copy(&ephase), core::mem::transmute_copy(&fcantdeny)).into() + IRowsetNotify_Impl::OnRowsetChange(this, core::mem::transmute_copy(&prowset), core::mem::transmute_copy(&ereason), core::mem::transmute_copy(&ephase), core::mem::transmute_copy(&fcantdeny)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -11639,14 +11639,14 @@ pub struct IRowsetView_Vtbl { pub GetView: unsafe extern "system" fn(*mut core::ffi::c_void, usize, *const windows_core::GUID, *mut usize, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRowsetView_Impl: windows_core::IUnknownImpl { - fn CreateView(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; - fn GetView(&self, hchapter: usize, riid: *const windows_core::GUID, phchaptersource: *mut usize, ppview: *mut Option) -> windows_core::Result<()>; + fn CreateView(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; + fn GetView(&self, hchapter: usize, riid: *const windows_core::GUID, phchaptersource: *mut usize, ppview: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IRowsetView_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateView(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppview: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRowsetView_Impl::CreateView(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid)) { + match IRowsetView_Impl::CreateView(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppview.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11732,13 +11732,13 @@ pub struct IRowsetWatchNotify_Vtbl { pub OnChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IRowsetWatchNotify_Impl: windows_core::IUnknownImpl { - fn OnChange(&self, prowset: Option<&IRowset>, echangereason: u32) -> windows_core::Result<()>; + fn OnChange(&self, prowset: windows_core::Ref<'_, IRowset>, echangereason: u32) -> windows_core::Result<()>; } impl IRowsetWatchNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnChange(this: *mut core::ffi::c_void, prowset: *mut core::ffi::c_void, echangereason: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRowsetWatchNotify_Impl::OnChange(this, windows_core::from_raw_borrowed(&prowset), core::mem::transmute_copy(&echangereason)).into() + IRowsetWatchNotify_Impl::OnChange(this, core::mem::transmute_copy(&prowset), core::mem::transmute_copy(&echangereason)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnChange: OnChange:: } } @@ -12166,9 +12166,9 @@ pub trait ISchemaProvider_Impl: windows_core::IUnknownImpl { fn RootEntity(&self) -> windows_core::Result; fn GetEntity(&self, pszentityname: &windows_core::PCWSTR) -> windows_core::Result; fn MetaData(&self, riid: *const windows_core::GUID, pmetadata: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn Localize(&self, lcid: u32, pschemalocalizersupport: Option<&ISchemaLocalizerSupport>) -> windows_core::Result<()>; + fn Localize(&self, lcid: u32, pschemalocalizersupport: windows_core::Ref<'_, ISchemaLocalizerSupport>) -> windows_core::Result<()>; fn SaveBinary(&self, pszschemabinarypath: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn LookupAuthoredNamedEntity(&self, pentity: Option<&IEntity>, pszinputstring: &windows_core::PCWSTR, ptokencollection: Option<&ITokenCollection>, ctokensbegin: u32, pctokenslength: *mut u32, ppszvalue: *mut windows_core::PWSTR) -> windows_core::Result<()>; + fn LookupAuthoredNamedEntity(&self, pentity: windows_core::Ref<'_, IEntity>, pszinputstring: &windows_core::PCWSTR, ptokencollection: windows_core::Ref<'_, ITokenCollection>, ctokensbegin: u32, pctokenslength: *mut u32, ppszvalue: *mut windows_core::PWSTR) -> windows_core::Result<()>; } impl ISchemaProvider_Vtbl { pub const fn new() -> Self { @@ -12202,7 +12202,7 @@ impl ISchemaProvider_Vtbl { } unsafe extern "system" fn Localize(this: *mut core::ffi::c_void, lcid: u32, pschemalocalizersupport: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISchemaProvider_Impl::Localize(this, core::mem::transmute_copy(&lcid), windows_core::from_raw_borrowed(&pschemalocalizersupport)).into() + ISchemaProvider_Impl::Localize(this, core::mem::transmute_copy(&lcid), core::mem::transmute_copy(&pschemalocalizersupport)).into() } unsafe extern "system" fn SaveBinary(this: *mut core::ffi::c_void, pszschemabinarypath: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12210,7 +12210,7 @@ impl ISchemaProvider_Vtbl { } unsafe extern "system" fn LookupAuthoredNamedEntity(this: *mut core::ffi::c_void, pentity: *mut core::ffi::c_void, pszinputstring: windows_core::PCWSTR, ptokencollection: *mut core::ffi::c_void, ctokensbegin: u32, pctokenslength: *mut u32, ppszvalue: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISchemaProvider_Impl::LookupAuthoredNamedEntity(this, windows_core::from_raw_borrowed(&pentity), core::mem::transmute(&pszinputstring), windows_core::from_raw_borrowed(&ptokencollection), core::mem::transmute_copy(&ctokensbegin), core::mem::transmute_copy(&pctokenslength), core::mem::transmute_copy(&ppszvalue)).into() + ISchemaProvider_Impl::LookupAuthoredNamedEntity(this, core::mem::transmute_copy(&pentity), core::mem::transmute(&pszinputstring), core::mem::transmute_copy(&ptokencollection), core::mem::transmute_copy(&ctokensbegin), core::mem::transmute_copy(&pctokenslength), core::mem::transmute_copy(&ppszvalue)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -12282,21 +12282,21 @@ pub struct IScopedOperations_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IScopedOperations_Impl: IBindResource_Impl { - fn Copy(&self, crows: usize, rgpwszsourceurls: *const windows_core::PCWSTR, rgpwszdesturls: *const windows_core::PCWSTR, dwcopyflags: u32, pauthenticate: Option<&super::Com::IAuthenticate>, rgdwstatus: *mut u32, rgpwsznewurls: *mut windows_core::PWSTR, ppstringsbuffer: *mut *mut u16) -> windows_core::Result<()>; - fn Move(&self, crows: usize, rgpwszsourceurls: *const windows_core::PCWSTR, rgpwszdesturls: *const windows_core::PCWSTR, dwmoveflags: u32, pauthenticate: Option<&super::Com::IAuthenticate>, rgdwstatus: *mut u32, rgpwsznewurls: *mut windows_core::PWSTR, ppstringsbuffer: *mut *mut u16) -> windows_core::Result<()>; + fn Copy(&self, crows: usize, rgpwszsourceurls: *const windows_core::PCWSTR, rgpwszdesturls: *const windows_core::PCWSTR, dwcopyflags: u32, pauthenticate: windows_core::Ref<'_, super::Com::IAuthenticate>, rgdwstatus: *mut u32, rgpwsznewurls: *mut windows_core::PWSTR, ppstringsbuffer: *mut *mut u16) -> windows_core::Result<()>; + fn Move(&self, crows: usize, rgpwszsourceurls: *const windows_core::PCWSTR, rgpwszdesturls: *const windows_core::PCWSTR, dwmoveflags: u32, pauthenticate: windows_core::Ref<'_, super::Com::IAuthenticate>, rgdwstatus: *mut u32, rgpwsznewurls: *mut windows_core::PWSTR, ppstringsbuffer: *mut *mut u16) -> windows_core::Result<()>; fn Delete(&self, crows: usize, rgpwszurls: *const windows_core::PCWSTR, dwdeleteflags: u32) -> windows_core::Result; - fn OpenRowset(&self, punkouter: Option<&windows_core::IUnknown>, ptableid: *const super::super::Storage::IndexServer::DBID, pindexid: *const super::super::Storage::IndexServer::DBID, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut Option) -> windows_core::Result<()>; + fn OpenRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, ptableid: *const super::super::Storage::IndexServer::DBID, pindexid: *const super::super::Storage::IndexServer::DBID, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IScopedOperations_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Copy(this: *mut core::ffi::c_void, crows: usize, rgpwszsourceurls: *const windows_core::PCWSTR, rgpwszdesturls: *const windows_core::PCWSTR, dwcopyflags: u32, pauthenticate: *mut core::ffi::c_void, rgdwstatus: *mut u32, rgpwsznewurls: *mut windows_core::PWSTR, ppstringsbuffer: *mut *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IScopedOperations_Impl::Copy(this, core::mem::transmute_copy(&crows), core::mem::transmute_copy(&rgpwszsourceurls), core::mem::transmute_copy(&rgpwszdesturls), core::mem::transmute_copy(&dwcopyflags), windows_core::from_raw_borrowed(&pauthenticate), core::mem::transmute_copy(&rgdwstatus), core::mem::transmute_copy(&rgpwsznewurls), core::mem::transmute_copy(&ppstringsbuffer)).into() + IScopedOperations_Impl::Copy(this, core::mem::transmute_copy(&crows), core::mem::transmute_copy(&rgpwszsourceurls), core::mem::transmute_copy(&rgpwszdesturls), core::mem::transmute_copy(&dwcopyflags), core::mem::transmute_copy(&pauthenticate), core::mem::transmute_copy(&rgdwstatus), core::mem::transmute_copy(&rgpwsznewurls), core::mem::transmute_copy(&ppstringsbuffer)).into() } unsafe extern "system" fn Move(this: *mut core::ffi::c_void, crows: usize, rgpwszsourceurls: *const windows_core::PCWSTR, rgpwszdesturls: *const windows_core::PCWSTR, dwmoveflags: u32, pauthenticate: *mut core::ffi::c_void, rgdwstatus: *mut u32, rgpwsznewurls: *mut windows_core::PWSTR, ppstringsbuffer: *mut *mut u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IScopedOperations_Impl::Move(this, core::mem::transmute_copy(&crows), core::mem::transmute_copy(&rgpwszsourceurls), core::mem::transmute_copy(&rgpwszdesturls), core::mem::transmute_copy(&dwmoveflags), windows_core::from_raw_borrowed(&pauthenticate), core::mem::transmute_copy(&rgdwstatus), core::mem::transmute_copy(&rgpwsznewurls), core::mem::transmute_copy(&ppstringsbuffer)).into() + IScopedOperations_Impl::Move(this, core::mem::transmute_copy(&crows), core::mem::transmute_copy(&rgpwszsourceurls), core::mem::transmute_copy(&rgpwszdesturls), core::mem::transmute_copy(&dwmoveflags), core::mem::transmute_copy(&pauthenticate), core::mem::transmute_copy(&rgdwstatus), core::mem::transmute_copy(&rgpwsznewurls), core::mem::transmute_copy(&ppstringsbuffer)).into() } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, crows: usize, rgpwszurls: *const windows_core::PCWSTR, dwdeleteflags: u32, rgdwstatus: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12310,7 +12310,7 @@ impl IScopedOperations_Vtbl { } unsafe extern "system" fn OpenRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, ptableid: *const super::super::Storage::IndexServer::DBID, pindexid: *const super::super::Storage::IndexServer::DBID, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IScopedOperations_Impl::OpenRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&ptableid), core::mem::transmute_copy(&pindexid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() + IScopedOperations_Impl::OpenRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&ptableid), core::mem::transmute_copy(&pindexid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pprowset)).into() } Self { base__: IBindResource_Vtbl::new::(), @@ -12509,8 +12509,8 @@ pub trait ISearchCatalogManager_Impl: windows_core::IUnknownImpl { fn URLBeingIndexed(&self) -> windows_core::Result; fn GetURLIndexingState(&self, pszurl: &windows_core::PCWSTR) -> windows_core::Result; fn GetPersistentItemsChangedSink(&self) -> windows_core::Result; - fn RegisterViewForNotification(&self, pszview: &windows_core::PCWSTR, pviewchangedsink: Option<&ISearchViewChangedSink>) -> windows_core::Result; - fn GetItemsChangedSink(&self, pisearchnotifyinlinesite: Option<&ISearchNotifyInlineSite>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void, pguidcatalogresetsignature: *mut windows_core::GUID, pguidcheckpointsignature: *mut windows_core::GUID, pdwlastcheckpointnumber: *mut u32) -> windows_core::Result<()>; + fn RegisterViewForNotification(&self, pszview: &windows_core::PCWSTR, pviewchangedsink: windows_core::Ref<'_, ISearchViewChangedSink>) -> windows_core::Result; + fn GetItemsChangedSink(&self, pisearchnotifyinlinesite: windows_core::Ref<'_, ISearchNotifyInlineSite>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void, pguidcatalogresetsignature: *mut windows_core::GUID, pguidcheckpointsignature: *mut windows_core::GUID, pdwlastcheckpointnumber: *mut u32) -> windows_core::Result<()>; fn UnregisterViewForNotification(&self, dwcookie: u32) -> windows_core::Result<()>; fn SetExtensionClusion(&self, pszextension: &windows_core::PCWSTR, fexclude: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn EnumerateExcludedExtensions(&self) -> windows_core::Result; @@ -12640,7 +12640,7 @@ impl ISearchCatalogManager_Vtbl { } unsafe extern "system" fn RegisterViewForNotification(this: *mut core::ffi::c_void, pszview: windows_core::PCWSTR, pviewchangedsink: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISearchCatalogManager_Impl::RegisterViewForNotification(this, core::mem::transmute(&pszview), windows_core::from_raw_borrowed(&pviewchangedsink)) { + match ISearchCatalogManager_Impl::RegisterViewForNotification(this, core::mem::transmute(&pszview), core::mem::transmute_copy(&pviewchangedsink)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12650,7 +12650,7 @@ impl ISearchCatalogManager_Vtbl { } unsafe extern "system" fn GetItemsChangedSink(this: *mut core::ffi::c_void, pisearchnotifyinlinesite: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void, pguidcatalogresetsignature: *mut windows_core::GUID, pguidcheckpointsignature: *mut windows_core::GUID, pdwlastcheckpointnumber: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISearchCatalogManager_Impl::GetItemsChangedSink(this, windows_core::from_raw_borrowed(&pisearchnotifyinlinesite), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv), core::mem::transmute_copy(&pguidcatalogresetsignature), core::mem::transmute_copy(&pguidcheckpointsignature), core::mem::transmute_copy(&pdwlastcheckpointnumber)).into() + ISearchCatalogManager_Impl::GetItemsChangedSink(this, core::mem::transmute_copy(&pisearchnotifyinlinesite), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv), core::mem::transmute_copy(&pguidcatalogresetsignature), core::mem::transmute_copy(&pguidcheckpointsignature), core::mem::transmute_copy(&pdwlastcheckpointnumber)).into() } unsafe extern "system" fn UnregisterViewForNotification(this: *mut core::ffi::c_void, dwcookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12896,7 +12896,7 @@ pub struct ISearchCrawlScopeManager_Vtbl { } pub trait ISearchCrawlScopeManager_Impl: windows_core::IUnknownImpl { fn AddDefaultScopeRule(&self, pszurl: &windows_core::PCWSTR, finclude: super::super::Foundation::BOOL, ffollowflags: u32) -> windows_core::Result<()>; - fn AddRoot(&self, psearchroot: Option<&ISearchRoot>) -> windows_core::Result<()>; + fn AddRoot(&self, psearchroot: windows_core::Ref<'_, ISearchRoot>) -> windows_core::Result<()>; fn RemoveRoot(&self, pszurl: &windows_core::PCWSTR) -> windows_core::Result<()>; fn EnumerateRoots(&self) -> windows_core::Result; fn AddHierarchicalScope(&self, pszurl: &windows_core::PCWSTR, finclude: super::super::Foundation::BOOL, fdefault: super::super::Foundation::BOOL, foverridechildren: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -12920,7 +12920,7 @@ impl ISearchCrawlScopeManager_Vtbl { } unsafe extern "system" fn AddRoot(this: *mut core::ffi::c_void, psearchroot: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISearchCrawlScopeManager_Impl::AddRoot(this, windows_core::from_raw_borrowed(&psearchroot)).into() + ISearchCrawlScopeManager_Impl::AddRoot(this, core::mem::transmute_copy(&psearchroot)).into() } unsafe extern "system" fn RemoveRoot(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13674,16 +13674,16 @@ pub struct ISearchProtocol_Vtbl { pub ShutDown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISearchProtocol_Impl: windows_core::IUnknownImpl { - fn Init(&self, ptimeoutinfo: *const TIMEOUT_INFO, pprotocolhandlersite: Option<&IProtocolHandlerSite>, pproxyinfo: *const PROXY_INFO) -> windows_core::Result<()>; + fn Init(&self, ptimeoutinfo: *const TIMEOUT_INFO, pprotocolhandlersite: windows_core::Ref<'_, IProtocolHandlerSite>, pproxyinfo: *const PROXY_INFO) -> windows_core::Result<()>; fn CreateAccessor(&self, pcwszurl: &windows_core::PCWSTR, pauthenticationinfo: *const AUTHENTICATION_INFO, pincrementalaccessinfo: *const INCREMENTAL_ACCESS_INFO, piteminfo: *const ITEM_INFO) -> windows_core::Result; - fn CloseAccessor(&self, paccessor: Option<&IUrlAccessor>) -> windows_core::Result<()>; + fn CloseAccessor(&self, paccessor: windows_core::Ref<'_, IUrlAccessor>) -> windows_core::Result<()>; fn ShutDown(&self) -> windows_core::Result<()>; } impl ISearchProtocol_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, ptimeoutinfo: *const TIMEOUT_INFO, pprotocolhandlersite: *mut core::ffi::c_void, pproxyinfo: *const PROXY_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISearchProtocol_Impl::Init(this, core::mem::transmute_copy(&ptimeoutinfo), windows_core::from_raw_borrowed(&pprotocolhandlersite), core::mem::transmute_copy(&pproxyinfo)).into() + ISearchProtocol_Impl::Init(this, core::mem::transmute_copy(&ptimeoutinfo), core::mem::transmute_copy(&pprotocolhandlersite), core::mem::transmute_copy(&pproxyinfo)).into() } unsafe extern "system" fn CreateAccessor(this: *mut core::ffi::c_void, pcwszurl: windows_core::PCWSTR, pauthenticationinfo: *const AUTHENTICATION_INFO, pincrementalaccessinfo: *const INCREMENTAL_ACCESS_INFO, piteminfo: *const ITEM_INFO, ppaccessor: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13697,7 +13697,7 @@ impl ISearchProtocol_Vtbl { } unsafe extern "system" fn CloseAccessor(this: *mut core::ffi::c_void, paccessor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISearchProtocol_Impl::CloseAccessor(this, windows_core::from_raw_borrowed(&paccessor)).into() + ISearchProtocol_Impl::CloseAccessor(this, core::mem::transmute_copy(&paccessor)).into() } unsafe extern "system" fn ShutDown(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14185,7 +14185,7 @@ pub struct ISearchQueryHits_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com"))] pub trait ISearchQueryHits_Impl: windows_core::IUnknownImpl { - fn Init(&self, pflt: Option<&super::super::Storage::IndexServer::IFilter>, ulflags: u32) -> i32; + fn Init(&self, pflt: windows_core::Ref<'_, super::super::Storage::IndexServer::IFilter>, ulflags: u32) -> i32; fn NextHitMoniker(&self, pcmnk: *mut u32, papmnk: *mut *mut Option) -> i32; fn NextHitOffset(&self, pcregion: *mut u32, paregion: *mut *mut super::super::Storage::IndexServer::FILTERREGION) -> i32; } @@ -14194,7 +14194,7 @@ impl ISearchQueryHits_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, pflt: *mut core::ffi::c_void, ulflags: u32) -> i32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISearchQueryHits_Impl::Init(this, windows_core::from_raw_borrowed(&pflt), core::mem::transmute_copy(&ulflags)) + ISearchQueryHits_Impl::Init(this, core::mem::transmute_copy(&pflt), core::mem::transmute_copy(&ulflags)) } unsafe extern "system" fn NextHitMoniker(this: *mut core::ffi::c_void, pcmnk: *mut u32, papmnk: *mut *mut *mut core::ffi::c_void) -> i32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14759,13 +14759,13 @@ pub struct IService_Vtbl { pub InvokeService: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IService_Impl: windows_core::IUnknownImpl { - fn InvokeService(&self, punkinner: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn InvokeService(&self, punkinner: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InvokeService(this: *mut core::ffi::c_void, punkinner: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IService_Impl::InvokeService(this, windows_core::from_raw_borrowed(&punkinner)).into() + IService_Impl::InvokeService(this, core::mem::transmute_copy(&punkinner)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), InvokeService: InvokeService:: } } @@ -14857,7 +14857,7 @@ pub struct ISimpleCommandCreator_Vtbl { pub GetDefaultCatalog: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u32, *mut u32) -> windows_core::HRESULT, } pub trait ISimpleCommandCreator_Impl: windows_core::IUnknownImpl { - fn CreateICommand(&self, ppiunknown: *mut Option, pouterunk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CreateICommand(&self, ppiunknown: windows_core::OutRef<'_, windows_core::IUnknown>, pouterunk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn VerifyCatalog(&self, pwszmachine: &windows_core::PCWSTR, pwszcatalogname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetDefaultCatalog(&self, pwszcatalogname: &windows_core::PCWSTR, cwcin: u32, pcwcout: *mut u32) -> windows_core::Result<()>; } @@ -14865,7 +14865,7 @@ impl ISimpleCommandCreator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateICommand(this: *mut core::ffi::c_void, ppiunknown: *mut *mut core::ffi::c_void, pouterunk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISimpleCommandCreator_Impl::CreateICommand(this, core::mem::transmute_copy(&ppiunknown), windows_core::from_raw_borrowed(&pouterunk)).into() + ISimpleCommandCreator_Impl::CreateICommand(this, core::mem::transmute_copy(&ppiunknown), core::mem::transmute_copy(&pouterunk)).into() } unsafe extern "system" fn VerifyCatalog(this: *mut core::ffi::c_void, pwszmachine: windows_core::PCWSTR, pwszcatalogname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14908,14 +14908,14 @@ pub struct ISourcesRowset_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISourcesRowset_Impl: windows_core::IUnknownImpl { - fn GetSourcesRowset(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, cpropertysets: u32, rgproperties: *mut DBPROPSET, ppsourcesrowset: *mut Option) -> windows_core::Result<()>; + fn GetSourcesRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, cpropertysets: u32, rgproperties: *mut DBPROPSET, ppsourcesrowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISourcesRowset_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetSourcesRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, cpropertysets: u32, rgproperties: *mut DBPROPSET, ppsourcesrowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISourcesRowset_Impl::GetSourcesRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgproperties), core::mem::transmute_copy(&ppsourcesrowset)).into() + ISourcesRowset_Impl::GetSourcesRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgproperties), core::mem::transmute_copy(&ppsourcesrowset)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), GetSourcesRowset: GetSourcesRowset:: } } @@ -14951,7 +14951,7 @@ pub struct IStemmer_Vtbl { } pub trait IStemmer_Impl: windows_core::IUnknownImpl { fn Init(&self, ulmaxtokensize: u32, pflicense: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn GenerateWordForms(&self, pwcinbuf: &windows_core::PCWSTR, cwc: u32, pstemsink: Option<&IWordFormSink>) -> windows_core::Result<()>; + fn GenerateWordForms(&self, pwcinbuf: &windows_core::PCWSTR, cwc: u32, pstemsink: windows_core::Ref<'_, IWordFormSink>) -> windows_core::Result<()>; fn GetLicenseToUse(&self, ppwcslicense: *const *const u16) -> windows_core::Result<()>; } impl IStemmer_Vtbl { @@ -14962,7 +14962,7 @@ impl IStemmer_Vtbl { } unsafe extern "system" fn GenerateWordForms(this: *mut core::ffi::c_void, pwcinbuf: windows_core::PCWSTR, cwc: u32, pstemsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStemmer_Impl::GenerateWordForms(this, core::mem::transmute(&pwcinbuf), core::mem::transmute_copy(&cwc), windows_core::from_raw_borrowed(&pstemsink)).into() + IStemmer_Impl::GenerateWordForms(this, core::mem::transmute(&pwcinbuf), core::mem::transmute_copy(&cwc), core::mem::transmute_copy(&pstemsink)).into() } unsafe extern "system" fn GetLicenseToUse(this: *mut core::ffi::c_void, ppwcslicense: *const *const u16) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15499,7 +15499,7 @@ pub struct ITableDefinition_Vtbl { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITableDefinition_Impl: windows_core::IUnknownImpl { - fn CreateTable(&self, punkouter: Option<&windows_core::IUnknown>, ptableid: *const super::super::Storage::IndexServer::DBID, ccolumndescs: usize, rgcolumndescs: *const DBCOLUMNDESC, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pptableid: *mut *mut super::super::Storage::IndexServer::DBID, pprowset: *mut Option) -> windows_core::Result<()>; + fn CreateTable(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, ptableid: *const super::super::Storage::IndexServer::DBID, ccolumndescs: usize, rgcolumndescs: *const DBCOLUMNDESC, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pptableid: *mut *mut super::super::Storage::IndexServer::DBID, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn DropTable(&self, ptableid: *const super::super::Storage::IndexServer::DBID) -> windows_core::Result<()>; fn AddColumn(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pcolumndesc: *const DBCOLUMNDESC, ppcolumnid: *mut *mut super::super::Storage::IndexServer::DBID) -> windows_core::Result<()>; fn DropColumn(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pcolumnid: *const super::super::Storage::IndexServer::DBID) -> windows_core::Result<()>; @@ -15509,7 +15509,7 @@ impl ITableDefinition_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateTable(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, ptableid: *const super::super::Storage::IndexServer::DBID, ccolumndescs: usize, rgcolumndescs: *const DBCOLUMNDESC, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pptableid: *mut *mut super::super::Storage::IndexServer::DBID, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITableDefinition_Impl::CreateTable(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&ptableid), core::mem::transmute_copy(&ccolumndescs), core::mem::transmute_copy(&rgcolumndescs), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pptableid), core::mem::transmute_copy(&pprowset)).into() + ITableDefinition_Impl::CreateTable(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&ptableid), core::mem::transmute_copy(&ccolumndescs), core::mem::transmute_copy(&rgcolumndescs), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pptableid), core::mem::transmute_copy(&pprowset)).into() } unsafe extern "system" fn DropTable(this: *mut core::ffi::c_void, ptableid: *const super::super::Storage::IndexServer::DBID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15581,7 +15581,7 @@ pub struct ITableDefinitionWithConstraints_Vtbl { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITableDefinitionWithConstraints_Impl: ITableCreation_Impl { fn AddConstraint(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pconstraintdesc: *const DBCONSTRAINTDESC) -> windows_core::Result<()>; - fn CreateTableWithConstraints(&self, punkouter: Option<&windows_core::IUnknown>, ptableid: *const super::super::Storage::IndexServer::DBID, ccolumndescs: usize, rgcolumndescs: *mut DBCOLUMNDESC, cconstraintdescs: u32, rgconstraintdescs: *const DBCONSTRAINTDESC, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pptableid: *mut *mut super::super::Storage::IndexServer::DBID, pprowset: *mut Option) -> windows_core::Result<()>; + fn CreateTableWithConstraints(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, ptableid: *const super::super::Storage::IndexServer::DBID, ccolumndescs: usize, rgcolumndescs: *mut DBCOLUMNDESC, cconstraintdescs: u32, rgconstraintdescs: *const DBCONSTRAINTDESC, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pptableid: *mut *mut super::super::Storage::IndexServer::DBID, pprowset: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn DropConstraint(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pconstraintid: *const super::super::Storage::IndexServer::DBID) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -15593,7 +15593,7 @@ impl ITableDefinitionWithConstraints_Vtbl { } unsafe extern "system" fn CreateTableWithConstraints(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, ptableid: *const super::super::Storage::IndexServer::DBID, ccolumndescs: usize, rgcolumndescs: *mut DBCOLUMNDESC, cconstraintdescs: u32, rgconstraintdescs: *const DBCONSTRAINTDESC, riid: *const windows_core::GUID, cpropertysets: u32, rgpropertysets: *mut DBPROPSET, pptableid: *mut *mut super::super::Storage::IndexServer::DBID, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITableDefinitionWithConstraints_Impl::CreateTableWithConstraints(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&ptableid), core::mem::transmute_copy(&ccolumndescs), core::mem::transmute_copy(&rgcolumndescs), core::mem::transmute_copy(&cconstraintdescs), core::mem::transmute_copy(&rgconstraintdescs), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pptableid), core::mem::transmute_copy(&pprowset)).into() + ITableDefinitionWithConstraints_Impl::CreateTableWithConstraints(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&ptableid), core::mem::transmute_copy(&ccolumndescs), core::mem::transmute_copy(&rgcolumndescs), core::mem::transmute_copy(&cconstraintdescs), core::mem::transmute_copy(&rgconstraintdescs), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&cpropertysets), core::mem::transmute_copy(&rgpropertysets), core::mem::transmute_copy(&pptableid), core::mem::transmute_copy(&pprowset)).into() } unsafe extern "system" fn DropConstraint(this: *mut core::ffi::c_void, ptableid: *const super::super::Storage::IndexServer::DBID, pconstraintid: *const super::super::Storage::IndexServer::DBID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15737,7 +15737,7 @@ pub struct ITransactionJoin_Vtbl { #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] pub trait ITransactionJoin_Impl: windows_core::IUnknownImpl { fn GetOptionsObject(&self) -> windows_core::Result; - fn JoinTransaction(&self, punktransactioncoord: Option<&windows_core::IUnknown>, isolevel: i32, isoflags: u32, potheroptions: Option<&super::DistributedTransactionCoordinator::ITransactionOptions>) -> windows_core::Result<()>; + fn JoinTransaction(&self, punktransactioncoord: windows_core::Ref<'_, windows_core::IUnknown>, isolevel: i32, isoflags: u32, potheroptions: windows_core::Ref<'_, super::DistributedTransactionCoordinator::ITransactionOptions>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] impl ITransactionJoin_Vtbl { @@ -15754,7 +15754,7 @@ impl ITransactionJoin_Vtbl { } unsafe extern "system" fn JoinTransaction(this: *mut core::ffi::c_void, punktransactioncoord: *mut core::ffi::c_void, isolevel: i32, isoflags: u32, potheroptions: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransactionJoin_Impl::JoinTransaction(this, windows_core::from_raw_borrowed(&punktransactioncoord), core::mem::transmute_copy(&isolevel), core::mem::transmute_copy(&isoflags), windows_core::from_raw_borrowed(&potheroptions)).into() + ITransactionJoin_Impl::JoinTransaction(this, core::mem::transmute_copy(&punktransactioncoord), core::mem::transmute_copy(&isolevel), core::mem::transmute_copy(&isoflags), core::mem::transmute_copy(&potheroptions)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -15810,7 +15810,7 @@ pub struct ITransactionLocal_Vtbl { #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] pub trait ITransactionLocal_Impl: super::DistributedTransactionCoordinator::ITransaction_Impl { fn GetOptionsObject(&self) -> windows_core::Result; - fn StartTransaction(&self, isolevel: i32, isoflags: u32, potheroptions: Option<&super::DistributedTransactionCoordinator::ITransactionOptions>, pultransactionlevel: *mut u32) -> windows_core::Result<()>; + fn StartTransaction(&self, isolevel: i32, isoflags: u32, potheroptions: windows_core::Ref<'_, super::DistributedTransactionCoordinator::ITransactionOptions>, pultransactionlevel: *mut u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] impl ITransactionLocal_Vtbl { @@ -15827,7 +15827,7 @@ impl ITransactionLocal_Vtbl { } unsafe extern "system" fn StartTransaction(this: *mut core::ffi::c_void, isolevel: i32, isoflags: u32, potheroptions: *mut core::ffi::c_void, pultransactionlevel: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransactionLocal_Impl::StartTransaction(this, core::mem::transmute_copy(&isolevel), core::mem::transmute_copy(&isoflags), windows_core::from_raw_borrowed(&potheroptions), core::mem::transmute_copy(&pultransactionlevel)).into() + ITransactionLocal_Impl::StartTransaction(this, core::mem::transmute_copy(&isolevel), core::mem::transmute_copy(&isoflags), core::mem::transmute_copy(&potheroptions), core::mem::transmute_copy(&pultransactionlevel)).into() } Self { base__: super::DistributedTransactionCoordinator::ITransaction_Vtbl::new::(), @@ -16691,7 +16691,7 @@ pub struct IViewRowset_Vtbl { } pub trait IViewRowset_Impl: windows_core::IUnknownImpl { fn GetSpecification(&self, riid: *const windows_core::GUID) -> windows_core::Result; - fn OpenViewRowset(&self, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; + fn OpenViewRowset(&self, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; } impl IViewRowset_Vtbl { pub const fn new() -> Self { @@ -16707,7 +16707,7 @@ impl IViewRowset_Vtbl { } unsafe extern "system" fn OpenViewRowset(this: *mut core::ffi::c_void, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, pprowset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IViewRowset_Impl::OpenViewRowset(this, windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid)) { + match IViewRowset_Impl::OpenViewRowset(this, core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid)) { Ok(ok__) => { pprowset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -16807,7 +16807,7 @@ pub struct IWordBreaker_Vtbl { #[cfg(feature = "Win32_Storage_IndexServer")] pub trait IWordBreaker_Impl: windows_core::IUnknownImpl { fn Init(&self, fquery: super::super::Foundation::BOOL, ulmaxtokensize: u32, pflicense: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn BreakText(&self, ptextsource: *mut TEXT_SOURCE, pwordsink: Option<&IWordSink>, pphrasesink: Option<&super::super::Storage::IndexServer::IPhraseSink>) -> windows_core::Result<()>; + fn BreakText(&self, ptextsource: *mut TEXT_SOURCE, pwordsink: windows_core::Ref<'_, IWordSink>, pphrasesink: windows_core::Ref<'_, super::super::Storage::IndexServer::IPhraseSink>) -> windows_core::Result<()>; fn ComposePhrase(&self, pwcnoun: &windows_core::PCWSTR, cwcnoun: u32, pwcmodifier: &windows_core::PCWSTR, cwcmodifier: u32, ulattachmenttype: u32, pwcphrase: &windows_core::PCWSTR, pcwcphrase: *mut u32) -> windows_core::Result<()>; fn GetLicenseToUse(&self, ppwcslicense: *const *const u16) -> windows_core::Result<()>; } @@ -16820,7 +16820,7 @@ impl IWordBreaker_Vtbl { } unsafe extern "system" fn BreakText(this: *mut core::ffi::c_void, ptextsource: *mut TEXT_SOURCE, pwordsink: *mut core::ffi::c_void, pphrasesink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWordBreaker_Impl::BreakText(this, core::mem::transmute_copy(&ptextsource), windows_core::from_raw_borrowed(&pwordsink), windows_core::from_raw_borrowed(&pphrasesink)).into() + IWordBreaker_Impl::BreakText(this, core::mem::transmute_copy(&ptextsource), core::mem::transmute_copy(&pwordsink), core::mem::transmute_copy(&pphrasesink)).into() } unsafe extern "system" fn ComposePhrase(this: *mut core::ffi::c_void, pwcnoun: windows_core::PCWSTR, cwcnoun: u32, pwcmodifier: windows_core::PCWSTR, cwcmodifier: u32, ulattachmenttype: u32, pwcphrase: windows_core::PCWSTR, pcwcphrase: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17572,8 +17572,8 @@ pub trait OLEDBSimpleProvider_Impl: windows_core::IUnknownImpl { fn deleteRows(&self, irow: isize, crows: isize) -> windows_core::Result; fn insertRows(&self, irow: isize, crows: isize) -> windows_core::Result; fn find(&self, irowstart: isize, icolumn: isize, val: &super::Variant::VARIANT, findflags: OSPFIND, comptype: OSPCOMP) -> windows_core::Result; - fn addOLEDBSimpleProviderListener(&self, pospilistener: Option<&OLEDBSimpleProviderListener>) -> windows_core::Result<()>; - fn removeOLEDBSimpleProviderListener(&self, pospilistener: Option<&OLEDBSimpleProviderListener>) -> windows_core::Result<()>; + fn addOLEDBSimpleProviderListener(&self, pospilistener: windows_core::Ref<'_, OLEDBSimpleProviderListener>) -> windows_core::Result<()>; + fn removeOLEDBSimpleProviderListener(&self, pospilistener: windows_core::Ref<'_, OLEDBSimpleProviderListener>) -> windows_core::Result<()>; fn isAsync(&self) -> windows_core::Result; fn getEstimatedRows(&self) -> windows_core::Result; fn stopTransfer(&self) -> windows_core::Result<()>; @@ -17667,11 +17667,11 @@ impl OLEDBSimpleProvider_Vtbl { } unsafe extern "system" fn addOLEDBSimpleProviderListener(this: *mut core::ffi::c_void, pospilistener: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - OLEDBSimpleProvider_Impl::addOLEDBSimpleProviderListener(this, windows_core::from_raw_borrowed(&pospilistener)).into() + OLEDBSimpleProvider_Impl::addOLEDBSimpleProviderListener(this, core::mem::transmute_copy(&pospilistener)).into() } unsafe extern "system" fn removeOLEDBSimpleProviderListener(this: *mut core::ffi::c_void, pospilistener: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - OLEDBSimpleProvider_Impl::removeOLEDBSimpleProviderListener(this, windows_core::from_raw_borrowed(&pospilistener)).into() + OLEDBSimpleProvider_Impl::removeOLEDBSimpleProviderListener(this, core::mem::transmute_copy(&pospilistener)).into() } unsafe extern "system" fn isAsync(this: *mut core::ffi::c_void, pbasynch: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs index b112cb4f95..e318e85ad4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs @@ -135,24 +135,24 @@ pub struct ISettingsContext_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ISettingsContext_Impl: windows_core::IUnknownImpl { - fn Serialize(&self, pstream: Option<&super::Com::IStream>, ptarget: Option<&ITargetInfo>) -> windows_core::Result<()>; - fn Deserialize(&self, pstream: Option<&super::Com::IStream>, ptarget: Option<&ITargetInfo>, pppresults: *mut *mut Option) -> windows_core::Result; + fn Serialize(&self, pstream: windows_core::Ref<'_, super::Com::IStream>, ptarget: windows_core::Ref<'_, ITargetInfo>) -> windows_core::Result<()>; + fn Deserialize(&self, pstream: windows_core::Ref<'_, super::Com::IStream>, ptarget: windows_core::Ref<'_, ITargetInfo>, pppresults: *mut *mut Option) -> windows_core::Result; fn SetUserData(&self, puserdata: *const core::ffi::c_void) -> windows_core::Result<()>; fn GetUserData(&self) -> windows_core::Result<*mut core::ffi::c_void>; fn GetNamespaces(&self) -> windows_core::Result; - fn GetStoredSettings(&self, pidentity: Option<&ISettingsIdentity>, ppaddedsettings: *mut Option, ppmodifiedsettings: *mut Option, ppdeletedsettings: *mut Option) -> windows_core::Result<()>; - fn RevertSetting(&self, pidentity: Option<&ISettingsIdentity>, pwzsetting: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn GetStoredSettings(&self, pidentity: windows_core::Ref<'_, ISettingsIdentity>, ppaddedsettings: windows_core::OutRef<'_, IItemEnumerator>, ppmodifiedsettings: windows_core::OutRef<'_, IItemEnumerator>, ppdeletedsettings: windows_core::OutRef<'_, IItemEnumerator>) -> windows_core::Result<()>; + fn RevertSetting(&self, pidentity: windows_core::Ref<'_, ISettingsIdentity>, pwzsetting: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ISettingsContext_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Serialize(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, ptarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISettingsContext_Impl::Serialize(this, windows_core::from_raw_borrowed(&pstream), windows_core::from_raw_borrowed(&ptarget)).into() + ISettingsContext_Impl::Serialize(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&ptarget)).into() } unsafe extern "system" fn Deserialize(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, ptarget: *mut core::ffi::c_void, pppresults: *mut *mut *mut core::ffi::c_void, pcresultcount: *mut usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISettingsContext_Impl::Deserialize(this, windows_core::from_raw_borrowed(&pstream), windows_core::from_raw_borrowed(&ptarget), core::mem::transmute_copy(&pppresults)) { + match ISettingsContext_Impl::Deserialize(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&ptarget), core::mem::transmute_copy(&pppresults)) { Ok(ok__) => { pcresultcount.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -186,11 +186,11 @@ impl ISettingsContext_Vtbl { } unsafe extern "system" fn GetStoredSettings(this: *mut core::ffi::c_void, pidentity: *mut core::ffi::c_void, ppaddedsettings: *mut *mut core::ffi::c_void, ppmodifiedsettings: *mut *mut core::ffi::c_void, ppdeletedsettings: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISettingsContext_Impl::GetStoredSettings(this, windows_core::from_raw_borrowed(&pidentity), core::mem::transmute_copy(&ppaddedsettings), core::mem::transmute_copy(&ppmodifiedsettings), core::mem::transmute_copy(&ppdeletedsettings)).into() + ISettingsContext_Impl::GetStoredSettings(this, core::mem::transmute_copy(&pidentity), core::mem::transmute_copy(&ppaddedsettings), core::mem::transmute_copy(&ppmodifiedsettings), core::mem::transmute_copy(&ppdeletedsettings)).into() } unsafe extern "system" fn RevertSetting(this: *mut core::ffi::c_void, pidentity: *mut core::ffi::c_void, pwzsetting: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISettingsContext_Impl::RevertSetting(this, windows_core::from_raw_borrowed(&pidentity), core::mem::transmute(&pwzsetting)).into() + ISettingsContext_Impl::RevertSetting(this, core::mem::transmute_copy(&pidentity), core::mem::transmute(&pwzsetting)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -318,20 +318,20 @@ pub struct ISettingsEngine_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISettingsEngine_Impl: windows_core::IUnknownImpl { fn GetNamespaces(&self, flags: WcmNamespaceEnumerationFlags, reserved: *const core::ffi::c_void) -> windows_core::Result; - fn GetNamespace(&self, settingsid: Option<&ISettingsIdentity>, access: WcmNamespaceAccess, reserved: *const core::ffi::c_void) -> windows_core::Result; + fn GetNamespace(&self, settingsid: windows_core::Ref<'_, ISettingsIdentity>, access: WcmNamespaceAccess, reserved: *const core::ffi::c_void) -> windows_core::Result; fn GetErrorDescription(&self, hresult: i32) -> windows_core::Result; fn CreateSettingsIdentity(&self) -> windows_core::Result; fn GetStoreStatus(&self, reserved: *const core::ffi::c_void) -> windows_core::Result; fn LoadStore(&self, flags: u32) -> windows_core::Result<()>; fn UnloadStore(&self, reserved: *const core::ffi::c_void) -> windows_core::Result<()>; - fn RegisterNamespace(&self, settingsid: Option<&ISettingsIdentity>, stream: Option<&super::Com::IStream>, pushsettings: super::super::Foundation::BOOL) -> windows_core::Result; - fn UnregisterNamespace(&self, settingsid: Option<&ISettingsIdentity>, removesettings: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn RegisterNamespace(&self, settingsid: windows_core::Ref<'_, ISettingsIdentity>, stream: windows_core::Ref<'_, super::Com::IStream>, pushsettings: super::super::Foundation::BOOL) -> windows_core::Result; + fn UnregisterNamespace(&self, settingsid: windows_core::Ref<'_, ISettingsIdentity>, removesettings: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn CreateTargetInfo(&self) -> windows_core::Result; fn GetTargetInfo(&self) -> windows_core::Result; - fn SetTargetInfo(&self, target: Option<&ITargetInfo>) -> windows_core::Result<()>; + fn SetTargetInfo(&self, target: windows_core::Ref<'_, ITargetInfo>) -> windows_core::Result<()>; fn CreateSettingsContext(&self, flags: u32, reserved: *const core::ffi::c_void) -> windows_core::Result; - fn SetSettingsContext(&self, settingscontext: Option<&ISettingsContext>) -> windows_core::Result<()>; - fn ApplySettingsContext(&self, settingscontext: Option<&ISettingsContext>, pppwzidentities: *mut *mut windows_core::PWSTR) -> windows_core::Result; + fn SetSettingsContext(&self, settingscontext: windows_core::Ref<'_, ISettingsContext>) -> windows_core::Result<()>; + fn ApplySettingsContext(&self, settingscontext: windows_core::Ref<'_, ISettingsContext>, pppwzidentities: *mut *mut windows_core::PWSTR) -> windows_core::Result; fn GetSettingsContext(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -349,7 +349,7 @@ impl ISettingsEngine_Vtbl { } unsafe extern "system" fn GetNamespace(this: *mut core::ffi::c_void, settingsid: *mut core::ffi::c_void, access: WcmNamespaceAccess, reserved: *const core::ffi::c_void, namespaceitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISettingsEngine_Impl::GetNamespace(this, windows_core::from_raw_borrowed(&settingsid), core::mem::transmute_copy(&access), core::mem::transmute_copy(&reserved)) { + match ISettingsEngine_Impl::GetNamespace(this, core::mem::transmute_copy(&settingsid), core::mem::transmute_copy(&access), core::mem::transmute_copy(&reserved)) { Ok(ok__) => { namespaceitem.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -397,7 +397,7 @@ impl ISettingsEngine_Vtbl { } unsafe extern "system" fn RegisterNamespace(this: *mut core::ffi::c_void, settingsid: *mut core::ffi::c_void, stream: *mut core::ffi::c_void, pushsettings: super::super::Foundation::BOOL, results: *mut super::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISettingsEngine_Impl::RegisterNamespace(this, windows_core::from_raw_borrowed(&settingsid), windows_core::from_raw_borrowed(&stream), core::mem::transmute_copy(&pushsettings)) { + match ISettingsEngine_Impl::RegisterNamespace(this, core::mem::transmute_copy(&settingsid), core::mem::transmute_copy(&stream), core::mem::transmute_copy(&pushsettings)) { Ok(ok__) => { results.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -407,7 +407,7 @@ impl ISettingsEngine_Vtbl { } unsafe extern "system" fn UnregisterNamespace(this: *mut core::ffi::c_void, settingsid: *mut core::ffi::c_void, removesettings: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISettingsEngine_Impl::UnregisterNamespace(this, windows_core::from_raw_borrowed(&settingsid), core::mem::transmute_copy(&removesettings)).into() + ISettingsEngine_Impl::UnregisterNamespace(this, core::mem::transmute_copy(&settingsid), core::mem::transmute_copy(&removesettings)).into() } unsafe extern "system" fn CreateTargetInfo(this: *mut core::ffi::c_void, target: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -431,7 +431,7 @@ impl ISettingsEngine_Vtbl { } unsafe extern "system" fn SetTargetInfo(this: *mut core::ffi::c_void, target: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISettingsEngine_Impl::SetTargetInfo(this, windows_core::from_raw_borrowed(&target)).into() + ISettingsEngine_Impl::SetTargetInfo(this, core::mem::transmute_copy(&target)).into() } unsafe extern "system" fn CreateSettingsContext(this: *mut core::ffi::c_void, flags: u32, reserved: *const core::ffi::c_void, settingscontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -445,11 +445,11 @@ impl ISettingsEngine_Vtbl { } unsafe extern "system" fn SetSettingsContext(this: *mut core::ffi::c_void, settingscontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISettingsEngine_Impl::SetSettingsContext(this, windows_core::from_raw_borrowed(&settingscontext)).into() + ISettingsEngine_Impl::SetSettingsContext(this, core::mem::transmute_copy(&settingscontext)).into() } unsafe extern "system" fn ApplySettingsContext(this: *mut core::ffi::c_void, settingscontext: *mut core::ffi::c_void, pppwzidentities: *mut *mut windows_core::PWSTR, pcidentities: *mut usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISettingsEngine_Impl::ApplySettingsContext(this, windows_core::from_raw_borrowed(&settingscontext), core::mem::transmute_copy(&pppwzidentities)) { + match ISettingsEngine_Impl::ApplySettingsContext(this, core::mem::transmute_copy(&settingscontext), core::mem::transmute_copy(&pppwzidentities)) { Ok(ok__) => { pcidentities.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs index 71ef902e7a..6df876d83b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs @@ -76,14 +76,14 @@ pub struct ISideShowBulkCapabilities_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait ISideShowBulkCapabilities_Impl: ISideShowCapabilities_Impl { - fn GetCapabilities(&self, in_keycollection: Option<&ISideShowKeyCollection>, inout_pvalues: *mut Option) -> windows_core::Result<()>; + fn GetCapabilities(&self, in_keycollection: windows_core::Ref<'_, ISideShowKeyCollection>, inout_pvalues: windows_core::OutRef<'_, ISideShowPropVariantCollection>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] impl ISideShowBulkCapabilities_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetCapabilities(this: *mut core::ffi::c_void, in_keycollection: *mut core::ffi::c_void, inout_pvalues: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISideShowBulkCapabilities_Impl::GetCapabilities(this, windows_core::from_raw_borrowed(&in_keycollection), core::mem::transmute_copy(&inout_pvalues)).into() + ISideShowBulkCapabilities_Impl::GetCapabilities(this, core::mem::transmute_copy(&in_keycollection), core::mem::transmute_copy(&inout_pvalues)).into() } Self { base__: ISideShowCapabilities_Vtbl::new::(), GetCapabilities: GetCapabilities:: } } @@ -205,7 +205,7 @@ pub struct ISideShowContent_Vtbl { pub DifferentiateContent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait ISideShowContent_Impl: windows_core::IUnknownImpl { - fn GetContent(&self, in_picapabilities: Option<&ISideShowCapabilities>, out_pdwsize: *mut u32, out_ppbdata: *mut *mut u8) -> windows_core::Result<()>; + fn GetContent(&self, in_picapabilities: windows_core::Ref<'_, ISideShowCapabilities>, out_pdwsize: *mut u32, out_ppbdata: *mut *mut u8) -> windows_core::Result<()>; fn ContentId(&self) -> windows_core::Result; fn DifferentiateContent(&self) -> windows_core::Result; } @@ -213,7 +213,7 @@ impl ISideShowContent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetContent(this: *mut core::ffi::c_void, in_picapabilities: *mut core::ffi::c_void, out_pdwsize: *mut u32, out_ppbdata: *mut *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISideShowContent_Impl::GetContent(this, windows_core::from_raw_borrowed(&in_picapabilities), core::mem::transmute_copy(&out_pdwsize), core::mem::transmute_copy(&out_ppbdata)).into() + ISideShowContent_Impl::GetContent(this, core::mem::transmute_copy(&in_picapabilities), core::mem::transmute_copy(&out_pdwsize), core::mem::transmute_copy(&out_ppbdata)).into() } unsafe extern "system" fn ContentId(this: *mut core::ffi::c_void, out_pcontentid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -283,17 +283,17 @@ pub struct ISideShowContentManager_Vtbl { pub GetDeviceCapabilities: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISideShowContentManager_Impl: windows_core::IUnknownImpl { - fn Add(&self, in_picontent: Option<&ISideShowContent>) -> windows_core::Result<()>; + fn Add(&self, in_picontent: windows_core::Ref<'_, ISideShowContent>) -> windows_core::Result<()>; fn Remove(&self, in_contentid: u32) -> windows_core::Result<()>; fn RemoveAll(&self) -> windows_core::Result<()>; - fn SetEventSink(&self, in_pievents: Option<&ISideShowEvents>) -> windows_core::Result<()>; + fn SetEventSink(&self, in_pievents: windows_core::Ref<'_, ISideShowEvents>) -> windows_core::Result<()>; fn GetDeviceCapabilities(&self) -> windows_core::Result; } impl ISideShowContentManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Add(this: *mut core::ffi::c_void, in_picontent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISideShowContentManager_Impl::Add(this, windows_core::from_raw_borrowed(&in_picontent)).into() + ISideShowContentManager_Impl::Add(this, core::mem::transmute_copy(&in_picontent)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, in_contentid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -305,7 +305,7 @@ impl ISideShowContentManager_Vtbl { } unsafe extern "system" fn SetEventSink(this: *mut core::ffi::c_void, in_pievents: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISideShowContentManager_Impl::SetEventSink(this, windows_core::from_raw_borrowed(&in_pievents)).into() + ISideShowContentManager_Impl::SetEventSink(this, core::mem::transmute_copy(&in_pievents)).into() } unsafe extern "system" fn GetDeviceCapabilities(this: *mut core::ffi::c_void, out_ppcollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -367,9 +367,9 @@ pub struct ISideShowEvents_Vtbl { } pub trait ISideShowEvents_Impl: windows_core::IUnknownImpl { fn ContentMissing(&self, in_contentid: u32) -> windows_core::Result; - fn ApplicationEvent(&self, in_picapabilities: Option<&ISideShowCapabilities>, in_dweventid: u32, in_dweventsize: u32, in_pbeventdata: *const u8) -> windows_core::Result<()>; - fn DeviceAdded(&self, in_pidevice: Option<&ISideShowCapabilities>) -> windows_core::Result<()>; - fn DeviceRemoved(&self, in_pidevice: Option<&ISideShowCapabilities>) -> windows_core::Result<()>; + fn ApplicationEvent(&self, in_picapabilities: windows_core::Ref<'_, ISideShowCapabilities>, in_dweventid: u32, in_dweventsize: u32, in_pbeventdata: *const u8) -> windows_core::Result<()>; + fn DeviceAdded(&self, in_pidevice: windows_core::Ref<'_, ISideShowCapabilities>) -> windows_core::Result<()>; + fn DeviceRemoved(&self, in_pidevice: windows_core::Ref<'_, ISideShowCapabilities>) -> windows_core::Result<()>; } impl ISideShowEvents_Vtbl { pub const fn new() -> Self { @@ -385,15 +385,15 @@ impl ISideShowEvents_Vtbl { } unsafe extern "system" fn ApplicationEvent(this: *mut core::ffi::c_void, in_picapabilities: *mut core::ffi::c_void, in_dweventid: u32, in_dweventsize: u32, in_pbeventdata: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISideShowEvents_Impl::ApplicationEvent(this, windows_core::from_raw_borrowed(&in_picapabilities), core::mem::transmute_copy(&in_dweventid), core::mem::transmute_copy(&in_dweventsize), core::mem::transmute_copy(&in_pbeventdata)).into() + ISideShowEvents_Impl::ApplicationEvent(this, core::mem::transmute_copy(&in_picapabilities), core::mem::transmute_copy(&in_dweventid), core::mem::transmute_copy(&in_dweventsize), core::mem::transmute_copy(&in_pbeventdata)).into() } unsafe extern "system" fn DeviceAdded(this: *mut core::ffi::c_void, in_pidevice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISideShowEvents_Impl::DeviceAdded(this, windows_core::from_raw_borrowed(&in_pidevice)).into() + ISideShowEvents_Impl::DeviceAdded(this, core::mem::transmute_copy(&in_pidevice)).into() } unsafe extern "system" fn DeviceRemoved(this: *mut core::ffi::c_void, in_pidevice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISideShowEvents_Impl::DeviceRemoved(this, windows_core::from_raw_borrowed(&in_pidevice)).into() + ISideShowEvents_Impl::DeviceRemoved(this, core::mem::transmute_copy(&in_pidevice)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -676,7 +676,7 @@ pub struct ISideShowNotificationManager_Vtbl { pub RevokeAll: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISideShowNotificationManager_Impl: windows_core::IUnknownImpl { - fn Show(&self, in_pinotification: Option<&ISideShowNotification>) -> windows_core::Result<()>; + fn Show(&self, in_pinotification: windows_core::Ref<'_, ISideShowNotification>) -> windows_core::Result<()>; fn Revoke(&self, in_notificationid: u32) -> windows_core::Result<()>; fn RevokeAll(&self) -> windows_core::Result<()>; } @@ -684,7 +684,7 @@ impl ISideShowNotificationManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Show(this: *mut core::ffi::c_void, in_pinotification: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISideShowNotificationManager_Impl::Show(this, windows_core::from_raw_borrowed(&in_pinotification)).into() + ISideShowNotificationManager_Impl::Show(this, core::mem::transmute_copy(&in_pinotification)).into() } unsafe extern "system" fn Revoke(this: *mut core::ffi::c_void, in_notificationid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs b/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs index 02d4baa4d8..c10a851431 100644 --- a/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/TaskScheduler/mod.rs @@ -564,7 +564,7 @@ pub trait IEmailAction_Impl: IAction_Impl { fn From(&self, pfrom: *mut windows_core::BSTR) -> windows_core::Result<()>; fn SetFrom(&self, from: &windows_core::BSTR) -> windows_core::Result<()>; fn HeaderFields(&self) -> windows_core::Result; - fn SetHeaderFields(&self, pheaderfields: Option<&ITaskNamedValueCollection>) -> windows_core::Result<()>; + fn SetHeaderFields(&self, pheaderfields: windows_core::Ref<'_, ITaskNamedValueCollection>) -> windows_core::Result<()>; fn Body(&self, pbody: *mut windows_core::BSTR) -> windows_core::Result<()>; fn SetBody(&self, body: &windows_core::BSTR) -> windows_core::Result<()>; fn Attachments(&self, pattachements: *mut *mut super::Com::SAFEARRAY) -> windows_core::Result<()>; @@ -641,7 +641,7 @@ impl IEmailAction_Vtbl { } unsafe extern "system" fn SetHeaderFields(this: *mut core::ffi::c_void, pheaderfields: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IEmailAction_Impl::SetHeaderFields(this, windows_core::from_raw_borrowed(&pheaderfields)).into() + IEmailAction_Impl::SetHeaderFields(this, core::mem::transmute_copy(&pheaderfields)).into() } unsafe extern "system" fn Body(this: *mut core::ffi::c_void, pbody: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -811,7 +811,7 @@ pub trait IEventTrigger_Impl: ITrigger_Impl { fn Delay(&self, pdelay: *mut windows_core::BSTR) -> windows_core::Result<()>; fn SetDelay(&self, delay: &windows_core::BSTR) -> windows_core::Result<()>; fn ValueQueries(&self) -> windows_core::Result; - fn SetValueQueries(&self, pnamedxpaths: Option<&ITaskNamedValueCollection>) -> windows_core::Result<()>; + fn SetValueQueries(&self, pnamedxpaths: windows_core::Ref<'_, ITaskNamedValueCollection>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IEventTrigger_Vtbl { @@ -844,7 +844,7 @@ impl IEventTrigger_Vtbl { } unsafe extern "system" fn SetValueQueries(this: *mut core::ffi::c_void, pnamedxpaths: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IEventTrigger_Impl::SetValueQueries(this, windows_core::from_raw_borrowed(&pnamedxpaths)).into() + IEventTrigger_Impl::SetValueQueries(this, core::mem::transmute_copy(&pnamedxpaths)).into() } Self { base__: ITrigger_Vtbl::new::(), @@ -3107,7 +3107,7 @@ pub struct IScheduledWorkItem_Vtbl { pub GetAccountInformation: unsafe extern "system" fn(*mut core::ffi::c_void, *mut windows_core::PWSTR) -> windows_core::HRESULT, } pub trait IScheduledWorkItem_Impl: windows_core::IUnknownImpl { - fn CreateTrigger(&self, pinewtrigger: *mut u16, pptrigger: *mut Option) -> windows_core::Result<()>; + fn CreateTrigger(&self, pinewtrigger: *mut u16, pptrigger: windows_core::OutRef<'_, ITaskTrigger>) -> windows_core::Result<()>; fn DeleteTrigger(&self, itrigger: u16) -> windows_core::Result<()>; fn GetTriggerCount(&self) -> windows_core::Result; fn GetTrigger(&self, itrigger: u16) -> windows_core::Result; @@ -3831,17 +3831,17 @@ pub struct ITaskDefinition_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITaskDefinition_Impl: super::Com::IDispatch_Impl { fn RegistrationInfo(&self) -> windows_core::Result; - fn SetRegistrationInfo(&self, pregistrationinfo: Option<&IRegistrationInfo>) -> windows_core::Result<()>; + fn SetRegistrationInfo(&self, pregistrationinfo: windows_core::Ref<'_, IRegistrationInfo>) -> windows_core::Result<()>; fn Triggers(&self) -> windows_core::Result; - fn SetTriggers(&self, ptriggers: Option<&ITriggerCollection>) -> windows_core::Result<()>; + fn SetTriggers(&self, ptriggers: windows_core::Ref<'_, ITriggerCollection>) -> windows_core::Result<()>; fn Settings(&self) -> windows_core::Result; - fn SetSettings(&self, psettings: Option<&ITaskSettings>) -> windows_core::Result<()>; + fn SetSettings(&self, psettings: windows_core::Ref<'_, ITaskSettings>) -> windows_core::Result<()>; fn Data(&self, pdata: *mut windows_core::BSTR) -> windows_core::Result<()>; fn SetData(&self, data: &windows_core::BSTR) -> windows_core::Result<()>; fn Principal(&self) -> windows_core::Result; - fn SetPrincipal(&self, pprincipal: Option<&IPrincipal>) -> windows_core::Result<()>; + fn SetPrincipal(&self, pprincipal: windows_core::Ref<'_, IPrincipal>) -> windows_core::Result<()>; fn Actions(&self) -> windows_core::Result; - fn SetActions(&self, pactions: Option<&IActionCollection>) -> windows_core::Result<()>; + fn SetActions(&self, pactions: windows_core::Ref<'_, IActionCollection>) -> windows_core::Result<()>; fn XmlText(&self, pxml: *mut windows_core::BSTR) -> windows_core::Result<()>; fn SetXmlText(&self, xml: &windows_core::BSTR) -> windows_core::Result<()>; } @@ -3860,7 +3860,7 @@ impl ITaskDefinition_Vtbl { } unsafe extern "system" fn SetRegistrationInfo(this: *mut core::ffi::c_void, pregistrationinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskDefinition_Impl::SetRegistrationInfo(this, windows_core::from_raw_borrowed(&pregistrationinfo)).into() + ITaskDefinition_Impl::SetRegistrationInfo(this, core::mem::transmute_copy(&pregistrationinfo)).into() } unsafe extern "system" fn Triggers(this: *mut core::ffi::c_void, pptriggers: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3874,7 +3874,7 @@ impl ITaskDefinition_Vtbl { } unsafe extern "system" fn SetTriggers(this: *mut core::ffi::c_void, ptriggers: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskDefinition_Impl::SetTriggers(this, windows_core::from_raw_borrowed(&ptriggers)).into() + ITaskDefinition_Impl::SetTriggers(this, core::mem::transmute_copy(&ptriggers)).into() } unsafe extern "system" fn Settings(this: *mut core::ffi::c_void, ppsettings: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3888,7 +3888,7 @@ impl ITaskDefinition_Vtbl { } unsafe extern "system" fn SetSettings(this: *mut core::ffi::c_void, psettings: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskDefinition_Impl::SetSettings(this, windows_core::from_raw_borrowed(&psettings)).into() + ITaskDefinition_Impl::SetSettings(this, core::mem::transmute_copy(&psettings)).into() } unsafe extern "system" fn Data(this: *mut core::ffi::c_void, pdata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3910,7 +3910,7 @@ impl ITaskDefinition_Vtbl { } unsafe extern "system" fn SetPrincipal(this: *mut core::ffi::c_void, pprincipal: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskDefinition_Impl::SetPrincipal(this, windows_core::from_raw_borrowed(&pprincipal)).into() + ITaskDefinition_Impl::SetPrincipal(this, core::mem::transmute_copy(&pprincipal)).into() } unsafe extern "system" fn Actions(this: *mut core::ffi::c_void, ppactions: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3924,7 +3924,7 @@ impl ITaskDefinition_Vtbl { } unsafe extern "system" fn SetActions(this: *mut core::ffi::c_void, pactions: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskDefinition_Impl::SetActions(this, windows_core::from_raw_borrowed(&pactions)).into() + ITaskDefinition_Impl::SetActions(this, core::mem::transmute_copy(&pactions)).into() } unsafe extern "system" fn XmlText(this: *mut core::ffi::c_void, pxml: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4066,7 +4066,7 @@ pub trait ITaskFolder_Impl: super::Com::IDispatch_Impl { fn GetTasks(&self, flags: i32) -> windows_core::Result; fn DeleteTask(&self, name: &windows_core::BSTR, flags: i32) -> windows_core::Result<()>; fn RegisterTask(&self, path: &windows_core::BSTR, xmltext: &windows_core::BSTR, flags: i32, userid: &super::Variant::VARIANT, password: &super::Variant::VARIANT, logontype: TASK_LOGON_TYPE, sddl: &super::Variant::VARIANT) -> windows_core::Result; - fn RegisterTaskDefinition(&self, path: &windows_core::BSTR, pdefinition: Option<&ITaskDefinition>, flags: i32, userid: &super::Variant::VARIANT, password: &super::Variant::VARIANT, logontype: TASK_LOGON_TYPE, sddl: &super::Variant::VARIANT) -> windows_core::Result; + fn RegisterTaskDefinition(&self, path: &windows_core::BSTR, pdefinition: windows_core::Ref<'_, ITaskDefinition>, flags: i32, userid: &super::Variant::VARIANT, password: &super::Variant::VARIANT, logontype: TASK_LOGON_TYPE, sddl: &super::Variant::VARIANT) -> windows_core::Result; fn GetSecurityDescriptor(&self, securityinformation: i32) -> windows_core::Result; fn SetSecurityDescriptor(&self, sddl: &windows_core::BSTR, flags: i32) -> windows_core::Result<()>; } @@ -4163,7 +4163,7 @@ impl ITaskFolder_Vtbl { } unsafe extern "system" fn RegisterTaskDefinition(this: *mut core::ffi::c_void, path: *mut core::ffi::c_void, pdefinition: *mut core::ffi::c_void, flags: i32, userid: super::Variant::VARIANT, password: super::Variant::VARIANT, logontype: TASK_LOGON_TYPE, sddl: super::Variant::VARIANT, pptask: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITaskFolder_Impl::RegisterTaskDefinition(this, core::mem::transmute(&path), windows_core::from_raw_borrowed(&pdefinition), core::mem::transmute_copy(&flags), core::mem::transmute(&userid), core::mem::transmute(&password), core::mem::transmute_copy(&logontype), core::mem::transmute(&sddl)) { + match ITaskFolder_Impl::RegisterTaskDefinition(this, core::mem::transmute(&path), core::mem::transmute_copy(&pdefinition), core::mem::transmute_copy(&flags), core::mem::transmute(&userid), core::mem::transmute(&password), core::mem::transmute_copy(&logontype), core::mem::transmute(&sddl)) { Ok(ok__) => { pptask.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4327,7 +4327,7 @@ pub struct ITaskHandler_Vtbl { pub Resume: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITaskHandler_Impl: windows_core::IUnknownImpl { - fn Start(&self, phandlerservices: Option<&windows_core::IUnknown>, data: &windows_core::BSTR) -> windows_core::Result<()>; + fn Start(&self, phandlerservices: windows_core::Ref<'_, windows_core::IUnknown>, data: &windows_core::BSTR) -> windows_core::Result<()>; fn Stop(&self) -> windows_core::Result; fn Pause(&self) -> windows_core::Result<()>; fn Resume(&self) -> windows_core::Result<()>; @@ -4336,7 +4336,7 @@ impl ITaskHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Start(this: *mut core::ffi::c_void, phandlerservices: *mut core::ffi::c_void, data: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskHandler_Impl::Start(this, windows_core::from_raw_borrowed(&phandlerservices), core::mem::transmute(&data)).into() + ITaskHandler_Impl::Start(this, core::mem::transmute_copy(&phandlerservices), core::mem::transmute(&data)).into() } unsafe extern "system" fn Stop(this: *mut core::ffi::c_void, pretcode: *mut windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4671,7 +4671,7 @@ pub trait ITaskScheduler_Impl: windows_core::IUnknownImpl { fn Activate(&self, pwszname: &windows_core::PCWSTR, riid: *const windows_core::GUID) -> windows_core::Result; fn Delete(&self, pwszname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn NewWorkItem(&self, pwsztaskname: &windows_core::PCWSTR, rclsid: *const windows_core::GUID, riid: *const windows_core::GUID) -> windows_core::Result; - fn AddWorkItem(&self, pwsztaskname: &windows_core::PCWSTR, pworkitem: Option<&IScheduledWorkItem>) -> windows_core::Result<()>; + fn AddWorkItem(&self, pwsztaskname: &windows_core::PCWSTR, pworkitem: windows_core::Ref<'_, IScheduledWorkItem>) -> windows_core::Result<()>; fn IsOfType(&self, pwszname: &windows_core::PCWSTR, riid: *const windows_core::GUID) -> windows_core::Result<()>; } impl ITaskScheduler_Vtbl { @@ -4726,7 +4726,7 @@ impl ITaskScheduler_Vtbl { } unsafe extern "system" fn AddWorkItem(this: *mut core::ffi::c_void, pwsztaskname: windows_core::PCWSTR, pworkitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskScheduler_Impl::AddWorkItem(this, core::mem::transmute(&pwsztaskname), windows_core::from_raw_borrowed(&pworkitem)).into() + ITaskScheduler_Impl::AddWorkItem(this, core::mem::transmute(&pwsztaskname), core::mem::transmute_copy(&pworkitem)).into() } unsafe extern "system" fn IsOfType(this: *mut core::ffi::c_void, pwszname: windows_core::PCWSTR, riid: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5156,13 +5156,13 @@ pub trait ITaskSettings_Impl: super::Com::IDispatch_Impl { fn Hidden(&self, phidden: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SetHidden(&self, hidden: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn IdleSettings(&self) -> windows_core::Result; - fn SetIdleSettings(&self, pidlesettings: Option<&IIdleSettings>) -> windows_core::Result<()>; + fn SetIdleSettings(&self, pidlesettings: windows_core::Ref<'_, IIdleSettings>) -> windows_core::Result<()>; fn RunOnlyIfIdle(&self, prunonlyifidle: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SetRunOnlyIfIdle(&self, runonlyifidle: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn WakeToRun(&self, pwake: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SetWakeToRun(&self, wake: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn NetworkSettings(&self) -> windows_core::Result; - fn SetNetworkSettings(&self, pnetworksettings: Option<&INetworkSettings>) -> windows_core::Result<()>; + fn SetNetworkSettings(&self, pnetworksettings: windows_core::Ref<'_, INetworkSettings>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITaskSettings_Vtbl { @@ -5307,7 +5307,7 @@ impl ITaskSettings_Vtbl { } unsafe extern "system" fn SetIdleSettings(this: *mut core::ffi::c_void, pidlesettings: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskSettings_Impl::SetIdleSettings(this, windows_core::from_raw_borrowed(&pidlesettings)).into() + ITaskSettings_Impl::SetIdleSettings(this, core::mem::transmute_copy(&pidlesettings)).into() } unsafe extern "system" fn RunOnlyIfIdle(this: *mut core::ffi::c_void, prunonlyifidle: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5337,7 +5337,7 @@ impl ITaskSettings_Vtbl { } unsafe extern "system" fn SetNetworkSettings(this: *mut core::ffi::c_void, pnetworksettings: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskSettings_Impl::SetNetworkSettings(this, windows_core::from_raw_borrowed(&pnetworksettings)).into() + ITaskSettings_Impl::SetNetworkSettings(this, core::mem::transmute_copy(&pnetworksettings)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), @@ -5531,7 +5531,7 @@ pub trait ITaskSettings3_Impl: ITaskSettings_Impl { fn UseUnifiedSchedulingEngine(&self, puseunifiedengine: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SetUseUnifiedSchedulingEngine(&self, useunifiedengine: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn MaintenanceSettings(&self) -> windows_core::Result; - fn SetMaintenanceSettings(&self, pmaintenancesettings: Option<&IMaintenanceSettings>) -> windows_core::Result<()>; + fn SetMaintenanceSettings(&self, pmaintenancesettings: windows_core::Ref<'_, IMaintenanceSettings>) -> windows_core::Result<()>; fn CreateMaintenanceSettings(&self) -> windows_core::Result; fn Volatile(&self, pvolatile: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SetVolatile(&self, volatile: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; @@ -5567,7 +5567,7 @@ impl ITaskSettings3_Vtbl { } unsafe extern "system" fn SetMaintenanceSettings(this: *mut core::ffi::c_void, pmaintenancesettings: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITaskSettings3_Impl::SetMaintenanceSettings(this, windows_core::from_raw_borrowed(&pmaintenancesettings)).into() + ITaskSettings3_Impl::SetMaintenanceSettings(this, core::mem::transmute_copy(&pmaintenancesettings)).into() } unsafe extern "system" fn CreateMaintenanceSettings(this: *mut core::ffi::c_void, ppmaintenancesettings: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5865,7 +5865,7 @@ pub trait ITrigger_Impl: super::Com::IDispatch_Impl { fn Id(&self, pid: *mut windows_core::BSTR) -> windows_core::Result<()>; fn SetId(&self, id: &windows_core::BSTR) -> windows_core::Result<()>; fn Repetition(&self) -> windows_core::Result; - fn SetRepetition(&self, prepeat: Option<&IRepetitionPattern>) -> windows_core::Result<()>; + fn SetRepetition(&self, prepeat: windows_core::Ref<'_, IRepetitionPattern>) -> windows_core::Result<()>; fn ExecutionTimeLimit(&self, ptimelimit: *mut windows_core::BSTR) -> windows_core::Result<()>; fn SetExecutionTimeLimit(&self, timelimit: &windows_core::BSTR) -> windows_core::Result<()>; fn StartBoundary(&self, pstart: *mut windows_core::BSTR) -> windows_core::Result<()>; @@ -5902,7 +5902,7 @@ impl ITrigger_Vtbl { } unsafe extern "system" fn SetRepetition(this: *mut core::ffi::c_void, prepeat: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITrigger_Impl::SetRepetition(this, windows_core::from_raw_borrowed(&prepeat)).into() + ITrigger_Impl::SetRepetition(this, core::mem::transmute_copy(&prepeat)).into() } unsafe extern "system" fn ExecutionTimeLimit(this: *mut core::ffi::c_void, ptimelimit: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs index 811282ab59..7dd6b51bad 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs @@ -2195,7 +2195,7 @@ pub struct IRtwqAsyncCallback_Vtbl { } pub trait IRtwqAsyncCallback_Impl: windows_core::IUnknownImpl { fn GetParameters(&self, pdwflags: *mut u32, pdwqueue: *mut u32) -> windows_core::Result<()>; - fn Invoke(&self, pasyncresult: Option<&IRtwqAsyncResult>) -> windows_core::Result<()>; + fn Invoke(&self, pasyncresult: windows_core::Ref<'_, IRtwqAsyncResult>) -> windows_core::Result<()>; } impl IRtwqAsyncCallback_Vtbl { pub const fn new() -> Self { @@ -2205,7 +2205,7 @@ impl IRtwqAsyncCallback_Vtbl { } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, pasyncresult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRtwqAsyncCallback_Impl::Invoke(this, windows_core::from_raw_borrowed(&pasyncresult)).into() + IRtwqAsyncCallback_Impl::Invoke(this, core::mem::transmute_copy(&pasyncresult)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/UpdateAgent/mod.rs b/crates/libs/windows/src/Windows/Win32/System/UpdateAgent/mod.rs index c2f787c940..99ee6edcdc 100644 --- a/crates/libs/windows/src/Windows/Win32/System/UpdateAgent/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/UpdateAgent/mod.rs @@ -908,14 +908,14 @@ pub struct IDownloadCompletedCallback_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IDownloadCompletedCallback_Impl: windows_core::IUnknownImpl { - fn Invoke(&self, downloadjob: Option<&IDownloadJob>, callbackargs: Option<&IDownloadCompletedCallbackArgs>) -> windows_core::Result<()>; + fn Invoke(&self, downloadjob: windows_core::Ref<'_, IDownloadJob>, callbackargs: windows_core::Ref<'_, IDownloadCompletedCallbackArgs>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IDownloadCompletedCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, downloadjob: *mut core::ffi::c_void, callbackargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDownloadCompletedCallback_Impl::Invoke(this, windows_core::from_raw_borrowed(&downloadjob), windows_core::from_raw_borrowed(&callbackargs)).into() + IDownloadCompletedCallback_Impl::Invoke(this, core::mem::transmute_copy(&downloadjob), core::mem::transmute_copy(&callbackargs)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Invoke: Invoke:: } } @@ -1291,14 +1291,14 @@ pub struct IDownloadProgressChangedCallback_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IDownloadProgressChangedCallback_Impl: windows_core::IUnknownImpl { - fn Invoke(&self, downloadjob: Option<&IDownloadJob>, callbackargs: Option<&IDownloadProgressChangedCallbackArgs>) -> windows_core::Result<()>; + fn Invoke(&self, downloadjob: windows_core::Ref<'_, IDownloadJob>, callbackargs: windows_core::Ref<'_, IDownloadProgressChangedCallbackArgs>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IDownloadProgressChangedCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, downloadjob: *mut core::ffi::c_void, callbackargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDownloadProgressChangedCallback_Impl::Invoke(this, windows_core::from_raw_borrowed(&downloadjob), windows_core::from_raw_borrowed(&callbackargs)).into() + IDownloadProgressChangedCallback_Impl::Invoke(this, core::mem::transmute_copy(&downloadjob), core::mem::transmute_copy(&callbackargs)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Invoke: Invoke:: } } @@ -1574,14 +1574,14 @@ pub struct IInstallationAgent_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IInstallationAgent_Impl: super::Com::IDispatch_Impl { - fn RecordInstallationResult(&self, installationresultcookie: &windows_core::BSTR, hresult: i32, extendedreportingdata: Option<&IStringCollection>) -> windows_core::Result<()>; + fn RecordInstallationResult(&self, installationresultcookie: &windows_core::BSTR, hresult: i32, extendedreportingdata: windows_core::Ref<'_, IStringCollection>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IInstallationAgent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RecordInstallationResult(this: *mut core::ffi::c_void, installationresultcookie: *mut core::ffi::c_void, hresult: i32, extendedreportingdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInstallationAgent_Impl::RecordInstallationResult(this, core::mem::transmute(&installationresultcookie), core::mem::transmute_copy(&hresult), windows_core::from_raw_borrowed(&extendedreportingdata)).into() + IInstallationAgent_Impl::RecordInstallationResult(this, core::mem::transmute(&installationresultcookie), core::mem::transmute_copy(&hresult), core::mem::transmute_copy(&extendedreportingdata)).into() } Self { base__: super::Com::IDispatch_Vtbl::new::(), RecordInstallationResult: RecordInstallationResult:: } } @@ -1716,14 +1716,14 @@ pub struct IInstallationCompletedCallback_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IInstallationCompletedCallback_Impl: windows_core::IUnknownImpl { - fn Invoke(&self, installationjob: Option<&IInstallationJob>, callbackargs: Option<&IInstallationCompletedCallbackArgs>) -> windows_core::Result<()>; + fn Invoke(&self, installationjob: windows_core::Ref<'_, IInstallationJob>, callbackargs: windows_core::Ref<'_, IInstallationCompletedCallbackArgs>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IInstallationCompletedCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, installationjob: *mut core::ffi::c_void, callbackargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInstallationCompletedCallback_Impl::Invoke(this, windows_core::from_raw_borrowed(&installationjob), windows_core::from_raw_borrowed(&callbackargs)).into() + IInstallationCompletedCallback_Impl::Invoke(this, core::mem::transmute_copy(&installationjob), core::mem::transmute_copy(&callbackargs)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Invoke: Invoke:: } } @@ -2014,14 +2014,14 @@ pub struct IInstallationProgressChangedCallback_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IInstallationProgressChangedCallback_Impl: windows_core::IUnknownImpl { - fn Invoke(&self, installationjob: Option<&IInstallationJob>, callbackargs: Option<&IInstallationProgressChangedCallbackArgs>) -> windows_core::Result<()>; + fn Invoke(&self, installationjob: windows_core::Ref<'_, IInstallationJob>, callbackargs: windows_core::Ref<'_, IInstallationProgressChangedCallbackArgs>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IInstallationProgressChangedCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, installationjob: *mut core::ffi::c_void, callbackargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInstallationProgressChangedCallback_Impl::Invoke(this, windows_core::from_raw_borrowed(&installationjob), windows_core::from_raw_borrowed(&callbackargs)).into() + IInstallationProgressChangedCallback_Impl::Invoke(this, core::mem::transmute_copy(&installationjob), core::mem::transmute_copy(&callbackargs)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Invoke: Invoke:: } } @@ -2254,14 +2254,14 @@ pub struct ISearchCompletedCallback_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ISearchCompletedCallback_Impl: windows_core::IUnknownImpl { - fn Invoke(&self, searchjob: Option<&ISearchJob>, callbackargs: Option<&ISearchCompletedCallbackArgs>) -> windows_core::Result<()>; + fn Invoke(&self, searchjob: windows_core::Ref<'_, ISearchJob>, callbackargs: windows_core::Ref<'_, ISearchCompletedCallbackArgs>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ISearchCompletedCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, searchjob: *mut core::ffi::c_void, callbackargs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISearchCompletedCallback_Impl::Invoke(this, windows_core::from_raw_borrowed(&searchjob), windows_core::from_raw_borrowed(&callbackargs)).into() + ISearchCompletedCallback_Impl::Invoke(this, core::mem::transmute_copy(&searchjob), core::mem::transmute_copy(&callbackargs)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Invoke: Invoke:: } } @@ -3571,7 +3571,7 @@ pub trait IUpdate2_Impl: IUpdate_Impl { fn RebootRequired(&self) -> windows_core::Result; fn IsPresent(&self) -> windows_core::Result; fn CveIDs(&self) -> windows_core::Result; - fn CopyToCache(&self, pfiles: Option<&IStringCollection>) -> windows_core::Result<()>; + fn CopyToCache(&self, pfiles: windows_core::Ref<'_, IStringCollection>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUpdate2_Vtbl { @@ -3608,7 +3608,7 @@ impl IUpdate2_Vtbl { } unsafe extern "system" fn CopyToCache(this: *mut core::ffi::c_void, pfiles: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUpdate2_Impl::CopyToCache(this, windows_core::from_raw_borrowed(&pfiles)).into() + IUpdate2_Impl::CopyToCache(this, core::mem::transmute_copy(&pfiles)).into() } Self { base__: IUpdate_Vtbl::new::(), @@ -3868,14 +3868,14 @@ pub struct IUpdateCollection_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUpdateCollection_Impl: super::Com::IDispatch_Impl { fn get_Item(&self, index: i32) -> windows_core::Result; - fn put_Item(&self, index: i32, value: Option<&IUpdate>) -> windows_core::Result<()>; + fn put_Item(&self, index: i32, value: windows_core::Ref<'_, IUpdate>) -> windows_core::Result<()>; fn _NewEnum(&self) -> windows_core::Result; fn Count(&self) -> windows_core::Result; fn ReadOnly(&self) -> windows_core::Result; - fn Add(&self, value: Option<&IUpdate>) -> windows_core::Result; + fn Add(&self, value: windows_core::Ref<'_, IUpdate>) -> windows_core::Result; fn Clear(&self) -> windows_core::Result<()>; fn Copy(&self) -> windows_core::Result; - fn Insert(&self, index: i32, value: Option<&IUpdate>) -> windows_core::Result<()>; + fn Insert(&self, index: i32, value: windows_core::Ref<'_, IUpdate>) -> windows_core::Result<()>; fn RemoveAt(&self, index: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -3893,7 +3893,7 @@ impl IUpdateCollection_Vtbl { } unsafe extern "system" fn put_Item(this: *mut core::ffi::c_void, index: i32, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUpdateCollection_Impl::put_Item(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&value)).into() + IUpdateCollection_Impl::put_Item(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn _NewEnum(this: *mut core::ffi::c_void, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3927,7 +3927,7 @@ impl IUpdateCollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, retval: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateCollection_Impl::Add(this, windows_core::from_raw_borrowed(&value)) { + match IUpdateCollection_Impl::Add(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { retval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3951,7 +3951,7 @@ impl IUpdateCollection_Vtbl { } unsafe extern "system" fn Insert(this: *mut core::ffi::c_void, index: i32, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUpdateCollection_Impl::Insert(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&value)).into() + IUpdateCollection_Impl::Insert(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4319,10 +4319,10 @@ pub trait IUpdateDownloader_Impl: super::Com::IDispatch_Impl { fn Priority(&self) -> windows_core::Result; fn SetPriority(&self, value: DownloadPriority) -> windows_core::Result<()>; fn Updates(&self) -> windows_core::Result; - fn SetUpdates(&self, value: Option<&IUpdateCollection>) -> windows_core::Result<()>; - fn BeginDownload(&self, onprogresschanged: Option<&windows_core::IUnknown>, oncompleted: Option<&windows_core::IUnknown>, state: &super::Variant::VARIANT) -> windows_core::Result; + fn SetUpdates(&self, value: windows_core::Ref<'_, IUpdateCollection>) -> windows_core::Result<()>; + fn BeginDownload(&self, onprogresschanged: windows_core::Ref<'_, windows_core::IUnknown>, oncompleted: windows_core::Ref<'_, windows_core::IUnknown>, state: &super::Variant::VARIANT) -> windows_core::Result; fn Download(&self) -> windows_core::Result; - fn EndDownload(&self, value: Option<&IDownloadJob>) -> windows_core::Result; + fn EndDownload(&self, value: windows_core::Ref<'_, IDownloadJob>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUpdateDownloader_Vtbl { @@ -4381,11 +4381,11 @@ impl IUpdateDownloader_Vtbl { } unsafe extern "system" fn SetUpdates(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUpdateDownloader_Impl::SetUpdates(this, windows_core::from_raw_borrowed(&value)).into() + IUpdateDownloader_Impl::SetUpdates(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn BeginDownload(this: *mut core::ffi::c_void, onprogresschanged: *mut core::ffi::c_void, oncompleted: *mut core::ffi::c_void, state: super::Variant::VARIANT, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateDownloader_Impl::BeginDownload(this, windows_core::from_raw_borrowed(&onprogresschanged), windows_core::from_raw_borrowed(&oncompleted), core::mem::transmute(&state)) { + match IUpdateDownloader_Impl::BeginDownload(this, core::mem::transmute_copy(&onprogresschanged), core::mem::transmute_copy(&oncompleted), core::mem::transmute(&state)) { Ok(ok__) => { retval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4405,7 +4405,7 @@ impl IUpdateDownloader_Vtbl { } unsafe extern "system" fn EndDownload(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateDownloader_Impl::EndDownload(this, windows_core::from_raw_borrowed(&value)) { + match IUpdateDownloader_Impl::EndDownload(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { retval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5323,14 +5323,14 @@ pub trait IUpdateInstaller_Impl: super::Com::IDispatch_Impl { fn SetIsForced(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn ParentHwnd(&self) -> windows_core::Result; fn SetParentHwnd(&self, value: super::super::Foundation::HWND) -> windows_core::Result<()>; - fn SetParentWindow(&self, value: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetParentWindow(&self, value: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn ParentWindow(&self) -> windows_core::Result; fn Updates(&self) -> windows_core::Result; - fn SetUpdates(&self, value: Option<&IUpdateCollection>) -> windows_core::Result<()>; - fn BeginInstall(&self, onprogresschanged: Option<&windows_core::IUnknown>, oncompleted: Option<&windows_core::IUnknown>, state: &super::Variant::VARIANT) -> windows_core::Result; - fn BeginUninstall(&self, onprogresschanged: Option<&windows_core::IUnknown>, oncompleted: Option<&windows_core::IUnknown>, state: &super::Variant::VARIANT) -> windows_core::Result; - fn EndInstall(&self, value: Option<&IInstallationJob>) -> windows_core::Result; - fn EndUninstall(&self, value: Option<&IInstallationJob>) -> windows_core::Result; + fn SetUpdates(&self, value: windows_core::Ref<'_, IUpdateCollection>) -> windows_core::Result<()>; + fn BeginInstall(&self, onprogresschanged: windows_core::Ref<'_, windows_core::IUnknown>, oncompleted: windows_core::Ref<'_, windows_core::IUnknown>, state: &super::Variant::VARIANT) -> windows_core::Result; + fn BeginUninstall(&self, onprogresschanged: windows_core::Ref<'_, windows_core::IUnknown>, oncompleted: windows_core::Ref<'_, windows_core::IUnknown>, state: &super::Variant::VARIANT) -> windows_core::Result; + fn EndInstall(&self, value: windows_core::Ref<'_, IInstallationJob>) -> windows_core::Result; + fn EndUninstall(&self, value: windows_core::Ref<'_, IInstallationJob>) -> windows_core::Result; fn Install(&self) -> windows_core::Result; fn RunWizard(&self, dialogtitle: &windows_core::BSTR) -> windows_core::Result; fn IsBusy(&self) -> windows_core::Result; @@ -5386,7 +5386,7 @@ impl IUpdateInstaller_Vtbl { } unsafe extern "system" fn SetParentWindow(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUpdateInstaller_Impl::SetParentWindow(this, windows_core::from_raw_borrowed(&value)).into() + IUpdateInstaller_Impl::SetParentWindow(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn ParentWindow(this: *mut core::ffi::c_void, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5410,11 +5410,11 @@ impl IUpdateInstaller_Vtbl { } unsafe extern "system" fn SetUpdates(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUpdateInstaller_Impl::SetUpdates(this, windows_core::from_raw_borrowed(&value)).into() + IUpdateInstaller_Impl::SetUpdates(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn BeginInstall(this: *mut core::ffi::c_void, onprogresschanged: *mut core::ffi::c_void, oncompleted: *mut core::ffi::c_void, state: super::Variant::VARIANT, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateInstaller_Impl::BeginInstall(this, windows_core::from_raw_borrowed(&onprogresschanged), windows_core::from_raw_borrowed(&oncompleted), core::mem::transmute(&state)) { + match IUpdateInstaller_Impl::BeginInstall(this, core::mem::transmute_copy(&onprogresschanged), core::mem::transmute_copy(&oncompleted), core::mem::transmute(&state)) { Ok(ok__) => { retval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5424,7 +5424,7 @@ impl IUpdateInstaller_Vtbl { } unsafe extern "system" fn BeginUninstall(this: *mut core::ffi::c_void, onprogresschanged: *mut core::ffi::c_void, oncompleted: *mut core::ffi::c_void, state: super::Variant::VARIANT, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateInstaller_Impl::BeginUninstall(this, windows_core::from_raw_borrowed(&onprogresschanged), windows_core::from_raw_borrowed(&oncompleted), core::mem::transmute(&state)) { + match IUpdateInstaller_Impl::BeginUninstall(this, core::mem::transmute_copy(&onprogresschanged), core::mem::transmute_copy(&oncompleted), core::mem::transmute(&state)) { Ok(ok__) => { retval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5434,7 +5434,7 @@ impl IUpdateInstaller_Vtbl { } unsafe extern "system" fn EndInstall(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateInstaller_Impl::EndInstall(this, windows_core::from_raw_borrowed(&value)) { + match IUpdateInstaller_Impl::EndInstall(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { retval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5444,7 +5444,7 @@ impl IUpdateInstaller_Vtbl { } unsafe extern "system" fn EndUninstall(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateInstaller_Impl::EndUninstall(this, windows_core::from_raw_borrowed(&value)) { + match IUpdateInstaller_Impl::EndUninstall(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { retval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5864,8 +5864,8 @@ pub trait IUpdateSearcher_Impl: super::Com::IDispatch_Impl { fn SetIncludePotentiallySupersededUpdates(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn ServerSelection(&self) -> windows_core::Result; fn SetServerSelection(&self, value: ServerSelection) -> windows_core::Result<()>; - fn BeginSearch(&self, criteria: &windows_core::BSTR, oncompleted: Option<&windows_core::IUnknown>, state: &super::Variant::VARIANT) -> windows_core::Result; - fn EndSearch(&self, searchjob: Option<&ISearchJob>) -> windows_core::Result; + fn BeginSearch(&self, criteria: &windows_core::BSTR, oncompleted: windows_core::Ref<'_, windows_core::IUnknown>, state: &super::Variant::VARIANT) -> windows_core::Result; + fn EndSearch(&self, searchjob: windows_core::Ref<'_, ISearchJob>) -> windows_core::Result; fn EscapeString(&self, unescaped: &windows_core::BSTR) -> windows_core::Result; fn QueryHistory(&self, startindex: i32, count: i32) -> windows_core::Result; fn Search(&self, criteria: &windows_core::BSTR) -> windows_core::Result; @@ -5936,7 +5936,7 @@ impl IUpdateSearcher_Vtbl { } unsafe extern "system" fn BeginSearch(this: *mut core::ffi::c_void, criteria: *mut core::ffi::c_void, oncompleted: *mut core::ffi::c_void, state: super::Variant::VARIANT, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateSearcher_Impl::BeginSearch(this, core::mem::transmute(&criteria), windows_core::from_raw_borrowed(&oncompleted), core::mem::transmute(&state)) { + match IUpdateSearcher_Impl::BeginSearch(this, core::mem::transmute(&criteria), core::mem::transmute_copy(&oncompleted), core::mem::transmute(&state)) { Ok(ok__) => { retval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5946,7 +5946,7 @@ impl IUpdateSearcher_Vtbl { } unsafe extern "system" fn EndSearch(this: *mut core::ffi::c_void, searchjob: *mut core::ffi::c_void, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateSearcher_Impl::EndSearch(this, windows_core::from_raw_borrowed(&searchjob)) { + match IUpdateSearcher_Impl::EndSearch(this, core::mem::transmute_copy(&searchjob)) { Ok(ok__) => { retval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6964,7 +6964,7 @@ pub trait IUpdateSession_Impl: super::Com::IDispatch_Impl { fn SetClientApplicationID(&self, value: &windows_core::BSTR) -> windows_core::Result<()>; fn ReadOnly(&self) -> windows_core::Result; fn WebProxy(&self) -> windows_core::Result; - fn SetWebProxy(&self, value: Option<&IWebProxy>) -> windows_core::Result<()>; + fn SetWebProxy(&self, value: windows_core::Ref<'_, IWebProxy>) -> windows_core::Result<()>; fn CreateUpdateSearcher(&self) -> windows_core::Result; fn CreateUpdateDownloader(&self) -> windows_core::Result; fn CreateUpdateInstaller(&self) -> windows_core::Result; @@ -7008,7 +7008,7 @@ impl IUpdateSession_Vtbl { } unsafe extern "system" fn SetWebProxy(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUpdateSession_Impl::SetWebProxy(this, windows_core::from_raw_borrowed(&value)).into() + IUpdateSession_Impl::SetWebProxy(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn CreateUpdateSearcher(this: *mut core::ffi::c_void, retval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7281,14 +7281,14 @@ pub trait IWebProxy_Impl: super::Com::IDispatch_Impl { fn Address(&self) -> windows_core::Result; fn SetAddress(&self, value: &windows_core::BSTR) -> windows_core::Result<()>; fn BypassList(&self) -> windows_core::Result; - fn SetBypassList(&self, value: Option<&IStringCollection>) -> windows_core::Result<()>; + fn SetBypassList(&self, value: windows_core::Ref<'_, IStringCollection>) -> windows_core::Result<()>; fn BypassProxyOnLocal(&self) -> windows_core::Result; fn SetBypassProxyOnLocal(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn ReadOnly(&self) -> windows_core::Result; fn UserName(&self) -> windows_core::Result; fn SetUserName(&self, value: &windows_core::BSTR) -> windows_core::Result<()>; fn SetPassword(&self, value: &windows_core::BSTR) -> windows_core::Result<()>; - fn PromptForCredentials(&self, parentwindow: Option<&windows_core::IUnknown>, title: &windows_core::BSTR) -> windows_core::Result<()>; + fn PromptForCredentials(&self, parentwindow: windows_core::Ref<'_, windows_core::IUnknown>, title: &windows_core::BSTR) -> windows_core::Result<()>; fn PromptForCredentialsFromHwnd(&self, parentwindow: super::super::Foundation::HWND, title: &windows_core::BSTR) -> windows_core::Result<()>; fn AutoDetect(&self) -> windows_core::Result; fn SetAutoDetect(&self, value: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; @@ -7322,7 +7322,7 @@ impl IWebProxy_Vtbl { } unsafe extern "system" fn SetBypassList(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebProxy_Impl::SetBypassList(this, windows_core::from_raw_borrowed(&value)).into() + IWebProxy_Impl::SetBypassList(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn BypassProxyOnLocal(this: *mut core::ffi::c_void, retval: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7368,7 +7368,7 @@ impl IWebProxy_Vtbl { } unsafe extern "system" fn PromptForCredentials(this: *mut core::ffi::c_void, parentwindow: *mut core::ffi::c_void, title: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebProxy_Impl::PromptForCredentials(this, windows_core::from_raw_borrowed(&parentwindow), core::mem::transmute(&title)).into() + IWebProxy_Impl::PromptForCredentials(this, core::mem::transmute_copy(&parentwindow), core::mem::transmute(&title)).into() } unsafe extern "system" fn PromptForCredentialsFromHwnd(this: *mut core::ffi::c_void, parentwindow: super::super::Foundation::HWND, title: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7629,7 +7629,7 @@ pub trait IWindowsDriverUpdate2_Impl: IWindowsDriverUpdate_Impl { fn RebootRequired(&self) -> windows_core::Result; fn IsPresent(&self) -> windows_core::Result; fn CveIDs(&self) -> windows_core::Result; - fn CopyToCache(&self, pfiles: Option<&IStringCollection>) -> windows_core::Result<()>; + fn CopyToCache(&self, pfiles: windows_core::Ref<'_, IStringCollection>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IWindowsDriverUpdate2_Vtbl { @@ -7666,7 +7666,7 @@ impl IWindowsDriverUpdate2_Vtbl { } unsafe extern "system" fn CopyToCache(this: *mut core::ffi::c_void, pfiles: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWindowsDriverUpdate2_Impl::CopyToCache(this, windows_core::from_raw_borrowed(&pfiles)).into() + IWindowsDriverUpdate2_Impl::CopyToCache(this, core::mem::transmute_copy(&pfiles)).into() } Self { base__: IWindowsDriverUpdate_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs index f85e9e2ac2..a77aa027af 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs @@ -150,13 +150,13 @@ pub struct ICompositionDrawingSurfaceInterop2_Vtbl { pub CopySurface: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i32, i32, *const super::super::super::Foundation::RECT) -> windows_core::HRESULT, } pub trait ICompositionDrawingSurfaceInterop2_Impl: ICompositionDrawingSurfaceInterop_Impl { - fn CopySurface(&self, destinationresource: Option<&windows_core::IUnknown>, destinationoffsetx: i32, destinationoffsety: i32, sourcerectangle: *const super::super::super::Foundation::RECT) -> windows_core::Result<()>; + fn CopySurface(&self, destinationresource: windows_core::Ref<'_, windows_core::IUnknown>, destinationoffsetx: i32, destinationoffsety: i32, sourcerectangle: *const super::super::super::Foundation::RECT) -> windows_core::Result<()>; } impl ICompositionDrawingSurfaceInterop2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CopySurface(this: *mut core::ffi::c_void, destinationresource: *mut core::ffi::c_void, destinationoffsetx: i32, destinationoffsety: i32, sourcerectangle: *const super::super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICompositionDrawingSurfaceInterop2_Impl::CopySurface(this, windows_core::from_raw_borrowed(&destinationresource), core::mem::transmute_copy(&destinationoffsetx), core::mem::transmute_copy(&destinationoffsety), core::mem::transmute_copy(&sourcerectangle)).into() + ICompositionDrawingSurfaceInterop2_Impl::CopySurface(this, core::mem::transmute_copy(&destinationresource), core::mem::transmute_copy(&destinationoffsetx), core::mem::transmute_copy(&destinationoffsety), core::mem::transmute_copy(&sourcerectangle)).into() } Self { base__: ICompositionDrawingSurfaceInterop_Vtbl::new::(), CopySurface: CopySurface:: } } @@ -187,7 +187,7 @@ pub struct ICompositionGraphicsDeviceInterop_Vtbl { } pub trait ICompositionGraphicsDeviceInterop_Impl: windows_core::IUnknownImpl { fn GetRenderingDevice(&self) -> windows_core::Result; - fn SetRenderingDevice(&self, value: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetRenderingDevice(&self, value: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ICompositionGraphicsDeviceInterop_Vtbl { pub const fn new() -> Self { @@ -203,7 +203,7 @@ impl ICompositionGraphicsDeviceInterop_Vtbl { } unsafe extern "system" fn SetRenderingDevice(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICompositionGraphicsDeviceInterop_Impl::SetRenderingDevice(this, windows_core::from_raw_borrowed(&value)).into() + ICompositionGraphicsDeviceInterop_Impl::SetRenderingDevice(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -343,8 +343,8 @@ pub struct ICompositorInterop_Vtbl { #[cfg(feature = "UI_Composition")] pub trait ICompositorInterop_Impl: windows_core::IUnknownImpl { fn CreateCompositionSurfaceForHandle(&self, swapchain: super::super::super::Foundation::HANDLE) -> windows_core::Result; - fn CreateCompositionSurfaceForSwapChain(&self, swapchain: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn CreateGraphicsDevice(&self, renderingdevice: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateCompositionSurfaceForSwapChain(&self, swapchain: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn CreateGraphicsDevice(&self, renderingdevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } #[cfg(feature = "UI_Composition")] impl ICompositorInterop_Vtbl { @@ -361,7 +361,7 @@ impl ICompositorInterop_Vtbl { } unsafe extern "system" fn CreateCompositionSurfaceForSwapChain(this: *mut core::ffi::c_void, swapchain: *mut core::ffi::c_void, result: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICompositorInterop_Impl::CreateCompositionSurfaceForSwapChain(this, windows_core::from_raw_borrowed(&swapchain)) { + match ICompositorInterop_Impl::CreateCompositionSurfaceForSwapChain(this, core::mem::transmute_copy(&swapchain)) { Ok(ok__) => { result.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -371,7 +371,7 @@ impl ICompositorInterop_Vtbl { } unsafe extern "system" fn CreateGraphicsDevice(this: *mut core::ffi::c_void, renderingdevice: *mut core::ffi::c_void, result: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICompositorInterop_Impl::CreateGraphicsDevice(this, windows_core::from_raw_borrowed(&renderingdevice)) { + match ICompositorInterop_Impl::CreateGraphicsDevice(this, core::mem::transmute_copy(&renderingdevice)) { Ok(ok__) => { result.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -422,15 +422,15 @@ pub struct ICompositorInterop2_Vtbl { } #[cfg(feature = "UI_Composition")] pub trait ICompositorInterop2_Impl: windows_core::IUnknownImpl { - fn CheckCompositionTextureSupport(&self, renderingdevice: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn CreateCompositionTexture(&self, d3dtexture: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CheckCompositionTextureSupport(&self, renderingdevice: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn CreateCompositionTexture(&self, d3dtexture: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } #[cfg(feature = "UI_Composition")] impl ICompositorInterop2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CheckCompositionTextureSupport(this: *mut core::ffi::c_void, renderingdevice: *mut core::ffi::c_void, supportscompositiontextures: *mut super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICompositorInterop2_Impl::CheckCompositionTextureSupport(this, windows_core::from_raw_borrowed(&renderingdevice)) { + match ICompositorInterop2_Impl::CheckCompositionTextureSupport(this, core::mem::transmute_copy(&renderingdevice)) { Ok(ok__) => { supportscompositiontextures.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -440,7 +440,7 @@ impl ICompositorInterop2_Vtbl { } unsafe extern "system" fn CreateCompositionTexture(this: *mut core::ffi::c_void, d3dtexture: *mut core::ffi::c_void, compositiontexture: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICompositorInterop2_Impl::CreateCompositionTexture(this, windows_core::from_raw_borrowed(&d3dtexture)) { + match ICompositorInterop2_Impl::CreateCompositionTexture(this, core::mem::transmute_copy(&d3dtexture)) { Ok(ok__) => { compositiontexture.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Display/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Display/mod.rs index fa15431835..3ea27d3a83 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Display/mod.rs @@ -25,7 +25,7 @@ pub struct IDisplayDeviceInterop_Vtbl { } #[cfg(feature = "Win32_Security")] pub trait IDisplayDeviceInterop_Impl: windows_core::IUnknownImpl { - fn CreateSharedHandle(&self, pobject: Option<&windows_core::IInspectable>, psecurityattributes: *const super::super::super::Security::SECURITY_ATTRIBUTES, access: u32, name: &windows_core::HSTRING) -> windows_core::Result; + fn CreateSharedHandle(&self, pobject: windows_core::Ref<'_, windows_core::IInspectable>, psecurityattributes: *const super::super::super::Security::SECURITY_ATTRIBUTES, access: u32, name: &windows_core::HSTRING) -> windows_core::Result; fn OpenSharedHandle(&self, nthandle: super::super::super::Foundation::HANDLE, riid: &windows_core::GUID) -> windows_core::Result<*mut core::ffi::c_void>; } #[cfg(feature = "Win32_Security")] @@ -33,7 +33,7 @@ impl IDisplayDeviceInterop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateSharedHandle(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void, psecurityattributes: *const super::super::super::Security::SECURITY_ATTRIBUTES, access: u32, name: *mut core::ffi::c_void, phandle: *mut super::super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDisplayDeviceInterop_Impl::CreateSharedHandle(this, windows_core::from_raw_borrowed(&pobject), core::mem::transmute_copy(&psecurityattributes), core::mem::transmute_copy(&access), core::mem::transmute(&name)) { + match IDisplayDeviceInterop_Impl::CreateSharedHandle(this, core::mem::transmute_copy(&pobject), core::mem::transmute_copy(&psecurityattributes), core::mem::transmute_copy(&access), core::mem::transmute(&name)) { Ok(ok__) => { phandle.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Direct2D/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Direct2D/mod.rs index 8854ba22dd..b60f7663dc 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Direct2D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Direct2D/mod.rs @@ -44,7 +44,7 @@ pub struct IGeometrySource2DInterop_Vtbl { #[cfg(feature = "Win32_Graphics_Direct2D")] pub trait IGeometrySource2DInterop_Impl: windows_core::IUnknownImpl { fn GetGeometry(&self) -> windows_core::Result; - fn TryGetGeometryUsingFactory(&self, factory: Option<&super::super::super::super::Graphics::Direct2D::ID2D1Factory>) -> windows_core::Result; + fn TryGetGeometryUsingFactory(&self, factory: windows_core::Ref<'_, super::super::super::super::Graphics::Direct2D::ID2D1Factory>) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Direct2D")] impl IGeometrySource2DInterop_Vtbl { @@ -61,7 +61,7 @@ impl IGeometrySource2DInterop_Vtbl { } unsafe extern "system" fn TryGetGeometryUsingFactory(this: *mut core::ffi::c_void, factory: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IGeometrySource2DInterop_Impl::TryGetGeometryUsingFactory(this, windows_core::from_raw_borrowed(&factory)) { + match IGeometrySource2DInterop_Impl::TryGetGeometryUsingFactory(this, core::mem::transmute_copy(&factory)) { Ok(ok__) => { value.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs index ce23d180e8..cfb2e76ea3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs @@ -67,19 +67,19 @@ pub struct ISoftwareBitmapNativeFactory_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Imaging", feature = "Win32_Media_MediaFoundation"))] pub trait ISoftwareBitmapNativeFactory_Impl: windows_core::IUnknownImpl { - fn CreateFromWICBitmap(&self, data: Option<&super::super::super::super::Graphics::Imaging::IWICBitmap>, forcereadonly: super::super::super::super::Foundation::BOOL, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateFromMF2DBuffer2(&self, data: Option<&super::super::super::super::Media::MediaFoundation::IMF2DBuffer2>, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: super::super::super::super::Foundation::BOOL, mindisplayaperture: *const super::super::super::super::Media::MediaFoundation::MFVideoArea, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateFromWICBitmap(&self, data: windows_core::Ref<'_, super::super::super::super::Graphics::Imaging::IWICBitmap>, forcereadonly: super::super::super::super::Foundation::BOOL, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateFromMF2DBuffer2(&self, data: windows_core::Ref<'_, super::super::super::super::Media::MediaFoundation::IMF2DBuffer2>, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: super::super::super::super::Foundation::BOOL, mindisplayaperture: *const super::super::super::super::Media::MediaFoundation::MFVideoArea, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Imaging", feature = "Win32_Media_MediaFoundation"))] impl ISoftwareBitmapNativeFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFromWICBitmap(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void, forcereadonly: super::super::super::super::Foundation::BOOL, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISoftwareBitmapNativeFactory_Impl::CreateFromWICBitmap(this, windows_core::from_raw_borrowed(&data), core::mem::transmute_copy(&forcereadonly), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + ISoftwareBitmapNativeFactory_Impl::CreateFromWICBitmap(this, core::mem::transmute_copy(&data), core::mem::transmute_copy(&forcereadonly), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn CreateFromMF2DBuffer2(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: super::super::super::super::Foundation::BOOL, mindisplayaperture: *const super::super::super::super::Media::MediaFoundation::MFVideoArea, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISoftwareBitmapNativeFactory_Impl::CreateFromMF2DBuffer2(this, windows_core::from_raw_borrowed(&data), core::mem::transmute_copy(&subtype), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&forcereadonly), core::mem::transmute_copy(&mindisplayaperture), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + ISoftwareBitmapNativeFactory_Impl::CreateFromMF2DBuffer2(this, core::mem::transmute_copy(&data), core::mem::transmute_copy(&subtype), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&forcereadonly), core::mem::transmute_copy(&mindisplayaperture), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Holographic/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Holographic/mod.rs index 7dd084bbc0..88a8765038 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Holographic/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Holographic/mod.rs @@ -68,18 +68,18 @@ pub struct IHolographicCameraInterop_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] pub trait IHolographicCameraInterop_Impl: windows_core::IUnknownImpl { - fn CreateDirect3D12BackBufferResource(&self, pdevice: Option<&super::super::super::Graphics::Direct3D12::ID3D12Device>, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC) -> windows_core::Result; - fn CreateDirect3D12HardwareProtectedBackBufferResource(&self, pdevice: Option<&super::super::super::Graphics::Direct3D12::ID3D12Device>, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC, pprotectedresourcesession: Option<&super::super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>) -> windows_core::Result; - fn AcquireDirect3D12BufferResource(&self, presourcetoacquire: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcommandqueue: Option<&super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; - fn AcquireDirect3D12BufferResourceWithTimeout(&self, presourcetoacquire: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcommandqueue: Option<&super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>, duration: u64) -> windows_core::Result<()>; - fn UnacquireDirect3D12BufferResource(&self, presourcetounacquire: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>) -> windows_core::Result<()>; + fn CreateDirect3D12BackBufferResource(&self, pdevice: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Device>, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC) -> windows_core::Result; + fn CreateDirect3D12HardwareProtectedBackBufferResource(&self, pdevice: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Device>, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC, pprotectedresourcesession: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>) -> windows_core::Result; + fn AcquireDirect3D12BufferResource(&self, presourcetoacquire: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcommandqueue: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; + fn AcquireDirect3D12BufferResourceWithTimeout(&self, presourcetoacquire: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcommandqueue: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>, duration: u64) -> windows_core::Result<()>; + fn UnacquireDirect3D12BufferResource(&self, presourcetounacquire: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] impl IHolographicCameraInterop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDirect3D12BackBufferResource(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC, ppcreatedtexture2dresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHolographicCameraInterop_Impl::CreateDirect3D12BackBufferResource(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&ptexture2ddesc)) { + match IHolographicCameraInterop_Impl::CreateDirect3D12BackBufferResource(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&ptexture2ddesc)) { Ok(ok__) => { ppcreatedtexture2dresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -89,7 +89,7 @@ impl IHolographicCameraInterop_Vtbl { } unsafe extern "system" fn CreateDirect3D12HardwareProtectedBackBufferResource(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC, pprotectedresourcesession: *mut core::ffi::c_void, ppcreatedtexture2dresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHolographicCameraInterop_Impl::CreateDirect3D12HardwareProtectedBackBufferResource(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&ptexture2ddesc), windows_core::from_raw_borrowed(&pprotectedresourcesession)) { + match IHolographicCameraInterop_Impl::CreateDirect3D12HardwareProtectedBackBufferResource(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&ptexture2ddesc), core::mem::transmute_copy(&pprotectedresourcesession)) { Ok(ok__) => { ppcreatedtexture2dresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -99,15 +99,15 @@ impl IHolographicCameraInterop_Vtbl { } unsafe extern "system" fn AcquireDirect3D12BufferResource(this: *mut core::ffi::c_void, presourcetoacquire: *mut core::ffi::c_void, pcommandqueue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHolographicCameraInterop_Impl::AcquireDirect3D12BufferResource(this, windows_core::from_raw_borrowed(&presourcetoacquire), windows_core::from_raw_borrowed(&pcommandqueue)).into() + IHolographicCameraInterop_Impl::AcquireDirect3D12BufferResource(this, core::mem::transmute_copy(&presourcetoacquire), core::mem::transmute_copy(&pcommandqueue)).into() } unsafe extern "system" fn AcquireDirect3D12BufferResourceWithTimeout(this: *mut core::ffi::c_void, presourcetoacquire: *mut core::ffi::c_void, pcommandqueue: *mut core::ffi::c_void, duration: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHolographicCameraInterop_Impl::AcquireDirect3D12BufferResourceWithTimeout(this, windows_core::from_raw_borrowed(&presourcetoacquire), windows_core::from_raw_borrowed(&pcommandqueue), core::mem::transmute_copy(&duration)).into() + IHolographicCameraInterop_Impl::AcquireDirect3D12BufferResourceWithTimeout(this, core::mem::transmute_copy(&presourcetoacquire), core::mem::transmute_copy(&pcommandqueue), core::mem::transmute_copy(&duration)).into() } unsafe extern "system" fn UnacquireDirect3D12BufferResource(this: *mut core::ffi::c_void, presourcetounacquire: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHolographicCameraInterop_Impl::UnacquireDirect3D12BufferResource(this, windows_core::from_raw_borrowed(&presourcetounacquire)).into() + IHolographicCameraInterop_Impl::UnacquireDirect3D12BufferResource(this, core::mem::transmute_copy(&presourcetounacquire)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -160,19 +160,19 @@ pub struct IHolographicCameraRenderingParametersInterop_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait IHolographicCameraRenderingParametersInterop_Impl: windows_core::IUnknownImpl { - fn CommitDirect3D12Resource(&self, pcolorresourcetocommit: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcolorresourcefence: Option<&super::super::super::Graphics::Direct3D12::ID3D12Fence>, colorresourcefencesignalvalue: u64) -> windows_core::Result<()>; - fn CommitDirect3D12ResourceWithDepthData(&self, pcolorresourcetocommit: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcolorresourcefence: Option<&super::super::super::Graphics::Direct3D12::ID3D12Fence>, colorresourcefencesignalvalue: u64, pdepthresourcetocommit: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>, pdepthresourcefence: Option<&super::super::super::Graphics::Direct3D12::ID3D12Fence>, depthresourcefencesignalvalue: u64) -> windows_core::Result<()>; + fn CommitDirect3D12Resource(&self, pcolorresourcetocommit: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcolorresourcefence: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Fence>, colorresourcefencesignalvalue: u64) -> windows_core::Result<()>; + fn CommitDirect3D12ResourceWithDepthData(&self, pcolorresourcetocommit: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcolorresourcefence: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Fence>, colorresourcefencesignalvalue: u64, pdepthresourcetocommit: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>, pdepthresourcefence: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Fence>, depthresourcefencesignalvalue: u64) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl IHolographicCameraRenderingParametersInterop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CommitDirect3D12Resource(this: *mut core::ffi::c_void, pcolorresourcetocommit: *mut core::ffi::c_void, pcolorresourcefence: *mut core::ffi::c_void, colorresourcefencesignalvalue: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHolographicCameraRenderingParametersInterop_Impl::CommitDirect3D12Resource(this, windows_core::from_raw_borrowed(&pcolorresourcetocommit), windows_core::from_raw_borrowed(&pcolorresourcefence), core::mem::transmute_copy(&colorresourcefencesignalvalue)).into() + IHolographicCameraRenderingParametersInterop_Impl::CommitDirect3D12Resource(this, core::mem::transmute_copy(&pcolorresourcetocommit), core::mem::transmute_copy(&pcolorresourcefence), core::mem::transmute_copy(&colorresourcefencesignalvalue)).into() } unsafe extern "system" fn CommitDirect3D12ResourceWithDepthData(this: *mut core::ffi::c_void, pcolorresourcetocommit: *mut core::ffi::c_void, pcolorresourcefence: *mut core::ffi::c_void, colorresourcefencesignalvalue: u64, pdepthresourcetocommit: *mut core::ffi::c_void, pdepthresourcefence: *mut core::ffi::c_void, depthresourcefencesignalvalue: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHolographicCameraRenderingParametersInterop_Impl::CommitDirect3D12ResourceWithDepthData(this, windows_core::from_raw_borrowed(&pcolorresourcetocommit), windows_core::from_raw_borrowed(&pcolorresourcefence), core::mem::transmute_copy(&colorresourcefencesignalvalue), windows_core::from_raw_borrowed(&pdepthresourcetocommit), windows_core::from_raw_borrowed(&pdepthresourcefence), core::mem::transmute_copy(&depthresourcefencesignalvalue)).into() + IHolographicCameraRenderingParametersInterop_Impl::CommitDirect3D12ResourceWithDepthData(this, core::mem::transmute_copy(&pcolorresourcetocommit), core::mem::transmute_copy(&pcolorresourcefence), core::mem::transmute_copy(&colorresourcefencesignalvalue), core::mem::transmute_copy(&pdepthresourcetocommit), core::mem::transmute_copy(&pdepthresourcefence), core::mem::transmute_copy(&depthresourcefencesignalvalue)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -256,18 +256,18 @@ pub struct IHolographicQuadLayerInterop_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] pub trait IHolographicQuadLayerInterop_Impl: windows_core::IUnknownImpl { - fn CreateDirect3D12ContentBufferResource(&self, pdevice: Option<&super::super::super::Graphics::Direct3D12::ID3D12Device>, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC) -> windows_core::Result; - fn CreateDirect3D12HardwareProtectedContentBufferResource(&self, pdevice: Option<&super::super::super::Graphics::Direct3D12::ID3D12Device>, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC, pprotectedresourcesession: Option<&super::super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>) -> windows_core::Result; - fn AcquireDirect3D12BufferResource(&self, presourcetoacquire: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcommandqueue: Option<&super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; - fn AcquireDirect3D12BufferResourceWithTimeout(&self, presourcetoacquire: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcommandqueue: Option<&super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>, duration: u64) -> windows_core::Result<()>; - fn UnacquireDirect3D12BufferResource(&self, presourcetounacquire: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>) -> windows_core::Result<()>; + fn CreateDirect3D12ContentBufferResource(&self, pdevice: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Device>, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC) -> windows_core::Result; + fn CreateDirect3D12HardwareProtectedContentBufferResource(&self, pdevice: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Device>, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC, pprotectedresourcesession: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12ProtectedResourceSession>) -> windows_core::Result; + fn AcquireDirect3D12BufferResource(&self, presourcetoacquire: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcommandqueue: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result<()>; + fn AcquireDirect3D12BufferResourceWithTimeout(&self, presourcetoacquire: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcommandqueue: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>, duration: u64) -> windows_core::Result<()>; + fn UnacquireDirect3D12BufferResource(&self, presourcetounacquire: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] impl IHolographicQuadLayerInterop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateDirect3D12ContentBufferResource(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC, pptexture2dresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHolographicQuadLayerInterop_Impl::CreateDirect3D12ContentBufferResource(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&ptexture2ddesc)) { + match IHolographicQuadLayerInterop_Impl::CreateDirect3D12ContentBufferResource(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&ptexture2ddesc)) { Ok(ok__) => { pptexture2dresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -277,7 +277,7 @@ impl IHolographicQuadLayerInterop_Vtbl { } unsafe extern "system" fn CreateDirect3D12HardwareProtectedContentBufferResource(this: *mut core::ffi::c_void, pdevice: *mut core::ffi::c_void, ptexture2ddesc: *const super::super::super::Graphics::Direct3D12::D3D12_RESOURCE_DESC, pprotectedresourcesession: *mut core::ffi::c_void, ppcreatedtexture2dresource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHolographicQuadLayerInterop_Impl::CreateDirect3D12HardwareProtectedContentBufferResource(this, windows_core::from_raw_borrowed(&pdevice), core::mem::transmute_copy(&ptexture2ddesc), windows_core::from_raw_borrowed(&pprotectedresourcesession)) { + match IHolographicQuadLayerInterop_Impl::CreateDirect3D12HardwareProtectedContentBufferResource(this, core::mem::transmute_copy(&pdevice), core::mem::transmute_copy(&ptexture2ddesc), core::mem::transmute_copy(&pprotectedresourcesession)) { Ok(ok__) => { ppcreatedtexture2dresource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -287,15 +287,15 @@ impl IHolographicQuadLayerInterop_Vtbl { } unsafe extern "system" fn AcquireDirect3D12BufferResource(this: *mut core::ffi::c_void, presourcetoacquire: *mut core::ffi::c_void, pcommandqueue: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHolographicQuadLayerInterop_Impl::AcquireDirect3D12BufferResource(this, windows_core::from_raw_borrowed(&presourcetoacquire), windows_core::from_raw_borrowed(&pcommandqueue)).into() + IHolographicQuadLayerInterop_Impl::AcquireDirect3D12BufferResource(this, core::mem::transmute_copy(&presourcetoacquire), core::mem::transmute_copy(&pcommandqueue)).into() } unsafe extern "system" fn AcquireDirect3D12BufferResourceWithTimeout(this: *mut core::ffi::c_void, presourcetoacquire: *mut core::ffi::c_void, pcommandqueue: *mut core::ffi::c_void, duration: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHolographicQuadLayerInterop_Impl::AcquireDirect3D12BufferResourceWithTimeout(this, windows_core::from_raw_borrowed(&presourcetoacquire), windows_core::from_raw_borrowed(&pcommandqueue), core::mem::transmute_copy(&duration)).into() + IHolographicQuadLayerInterop_Impl::AcquireDirect3D12BufferResourceWithTimeout(this, core::mem::transmute_copy(&presourcetoacquire), core::mem::transmute_copy(&pcommandqueue), core::mem::transmute_copy(&duration)).into() } unsafe extern "system" fn UnacquireDirect3D12BufferResource(this: *mut core::ffi::c_void, presourcetounacquire: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHolographicQuadLayerInterop_Impl::UnacquireDirect3D12BufferResource(this, windows_core::from_raw_borrowed(&presourcetounacquire)).into() + IHolographicQuadLayerInterop_Impl::UnacquireDirect3D12BufferResource(this, core::mem::transmute_copy(&presourcetounacquire)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -334,14 +334,14 @@ pub struct IHolographicQuadLayerUpdateParametersInterop_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait IHolographicQuadLayerUpdateParametersInterop_Impl: windows_core::IUnknownImpl { - fn CommitDirect3D12Resource(&self, pcolorresourcetocommit: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcolorresourcefence: Option<&super::super::super::Graphics::Direct3D12::ID3D12Fence>, colorresourcefencesignalvalue: u64) -> windows_core::Result<()>; + fn CommitDirect3D12Resource(&self, pcolorresourcetocommit: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>, pcolorresourcefence: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Fence>, colorresourcefencesignalvalue: u64) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl IHolographicQuadLayerUpdateParametersInterop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CommitDirect3D12Resource(this: *mut core::ffi::c_void, pcolorresourcetocommit: *mut core::ffi::c_void, pcolorresourcefence: *mut core::ffi::c_void, colorresourcefencesignalvalue: u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHolographicQuadLayerUpdateParametersInterop_Impl::CommitDirect3D12Resource(this, windows_core::from_raw_borrowed(&pcolorresourcetocommit), windows_core::from_raw_borrowed(&pcolorresourcefence), core::mem::transmute_copy(&colorresourcefencesignalvalue)).into() + IHolographicQuadLayerUpdateParametersInterop_Impl::CommitDirect3D12Resource(this, core::mem::transmute_copy(&pcolorresourcetocommit), core::mem::transmute_copy(&pcolorresourcefence), core::mem::transmute_copy(&colorresourcefencesignalvalue)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/ML/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/ML/mod.rs index 05ca68e5b8..75bb406651 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/ML/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/ML/mod.rs @@ -20,14 +20,14 @@ pub struct ILearningModelDeviceFactoryNative_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait ILearningModelDeviceFactoryNative_Impl: windows_core::IUnknownImpl { - fn CreateFromD3D12CommandQueue(&self, value: Option<&super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result; + fn CreateFromD3D12CommandQueue(&self, value: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12CommandQueue>) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl ILearningModelDeviceFactoryNative_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFromD3D12CommandQueue(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, result: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ILearningModelDeviceFactoryNative_Impl::CreateFromD3D12CommandQueue(this, windows_core::from_raw_borrowed(&value)) { + match ILearningModelDeviceFactoryNative_Impl::CreateFromD3D12CommandQueue(this, core::mem::transmute_copy(&value)) { Ok(ok__) => { result.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -217,14 +217,14 @@ pub struct ITensorStaticsNative_Vtbl { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub trait ITensorStaticsNative_Impl: windows_core::IUnknownImpl { - fn CreateFromD3D12Resource(&self, value: Option<&super::super::super::Graphics::Direct3D12::ID3D12Resource>, shape: *mut i64, shapecount: i32, result: *mut Option) -> windows_core::Result<()>; + fn CreateFromD3D12Resource(&self, value: windows_core::Ref<'_, super::super::super::Graphics::Direct3D12::ID3D12Resource>, shape: *mut i64, shapecount: i32, result: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Direct3D12")] impl ITensorStaticsNative_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFromD3D12Resource(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void, shape: *mut i64, shapecount: i32, result: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITensorStaticsNative_Impl::CreateFromD3D12Resource(this, windows_core::from_raw_borrowed(&value), core::mem::transmute_copy(&shape), core::mem::transmute_copy(&shapecount), core::mem::transmute_copy(&result)).into() + ITensorStaticsNative_Impl::CreateFromD3D12Resource(this, core::mem::transmute_copy(&value), core::mem::transmute_copy(&shape), core::mem::transmute_copy(&shapecount), core::mem::transmute_copy(&result)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreateFromD3D12Resource: CreateFromD3D12Resource:: } } diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs index ea27792f84..22844120b1 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs @@ -55,14 +55,14 @@ pub struct IAudioFrameNativeFactory_Vtbl { } #[cfg(feature = "Win32_Media_MediaFoundation")] pub trait IAudioFrameNativeFactory_Impl: windows_core::IUnknownImpl { - fn CreateFromMFSample(&self, data: Option<&super::super::super::Media::MediaFoundation::IMFSample>, forcereadonly: super::super::super::Foundation::BOOL, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateFromMFSample(&self, data: windows_core::Ref<'_, super::super::super::Media::MediaFoundation::IMFSample>, forcereadonly: super::super::super::Foundation::BOOL, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_MediaFoundation")] impl IAudioFrameNativeFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFromMFSample(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void, forcereadonly: super::super::super::Foundation::BOOL, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAudioFrameNativeFactory_Impl::CreateFromMFSample(this, windows_core::from_raw_borrowed(&data), core::mem::transmute_copy(&forcereadonly), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IAudioFrameNativeFactory_Impl::CreateFromMFSample(this, core::mem::transmute_copy(&data), core::mem::transmute_copy(&forcereadonly), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -148,14 +148,14 @@ pub struct IVideoFrameNativeFactory_Vtbl { } #[cfg(feature = "Win32_Media_MediaFoundation")] pub trait IVideoFrameNativeFactory_Impl: windows_core::IUnknownImpl { - fn CreateFromMFSample(&self, data: Option<&super::super::super::Media::MediaFoundation::IMFSample>, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: super::super::super::Foundation::BOOL, mindisplayaperture: *const super::super::super::Media::MediaFoundation::MFVideoArea, device: Option<&super::super::super::Media::MediaFoundation::IMFDXGIDeviceManager>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateFromMFSample(&self, data: windows_core::Ref<'_, super::super::super::Media::MediaFoundation::IMFSample>, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: super::super::super::Foundation::BOOL, mindisplayaperture: *const super::super::super::Media::MediaFoundation::MFVideoArea, device: windows_core::Ref<'_, super::super::super::Media::MediaFoundation::IMFDXGIDeviceManager>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Media_MediaFoundation")] impl IVideoFrameNativeFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateFromMFSample(this: *mut core::ffi::c_void, data: *mut core::ffi::c_void, subtype: *const windows_core::GUID, width: u32, height: u32, forcereadonly: super::super::super::Foundation::BOOL, mindisplayaperture: *const super::super::super::Media::MediaFoundation::MFVideoArea, device: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IVideoFrameNativeFactory_Impl::CreateFromMFSample(this, windows_core::from_raw_borrowed(&data), core::mem::transmute_copy(&subtype), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&forcereadonly), core::mem::transmute_copy(&mindisplayaperture), windows_core::from_raw_borrowed(&device), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IVideoFrameNativeFactory_Impl::CreateFromMFSample(this, core::mem::transmute_copy(&data), core::mem::transmute_copy(&subtype), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&forcereadonly), core::mem::transmute_copy(&mindisplayaperture), core::mem::transmute_copy(&device), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/mod.rs index d390c47ae2..eeeb36fc36 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/mod.rs @@ -1130,7 +1130,7 @@ pub trait IMetaDataAssemblyImport_Impl: windows_core::IUnknownImpl { fn FindExportedTypeByName(&self, szname: &windows_core::PCWSTR, mdtexportedtype: u32, ptkexportedtype: *mut u32) -> windows_core::Result<()>; fn FindManifestResourceByName(&self, szname: &windows_core::PCWSTR, ptkmanifestresource: *mut u32) -> windows_core::Result<()>; fn CloseEnum(&self, henum: *mut core::ffi::c_void); - fn FindAssembliesByName(&self, szappbase: &windows_core::PCWSTR, szprivatebin: &windows_core::PCWSTR, szassemblyname: &windows_core::PCWSTR, ppiunk: *mut Option, cmax: u32, pcassemblies: *mut u32) -> windows_core::Result<()>; + fn FindAssembliesByName(&self, szappbase: &windows_core::PCWSTR, szprivatebin: &windows_core::PCWSTR, szassemblyname: &windows_core::PCWSTR, ppiunk: windows_core::OutRef<'_, windows_core::IUnknown>, cmax: u32, pcassemblies: *mut u32) -> windows_core::Result<()>; } impl IMetaDataAssemblyImport_Vtbl { pub const fn new() -> Self { @@ -1360,7 +1360,7 @@ pub struct IMetaDataDispenserEx_Vtbl { pub trait IMetaDataDispenserEx_Impl: IMetaDataDispenser_Impl { fn SetOption(&self, optionid: *const windows_core::GUID, value: *const super::super::Variant::VARIANT) -> windows_core::Result<()>; fn GetOption(&self, optionid: *const windows_core::GUID, pvalue: *mut super::super::Variant::VARIANT) -> windows_core::Result<()>; - fn OpenScopeOnITypeInfo(&self, piti: Option<&super::super::Com::ITypeInfo>, dwopenflags: u32, riid: *const windows_core::GUID) -> windows_core::Result; + fn OpenScopeOnITypeInfo(&self, piti: windows_core::Ref<'_, super::super::Com::ITypeInfo>, dwopenflags: u32, riid: *const windows_core::GUID) -> windows_core::Result; fn GetCORSystemDirectory(&self, szbuffer: windows_core::PWSTR, cchbuffer: u32, pchbuffer: *mut u32) -> windows_core::Result<()>; fn FindAssembly(&self, szappbase: &windows_core::PCWSTR, szprivatebin: &windows_core::PCWSTR, szglobalbin: &windows_core::PCWSTR, szassemblyname: &windows_core::PCWSTR, szname: &windows_core::PCWSTR, cchname: u32, pcname: *mut u32) -> windows_core::Result<()>; fn FindAssemblyModule(&self, szappbase: &windows_core::PCWSTR, szprivatebin: &windows_core::PCWSTR, szglobalbin: &windows_core::PCWSTR, szassemblyname: &windows_core::PCWSTR, szmodulename: &windows_core::PCWSTR, szname: windows_core::PWSTR, cchname: u32, pcname: *mut u32) -> windows_core::Result<()>; @@ -1378,7 +1378,7 @@ impl IMetaDataDispenserEx_Vtbl { } unsafe extern "system" fn OpenScopeOnITypeInfo(this: *mut core::ffi::c_void, piti: *mut core::ffi::c_void, dwopenflags: u32, riid: *const windows_core::GUID, ppiunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMetaDataDispenserEx_Impl::OpenScopeOnITypeInfo(this, windows_core::from_raw_borrowed(&piti), core::mem::transmute_copy(&dwopenflags), core::mem::transmute_copy(&riid)) { + match IMetaDataDispenserEx_Impl::OpenScopeOnITypeInfo(this, core::mem::transmute_copy(&piti), core::mem::transmute_copy(&dwopenflags), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppiunk.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1704,17 +1704,17 @@ pub struct IMetaDataEmit_Vtbl { pub trait IMetaDataEmit_Impl: windows_core::IUnknownImpl { fn SetModuleProps(&self, szname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Save(&self, szfile: &windows_core::PCWSTR, dwsaveflags: u32) -> windows_core::Result<()>; - fn SaveToStream(&self, pistream: Option<&super::super::Com::IStream>, dwsaveflags: u32) -> windows_core::Result<()>; + fn SaveToStream(&self, pistream: windows_core::Ref<'_, super::super::Com::IStream>, dwsaveflags: u32) -> windows_core::Result<()>; fn GetSaveSize(&self, fsave: CorSaveSize, pdwsavesize: *mut u32) -> windows_core::Result<()>; fn DefineTypeDef(&self, sztypedef: &windows_core::PCWSTR, dwtypedefflags: u32, tkextends: u32, rtkimplements: *mut u32, ptd: *mut u32) -> windows_core::Result<()>; fn DefineNestedType(&self, sztypedef: &windows_core::PCWSTR, dwtypedefflags: u32, tkextends: u32, rtkimplements: *mut u32, tdencloser: u32, ptd: *mut u32) -> windows_core::Result<()>; - fn SetHandler(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetHandler(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn DefineMethod(&self, td: u32, szname: &windows_core::PCWSTR, dwmethodflags: u32, pvsigblob: *mut u8, cbsigblob: u32, ulcoderva: u32, dwimplflags: u32, pmd: *mut u32) -> windows_core::Result<()>; fn DefineMethodImpl(&self, td: u32, tkbody: u32, tkdecl: u32) -> windows_core::Result<()>; fn DefineTypeRefByName(&self, tkresolutionscope: u32, szname: &windows_core::PCWSTR, ptr: *mut u32) -> windows_core::Result<()>; - fn DefineImportType(&self, passemimport: Option<&IMetaDataAssemblyImport>, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, pimport: Option<&IMetaDataImport>, tdimport: u32, passememit: Option<&IMetaDataAssemblyEmit>, ptr: *mut u32) -> windows_core::Result<()>; + fn DefineImportType(&self, passemimport: windows_core::Ref<'_, IMetaDataAssemblyImport>, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, pimport: windows_core::Ref<'_, IMetaDataImport>, tdimport: u32, passememit: windows_core::Ref<'_, IMetaDataAssemblyEmit>, ptr: *mut u32) -> windows_core::Result<()>; fn DefineMemberRef(&self, tkimport: u32, szname: &windows_core::PCWSTR, pvsigblob: *mut u8, cbsigblob: u32, pmr: *mut u32) -> windows_core::Result<()>; - fn DefineImportMember(&self, passemimport: Option<&IMetaDataAssemblyImport>, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, pimport: Option<&IMetaDataImport>, mbmember: u32, passememit: Option<&IMetaDataAssemblyEmit>, tkparent: u32, pmr: *mut u32) -> windows_core::Result<()>; + fn DefineImportMember(&self, passemimport: windows_core::Ref<'_, IMetaDataAssemblyImport>, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, pimport: windows_core::Ref<'_, IMetaDataImport>, mbmember: u32, passememit: windows_core::Ref<'_, IMetaDataAssemblyEmit>, tkparent: u32, pmr: *mut u32) -> windows_core::Result<()>; fn DefineEvent(&self, td: u32, szevent: &windows_core::PCWSTR, dweventflags: u32, tkeventtype: u32, mdaddon: u32, mdremoveon: u32, mdfire: u32, rmdothermethods: *mut u32, pmdevent: *mut u32) -> windows_core::Result<()>; fn SetClassLayout(&self, td: u32, dwpacksize: u32, rfieldoffsets: *mut COR_FIELD_OFFSET, ulclasssize: u32) -> windows_core::Result<()>; fn DeleteClassLayout(&self, td: u32) -> windows_core::Result<()>; @@ -1745,11 +1745,11 @@ pub trait IMetaDataEmit_Impl: windows_core::IUnknownImpl { fn SetPropertyProps(&self, pr: u32, dwpropflags: u32, dwcplustypeflag: u32, pvalue: *const core::ffi::c_void, cchvalue: u32, mdsetter: u32, mdgetter: u32, rmdothermethods: *mut u32) -> windows_core::Result<()>; fn SetParamProps(&self, pd: u32, szname: &windows_core::PCWSTR, dwparamflags: u32, dwcplustypeflag: u32, pvalue: *const core::ffi::c_void, cchvalue: u32) -> windows_core::Result<()>; fn DefineSecurityAttributeSet(&self, tkobj: u32, rsecattrs: *mut COR_SECATTR, csecattrs: u32, pulerrorattr: *mut u32) -> windows_core::Result<()>; - fn ApplyEditAndContinue(&self, pimport: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn TranslateSigWithScope(&self, passemimport: Option<&IMetaDataAssemblyImport>, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, import: Option<&IMetaDataImport>, pbsigblob: *mut u8, cbsigblob: u32, passememit: Option<&IMetaDataAssemblyEmit>, emit: Option<&IMetaDataEmit>, pvtranslatedsig: *mut u8, cbtranslatedsigmax: u32, pcbtranslatedsig: *mut u32) -> windows_core::Result<()>; + fn ApplyEditAndContinue(&self, pimport: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn TranslateSigWithScope(&self, passemimport: windows_core::Ref<'_, IMetaDataAssemblyImport>, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, import: windows_core::Ref<'_, IMetaDataImport>, pbsigblob: *mut u8, cbsigblob: u32, passememit: windows_core::Ref<'_, IMetaDataAssemblyEmit>, emit: windows_core::Ref<'_, IMetaDataEmit>, pvtranslatedsig: *mut u8, cbtranslatedsigmax: u32, pcbtranslatedsig: *mut u32) -> windows_core::Result<()>; fn SetMethodImplFlags(&self, md: u32, dwimplflags: u32) -> windows_core::Result<()>; fn SetFieldRVA(&self, fd: u32, ulrva: u32) -> windows_core::Result<()>; - fn Merge(&self, pimport: Option<&IMetaDataImport>, phostmaptoken: Option<&IMapToken>, phandler: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Merge(&self, pimport: windows_core::Ref<'_, IMetaDataImport>, phostmaptoken: windows_core::Ref<'_, IMapToken>, phandler: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn MergeEnd(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -1765,7 +1765,7 @@ impl IMetaDataEmit_Vtbl { } unsafe extern "system" fn SaveToStream(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, dwsaveflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMetaDataEmit_Impl::SaveToStream(this, windows_core::from_raw_borrowed(&pistream), core::mem::transmute_copy(&dwsaveflags)).into() + IMetaDataEmit_Impl::SaveToStream(this, core::mem::transmute_copy(&pistream), core::mem::transmute_copy(&dwsaveflags)).into() } unsafe extern "system" fn GetSaveSize(this: *mut core::ffi::c_void, fsave: CorSaveSize, pdwsavesize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1781,7 +1781,7 @@ impl IMetaDataEmit_Vtbl { } unsafe extern "system" fn SetHandler(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMetaDataEmit_Impl::SetHandler(this, windows_core::from_raw_borrowed(&punk)).into() + IMetaDataEmit_Impl::SetHandler(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn DefineMethod(this: *mut core::ffi::c_void, td: u32, szname: windows_core::PCWSTR, dwmethodflags: u32, pvsigblob: *mut u8, cbsigblob: u32, ulcoderva: u32, dwimplflags: u32, pmd: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1797,7 +1797,7 @@ impl IMetaDataEmit_Vtbl { } unsafe extern "system" fn DefineImportType(this: *mut core::ffi::c_void, passemimport: *mut core::ffi::c_void, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, pimport: *mut core::ffi::c_void, tdimport: u32, passememit: *mut core::ffi::c_void, ptr: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMetaDataEmit_Impl::DefineImportType(this, windows_core::from_raw_borrowed(&passemimport), core::mem::transmute_copy(&pbhashvalue), core::mem::transmute_copy(&cbhashvalue), windows_core::from_raw_borrowed(&pimport), core::mem::transmute_copy(&tdimport), windows_core::from_raw_borrowed(&passememit), core::mem::transmute_copy(&ptr)).into() + IMetaDataEmit_Impl::DefineImportType(this, core::mem::transmute_copy(&passemimport), core::mem::transmute_copy(&pbhashvalue), core::mem::transmute_copy(&cbhashvalue), core::mem::transmute_copy(&pimport), core::mem::transmute_copy(&tdimport), core::mem::transmute_copy(&passememit), core::mem::transmute_copy(&ptr)).into() } unsafe extern "system" fn DefineMemberRef(this: *mut core::ffi::c_void, tkimport: u32, szname: windows_core::PCWSTR, pvsigblob: *mut u8, cbsigblob: u32, pmr: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1805,7 +1805,7 @@ impl IMetaDataEmit_Vtbl { } unsafe extern "system" fn DefineImportMember(this: *mut core::ffi::c_void, passemimport: *mut core::ffi::c_void, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, pimport: *mut core::ffi::c_void, mbmember: u32, passememit: *mut core::ffi::c_void, tkparent: u32, pmr: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMetaDataEmit_Impl::DefineImportMember(this, windows_core::from_raw_borrowed(&passemimport), core::mem::transmute_copy(&pbhashvalue), core::mem::transmute_copy(&cbhashvalue), windows_core::from_raw_borrowed(&pimport), core::mem::transmute_copy(&mbmember), windows_core::from_raw_borrowed(&passememit), core::mem::transmute_copy(&tkparent), core::mem::transmute_copy(&pmr)).into() + IMetaDataEmit_Impl::DefineImportMember(this, core::mem::transmute_copy(&passemimport), core::mem::transmute_copy(&pbhashvalue), core::mem::transmute_copy(&cbhashvalue), core::mem::transmute_copy(&pimport), core::mem::transmute_copy(&mbmember), core::mem::transmute_copy(&passememit), core::mem::transmute_copy(&tkparent), core::mem::transmute_copy(&pmr)).into() } unsafe extern "system" fn DefineEvent(this: *mut core::ffi::c_void, td: u32, szevent: windows_core::PCWSTR, dweventflags: u32, tkeventtype: u32, mdaddon: u32, mdremoveon: u32, mdfire: u32, rmdothermethods: *mut u32, pmdevent: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1929,11 +1929,11 @@ impl IMetaDataEmit_Vtbl { } unsafe extern "system" fn ApplyEditAndContinue(this: *mut core::ffi::c_void, pimport: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMetaDataEmit_Impl::ApplyEditAndContinue(this, windows_core::from_raw_borrowed(&pimport)).into() + IMetaDataEmit_Impl::ApplyEditAndContinue(this, core::mem::transmute_copy(&pimport)).into() } unsafe extern "system" fn TranslateSigWithScope(this: *mut core::ffi::c_void, passemimport: *mut core::ffi::c_void, pbhashvalue: *const core::ffi::c_void, cbhashvalue: u32, import: *mut core::ffi::c_void, pbsigblob: *mut u8, cbsigblob: u32, passememit: *mut core::ffi::c_void, emit: *mut core::ffi::c_void, pvtranslatedsig: *mut u8, cbtranslatedsigmax: u32, pcbtranslatedsig: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMetaDataEmit_Impl::TranslateSigWithScope(this, windows_core::from_raw_borrowed(&passemimport), core::mem::transmute_copy(&pbhashvalue), core::mem::transmute_copy(&cbhashvalue), windows_core::from_raw_borrowed(&import), core::mem::transmute_copy(&pbsigblob), core::mem::transmute_copy(&cbsigblob), windows_core::from_raw_borrowed(&passememit), windows_core::from_raw_borrowed(&emit), core::mem::transmute_copy(&pvtranslatedsig), core::mem::transmute_copy(&cbtranslatedsigmax), core::mem::transmute_copy(&pcbtranslatedsig)).into() + IMetaDataEmit_Impl::TranslateSigWithScope(this, core::mem::transmute_copy(&passemimport), core::mem::transmute_copy(&pbhashvalue), core::mem::transmute_copy(&cbhashvalue), core::mem::transmute_copy(&import), core::mem::transmute_copy(&pbsigblob), core::mem::transmute_copy(&cbsigblob), core::mem::transmute_copy(&passememit), core::mem::transmute_copy(&emit), core::mem::transmute_copy(&pvtranslatedsig), core::mem::transmute_copy(&cbtranslatedsigmax), core::mem::transmute_copy(&pcbtranslatedsig)).into() } unsafe extern "system" fn SetMethodImplFlags(this: *mut core::ffi::c_void, md: u32, dwimplflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1945,7 +1945,7 @@ impl IMetaDataEmit_Vtbl { } unsafe extern "system" fn Merge(this: *mut core::ffi::c_void, pimport: *mut core::ffi::c_void, phostmaptoken: *mut core::ffi::c_void, phandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMetaDataEmit_Impl::Merge(this, windows_core::from_raw_borrowed(&pimport), windows_core::from_raw_borrowed(&phostmaptoken), windows_core::from_raw_borrowed(&phandler)).into() + IMetaDataEmit_Impl::Merge(this, core::mem::transmute_copy(&pimport), core::mem::transmute_copy(&phostmaptoken), core::mem::transmute_copy(&phandler)).into() } unsafe extern "system" fn MergeEnd(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2077,7 +2077,7 @@ pub trait IMetaDataEmit2_Impl: IMetaDataEmit_Impl { fn DefineMethodSpec(&self, tkparent: u32, pvsigblob: *mut u8, cbsigblob: u32, pmi: *mut u32) -> windows_core::Result<()>; fn GetDeltaSaveSize(&self, fsave: CorSaveSize, pdwsavesize: *mut u32) -> windows_core::Result<()>; fn SaveDelta(&self, szfile: &windows_core::PCWSTR, dwsaveflags: u32) -> windows_core::Result<()>; - fn SaveDeltaToStream(&self, pistream: Option<&super::super::Com::IStream>, dwsaveflags: u32) -> windows_core::Result<()>; + fn SaveDeltaToStream(&self, pistream: windows_core::Ref<'_, super::super::Com::IStream>, dwsaveflags: u32) -> windows_core::Result<()>; fn SaveDeltaToMemory(&self, pbdata: *mut core::ffi::c_void, cbdata: u32) -> windows_core::Result<()>; fn DefineGenericParam(&self, tk: u32, ulparamseq: u32, dwparamflags: u32, szname: &windows_core::PCWSTR, reserved: u32, rtkconstraints: *mut u32, pgp: *mut u32) -> windows_core::Result<()>; fn SetGenericParamProps(&self, gp: u32, dwparamflags: u32, szname: &windows_core::PCWSTR, reserved: u32, rtkconstraints: *mut u32) -> windows_core::Result<()>; @@ -2100,7 +2100,7 @@ impl IMetaDataEmit2_Vtbl { } unsafe extern "system" fn SaveDeltaToStream(this: *mut core::ffi::c_void, pistream: *mut core::ffi::c_void, dwsaveflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMetaDataEmit2_Impl::SaveDeltaToStream(this, windows_core::from_raw_borrowed(&pistream), core::mem::transmute_copy(&dwsaveflags)).into() + IMetaDataEmit2_Impl::SaveDeltaToStream(this, core::mem::transmute_copy(&pistream), core::mem::transmute_copy(&dwsaveflags)).into() } unsafe extern "system" fn SaveDeltaToMemory(this: *mut core::ffi::c_void, pbdata: *mut core::ffi::c_void, cbdata: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2555,7 +2555,7 @@ pub trait IMetaDataImport_Impl: windows_core::IUnknownImpl { fn GetTypeDefProps(&self, td: u32, sztypedef: windows_core::PWSTR, cchtypedef: u32, pchtypedef: *mut u32, pdwtypedefflags: *mut u32, ptkextends: *mut u32) -> windows_core::Result<()>; fn GetInterfaceImplProps(&self, iiimpl: u32, pclass: *mut u32, ptkiface: *mut u32) -> windows_core::Result<()>; fn GetTypeRefProps(&self, tr: u32, ptkresolutionscope: *mut u32, szname: windows_core::PWSTR, cchname: u32, pchname: *mut u32) -> windows_core::Result<()>; - fn ResolveTypeRef(&self, tr: u32, riid: *const windows_core::GUID, ppiscope: *mut Option, ptd: *mut u32) -> windows_core::Result<()>; + fn ResolveTypeRef(&self, tr: u32, riid: *const windows_core::GUID, ppiscope: windows_core::OutRef<'_, windows_core::IUnknown>, ptd: *mut u32) -> windows_core::Result<()>; fn EnumMembers(&self, phenum: *mut *mut core::ffi::c_void, cl: u32, rmembers: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()>; fn EnumMembersWithName(&self, phenum: *mut *mut core::ffi::c_void, cl: u32, szname: &windows_core::PCWSTR, rmembers: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()>; fn EnumMethods(&self, phenum: *mut *mut core::ffi::c_void, cl: u32, rmethods: *mut u32, cmax: u32, pctokens: *mut u32) -> windows_core::Result<()>; @@ -3391,14 +3391,14 @@ pub struct IMetaDataValidate_Vtbl { pub ValidateMetaData: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMetaDataValidate_Impl: windows_core::IUnknownImpl { - fn ValidatorInit(&self, dwmoduletype: u32, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ValidatorInit(&self, dwmoduletype: u32, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn ValidateMetaData(&self) -> windows_core::Result<()>; } impl IMetaDataValidate_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ValidatorInit(this: *mut core::ffi::c_void, dwmoduletype: u32, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMetaDataValidate_Impl::ValidatorInit(this, core::mem::transmute_copy(&dwmoduletype), windows_core::from_raw_borrowed(&punk)).into() + IMetaDataValidate_Impl::ValidatorInit(this, core::mem::transmute_copy(&dwmoduletype), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn ValidateMetaData(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3540,14 +3540,14 @@ pub struct IRoMetaDataLocator_Vtbl { pub Locate: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRoMetaDataLocator_Impl { - fn Locate(&self, nameelement: &windows_core::PCWSTR, metadatadestination: Option<&IRoSimpleMetaDataBuilder>) -> windows_core::Result<()>; + fn Locate(&self, nameelement: &windows_core::PCWSTR, metadatadestination: windows_core::Ref<'_, IRoSimpleMetaDataBuilder>) -> windows_core::Result<()>; } impl IRoMetaDataLocator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Locate(this: *mut core::ffi::c_void, nameelement: windows_core::PCWSTR, metadatadestination: *mut core::ffi::c_void) -> windows_core::HRESULT { let this = (this as *mut *mut core::ffi::c_void) as *const windows_core::ScopedHeap; let this = &*((*this).this as *const Identity); - IRoMetaDataLocator_Impl::Locate(this, core::mem::transmute(&nameelement), windows_core::from_raw_borrowed(&metadatadestination)).into() + IRoMetaDataLocator_Impl::Locate(this, core::mem::transmute(&nameelement), core::mem::transmute_copy(&metadatadestination)).into() } Self { Locate: Locate:: } } diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Pdf/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Pdf/mod.rs index a2d6b2390d..0cead1aab3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Pdf/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Pdf/mod.rs @@ -42,19 +42,19 @@ pub struct IPdfRendererNative_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi"))] pub trait IPdfRendererNative_Impl: windows_core::IUnknownImpl { - fn RenderPageToSurface(&self, pdfpage: Option<&windows_core::IUnknown>, psurface: Option<&super::super::super::Graphics::Dxgi::IDXGISurface>, offset: &super::super::super::Foundation::POINT, prenderparams: *const PDF_RENDER_PARAMS) -> windows_core::Result<()>; - fn RenderPageToDeviceContext(&self, pdfpage: Option<&windows_core::IUnknown>, pd2ddevicecontext: Option<&super::super::super::Graphics::Direct2D::ID2D1DeviceContext>, prenderparams: *const PDF_RENDER_PARAMS) -> windows_core::Result<()>; + fn RenderPageToSurface(&self, pdfpage: windows_core::Ref<'_, windows_core::IUnknown>, psurface: windows_core::Ref<'_, super::super::super::Graphics::Dxgi::IDXGISurface>, offset: &super::super::super::Foundation::POINT, prenderparams: *const PDF_RENDER_PARAMS) -> windows_core::Result<()>; + fn RenderPageToDeviceContext(&self, pdfpage: windows_core::Ref<'_, windows_core::IUnknown>, pd2ddevicecontext: windows_core::Ref<'_, super::super::super::Graphics::Direct2D::ID2D1DeviceContext>, prenderparams: *const PDF_RENDER_PARAMS) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi"))] impl IPdfRendererNative_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RenderPageToSurface(this: *mut core::ffi::c_void, pdfpage: *mut core::ffi::c_void, psurface: *mut core::ffi::c_void, offset: super::super::super::Foundation::POINT, prenderparams: *const PDF_RENDER_PARAMS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPdfRendererNative_Impl::RenderPageToSurface(this, windows_core::from_raw_borrowed(&pdfpage), windows_core::from_raw_borrowed(&psurface), core::mem::transmute(&offset), core::mem::transmute_copy(&prenderparams)).into() + IPdfRendererNative_Impl::RenderPageToSurface(this, core::mem::transmute_copy(&pdfpage), core::mem::transmute_copy(&psurface), core::mem::transmute(&offset), core::mem::transmute_copy(&prenderparams)).into() } unsafe extern "system" fn RenderPageToDeviceContext(this: *mut core::ffi::c_void, pdfpage: *mut core::ffi::c_void, pd2ddevicecontext: *mut core::ffi::c_void, prenderparams: *const PDF_RENDER_PARAMS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPdfRendererNative_Impl::RenderPageToDeviceContext(this, windows_core::from_raw_borrowed(&pdfpage), windows_core::from_raw_borrowed(&pd2ddevicecontext), core::mem::transmute_copy(&prenderparams)).into() + IPdfRendererNative_Impl::RenderPageToDeviceContext(this, core::mem::transmute_copy(&pdfpage), core::mem::transmute_copy(&pd2ddevicecontext), core::mem::transmute_copy(&prenderparams)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Printing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Printing/mod.rs index 53b6534f31..28b73fc495 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Printing/mod.rs @@ -32,15 +32,15 @@ pub struct IPrintDocumentPageSource_Vtbl { } #[cfg(feature = "Win32_Storage_Xps_Printing")] pub trait IPrintDocumentPageSource_Impl: windows_core::IUnknownImpl { - fn GetPreviewPageCollection(&self, docpackagetarget: Option<&super::super::super::Storage::Xps::Printing::IPrintDocumentPackageTarget>) -> windows_core::Result; - fn MakeDocument(&self, printtaskoptions: Option<&windows_core::IInspectable>, docpackagetarget: Option<&super::super::super::Storage::Xps::Printing::IPrintDocumentPackageTarget>) -> windows_core::Result<()>; + fn GetPreviewPageCollection(&self, docpackagetarget: windows_core::Ref<'_, super::super::super::Storage::Xps::Printing::IPrintDocumentPackageTarget>) -> windows_core::Result; + fn MakeDocument(&self, printtaskoptions: windows_core::Ref<'_, windows_core::IInspectable>, docpackagetarget: windows_core::Ref<'_, super::super::super::Storage::Xps::Printing::IPrintDocumentPackageTarget>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Storage_Xps_Printing")] impl IPrintDocumentPageSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetPreviewPageCollection(this: *mut core::ffi::c_void, docpackagetarget: *mut core::ffi::c_void, docpagecollection: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPrintDocumentPageSource_Impl::GetPreviewPageCollection(this, windows_core::from_raw_borrowed(&docpackagetarget)) { + match IPrintDocumentPageSource_Impl::GetPreviewPageCollection(this, core::mem::transmute_copy(&docpackagetarget)) { Ok(ok__) => { docpagecollection.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -50,7 +50,7 @@ impl IPrintDocumentPageSource_Vtbl { } unsafe extern "system" fn MakeDocument(this: *mut core::ffi::c_void, printtaskoptions: *mut core::ffi::c_void, docpackagetarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintDocumentPageSource_Impl::MakeDocument(this, windows_core::from_raw_borrowed(&printtaskoptions), windows_core::from_raw_borrowed(&docpackagetarget)).into() + IPrintDocumentPageSource_Impl::MakeDocument(this, core::mem::transmute_copy(&printtaskoptions), core::mem::transmute_copy(&docpackagetarget)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -133,14 +133,14 @@ pub struct IPrintPreviewPageCollection_Vtbl { pub MakePage: unsafe extern "system" fn(*mut core::ffi::c_void, u32, f32, f32) -> windows_core::HRESULT, } pub trait IPrintPreviewPageCollection_Impl: windows_core::IUnknownImpl { - fn Paginate(&self, currentjobpage: u32, printtaskoptions: Option<&windows_core::IInspectable>) -> windows_core::Result<()>; + fn Paginate(&self, currentjobpage: u32, printtaskoptions: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result<()>; fn MakePage(&self, desiredjobpage: u32, width: f32, height: f32) -> windows_core::Result<()>; } impl IPrintPreviewPageCollection_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Paginate(this: *mut core::ffi::c_void, currentjobpage: u32, printtaskoptions: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintPreviewPageCollection_Impl::Paginate(this, core::mem::transmute_copy(¤tjobpage), windows_core::from_raw_borrowed(&printtaskoptions)).into() + IPrintPreviewPageCollection_Impl::Paginate(this, core::mem::transmute_copy(¤tjobpage), core::mem::transmute_copy(&printtaskoptions)).into() } unsafe extern "system" fn MakePage(this: *mut core::ffi::c_void, desiredjobpage: u32, width: f32, height: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -266,7 +266,7 @@ pub struct IPrintWorkflowObjectModelSourceFileContentNative_Vtbl { } #[cfg(feature = "Win32_Storage_Xps")] pub trait IPrintWorkflowObjectModelSourceFileContentNative_Impl: windows_core::IUnknownImpl { - fn StartXpsOMGeneration(&self, receiver: Option<&IPrintWorkflowXpsReceiver>) -> windows_core::Result<()>; + fn StartXpsOMGeneration(&self, receiver: windows_core::Ref<'_, IPrintWorkflowXpsReceiver>) -> windows_core::Result<()>; fn ObjectFactory(&self) -> windows_core::Result; } #[cfg(feature = "Win32_Storage_Xps")] @@ -274,7 +274,7 @@ impl IPrintWorkflowObjectModelSourceFileContentNative_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartXpsOMGeneration(this: *mut core::ffi::c_void, receiver: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintWorkflowObjectModelSourceFileContentNative_Impl::StartXpsOMGeneration(this, windows_core::from_raw_borrowed(&receiver)).into() + IPrintWorkflowObjectModelSourceFileContentNative_Impl::StartXpsOMGeneration(this, core::mem::transmute_copy(&receiver)).into() } unsafe extern "system" fn ObjectFactory(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -396,10 +396,10 @@ pub struct IPrintWorkflowXpsReceiver_Vtbl { } #[cfg(all(feature = "Win32_Storage_Xps", feature = "Win32_System_Com"))] pub trait IPrintWorkflowXpsReceiver_Impl: windows_core::IUnknownImpl { - fn SetDocumentSequencePrintTicket(&self, documentsequenceprintticket: Option<&super::super::Com::IStream>) -> windows_core::Result<()>; + fn SetDocumentSequencePrintTicket(&self, documentsequenceprintticket: windows_core::Ref<'_, super::super::Com::IStream>) -> windows_core::Result<()>; fn SetDocumentSequenceUri(&self, documentsequenceuri: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn AddDocumentData(&self, documentid: u32, documentprintticket: Option<&super::super::Com::IStream>, documenturi: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn AddPage(&self, documentid: u32, pageid: u32, pagereference: Option<&super::super::super::Storage::Xps::IXpsOMPageReference>, pageuri: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn AddDocumentData(&self, documentid: u32, documentprintticket: windows_core::Ref<'_, super::super::Com::IStream>, documenturi: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn AddPage(&self, documentid: u32, pageid: u32, pagereference: windows_core::Ref<'_, super::super::super::Storage::Xps::IXpsOMPageReference>, pageuri: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Storage_Xps", feature = "Win32_System_Com"))] @@ -407,7 +407,7 @@ impl IPrintWorkflowXpsReceiver_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDocumentSequencePrintTicket(this: *mut core::ffi::c_void, documentsequenceprintticket: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintWorkflowXpsReceiver_Impl::SetDocumentSequencePrintTicket(this, windows_core::from_raw_borrowed(&documentsequenceprintticket)).into() + IPrintWorkflowXpsReceiver_Impl::SetDocumentSequencePrintTicket(this, core::mem::transmute_copy(&documentsequenceprintticket)).into() } unsafe extern "system" fn SetDocumentSequenceUri(this: *mut core::ffi::c_void, documentsequenceuri: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -415,11 +415,11 @@ impl IPrintWorkflowXpsReceiver_Vtbl { } unsafe extern "system" fn AddDocumentData(this: *mut core::ffi::c_void, documentid: u32, documentprintticket: *mut core::ffi::c_void, documenturi: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintWorkflowXpsReceiver_Impl::AddDocumentData(this, core::mem::transmute_copy(&documentid), windows_core::from_raw_borrowed(&documentprintticket), core::mem::transmute(&documenturi)).into() + IPrintWorkflowXpsReceiver_Impl::AddDocumentData(this, core::mem::transmute_copy(&documentid), core::mem::transmute_copy(&documentprintticket), core::mem::transmute(&documenturi)).into() } unsafe extern "system" fn AddPage(this: *mut core::ffi::c_void, documentid: u32, pageid: u32, pagereference: *mut core::ffi::c_void, pageuri: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintWorkflowXpsReceiver_Impl::AddPage(this, core::mem::transmute_copy(&documentid), core::mem::transmute_copy(&pageid), windows_core::from_raw_borrowed(&pagereference), core::mem::transmute(&pageuri)).into() + IPrintWorkflowXpsReceiver_Impl::AddPage(this, core::mem::transmute_copy(&documentid), core::mem::transmute_copy(&pageid), core::mem::transmute_copy(&pagereference), core::mem::transmute(&pageuri)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Shell/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Shell/mod.rs index 0c4877124f..aded1f724a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Shell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Shell/mod.rs @@ -32,14 +32,14 @@ pub struct IDDEInitializer_Vtbl { } #[cfg(feature = "Win32_UI_Shell")] pub trait IDDEInitializer_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, fileextensionorprotocol: &windows_core::PCWSTR, method: CreateProcessMethod, currentdirectory: &windows_core::PCWSTR, exectarget: Option<&super::super::super::UI::Shell::IShellItem>, site: Option<&windows_core::IUnknown>, application: &windows_core::PCWSTR, targetfile: &windows_core::PCWSTR, arguments: &windows_core::PCWSTR, verb: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn Initialize(&self, fileextensionorprotocol: &windows_core::PCWSTR, method: CreateProcessMethod, currentdirectory: &windows_core::PCWSTR, exectarget: windows_core::Ref<'_, super::super::super::UI::Shell::IShellItem>, site: windows_core::Ref<'_, windows_core::IUnknown>, application: &windows_core::PCWSTR, targetfile: &windows_core::PCWSTR, arguments: &windows_core::PCWSTR, verb: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell")] impl IDDEInitializer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, fileextensionorprotocol: windows_core::PCWSTR, method: CreateProcessMethod, currentdirectory: windows_core::PCWSTR, exectarget: *mut core::ffi::c_void, site: *mut core::ffi::c_void, application: windows_core::PCWSTR, targetfile: windows_core::PCWSTR, arguments: windows_core::PCWSTR, verb: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDDEInitializer_Impl::Initialize(this, core::mem::transmute(&fileextensionorprotocol), core::mem::transmute_copy(&method), core::mem::transmute(¤tdirectory), windows_core::from_raw_borrowed(&exectarget), windows_core::from_raw_borrowed(&site), core::mem::transmute(&application), core::mem::transmute(&targetfile), core::mem::transmute(&arguments), core::mem::transmute(&verb)).into() + IDDEInitializer_Impl::Initialize(this, core::mem::transmute(&fileextensionorprotocol), core::mem::transmute_copy(&method), core::mem::transmute(¤tdirectory), core::mem::transmute_copy(&exectarget), core::mem::transmute_copy(&site), core::mem::transmute(&application), core::mem::transmute(&targetfile), core::mem::transmute(&arguments), core::mem::transmute(&verb)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Storage/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Storage/mod.rs index edd7b804af..5ecfa5cfa3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Storage/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Storage/mod.rs @@ -212,13 +212,13 @@ pub struct IStorageFolderHandleAccess_Vtbl { pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, HANDLE_CREATION_OPTIONS, HANDLE_ACCESS_OPTIONS, HANDLE_SHARING_OPTIONS, HANDLE_OPTIONS, *mut core::ffi::c_void, *mut super::super::super::Foundation::HANDLE) -> windows_core::HRESULT, } pub trait IStorageFolderHandleAccess_Impl: windows_core::IUnknownImpl { - fn Create(&self, filename: &windows_core::PCWSTR, creationoptions: HANDLE_CREATION_OPTIONS, accessoptions: HANDLE_ACCESS_OPTIONS, sharingoptions: HANDLE_SHARING_OPTIONS, options: HANDLE_OPTIONS, oplockbreakinghandler: Option<&IOplockBreakingHandler>) -> windows_core::Result; + fn Create(&self, filename: &windows_core::PCWSTR, creationoptions: HANDLE_CREATION_OPTIONS, accessoptions: HANDLE_ACCESS_OPTIONS, sharingoptions: HANDLE_SHARING_OPTIONS, options: HANDLE_OPTIONS, oplockbreakinghandler: windows_core::Ref<'_, IOplockBreakingHandler>) -> windows_core::Result; } impl IStorageFolderHandleAccess_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, filename: windows_core::PCWSTR, creationoptions: HANDLE_CREATION_OPTIONS, accessoptions: HANDLE_ACCESS_OPTIONS, sharingoptions: HANDLE_SHARING_OPTIONS, options: HANDLE_OPTIONS, oplockbreakinghandler: *mut core::ffi::c_void, interophandle: *mut super::super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageFolderHandleAccess_Impl::Create(this, core::mem::transmute(&filename), core::mem::transmute_copy(&creationoptions), core::mem::transmute_copy(&accessoptions), core::mem::transmute_copy(&sharingoptions), core::mem::transmute_copy(&options), windows_core::from_raw_borrowed(&oplockbreakinghandler)) { + match IStorageFolderHandleAccess_Impl::Create(this, core::mem::transmute(&filename), core::mem::transmute_copy(&creationoptions), core::mem::transmute_copy(&accessoptions), core::mem::transmute_copy(&sharingoptions), core::mem::transmute_copy(&options), core::mem::transmute_copy(&oplockbreakinghandler)) { Ok(ok__) => { interophandle.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -250,13 +250,13 @@ pub struct IStorageItemHandleAccess_Vtbl { pub Create: unsafe extern "system" fn(*mut core::ffi::c_void, HANDLE_ACCESS_OPTIONS, HANDLE_SHARING_OPTIONS, HANDLE_OPTIONS, *mut core::ffi::c_void, *mut super::super::super::Foundation::HANDLE) -> windows_core::HRESULT, } pub trait IStorageItemHandleAccess_Impl: windows_core::IUnknownImpl { - fn Create(&self, accessoptions: HANDLE_ACCESS_OPTIONS, sharingoptions: HANDLE_SHARING_OPTIONS, options: HANDLE_OPTIONS, oplockbreakinghandler: Option<&IOplockBreakingHandler>) -> windows_core::Result; + fn Create(&self, accessoptions: HANDLE_ACCESS_OPTIONS, sharingoptions: HANDLE_SHARING_OPTIONS, options: HANDLE_OPTIONS, oplockbreakinghandler: windows_core::Ref<'_, IOplockBreakingHandler>) -> windows_core::Result; } impl IStorageItemHandleAccess_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Create(this: *mut core::ffi::c_void, accessoptions: HANDLE_ACCESS_OPTIONS, sharingoptions: HANDLE_SHARING_OPTIONS, options: HANDLE_OPTIONS, oplockbreakinghandler: *mut core::ffi::c_void, interophandle: *mut super::super::super::Foundation::HANDLE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IStorageItemHandleAccess_Impl::Create(this, core::mem::transmute_copy(&accessoptions), core::mem::transmute_copy(&sharingoptions), core::mem::transmute_copy(&options), windows_core::from_raw_borrowed(&oplockbreakinghandler)) { + match IStorageItemHandleAccess_Impl::Create(this, core::mem::transmute_copy(&accessoptions), core::mem::transmute_copy(&sharingoptions), core::mem::transmute_copy(&options), core::mem::transmute_copy(&oplockbreakinghandler)) { Ok(ok__) => { interophandle.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -320,14 +320,14 @@ pub struct IUnbufferedFileHandleProvider_Vtbl { pub CloseUnbufferedFileHandle: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUnbufferedFileHandleProvider_Impl: windows_core::IUnknownImpl { - fn OpenUnbufferedFileHandle(&self, oplockbreakcallback: Option<&IUnbufferedFileHandleOplockCallback>) -> windows_core::Result; + fn OpenUnbufferedFileHandle(&self, oplockbreakcallback: windows_core::Ref<'_, IUnbufferedFileHandleOplockCallback>) -> windows_core::Result; fn CloseUnbufferedFileHandle(&self) -> windows_core::Result<()>; } impl IUnbufferedFileHandleProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OpenUnbufferedFileHandle(this: *mut core::ffi::c_void, oplockbreakcallback: *mut core::ffi::c_void, filehandle: *mut usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUnbufferedFileHandleProvider_Impl::OpenUnbufferedFileHandle(this, windows_core::from_raw_borrowed(&oplockbreakcallback)) { + match IUnbufferedFileHandleProvider_Impl::OpenUnbufferedFileHandle(this, core::mem::transmute_copy(&oplockbreakcallback)) { Ok(ok__) => { filehandle.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs index 328882de6f..58172814f0 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs @@ -823,17 +823,17 @@ pub struct ICastingController_Vtbl { pub UnAdvise: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait ICastingController_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, castingengine: Option<&windows_core::IUnknown>, castingsource: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, castingengine: windows_core::Ref<'_, windows_core::IUnknown>, castingsource: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Connect(&self) -> windows_core::Result<()>; fn Disconnect(&self) -> windows_core::Result<()>; - fn Advise(&self, eventhandler: Option<&ICastingEventHandler>) -> windows_core::Result; + fn Advise(&self, eventhandler: windows_core::Ref<'_, ICastingEventHandler>) -> windows_core::Result; fn UnAdvise(&self, cookie: u32) -> windows_core::Result<()>; } impl ICastingController_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, castingengine: *mut core::ffi::c_void, castingsource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICastingController_Impl::Initialize(this, windows_core::from_raw_borrowed(&castingengine), windows_core::from_raw_borrowed(&castingsource)).into() + ICastingController_Impl::Initialize(this, core::mem::transmute_copy(&castingengine), core::mem::transmute_copy(&castingsource)).into() } unsafe extern "system" fn Connect(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -845,7 +845,7 @@ impl ICastingController_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, eventhandler: *mut core::ffi::c_void, cookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ICastingController_Impl::Advise(this, windows_core::from_raw_borrowed(&eventhandler)) { + match ICastingController_Impl::Advise(this, core::mem::transmute_copy(&eventhandler)) { Ok(ok__) => { cookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -997,14 +997,14 @@ pub struct ICoreInputInterop_Vtbl { pub SetMessageHandled: unsafe extern "system" fn(*mut core::ffi::c_void, u8) -> windows_core::HRESULT, } pub trait ICoreInputInterop_Impl: windows_core::IUnknownImpl { - fn SetInputSource(&self, value: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetInputSource(&self, value: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetMessageHandled(&self, value: u8) -> windows_core::Result<()>; } impl ICoreInputInterop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetInputSource(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICoreInputInterop_Impl::SetInputSource(this, windows_core::from_raw_borrowed(&value)).into() + ICoreInputInterop_Impl::SetInputSource(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn SetMessageHandled(this: *mut core::ffi::c_void, value: u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1127,7 +1127,7 @@ pub trait ICoreWindowAdapterInterop_Impl: windows_core::IUnknownImpl { fn PositionerClientAdapter(&self) -> windows_core::Result; fn SystemNavigationClientAdapter(&self) -> windows_core::Result; fn TitleBarClientAdapter(&self) -> windows_core::Result; - fn SetWindowClientAdapter(&self, value: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetWindowClientAdapter(&self, value: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ICoreWindowAdapterInterop_Vtbl { pub const fn new() -> Self { @@ -1203,7 +1203,7 @@ impl ICoreWindowAdapterInterop_Vtbl { } unsafe extern "system" fn SetWindowClientAdapter(this: *mut core::ffi::c_void, value: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICoreWindowAdapterInterop_Impl::SetWindowClientAdapter(this, windows_core::from_raw_borrowed(&value)).into() + ICoreWindowAdapterInterop_Impl::SetWindowClientAdapter(this, core::mem::transmute_copy(&value)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), @@ -1243,14 +1243,14 @@ pub struct ICoreWindowComponentInterop_Vtbl { pub GetViewInstanceId: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait ICoreWindowComponentInterop_Impl: windows_core::IUnknownImpl { - fn ConfigureComponentInput(&self, hostviewinstanceid: u32, hwndhost: super::super::Foundation::HWND, inputsourcevisual: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ConfigureComponentInput(&self, hostviewinstanceid: u32, hwndhost: super::super::Foundation::HWND, inputsourcevisual: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetViewInstanceId(&self) -> windows_core::Result; } impl ICoreWindowComponentInterop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConfigureComponentInput(this: *mut core::ffi::c_void, hostviewinstanceid: u32, hwndhost: super::super::Foundation::HWND, inputsourcevisual: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICoreWindowComponentInterop_Impl::ConfigureComponentInput(this, core::mem::transmute_copy(&hostviewinstanceid), core::mem::transmute_copy(&hwndhost), windows_core::from_raw_borrowed(&inputsourcevisual)).into() + ICoreWindowComponentInterop_Impl::ConfigureComponentInput(this, core::mem::transmute_copy(&hostviewinstanceid), core::mem::transmute_copy(&hwndhost), core::mem::transmute_copy(&inputsourcevisual)).into() } unsafe extern "system" fn GetViewInstanceId(this: *mut core::ffi::c_void, componentviewinstanceid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1588,7 +1588,7 @@ pub struct ILanguageExceptionErrorInfo2_Vtbl { } pub trait ILanguageExceptionErrorInfo2_Impl: ILanguageExceptionErrorInfo_Impl { fn GetPreviousLanguageExceptionErrorInfo(&self) -> windows_core::Result; - fn CapturePropagationContext(&self, languageexception: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn CapturePropagationContext(&self, languageexception: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetPropagationContextHead(&self) -> windows_core::Result; } impl ILanguageExceptionErrorInfo2_Vtbl { @@ -1605,7 +1605,7 @@ impl ILanguageExceptionErrorInfo2_Vtbl { } unsafe extern "system" fn CapturePropagationContext(this: *mut core::ffi::c_void, languageexception: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILanguageExceptionErrorInfo2_Impl::CapturePropagationContext(this, windows_core::from_raw_borrowed(&languageexception)).into() + ILanguageExceptionErrorInfo2_Impl::CapturePropagationContext(this, core::mem::transmute_copy(&languageexception)).into() } unsafe extern "system" fn GetPropagationContextHead(this: *mut core::ffi::c_void, propagatedlanguageexceptionerrorinfohead: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2246,18 +2246,18 @@ pub struct IWebAuthenticationCoreManagerInterop_Vtbl { pub RequestTokenWithWebAccountForWindowAsync: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HWND, *mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWebAuthenticationCoreManagerInterop_Impl: windows_core::IUnknownImpl { - fn RequestTokenForWindowAsync(&self, appwindow: super::super::Foundation::HWND, request: Option<&windows_core::IInspectable>, riid: *const windows_core::GUID, asyncinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn RequestTokenWithWebAccountForWindowAsync(&self, appwindow: super::super::Foundation::HWND, request: Option<&windows_core::IInspectable>, webaccount: Option<&windows_core::IInspectable>, riid: *const windows_core::GUID, asyncinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestTokenForWindowAsync(&self, appwindow: super::super::Foundation::HWND, request: windows_core::Ref<'_, windows_core::IInspectable>, riid: *const windows_core::GUID, asyncinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn RequestTokenWithWebAccountForWindowAsync(&self, appwindow: super::super::Foundation::HWND, request: windows_core::Ref<'_, windows_core::IInspectable>, webaccount: windows_core::Ref<'_, windows_core::IInspectable>, riid: *const windows_core::GUID, asyncinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IWebAuthenticationCoreManagerInterop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RequestTokenForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, request: *mut core::ffi::c_void, riid: *const windows_core::GUID, asyncinfo: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebAuthenticationCoreManagerInterop_Impl::RequestTokenForWindowAsync(this, core::mem::transmute_copy(&appwindow), windows_core::from_raw_borrowed(&request), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncinfo)).into() + IWebAuthenticationCoreManagerInterop_Impl::RequestTokenForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute_copy(&request), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncinfo)).into() } unsafe extern "system" fn RequestTokenWithWebAccountForWindowAsync(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, request: *mut core::ffi::c_void, webaccount: *mut core::ffi::c_void, riid: *const windows_core::GUID, asyncinfo: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWebAuthenticationCoreManagerInterop_Impl::RequestTokenWithWebAccountForWindowAsync(this, core::mem::transmute_copy(&appwindow), windows_core::from_raw_borrowed(&request), windows_core::from_raw_borrowed(&webaccount), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncinfo)).into() + IWebAuthenticationCoreManagerInterop_Impl::RequestTokenWithWebAccountForWindowAsync(this, core::mem::transmute_copy(&appwindow), core::mem::transmute_copy(&request), core::mem::transmute_copy(&webaccount), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&asyncinfo)).into() } Self { base__: windows_core::IInspectable_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs index 27efc09234..6ba13a746a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs @@ -2263,7 +2263,7 @@ pub struct ICameraUIControl_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ICameraUIControl_Impl: windows_core::IUnknownImpl { - fn Show(&self, pwindow: Option<&windows_core::IUnknown>, mode: CameraUIControlMode, selectionmode: CameraUIControlLinearSelectionMode, capturemode: CameraUIControlCaptureMode, photoformat: CameraUIControlPhotoFormat, videoformat: CameraUIControlVideoFormat, bhasclosebutton: super::super::Foundation::BOOL, peventcallback: Option<&ICameraUIControlEventCallback>) -> windows_core::Result<()>; + fn Show(&self, pwindow: windows_core::Ref<'_, windows_core::IUnknown>, mode: CameraUIControlMode, selectionmode: CameraUIControlLinearSelectionMode, capturemode: CameraUIControlCaptureMode, photoformat: CameraUIControlPhotoFormat, videoformat: CameraUIControlVideoFormat, bhasclosebutton: super::super::Foundation::BOOL, peventcallback: windows_core::Ref<'_, ICameraUIControlEventCallback>) -> windows_core::Result<()>; fn Close(&self) -> windows_core::Result<()>; fn Suspend(&self) -> windows_core::Result; fn Resume(&self) -> windows_core::Result<()>; @@ -2277,7 +2277,7 @@ impl ICameraUIControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Show(this: *mut core::ffi::c_void, pwindow: *mut core::ffi::c_void, mode: CameraUIControlMode, selectionmode: CameraUIControlLinearSelectionMode, capturemode: CameraUIControlCaptureMode, photoformat: CameraUIControlPhotoFormat, videoformat: CameraUIControlVideoFormat, bhasclosebutton: super::super::Foundation::BOOL, peventcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICameraUIControl_Impl::Show(this, windows_core::from_raw_borrowed(&pwindow), core::mem::transmute_copy(&mode), core::mem::transmute_copy(&selectionmode), core::mem::transmute_copy(&capturemode), core::mem::transmute_copy(&photoformat), core::mem::transmute_copy(&videoformat), core::mem::transmute_copy(&bhasclosebutton), windows_core::from_raw_borrowed(&peventcallback)).into() + ICameraUIControl_Impl::Show(this, core::mem::transmute_copy(&pwindow), core::mem::transmute_copy(&mode), core::mem::transmute_copy(&selectionmode), core::mem::transmute_copy(&capturemode), core::mem::transmute_copy(&photoformat), core::mem::transmute_copy(&videoformat), core::mem::transmute_copy(&bhasclosebutton), core::mem::transmute_copy(&peventcallback)).into() } unsafe extern "system" fn Close(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs index 12de4e8e85..3cad9e0633 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs @@ -56,9 +56,9 @@ pub struct IAsynchronousDataRetriever_Vtbl { } pub trait IAsynchronousDataRetriever_Impl: windows_core::IUnknownImpl { fn GetIdParameters(&self, pidparameters: *mut ID_PARAMETERS) -> windows_core::Result<()>; - fn RegisterCallback(&self, pdataretrievercallback: Option<&IDataRetrieverCallback>) -> windows_core::Result<()>; - fn RevokeCallback(&self, pdataretrievercallback: Option<&IDataRetrieverCallback>) -> windows_core::Result<()>; - fn LoadChangeData(&self, ploadchangecontext: Option<&ILoadChangeContext>) -> windows_core::Result<()>; + fn RegisterCallback(&self, pdataretrievercallback: windows_core::Ref<'_, IDataRetrieverCallback>) -> windows_core::Result<()>; + fn RevokeCallback(&self, pdataretrievercallback: windows_core::Ref<'_, IDataRetrieverCallback>) -> windows_core::Result<()>; + fn LoadChangeData(&self, ploadchangecontext: windows_core::Ref<'_, ILoadChangeContext>) -> windows_core::Result<()>; } impl IAsynchronousDataRetriever_Vtbl { pub const fn new() -> Self { @@ -68,15 +68,15 @@ impl IAsynchronousDataRetriever_Vtbl { } unsafe extern "system" fn RegisterCallback(this: *mut core::ffi::c_void, pdataretrievercallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsynchronousDataRetriever_Impl::RegisterCallback(this, windows_core::from_raw_borrowed(&pdataretrievercallback)).into() + IAsynchronousDataRetriever_Impl::RegisterCallback(this, core::mem::transmute_copy(&pdataretrievercallback)).into() } unsafe extern "system" fn RevokeCallback(this: *mut core::ffi::c_void, pdataretrievercallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsynchronousDataRetriever_Impl::RevokeCallback(this, windows_core::from_raw_borrowed(&pdataretrievercallback)).into() + IAsynchronousDataRetriever_Impl::RevokeCallback(this, core::mem::transmute_copy(&pdataretrievercallback)).into() } unsafe extern "system" fn LoadChangeData(this: *mut core::ffi::c_void, ploadchangecontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsynchronousDataRetriever_Impl::LoadChangeData(this, windows_core::from_raw_borrowed(&ploadchangecontext)).into() + IAsynchronousDataRetriever_Impl::LoadChangeData(this, core::mem::transmute_copy(&ploadchangecontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -148,8 +148,8 @@ pub trait IChangeConflict_Impl: windows_core::IUnknownImpl { fn GetSourceProviderConflictingData(&self) -> windows_core::Result; fn GetResolveActionForChange(&self, presolveaction: *mut SYNC_RESOLVE_ACTION) -> windows_core::Result<()>; fn SetResolveActionForChange(&self, resolveaction: SYNC_RESOLVE_ACTION) -> windows_core::Result<()>; - fn GetResolveActionForChangeUnit(&self, pchangeunit: Option<&ISyncChangeUnit>, presolveaction: *mut SYNC_RESOLVE_ACTION) -> windows_core::Result<()>; - fn SetResolveActionForChangeUnit(&self, pchangeunit: Option<&ISyncChangeUnit>, resolveaction: SYNC_RESOLVE_ACTION) -> windows_core::Result<()>; + fn GetResolveActionForChangeUnit(&self, pchangeunit: windows_core::Ref<'_, ISyncChangeUnit>, presolveaction: *mut SYNC_RESOLVE_ACTION) -> windows_core::Result<()>; + fn SetResolveActionForChangeUnit(&self, pchangeunit: windows_core::Ref<'_, ISyncChangeUnit>, resolveaction: SYNC_RESOLVE_ACTION) -> windows_core::Result<()>; } impl IChangeConflict_Vtbl { pub const fn new() -> Self { @@ -203,11 +203,11 @@ impl IChangeConflict_Vtbl { } unsafe extern "system" fn GetResolveActionForChangeUnit(this: *mut core::ffi::c_void, pchangeunit: *mut core::ffi::c_void, presolveaction: *mut SYNC_RESOLVE_ACTION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IChangeConflict_Impl::GetResolveActionForChangeUnit(this, windows_core::from_raw_borrowed(&pchangeunit), core::mem::transmute_copy(&presolveaction)).into() + IChangeConflict_Impl::GetResolveActionForChangeUnit(this, core::mem::transmute_copy(&pchangeunit), core::mem::transmute_copy(&presolveaction)).into() } unsafe extern "system" fn SetResolveActionForChangeUnit(this: *mut core::ffi::c_void, pchangeunit: *mut core::ffi::c_void, resolveaction: SYNC_RESOLVE_ACTION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IChangeConflict_Impl::SetResolveActionForChangeUnit(this, windows_core::from_raw_borrowed(&pchangeunit), core::mem::transmute_copy(&resolveaction)).into() + IChangeConflict_Impl::SetResolveActionForChangeUnit(this, core::mem::transmute_copy(&pchangeunit), core::mem::transmute_copy(&resolveaction)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -557,8 +557,8 @@ pub trait IConstraintConflict_Impl: windows_core::IUnknownImpl { fn GetDestinationProviderOriginalData(&self) -> windows_core::Result; fn GetConstraintResolveActionForChange(&self, pconstraintresolveaction: *mut SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::Result<()>; fn SetConstraintResolveActionForChange(&self, constraintresolveaction: SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::Result<()>; - fn GetConstraintResolveActionForChangeUnit(&self, pchangeunit: Option<&ISyncChangeUnit>, pconstraintresolveaction: *mut SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::Result<()>; - fn SetConstraintResolveActionForChangeUnit(&self, pchangeunit: Option<&ISyncChangeUnit>, constraintresolveaction: SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::Result<()>; + fn GetConstraintResolveActionForChangeUnit(&self, pchangeunit: windows_core::Ref<'_, ISyncChangeUnit>, pconstraintresolveaction: *mut SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::Result<()>; + fn SetConstraintResolveActionForChangeUnit(&self, pchangeunit: windows_core::Ref<'_, ISyncChangeUnit>, constraintresolveaction: SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::Result<()>; fn GetConstraintConflictReason(&self, pconstraintconflictreason: *mut CONSTRAINT_CONFLICT_REASON) -> windows_core::Result<()>; fn IsTemporary(&self) -> windows_core::Result<()>; } @@ -634,11 +634,11 @@ impl IConstraintConflict_Vtbl { } unsafe extern "system" fn GetConstraintResolveActionForChangeUnit(this: *mut core::ffi::c_void, pchangeunit: *mut core::ffi::c_void, pconstraintresolveaction: *mut SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConstraintConflict_Impl::GetConstraintResolveActionForChangeUnit(this, windows_core::from_raw_borrowed(&pchangeunit), core::mem::transmute_copy(&pconstraintresolveaction)).into() + IConstraintConflict_Impl::GetConstraintResolveActionForChangeUnit(this, core::mem::transmute_copy(&pchangeunit), core::mem::transmute_copy(&pconstraintresolveaction)).into() } unsafe extern "system" fn SetConstraintResolveActionForChangeUnit(this: *mut core::ffi::c_void, pchangeunit: *mut core::ffi::c_void, constraintresolveaction: SYNC_CONSTRAINT_RESOLVE_ACTION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConstraintConflict_Impl::SetConstraintResolveActionForChangeUnit(this, windows_core::from_raw_borrowed(&pchangeunit), core::mem::transmute_copy(&constraintresolveaction)).into() + IConstraintConflict_Impl::SetConstraintResolveActionForChangeUnit(this, core::mem::transmute_copy(&pchangeunit), core::mem::transmute_copy(&constraintresolveaction)).into() } unsafe extern "system" fn GetConstraintConflictReason(this: *mut core::ffi::c_void, pconstraintconflictreason: *mut CONSTRAINT_CONFLICT_REASON) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -727,7 +727,7 @@ pub struct ICoreFragment_Vtbl { } pub trait ICoreFragment_Impl: windows_core::IUnknownImpl { fn NextColumn(&self, pchangeunitid: *mut u8, pchangeunitidsize: *mut u32) -> windows_core::Result<()>; - fn NextRange(&self, pitemid: *mut u8, pitemidsize: *mut u32, piclockvector: *mut Option) -> windows_core::Result<()>; + fn NextRange(&self, pitemid: *mut u8, pitemidsize: *mut u32, piclockvector: windows_core::OutRef<'_, IClockVector>) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn GetColumnCount(&self, pcolumncount: *mut u32) -> windows_core::Result<()>; fn GetRangeCount(&self, prangecount: *mut u32) -> windows_core::Result<()>; @@ -785,7 +785,7 @@ pub struct ICoreFragmentInspector_Vtbl { pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICoreFragmentInspector_Impl: windows_core::IUnknownImpl { - fn NextCoreFragments(&self, requestedcount: u32, ppicorefragments: *mut Option, pfetchedcount: *mut u32) -> windows_core::Result<()>; + fn NextCoreFragments(&self, requestedcount: u32, ppicorefragments: windows_core::OutRef<'_, ICoreFragment>, pfetchedcount: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; } impl ICoreFragmentInspector_Vtbl { @@ -894,14 +894,14 @@ pub struct IDataRetrieverCallback_Vtbl { pub LoadChangeDataError: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::HRESULT) -> windows_core::HRESULT, } pub trait IDataRetrieverCallback_Impl: windows_core::IUnknownImpl { - fn LoadChangeDataComplete(&self, punkdata: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn LoadChangeDataComplete(&self, punkdata: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn LoadChangeDataError(&self, hrerror: windows_core::HRESULT) -> windows_core::Result<()>; } impl IDataRetrieverCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn LoadChangeDataComplete(this: *mut core::ffi::c_void, punkdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataRetrieverCallback_Impl::LoadChangeDataComplete(this, windows_core::from_raw_borrowed(&punkdata)).into() + IDataRetrieverCallback_Impl::LoadChangeDataComplete(this, core::mem::transmute_copy(&punkdata)).into() } unsafe extern "system" fn LoadChangeDataError(this: *mut core::ffi::c_void, hrerror: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -944,7 +944,7 @@ pub struct IEnumChangeUnitExceptions_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumChangeUnitExceptions_Impl: windows_core::IUnknownImpl { - fn Next(&self, cexceptions: u32, ppchangeunitexception: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cexceptions: u32, ppchangeunitexception: windows_core::OutRef<'_, IChangeUnitException>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cexceptions: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1012,7 +1012,7 @@ pub struct IEnumClockVector_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumClockVector_Impl: windows_core::IUnknownImpl { - fn Next(&self, cclockvectorelements: u32, ppiclockvectorelements: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cclockvectorelements: u32, ppiclockvectorelements: windows_core::OutRef<'_, IClockVectorElement>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, csyncversions: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1080,7 +1080,7 @@ pub struct IEnumFeedClockVector_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumFeedClockVector_Impl: windows_core::IUnknownImpl { - fn Next(&self, cclockvectorelements: u32, ppiclockvectorelements: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cclockvectorelements: u32, ppiclockvectorelements: windows_core::OutRef<'_, IFeedClockVectorElement>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, csyncversions: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1176,7 +1176,7 @@ pub struct IEnumRangeExceptions_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumRangeExceptions_Impl: windows_core::IUnknownImpl { - fn Next(&self, cexceptions: u32, pprangeexception: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cexceptions: u32, pprangeexception: windows_core::OutRef<'_, IRangeException>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cexceptions: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1244,7 +1244,7 @@ pub struct IEnumSingleItemExceptions_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumSingleItemExceptions_Impl: windows_core::IUnknownImpl { - fn Next(&self, cexceptions: u32, ppsingleitemexception: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cexceptions: u32, ppsingleitemexception: windows_core::OutRef<'_, ISingleItemException>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cexceptions: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1312,7 +1312,7 @@ pub struct IEnumSyncChangeUnits_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumSyncChangeUnits_Impl: windows_core::IUnknownImpl { - fn Next(&self, cchanges: u32, ppchangeunit: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cchanges: u32, ppchangeunit: windows_core::OutRef<'_, ISyncChangeUnit>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cchanges: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1380,7 +1380,7 @@ pub struct IEnumSyncChanges_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumSyncChanges_Impl: windows_core::IUnknownImpl { - fn Next(&self, cchanges: u32, ppchange: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cchanges: u32, ppchange: windows_core::OutRef<'_, ISyncChange>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cchanges: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1453,7 +1453,7 @@ pub struct IEnumSyncProviderConfigUIInfos_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IEnumSyncProviderConfigUIInfos_Impl: windows_core::IUnknownImpl { - fn Next(&self, cfactories: u32, ppsyncproviderconfiguiinfo: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cfactories: u32, ppsyncproviderconfiguiinfo: windows_core::OutRef<'_, ISyncProviderConfigUIInfo>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cfactories: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1528,7 +1528,7 @@ pub struct IEnumSyncProviderInfos_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IEnumSyncProviderInfos_Impl: windows_core::IUnknownImpl { - fn Next(&self, cinstances: u32, ppsyncproviderinfo: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, cinstances: u32, ppsyncproviderinfo: windows_core::OutRef<'_, ISyncProviderInfo>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, cinstances: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1696,7 +1696,7 @@ pub struct IFilterKeyMap_Vtbl { } pub trait IFilterKeyMap_Impl: windows_core::IUnknownImpl { fn GetCount(&self, pdwcount: *mut u32) -> windows_core::Result<()>; - fn AddFilter(&self, pisyncfilter: Option<&ISyncFilter>, pdwfilterkey: *mut u32) -> windows_core::Result<()>; + fn AddFilter(&self, pisyncfilter: windows_core::Ref<'_, ISyncFilter>, pdwfilterkey: *mut u32) -> windows_core::Result<()>; fn GetFilter(&self, dwfilterkey: u32) -> windows_core::Result; fn Serialize(&self, pbfilterkeymap: *mut u8, pcbfilterkeymap: *mut u32) -> windows_core::Result<()>; } @@ -1708,7 +1708,7 @@ impl IFilterKeyMap_Vtbl { } unsafe extern "system" fn AddFilter(this: *mut core::ffi::c_void, pisyncfilter: *mut core::ffi::c_void, pdwfilterkey: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterKeyMap_Impl::AddFilter(this, windows_core::from_raw_borrowed(&pisyncfilter), core::mem::transmute_copy(&pdwfilterkey)).into() + IFilterKeyMap_Impl::AddFilter(this, core::mem::transmute_copy(&pisyncfilter), core::mem::transmute_copy(&pdwfilterkey)).into() } unsafe extern "system" fn GetFilter(this: *mut core::ffi::c_void, dwfilterkey: u32, ppisyncfilter: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1753,13 +1753,13 @@ pub struct IFilterRequestCallback_Vtbl { pub RequestFilter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, FILTERING_TYPE) -> windows_core::HRESULT, } pub trait IFilterRequestCallback_Impl: windows_core::IUnknownImpl { - fn RequestFilter(&self, pfilter: Option<&windows_core::IUnknown>, filteringtype: FILTERING_TYPE) -> windows_core::Result<()>; + fn RequestFilter(&self, pfilter: windows_core::Ref<'_, windows_core::IUnknown>, filteringtype: FILTERING_TYPE) -> windows_core::Result<()>; } impl IFilterRequestCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RequestFilter(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void, filteringtype: FILTERING_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterRequestCallback_Impl::RequestFilter(this, windows_core::from_raw_borrowed(&pfilter), core::mem::transmute_copy(&filteringtype)).into() + IFilterRequestCallback_Impl::RequestFilter(this, core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&filteringtype)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), RequestFilter: RequestFilter:: } } @@ -1791,18 +1791,18 @@ pub struct IFilterTrackingProvider_Vtbl { pub AddTrackedFilter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IFilterTrackingProvider_Impl: windows_core::IUnknownImpl { - fn SpecifyTrackedFilters(&self, pcallback: Option<&IFilterTrackingRequestCallback>) -> windows_core::Result<()>; - fn AddTrackedFilter(&self, pfilter: Option<&ISyncFilter>) -> windows_core::Result<()>; + fn SpecifyTrackedFilters(&self, pcallback: windows_core::Ref<'_, IFilterTrackingRequestCallback>) -> windows_core::Result<()>; + fn AddTrackedFilter(&self, pfilter: windows_core::Ref<'_, ISyncFilter>) -> windows_core::Result<()>; } impl IFilterTrackingProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SpecifyTrackedFilters(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterTrackingProvider_Impl::SpecifyTrackedFilters(this, windows_core::from_raw_borrowed(&pcallback)).into() + IFilterTrackingProvider_Impl::SpecifyTrackedFilters(this, core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn AddTrackedFilter(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterTrackingProvider_Impl::AddTrackedFilter(this, windows_core::from_raw_borrowed(&pfilter)).into() + IFilterTrackingProvider_Impl::AddTrackedFilter(this, core::mem::transmute_copy(&pfilter)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1831,13 +1831,13 @@ pub struct IFilterTrackingRequestCallback_Vtbl { pub RequestTrackedFilter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IFilterTrackingRequestCallback_Impl: windows_core::IUnknownImpl { - fn RequestTrackedFilter(&self, pfilter: Option<&ISyncFilter>) -> windows_core::Result<()>; + fn RequestTrackedFilter(&self, pfilter: windows_core::Ref<'_, ISyncFilter>) -> windows_core::Result<()>; } impl IFilterTrackingRequestCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RequestTrackedFilter(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFilterTrackingRequestCallback_Impl::RequestTrackedFilter(this, windows_core::from_raw_borrowed(&pfilter)).into() + IFilterTrackingRequestCallback_Impl::RequestTrackedFilter(this, core::mem::transmute_copy(&pfilter)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), RequestTrackedFilter: RequestTrackedFilter:: } } @@ -1909,13 +1909,13 @@ pub struct IForgottenKnowledge_Vtbl { pub ForgetToVersion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const SYNC_VERSION) -> windows_core::HRESULT, } pub trait IForgottenKnowledge_Impl: ISyncKnowledge_Impl { - fn ForgetToVersion(&self, pknowledge: Option<&ISyncKnowledge>, pversion: *const SYNC_VERSION) -> windows_core::Result<()>; + fn ForgetToVersion(&self, pknowledge: windows_core::Ref<'_, ISyncKnowledge>, pversion: *const SYNC_VERSION) -> windows_core::Result<()>; } impl IForgottenKnowledge_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ForgetToVersion(this: *mut core::ffi::c_void, pknowledge: *mut core::ffi::c_void, pversion: *const SYNC_VERSION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IForgottenKnowledge_Impl::ForgetToVersion(this, windows_core::from_raw_borrowed(&pknowledge), core::mem::transmute_copy(&pversion)).into() + IForgottenKnowledge_Impl::ForgetToVersion(this, core::mem::transmute_copy(&pknowledge), core::mem::transmute_copy(&pversion)).into() } Self { base__: ISyncKnowledge_Vtbl::new::(), ForgetToVersion: ForgetToVersion:: } } @@ -1989,19 +1989,19 @@ pub struct IKnowledgeSyncProvider_Vtbl { pub EndSession: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IKnowledgeSyncProvider_Impl: ISyncProvider_Impl { - fn BeginSession(&self, role: SYNC_PROVIDER_ROLE, psessionstate: Option<&ISyncSessionState>) -> windows_core::Result<()>; - fn GetSyncBatchParameters(&self, ppsyncknowledge: *mut Option, pdwrequestedbatchsize: *mut u32) -> windows_core::Result<()>; - fn GetChangeBatch(&self, dwbatchsize: u32, psyncknowledge: Option<&ISyncKnowledge>, ppsyncchangebatch: *mut Option, ppunkdataretriever: *mut Option) -> windows_core::Result<()>; - fn GetFullEnumerationChangeBatch(&self, dwbatchsize: u32, pblowerenumerationbound: *const u8, psyncknowledge: Option<&ISyncKnowledge>, ppsyncchangebatch: *mut Option, ppunkdataretriever: *mut Option) -> windows_core::Result<()>; - fn ProcessChangeBatch(&self, resolutionpolicy: CONFLICT_RESOLUTION_POLICY, psourcechangebatch: Option<&ISyncChangeBatch>, punkdataretriever: Option<&windows_core::IUnknown>, pcallback: Option<&ISyncCallback>, psyncsessionstatistics: *mut SYNC_SESSION_STATISTICS) -> windows_core::Result<()>; - fn ProcessFullEnumerationChangeBatch(&self, resolutionpolicy: CONFLICT_RESOLUTION_POLICY, psourcechangebatch: Option<&ISyncFullEnumerationChangeBatch>, punkdataretriever: Option<&windows_core::IUnknown>, pcallback: Option<&ISyncCallback>, psyncsessionstatistics: *mut SYNC_SESSION_STATISTICS) -> windows_core::Result<()>; - fn EndSession(&self, psessionstate: Option<&ISyncSessionState>) -> windows_core::Result<()>; + fn BeginSession(&self, role: SYNC_PROVIDER_ROLE, psessionstate: windows_core::Ref<'_, ISyncSessionState>) -> windows_core::Result<()>; + fn GetSyncBatchParameters(&self, ppsyncknowledge: windows_core::OutRef<'_, ISyncKnowledge>, pdwrequestedbatchsize: *mut u32) -> windows_core::Result<()>; + fn GetChangeBatch(&self, dwbatchsize: u32, psyncknowledge: windows_core::Ref<'_, ISyncKnowledge>, ppsyncchangebatch: windows_core::OutRef<'_, ISyncChangeBatch>, ppunkdataretriever: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetFullEnumerationChangeBatch(&self, dwbatchsize: u32, pblowerenumerationbound: *const u8, psyncknowledge: windows_core::Ref<'_, ISyncKnowledge>, ppsyncchangebatch: windows_core::OutRef<'_, ISyncFullEnumerationChangeBatch>, ppunkdataretriever: windows_core::OutRef<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn ProcessChangeBatch(&self, resolutionpolicy: CONFLICT_RESOLUTION_POLICY, psourcechangebatch: windows_core::Ref<'_, ISyncChangeBatch>, punkdataretriever: windows_core::Ref<'_, windows_core::IUnknown>, pcallback: windows_core::Ref<'_, ISyncCallback>, psyncsessionstatistics: *mut SYNC_SESSION_STATISTICS) -> windows_core::Result<()>; + fn ProcessFullEnumerationChangeBatch(&self, resolutionpolicy: CONFLICT_RESOLUTION_POLICY, psourcechangebatch: windows_core::Ref<'_, ISyncFullEnumerationChangeBatch>, punkdataretriever: windows_core::Ref<'_, windows_core::IUnknown>, pcallback: windows_core::Ref<'_, ISyncCallback>, psyncsessionstatistics: *mut SYNC_SESSION_STATISTICS) -> windows_core::Result<()>; + fn EndSession(&self, psessionstate: windows_core::Ref<'_, ISyncSessionState>) -> windows_core::Result<()>; } impl IKnowledgeSyncProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginSession(this: *mut core::ffi::c_void, role: SYNC_PROVIDER_ROLE, psessionstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKnowledgeSyncProvider_Impl::BeginSession(this, core::mem::transmute_copy(&role), windows_core::from_raw_borrowed(&psessionstate)).into() + IKnowledgeSyncProvider_Impl::BeginSession(this, core::mem::transmute_copy(&role), core::mem::transmute_copy(&psessionstate)).into() } unsafe extern "system" fn GetSyncBatchParameters(this: *mut core::ffi::c_void, ppsyncknowledge: *mut *mut core::ffi::c_void, pdwrequestedbatchsize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2009,23 +2009,23 @@ impl IKnowledgeSyncProvider_Vtbl { } unsafe extern "system" fn GetChangeBatch(this: *mut core::ffi::c_void, dwbatchsize: u32, psyncknowledge: *mut core::ffi::c_void, ppsyncchangebatch: *mut *mut core::ffi::c_void, ppunkdataretriever: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKnowledgeSyncProvider_Impl::GetChangeBatch(this, core::mem::transmute_copy(&dwbatchsize), windows_core::from_raw_borrowed(&psyncknowledge), core::mem::transmute_copy(&ppsyncchangebatch), core::mem::transmute_copy(&ppunkdataretriever)).into() + IKnowledgeSyncProvider_Impl::GetChangeBatch(this, core::mem::transmute_copy(&dwbatchsize), core::mem::transmute_copy(&psyncknowledge), core::mem::transmute_copy(&ppsyncchangebatch), core::mem::transmute_copy(&ppunkdataretriever)).into() } unsafe extern "system" fn GetFullEnumerationChangeBatch(this: *mut core::ffi::c_void, dwbatchsize: u32, pblowerenumerationbound: *const u8, psyncknowledge: *mut core::ffi::c_void, ppsyncchangebatch: *mut *mut core::ffi::c_void, ppunkdataretriever: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKnowledgeSyncProvider_Impl::GetFullEnumerationChangeBatch(this, core::mem::transmute_copy(&dwbatchsize), core::mem::transmute_copy(&pblowerenumerationbound), windows_core::from_raw_borrowed(&psyncknowledge), core::mem::transmute_copy(&ppsyncchangebatch), core::mem::transmute_copy(&ppunkdataretriever)).into() + IKnowledgeSyncProvider_Impl::GetFullEnumerationChangeBatch(this, core::mem::transmute_copy(&dwbatchsize), core::mem::transmute_copy(&pblowerenumerationbound), core::mem::transmute_copy(&psyncknowledge), core::mem::transmute_copy(&ppsyncchangebatch), core::mem::transmute_copy(&ppunkdataretriever)).into() } unsafe extern "system" fn ProcessChangeBatch(this: *mut core::ffi::c_void, resolutionpolicy: CONFLICT_RESOLUTION_POLICY, psourcechangebatch: *mut core::ffi::c_void, punkdataretriever: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, psyncsessionstatistics: *mut SYNC_SESSION_STATISTICS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKnowledgeSyncProvider_Impl::ProcessChangeBatch(this, core::mem::transmute_copy(&resolutionpolicy), windows_core::from_raw_borrowed(&psourcechangebatch), windows_core::from_raw_borrowed(&punkdataretriever), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&psyncsessionstatistics)).into() + IKnowledgeSyncProvider_Impl::ProcessChangeBatch(this, core::mem::transmute_copy(&resolutionpolicy), core::mem::transmute_copy(&psourcechangebatch), core::mem::transmute_copy(&punkdataretriever), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&psyncsessionstatistics)).into() } unsafe extern "system" fn ProcessFullEnumerationChangeBatch(this: *mut core::ffi::c_void, resolutionpolicy: CONFLICT_RESOLUTION_POLICY, psourcechangebatch: *mut core::ffi::c_void, punkdataretriever: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, psyncsessionstatistics: *mut SYNC_SESSION_STATISTICS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKnowledgeSyncProvider_Impl::ProcessFullEnumerationChangeBatch(this, core::mem::transmute_copy(&resolutionpolicy), windows_core::from_raw_borrowed(&psourcechangebatch), windows_core::from_raw_borrowed(&punkdataretriever), windows_core::from_raw_borrowed(&pcallback), core::mem::transmute_copy(&psyncsessionstatistics)).into() + IKnowledgeSyncProvider_Impl::ProcessFullEnumerationChangeBatch(this, core::mem::transmute_copy(&resolutionpolicy), core::mem::transmute_copy(&psourcechangebatch), core::mem::transmute_copy(&punkdataretriever), core::mem::transmute_copy(&pcallback), core::mem::transmute_copy(&psyncsessionstatistics)).into() } unsafe extern "system" fn EndSession(this: *mut core::ffi::c_void, psessionstate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IKnowledgeSyncProvider_Impl::EndSession(this, windows_core::from_raw_borrowed(&psessionstate)).into() + IKnowledgeSyncProvider_Impl::EndSession(this, core::mem::transmute_copy(&psessionstate)).into() } Self { base__: ISyncProvider_Vtbl::new::(), @@ -2073,8 +2073,8 @@ pub struct ILoadChangeContext_Vtbl { } pub trait ILoadChangeContext_Impl: windows_core::IUnknownImpl { fn GetSyncChange(&self) -> windows_core::Result; - fn SetRecoverableErrorOnChange(&self, hrerror: windows_core::HRESULT, perrordata: Option<&IRecoverableErrorData>) -> windows_core::Result<()>; - fn SetRecoverableErrorOnChangeUnit(&self, hrerror: windows_core::HRESULT, pchangeunit: Option<&ISyncChangeUnit>, perrordata: Option<&IRecoverableErrorData>) -> windows_core::Result<()>; + fn SetRecoverableErrorOnChange(&self, hrerror: windows_core::HRESULT, perrordata: windows_core::Ref<'_, IRecoverableErrorData>) -> windows_core::Result<()>; + fn SetRecoverableErrorOnChangeUnit(&self, hrerror: windows_core::HRESULT, pchangeunit: windows_core::Ref<'_, ISyncChangeUnit>, perrordata: windows_core::Ref<'_, IRecoverableErrorData>) -> windows_core::Result<()>; } impl ILoadChangeContext_Vtbl { pub const fn new() -> Self { @@ -2090,11 +2090,11 @@ impl ILoadChangeContext_Vtbl { } unsafe extern "system" fn SetRecoverableErrorOnChange(this: *mut core::ffi::c_void, hrerror: windows_core::HRESULT, perrordata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoadChangeContext_Impl::SetRecoverableErrorOnChange(this, core::mem::transmute_copy(&hrerror), windows_core::from_raw_borrowed(&perrordata)).into() + ILoadChangeContext_Impl::SetRecoverableErrorOnChange(this, core::mem::transmute_copy(&hrerror), core::mem::transmute_copy(&perrordata)).into() } unsafe extern "system" fn SetRecoverableErrorOnChangeUnit(this: *mut core::ffi::c_void, hrerror: windows_core::HRESULT, pchangeunit: *mut core::ffi::c_void, perrordata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILoadChangeContext_Impl::SetRecoverableErrorOnChangeUnit(this, core::mem::transmute_copy(&hrerror), windows_core::from_raw_borrowed(&pchangeunit), windows_core::from_raw_borrowed(&perrordata)).into() + ILoadChangeContext_Impl::SetRecoverableErrorOnChangeUnit(this, core::mem::transmute_copy(&hrerror), core::mem::transmute_copy(&pchangeunit), core::mem::transmute_copy(&perrordata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2124,13 +2124,13 @@ pub struct IProviderConverter_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IProviderConverter_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pisyncprovider: Option<&ISyncProvider>) -> windows_core::Result<()>; + fn Initialize(&self, pisyncprovider: windows_core::Ref<'_, ISyncProvider>) -> windows_core::Result<()>; } impl IProviderConverter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pisyncprovider: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProviderConverter_Impl::Initialize(this, windows_core::from_raw_borrowed(&pisyncprovider)).into() + IProviderConverter_Impl::Initialize(this, core::mem::transmute_copy(&pisyncprovider)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -2226,8 +2226,8 @@ pub trait IRecoverableError_Impl: windows_core::IUnknownImpl { fn GetStage(&self, pstage: *mut SYNC_PROGRESS_STAGE) -> windows_core::Result<()>; fn GetProvider(&self, pproviderrole: *mut SYNC_PROVIDER_ROLE) -> windows_core::Result<()>; fn GetChangeWithRecoverableError(&self) -> windows_core::Result; - fn GetRecoverableErrorDataForChange(&self, phrerror: *mut windows_core::HRESULT, pperrordata: *mut Option) -> windows_core::Result<()>; - fn GetRecoverableErrorDataForChangeUnit(&self, pchangeunit: Option<&ISyncChangeUnit>, phrerror: *mut windows_core::HRESULT, pperrordata: *mut Option) -> windows_core::Result<()>; + fn GetRecoverableErrorDataForChange(&self, phrerror: *mut windows_core::HRESULT, pperrordata: windows_core::OutRef<'_, IRecoverableErrorData>) -> windows_core::Result<()>; + fn GetRecoverableErrorDataForChangeUnit(&self, pchangeunit: windows_core::Ref<'_, ISyncChangeUnit>, phrerror: *mut windows_core::HRESULT, pperrordata: windows_core::OutRef<'_, IRecoverableErrorData>) -> windows_core::Result<()>; } impl IRecoverableError_Vtbl { pub const fn new() -> Self { @@ -2255,7 +2255,7 @@ impl IRecoverableError_Vtbl { } unsafe extern "system" fn GetRecoverableErrorDataForChangeUnit(this: *mut core::ffi::c_void, pchangeunit: *mut core::ffi::c_void, phrerror: *mut windows_core::HRESULT, pperrordata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRecoverableError_Impl::GetRecoverableErrorDataForChangeUnit(this, windows_core::from_raw_borrowed(&pchangeunit), core::mem::transmute_copy(&phrerror), core::mem::transmute_copy(&pperrordata)).into() + IRecoverableError_Impl::GetRecoverableErrorDataForChangeUnit(this, core::mem::transmute_copy(&pchangeunit), core::mem::transmute_copy(&phrerror), core::mem::transmute_copy(&pperrordata)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2362,7 +2362,7 @@ pub struct IRegisteredSyncProvider_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IRegisteredSyncProvider_Impl: windows_core::IUnknownImpl { - fn Init(&self, pguidinstanceid: *const windows_core::GUID, pguidcontenttype: *const windows_core::GUID, pcontextpropertystore: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn Init(&self, pguidinstanceid: *const windows_core::GUID, pguidcontenttype: *const windows_core::GUID, pcontextpropertystore: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; fn GetInstanceId(&self) -> windows_core::Result; fn Reset(&self) -> windows_core::Result<()>; } @@ -2371,7 +2371,7 @@ impl IRegisteredSyncProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, pguidinstanceid: *const windows_core::GUID, pguidcontenttype: *const windows_core::GUID, pcontextpropertystore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRegisteredSyncProvider_Impl::Init(this, core::mem::transmute_copy(&pguidinstanceid), core::mem::transmute_copy(&pguidcontenttype), windows_core::from_raw_borrowed(&pcontextpropertystore)).into() + IRegisteredSyncProvider_Impl::Init(this, core::mem::transmute_copy(&pguidinstanceid), core::mem::transmute_copy(&pguidcontenttype), core::mem::transmute_copy(&pcontextpropertystore)).into() } unsafe extern "system" fn GetInstanceId(this: *mut core::ffi::c_void, pguidinstanceid: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2467,13 +2467,13 @@ pub struct IRequestFilteredSync_Vtbl { pub SpecifyFilter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRequestFilteredSync_Impl: windows_core::IUnknownImpl { - fn SpecifyFilter(&self, pcallback: Option<&IFilterRequestCallback>) -> windows_core::Result<()>; + fn SpecifyFilter(&self, pcallback: windows_core::Ref<'_, IFilterRequestCallback>) -> windows_core::Result<()>; } impl IRequestFilteredSync_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SpecifyFilter(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRequestFilteredSync_Impl::SpecifyFilter(this, windows_core::from_raw_borrowed(&pcallback)).into() + IRequestFilteredSync_Impl::SpecifyFilter(this, core::mem::transmute_copy(&pcallback)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SpecifyFilter: SpecifyFilter:: } } @@ -2539,13 +2539,13 @@ pub struct ISupportFilteredSync_Vtbl { pub AddFilter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, FILTERING_TYPE) -> windows_core::HRESULT, } pub trait ISupportFilteredSync_Impl: windows_core::IUnknownImpl { - fn AddFilter(&self, pfilter: Option<&windows_core::IUnknown>, filteringtype: FILTERING_TYPE) -> windows_core::Result<()>; + fn AddFilter(&self, pfilter: windows_core::Ref<'_, windows_core::IUnknown>, filteringtype: FILTERING_TYPE) -> windows_core::Result<()>; } impl ISupportFilteredSync_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddFilter(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void, filteringtype: FILTERING_TYPE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISupportFilteredSync_Impl::AddFilter(this, windows_core::from_raw_borrowed(&pfilter), core::mem::transmute_copy(&filteringtype)).into() + ISupportFilteredSync_Impl::AddFilter(this, core::mem::transmute_copy(&pfilter), core::mem::transmute_copy(&filteringtype)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), AddFilter: AddFilter:: } } @@ -2634,10 +2634,10 @@ pub struct ISyncCallback_Vtbl { } pub trait ISyncCallback_Impl: windows_core::IUnknownImpl { fn OnProgress(&self, provider: SYNC_PROVIDER_ROLE, syncstage: SYNC_PROGRESS_STAGE, dwcompletedwork: u32, dwtotalwork: u32) -> windows_core::Result<()>; - fn OnChange(&self, psyncchange: Option<&ISyncChange>) -> windows_core::Result<()>; - fn OnConflict(&self, pconflict: Option<&IChangeConflict>) -> windows_core::Result<()>; + fn OnChange(&self, psyncchange: windows_core::Ref<'_, ISyncChange>) -> windows_core::Result<()>; + fn OnConflict(&self, pconflict: windows_core::Ref<'_, IChangeConflict>) -> windows_core::Result<()>; fn OnFullEnumerationNeeded(&self, pfullenumerationaction: *mut SYNC_FULL_ENUMERATION_ACTION) -> windows_core::Result<()>; - fn OnRecoverableError(&self, precoverableerror: Option<&IRecoverableError>) -> windows_core::Result<()>; + fn OnRecoverableError(&self, precoverableerror: windows_core::Ref<'_, IRecoverableError>) -> windows_core::Result<()>; } impl ISyncCallback_Vtbl { pub const fn new() -> Self { @@ -2647,11 +2647,11 @@ impl ISyncCallback_Vtbl { } unsafe extern "system" fn OnChange(this: *mut core::ffi::c_void, psyncchange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncCallback_Impl::OnChange(this, windows_core::from_raw_borrowed(&psyncchange)).into() + ISyncCallback_Impl::OnChange(this, core::mem::transmute_copy(&psyncchange)).into() } unsafe extern "system" fn OnConflict(this: *mut core::ffi::c_void, pconflict: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncCallback_Impl::OnConflict(this, windows_core::from_raw_borrowed(&pconflict)).into() + ISyncCallback_Impl::OnConflict(this, core::mem::transmute_copy(&pconflict)).into() } unsafe extern "system" fn OnFullEnumerationNeeded(this: *mut core::ffi::c_void, pfullenumerationaction: *mut SYNC_FULL_ENUMERATION_ACTION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2659,7 +2659,7 @@ impl ISyncCallback_Vtbl { } unsafe extern "system" fn OnRecoverableError(this: *mut core::ffi::c_void, precoverableerror: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncCallback_Impl::OnRecoverableError(this, windows_core::from_raw_borrowed(&precoverableerror)).into() + ISyncCallback_Impl::OnRecoverableError(this, core::mem::transmute_copy(&precoverableerror)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2899,8 +2899,8 @@ pub struct ISyncChangeBatch_Vtbl { } pub trait ISyncChangeBatch_Impl: ISyncChangeBatchBase_Impl { fn BeginUnorderedGroup(&self) -> windows_core::Result<()>; - fn EndUnorderedGroup(&self, pmadewithknowledge: Option<&ISyncKnowledge>, fallchangesforknowledge: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn AddLoggedConflict(&self, pbownerreplicaid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwflags: u32, dwworkforchange: u32, pconflictknowledge: Option<&ISyncKnowledge>) -> windows_core::Result; + fn EndUnorderedGroup(&self, pmadewithknowledge: windows_core::Ref<'_, ISyncKnowledge>, fallchangesforknowledge: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn AddLoggedConflict(&self, pbownerreplicaid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwflags: u32, dwworkforchange: u32, pconflictknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result; } impl ISyncChangeBatch_Vtbl { pub const fn new() -> Self { @@ -2910,11 +2910,11 @@ impl ISyncChangeBatch_Vtbl { } unsafe extern "system" fn EndUnorderedGroup(this: *mut core::ffi::c_void, pmadewithknowledge: *mut core::ffi::c_void, fallchangesforknowledge: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncChangeBatch_Impl::EndUnorderedGroup(this, windows_core::from_raw_borrowed(&pmadewithknowledge), core::mem::transmute_copy(&fallchangesforknowledge)).into() + ISyncChangeBatch_Impl::EndUnorderedGroup(this, core::mem::transmute_copy(&pmadewithknowledge), core::mem::transmute_copy(&fallchangesforknowledge)).into() } unsafe extern "system" fn AddLoggedConflict(this: *mut core::ffi::c_void, pbownerreplicaid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwflags: u32, dwworkforchange: u32, pconflictknowledge: *mut core::ffi::c_void, ppchangebuilder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeBatch_Impl::AddLoggedConflict(this, core::mem::transmute_copy(&pbownerreplicaid), core::mem::transmute_copy(&pbitemid), core::mem::transmute_copy(&pchangeversion), core::mem::transmute_copy(&pcreationversion), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&dwworkforchange), windows_core::from_raw_borrowed(&pconflictknowledge)) { + match ISyncChangeBatch_Impl::AddLoggedConflict(this, core::mem::transmute_copy(&pbownerreplicaid), core::mem::transmute_copy(&pbitemid), core::mem::transmute_copy(&pchangeversion), core::mem::transmute_copy(&pcreationversion), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&dwworkforchange), core::mem::transmute_copy(&pconflictknowledge)) { Ok(ok__) => { ppchangebuilder.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2963,7 +2963,7 @@ pub struct ISyncChangeBatch2_Vtbl { } pub trait ISyncChangeBatch2_Impl: ISyncChangeBatch_Impl { fn AddMergeTombstoneMetadataToGroup(&self, pbownerreplicaid: *const u8, pbwinneritemid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwworkforchange: u32) -> windows_core::Result; - fn AddMergeTombstoneLoggedConflict(&self, pbownerreplicaid: *const u8, pbwinneritemid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwworkforchange: u32, pconflictknowledge: Option<&ISyncKnowledge>) -> windows_core::Result; + fn AddMergeTombstoneLoggedConflict(&self, pbownerreplicaid: *const u8, pbwinneritemid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwworkforchange: u32, pconflictknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result; } impl ISyncChangeBatch2_Vtbl { pub const fn new() -> Self { @@ -2979,7 +2979,7 @@ impl ISyncChangeBatch2_Vtbl { } unsafe extern "system" fn AddMergeTombstoneLoggedConflict(this: *mut core::ffi::c_void, pbownerreplicaid: *const u8, pbwinneritemid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwworkforchange: u32, pconflictknowledge: *mut core::ffi::c_void, ppchangebuilder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeBatch2_Impl::AddMergeTombstoneLoggedConflict(this, core::mem::transmute_copy(&pbownerreplicaid), core::mem::transmute_copy(&pbwinneritemid), core::mem::transmute_copy(&pbitemid), core::mem::transmute_copy(&pchangeversion), core::mem::transmute_copy(&pcreationversion), core::mem::transmute_copy(&dwworkforchange), windows_core::from_raw_borrowed(&pconflictknowledge)) { + match ISyncChangeBatch2_Impl::AddMergeTombstoneLoggedConflict(this, core::mem::transmute_copy(&pbownerreplicaid), core::mem::transmute_copy(&pbwinneritemid), core::mem::transmute_copy(&pbitemid), core::mem::transmute_copy(&pchangeversion), core::mem::transmute_copy(&pcreationversion), core::mem::transmute_copy(&dwworkforchange), core::mem::transmute_copy(&pconflictknowledge)) { Ok(ok__) => { ppchangebuilder.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3151,7 +3151,7 @@ pub trait ISyncChangeBatchBase_Impl: windows_core::IUnknownImpl { fn GetWorkEstimateForBatch(&self, pdwworkforbatch: *mut u32) -> windows_core::Result<()>; fn GetRemainingWorkEstimateForSession(&self, pdwremainingworkforsession: *mut u32) -> windows_core::Result<()>; fn BeginOrderedGroup(&self, pblowerbound: *const u8) -> windows_core::Result<()>; - fn EndOrderedGroup(&self, pbupperbound: *const u8, pmadewithknowledge: Option<&ISyncKnowledge>) -> windows_core::Result<()>; + fn EndOrderedGroup(&self, pbupperbound: *const u8, pmadewithknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result<()>; fn AddItemMetadataToGroup(&self, pbownerreplicaid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwflags: u32, dwworkforchange: u32) -> windows_core::Result; fn GetLearnedKnowledge(&self) -> windows_core::Result; fn GetPrerequisiteKnowledge(&self) -> windows_core::Result; @@ -3191,7 +3191,7 @@ impl ISyncChangeBatchBase_Vtbl { } unsafe extern "system" fn EndOrderedGroup(this: *mut core::ffi::c_void, pbupperbound: *const u8, pmadewithknowledge: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncChangeBatchBase_Impl::EndOrderedGroup(this, core::mem::transmute_copy(&pbupperbound), windows_core::from_raw_borrowed(&pmadewithknowledge)).into() + ISyncChangeBatchBase_Impl::EndOrderedGroup(this, core::mem::transmute_copy(&pbupperbound), core::mem::transmute_copy(&pmadewithknowledge)).into() } unsafe extern "system" fn AddItemMetadataToGroup(this: *mut core::ffi::c_void, pbownerreplicaid: *const u8, pbitemid: *const u8, pchangeversion: *const SYNC_VERSION, pcreationversion: *const SYNC_VERSION, dwflags: u32, dwworkforchange: u32, ppchangebuilder: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3380,13 +3380,13 @@ pub struct ISyncChangeBatchWithFilterKeyMap_Vtbl { } pub trait ISyncChangeBatchWithFilterKeyMap_Impl: windows_core::IUnknownImpl { fn GetFilterKeyMap(&self) -> windows_core::Result; - fn SetFilterKeyMap(&self, pifilterkeymap: Option<&IFilterKeyMap>) -> windows_core::Result<()>; - fn SetFilterForgottenKnowledge(&self, dwfilterkey: u32, pfilterforgottenknowledge: Option<&ISyncKnowledge>) -> windows_core::Result<()>; - fn GetFilteredReplicaLearnedKnowledge(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>) -> windows_core::Result; - fn GetLearnedFilterForgottenKnowledge(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>, dwfilterkey: u32) -> windows_core::Result; - fn GetFilteredReplicaLearnedForgottenKnowledge(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>) -> windows_core::Result; - fn GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>) -> windows_core::Result; - fn GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>, dwfilterkey: u32) -> windows_core::Result; + fn SetFilterKeyMap(&self, pifilterkeymap: windows_core::Ref<'_, IFilterKeyMap>) -> windows_core::Result<()>; + fn SetFilterForgottenKnowledge(&self, dwfilterkey: u32, pfilterforgottenknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result<()>; + fn GetFilteredReplicaLearnedKnowledge(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>) -> windows_core::Result; + fn GetLearnedFilterForgottenKnowledge(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>, dwfilterkey: u32) -> windows_core::Result; + fn GetFilteredReplicaLearnedForgottenKnowledge(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>) -> windows_core::Result; + fn GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>) -> windows_core::Result; + fn GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>, dwfilterkey: u32) -> windows_core::Result; } impl ISyncChangeBatchWithFilterKeyMap_Vtbl { pub const fn new() -> Self { @@ -3402,15 +3402,15 @@ impl ISyncChangeBatchWithFilterKeyMap_Vtbl { } unsafe extern "system" fn SetFilterKeyMap(this: *mut core::ffi::c_void, pifilterkeymap: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncChangeBatchWithFilterKeyMap_Impl::SetFilterKeyMap(this, windows_core::from_raw_borrowed(&pifilterkeymap)).into() + ISyncChangeBatchWithFilterKeyMap_Impl::SetFilterKeyMap(this, core::mem::transmute_copy(&pifilterkeymap)).into() } unsafe extern "system" fn SetFilterForgottenKnowledge(this: *mut core::ffi::c_void, dwfilterkey: u32, pfilterforgottenknowledge: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncChangeBatchWithFilterKeyMap_Impl::SetFilterForgottenKnowledge(this, core::mem::transmute_copy(&dwfilterkey), windows_core::from_raw_borrowed(&pfilterforgottenknowledge)).into() + ISyncChangeBatchWithFilterKeyMap_Impl::SetFilterForgottenKnowledge(this, core::mem::transmute_copy(&dwfilterkey), core::mem::transmute_copy(&pfilterforgottenknowledge)).into() } unsafe extern "system" fn GetFilteredReplicaLearnedKnowledge(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, pplearnedforgottenknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeBatchWithFilterKeyMap_Impl::GetFilteredReplicaLearnedKnowledge(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins)) { + match ISyncChangeBatchWithFilterKeyMap_Impl::GetFilteredReplicaLearnedKnowledge(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins)) { Ok(ok__) => { pplearnedforgottenknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3420,7 +3420,7 @@ impl ISyncChangeBatchWithFilterKeyMap_Vtbl { } unsafe extern "system" fn GetLearnedFilterForgottenKnowledge(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, dwfilterkey: u32, pplearnedfilterforgottenknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeBatchWithFilterKeyMap_Impl::GetLearnedFilterForgottenKnowledge(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins), core::mem::transmute_copy(&dwfilterkey)) { + match ISyncChangeBatchWithFilterKeyMap_Impl::GetLearnedFilterForgottenKnowledge(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins), core::mem::transmute_copy(&dwfilterkey)) { Ok(ok__) => { pplearnedfilterforgottenknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3430,7 +3430,7 @@ impl ISyncChangeBatchWithFilterKeyMap_Vtbl { } unsafe extern "system" fn GetFilteredReplicaLearnedForgottenKnowledge(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, pplearnedforgottenknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeBatchWithFilterKeyMap_Impl::GetFilteredReplicaLearnedForgottenKnowledge(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins)) { + match ISyncChangeBatchWithFilterKeyMap_Impl::GetFilteredReplicaLearnedForgottenKnowledge(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins)) { Ok(ok__) => { pplearnedforgottenknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3440,7 +3440,7 @@ impl ISyncChangeBatchWithFilterKeyMap_Vtbl { } unsafe extern "system" fn GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, pplearnedforgottenknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeBatchWithFilterKeyMap_Impl::GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins)) { + match ISyncChangeBatchWithFilterKeyMap_Impl::GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins)) { Ok(ok__) => { pplearnedforgottenknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3450,7 +3450,7 @@ impl ISyncChangeBatchWithFilterKeyMap_Vtbl { } unsafe extern "system" fn GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, dwfilterkey: u32, pplearnedfilterforgottenknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeBatchWithFilterKeyMap_Impl::GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins), core::mem::transmute_copy(&dwfilterkey)) { + match ISyncChangeBatchWithFilterKeyMap_Impl::GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins), core::mem::transmute_copy(&dwfilterkey)) { Ok(ok__) => { pplearnedfilterforgottenknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3510,19 +3510,19 @@ pub struct ISyncChangeBatchWithPrerequisite_Vtbl { pub GetLearnedForgottenKnowledge: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISyncChangeBatchWithPrerequisite_Impl: ISyncChangeBatchBase_Impl { - fn SetPrerequisiteKnowledge(&self, pprerequisiteknowledge: Option<&ISyncKnowledge>) -> windows_core::Result<()>; - fn GetLearnedKnowledgeWithPrerequisite(&self, pdestinationknowledge: Option<&ISyncKnowledge>) -> windows_core::Result; + fn SetPrerequisiteKnowledge(&self, pprerequisiteknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result<()>; + fn GetLearnedKnowledgeWithPrerequisite(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result; fn GetLearnedForgottenKnowledge(&self) -> windows_core::Result; } impl ISyncChangeBatchWithPrerequisite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetPrerequisiteKnowledge(this: *mut core::ffi::c_void, pprerequisiteknowledge: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncChangeBatchWithPrerequisite_Impl::SetPrerequisiteKnowledge(this, windows_core::from_raw_borrowed(&pprerequisiteknowledge)).into() + ISyncChangeBatchWithPrerequisite_Impl::SetPrerequisiteKnowledge(this, core::mem::transmute_copy(&pprerequisiteknowledge)).into() } unsafe extern "system" fn GetLearnedKnowledgeWithPrerequisite(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pplearnedwithprerequisiteknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeBatchWithPrerequisite_Impl::GetLearnedKnowledgeWithPrerequisite(this, windows_core::from_raw_borrowed(&pdestinationknowledge)) { + match ISyncChangeBatchWithPrerequisite_Impl::GetLearnedKnowledgeWithPrerequisite(this, core::mem::transmute_copy(&pdestinationknowledge)) { Ok(ok__) => { pplearnedwithprerequisiteknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3713,11 +3713,11 @@ pub trait ISyncChangeWithFilterKeyMap_Impl: windows_core::IUnknownImpl { fn GetFilterChange(&self, dwfilterkey: u32, pfilterchange: *mut SYNC_FILTER_CHANGE) -> windows_core::Result<()>; fn GetAllChangeUnitsPresentFlag(&self, pfallchangeunitspresent: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetFilterForgottenKnowledge(&self, dwfilterkey: u32) -> windows_core::Result; - fn GetFilteredReplicaLearnedKnowledge(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>) -> windows_core::Result; - fn GetLearnedFilterForgottenKnowledge(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>, dwfilterkey: u32) -> windows_core::Result; - fn GetFilteredReplicaLearnedForgottenKnowledge(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>) -> windows_core::Result; - fn GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>) -> windows_core::Result; - fn GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(&self, pdestinationknowledge: Option<&ISyncKnowledge>, pnewmoveins: Option<&IEnumItemIds>, dwfilterkey: u32) -> windows_core::Result; + fn GetFilteredReplicaLearnedKnowledge(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>) -> windows_core::Result; + fn GetLearnedFilterForgottenKnowledge(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>, dwfilterkey: u32) -> windows_core::Result; + fn GetFilteredReplicaLearnedForgottenKnowledge(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>) -> windows_core::Result; + fn GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>) -> windows_core::Result; + fn GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>, pnewmoveins: windows_core::Ref<'_, IEnumItemIds>, dwfilterkey: u32) -> windows_core::Result; } impl ISyncChangeWithFilterKeyMap_Vtbl { pub const fn new() -> Self { @@ -3745,7 +3745,7 @@ impl ISyncChangeWithFilterKeyMap_Vtbl { } unsafe extern "system" fn GetFilteredReplicaLearnedKnowledge(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, pplearnedknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeWithFilterKeyMap_Impl::GetFilteredReplicaLearnedKnowledge(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins)) { + match ISyncChangeWithFilterKeyMap_Impl::GetFilteredReplicaLearnedKnowledge(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins)) { Ok(ok__) => { pplearnedknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3755,7 +3755,7 @@ impl ISyncChangeWithFilterKeyMap_Vtbl { } unsafe extern "system" fn GetLearnedFilterForgottenKnowledge(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, dwfilterkey: u32, pplearnedfilterforgottenknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeWithFilterKeyMap_Impl::GetLearnedFilterForgottenKnowledge(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins), core::mem::transmute_copy(&dwfilterkey)) { + match ISyncChangeWithFilterKeyMap_Impl::GetLearnedFilterForgottenKnowledge(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins), core::mem::transmute_copy(&dwfilterkey)) { Ok(ok__) => { pplearnedfilterforgottenknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3765,7 +3765,7 @@ impl ISyncChangeWithFilterKeyMap_Vtbl { } unsafe extern "system" fn GetFilteredReplicaLearnedForgottenKnowledge(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, pplearnedforgottenknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeWithFilterKeyMap_Impl::GetFilteredReplicaLearnedForgottenKnowledge(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins)) { + match ISyncChangeWithFilterKeyMap_Impl::GetFilteredReplicaLearnedForgottenKnowledge(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins)) { Ok(ok__) => { pplearnedforgottenknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3775,7 +3775,7 @@ impl ISyncChangeWithFilterKeyMap_Vtbl { } unsafe extern "system" fn GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, pplearnedforgottenknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeWithFilterKeyMap_Impl::GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins)) { + match ISyncChangeWithFilterKeyMap_Impl::GetFilteredReplicaLearnedForgottenKnowledgeAfterRecoveryComplete(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins)) { Ok(ok__) => { pplearnedforgottenknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3785,7 +3785,7 @@ impl ISyncChangeWithFilterKeyMap_Vtbl { } unsafe extern "system" fn GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pnewmoveins: *mut core::ffi::c_void, dwfilterkey: u32, pplearnedfilterforgottenknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeWithFilterKeyMap_Impl::GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(this, windows_core::from_raw_borrowed(&pdestinationknowledge), windows_core::from_raw_borrowed(&pnewmoveins), core::mem::transmute_copy(&dwfilterkey)) { + match ISyncChangeWithFilterKeyMap_Impl::GetLearnedFilterForgottenKnowledgeAfterRecoveryComplete(this, core::mem::transmute_copy(&pdestinationknowledge), core::mem::transmute_copy(&pnewmoveins), core::mem::transmute_copy(&dwfilterkey)) { Ok(ok__) => { pplearnedfilterforgottenknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3834,7 +3834,7 @@ pub struct ISyncChangeWithPrerequisite_Vtbl { } pub trait ISyncChangeWithPrerequisite_Impl: windows_core::IUnknownImpl { fn GetPrerequisiteKnowledge(&self) -> windows_core::Result; - fn GetLearnedKnowledgeWithPrerequisite(&self, pdestinationknowledge: Option<&ISyncKnowledge>) -> windows_core::Result; + fn GetLearnedKnowledgeWithPrerequisite(&self, pdestinationknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result; } impl ISyncChangeWithPrerequisite_Vtbl { pub const fn new() -> Self { @@ -3850,7 +3850,7 @@ impl ISyncChangeWithPrerequisite_Vtbl { } unsafe extern "system" fn GetLearnedKnowledgeWithPrerequisite(this: *mut core::ffi::c_void, pdestinationknowledge: *mut core::ffi::c_void, pplearnedknowledgewithprerequisite: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncChangeWithPrerequisite_Impl::GetLearnedKnowledgeWithPrerequisite(this, windows_core::from_raw_borrowed(&pdestinationknowledge)) { + match ISyncChangeWithPrerequisite_Impl::GetLearnedKnowledgeWithPrerequisite(this, core::mem::transmute_copy(&pdestinationknowledge)) { Ok(ok__) => { pplearnedknowledgewithprerequisite.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3885,13 +3885,13 @@ pub struct ISyncConstraintCallback_Vtbl { pub OnConstraintConflict: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISyncConstraintCallback_Impl: windows_core::IUnknownImpl { - fn OnConstraintConflict(&self, pconflict: Option<&IConstraintConflict>) -> windows_core::Result<()>; + fn OnConstraintConflict(&self, pconflict: windows_core::Ref<'_, IConstraintConflict>) -> windows_core::Result<()>; } impl ISyncConstraintCallback_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnConstraintConflict(this: *mut core::ffi::c_void, pconflict: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncConstraintCallback_Impl::OnConstraintConflict(this, windows_core::from_raw_borrowed(&pconflict)).into() + ISyncConstraintCallback_Impl::OnConstraintConflict(this, core::mem::transmute_copy(&pconflict)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnConstraintConflict: OnConstraintConflict:: } } @@ -3945,16 +3945,16 @@ pub struct ISyncDataConverter_Vtbl { pub ConvertDataToProviderFormat: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISyncDataConverter_Impl: windows_core::IUnknownImpl { - fn ConvertDataRetrieverFromProviderFormat(&self, punkdataretrieverin: Option<&windows_core::IUnknown>, penumsyncchanges: Option<&IEnumSyncChanges>) -> windows_core::Result; - fn ConvertDataRetrieverToProviderFormat(&self, punkdataretrieverin: Option<&windows_core::IUnknown>, penumsyncchanges: Option<&IEnumSyncChanges>) -> windows_core::Result; - fn ConvertDataFromProviderFormat(&self, pdatacontext: Option<&ILoadChangeContext>, punkdatain: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn ConvertDataToProviderFormat(&self, pdatacontext: Option<&ILoadChangeContext>, punkdataout: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn ConvertDataRetrieverFromProviderFormat(&self, punkdataretrieverin: windows_core::Ref<'_, windows_core::IUnknown>, penumsyncchanges: windows_core::Ref<'_, IEnumSyncChanges>) -> windows_core::Result; + fn ConvertDataRetrieverToProviderFormat(&self, punkdataretrieverin: windows_core::Ref<'_, windows_core::IUnknown>, penumsyncchanges: windows_core::Ref<'_, IEnumSyncChanges>) -> windows_core::Result; + fn ConvertDataFromProviderFormat(&self, pdatacontext: windows_core::Ref<'_, ILoadChangeContext>, punkdatain: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn ConvertDataToProviderFormat(&self, pdatacontext: windows_core::Ref<'_, ILoadChangeContext>, punkdataout: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } impl ISyncDataConverter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConvertDataRetrieverFromProviderFormat(this: *mut core::ffi::c_void, punkdataretrieverin: *mut core::ffi::c_void, penumsyncchanges: *mut core::ffi::c_void, ppunkdataout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncDataConverter_Impl::ConvertDataRetrieverFromProviderFormat(this, windows_core::from_raw_borrowed(&punkdataretrieverin), windows_core::from_raw_borrowed(&penumsyncchanges)) { + match ISyncDataConverter_Impl::ConvertDataRetrieverFromProviderFormat(this, core::mem::transmute_copy(&punkdataretrieverin), core::mem::transmute_copy(&penumsyncchanges)) { Ok(ok__) => { ppunkdataout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3964,7 +3964,7 @@ impl ISyncDataConverter_Vtbl { } unsafe extern "system" fn ConvertDataRetrieverToProviderFormat(this: *mut core::ffi::c_void, punkdataretrieverin: *mut core::ffi::c_void, penumsyncchanges: *mut core::ffi::c_void, ppunkdataout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncDataConverter_Impl::ConvertDataRetrieverToProviderFormat(this, windows_core::from_raw_borrowed(&punkdataretrieverin), windows_core::from_raw_borrowed(&penumsyncchanges)) { + match ISyncDataConverter_Impl::ConvertDataRetrieverToProviderFormat(this, core::mem::transmute_copy(&punkdataretrieverin), core::mem::transmute_copy(&penumsyncchanges)) { Ok(ok__) => { ppunkdataout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3974,7 +3974,7 @@ impl ISyncDataConverter_Vtbl { } unsafe extern "system" fn ConvertDataFromProviderFormat(this: *mut core::ffi::c_void, pdatacontext: *mut core::ffi::c_void, punkdatain: *mut core::ffi::c_void, ppunkdataout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncDataConverter_Impl::ConvertDataFromProviderFormat(this, windows_core::from_raw_borrowed(&pdatacontext), windows_core::from_raw_borrowed(&punkdatain)) { + match ISyncDataConverter_Impl::ConvertDataFromProviderFormat(this, core::mem::transmute_copy(&pdatacontext), core::mem::transmute_copy(&punkdatain)) { Ok(ok__) => { ppunkdataout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3984,7 +3984,7 @@ impl ISyncDataConverter_Vtbl { } unsafe extern "system" fn ConvertDataToProviderFormat(this: *mut core::ffi::c_void, pdatacontext: *mut core::ffi::c_void, punkdataout: *mut core::ffi::c_void, ppunkdataout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncDataConverter_Impl::ConvertDataToProviderFormat(this, windows_core::from_raw_borrowed(&pdatacontext), windows_core::from_raw_borrowed(&punkdataout)) { + match ISyncDataConverter_Impl::ConvertDataToProviderFormat(this, core::mem::transmute_copy(&pdatacontext), core::mem::transmute_copy(&punkdataout)) { Ok(ok__) => { ppunkdataout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4025,14 +4025,14 @@ pub struct ISyncFilter_Vtbl { pub Serialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u8, *mut u32) -> windows_core::HRESULT, } pub trait ISyncFilter_Impl: windows_core::IUnknownImpl { - fn IsIdentical(&self, psyncfilter: Option<&ISyncFilter>) -> windows_core::Result<()>; + fn IsIdentical(&self, psyncfilter: windows_core::Ref<'_, ISyncFilter>) -> windows_core::Result<()>; fn Serialize(&self, pbsyncfilter: *mut u8, pcbsyncfilter: *mut u32) -> windows_core::Result<()>; } impl ISyncFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsIdentical(this: *mut core::ffi::c_void, psyncfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncFilter_Impl::IsIdentical(this, windows_core::from_raw_borrowed(&psyncfilter)).into() + ISyncFilter_Impl::IsIdentical(this, core::mem::transmute_copy(&psyncfilter)).into() } unsafe extern "system" fn Serialize(this: *mut core::ffi::c_void, pbsyncfilter: *mut u8, pcbsyncfilter: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4440,15 +4440,15 @@ pub trait ISyncKnowledge_Impl: windows_core::IUnknownImpl { fn GetScopeVector(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetReplicaKeyMap(&self) -> windows_core::Result; fn Clone(&self) -> windows_core::Result; - fn ConvertVersion(&self, pknowledgein: Option<&ISyncKnowledge>, pbcurrentownerid: *const u8, pversionin: *const SYNC_VERSION, pbnewownerid: *mut u8, pcbidsize: *mut u32, pversionout: *mut SYNC_VERSION) -> windows_core::Result<()>; - fn MapRemoteToLocal(&self, premoteknowledge: Option<&ISyncKnowledge>) -> windows_core::Result; - fn Union(&self, pknowledge: Option<&ISyncKnowledge>) -> windows_core::Result<()>; + fn ConvertVersion(&self, pknowledgein: windows_core::Ref<'_, ISyncKnowledge>, pbcurrentownerid: *const u8, pversionin: *const SYNC_VERSION, pbnewownerid: *mut u8, pcbidsize: *mut u32, pversionout: *mut SYNC_VERSION) -> windows_core::Result<()>; + fn MapRemoteToLocal(&self, premoteknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result; + fn Union(&self, pknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result<()>; fn ProjectOntoItem(&self, pbitemid: *const u8) -> windows_core::Result; fn ProjectOntoChangeUnit(&self, pbitemid: *const u8, pbchangeunitid: *const u8) -> windows_core::Result; fn ProjectOntoRange(&self, psrngsyncrange: *const SYNC_RANGE) -> windows_core::Result; fn ExcludeItem(&self, pbitemid: *const u8) -> windows_core::Result<()>; fn ExcludeChangeUnit(&self, pbitemid: *const u8, pbchangeunitid: *const u8) -> windows_core::Result<()>; - fn ContainsKnowledge(&self, pknowledge: Option<&ISyncKnowledge>) -> windows_core::Result<()>; + fn ContainsKnowledge(&self, pknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result<()>; fn FindMinTickCountForReplica(&self, pbreplicaid: *const u8, pullreplicatickcount: *mut u64) -> windows_core::Result<()>; fn GetRangeExceptions(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetSingleItemExceptions(&self, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; @@ -4505,11 +4505,11 @@ impl ISyncKnowledge_Vtbl { } unsafe extern "system" fn ConvertVersion(this: *mut core::ffi::c_void, pknowledgein: *mut core::ffi::c_void, pbcurrentownerid: *const u8, pversionin: *const SYNC_VERSION, pbnewownerid: *mut u8, pcbidsize: *mut u32, pversionout: *mut SYNC_VERSION) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncKnowledge_Impl::ConvertVersion(this, windows_core::from_raw_borrowed(&pknowledgein), core::mem::transmute_copy(&pbcurrentownerid), core::mem::transmute_copy(&pversionin), core::mem::transmute_copy(&pbnewownerid), core::mem::transmute_copy(&pcbidsize), core::mem::transmute_copy(&pversionout)).into() + ISyncKnowledge_Impl::ConvertVersion(this, core::mem::transmute_copy(&pknowledgein), core::mem::transmute_copy(&pbcurrentownerid), core::mem::transmute_copy(&pversionin), core::mem::transmute_copy(&pbnewownerid), core::mem::transmute_copy(&pcbidsize), core::mem::transmute_copy(&pversionout)).into() } unsafe extern "system" fn MapRemoteToLocal(this: *mut core::ffi::c_void, premoteknowledge: *mut core::ffi::c_void, ppmappedknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncKnowledge_Impl::MapRemoteToLocal(this, windows_core::from_raw_borrowed(&premoteknowledge)) { + match ISyncKnowledge_Impl::MapRemoteToLocal(this, core::mem::transmute_copy(&premoteknowledge)) { Ok(ok__) => { ppmappedknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4519,7 +4519,7 @@ impl ISyncKnowledge_Vtbl { } unsafe extern "system" fn Union(this: *mut core::ffi::c_void, pknowledge: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncKnowledge_Impl::Union(this, windows_core::from_raw_borrowed(&pknowledge)).into() + ISyncKnowledge_Impl::Union(this, core::mem::transmute_copy(&pknowledge)).into() } unsafe extern "system" fn ProjectOntoItem(this: *mut core::ffi::c_void, pbitemid: *const u8, ppknowledgeout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4561,7 +4561,7 @@ impl ISyncKnowledge_Vtbl { } unsafe extern "system" fn ContainsKnowledge(this: *mut core::ffi::c_void, pknowledge: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncKnowledge_Impl::ContainsKnowledge(this, windows_core::from_raw_borrowed(&pknowledge)).into() + ISyncKnowledge_Impl::ContainsKnowledge(this, core::mem::transmute_copy(&pknowledge)).into() } unsafe extern "system" fn FindMinTickCountForReplica(this: *mut core::ffi::c_void, pbreplicaid: *const u8, pullreplicatickcount: *mut u64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4724,17 +4724,17 @@ pub trait ISyncKnowledge2_Impl: ISyncKnowledge_Impl { fn GetIdParameters(&self, pidparameters: *mut ID_PARAMETERS) -> windows_core::Result<()>; fn ProjectOntoColumnSet(&self, ppcolumns: *const *const u8, count: u32) -> windows_core::Result; fn SerializeWithOptions(&self, targetformatversion: SYNC_SERIALIZATION_VERSION, dwflags: u32, pbbuffer: *mut u8, pdwserializedsize: *mut u32) -> windows_core::Result<()>; - fn GetLowestUncontainedId(&self, pisyncknowledge: Option<&ISyncKnowledge2>, pbitemid: *mut u8, pcbitemidsize: *mut u32) -> windows_core::Result<()>; + fn GetLowestUncontainedId(&self, pisyncknowledge: windows_core::Ref<'_, ISyncKnowledge2>, pbitemid: *mut u8, pcbitemidsize: *mut u32) -> windows_core::Result<()>; fn GetInspector(&self, riid: *const windows_core::GUID, ppiinspector: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetMinimumSupportedVersion(&self, pversion: *mut SYNC_SERIALIZATION_VERSION) -> windows_core::Result<()>; fn GetStatistics(&self, which: SYNC_STATISTICS, pvalue: *mut u32) -> windows_core::Result<()>; - fn ContainsKnowledgeForItem(&self, pknowledge: Option<&ISyncKnowledge>, pbitemid: *const u8) -> windows_core::Result<()>; - fn ContainsKnowledgeForChangeUnit(&self, pknowledge: Option<&ISyncKnowledge>, pbitemid: *const u8, pbchangeunitid: *const u8) -> windows_core::Result<()>; - fn ProjectOntoKnowledgeWithPrerequisite(&self, pprerequisiteknowledge: Option<&ISyncKnowledge>, ptemplateknowledge: Option<&ISyncKnowledge>) -> windows_core::Result; - fn Complement(&self, psyncknowledge: Option<&ISyncKnowledge>) -> windows_core::Result; - fn IntersectsWithKnowledge(&self, psyncknowledge: Option<&ISyncKnowledge>) -> windows_core::Result<()>; + fn ContainsKnowledgeForItem(&self, pknowledge: windows_core::Ref<'_, ISyncKnowledge>, pbitemid: *const u8) -> windows_core::Result<()>; + fn ContainsKnowledgeForChangeUnit(&self, pknowledge: windows_core::Ref<'_, ISyncKnowledge>, pbitemid: *const u8, pbchangeunitid: *const u8) -> windows_core::Result<()>; + fn ProjectOntoKnowledgeWithPrerequisite(&self, pprerequisiteknowledge: windows_core::Ref<'_, ISyncKnowledge>, ptemplateknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result; + fn Complement(&self, psyncknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result; + fn IntersectsWithKnowledge(&self, psyncknowledge: windows_core::Ref<'_, ISyncKnowledge>) -> windows_core::Result<()>; fn GetKnowledgeCookie(&self) -> windows_core::Result; - fn CompareToKnowledgeCookie(&self, pknowledgecookie: Option<&windows_core::IUnknown>, presult: *mut KNOWLEDGE_COOKIE_COMPARISON_RESULT) -> windows_core::Result<()>; + fn CompareToKnowledgeCookie(&self, pknowledgecookie: windows_core::Ref<'_, windows_core::IUnknown>, presult: *mut KNOWLEDGE_COOKIE_COMPARISON_RESULT) -> windows_core::Result<()>; } impl ISyncKnowledge2_Vtbl { pub const fn new() -> Self { @@ -4758,7 +4758,7 @@ impl ISyncKnowledge2_Vtbl { } unsafe extern "system" fn GetLowestUncontainedId(this: *mut core::ffi::c_void, pisyncknowledge: *mut core::ffi::c_void, pbitemid: *mut u8, pcbitemidsize: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncKnowledge2_Impl::GetLowestUncontainedId(this, windows_core::from_raw_borrowed(&pisyncknowledge), core::mem::transmute_copy(&pbitemid), core::mem::transmute_copy(&pcbitemidsize)).into() + ISyncKnowledge2_Impl::GetLowestUncontainedId(this, core::mem::transmute_copy(&pisyncknowledge), core::mem::transmute_copy(&pbitemid), core::mem::transmute_copy(&pcbitemidsize)).into() } unsafe extern "system" fn GetInspector(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppiinspector: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4774,15 +4774,15 @@ impl ISyncKnowledge2_Vtbl { } unsafe extern "system" fn ContainsKnowledgeForItem(this: *mut core::ffi::c_void, pknowledge: *mut core::ffi::c_void, pbitemid: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncKnowledge2_Impl::ContainsKnowledgeForItem(this, windows_core::from_raw_borrowed(&pknowledge), core::mem::transmute_copy(&pbitemid)).into() + ISyncKnowledge2_Impl::ContainsKnowledgeForItem(this, core::mem::transmute_copy(&pknowledge), core::mem::transmute_copy(&pbitemid)).into() } unsafe extern "system" fn ContainsKnowledgeForChangeUnit(this: *mut core::ffi::c_void, pknowledge: *mut core::ffi::c_void, pbitemid: *const u8, pbchangeunitid: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncKnowledge2_Impl::ContainsKnowledgeForChangeUnit(this, windows_core::from_raw_borrowed(&pknowledge), core::mem::transmute_copy(&pbitemid), core::mem::transmute_copy(&pbchangeunitid)).into() + ISyncKnowledge2_Impl::ContainsKnowledgeForChangeUnit(this, core::mem::transmute_copy(&pknowledge), core::mem::transmute_copy(&pbitemid), core::mem::transmute_copy(&pbchangeunitid)).into() } unsafe extern "system" fn ProjectOntoKnowledgeWithPrerequisite(this: *mut core::ffi::c_void, pprerequisiteknowledge: *mut core::ffi::c_void, ptemplateknowledge: *mut core::ffi::c_void, ppprojectedknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncKnowledge2_Impl::ProjectOntoKnowledgeWithPrerequisite(this, windows_core::from_raw_borrowed(&pprerequisiteknowledge), windows_core::from_raw_borrowed(&ptemplateknowledge)) { + match ISyncKnowledge2_Impl::ProjectOntoKnowledgeWithPrerequisite(this, core::mem::transmute_copy(&pprerequisiteknowledge), core::mem::transmute_copy(&ptemplateknowledge)) { Ok(ok__) => { ppprojectedknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4792,7 +4792,7 @@ impl ISyncKnowledge2_Vtbl { } unsafe extern "system" fn Complement(this: *mut core::ffi::c_void, psyncknowledge: *mut core::ffi::c_void, ppcomplementedknowledge: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncKnowledge2_Impl::Complement(this, windows_core::from_raw_borrowed(&psyncknowledge)) { + match ISyncKnowledge2_Impl::Complement(this, core::mem::transmute_copy(&psyncknowledge)) { Ok(ok__) => { ppcomplementedknowledge.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4802,7 +4802,7 @@ impl ISyncKnowledge2_Vtbl { } unsafe extern "system" fn IntersectsWithKnowledge(this: *mut core::ffi::c_void, psyncknowledge: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncKnowledge2_Impl::IntersectsWithKnowledge(this, windows_core::from_raw_borrowed(&psyncknowledge)).into() + ISyncKnowledge2_Impl::IntersectsWithKnowledge(this, core::mem::transmute_copy(&psyncknowledge)).into() } unsafe extern "system" fn GetKnowledgeCookie(this: *mut core::ffi::c_void, ppknowledgecookie: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4816,7 +4816,7 @@ impl ISyncKnowledge2_Vtbl { } unsafe extern "system" fn CompareToKnowledgeCookie(this: *mut core::ffi::c_void, pknowledgecookie: *mut core::ffi::c_void, presult: *mut KNOWLEDGE_COOKIE_COMPARISON_RESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncKnowledge2_Impl::CompareToKnowledgeCookie(this, windows_core::from_raw_borrowed(&pknowledgecookie), core::mem::transmute_copy(&presult)).into() + ISyncKnowledge2_Impl::CompareToKnowledgeCookie(this, core::mem::transmute_copy(&pknowledgecookie), core::mem::transmute_copy(&presult)).into() } Self { base__: ISyncKnowledge_Vtbl::new::(), @@ -4951,17 +4951,17 @@ pub struct ISyncProviderConfigUI_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait ISyncProviderConfigUI_Impl: windows_core::IUnknownImpl { - fn Init(&self, pguidinstanceid: *const windows_core::GUID, pguidcontenttype: *const windows_core::GUID, pconfigurationproperties: Option<&super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn Init(&self, pguidinstanceid: *const windows_core::GUID, pguidcontenttype: *const windows_core::GUID, pconfigurationproperties: windows_core::Ref<'_, super::super::UI::Shell::PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; fn GetRegisteredProperties(&self) -> windows_core::Result; - fn CreateAndRegisterNewSyncProvider(&self, hwndparent: super::super::Foundation::HWND, punkcontext: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn ModifySyncProvider(&self, hwndparent: super::super::Foundation::HWND, punkcontext: Option<&windows_core::IUnknown>, pproviderinfo: Option<&ISyncProviderInfo>) -> windows_core::Result<()>; + fn CreateAndRegisterNewSyncProvider(&self, hwndparent: super::super::Foundation::HWND, punkcontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn ModifySyncProvider(&self, hwndparent: super::super::Foundation::HWND, punkcontext: windows_core::Ref<'_, windows_core::IUnknown>, pproviderinfo: windows_core::Ref<'_, ISyncProviderInfo>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] impl ISyncProviderConfigUI_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, pguidinstanceid: *const windows_core::GUID, pguidcontenttype: *const windows_core::GUID, pconfigurationproperties: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncProviderConfigUI_Impl::Init(this, core::mem::transmute_copy(&pguidinstanceid), core::mem::transmute_copy(&pguidcontenttype), windows_core::from_raw_borrowed(&pconfigurationproperties)).into() + ISyncProviderConfigUI_Impl::Init(this, core::mem::transmute_copy(&pguidinstanceid), core::mem::transmute_copy(&pguidcontenttype), core::mem::transmute_copy(&pconfigurationproperties)).into() } unsafe extern "system" fn GetRegisteredProperties(this: *mut core::ffi::c_void, ppconfiguiproperties: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4975,7 +4975,7 @@ impl ISyncProviderConfigUI_Vtbl { } unsafe extern "system" fn CreateAndRegisterNewSyncProvider(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, punkcontext: *mut core::ffi::c_void, ppproviderinfo: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncProviderConfigUI_Impl::CreateAndRegisterNewSyncProvider(this, core::mem::transmute_copy(&hwndparent), windows_core::from_raw_borrowed(&punkcontext)) { + match ISyncProviderConfigUI_Impl::CreateAndRegisterNewSyncProvider(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&punkcontext)) { Ok(ok__) => { ppproviderinfo.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4985,7 +4985,7 @@ impl ISyncProviderConfigUI_Vtbl { } unsafe extern "system" fn ModifySyncProvider(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, punkcontext: *mut core::ffi::c_void, pproviderinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncProviderConfigUI_Impl::ModifySyncProvider(this, core::mem::transmute_copy(&hwndparent), windows_core::from_raw_borrowed(&punkcontext), windows_core::from_raw_borrowed(&pproviderinfo)).into() + ISyncProviderConfigUI_Impl::ModifySyncProvider(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&punkcontext), core::mem::transmute_copy(&pproviderinfo)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5636,7 +5636,7 @@ pub struct ISynchronousDataRetriever_Vtbl { } pub trait ISynchronousDataRetriever_Impl: windows_core::IUnknownImpl { fn GetIdParameters(&self, pidparameters: *mut ID_PARAMETERS) -> windows_core::Result<()>; - fn LoadChangeData(&self, ploadchangecontext: Option<&ILoadChangeContext>) -> windows_core::Result; + fn LoadChangeData(&self, ploadchangecontext: windows_core::Ref<'_, ILoadChangeContext>) -> windows_core::Result; } impl ISynchronousDataRetriever_Vtbl { pub const fn new() -> Self { @@ -5646,7 +5646,7 @@ impl ISynchronousDataRetriever_Vtbl { } unsafe extern "system" fn LoadChangeData(this: *mut core::ffi::c_void, ploadchangecontext: *mut core::ffi::c_void, ppunkdata: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISynchronousDataRetriever_Impl::LoadChangeData(this, windows_core::from_raw_borrowed(&ploadchangecontext)) { + match ISynchronousDataRetriever_Impl::LoadChangeData(this, core::mem::transmute_copy(&ploadchangecontext)) { Ok(ok__) => { ppunkdata.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs index 2cf49dc72d..ddb4b624bc 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs @@ -59,8 +59,8 @@ pub struct IEnumWbemClassObject_Vtbl { } pub trait IEnumWbemClassObject_Impl: windows_core::IUnknownImpl { fn Reset(&self) -> windows_core::Result<()>; - fn Next(&self, ltimeout: i32, ucount: u32, apobjects: *mut Option, pureturned: *mut u32) -> windows_core::HRESULT; - fn NextAsync(&self, ucount: u32, psink: Option<&IWbemObjectSink>) -> windows_core::HRESULT; + fn Next(&self, ltimeout: i32, ucount: u32, apobjects: windows_core::OutRef<'_, IWbemClassObject>, pureturned: *mut u32) -> windows_core::HRESULT; + fn NextAsync(&self, ucount: u32, psink: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::HRESULT; fn Clone(&self) -> windows_core::Result; fn Skip(&self, ltimeout: i32, ncount: u32) -> windows_core::HRESULT; } @@ -76,7 +76,7 @@ impl IEnumWbemClassObject_Vtbl { } unsafe extern "system" fn NextAsync(this: *mut core::ffi::c_void, ucount: u32, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IEnumWbemClassObject_Impl::NextAsync(this, core::mem::transmute_copy(&ucount), windows_core::from_raw_borrowed(&psink)) + IEnumWbemClassObject_Impl::NextAsync(this, core::mem::transmute_copy(&ucount), core::mem::transmute_copy(&psink)) } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -882,7 +882,7 @@ pub struct ISWbemLocator_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISWbemLocator_Impl: super::Com::IDispatch_Impl { - fn ConnectServer(&self, strserver: &windows_core::BSTR, strnamespace: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, strauthority: &windows_core::BSTR, isecurityflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; + fn ConnectServer(&self, strserver: &windows_core::BSTR, strnamespace: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, strauthority: &windows_core::BSTR, isecurityflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; fn Security_(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -890,7 +890,7 @@ impl ISWbemLocator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConnectServer(this: *mut core::ffi::c_void, strserver: *mut core::ffi::c_void, strnamespace: *mut core::ffi::c_void, struser: *mut core::ffi::c_void, strpassword: *mut core::ffi::c_void, strlocale: *mut core::ffi::c_void, strauthority: *mut core::ffi::c_void, isecurityflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemservices: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemLocator_Impl::ConnectServer(this, core::mem::transmute(&strserver), core::mem::transmute(&strnamespace), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute(&strauthority), core::mem::transmute_copy(&isecurityflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemLocator_Impl::ConnectServer(this, core::mem::transmute(&strserver), core::mem::transmute(&strnamespace), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute(&strauthority), core::mem::transmute_copy(&isecurityflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemservices.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1560,25 +1560,25 @@ pub struct ISWbemObject_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISWbemObject_Impl: super::Com::IDispatch_Impl { - fn Put_(&self, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn PutAsync_(&self, objwbemsink: Option<&super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn Delete_(&self, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn DeleteAsync_(&self, objwbemsink: Option<&super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn Instances_(&self, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn InstancesAsync_(&self, objwbemsink: Option<&super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn Subclasses_(&self, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn SubclassesAsync_(&self, objwbemsink: Option<&super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn Associators_(&self, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn AssociatorsAsync_(&self, objwbemsink: Option<&super::Com::IDispatch>, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn References_(&self, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn ReferencesAsync_(&self, objwbemsink: Option<&super::Com::IDispatch>, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn ExecMethod_(&self, strmethodname: &windows_core::BSTR, objwbeminparameters: Option<&super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn ExecMethodAsync_(&self, objwbemsink: Option<&super::Com::IDispatch>, strmethodname: &windows_core::BSTR, objwbeminparameters: Option<&super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn Put_(&self, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn PutAsync_(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn Delete_(&self, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn DeleteAsync_(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn Instances_(&self, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn InstancesAsync_(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn Subclasses_(&self, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn SubclassesAsync_(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn Associators_(&self, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn AssociatorsAsync_(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn References_(&self, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn ReferencesAsync_(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn ExecMethod_(&self, strmethodname: &windows_core::BSTR, objwbeminparameters: windows_core::Ref<'_, super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn ExecMethodAsync_(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strmethodname: &windows_core::BSTR, objwbeminparameters: windows_core::Ref<'_, super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; fn Clone_(&self) -> windows_core::Result; fn GetObjectText_(&self, iflags: i32) -> windows_core::Result; fn SpawnDerivedClass_(&self, iflags: i32) -> windows_core::Result; fn SpawnInstance_(&self, iflags: i32) -> windows_core::Result; - fn CompareTo_(&self, objwbemobject: Option<&super::Com::IDispatch>, iflags: i32) -> windows_core::Result; + fn CompareTo_(&self, objwbemobject: windows_core::Ref<'_, super::Com::IDispatch>, iflags: i32) -> windows_core::Result; fn Qualifiers_(&self) -> windows_core::Result; fn Properties_(&self) -> windows_core::Result; fn Methods_(&self) -> windows_core::Result; @@ -1591,7 +1591,7 @@ impl ISWbemObject_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Put_(this: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectpath: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemObject_Impl::Put_(this, core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemObject_Impl::Put_(this, core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectpath.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1601,19 +1601,19 @@ impl ISWbemObject_Vtbl { } unsafe extern "system" fn PutAsync_(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemObject_Impl::PutAsync_(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemObject_Impl::PutAsync_(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn Delete_(this: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemObject_Impl::Delete_(this, core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)).into() + ISWbemObject_Impl::Delete_(this, core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)).into() } unsafe extern "system" fn DeleteAsync_(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemObject_Impl::DeleteAsync_(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemObject_Impl::DeleteAsync_(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn Instances_(this: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemObject_Impl::Instances_(this, core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemObject_Impl::Instances_(this, core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1623,11 +1623,11 @@ impl ISWbemObject_Vtbl { } unsafe extern "system" fn InstancesAsync_(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemObject_Impl::InstancesAsync_(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemObject_Impl::InstancesAsync_(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn Subclasses_(this: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemObject_Impl::Subclasses_(this, core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemObject_Impl::Subclasses_(this, core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1637,11 +1637,11 @@ impl ISWbemObject_Vtbl { } unsafe extern "system" fn SubclassesAsync_(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemObject_Impl::SubclassesAsync_(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemObject_Impl::SubclassesAsync_(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn Associators_(this: *mut core::ffi::c_void, strassocclass: *mut core::ffi::c_void, strresultclass: *mut core::ffi::c_void, strresultrole: *mut core::ffi::c_void, strrole: *mut core::ffi::c_void, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: *mut core::ffi::c_void, strrequiredqualifier: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemObject_Impl::Associators_(this, core::mem::transmute(&strassocclass), core::mem::transmute(&strresultclass), core::mem::transmute(&strresultrole), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredassocqualifier), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemObject_Impl::Associators_(this, core::mem::transmute(&strassocclass), core::mem::transmute(&strresultclass), core::mem::transmute(&strresultrole), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredassocqualifier), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1653,7 +1653,7 @@ impl ISWbemObject_Vtbl { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); ISWbemObject_Impl::AssociatorsAsync_( this, - windows_core::from_raw_borrowed(&objwbemsink), + core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strassocclass), core::mem::transmute(&strresultclass), core::mem::transmute(&strresultrole), @@ -1663,14 +1663,14 @@ impl ISWbemObject_Vtbl { core::mem::transmute(&strrequiredassocqualifier), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), - windows_core::from_raw_borrowed(&objwbemnamedvalueset), - windows_core::from_raw_borrowed(&objwbemasynccontext), + core::mem::transmute_copy(&objwbemnamedvalueset), + core::mem::transmute_copy(&objwbemasynccontext), ) .into() } unsafe extern "system" fn References_(this: *mut core::ffi::c_void, strresultclass: *mut core::ffi::c_void, strrole: *mut core::ffi::c_void, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemObject_Impl::References_(this, core::mem::transmute(&strresultclass), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemObject_Impl::References_(this, core::mem::transmute(&strresultclass), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1680,11 +1680,11 @@ impl ISWbemObject_Vtbl { } unsafe extern "system" fn ReferencesAsync_(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strresultclass: *mut core::ffi::c_void, strrole: *mut core::ffi::c_void, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemObject_Impl::ReferencesAsync_(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strresultclass), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemObject_Impl::ReferencesAsync_(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strresultclass), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn ExecMethod_(this: *mut core::ffi::c_void, strmethodname: *mut core::ffi::c_void, objwbeminparameters: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemoutparameters: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemObject_Impl::ExecMethod_(this, core::mem::transmute(&strmethodname), windows_core::from_raw_borrowed(&objwbeminparameters), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemObject_Impl::ExecMethod_(this, core::mem::transmute(&strmethodname), core::mem::transmute_copy(&objwbeminparameters), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemoutparameters.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1694,7 +1694,7 @@ impl ISWbemObject_Vtbl { } unsafe extern "system" fn ExecMethodAsync_(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strmethodname: *mut core::ffi::c_void, objwbeminparameters: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemObject_Impl::ExecMethodAsync_(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strmethodname), windows_core::from_raw_borrowed(&objwbeminparameters), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemObject_Impl::ExecMethodAsync_(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strmethodname), core::mem::transmute_copy(&objwbeminparameters), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn Clone_(this: *mut core::ffi::c_void, objwbemobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1738,7 +1738,7 @@ impl ISWbemObject_Vtbl { } unsafe extern "system" fn CompareTo_(this: *mut core::ffi::c_void, objwbemobject: *mut core::ffi::c_void, iflags: i32, bresult: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemObject_Impl::CompareTo_(this, windows_core::from_raw_borrowed(&objwbemobject), core::mem::transmute_copy(&iflags)) { + match ISWbemObject_Impl::CompareTo_(this, core::mem::transmute_copy(&objwbemobject), core::mem::transmute_copy(&iflags)) { Ok(ok__) => { bresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1889,17 +1889,17 @@ pub struct ISWbemObjectEx_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISWbemObjectEx_Impl: ISWbemObject_Impl { - fn Refresh_(&self, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn Refresh_(&self, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; fn SystemProperties_(&self) -> windows_core::Result; - fn GetText_(&self, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn SetFromText_(&self, bstext: &windows_core::BSTR, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn GetText_(&self, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn SetFromText_(&self, bstext: &windows_core::BSTR, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISWbemObjectEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Refresh_(this: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemObjectEx_Impl::Refresh_(this, core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)).into() + ISWbemObjectEx_Impl::Refresh_(this, core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)).into() } unsafe extern "system" fn SystemProperties_(this: *mut core::ffi::c_void, objwbempropertyset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1913,7 +1913,7 @@ impl ISWbemObjectEx_Vtbl { } unsafe extern "system" fn GetText_(this: *mut core::ffi::c_void, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, bstext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemObjectEx_Impl::GetText_(this, core::mem::transmute_copy(&iobjecttextformat), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemObjectEx_Impl::GetText_(this, core::mem::transmute_copy(&iobjecttextformat), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { bstext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1923,7 +1923,7 @@ impl ISWbemObjectEx_Vtbl { } unsafe extern "system" fn SetFromText_(this: *mut core::ffi::c_void, bstext: *mut core::ffi::c_void, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemObjectEx_Impl::SetFromText_(this, core::mem::transmute(&bstext), core::mem::transmute_copy(&iobjecttextformat), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)).into() + ISWbemObjectEx_Impl::SetFromText_(this, core::mem::transmute(&bstext), core::mem::transmute_copy(&iobjecttextformat), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)).into() } Self { base__: ISWbemObject_Vtbl::new::(), @@ -3480,8 +3480,8 @@ pub trait ISWbemRefresher_Impl: super::Com::IDispatch_Impl { fn _NewEnum(&self) -> windows_core::Result; fn Item(&self, iindex: i32) -> windows_core::Result; fn Count(&self) -> windows_core::Result; - fn Add(&self, objwbemservices: Option<&ISWbemServicesEx>, bsinstancepath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn AddEnum(&self, objwbemservices: Option<&ISWbemServicesEx>, bsclassname: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; + fn Add(&self, objwbemservices: windows_core::Ref<'_, ISWbemServicesEx>, bsinstancepath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn AddEnum(&self, objwbemservices: windows_core::Ref<'_, ISWbemServicesEx>, bsclassname: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; fn Remove(&self, iindex: i32, iflags: i32) -> windows_core::Result<()>; fn Refresh(&self, iflags: i32) -> windows_core::Result<()>; fn AutoReconnect(&self) -> windows_core::Result; @@ -3523,7 +3523,7 @@ impl ISWbemRefresher_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, objwbemservices: *mut core::ffi::c_void, bsinstancepath: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemrefreshableitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemRefresher_Impl::Add(this, windows_core::from_raw_borrowed(&objwbemservices), core::mem::transmute(&bsinstancepath), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemRefresher_Impl::Add(this, core::mem::transmute_copy(&objwbemservices), core::mem::transmute(&bsinstancepath), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemrefreshableitem.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3533,7 +3533,7 @@ impl ISWbemRefresher_Vtbl { } unsafe extern "system" fn AddEnum(this: *mut core::ffi::c_void, objwbemservices: *mut core::ffi::c_void, bsclassname: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemrefreshableitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemRefresher_Impl::AddEnum(this, windows_core::from_raw_borrowed(&objwbemservices), core::mem::transmute(&bsclassname), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemRefresher_Impl::AddEnum(this, core::mem::transmute_copy(&objwbemservices), core::mem::transmute(&bsclassname), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemrefreshableitem.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3873,24 +3873,24 @@ pub struct ISWbemServices_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISWbemServices_Impl: super::Com::IDispatch_Impl { - fn Get(&self, strobjectpath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn GetAsync(&self, objwbemsink: Option<&super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn Delete(&self, strobjectpath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn DeleteAsync(&self, objwbemsink: Option<&super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn InstancesOf(&self, strclass: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn InstancesOfAsync(&self, objwbemsink: Option<&super::Com::IDispatch>, strclass: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn SubclassesOf(&self, strsuperclass: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn SubclassesOfAsync(&self, objwbemsink: Option<&super::Com::IDispatch>, strsuperclass: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn ExecQuery(&self, strquery: &windows_core::BSTR, strquerylanguage: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn ExecQueryAsync(&self, objwbemsink: Option<&super::Com::IDispatch>, strquery: &windows_core::BSTR, strquerylanguage: &windows_core::BSTR, lflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn AssociatorsOf(&self, strobjectpath: &windows_core::BSTR, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn AssociatorsOfAsync(&self, objwbemsink: Option<&super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn ReferencesTo(&self, strobjectpath: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn ReferencesToAsync(&self, objwbemsink: Option<&super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn ExecNotificationQuery(&self, strquery: &windows_core::BSTR, strquerylanguage: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn ExecNotificationQueryAsync(&self, objwbemsink: Option<&super::Com::IDispatch>, strquery: &windows_core::BSTR, strquerylanguage: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; - fn ExecMethod(&self, strobjectpath: &windows_core::BSTR, strmethodname: &windows_core::BSTR, objwbeminparameters: Option<&super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn ExecMethodAsync(&self, objwbemsink: Option<&super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, strmethodname: &windows_core::BSTR, objwbeminparameters: Option<&super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn Get(&self, strobjectpath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn GetAsync(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn Delete(&self, strobjectpath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn DeleteAsync(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn InstancesOf(&self, strclass: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn InstancesOfAsync(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strclass: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn SubclassesOf(&self, strsuperclass: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn SubclassesOfAsync(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strsuperclass: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn ExecQuery(&self, strquery: &windows_core::BSTR, strquerylanguage: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn ExecQueryAsync(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strquery: &windows_core::BSTR, strquerylanguage: &windows_core::BSTR, lflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn AssociatorsOf(&self, strobjectpath: &windows_core::BSTR, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn AssociatorsOfAsync(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, strassocclass: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strresultrole: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: &windows_core::BSTR, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn ReferencesTo(&self, strobjectpath: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn ReferencesToAsync(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, strresultclass: &windows_core::BSTR, strrole: &windows_core::BSTR, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn ExecNotificationQuery(&self, strquery: &windows_core::BSTR, strquerylanguage: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn ExecNotificationQueryAsync(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strquery: &windows_core::BSTR, strquerylanguage: &windows_core::BSTR, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; + fn ExecMethod(&self, strobjectpath: &windows_core::BSTR, strmethodname: &windows_core::BSTR, objwbeminparameters: windows_core::Ref<'_, super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn ExecMethodAsync(&self, objwbemsink: windows_core::Ref<'_, super::Com::IDispatch>, strobjectpath: &windows_core::BSTR, strmethodname: &windows_core::BSTR, objwbeminparameters: windows_core::Ref<'_, super::Com::IDispatch>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; fn Security_(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -3898,7 +3898,7 @@ impl ISWbemServices_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Get(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemServices_Impl::Get(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemServices_Impl::Get(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3908,19 +3908,19 @@ impl ISWbemServices_Vtbl { } unsafe extern "system" fn GetAsync(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServices_Impl::GetAsync(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemServices_Impl::GetAsync(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn Delete(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServices_Impl::Delete(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)).into() + ISWbemServices_Impl::Delete(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)).into() } unsafe extern "system" fn DeleteAsync(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServices_Impl::DeleteAsync(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemServices_Impl::DeleteAsync(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn InstancesOf(this: *mut core::ffi::c_void, strclass: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemServices_Impl::InstancesOf(this, core::mem::transmute(&strclass), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemServices_Impl::InstancesOf(this, core::mem::transmute(&strclass), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3930,11 +3930,11 @@ impl ISWbemServices_Vtbl { } unsafe extern "system" fn InstancesOfAsync(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strclass: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServices_Impl::InstancesOfAsync(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strclass), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemServices_Impl::InstancesOfAsync(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strclass), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn SubclassesOf(this: *mut core::ffi::c_void, strsuperclass: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemServices_Impl::SubclassesOf(this, core::mem::transmute(&strsuperclass), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemServices_Impl::SubclassesOf(this, core::mem::transmute(&strsuperclass), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3944,11 +3944,11 @@ impl ISWbemServices_Vtbl { } unsafe extern "system" fn SubclassesOfAsync(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strsuperclass: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServices_Impl::SubclassesOfAsync(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strsuperclass), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemServices_Impl::SubclassesOfAsync(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strsuperclass), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn ExecQuery(this: *mut core::ffi::c_void, strquery: *mut core::ffi::c_void, strquerylanguage: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemServices_Impl::ExecQuery(this, core::mem::transmute(&strquery), core::mem::transmute(&strquerylanguage), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemServices_Impl::ExecQuery(this, core::mem::transmute(&strquery), core::mem::transmute(&strquerylanguage), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3958,11 +3958,11 @@ impl ISWbemServices_Vtbl { } unsafe extern "system" fn ExecQueryAsync(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strquery: *mut core::ffi::c_void, strquerylanguage: *mut core::ffi::c_void, lflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServices_Impl::ExecQueryAsync(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strquery), core::mem::transmute(&strquerylanguage), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemServices_Impl::ExecQueryAsync(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strquery), core::mem::transmute(&strquerylanguage), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn AssociatorsOf(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, strassocclass: *mut core::ffi::c_void, strresultclass: *mut core::ffi::c_void, strresultrole: *mut core::ffi::c_void, strrole: *mut core::ffi::c_void, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredassocqualifier: *mut core::ffi::c_void, strrequiredqualifier: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemServices_Impl::AssociatorsOf(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strassocclass), core::mem::transmute(&strresultclass), core::mem::transmute(&strresultrole), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredassocqualifier), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemServices_Impl::AssociatorsOf(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strassocclass), core::mem::transmute(&strresultclass), core::mem::transmute(&strresultrole), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredassocqualifier), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3974,7 +3974,7 @@ impl ISWbemServices_Vtbl { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); ISWbemServices_Impl::AssociatorsOfAsync( this, - windows_core::from_raw_borrowed(&objwbemsink), + core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strobjectpath), core::mem::transmute(&strassocclass), core::mem::transmute(&strresultclass), @@ -3985,14 +3985,14 @@ impl ISWbemServices_Vtbl { core::mem::transmute(&strrequiredassocqualifier), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), - windows_core::from_raw_borrowed(&objwbemnamedvalueset), - windows_core::from_raw_borrowed(&objwbemasynccontext), + core::mem::transmute_copy(&objwbemnamedvalueset), + core::mem::transmute_copy(&objwbemasynccontext), ) .into() } unsafe extern "system" fn ReferencesTo(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, strresultclass: *mut core::ffi::c_void, strrole: *mut core::ffi::c_void, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectset: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemServices_Impl::ReferencesTo(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strresultclass), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemServices_Impl::ReferencesTo(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strresultclass), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectset.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4002,11 +4002,11 @@ impl ISWbemServices_Vtbl { } unsafe extern "system" fn ReferencesToAsync(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, strresultclass: *mut core::ffi::c_void, strrole: *mut core::ffi::c_void, bclassesonly: super::super::Foundation::VARIANT_BOOL, bschemaonly: super::super::Foundation::VARIANT_BOOL, strrequiredqualifier: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServices_Impl::ReferencesToAsync(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strobjectpath), core::mem::transmute(&strresultclass), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemServices_Impl::ReferencesToAsync(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strobjectpath), core::mem::transmute(&strresultclass), core::mem::transmute(&strrole), core::mem::transmute_copy(&bclassesonly), core::mem::transmute_copy(&bschemaonly), core::mem::transmute(&strrequiredqualifier), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn ExecNotificationQuery(this: *mut core::ffi::c_void, strquery: *mut core::ffi::c_void, strquerylanguage: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemeventsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemServices_Impl::ExecNotificationQuery(this, core::mem::transmute(&strquery), core::mem::transmute(&strquerylanguage), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemServices_Impl::ExecNotificationQuery(this, core::mem::transmute(&strquery), core::mem::transmute(&strquerylanguage), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemeventsource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4016,11 +4016,11 @@ impl ISWbemServices_Vtbl { } unsafe extern "system" fn ExecNotificationQueryAsync(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strquery: *mut core::ffi::c_void, strquerylanguage: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServices_Impl::ExecNotificationQueryAsync(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strquery), core::mem::transmute(&strquerylanguage), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemServices_Impl::ExecNotificationQueryAsync(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strquery), core::mem::transmute(&strquerylanguage), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn ExecMethod(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, strmethodname: *mut core::ffi::c_void, objwbeminparameters: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemoutparameters: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemServices_Impl::ExecMethod(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strmethodname), windows_core::from_raw_borrowed(&objwbeminparameters), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemServices_Impl::ExecMethod(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strmethodname), core::mem::transmute_copy(&objwbeminparameters), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemoutparameters.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4030,7 +4030,7 @@ impl ISWbemServices_Vtbl { } unsafe extern "system" fn ExecMethodAsync(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, strmethodname: *mut core::ffi::c_void, objwbeminparameters: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServices_Impl::ExecMethodAsync(this, windows_core::from_raw_borrowed(&objwbemsink), core::mem::transmute(&strobjectpath), core::mem::transmute(&strmethodname), windows_core::from_raw_borrowed(&objwbeminparameters), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemServices_Impl::ExecMethodAsync(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute(&strobjectpath), core::mem::transmute(&strmethodname), core::mem::transmute_copy(&objwbeminparameters), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } unsafe extern "system" fn Security_(this: *mut core::ffi::c_void, objwbemsecurity: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4111,15 +4111,15 @@ pub struct ISWbemServicesEx_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ISWbemServicesEx_Impl: ISWbemServices_Impl { - fn Put(&self, objwbemobject: Option<&ISWbemObjectEx>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>) -> windows_core::Result; - fn PutAsync(&self, objwbemsink: Option<&ISWbemSink>, objwbemobject: Option<&ISWbemObjectEx>, iflags: i32, objwbemnamedvalueset: Option<&super::Com::IDispatch>, objwbemasynccontext: Option<&super::Com::IDispatch>) -> windows_core::Result<()>; + fn Put(&self, objwbemobject: windows_core::Ref<'_, ISWbemObjectEx>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result; + fn PutAsync(&self, objwbemsink: windows_core::Ref<'_, ISWbemSink>, objwbemobject: windows_core::Ref<'_, ISWbemObjectEx>, iflags: i32, objwbemnamedvalueset: windows_core::Ref<'_, super::Com::IDispatch>, objwbemasynccontext: windows_core::Ref<'_, super::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ISWbemServicesEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Put(this: *mut core::ffi::c_void, objwbemobject: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemobjectpath: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISWbemServicesEx_Impl::Put(this, windows_core::from_raw_borrowed(&objwbemobject), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset)) { + match ISWbemServicesEx_Impl::Put(this, core::mem::transmute_copy(&objwbemobject), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset)) { Ok(ok__) => { objwbemobjectpath.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4129,7 +4129,7 @@ impl ISWbemServicesEx_Vtbl { } unsafe extern "system" fn PutAsync(this: *mut core::ffi::c_void, objwbemsink: *mut core::ffi::c_void, objwbemobject: *mut core::ffi::c_void, iflags: i32, objwbemnamedvalueset: *mut core::ffi::c_void, objwbemasynccontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISWbemServicesEx_Impl::PutAsync(this, windows_core::from_raw_borrowed(&objwbemsink), windows_core::from_raw_borrowed(&objwbemobject), core::mem::transmute_copy(&iflags), windows_core::from_raw_borrowed(&objwbemnamedvalueset), windows_core::from_raw_borrowed(&objwbemasynccontext)).into() + ISWbemServicesEx_Impl::PutAsync(this, core::mem::transmute_copy(&objwbemsink), core::mem::transmute_copy(&objwbemobject), core::mem::transmute_copy(&iflags), core::mem::transmute_copy(&objwbemnamedvalueset), core::mem::transmute_copy(&objwbemasynccontext)).into() } Self { base__: ISWbemServices_Vtbl::new::(), Put: Put::, PutAsync: PutAsync:: } } @@ -4227,13 +4227,13 @@ pub struct IUnsecuredApartment_Vtbl { pub CreateObjectStub: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUnsecuredApartment_Impl: windows_core::IUnknownImpl { - fn CreateObjectStub(&self, pobject: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CreateObjectStub(&self, pobject: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } impl IUnsecuredApartment_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateObjectStub(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void, ppstub: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUnsecuredApartment_Impl::CreateObjectStub(this, windows_core::from_raw_borrowed(&pobject)) { + match IUnsecuredApartment_Impl::CreateObjectStub(this, core::mem::transmute_copy(&pobject)) { Ok(ok__) => { ppstub.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4726,14 +4726,14 @@ pub trait IWbemClassObject_Impl: windows_core::IUnknownImpl { fn GetObjectText(&self, lflags: i32) -> windows_core::Result; fn SpawnDerivedClass(&self, lflags: i32) -> windows_core::Result; fn SpawnInstance(&self, lflags: i32) -> windows_core::Result; - fn CompareTo(&self, lflags: WBEM_COMPARISON_FLAG, pcompareto: Option<&IWbemClassObject>) -> windows_core::Result<()>; + fn CompareTo(&self, lflags: WBEM_COMPARISON_FLAG, pcompareto: windows_core::Ref<'_, IWbemClassObject>) -> windows_core::Result<()>; fn GetPropertyOrigin(&self, wszname: &windows_core::PCWSTR) -> windows_core::Result; fn InheritsFrom(&self, strancestor: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn GetMethod(&self, wszname: &windows_core::PCWSTR, lflags: i32, ppinsignature: *mut Option, ppoutsignature: *mut Option) -> windows_core::Result<()>; - fn PutMethod(&self, wszname: &windows_core::PCWSTR, lflags: i32, pinsignature: Option<&IWbemClassObject>, poutsignature: Option<&IWbemClassObject>) -> windows_core::Result<()>; + fn GetMethod(&self, wszname: &windows_core::PCWSTR, lflags: i32, ppinsignature: windows_core::OutRef<'_, IWbemClassObject>, ppoutsignature: windows_core::OutRef<'_, IWbemClassObject>) -> windows_core::Result<()>; + fn PutMethod(&self, wszname: &windows_core::PCWSTR, lflags: i32, pinsignature: windows_core::Ref<'_, IWbemClassObject>, poutsignature: windows_core::Ref<'_, IWbemClassObject>) -> windows_core::Result<()>; fn DeleteMethod(&self, wszname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn BeginMethodEnumeration(&self, lenumflags: i32) -> windows_core::Result<()>; - fn NextMethod(&self, lflags: i32, pstrname: *mut windows_core::BSTR, ppinsignature: *mut Option, ppoutsignature: *mut Option) -> windows_core::Result<()>; + fn NextMethod(&self, lflags: i32, pstrname: *mut windows_core::BSTR, ppinsignature: windows_core::OutRef<'_, IWbemClassObject>, ppoutsignature: windows_core::OutRef<'_, IWbemClassObject>) -> windows_core::Result<()>; fn EndMethodEnumeration(&self) -> windows_core::Result<()>; fn GetMethodQualifierSet(&self, wszmethod: &windows_core::PCWSTR) -> windows_core::Result; fn GetMethodOrigin(&self, wszmethodname: &windows_core::PCWSTR) -> windows_core::Result; @@ -4837,7 +4837,7 @@ impl IWbemClassObject_Vtbl { } unsafe extern "system" fn CompareTo(this: *mut core::ffi::c_void, lflags: WBEM_COMPARISON_FLAG, pcompareto: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemClassObject_Impl::CompareTo(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pcompareto)).into() + IWbemClassObject_Impl::CompareTo(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pcompareto)).into() } unsafe extern "system" fn GetPropertyOrigin(this: *mut core::ffi::c_void, wszname: windows_core::PCWSTR, pstrclassname: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4859,7 +4859,7 @@ impl IWbemClassObject_Vtbl { } unsafe extern "system" fn PutMethod(this: *mut core::ffi::c_void, wszname: windows_core::PCWSTR, lflags: i32, pinsignature: *mut core::ffi::c_void, poutsignature: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemClassObject_Impl::PutMethod(this, core::mem::transmute(&wszname), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pinsignature), windows_core::from_raw_borrowed(&poutsignature)).into() + IWbemClassObject_Impl::PutMethod(this, core::mem::transmute(&wszname), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pinsignature), core::mem::transmute_copy(&poutsignature)).into() } unsafe extern "system" fn DeleteMethod(this: *mut core::ffi::c_void, wszname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4964,23 +4964,23 @@ pub struct IWbemClientConnectionTransport_Vtbl { pub Cancel: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemClientConnectionTransport_Impl: windows_core::IUnknownImpl { - fn Open(&self, straddresstype: &windows_core::BSTR, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, lflags: i32, pctx: Option<&IWbemContext>, riid: *const windows_core::GUID, pinterface: *mut *mut core::ffi::c_void, pcallres: *mut Option) -> windows_core::Result<()>; - fn OpenAsync(&self, straddresstype: &windows_core::BSTR, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, lflags: i32, pctx: Option<&IWbemContext>, riid: *const windows_core::GUID, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn Cancel(&self, lflags: i32, phandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; + fn Open(&self, straddresstype: &windows_core::BSTR, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, lflags: i32, pctx: windows_core::Ref<'_, IWbemContext>, riid: *const windows_core::GUID, pinterface: *mut *mut core::ffi::c_void, pcallres: windows_core::OutRef<'_, IWbemCallResult>) -> windows_core::Result<()>; + fn OpenAsync(&self, straddresstype: &windows_core::BSTR, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, lflags: i32, pctx: windows_core::Ref<'_, IWbemContext>, riid: *const windows_core::GUID, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn Cancel(&self, lflags: i32, phandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; } impl IWbemClientConnectionTransport_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, straddresstype: *mut core::ffi::c_void, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: *mut core::ffi::c_void, struser: *mut core::ffi::c_void, strpassword: *mut core::ffi::c_void, strlocale: *mut core::ffi::c_void, lflags: i32, pctx: *mut core::ffi::c_void, riid: *const windows_core::GUID, pinterface: *mut *mut core::ffi::c_void, pcallres: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemClientConnectionTransport_Impl::Open(this, core::mem::transmute(&straddresstype), core::mem::transmute_copy(&dwbinaryaddresslength), core::mem::transmute_copy(&abbinaryaddress), core::mem::transmute(&strobject), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pinterface), core::mem::transmute_copy(&pcallres)).into() + IWbemClientConnectionTransport_Impl::Open(this, core::mem::transmute(&straddresstype), core::mem::transmute_copy(&dwbinaryaddresslength), core::mem::transmute_copy(&abbinaryaddress), core::mem::transmute(&strobject), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pinterface), core::mem::transmute_copy(&pcallres)).into() } unsafe extern "system" fn OpenAsync(this: *mut core::ffi::c_void, straddresstype: *mut core::ffi::c_void, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: *mut core::ffi::c_void, struser: *mut core::ffi::c_void, strpassword: *mut core::ffi::c_void, strlocale: *mut core::ffi::c_void, lflags: i32, pctx: *mut core::ffi::c_void, riid: *const windows_core::GUID, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemClientConnectionTransport_Impl::OpenAsync(this, core::mem::transmute(&straddresstype), core::mem::transmute_copy(&dwbinaryaddresslength), core::mem::transmute_copy(&abbinaryaddress), core::mem::transmute(&strobject), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemClientConnectionTransport_Impl::OpenAsync(this, core::mem::transmute(&straddresstype), core::mem::transmute_copy(&dwbinaryaddresslength), core::mem::transmute_copy(&abbinaryaddress), core::mem::transmute(&strobject), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn Cancel(this: *mut core::ffi::c_void, lflags: i32, phandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemClientConnectionTransport_Impl::Cancel(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&phandler)).into() + IWbemClientConnectionTransport_Impl::Cancel(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&phandler)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5011,13 +5011,13 @@ pub struct IWbemClientTransport_Vtbl { pub ConnectServer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, *const u8, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, i32, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemClientTransport_Impl: windows_core::IUnknownImpl { - fn ConnectServer(&self, straddresstype: &windows_core::BSTR, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strnetworkresource: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, lsecurityflags: i32, strauthority: &windows_core::BSTR, pctx: Option<&IWbemContext>) -> windows_core::Result; + fn ConnectServer(&self, straddresstype: &windows_core::BSTR, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strnetworkresource: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, lsecurityflags: i32, strauthority: &windows_core::BSTR, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; } impl IWbemClientTransport_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConnectServer(this: *mut core::ffi::c_void, straddresstype: *mut core::ffi::c_void, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strnetworkresource: *mut core::ffi::c_void, struser: *mut core::ffi::c_void, strpassword: *mut core::ffi::c_void, strlocale: *mut core::ffi::c_void, lsecurityflags: i32, strauthority: *mut core::ffi::c_void, pctx: *mut core::ffi::c_void, ppnamespace: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemClientTransport_Impl::ConnectServer(this, core::mem::transmute(&straddresstype), core::mem::transmute_copy(&dwbinaryaddresslength), core::mem::transmute_copy(&abbinaryaddress), core::mem::transmute(&strnetworkresource), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute_copy(&lsecurityflags), core::mem::transmute(&strauthority), windows_core::from_raw_borrowed(&pctx)) { + match IWbemClientTransport_Impl::ConnectServer(this, core::mem::transmute(&straddresstype), core::mem::transmute_copy(&dwbinaryaddresslength), core::mem::transmute_copy(&abbinaryaddress), core::mem::transmute(&strnetworkresource), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute_copy(&lsecurityflags), core::mem::transmute(&strauthority), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { ppnamespace.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5079,25 +5079,25 @@ pub struct IWbemConfigureRefresher_Vtbl { pub AddEnum: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, windows_core::PCWSTR, i32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT, } pub trait IWbemConfigureRefresher_Impl: windows_core::IUnknownImpl { - fn AddObjectByPath(&self, pnamespace: Option<&IWbemServices>, wszpath: &windows_core::PCWSTR, lflags: i32, pcontext: Option<&IWbemContext>, pprefreshable: *mut Option, plid: *mut i32) -> windows_core::Result<()>; - fn AddObjectByTemplate(&self, pnamespace: Option<&IWbemServices>, ptemplate: Option<&IWbemClassObject>, lflags: i32, pcontext: Option<&IWbemContext>, pprefreshable: *mut Option, plid: *mut i32) -> windows_core::Result<()>; - fn AddRefresher(&self, prefresher: Option<&IWbemRefresher>, lflags: i32, plid: *mut i32) -> windows_core::Result<()>; + fn AddObjectByPath(&self, pnamespace: windows_core::Ref<'_, IWbemServices>, wszpath: &windows_core::PCWSTR, lflags: i32, pcontext: windows_core::Ref<'_, IWbemContext>, pprefreshable: windows_core::OutRef<'_, IWbemClassObject>, plid: *mut i32) -> windows_core::Result<()>; + fn AddObjectByTemplate(&self, pnamespace: windows_core::Ref<'_, IWbemServices>, ptemplate: windows_core::Ref<'_, IWbemClassObject>, lflags: i32, pcontext: windows_core::Ref<'_, IWbemContext>, pprefreshable: windows_core::OutRef<'_, IWbemClassObject>, plid: *mut i32) -> windows_core::Result<()>; + fn AddRefresher(&self, prefresher: windows_core::Ref<'_, IWbemRefresher>, lflags: i32, plid: *mut i32) -> windows_core::Result<()>; fn Remove(&self, lid: i32, lflags: i32) -> windows_core::Result<()>; - fn AddEnum(&self, pnamespace: Option<&IWbemServices>, wszclassname: &windows_core::PCWSTR, lflags: i32, pcontext: Option<&IWbemContext>, ppenum: *mut Option, plid: *mut i32) -> windows_core::Result<()>; + fn AddEnum(&self, pnamespace: windows_core::Ref<'_, IWbemServices>, wszclassname: &windows_core::PCWSTR, lflags: i32, pcontext: windows_core::Ref<'_, IWbemContext>, ppenum: windows_core::OutRef<'_, IWbemHiPerfEnum>, plid: *mut i32) -> windows_core::Result<()>; } impl IWbemConfigureRefresher_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddObjectByPath(this: *mut core::ffi::c_void, pnamespace: *mut core::ffi::c_void, wszpath: windows_core::PCWSTR, lflags: i32, pcontext: *mut core::ffi::c_void, pprefreshable: *mut *mut core::ffi::c_void, plid: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemConfigureRefresher_Impl::AddObjectByPath(this, windows_core::from_raw_borrowed(&pnamespace), core::mem::transmute(&wszpath), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pcontext), core::mem::transmute_copy(&pprefreshable), core::mem::transmute_copy(&plid)).into() + IWbemConfigureRefresher_Impl::AddObjectByPath(this, core::mem::transmute_copy(&pnamespace), core::mem::transmute(&wszpath), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pprefreshable), core::mem::transmute_copy(&plid)).into() } unsafe extern "system" fn AddObjectByTemplate(this: *mut core::ffi::c_void, pnamespace: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void, lflags: i32, pcontext: *mut core::ffi::c_void, pprefreshable: *mut *mut core::ffi::c_void, plid: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemConfigureRefresher_Impl::AddObjectByTemplate(this, windows_core::from_raw_borrowed(&pnamespace), windows_core::from_raw_borrowed(&ptemplate), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pcontext), core::mem::transmute_copy(&pprefreshable), core::mem::transmute_copy(&plid)).into() + IWbemConfigureRefresher_Impl::AddObjectByTemplate(this, core::mem::transmute_copy(&pnamespace), core::mem::transmute_copy(&ptemplate), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pprefreshable), core::mem::transmute_copy(&plid)).into() } unsafe extern "system" fn AddRefresher(this: *mut core::ffi::c_void, prefresher: *mut core::ffi::c_void, lflags: i32, plid: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemConfigureRefresher_Impl::AddRefresher(this, windows_core::from_raw_borrowed(&prefresher), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&plid)).into() + IWbemConfigureRefresher_Impl::AddRefresher(this, core::mem::transmute_copy(&prefresher), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&plid)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, lid: i32, lflags: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5105,7 +5105,7 @@ impl IWbemConfigureRefresher_Vtbl { } unsafe extern "system" fn AddEnum(this: *mut core::ffi::c_void, pnamespace: *mut core::ffi::c_void, wszclassname: windows_core::PCWSTR, lflags: i32, pcontext: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void, plid: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemConfigureRefresher_Impl::AddEnum(this, windows_core::from_raw_borrowed(&pnamespace), core::mem::transmute(&wszclassname), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pcontext), core::mem::transmute_copy(&ppenum), core::mem::transmute_copy(&plid)).into() + IWbemConfigureRefresher_Impl::AddEnum(this, core::mem::transmute_copy(&pnamespace), core::mem::transmute(&wszclassname), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&ppenum), core::mem::transmute_copy(&plid)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5141,13 +5141,13 @@ pub struct IWbemConnectorLogin_Vtbl { pub ConnectorLogin: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, i32, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemConnectorLogin_Impl: windows_core::IUnknownImpl { - fn ConnectorLogin(&self, wsznetworkresource: &windows_core::PCWSTR, wszpreferredlocale: &windows_core::PCWSTR, lflags: i32, pctx: Option<&IWbemContext>, riid: *const windows_core::GUID, pinterface: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ConnectorLogin(&self, wsznetworkresource: &windows_core::PCWSTR, wszpreferredlocale: &windows_core::PCWSTR, lflags: i32, pctx: windows_core::Ref<'_, IWbemContext>, riid: *const windows_core::GUID, pinterface: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IWbemConnectorLogin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConnectorLogin(this: *mut core::ffi::c_void, wsznetworkresource: windows_core::PCWSTR, wszpreferredlocale: windows_core::PCWSTR, lflags: i32, pctx: *mut core::ffi::c_void, riid: *const windows_core::GUID, pinterface: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemConnectorLogin_Impl::ConnectorLogin(this, core::mem::transmute(&wsznetworkresource), core::mem::transmute(&wszpreferredlocale), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pinterface)).into() + IWbemConnectorLogin_Impl::ConnectorLogin(this, core::mem::transmute(&wsznetworkresource), core::mem::transmute(&wszpreferredlocale), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&pinterface)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ConnectorLogin: ConnectorLogin:: } } @@ -5418,14 +5418,14 @@ pub struct IWbemDecoupledBasicEventProvider_Vtbl { pub GetService: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemDecoupledBasicEventProvider_Impl: IWbemDecoupledRegistrar_Impl { - fn GetSink(&self, a_flags: i32, a_context: Option<&IWbemContext>) -> windows_core::Result; - fn GetService(&self, a_flags: i32, a_context: Option<&IWbemContext>) -> windows_core::Result; + fn GetSink(&self, a_flags: i32, a_context: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; + fn GetService(&self, a_flags: i32, a_context: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; } impl IWbemDecoupledBasicEventProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetSink(this: *mut core::ffi::c_void, a_flags: i32, a_context: *mut core::ffi::c_void, a_sink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemDecoupledBasicEventProvider_Impl::GetSink(this, core::mem::transmute_copy(&a_flags), windows_core::from_raw_borrowed(&a_context)) { + match IWbemDecoupledBasicEventProvider_Impl::GetSink(this, core::mem::transmute_copy(&a_flags), core::mem::transmute_copy(&a_context)) { Ok(ok__) => { a_sink.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5435,7 +5435,7 @@ impl IWbemDecoupledBasicEventProvider_Vtbl { } unsafe extern "system" fn GetService(this: *mut core::ffi::c_void, a_flags: i32, a_context: *mut core::ffi::c_void, a_service: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemDecoupledBasicEventProvider_Impl::GetService(this, core::mem::transmute_copy(&a_flags), windows_core::from_raw_borrowed(&a_context)) { + match IWbemDecoupledBasicEventProvider_Impl::GetService(this, core::mem::transmute_copy(&a_flags), core::mem::transmute_copy(&a_context)) { Ok(ok__) => { a_service.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5479,14 +5479,14 @@ pub struct IWbemDecoupledRegistrar_Vtbl { pub UnRegister: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemDecoupledRegistrar_Impl: windows_core::IUnknownImpl { - fn Register(&self, a_flags: i32, a_context: Option<&IWbemContext>, a_user: &windows_core::PCWSTR, a_locale: &windows_core::PCWSTR, a_scope: &windows_core::PCWSTR, a_registration: &windows_core::PCWSTR, piunknown: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Register(&self, a_flags: i32, a_context: windows_core::Ref<'_, IWbemContext>, a_user: &windows_core::PCWSTR, a_locale: &windows_core::PCWSTR, a_scope: &windows_core::PCWSTR, a_registration: &windows_core::PCWSTR, piunknown: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn UnRegister(&self) -> windows_core::Result<()>; } impl IWbemDecoupledRegistrar_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Register(this: *mut core::ffi::c_void, a_flags: i32, a_context: *mut core::ffi::c_void, a_user: windows_core::PCWSTR, a_locale: windows_core::PCWSTR, a_scope: windows_core::PCWSTR, a_registration: windows_core::PCWSTR, piunknown: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemDecoupledRegistrar_Impl::Register(this, core::mem::transmute_copy(&a_flags), windows_core::from_raw_borrowed(&a_context), core::mem::transmute(&a_user), core::mem::transmute(&a_locale), core::mem::transmute(&a_scope), core::mem::transmute(&a_registration), windows_core::from_raw_borrowed(&piunknown)).into() + IWbemDecoupledRegistrar_Impl::Register(this, core::mem::transmute_copy(&a_flags), core::mem::transmute_copy(&a_context), core::mem::transmute(&a_user), core::mem::transmute(&a_locale), core::mem::transmute(&a_scope), core::mem::transmute(&a_registration), core::mem::transmute_copy(&piunknown)).into() } unsafe extern "system" fn UnRegister(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5520,13 +5520,13 @@ pub struct IWbemEventConsumerProvider_Vtbl { pub FindConsumer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemEventConsumerProvider_Impl: windows_core::IUnknownImpl { - fn FindConsumer(&self, plogicalconsumer: Option<&IWbemClassObject>) -> windows_core::Result; + fn FindConsumer(&self, plogicalconsumer: windows_core::Ref<'_, IWbemClassObject>) -> windows_core::Result; } impl IWbemEventConsumerProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FindConsumer(this: *mut core::ffi::c_void, plogicalconsumer: *mut core::ffi::c_void, ppconsumer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemEventConsumerProvider_Impl::FindConsumer(this, windows_core::from_raw_borrowed(&plogicalconsumer)) { + match IWbemEventConsumerProvider_Impl::FindConsumer(this, core::mem::transmute_copy(&plogicalconsumer)) { Ok(ok__) => { ppconsumer.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5557,13 +5557,13 @@ pub struct IWbemEventProvider_Vtbl { pub ProvideEvents: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i32) -> windows_core::HRESULT, } pub trait IWbemEventProvider_Impl: windows_core::IUnknownImpl { - fn ProvideEvents(&self, psink: Option<&IWbemObjectSink>, lflags: i32) -> windows_core::Result<()>; + fn ProvideEvents(&self, psink: windows_core::Ref<'_, IWbemObjectSink>, lflags: i32) -> windows_core::Result<()>; } impl IWbemEventProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ProvideEvents(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, lflags: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemEventProvider_Impl::ProvideEvents(this, windows_core::from_raw_borrowed(&psink), core::mem::transmute_copy(&lflags)).into() + IWbemEventProvider_Impl::ProvideEvents(this, core::mem::transmute_copy(&psink), core::mem::transmute_copy(&lflags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ProvideEvents: ProvideEvents:: } } @@ -5678,7 +5678,7 @@ pub struct IWbemEventSink_Vtbl { pub trait IWbemEventSink_Impl: IWbemObjectSink_Impl { fn SetSinkSecurity(&self, lsdlength: i32, psd: *const u8) -> windows_core::Result<()>; fn IsActive(&self) -> windows_core::Result<()>; - fn GetRestrictedSink(&self, lnumqueries: i32, awszqueries: *const windows_core::PCWSTR, pcallback: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn GetRestrictedSink(&self, lnumqueries: i32, awszqueries: *const windows_core::PCWSTR, pcallback: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn SetBatchingParameters(&self, lflags: i32, dwmaxbuffersize: u32, dwmaxsendlatency: u32) -> windows_core::Result<()>; } impl IWbemEventSink_Vtbl { @@ -5693,7 +5693,7 @@ impl IWbemEventSink_Vtbl { } unsafe extern "system" fn GetRestrictedSink(this: *mut core::ffi::c_void, lnumqueries: i32, awszqueries: *const windows_core::PCWSTR, pcallback: *mut core::ffi::c_void, ppsink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemEventSink_Impl::GetRestrictedSink(this, core::mem::transmute_copy(&lnumqueries), core::mem::transmute_copy(&awszqueries), windows_core::from_raw_borrowed(&pcallback)) { + match IWbemEventSink_Impl::GetRestrictedSink(this, core::mem::transmute_copy(&lnumqueries), core::mem::transmute_copy(&awszqueries), core::mem::transmute_copy(&pcallback)) { Ok(ok__) => { ppsink.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5745,7 +5745,7 @@ pub struct IWbemHiPerfEnum_Vtbl { pub trait IWbemHiPerfEnum_Impl: windows_core::IUnknownImpl { fn AddObjects(&self, lflags: i32, unumobjects: u32, apids: *const i32, apobj: *const Option) -> windows_core::Result<()>; fn RemoveObjects(&self, lflags: i32, unumobjects: u32, apids: *const i32) -> windows_core::Result<()>; - fn GetObjects(&self, lflags: i32, unumobjects: u32, apobj: *mut Option, pureturned: *mut u32) -> windows_core::Result<()>; + fn GetObjects(&self, lflags: i32, unumobjects: u32, apobj: windows_core::OutRef<'_, IWbemObjectAccess>, pureturned: *mut u32) -> windows_core::Result<()>; fn RemoveAll(&self, lflags: i32) -> windows_core::Result<()>; } impl IWbemHiPerfEnum_Vtbl { @@ -5843,22 +5843,22 @@ pub struct IWbemHiPerfProvider_Vtbl { pub GetObjects: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void, i32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemHiPerfProvider_Impl: windows_core::IUnknownImpl { - fn QueryInstances(&self, pnamespace: Option<&IWbemServices>, wszclass: &windows_core::PCWSTR, lflags: i32, pctx: Option<&IWbemContext>, psink: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn CreateRefresher(&self, pnamespace: Option<&IWbemServices>, lflags: i32) -> windows_core::Result; - fn CreateRefreshableObject(&self, pnamespace: Option<&IWbemServices>, ptemplate: Option<&IWbemObjectAccess>, prefresher: Option<&IWbemRefresher>, lflags: i32, pcontext: Option<&IWbemContext>, pprefreshable: *mut Option, plid: *mut i32) -> windows_core::Result<()>; - fn StopRefreshing(&self, prefresher: Option<&IWbemRefresher>, lid: i32, lflags: i32) -> windows_core::Result<()>; - fn CreateRefreshableEnum(&self, pnamespace: Option<&IWbemServices>, wszclass: &windows_core::PCWSTR, prefresher: Option<&IWbemRefresher>, lflags: i32, pcontext: Option<&IWbemContext>, phiperfenum: Option<&IWbemHiPerfEnum>) -> windows_core::Result; - fn GetObjects(&self, pnamespace: Option<&IWbemServices>, lnumobjects: i32, apobj: *mut Option, lflags: i32, pcontext: Option<&IWbemContext>) -> windows_core::Result<()>; + fn QueryInstances(&self, pnamespace: windows_core::Ref<'_, IWbemServices>, wszclass: &windows_core::PCWSTR, lflags: i32, pctx: windows_core::Ref<'_, IWbemContext>, psink: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn CreateRefresher(&self, pnamespace: windows_core::Ref<'_, IWbemServices>, lflags: i32) -> windows_core::Result; + fn CreateRefreshableObject(&self, pnamespace: windows_core::Ref<'_, IWbemServices>, ptemplate: windows_core::Ref<'_, IWbemObjectAccess>, prefresher: windows_core::Ref<'_, IWbemRefresher>, lflags: i32, pcontext: windows_core::Ref<'_, IWbemContext>, pprefreshable: windows_core::OutRef<'_, IWbemObjectAccess>, plid: *mut i32) -> windows_core::Result<()>; + fn StopRefreshing(&self, prefresher: windows_core::Ref<'_, IWbemRefresher>, lid: i32, lflags: i32) -> windows_core::Result<()>; + fn CreateRefreshableEnum(&self, pnamespace: windows_core::Ref<'_, IWbemServices>, wszclass: &windows_core::PCWSTR, prefresher: windows_core::Ref<'_, IWbemRefresher>, lflags: i32, pcontext: windows_core::Ref<'_, IWbemContext>, phiperfenum: windows_core::Ref<'_, IWbemHiPerfEnum>) -> windows_core::Result; + fn GetObjects(&self, pnamespace: windows_core::Ref<'_, IWbemServices>, lnumobjects: i32, apobj: windows_core::OutRef<'_, IWbemObjectAccess>, lflags: i32, pcontext: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result<()>; } impl IWbemHiPerfProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryInstances(this: *mut core::ffi::c_void, pnamespace: *mut core::ffi::c_void, wszclass: windows_core::PCWSTR, lflags: i32, pctx: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemHiPerfProvider_Impl::QueryInstances(this, windows_core::from_raw_borrowed(&pnamespace), core::mem::transmute(&wszclass), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&psink)).into() + IWbemHiPerfProvider_Impl::QueryInstances(this, core::mem::transmute_copy(&pnamespace), core::mem::transmute(&wszclass), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn CreateRefresher(this: *mut core::ffi::c_void, pnamespace: *mut core::ffi::c_void, lflags: i32, pprefresher: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemHiPerfProvider_Impl::CreateRefresher(this, windows_core::from_raw_borrowed(&pnamespace), core::mem::transmute_copy(&lflags)) { + match IWbemHiPerfProvider_Impl::CreateRefresher(this, core::mem::transmute_copy(&pnamespace), core::mem::transmute_copy(&lflags)) { Ok(ok__) => { pprefresher.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5868,15 +5868,15 @@ impl IWbemHiPerfProvider_Vtbl { } unsafe extern "system" fn CreateRefreshableObject(this: *mut core::ffi::c_void, pnamespace: *mut core::ffi::c_void, ptemplate: *mut core::ffi::c_void, prefresher: *mut core::ffi::c_void, lflags: i32, pcontext: *mut core::ffi::c_void, pprefreshable: *mut *mut core::ffi::c_void, plid: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemHiPerfProvider_Impl::CreateRefreshableObject(this, windows_core::from_raw_borrowed(&pnamespace), windows_core::from_raw_borrowed(&ptemplate), windows_core::from_raw_borrowed(&prefresher), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pcontext), core::mem::transmute_copy(&pprefreshable), core::mem::transmute_copy(&plid)).into() + IWbemHiPerfProvider_Impl::CreateRefreshableObject(this, core::mem::transmute_copy(&pnamespace), core::mem::transmute_copy(&ptemplate), core::mem::transmute_copy(&prefresher), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pprefreshable), core::mem::transmute_copy(&plid)).into() } unsafe extern "system" fn StopRefreshing(this: *mut core::ffi::c_void, prefresher: *mut core::ffi::c_void, lid: i32, lflags: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemHiPerfProvider_Impl::StopRefreshing(this, windows_core::from_raw_borrowed(&prefresher), core::mem::transmute_copy(&lid), core::mem::transmute_copy(&lflags)).into() + IWbemHiPerfProvider_Impl::StopRefreshing(this, core::mem::transmute_copy(&prefresher), core::mem::transmute_copy(&lid), core::mem::transmute_copy(&lflags)).into() } unsafe extern "system" fn CreateRefreshableEnum(this: *mut core::ffi::c_void, pnamespace: *mut core::ffi::c_void, wszclass: windows_core::PCWSTR, prefresher: *mut core::ffi::c_void, lflags: i32, pcontext: *mut core::ffi::c_void, phiperfenum: *mut core::ffi::c_void, plid: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemHiPerfProvider_Impl::CreateRefreshableEnum(this, windows_core::from_raw_borrowed(&pnamespace), core::mem::transmute(&wszclass), windows_core::from_raw_borrowed(&prefresher), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pcontext), windows_core::from_raw_borrowed(&phiperfenum)) { + match IWbemHiPerfProvider_Impl::CreateRefreshableEnum(this, core::mem::transmute_copy(&pnamespace), core::mem::transmute(&wszclass), core::mem::transmute_copy(&prefresher), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&phiperfenum)) { Ok(ok__) => { plid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5886,7 +5886,7 @@ impl IWbemHiPerfProvider_Vtbl { } unsafe extern "system" fn GetObjects(this: *mut core::ffi::c_void, pnamespace: *mut core::ffi::c_void, lnumobjects: i32, apobj: *mut *mut core::ffi::c_void, lflags: i32, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemHiPerfProvider_Impl::GetObjects(this, windows_core::from_raw_borrowed(&pnamespace), core::mem::transmute_copy(&lnumobjects), core::mem::transmute_copy(&apobj), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pcontext)).into() + IWbemHiPerfProvider_Impl::GetObjects(this, core::mem::transmute_copy(&pnamespace), core::mem::transmute_copy(&lnumobjects), core::mem::transmute_copy(&apobj), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pcontext)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5950,8 +5950,8 @@ pub struct IWbemLevel1Login_Vtbl { pub trait IWbemLevel1Login_Impl: windows_core::IUnknownImpl { fn EstablishPosition(&self, wszlocalelist: &windows_core::PCWSTR, dwnumlocales: u32) -> windows_core::Result; fn RequestChallenge(&self, wsznetworkresource: &windows_core::PCWSTR, wszuser: &windows_core::PCWSTR) -> windows_core::Result; - fn WBEMLogin(&self, wszpreferredlocale: &windows_core::PCWSTR, accesstoken: *const u8, lflags: i32, pctx: Option<&IWbemContext>) -> windows_core::Result; - fn NTLMLogin(&self, wsznetworkresource: &windows_core::PCWSTR, wszpreferredlocale: &windows_core::PCWSTR, lflags: i32, pctx: Option<&IWbemContext>) -> windows_core::Result; + fn WBEMLogin(&self, wszpreferredlocale: &windows_core::PCWSTR, accesstoken: *const u8, lflags: i32, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; + fn NTLMLogin(&self, wsznetworkresource: &windows_core::PCWSTR, wszpreferredlocale: &windows_core::PCWSTR, lflags: i32, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; } impl IWbemLevel1Login_Vtbl { pub const fn new() -> Self { @@ -5977,7 +5977,7 @@ impl IWbemLevel1Login_Vtbl { } unsafe extern "system" fn WBEMLogin(this: *mut core::ffi::c_void, wszpreferredlocale: windows_core::PCWSTR, accesstoken: *const u8, lflags: i32, pctx: *mut core::ffi::c_void, ppnamespace: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemLevel1Login_Impl::WBEMLogin(this, core::mem::transmute(&wszpreferredlocale), core::mem::transmute_copy(&accesstoken), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx)) { + match IWbemLevel1Login_Impl::WBEMLogin(this, core::mem::transmute(&wszpreferredlocale), core::mem::transmute_copy(&accesstoken), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { ppnamespace.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5987,7 +5987,7 @@ impl IWbemLevel1Login_Vtbl { } unsafe extern "system" fn NTLMLogin(this: *mut core::ffi::c_void, wsznetworkresource: windows_core::PCWSTR, wszpreferredlocale: windows_core::PCWSTR, lflags: i32, pctx: *mut core::ffi::c_void, ppnamespace: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemLevel1Login_Impl::NTLMLogin(this, core::mem::transmute(&wsznetworkresource), core::mem::transmute(&wszpreferredlocale), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx)) { + match IWbemLevel1Login_Impl::NTLMLogin(this, core::mem::transmute(&wsznetworkresource), core::mem::transmute(&wszpreferredlocale), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { ppnamespace.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6025,13 +6025,13 @@ pub struct IWbemLocator_Vtbl { pub ConnectServer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, i32, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemLocator_Impl: windows_core::IUnknownImpl { - fn ConnectServer(&self, strnetworkresource: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, lsecurityflags: i32, strauthority: &windows_core::BSTR, pctx: Option<&IWbemContext>) -> windows_core::Result; + fn ConnectServer(&self, strnetworkresource: &windows_core::BSTR, struser: &windows_core::BSTR, strpassword: &windows_core::BSTR, strlocale: &windows_core::BSTR, lsecurityflags: i32, strauthority: &windows_core::BSTR, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; } impl IWbemLocator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConnectServer(this: *mut core::ffi::c_void, strnetworkresource: *mut core::ffi::c_void, struser: *mut core::ffi::c_void, strpassword: *mut core::ffi::c_void, strlocale: *mut core::ffi::c_void, lsecurityflags: i32, strauthority: *mut core::ffi::c_void, pctx: *mut core::ffi::c_void, ppnamespace: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemLocator_Impl::ConnectServer(this, core::mem::transmute(&strnetworkresource), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute_copy(&lsecurityflags), core::mem::transmute(&strauthority), windows_core::from_raw_borrowed(&pctx)) { + match IWbemLocator_Impl::ConnectServer(this, core::mem::transmute(&strnetworkresource), core::mem::transmute(&struser), core::mem::transmute(&strpassword), core::mem::transmute(&strlocale), core::mem::transmute_copy(&lsecurityflags), core::mem::transmute(&strauthority), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { ppnamespace.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6214,7 +6214,7 @@ pub struct IWbemObjectSink_Vtbl { } pub trait IWbemObjectSink_Impl: windows_core::IUnknownImpl { fn Indicate(&self, lobjectcount: i32, apobjarray: *const Option) -> windows_core::Result<()>; - fn SetStatus(&self, lflags: i32, hresult: windows_core::HRESULT, strparam: &windows_core::BSTR, pobjparam: Option<&IWbemClassObject>) -> windows_core::Result<()>; + fn SetStatus(&self, lflags: i32, hresult: windows_core::HRESULT, strparam: &windows_core::BSTR, pobjparam: windows_core::Ref<'_, IWbemClassObject>) -> windows_core::Result<()>; } impl IWbemObjectSink_Vtbl { pub const fn new() -> Self { @@ -6224,7 +6224,7 @@ impl IWbemObjectSink_Vtbl { } unsafe extern "system" fn SetStatus(this: *mut core::ffi::c_void, lflags: i32, hresult: windows_core::HRESULT, strparam: *mut core::ffi::c_void, pobjparam: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemObjectSink_Impl::SetStatus(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&hresult), core::mem::transmute(&strparam), windows_core::from_raw_borrowed(&pobjparam)).into() + IWbemObjectSink_Impl::SetStatus(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&hresult), core::mem::transmute(&strparam), core::mem::transmute_copy(&pobjparam)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Indicate: Indicate::, SetStatus: SetStatus:: } } @@ -6279,7 +6279,7 @@ pub struct IWbemObjectSinkEx_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IWbemObjectSinkEx_Impl: IWbemObjectSink_Impl { fn WriteMessage(&self, uchannel: u32, strmessage: &windows_core::BSTR) -> windows_core::Result<()>; - fn WriteError(&self, pobjerror: Option<&IWbemClassObject>) -> windows_core::Result; + fn WriteError(&self, pobjerror: windows_core::Ref<'_, IWbemClassObject>) -> windows_core::Result; fn PromptUser(&self, strmessage: &windows_core::BSTR, uprompttype: u8) -> windows_core::Result; fn WriteProgress(&self, stractivity: &windows_core::BSTR, strcurrentoperation: &windows_core::BSTR, strstatusdescription: &windows_core::BSTR, upercentcomplete: u32, usecondsremaining: u32) -> windows_core::Result<()>; fn WriteStreamParameter(&self, strname: &windows_core::BSTR, vtvalue: *const super::Variant::VARIANT, ultype: u32, ulflags: u32) -> windows_core::Result<()>; @@ -6293,7 +6293,7 @@ impl IWbemObjectSinkEx_Vtbl { } unsafe extern "system" fn WriteError(this: *mut core::ffi::c_void, pobjerror: *mut core::ffi::c_void, pureturned: *mut u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemObjectSinkEx_Impl::WriteError(this, windows_core::from_raw_borrowed(&pobjerror)) { + match IWbemObjectSinkEx_Impl::WriteError(this, core::mem::transmute_copy(&pobjerror)) { Ok(ok__) => { pureturned.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6360,14 +6360,14 @@ pub struct IWbemObjectTextSrc_Vtbl { pub CreateFromText: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemObjectTextSrc_Impl: windows_core::IUnknownImpl { - fn GetText(&self, lflags: i32, pobj: Option<&IWbemClassObject>, uobjtextformat: u32, pctx: Option<&IWbemContext>) -> windows_core::Result; - fn CreateFromText(&self, lflags: i32, strtext: &windows_core::BSTR, uobjtextformat: u32, pctx: Option<&IWbemContext>) -> windows_core::Result; + fn GetText(&self, lflags: i32, pobj: windows_core::Ref<'_, IWbemClassObject>, uobjtextformat: u32, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; + fn CreateFromText(&self, lflags: i32, strtext: &windows_core::BSTR, uobjtextformat: u32, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; } impl IWbemObjectTextSrc_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetText(this: *mut core::ffi::c_void, lflags: i32, pobj: *mut core::ffi::c_void, uobjtextformat: u32, pctx: *mut core::ffi::c_void, strtext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemObjectTextSrc_Impl::GetText(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pobj), core::mem::transmute_copy(&uobjtextformat), windows_core::from_raw_borrowed(&pctx)) { + match IWbemObjectTextSrc_Impl::GetText(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pobj), core::mem::transmute_copy(&uobjtextformat), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { strtext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6377,7 +6377,7 @@ impl IWbemObjectTextSrc_Vtbl { } unsafe extern "system" fn CreateFromText(this: *mut core::ffi::c_void, lflags: i32, strtext: *mut core::ffi::c_void, uobjtextformat: u32, pctx: *mut core::ffi::c_void, pnewobj: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemObjectTextSrc_Impl::CreateFromText(this, core::mem::transmute_copy(&lflags), core::mem::transmute(&strtext), core::mem::transmute_copy(&uobjtextformat), windows_core::from_raw_borrowed(&pctx)) { + match IWbemObjectTextSrc_Impl::CreateFromText(this, core::mem::transmute_copy(&lflags), core::mem::transmute(&strtext), core::mem::transmute_copy(&uobjtextformat), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { pnewobj.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6561,7 +6561,7 @@ pub trait IWbemPath_Impl: windows_core::IUnknownImpl { fn GetScopeCount(&self) -> windows_core::Result; fn SetScope(&self, uindex: u32, pszclass: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetScopeFromText(&self, uindex: u32, psztext: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn GetScope(&self, uindex: u32, puclassnamebufsize: *mut u32, pszclass: windows_core::PWSTR, pkeylist: *mut Option) -> windows_core::Result<()>; + fn GetScope(&self, uindex: u32, puclassnamebufsize: *mut u32, pszclass: windows_core::PWSTR, pkeylist: windows_core::OutRef<'_, IWbemPathKeyList>) -> windows_core::Result<()>; fn GetScopeAsText(&self, uindex: u32, putextbufsize: *mut u32, psztext: windows_core::PWSTR) -> windows_core::Result<()>; fn RemoveScope(&self, uindex: u32) -> windows_core::Result<()>; fn RemoveAllScopes(&self) -> windows_core::Result<()>; @@ -6970,13 +6970,13 @@ pub struct IWbemProviderIdentity_Vtbl { pub SetRegistrationObject: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemProviderIdentity_Impl: windows_core::IUnknownImpl { - fn SetRegistrationObject(&self, lflags: i32, pprovreg: Option<&IWbemClassObject>) -> windows_core::Result<()>; + fn SetRegistrationObject(&self, lflags: i32, pprovreg: windows_core::Ref<'_, IWbemClassObject>) -> windows_core::Result<()>; } impl IWbemProviderIdentity_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRegistrationObject(this: *mut core::ffi::c_void, lflags: i32, pprovreg: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemProviderIdentity_Impl::SetRegistrationObject(this, core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pprovreg)).into() + IWbemProviderIdentity_Impl::SetRegistrationObject(this, core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pprovreg)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetRegistrationObject: SetRegistrationObject:: } } @@ -7006,13 +7006,13 @@ pub struct IWbemProviderInit_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, i32, windows_core::PCWSTR, windows_core::PCWSTR, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemProviderInit_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, wszuser: &windows_core::PCWSTR, lflags: i32, wsznamespace: &windows_core::PCWSTR, wszlocale: &windows_core::PCWSTR, pnamespace: Option<&IWbemServices>, pctx: Option<&IWbemContext>, pinitsink: Option<&IWbemProviderInitSink>) -> windows_core::Result<()>; + fn Initialize(&self, wszuser: &windows_core::PCWSTR, lflags: i32, wsznamespace: &windows_core::PCWSTR, wszlocale: &windows_core::PCWSTR, pnamespace: windows_core::Ref<'_, IWbemServices>, pctx: windows_core::Ref<'_, IWbemContext>, pinitsink: windows_core::Ref<'_, IWbemProviderInitSink>) -> windows_core::Result<()>; } impl IWbemProviderInit_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, wszuser: windows_core::PCWSTR, lflags: i32, wsznamespace: windows_core::PCWSTR, wszlocale: windows_core::PCWSTR, pnamespace: *mut core::ffi::c_void, pctx: *mut core::ffi::c_void, pinitsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemProviderInit_Impl::Initialize(this, core::mem::transmute(&wszuser), core::mem::transmute_copy(&lflags), core::mem::transmute(&wsznamespace), core::mem::transmute(&wszlocale), windows_core::from_raw_borrowed(&pnamespace), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&pinitsink)).into() + IWbemProviderInit_Impl::Initialize(this, core::mem::transmute(&wszuser), core::mem::transmute_copy(&lflags), core::mem::transmute(&wsznamespace), core::mem::transmute(&wszlocale), core::mem::transmute_copy(&pnamespace), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&pinitsink)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -7486,39 +7486,39 @@ pub struct IWbemServices_Vtbl { pub ExecMethodAsync: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, WBEM_GENERIC_FLAG_TYPE, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemServices_Impl: windows_core::IUnknownImpl { - fn OpenNamespace(&self, strnamespace: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, ppworkingnamespace: *mut Option, ppresult: *mut Option) -> windows_core::Result<()>; - fn CancelAsyncCall(&self, psink: Option<&IWbemObjectSink>) -> windows_core::Result<()>; + fn OpenNamespace(&self, strnamespace: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, ppworkingnamespace: windows_core::OutRef<'_, IWbemServices>, ppresult: windows_core::OutRef<'_, IWbemCallResult>) -> windows_core::Result<()>; + fn CancelAsyncCall(&self, psink: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; fn QueryObjectSink(&self, lflags: WBEM_GENERIC_FLAG_TYPE) -> windows_core::Result; - fn GetObject(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, ppobject: *mut Option, ppcallresult: *mut Option) -> windows_core::Result<()>; - fn GetObjectAsync(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn PutClass(&self, pobject: Option<&IWbemClassObject>, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, ppcallresult: *mut Option) -> windows_core::Result<()>; - fn PutClassAsync(&self, pobject: Option<&IWbemClassObject>, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn DeleteClass(&self, strclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, ppcallresult: *mut Option) -> windows_core::Result<()>; - fn DeleteClassAsync(&self, strclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn CreateClassEnum(&self, strsuperclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>) -> windows_core::Result; - fn CreateClassEnumAsync(&self, strsuperclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn PutInstance(&self, pinst: Option<&IWbemClassObject>, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, ppcallresult: *mut Option) -> windows_core::Result<()>; - fn PutInstanceAsync(&self, pinst: Option<&IWbemClassObject>, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn DeleteInstance(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, ppcallresult: *mut Option) -> windows_core::Result<()>; - fn DeleteInstanceAsync(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn CreateInstanceEnum(&self, strfilter: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>) -> windows_core::Result; - fn CreateInstanceEnumAsync(&self, strfilter: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn ExecQuery(&self, strquerylanguage: &windows_core::BSTR, strquery: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>) -> windows_core::Result; - fn ExecQueryAsync(&self, strquerylanguage: &windows_core::BSTR, strquery: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn ExecNotificationQuery(&self, strquerylanguage: &windows_core::BSTR, strquery: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>) -> windows_core::Result; - fn ExecNotificationQueryAsync(&self, strquerylanguage: &windows_core::BSTR, strquery: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; - fn ExecMethod(&self, strobjectpath: &windows_core::BSTR, strmethodname: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, pinparams: Option<&IWbemClassObject>, ppoutparams: *mut Option, ppcallresult: *mut Option) -> windows_core::Result<()>; - fn ExecMethodAsync(&self, strobjectpath: &windows_core::BSTR, strmethodname: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: Option<&IWbemContext>, pinparams: Option<&IWbemClassObject>, presponsehandler: Option<&IWbemObjectSink>) -> windows_core::Result<()>; + fn GetObject(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, ppobject: windows_core::OutRef<'_, IWbemClassObject>, ppcallresult: windows_core::OutRef<'_, IWbemCallResult>) -> windows_core::Result<()>; + fn GetObjectAsync(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn PutClass(&self, pobject: windows_core::Ref<'_, IWbemClassObject>, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, ppcallresult: windows_core::OutRef<'_, IWbemCallResult>) -> windows_core::Result<()>; + fn PutClassAsync(&self, pobject: windows_core::Ref<'_, IWbemClassObject>, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn DeleteClass(&self, strclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, ppcallresult: windows_core::OutRef<'_, IWbemCallResult>) -> windows_core::Result<()>; + fn DeleteClassAsync(&self, strclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn CreateClassEnum(&self, strsuperclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; + fn CreateClassEnumAsync(&self, strsuperclass: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn PutInstance(&self, pinst: windows_core::Ref<'_, IWbemClassObject>, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, ppcallresult: windows_core::OutRef<'_, IWbemCallResult>) -> windows_core::Result<()>; + fn PutInstanceAsync(&self, pinst: windows_core::Ref<'_, IWbemClassObject>, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn DeleteInstance(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, ppcallresult: windows_core::OutRef<'_, IWbemCallResult>) -> windows_core::Result<()>; + fn DeleteInstanceAsync(&self, strobjectpath: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn CreateInstanceEnum(&self, strfilter: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; + fn CreateInstanceEnumAsync(&self, strfilter: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn ExecQuery(&self, strquerylanguage: &windows_core::BSTR, strquery: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; + fn ExecQueryAsync(&self, strquerylanguage: &windows_core::BSTR, strquery: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn ExecNotificationQuery(&self, strquerylanguage: &windows_core::BSTR, strquery: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result; + fn ExecNotificationQueryAsync(&self, strquerylanguage: &windows_core::BSTR, strquery: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; + fn ExecMethod(&self, strobjectpath: &windows_core::BSTR, strmethodname: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, pinparams: windows_core::Ref<'_, IWbemClassObject>, ppoutparams: windows_core::OutRef<'_, IWbemClassObject>, ppcallresult: windows_core::OutRef<'_, IWbemCallResult>) -> windows_core::Result<()>; + fn ExecMethodAsync(&self, strobjectpath: &windows_core::BSTR, strmethodname: &windows_core::BSTR, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: windows_core::Ref<'_, IWbemContext>, pinparams: windows_core::Ref<'_, IWbemClassObject>, presponsehandler: windows_core::Ref<'_, IWbemObjectSink>) -> windows_core::Result<()>; } impl IWbemServices_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OpenNamespace(this: *mut core::ffi::c_void, strnamespace: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppworkingnamespace: *mut *mut core::ffi::c_void, ppresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::OpenNamespace(this, core::mem::transmute(&strnamespace), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), core::mem::transmute_copy(&ppworkingnamespace), core::mem::transmute_copy(&ppresult)).into() + IWbemServices_Impl::OpenNamespace(this, core::mem::transmute(&strnamespace), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&ppworkingnamespace), core::mem::transmute_copy(&ppresult)).into() } unsafe extern "system" fn CancelAsyncCall(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::CancelAsyncCall(this, windows_core::from_raw_borrowed(&psink)).into() + IWbemServices_Impl::CancelAsyncCall(this, core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn QueryObjectSink(this: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, ppresponsehandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7532,31 +7532,31 @@ impl IWbemServices_Vtbl { } unsafe extern "system" fn GetObject(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppobject: *mut *mut core::ffi::c_void, ppcallresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::GetObject(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), core::mem::transmute_copy(&ppobject), core::mem::transmute_copy(&ppcallresult)).into() + IWbemServices_Impl::GetObject(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&ppobject), core::mem::transmute_copy(&ppcallresult)).into() } unsafe extern "system" fn GetObjectAsync(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::GetObjectAsync(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::GetObjectAsync(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn PutClass(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppcallresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::PutClass(this, windows_core::from_raw_borrowed(&pobject), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), core::mem::transmute_copy(&ppcallresult)).into() + IWbemServices_Impl::PutClass(this, core::mem::transmute_copy(&pobject), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&ppcallresult)).into() } unsafe extern "system" fn PutClassAsync(this: *mut core::ffi::c_void, pobject: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::PutClassAsync(this, windows_core::from_raw_borrowed(&pobject), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::PutClassAsync(this, core::mem::transmute_copy(&pobject), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn DeleteClass(this: *mut core::ffi::c_void, strclass: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppcallresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::DeleteClass(this, core::mem::transmute(&strclass), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), core::mem::transmute_copy(&ppcallresult)).into() + IWbemServices_Impl::DeleteClass(this, core::mem::transmute(&strclass), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&ppcallresult)).into() } unsafe extern "system" fn DeleteClassAsync(this: *mut core::ffi::c_void, strclass: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::DeleteClassAsync(this, core::mem::transmute(&strclass), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::DeleteClassAsync(this, core::mem::transmute(&strclass), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn CreateClassEnum(this: *mut core::ffi::c_void, strsuperclass: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemServices_Impl::CreateClassEnum(this, core::mem::transmute(&strsuperclass), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx)) { + match IWbemServices_Impl::CreateClassEnum(this, core::mem::transmute(&strsuperclass), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { ppenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7566,27 +7566,27 @@ impl IWbemServices_Vtbl { } unsafe extern "system" fn CreateClassEnumAsync(this: *mut core::ffi::c_void, strsuperclass: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::CreateClassEnumAsync(this, core::mem::transmute(&strsuperclass), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::CreateClassEnumAsync(this, core::mem::transmute(&strsuperclass), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn PutInstance(this: *mut core::ffi::c_void, pinst: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppcallresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::PutInstance(this, windows_core::from_raw_borrowed(&pinst), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), core::mem::transmute_copy(&ppcallresult)).into() + IWbemServices_Impl::PutInstance(this, core::mem::transmute_copy(&pinst), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&ppcallresult)).into() } unsafe extern "system" fn PutInstanceAsync(this: *mut core::ffi::c_void, pinst: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::PutInstanceAsync(this, windows_core::from_raw_borrowed(&pinst), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::PutInstanceAsync(this, core::mem::transmute_copy(&pinst), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn DeleteInstance(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppcallresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::DeleteInstance(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), core::mem::transmute_copy(&ppcallresult)).into() + IWbemServices_Impl::DeleteInstance(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&ppcallresult)).into() } unsafe extern "system" fn DeleteInstanceAsync(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::DeleteInstanceAsync(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::DeleteInstanceAsync(this, core::mem::transmute(&strobjectpath), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn CreateInstanceEnum(this: *mut core::ffi::c_void, strfilter: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemServices_Impl::CreateInstanceEnum(this, core::mem::transmute(&strfilter), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx)) { + match IWbemServices_Impl::CreateInstanceEnum(this, core::mem::transmute(&strfilter), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { ppenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7596,11 +7596,11 @@ impl IWbemServices_Vtbl { } unsafe extern "system" fn CreateInstanceEnumAsync(this: *mut core::ffi::c_void, strfilter: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::CreateInstanceEnumAsync(this, core::mem::transmute(&strfilter), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::CreateInstanceEnumAsync(this, core::mem::transmute(&strfilter), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn ExecQuery(this: *mut core::ffi::c_void, strquerylanguage: *mut core::ffi::c_void, strquery: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemServices_Impl::ExecQuery(this, core::mem::transmute(&strquerylanguage), core::mem::transmute(&strquery), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx)) { + match IWbemServices_Impl::ExecQuery(this, core::mem::transmute(&strquerylanguage), core::mem::transmute(&strquery), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { ppenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7610,11 +7610,11 @@ impl IWbemServices_Vtbl { } unsafe extern "system" fn ExecQueryAsync(this: *mut core::ffi::c_void, strquerylanguage: *mut core::ffi::c_void, strquery: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::ExecQueryAsync(this, core::mem::transmute(&strquerylanguage), core::mem::transmute(&strquery), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::ExecQueryAsync(this, core::mem::transmute(&strquerylanguage), core::mem::transmute(&strquery), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn ExecNotificationQuery(this: *mut core::ffi::c_void, strquerylanguage: *mut core::ffi::c_void, strquery: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemServices_Impl::ExecNotificationQuery(this, core::mem::transmute(&strquerylanguage), core::mem::transmute(&strquery), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx)) { + match IWbemServices_Impl::ExecNotificationQuery(this, core::mem::transmute(&strquerylanguage), core::mem::transmute(&strquery), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx)) { Ok(ok__) => { ppenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7624,15 +7624,15 @@ impl IWbemServices_Vtbl { } unsafe extern "system" fn ExecNotificationQueryAsync(this: *mut core::ffi::c_void, strquerylanguage: *mut core::ffi::c_void, strquery: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::ExecNotificationQueryAsync(this, core::mem::transmute(&strquerylanguage), core::mem::transmute(&strquery), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::ExecNotificationQueryAsync(this, core::mem::transmute(&strquerylanguage), core::mem::transmute(&strquery), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&presponsehandler)).into() } unsafe extern "system" fn ExecMethod(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, strmethodname: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, pinparams: *mut core::ffi::c_void, ppoutparams: *mut *mut core::ffi::c_void, ppcallresult: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::ExecMethod(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strmethodname), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&pinparams), core::mem::transmute_copy(&ppoutparams), core::mem::transmute_copy(&ppcallresult)).into() + IWbemServices_Impl::ExecMethod(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strmethodname), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&pinparams), core::mem::transmute_copy(&ppoutparams), core::mem::transmute_copy(&ppcallresult)).into() } unsafe extern "system" fn ExecMethodAsync(this: *mut core::ffi::c_void, strobjectpath: *mut core::ffi::c_void, strmethodname: *mut core::ffi::c_void, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: *mut core::ffi::c_void, pinparams: *mut core::ffi::c_void, presponsehandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemServices_Impl::ExecMethodAsync(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strmethodname), core::mem::transmute_copy(&lflags), windows_core::from_raw_borrowed(&pctx), windows_core::from_raw_borrowed(&pinparams), windows_core::from_raw_borrowed(&presponsehandler)).into() + IWbemServices_Impl::ExecMethodAsync(this, core::mem::transmute(&strobjectpath), core::mem::transmute(&strmethodname), core::mem::transmute_copy(&lflags), core::mem::transmute_copy(&pctx), core::mem::transmute_copy(&pinparams), core::mem::transmute_copy(&presponsehandler)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7682,13 +7682,13 @@ pub struct IWbemShutdown_Vtbl { pub Shutdown: unsafe extern "system" fn(*mut core::ffi::c_void, i32, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemShutdown_Impl: windows_core::IUnknownImpl { - fn Shutdown(&self, ureason: i32, umaxmilliseconds: u32, pctx: Option<&IWbemContext>) -> windows_core::Result<()>; + fn Shutdown(&self, ureason: i32, umaxmilliseconds: u32, pctx: windows_core::Ref<'_, IWbemContext>) -> windows_core::Result<()>; } impl IWbemShutdown_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Shutdown(this: *mut core::ffi::c_void, ureason: i32, umaxmilliseconds: u32, pctx: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemShutdown_Impl::Shutdown(this, core::mem::transmute_copy(&ureason), core::mem::transmute_copy(&umaxmilliseconds), windows_core::from_raw_borrowed(&pctx)).into() + IWbemShutdown_Impl::Shutdown(this, core::mem::transmute_copy(&ureason), core::mem::transmute_copy(&umaxmilliseconds), core::mem::transmute_copy(&pctx)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Shutdown: Shutdown:: } } @@ -7796,13 +7796,13 @@ pub struct IWbemUnboundObjectSink_Vtbl { pub IndicateToConsumer: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i32, *const *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemUnboundObjectSink_Impl: windows_core::IUnknownImpl { - fn IndicateToConsumer(&self, plogicalconsumer: Option<&IWbemClassObject>, lnumobjects: i32, apobjects: *const Option) -> windows_core::Result<()>; + fn IndicateToConsumer(&self, plogicalconsumer: windows_core::Ref<'_, IWbemClassObject>, lnumobjects: i32, apobjects: *const Option) -> windows_core::Result<()>; } impl IWbemUnboundObjectSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IndicateToConsumer(this: *mut core::ffi::c_void, plogicalconsumer: *mut core::ffi::c_void, lnumobjects: i32, apobjects: *const *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IWbemUnboundObjectSink_Impl::IndicateToConsumer(this, windows_core::from_raw_borrowed(&plogicalconsumer), core::mem::transmute_copy(&lnumobjects), core::mem::transmute_copy(&apobjects)).into() + IWbemUnboundObjectSink_Impl::IndicateToConsumer(this, core::mem::transmute_copy(&plogicalconsumer), core::mem::transmute_copy(&lnumobjects), core::mem::transmute_copy(&apobjects)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), IndicateToConsumer: IndicateToConsumer:: } } @@ -7835,13 +7835,13 @@ pub struct IWbemUnsecuredApartment_Vtbl { pub CreateSinkStub: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, windows_core::PCWSTR, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IWbemUnsecuredApartment_Impl: IUnsecuredApartment_Impl { - fn CreateSinkStub(&self, psink: Option<&IWbemObjectSink>, dwflags: u32, wszreserved: &windows_core::PCWSTR) -> windows_core::Result; + fn CreateSinkStub(&self, psink: windows_core::Ref<'_, IWbemObjectSink>, dwflags: u32, wszreserved: &windows_core::PCWSTR) -> windows_core::Result; } impl IWbemUnsecuredApartment_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateSinkStub(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, dwflags: u32, wszreserved: windows_core::PCWSTR, ppstub: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IWbemUnsecuredApartment_Impl::CreateSinkStub(this, windows_core::from_raw_borrowed(&psink), core::mem::transmute_copy(&dwflags), core::mem::transmute(&wszreserved)) { + match IWbemUnsecuredApartment_Impl::CreateSinkStub(this, core::mem::transmute_copy(&psink), core::mem::transmute_copy(&dwflags), core::mem::transmute(&wszreserved)) { Ok(ok__) => { ppstub.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs index 6185dc3d0e..b26da5a057 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs @@ -1462,17 +1462,17 @@ pub struct IAccPropServices_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IAccPropServices_Impl: windows_core::IUnknownImpl { fn SetPropValue(&self, pidstring: *const u8, dwidstringlen: u32, idprop: &windows_core::GUID, var: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; - fn SetPropServer(&self, pidstring: *const u8, dwidstringlen: u32, paprops: *const windows_core::GUID, cprops: i32, pserver: Option<&IAccPropServer>, annoscope: AnnoScope) -> windows_core::Result<()>; + fn SetPropServer(&self, pidstring: *const u8, dwidstringlen: u32, paprops: *const windows_core::GUID, cprops: i32, pserver: windows_core::Ref<'_, IAccPropServer>, annoscope: AnnoScope) -> windows_core::Result<()>; fn ClearProps(&self, pidstring: *const u8, dwidstringlen: u32, paprops: *const windows_core::GUID, cprops: i32) -> windows_core::Result<()>; fn SetHwndProp(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, idprop: &windows_core::GUID, var: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn SetHwndPropStr(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, idprop: &windows_core::GUID, str: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetHwndPropServer(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, paprops: *const windows_core::GUID, cprops: i32, pserver: Option<&IAccPropServer>, annoscope: AnnoScope) -> windows_core::Result<()>; + fn SetHwndPropServer(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, paprops: *const windows_core::GUID, cprops: i32, pserver: windows_core::Ref<'_, IAccPropServer>, annoscope: AnnoScope) -> windows_core::Result<()>; fn ClearHwndProps(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, paprops: *const windows_core::GUID, cprops: i32) -> windows_core::Result<()>; fn ComposeHwndIdentityString(&self, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, ppidstring: *mut *mut u8, pdwidstringlen: *mut u32) -> windows_core::Result<()>; fn DecomposeHwndIdentityString(&self, pidstring: *const u8, dwidstringlen: u32, phwnd: *mut super::super::Foundation::HWND, pidobject: *mut u32, pidchild: *mut u32) -> windows_core::Result<()>; fn SetHmenuProp(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, idprop: &windows_core::GUID, var: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn SetHmenuPropStr(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, idprop: &windows_core::GUID, str: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetHmenuPropServer(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, paprops: *const windows_core::GUID, cprops: i32, pserver: Option<&IAccPropServer>, annoscope: AnnoScope) -> windows_core::Result<()>; + fn SetHmenuPropServer(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, paprops: *const windows_core::GUID, cprops: i32, pserver: windows_core::Ref<'_, IAccPropServer>, annoscope: AnnoScope) -> windows_core::Result<()>; fn ClearHmenuProps(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, paprops: *const windows_core::GUID, cprops: i32) -> windows_core::Result<()>; fn ComposeHmenuIdentityString(&self, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, ppidstring: *mut *mut u8, pdwidstringlen: *mut u32) -> windows_core::Result<()>; fn DecomposeHmenuIdentityString(&self, pidstring: *const u8, dwidstringlen: u32, phmenu: *mut super::WindowsAndMessaging::HMENU, pidchild: *mut u32) -> windows_core::Result<()>; @@ -1486,7 +1486,7 @@ impl IAccPropServices_Vtbl { } unsafe extern "system" fn SetPropServer(this: *mut core::ffi::c_void, pidstring: *const u8, dwidstringlen: u32, paprops: *const windows_core::GUID, cprops: i32, pserver: *mut core::ffi::c_void, annoscope: AnnoScope) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccPropServices_Impl::SetPropServer(this, core::mem::transmute_copy(&pidstring), core::mem::transmute_copy(&dwidstringlen), core::mem::transmute_copy(&paprops), core::mem::transmute_copy(&cprops), windows_core::from_raw_borrowed(&pserver), core::mem::transmute_copy(&annoscope)).into() + IAccPropServices_Impl::SetPropServer(this, core::mem::transmute_copy(&pidstring), core::mem::transmute_copy(&dwidstringlen), core::mem::transmute_copy(&paprops), core::mem::transmute_copy(&cprops), core::mem::transmute_copy(&pserver), core::mem::transmute_copy(&annoscope)).into() } unsafe extern "system" fn ClearProps(this: *mut core::ffi::c_void, pidstring: *const u8, dwidstringlen: u32, paprops: *const windows_core::GUID, cprops: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1502,7 +1502,7 @@ impl IAccPropServices_Vtbl { } unsafe extern "system" fn SetHwndPropServer(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, paprops: *const windows_core::GUID, cprops: i32, pserver: *mut core::ffi::c_void, annoscope: AnnoScope) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccPropServices_Impl::SetHwndPropServer(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&idobject), core::mem::transmute_copy(&idchild), core::mem::transmute_copy(&paprops), core::mem::transmute_copy(&cprops), windows_core::from_raw_borrowed(&pserver), core::mem::transmute_copy(&annoscope)).into() + IAccPropServices_Impl::SetHwndPropServer(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&idobject), core::mem::transmute_copy(&idchild), core::mem::transmute_copy(&paprops), core::mem::transmute_copy(&cprops), core::mem::transmute_copy(&pserver), core::mem::transmute_copy(&annoscope)).into() } unsafe extern "system" fn ClearHwndProps(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, idobject: u32, idchild: u32, paprops: *const windows_core::GUID, cprops: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1526,7 +1526,7 @@ impl IAccPropServices_Vtbl { } unsafe extern "system" fn SetHmenuPropServer(this: *mut core::ffi::c_void, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, paprops: *const windows_core::GUID, cprops: i32, pserver: *mut core::ffi::c_void, annoscope: AnnoScope) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccPropServices_Impl::SetHmenuPropServer(this, core::mem::transmute_copy(&hmenu), core::mem::transmute_copy(&idchild), core::mem::transmute_copy(&paprops), core::mem::transmute_copy(&cprops), windows_core::from_raw_borrowed(&pserver), core::mem::transmute_copy(&annoscope)).into() + IAccPropServices_Impl::SetHmenuPropServer(this, core::mem::transmute_copy(&hmenu), core::mem::transmute_copy(&idchild), core::mem::transmute_copy(&paprops), core::mem::transmute_copy(&cprops), core::mem::transmute_copy(&pserver), core::mem::transmute_copy(&annoscope)).into() } unsafe extern "system" fn ClearHmenuProps(this: *mut core::ffi::c_void, hmenu: super::WindowsAndMessaging::HMENU, idchild: u32, paprops: *const windows_core::GUID, cprops: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2039,9 +2039,9 @@ pub struct IAccessibleEx_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IAccessibleEx_Impl: windows_core::IUnknownImpl { fn GetObjectForChild(&self, idchild: i32) -> windows_core::Result; - fn GetIAccessiblePair(&self, ppacc: *mut Option, pidchild: *mut i32) -> windows_core::Result<()>; + fn GetIAccessiblePair(&self, ppacc: windows_core::OutRef<'_, IAccessible>, pidchild: *mut i32) -> windows_core::Result<()>; fn GetRuntimeId(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; - fn ConvertReturnedElement(&self, pin: Option<&IRawElementProviderSimple>) -> windows_core::Result; + fn ConvertReturnedElement(&self, pin: windows_core::Ref<'_, IRawElementProviderSimple>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAccessibleEx_Vtbl { @@ -2072,7 +2072,7 @@ impl IAccessibleEx_Vtbl { } unsafe extern "system" fn ConvertReturnedElement(this: *mut core::ffi::c_void, pin: *mut core::ffi::c_void, ppretvalout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAccessibleEx_Impl::ConvertReturnedElement(this, windows_core::from_raw_borrowed(&pin)) { + match IAccessibleEx_Impl::ConvertReturnedElement(this, core::mem::transmute_copy(&pin)) { Ok(ok__) => { ppretvalout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2164,7 +2164,7 @@ pub struct IAccessibleHostingElementProviders_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IAccessibleHostingElementProviders_Impl: windows_core::IUnknownImpl { fn GetEmbeddedFragmentRoots(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; - fn GetObjectIdForProvider(&self, pprovider: Option<&IRawElementProviderSimple>) -> windows_core::Result; + fn GetObjectIdForProvider(&self, pprovider: windows_core::Ref<'_, IRawElementProviderSimple>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAccessibleHostingElementProviders_Vtbl { @@ -2181,7 +2181,7 @@ impl IAccessibleHostingElementProviders_Vtbl { } unsafe extern "system" fn GetObjectIdForProvider(this: *mut core::ffi::c_void, pprovider: *mut core::ffi::c_void, pidobject: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAccessibleHostingElementProviders_Impl::GetObjectIdForProvider(this, windows_core::from_raw_borrowed(&pprovider)) { + match IAccessibleHostingElementProviders_Impl::GetObjectIdForProvider(this, core::mem::transmute_copy(&pprovider)) { Ok(ok__) => { pidobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2247,9 +2247,9 @@ pub struct IAccessibleWindowlessSite_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAccessibleWindowlessSite_Impl: windows_core::IUnknownImpl { - fn AcquireObjectIdRange(&self, rangesize: i32, prangeowner: Option<&IAccessibleHandler>) -> windows_core::Result; - fn ReleaseObjectIdRange(&self, rangebase: i32, prangeowner: Option<&IAccessibleHandler>) -> windows_core::Result<()>; - fn QueryObjectIdRanges(&self, prangesowner: Option<&IAccessibleHandler>) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; + fn AcquireObjectIdRange(&self, rangesize: i32, prangeowner: windows_core::Ref<'_, IAccessibleHandler>) -> windows_core::Result; + fn ReleaseObjectIdRange(&self, rangebase: i32, prangeowner: windows_core::Ref<'_, IAccessibleHandler>) -> windows_core::Result<()>; + fn QueryObjectIdRanges(&self, prangesowner: windows_core::Ref<'_, IAccessibleHandler>) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; fn GetParentAccessible(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -2257,7 +2257,7 @@ impl IAccessibleWindowlessSite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AcquireObjectIdRange(this: *mut core::ffi::c_void, rangesize: i32, prangeowner: *mut core::ffi::c_void, prangebase: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAccessibleWindowlessSite_Impl::AcquireObjectIdRange(this, core::mem::transmute_copy(&rangesize), windows_core::from_raw_borrowed(&prangeowner)) { + match IAccessibleWindowlessSite_Impl::AcquireObjectIdRange(this, core::mem::transmute_copy(&rangesize), core::mem::transmute_copy(&prangeowner)) { Ok(ok__) => { prangebase.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2267,11 +2267,11 @@ impl IAccessibleWindowlessSite_Vtbl { } unsafe extern "system" fn ReleaseObjectIdRange(this: *mut core::ffi::c_void, rangebase: i32, prangeowner: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccessibleWindowlessSite_Impl::ReleaseObjectIdRange(this, core::mem::transmute_copy(&rangebase), windows_core::from_raw_borrowed(&prangeowner)).into() + IAccessibleWindowlessSite_Impl::ReleaseObjectIdRange(this, core::mem::transmute_copy(&rangebase), core::mem::transmute_copy(&prangeowner)).into() } unsafe extern "system" fn QueryObjectIdRanges(this: *mut core::ffi::c_void, prangesowner: *mut core::ffi::c_void, psaranges: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAccessibleWindowlessSite_Impl::QueryObjectIdRanges(this, windows_core::from_raw_borrowed(&prangesowner)) { + match IAccessibleWindowlessSite_Impl::QueryObjectIdRanges(this, core::mem::transmute_copy(&prangesowner)) { Ok(ok__) => { psaranges.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2942,14 +2942,14 @@ pub struct IItemContainerProvider_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IItemContainerProvider_Impl: windows_core::IUnknownImpl { - fn FindItemByProperty(&self, pstartafter: Option<&IRawElementProviderSimple>, propertyid: UIA_PROPERTY_ID, value: &super::super::System::Variant::VARIANT) -> windows_core::Result; + fn FindItemByProperty(&self, pstartafter: windows_core::Ref<'_, IRawElementProviderSimple>, propertyid: UIA_PROPERTY_ID, value: &super::super::System::Variant::VARIANT) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IItemContainerProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FindItemByProperty(this: *mut core::ffi::c_void, pstartafter: *mut core::ffi::c_void, propertyid: UIA_PROPERTY_ID, value: super::super::System::Variant::VARIANT, pfound: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IItemContainerProvider_Impl::FindItemByProperty(this, windows_core::from_raw_borrowed(&pstartafter), core::mem::transmute_copy(&propertyid), core::mem::transmute(&value)) { + match IItemContainerProvider_Impl::FindItemByProperty(this, core::mem::transmute_copy(&pstartafter), core::mem::transmute_copy(&propertyid), core::mem::transmute(&value)) { Ok(ok__) => { pfound.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3357,13 +3357,13 @@ pub struct IProxyProviderWinEventHandler_Vtbl { pub RespondToWinEvent: unsafe extern "system" fn(*mut core::ffi::c_void, u32, super::super::Foundation::HWND, i32, i32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IProxyProviderWinEventHandler_Impl: windows_core::IUnknownImpl { - fn RespondToWinEvent(&self, idwinevent: u32, hwnd: super::super::Foundation::HWND, idobject: i32, idchild: i32, psink: Option<&IProxyProviderWinEventSink>) -> windows_core::Result<()>; + fn RespondToWinEvent(&self, idwinevent: u32, hwnd: super::super::Foundation::HWND, idobject: i32, idchild: i32, psink: windows_core::Ref<'_, IProxyProviderWinEventSink>) -> windows_core::Result<()>; } impl IProxyProviderWinEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RespondToWinEvent(this: *mut core::ffi::c_void, idwinevent: u32, hwnd: super::super::Foundation::HWND, idobject: i32, idchild: i32, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProxyProviderWinEventHandler_Impl::RespondToWinEvent(this, core::mem::transmute_copy(&idwinevent), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&idobject), core::mem::transmute_copy(&idchild), windows_core::from_raw_borrowed(&psink)).into() + IProxyProviderWinEventHandler_Impl::RespondToWinEvent(this, core::mem::transmute_copy(&idwinevent), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&idobject), core::mem::transmute_copy(&idchild), core::mem::transmute_copy(&psink)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), RespondToWinEvent: RespondToWinEvent:: } } @@ -3411,24 +3411,24 @@ pub struct IProxyProviderWinEventSink_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IProxyProviderWinEventSink_Impl: windows_core::IUnknownImpl { - fn AddAutomationPropertyChangedEvent(&self, pprovider: Option<&IRawElementProviderSimple>, id: UIA_PROPERTY_ID, newvalue: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; - fn AddAutomationEvent(&self, pprovider: Option<&IRawElementProviderSimple>, id: UIA_EVENT_ID) -> windows_core::Result<()>; - fn AddStructureChangedEvent(&self, pprovider: Option<&IRawElementProviderSimple>, structurechangetype: StructureChangeType, runtimeid: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn AddAutomationPropertyChangedEvent(&self, pprovider: windows_core::Ref<'_, IRawElementProviderSimple>, id: UIA_PROPERTY_ID, newvalue: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; + fn AddAutomationEvent(&self, pprovider: windows_core::Ref<'_, IRawElementProviderSimple>, id: UIA_EVENT_ID) -> windows_core::Result<()>; + fn AddStructureChangedEvent(&self, pprovider: windows_core::Ref<'_, IRawElementProviderSimple>, structurechangetype: StructureChangeType, runtimeid: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IProxyProviderWinEventSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddAutomationPropertyChangedEvent(this: *mut core::ffi::c_void, pprovider: *mut core::ffi::c_void, id: UIA_PROPERTY_ID, newvalue: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProxyProviderWinEventSink_Impl::AddAutomationPropertyChangedEvent(this, windows_core::from_raw_borrowed(&pprovider), core::mem::transmute_copy(&id), core::mem::transmute(&newvalue)).into() + IProxyProviderWinEventSink_Impl::AddAutomationPropertyChangedEvent(this, core::mem::transmute_copy(&pprovider), core::mem::transmute_copy(&id), core::mem::transmute(&newvalue)).into() } unsafe extern "system" fn AddAutomationEvent(this: *mut core::ffi::c_void, pprovider: *mut core::ffi::c_void, id: UIA_EVENT_ID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProxyProviderWinEventSink_Impl::AddAutomationEvent(this, windows_core::from_raw_borrowed(&pprovider), core::mem::transmute_copy(&id)).into() + IProxyProviderWinEventSink_Impl::AddAutomationEvent(this, core::mem::transmute_copy(&pprovider), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn AddStructureChangedEvent(this: *mut core::ffi::c_void, pprovider: *mut core::ffi::c_void, structurechangetype: StructureChangeType, runtimeid: *const super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProxyProviderWinEventSink_Impl::AddStructureChangedEvent(this, windows_core::from_raw_borrowed(&pprovider), core::mem::transmute_copy(&structurechangetype), core::mem::transmute_copy(&runtimeid)).into() + IProxyProviderWinEventSink_Impl::AddStructureChangedEvent(this, core::mem::transmute_copy(&pprovider), core::mem::transmute_copy(&structurechangetype), core::mem::transmute_copy(&runtimeid)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -4188,13 +4188,13 @@ pub struct IRicheditWindowlessAccessibility_Vtbl { pub CreateProvider: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IRicheditWindowlessAccessibility_Impl: windows_core::IUnknownImpl { - fn CreateProvider(&self, psite: Option<&IRawElementProviderWindowlessSite>) -> windows_core::Result; + fn CreateProvider(&self, psite: windows_core::Ref<'_, IRawElementProviderWindowlessSite>) -> windows_core::Result; } impl IRicheditWindowlessAccessibility_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateProvider(this: *mut core::ffi::c_void, psite: *mut core::ffi::c_void, ppprovider: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRicheditWindowlessAccessibility_Impl::CreateProvider(this, windows_core::from_raw_borrowed(&psite)) { + match IRicheditWindowlessAccessibility_Impl::CreateProvider(this, core::mem::transmute_copy(&psite)) { Ok(ok__) => { ppprovider.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5265,7 +5265,7 @@ pub struct ITextProvider_Vtbl { pub trait ITextProvider_Impl: windows_core::IUnknownImpl { fn GetSelection(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; fn GetVisibleRanges(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; - fn RangeFromChild(&self, childelement: Option<&IRawElementProviderSimple>) -> windows_core::Result; + fn RangeFromChild(&self, childelement: windows_core::Ref<'_, IRawElementProviderSimple>) -> windows_core::Result; fn RangeFromPoint(&self, point: &UiaPoint) -> windows_core::Result; fn DocumentRange(&self) -> windows_core::Result; fn SupportedTextSelection(&self) -> windows_core::Result; @@ -5295,7 +5295,7 @@ impl ITextProvider_Vtbl { } unsafe extern "system" fn RangeFromChild(this: *mut core::ffi::c_void, childelement: *mut core::ffi::c_void, pretval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextProvider_Impl::RangeFromChild(this, windows_core::from_raw_borrowed(&childelement)) { + match ITextProvider_Impl::RangeFromChild(this, core::mem::transmute_copy(&childelement)) { Ok(ok__) => { pretval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5378,7 +5378,7 @@ pub struct ITextProvider2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITextProvider2_Impl: ITextProvider_Impl { - fn RangeFromAnnotation(&self, annotationelement: Option<&IRawElementProviderSimple>) -> windows_core::Result; + fn RangeFromAnnotation(&self, annotationelement: windows_core::Ref<'_, IRawElementProviderSimple>) -> windows_core::Result; fn GetCaretRange(&self, isactive: *mut super::super::Foundation::BOOL) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -5386,7 +5386,7 @@ impl ITextProvider2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RangeFromAnnotation(this: *mut core::ffi::c_void, annotationelement: *mut core::ffi::c_void, pretval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextProvider2_Impl::RangeFromAnnotation(this, windows_core::from_raw_borrowed(&annotationelement)) { + match ITextProvider2_Impl::RangeFromAnnotation(this, core::mem::transmute_copy(&annotationelement)) { Ok(ok__) => { pretval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5536,8 +5536,8 @@ pub struct ITextRangeProvider_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITextRangeProvider_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Compare(&self, range: Option<&ITextRangeProvider>) -> windows_core::Result; - fn CompareEndpoints(&self, endpoint: TextPatternRangeEndpoint, targetrange: Option<&ITextRangeProvider>, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result; + fn Compare(&self, range: windows_core::Ref<'_, ITextRangeProvider>) -> windows_core::Result; + fn CompareEndpoints(&self, endpoint: TextPatternRangeEndpoint, targetrange: windows_core::Ref<'_, ITextRangeProvider>, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result; fn ExpandToEnclosingUnit(&self, unit: TextUnit) -> windows_core::Result<()>; fn FindAttribute(&self, attributeid: UIA_TEXTATTRIBUTE_ID, val: &super::super::System::Variant::VARIANT, backward: super::super::Foundation::BOOL) -> windows_core::Result; fn FindText(&self, text: &windows_core::BSTR, backward: super::super::Foundation::BOOL, ignorecase: super::super::Foundation::BOOL) -> windows_core::Result; @@ -5547,7 +5547,7 @@ pub trait ITextRangeProvider_Impl: windows_core::IUnknownImpl { fn GetText(&self, maxlength: i32) -> windows_core::Result; fn Move(&self, unit: TextUnit, count: i32) -> windows_core::Result; fn MoveEndpointByUnit(&self, endpoint: TextPatternRangeEndpoint, unit: TextUnit, count: i32) -> windows_core::Result; - fn MoveEndpointByRange(&self, endpoint: TextPatternRangeEndpoint, targetrange: Option<&ITextRangeProvider>, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result<()>; + fn MoveEndpointByRange(&self, endpoint: TextPatternRangeEndpoint, targetrange: windows_core::Ref<'_, ITextRangeProvider>, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result<()>; fn Select(&self) -> windows_core::Result<()>; fn AddToSelection(&self) -> windows_core::Result<()>; fn RemoveFromSelection(&self) -> windows_core::Result<()>; @@ -5569,7 +5569,7 @@ impl ITextRangeProvider_Vtbl { } unsafe extern "system" fn Compare(this: *mut core::ffi::c_void, range: *mut core::ffi::c_void, pretval: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRangeProvider_Impl::Compare(this, windows_core::from_raw_borrowed(&range)) { + match ITextRangeProvider_Impl::Compare(this, core::mem::transmute_copy(&range)) { Ok(ok__) => { pretval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5579,7 +5579,7 @@ impl ITextRangeProvider_Vtbl { } unsafe extern "system" fn CompareEndpoints(this: *mut core::ffi::c_void, endpoint: TextPatternRangeEndpoint, targetrange: *mut core::ffi::c_void, targetendpoint: TextPatternRangeEndpoint, pretval: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRangeProvider_Impl::CompareEndpoints(this, core::mem::transmute_copy(&endpoint), windows_core::from_raw_borrowed(&targetrange), core::mem::transmute_copy(&targetendpoint)) { + match ITextRangeProvider_Impl::CompareEndpoints(this, core::mem::transmute_copy(&endpoint), core::mem::transmute_copy(&targetrange), core::mem::transmute_copy(&targetendpoint)) { Ok(ok__) => { pretval.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5673,7 +5673,7 @@ impl ITextRangeProvider_Vtbl { } unsafe extern "system" fn MoveEndpointByRange(this: *mut core::ffi::c_void, endpoint: TextPatternRangeEndpoint, targetrange: *mut core::ffi::c_void, targetendpoint: TextPatternRangeEndpoint) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRangeProvider_Impl::MoveEndpointByRange(this, core::mem::transmute_copy(&endpoint), windows_core::from_raw_borrowed(&targetrange), core::mem::transmute_copy(&targetendpoint)).into() + ITextRangeProvider_Impl::MoveEndpointByRange(this, core::mem::transmute_copy(&endpoint), core::mem::transmute_copy(&targetrange), core::mem::transmute_copy(&targetendpoint)).into() } unsafe extern "system" fn Select(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6449,17 +6449,17 @@ pub struct IUIAutomation_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomation_Impl: windows_core::IUnknownImpl { - fn CompareElements(&self, el1: Option<&IUIAutomationElement>, el2: Option<&IUIAutomationElement>) -> windows_core::Result; + fn CompareElements(&self, el1: windows_core::Ref<'_, IUIAutomationElement>, el2: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; fn CompareRuntimeIds(&self, runtimeid1: *const super::super::System::Com::SAFEARRAY, runtimeid2: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result; fn GetRootElement(&self) -> windows_core::Result; fn ElementFromHandle(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result; fn ElementFromPoint(&self, pt: &super::super::Foundation::POINT) -> windows_core::Result; fn GetFocusedElement(&self) -> windows_core::Result; - fn GetRootElementBuildCache(&self, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn ElementFromHandleBuildCache(&self, hwnd: super::super::Foundation::HWND, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn ElementFromPointBuildCache(&self, pt: &super::super::Foundation::POINT, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn GetFocusedElementBuildCache(&self, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn CreateTreeWalker(&self, pcondition: Option<&IUIAutomationCondition>) -> windows_core::Result; + fn GetRootElementBuildCache(&self, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn ElementFromHandleBuildCache(&self, hwnd: super::super::Foundation::HWND, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn ElementFromPointBuildCache(&self, pt: &super::super::Foundation::POINT, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn GetFocusedElementBuildCache(&self, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn CreateTreeWalker(&self, pcondition: windows_core::Ref<'_, IUIAutomationCondition>) -> windows_core::Result; fn ControlViewWalker(&self) -> windows_core::Result; fn ContentViewWalker(&self) -> windows_core::Result; fn RawViewWalker(&self) -> windows_core::Result; @@ -6471,46 +6471,46 @@ pub trait IUIAutomation_Impl: windows_core::IUnknownImpl { fn CreateFalseCondition(&self) -> windows_core::Result; fn CreatePropertyCondition(&self, propertyid: UIA_PROPERTY_ID, value: &super::super::System::Variant::VARIANT) -> windows_core::Result; fn CreatePropertyConditionEx(&self, propertyid: UIA_PROPERTY_ID, value: &super::super::System::Variant::VARIANT, flags: PropertyConditionFlags) -> windows_core::Result; - fn CreateAndCondition(&self, condition1: Option<&IUIAutomationCondition>, condition2: Option<&IUIAutomationCondition>) -> windows_core::Result; + fn CreateAndCondition(&self, condition1: windows_core::Ref<'_, IUIAutomationCondition>, condition2: windows_core::Ref<'_, IUIAutomationCondition>) -> windows_core::Result; fn CreateAndConditionFromArray(&self, conditions: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result; fn CreateAndConditionFromNativeArray(&self, conditions: *const Option, conditioncount: i32) -> windows_core::Result; - fn CreateOrCondition(&self, condition1: Option<&IUIAutomationCondition>, condition2: Option<&IUIAutomationCondition>) -> windows_core::Result; + fn CreateOrCondition(&self, condition1: windows_core::Ref<'_, IUIAutomationCondition>, condition2: windows_core::Ref<'_, IUIAutomationCondition>) -> windows_core::Result; fn CreateOrConditionFromArray(&self, conditions: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result; fn CreateOrConditionFromNativeArray(&self, conditions: *const Option, conditioncount: i32) -> windows_core::Result; - fn CreateNotCondition(&self, condition: Option<&IUIAutomationCondition>) -> windows_core::Result; - fn AddAutomationEventHandler(&self, eventid: UIA_EVENT_ID, element: Option<&IUIAutomationElement>, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationEventHandler>) -> windows_core::Result<()>; - fn RemoveAutomationEventHandler(&self, eventid: UIA_EVENT_ID, element: Option<&IUIAutomationElement>, handler: Option<&IUIAutomationEventHandler>) -> windows_core::Result<()>; - fn AddPropertyChangedEventHandlerNativeArray(&self, element: Option<&IUIAutomationElement>, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationPropertyChangedEventHandler>, propertyarray: *const UIA_PROPERTY_ID, propertycount: i32) -> windows_core::Result<()>; - fn AddPropertyChangedEventHandler(&self, element: Option<&IUIAutomationElement>, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationPropertyChangedEventHandler>, propertyarray: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; - fn RemovePropertyChangedEventHandler(&self, element: Option<&IUIAutomationElement>, handler: Option<&IUIAutomationPropertyChangedEventHandler>) -> windows_core::Result<()>; - fn AddStructureChangedEventHandler(&self, element: Option<&IUIAutomationElement>, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationStructureChangedEventHandler>) -> windows_core::Result<()>; - fn RemoveStructureChangedEventHandler(&self, element: Option<&IUIAutomationElement>, handler: Option<&IUIAutomationStructureChangedEventHandler>) -> windows_core::Result<()>; - fn AddFocusChangedEventHandler(&self, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationFocusChangedEventHandler>) -> windows_core::Result<()>; - fn RemoveFocusChangedEventHandler(&self, handler: Option<&IUIAutomationFocusChangedEventHandler>) -> windows_core::Result<()>; + fn CreateNotCondition(&self, condition: windows_core::Ref<'_, IUIAutomationCondition>) -> windows_core::Result; + fn AddAutomationEventHandler(&self, eventid: UIA_EVENT_ID, element: windows_core::Ref<'_, IUIAutomationElement>, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationEventHandler>) -> windows_core::Result<()>; + fn RemoveAutomationEventHandler(&self, eventid: UIA_EVENT_ID, element: windows_core::Ref<'_, IUIAutomationElement>, handler: windows_core::Ref<'_, IUIAutomationEventHandler>) -> windows_core::Result<()>; + fn AddPropertyChangedEventHandlerNativeArray(&self, element: windows_core::Ref<'_, IUIAutomationElement>, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationPropertyChangedEventHandler>, propertyarray: *const UIA_PROPERTY_ID, propertycount: i32) -> windows_core::Result<()>; + fn AddPropertyChangedEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationPropertyChangedEventHandler>, propertyarray: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn RemovePropertyChangedEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, handler: windows_core::Ref<'_, IUIAutomationPropertyChangedEventHandler>) -> windows_core::Result<()>; + fn AddStructureChangedEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationStructureChangedEventHandler>) -> windows_core::Result<()>; + fn RemoveStructureChangedEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, handler: windows_core::Ref<'_, IUIAutomationStructureChangedEventHandler>) -> windows_core::Result<()>; + fn AddFocusChangedEventHandler(&self, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationFocusChangedEventHandler>) -> windows_core::Result<()>; + fn RemoveFocusChangedEventHandler(&self, handler: windows_core::Ref<'_, IUIAutomationFocusChangedEventHandler>) -> windows_core::Result<()>; fn RemoveAllEventHandlers(&self) -> windows_core::Result<()>; fn IntNativeArrayToSafeArray(&self, array: *const i32, arraycount: i32) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; fn IntSafeArrayToNativeArray(&self, intarray: *const super::super::System::Com::SAFEARRAY, array: *mut *mut i32) -> windows_core::Result; fn RectToVariant(&self, rc: &super::super::Foundation::RECT) -> windows_core::Result; fn VariantToRect(&self, var: &super::super::System::Variant::VARIANT) -> windows_core::Result; fn SafeArrayToRectNativeArray(&self, rects: *const super::super::System::Com::SAFEARRAY, rectarray: *mut *mut super::super::Foundation::RECT) -> windows_core::Result; - fn CreateProxyFactoryEntry(&self, factory: Option<&IUIAutomationProxyFactory>) -> windows_core::Result; + fn CreateProxyFactoryEntry(&self, factory: windows_core::Ref<'_, IUIAutomationProxyFactory>) -> windows_core::Result; fn ProxyFactoryMapping(&self) -> windows_core::Result; fn GetPropertyProgrammaticName(&self, property: UIA_PROPERTY_ID) -> windows_core::Result; fn GetPatternProgrammaticName(&self, pattern: UIA_PATTERN_ID) -> windows_core::Result; - fn PollForPotentialSupportedPatterns(&self, pelement: Option<&IUIAutomationElement>, patternids: *mut *mut super::super::System::Com::SAFEARRAY, patternnames: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; - fn PollForPotentialSupportedProperties(&self, pelement: Option<&IUIAutomationElement>, propertyids: *mut *mut super::super::System::Com::SAFEARRAY, propertynames: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn PollForPotentialSupportedPatterns(&self, pelement: windows_core::Ref<'_, IUIAutomationElement>, patternids: *mut *mut super::super::System::Com::SAFEARRAY, patternnames: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn PollForPotentialSupportedProperties(&self, pelement: windows_core::Ref<'_, IUIAutomationElement>, propertyids: *mut *mut super::super::System::Com::SAFEARRAY, propertynames: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; fn CheckNotSupported(&self, value: &super::super::System::Variant::VARIANT) -> windows_core::Result; fn ReservedNotSupportedValue(&self) -> windows_core::Result; fn ReservedMixedAttributeValue(&self) -> windows_core::Result; - fn ElementFromIAccessible(&self, accessible: Option<&IAccessible>, childid: i32) -> windows_core::Result; - fn ElementFromIAccessibleBuildCache(&self, accessible: Option<&IAccessible>, childid: i32, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; + fn ElementFromIAccessible(&self, accessible: windows_core::Ref<'_, IAccessible>, childid: i32) -> windows_core::Result; + fn ElementFromIAccessibleBuildCache(&self, accessible: windows_core::Ref<'_, IAccessible>, childid: i32, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUIAutomation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CompareElements(this: *mut core::ffi::c_void, el1: *mut core::ffi::c_void, el2: *mut core::ffi::c_void, aresame: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::CompareElements(this, windows_core::from_raw_borrowed(&el1), windows_core::from_raw_borrowed(&el2)) { + match IUIAutomation_Impl::CompareElements(this, core::mem::transmute_copy(&el1), core::mem::transmute_copy(&el2)) { Ok(ok__) => { aresame.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6570,7 +6570,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn GetRootElementBuildCache(this: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, root: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::GetRootElementBuildCache(this, windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomation_Impl::GetRootElementBuildCache(this, core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { root.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6580,7 +6580,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn ElementFromHandleBuildCache(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, cacherequest: *mut core::ffi::c_void, element: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::ElementFromHandleBuildCache(this, core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomation_Impl::ElementFromHandleBuildCache(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { element.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6590,7 +6590,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn ElementFromPointBuildCache(this: *mut core::ffi::c_void, pt: super::super::Foundation::POINT, cacherequest: *mut core::ffi::c_void, element: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::ElementFromPointBuildCache(this, core::mem::transmute(&pt), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomation_Impl::ElementFromPointBuildCache(this, core::mem::transmute(&pt), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { element.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6600,7 +6600,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn GetFocusedElementBuildCache(this: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, element: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::GetFocusedElementBuildCache(this, windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomation_Impl::GetFocusedElementBuildCache(this, core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { element.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6610,7 +6610,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn CreateTreeWalker(this: *mut core::ffi::c_void, pcondition: *mut core::ffi::c_void, walker: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::CreateTreeWalker(this, windows_core::from_raw_borrowed(&pcondition)) { + match IUIAutomation_Impl::CreateTreeWalker(this, core::mem::transmute_copy(&pcondition)) { Ok(ok__) => { walker.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6730,7 +6730,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn CreateAndCondition(this: *mut core::ffi::c_void, condition1: *mut core::ffi::c_void, condition2: *mut core::ffi::c_void, newcondition: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::CreateAndCondition(this, windows_core::from_raw_borrowed(&condition1), windows_core::from_raw_borrowed(&condition2)) { + match IUIAutomation_Impl::CreateAndCondition(this, core::mem::transmute_copy(&condition1), core::mem::transmute_copy(&condition2)) { Ok(ok__) => { newcondition.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6760,7 +6760,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn CreateOrCondition(this: *mut core::ffi::c_void, condition1: *mut core::ffi::c_void, condition2: *mut core::ffi::c_void, newcondition: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::CreateOrCondition(this, windows_core::from_raw_borrowed(&condition1), windows_core::from_raw_borrowed(&condition2)) { + match IUIAutomation_Impl::CreateOrCondition(this, core::mem::transmute_copy(&condition1), core::mem::transmute_copy(&condition2)) { Ok(ok__) => { newcondition.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6790,7 +6790,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn CreateNotCondition(this: *mut core::ffi::c_void, condition: *mut core::ffi::c_void, newcondition: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::CreateNotCondition(this, windows_core::from_raw_borrowed(&condition)) { + match IUIAutomation_Impl::CreateNotCondition(this, core::mem::transmute_copy(&condition)) { Ok(ok__) => { newcondition.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6800,39 +6800,39 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn AddAutomationEventHandler(this: *mut core::ffi::c_void, eventid: UIA_EVENT_ID, element: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::AddAutomationEventHandler(this, core::mem::transmute_copy(&eventid), windows_core::from_raw_borrowed(&element), core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation_Impl::AddAutomationEventHandler(this, core::mem::transmute_copy(&eventid), core::mem::transmute_copy(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn RemoveAutomationEventHandler(this: *mut core::ffi::c_void, eventid: UIA_EVENT_ID, element: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::RemoveAutomationEventHandler(this, core::mem::transmute_copy(&eventid), windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation_Impl::RemoveAutomationEventHandler(this, core::mem::transmute_copy(&eventid), core::mem::transmute_copy(&element), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn AddPropertyChangedEventHandlerNativeArray(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, propertyarray: *const UIA_PROPERTY_ID, propertycount: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::AddPropertyChangedEventHandlerNativeArray(this, windows_core::from_raw_borrowed(&element), core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler), core::mem::transmute_copy(&propertyarray), core::mem::transmute_copy(&propertycount)).into() + IUIAutomation_Impl::AddPropertyChangedEventHandlerNativeArray(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler), core::mem::transmute_copy(&propertyarray), core::mem::transmute_copy(&propertycount)).into() } unsafe extern "system" fn AddPropertyChangedEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, propertyarray: *const super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::AddPropertyChangedEventHandler(this, windows_core::from_raw_borrowed(&element), core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler), core::mem::transmute_copy(&propertyarray)).into() + IUIAutomation_Impl::AddPropertyChangedEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler), core::mem::transmute_copy(&propertyarray)).into() } unsafe extern "system" fn RemovePropertyChangedEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::RemovePropertyChangedEventHandler(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation_Impl::RemovePropertyChangedEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn AddStructureChangedEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::AddStructureChangedEventHandler(this, windows_core::from_raw_borrowed(&element), core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation_Impl::AddStructureChangedEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn RemoveStructureChangedEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::RemoveStructureChangedEventHandler(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation_Impl::RemoveStructureChangedEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn AddFocusChangedEventHandler(this: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::AddFocusChangedEventHandler(this, windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation_Impl::AddFocusChangedEventHandler(this, core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn RemoveFocusChangedEventHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::RemoveFocusChangedEventHandler(this, windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation_Impl::RemoveFocusChangedEventHandler(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn RemoveAllEventHandlers(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6890,7 +6890,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn CreateProxyFactoryEntry(this: *mut core::ffi::c_void, factory: *mut core::ffi::c_void, factoryentry: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::CreateProxyFactoryEntry(this, windows_core::from_raw_borrowed(&factory)) { + match IUIAutomation_Impl::CreateProxyFactoryEntry(this, core::mem::transmute_copy(&factory)) { Ok(ok__) => { factoryentry.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6930,11 +6930,11 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn PollForPotentialSupportedPatterns(this: *mut core::ffi::c_void, pelement: *mut core::ffi::c_void, patternids: *mut *mut super::super::System::Com::SAFEARRAY, patternnames: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::PollForPotentialSupportedPatterns(this, windows_core::from_raw_borrowed(&pelement), core::mem::transmute_copy(&patternids), core::mem::transmute_copy(&patternnames)).into() + IUIAutomation_Impl::PollForPotentialSupportedPatterns(this, core::mem::transmute_copy(&pelement), core::mem::transmute_copy(&patternids), core::mem::transmute_copy(&patternnames)).into() } unsafe extern "system" fn PollForPotentialSupportedProperties(this: *mut core::ffi::c_void, pelement: *mut core::ffi::c_void, propertyids: *mut *mut super::super::System::Com::SAFEARRAY, propertynames: *mut *mut super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation_Impl::PollForPotentialSupportedProperties(this, windows_core::from_raw_borrowed(&pelement), core::mem::transmute_copy(&propertyids), core::mem::transmute_copy(&propertynames)).into() + IUIAutomation_Impl::PollForPotentialSupportedProperties(this, core::mem::transmute_copy(&pelement), core::mem::transmute_copy(&propertyids), core::mem::transmute_copy(&propertynames)).into() } unsafe extern "system" fn CheckNotSupported(this: *mut core::ffi::c_void, value: super::super::System::Variant::VARIANT, isnotsupported: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6968,7 +6968,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn ElementFromIAccessible(this: *mut core::ffi::c_void, accessible: *mut core::ffi::c_void, childid: i32, element: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::ElementFromIAccessible(this, windows_core::from_raw_borrowed(&accessible), core::mem::transmute_copy(&childid)) { + match IUIAutomation_Impl::ElementFromIAccessible(this, core::mem::transmute_copy(&accessible), core::mem::transmute_copy(&childid)) { Ok(ok__) => { element.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6978,7 +6978,7 @@ impl IUIAutomation_Vtbl { } unsafe extern "system" fn ElementFromIAccessibleBuildCache(this: *mut core::ffi::c_void, accessible: *mut core::ffi::c_void, childid: i32, cacherequest: *mut core::ffi::c_void, element: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomation_Impl::ElementFromIAccessibleBuildCache(this, windows_core::from_raw_borrowed(&accessible), core::mem::transmute_copy(&childid), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomation_Impl::ElementFromIAccessibleBuildCache(this, core::mem::transmute_copy(&accessible), core::mem::transmute_copy(&childid), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { element.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7195,19 +7195,19 @@ pub struct IUIAutomation3_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomation3_Impl: IUIAutomation2_Impl { - fn AddTextEditTextChangedEventHandler(&self, element: Option<&IUIAutomationElement>, scope: TreeScope, texteditchangetype: TextEditChangeType, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationTextEditTextChangedEventHandler>) -> windows_core::Result<()>; - fn RemoveTextEditTextChangedEventHandler(&self, element: Option<&IUIAutomationElement>, handler: Option<&IUIAutomationTextEditTextChangedEventHandler>) -> windows_core::Result<()>; + fn AddTextEditTextChangedEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, scope: TreeScope, texteditchangetype: TextEditChangeType, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationTextEditTextChangedEventHandler>) -> windows_core::Result<()>; + fn RemoveTextEditTextChangedEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, handler: windows_core::Ref<'_, IUIAutomationTextEditTextChangedEventHandler>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUIAutomation3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddTextEditTextChangedEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, scope: TreeScope, texteditchangetype: TextEditChangeType, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation3_Impl::AddTextEditTextChangedEventHandler(this, windows_core::from_raw_borrowed(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&texteditchangetype), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation3_Impl::AddTextEditTextChangedEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&texteditchangetype), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn RemoveTextEditTextChangedEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation3_Impl::RemoveTextEditTextChangedEventHandler(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation3_Impl::RemoveTextEditTextChangedEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&handler)).into() } Self { base__: IUIAutomation2_Vtbl::new::(), @@ -7254,19 +7254,19 @@ pub struct IUIAutomation4_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomation4_Impl: IUIAutomation3_Impl { - fn AddChangesEventHandler(&self, element: Option<&IUIAutomationElement>, scope: TreeScope, changetypes: *const i32, changescount: i32, pcacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationChangesEventHandler>) -> windows_core::Result<()>; - fn RemoveChangesEventHandler(&self, element: Option<&IUIAutomationElement>, handler: Option<&IUIAutomationChangesEventHandler>) -> windows_core::Result<()>; + fn AddChangesEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, scope: TreeScope, changetypes: *const i32, changescount: i32, pcacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationChangesEventHandler>) -> windows_core::Result<()>; + fn RemoveChangesEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, handler: windows_core::Ref<'_, IUIAutomationChangesEventHandler>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUIAutomation4_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddChangesEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, scope: TreeScope, changetypes: *const i32, changescount: i32, pcacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation4_Impl::AddChangesEventHandler(this, windows_core::from_raw_borrowed(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&changetypes), core::mem::transmute_copy(&changescount), windows_core::from_raw_borrowed(&pcacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation4_Impl::AddChangesEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&changetypes), core::mem::transmute_copy(&changescount), core::mem::transmute_copy(&pcacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn RemoveChangesEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation4_Impl::RemoveChangesEventHandler(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation4_Impl::RemoveChangesEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&handler)).into() } Self { base__: IUIAutomation3_Vtbl::new::(), @@ -7313,19 +7313,19 @@ pub struct IUIAutomation5_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomation5_Impl: IUIAutomation4_Impl { - fn AddNotificationEventHandler(&self, element: Option<&IUIAutomationElement>, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationNotificationEventHandler>) -> windows_core::Result<()>; - fn RemoveNotificationEventHandler(&self, element: Option<&IUIAutomationElement>, handler: Option<&IUIAutomationNotificationEventHandler>) -> windows_core::Result<()>; + fn AddNotificationEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationNotificationEventHandler>) -> windows_core::Result<()>; + fn RemoveNotificationEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, handler: windows_core::Ref<'_, IUIAutomationNotificationEventHandler>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUIAutomation5_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddNotificationEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation5_Impl::AddNotificationEventHandler(this, windows_core::from_raw_borrowed(&element), core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation5_Impl::AddNotificationEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn RemoveNotificationEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation5_Impl::RemoveNotificationEventHandler(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation5_Impl::RemoveNotificationEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&handler)).into() } Self { base__: IUIAutomation4_Vtbl::new::(), @@ -7412,14 +7412,14 @@ pub struct IUIAutomation6_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomation6_Impl: IUIAutomation5_Impl { fn CreateEventHandlerGroup(&self) -> windows_core::Result; - fn AddEventHandlerGroup(&self, element: Option<&IUIAutomationElement>, handlergroup: Option<&IUIAutomationEventHandlerGroup>) -> windows_core::Result<()>; - fn RemoveEventHandlerGroup(&self, element: Option<&IUIAutomationElement>, handlergroup: Option<&IUIAutomationEventHandlerGroup>) -> windows_core::Result<()>; + fn AddEventHandlerGroup(&self, element: windows_core::Ref<'_, IUIAutomationElement>, handlergroup: windows_core::Ref<'_, IUIAutomationEventHandlerGroup>) -> windows_core::Result<()>; + fn RemoveEventHandlerGroup(&self, element: windows_core::Ref<'_, IUIAutomationElement>, handlergroup: windows_core::Ref<'_, IUIAutomationEventHandlerGroup>) -> windows_core::Result<()>; fn ConnectionRecoveryBehavior(&self) -> windows_core::Result; fn SetConnectionRecoveryBehavior(&self, connectionrecoverybehavioroptions: ConnectionRecoveryBehaviorOptions) -> windows_core::Result<()>; fn CoalesceEvents(&self) -> windows_core::Result; fn SetCoalesceEvents(&self, coalesceeventsoptions: CoalesceEventsOptions) -> windows_core::Result<()>; - fn AddActiveTextPositionChangedEventHandler(&self, element: Option<&IUIAutomationElement>, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationActiveTextPositionChangedEventHandler>) -> windows_core::Result<()>; - fn RemoveActiveTextPositionChangedEventHandler(&self, element: Option<&IUIAutomationElement>, handler: Option<&IUIAutomationActiveTextPositionChangedEventHandler>) -> windows_core::Result<()>; + fn AddActiveTextPositionChangedEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationActiveTextPositionChangedEventHandler>) -> windows_core::Result<()>; + fn RemoveActiveTextPositionChangedEventHandler(&self, element: windows_core::Ref<'_, IUIAutomationElement>, handler: windows_core::Ref<'_, IUIAutomationActiveTextPositionChangedEventHandler>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUIAutomation6_Vtbl { @@ -7436,11 +7436,11 @@ impl IUIAutomation6_Vtbl { } unsafe extern "system" fn AddEventHandlerGroup(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, handlergroup: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation6_Impl::AddEventHandlerGroup(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&handlergroup)).into() + IUIAutomation6_Impl::AddEventHandlerGroup(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&handlergroup)).into() } unsafe extern "system" fn RemoveEventHandlerGroup(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, handlergroup: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation6_Impl::RemoveEventHandlerGroup(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&handlergroup)).into() + IUIAutomation6_Impl::RemoveEventHandlerGroup(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&handlergroup)).into() } unsafe extern "system" fn ConnectionRecoveryBehavior(this: *mut core::ffi::c_void, connectionrecoverybehavioroptions: *mut ConnectionRecoveryBehaviorOptions) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7472,11 +7472,11 @@ impl IUIAutomation6_Vtbl { } unsafe extern "system" fn AddActiveTextPositionChangedEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation6_Impl::AddActiveTextPositionChangedEventHandler(this, windows_core::from_raw_borrowed(&element), core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation6_Impl::AddActiveTextPositionChangedEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn RemoveActiveTextPositionChangedEventHandler(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomation6_Impl::RemoveActiveTextPositionChangedEventHandler(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomation6_Impl::RemoveActiveTextPositionChangedEventHandler(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&handler)).into() } Self { base__: IUIAutomation5_Vtbl::new::(), @@ -7514,13 +7514,13 @@ pub struct IUIAutomationActiveTextPositionChangedEventHandler_Vtbl { pub HandleActiveTextPositionChangedEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAutomationActiveTextPositionChangedEventHandler_Impl: windows_core::IUnknownImpl { - fn HandleActiveTextPositionChangedEvent(&self, sender: Option<&IUIAutomationElement>, range: Option<&IUIAutomationTextRange>) -> windows_core::Result<()>; + fn HandleActiveTextPositionChangedEvent(&self, sender: windows_core::Ref<'_, IUIAutomationElement>, range: windows_core::Ref<'_, IUIAutomationTextRange>) -> windows_core::Result<()>; } impl IUIAutomationActiveTextPositionChangedEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HandleActiveTextPositionChangedEvent(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, range: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationActiveTextPositionChangedEventHandler_Impl::HandleActiveTextPositionChangedEvent(this, windows_core::from_raw_borrowed(&sender), windows_core::from_raw_borrowed(&range)).into() + IUIAutomationActiveTextPositionChangedEventHandler_Impl::HandleActiveTextPositionChangedEvent(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&range)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -7900,7 +7900,7 @@ pub trait IUIAutomationCacheRequest_Impl: windows_core::IUnknownImpl { fn TreeScope(&self) -> windows_core::Result; fn SetTreeScope(&self, scope: TreeScope) -> windows_core::Result<()>; fn TreeFilter(&self) -> windows_core::Result; - fn SetTreeFilter(&self, filter: Option<&IUIAutomationCondition>) -> windows_core::Result<()>; + fn SetTreeFilter(&self, filter: windows_core::Ref<'_, IUIAutomationCondition>) -> windows_core::Result<()>; fn AutomationElementMode(&self) -> windows_core::Result; fn SetAutomationElementMode(&self, mode: AutomationElementMode) -> windows_core::Result<()>; } @@ -7950,7 +7950,7 @@ impl IUIAutomationCacheRequest_Vtbl { } unsafe extern "system" fn SetTreeFilter(this: *mut core::ffi::c_void, filter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationCacheRequest_Impl::SetTreeFilter(this, windows_core::from_raw_borrowed(&filter)).into() + IUIAutomationCacheRequest_Impl::SetTreeFilter(this, core::mem::transmute_copy(&filter)).into() } unsafe extern "system" fn AutomationElementMode(this: *mut core::ffi::c_void, mode: *mut AutomationElementMode) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8005,14 +8005,14 @@ pub struct IUIAutomationChangesEventHandler_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomationChangesEventHandler_Impl: windows_core::IUnknownImpl { - fn HandleChangesEvent(&self, sender: Option<&IUIAutomationElement>, uiachanges: *const UiaChangeInfo, changescount: i32) -> windows_core::Result<()>; + fn HandleChangesEvent(&self, sender: windows_core::Ref<'_, IUIAutomationElement>, uiachanges: *const UiaChangeInfo, changescount: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUIAutomationChangesEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HandleChangesEvent(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, uiachanges: *const UiaChangeInfo, changescount: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationChangesEventHandler_Impl::HandleChangesEvent(this, windows_core::from_raw_borrowed(&sender), core::mem::transmute_copy(&uiachanges), core::mem::transmute_copy(&changescount)).into() + IUIAutomationChangesEventHandler_Impl::HandleChangesEvent(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&uiachanges), core::mem::transmute_copy(&changescount)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), HandleChangesEvent: HandleChangesEvent:: } } @@ -8870,11 +8870,11 @@ pub struct IUIAutomationElement_Vtbl { pub trait IUIAutomationElement_Impl: windows_core::IUnknownImpl { fn SetFocus(&self) -> windows_core::Result<()>; fn GetRuntimeId(&self) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; - fn FindFirst(&self, scope: TreeScope, condition: Option<&IUIAutomationCondition>) -> windows_core::Result; - fn FindAll(&self, scope: TreeScope, condition: Option<&IUIAutomationCondition>) -> windows_core::Result; - fn FindFirstBuildCache(&self, scope: TreeScope, condition: Option<&IUIAutomationCondition>, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn FindAllBuildCache(&self, scope: TreeScope, condition: Option<&IUIAutomationCondition>, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn BuildUpdatedCache(&self, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; + fn FindFirst(&self, scope: TreeScope, condition: windows_core::Ref<'_, IUIAutomationCondition>) -> windows_core::Result; + fn FindAll(&self, scope: TreeScope, condition: windows_core::Ref<'_, IUIAutomationCondition>) -> windows_core::Result; + fn FindFirstBuildCache(&self, scope: TreeScope, condition: windows_core::Ref<'_, IUIAutomationCondition>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn FindAllBuildCache(&self, scope: TreeScope, condition: windows_core::Ref<'_, IUIAutomationCondition>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn BuildUpdatedCache(&self, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; fn GetCurrentPropertyValue(&self, propertyid: UIA_PROPERTY_ID) -> windows_core::Result; fn GetCurrentPropertyValueEx(&self, propertyid: UIA_PROPERTY_ID, ignoredefaultvalue: super::super::Foundation::BOOL) -> windows_core::Result; fn GetCachedPropertyValue(&self, propertyid: UIA_PROPERTY_ID) -> windows_core::Result; @@ -8970,7 +8970,7 @@ impl IUIAutomationElement_Vtbl { } unsafe extern "system" fn FindFirst(this: *mut core::ffi::c_void, scope: TreeScope, condition: *mut core::ffi::c_void, found: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationElement_Impl::FindFirst(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&condition)) { + match IUIAutomationElement_Impl::FindFirst(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&condition)) { Ok(ok__) => { found.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8980,7 +8980,7 @@ impl IUIAutomationElement_Vtbl { } unsafe extern "system" fn FindAll(this: *mut core::ffi::c_void, scope: TreeScope, condition: *mut core::ffi::c_void, found: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationElement_Impl::FindAll(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&condition)) { + match IUIAutomationElement_Impl::FindAll(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&condition)) { Ok(ok__) => { found.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8990,7 +8990,7 @@ impl IUIAutomationElement_Vtbl { } unsafe extern "system" fn FindFirstBuildCache(this: *mut core::ffi::c_void, scope: TreeScope, condition: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, found: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationElement_Impl::FindFirstBuildCache(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&condition), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationElement_Impl::FindFirstBuildCache(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&condition), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { found.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9000,7 +9000,7 @@ impl IUIAutomationElement_Vtbl { } unsafe extern "system" fn FindAllBuildCache(this: *mut core::ffi::c_void, scope: TreeScope, condition: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, found: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationElement_Impl::FindAllBuildCache(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&condition), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationElement_Impl::FindAllBuildCache(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&condition), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { found.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9010,7 +9010,7 @@ impl IUIAutomationElement_Vtbl { } unsafe extern "system" fn BuildUpdatedCache(this: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, updatedelement: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationElement_Impl::BuildUpdatedCache(this, windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationElement_Impl::BuildUpdatedCache(this, core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { updatedelement.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10487,10 +10487,10 @@ pub struct IUIAutomationElement7_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomationElement7_Impl: IUIAutomationElement6_Impl { - fn FindFirstWithOptions(&self, scope: TreeScope, condition: Option<&IUIAutomationCondition>, traversaloptions: TreeTraversalOptions, root: Option<&IUIAutomationElement>) -> windows_core::Result; - fn FindAllWithOptions(&self, scope: TreeScope, condition: Option<&IUIAutomationCondition>, traversaloptions: TreeTraversalOptions, root: Option<&IUIAutomationElement>) -> windows_core::Result; - fn FindFirstWithOptionsBuildCache(&self, scope: TreeScope, condition: Option<&IUIAutomationCondition>, cacherequest: Option<&IUIAutomationCacheRequest>, traversaloptions: TreeTraversalOptions, root: Option<&IUIAutomationElement>) -> windows_core::Result; - fn FindAllWithOptionsBuildCache(&self, scope: TreeScope, condition: Option<&IUIAutomationCondition>, cacherequest: Option<&IUIAutomationCacheRequest>, traversaloptions: TreeTraversalOptions, root: Option<&IUIAutomationElement>) -> windows_core::Result; + fn FindFirstWithOptions(&self, scope: TreeScope, condition: windows_core::Ref<'_, IUIAutomationCondition>, traversaloptions: TreeTraversalOptions, root: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; + fn FindAllWithOptions(&self, scope: TreeScope, condition: windows_core::Ref<'_, IUIAutomationCondition>, traversaloptions: TreeTraversalOptions, root: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; + fn FindFirstWithOptionsBuildCache(&self, scope: TreeScope, condition: windows_core::Ref<'_, IUIAutomationCondition>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, traversaloptions: TreeTraversalOptions, root: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; + fn FindAllWithOptionsBuildCache(&self, scope: TreeScope, condition: windows_core::Ref<'_, IUIAutomationCondition>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, traversaloptions: TreeTraversalOptions, root: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; fn GetCurrentMetadataValue(&self, targetid: i32, metadataid: UIA_METADATA_ID) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -10498,7 +10498,7 @@ impl IUIAutomationElement7_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FindFirstWithOptions(this: *mut core::ffi::c_void, scope: TreeScope, condition: *mut core::ffi::c_void, traversaloptions: TreeTraversalOptions, root: *mut core::ffi::c_void, found: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationElement7_Impl::FindFirstWithOptions(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&condition), core::mem::transmute_copy(&traversaloptions), windows_core::from_raw_borrowed(&root)) { + match IUIAutomationElement7_Impl::FindFirstWithOptions(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&condition), core::mem::transmute_copy(&traversaloptions), core::mem::transmute_copy(&root)) { Ok(ok__) => { found.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10508,7 +10508,7 @@ impl IUIAutomationElement7_Vtbl { } unsafe extern "system" fn FindAllWithOptions(this: *mut core::ffi::c_void, scope: TreeScope, condition: *mut core::ffi::c_void, traversaloptions: TreeTraversalOptions, root: *mut core::ffi::c_void, found: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationElement7_Impl::FindAllWithOptions(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&condition), core::mem::transmute_copy(&traversaloptions), windows_core::from_raw_borrowed(&root)) { + match IUIAutomationElement7_Impl::FindAllWithOptions(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&condition), core::mem::transmute_copy(&traversaloptions), core::mem::transmute_copy(&root)) { Ok(ok__) => { found.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10518,7 +10518,7 @@ impl IUIAutomationElement7_Vtbl { } unsafe extern "system" fn FindFirstWithOptionsBuildCache(this: *mut core::ffi::c_void, scope: TreeScope, condition: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, traversaloptions: TreeTraversalOptions, root: *mut core::ffi::c_void, found: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationElement7_Impl::FindFirstWithOptionsBuildCache(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&condition), windows_core::from_raw_borrowed(&cacherequest), core::mem::transmute_copy(&traversaloptions), windows_core::from_raw_borrowed(&root)) { + match IUIAutomationElement7_Impl::FindFirstWithOptionsBuildCache(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&condition), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&traversaloptions), core::mem::transmute_copy(&root)) { Ok(ok__) => { found.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10528,7 +10528,7 @@ impl IUIAutomationElement7_Vtbl { } unsafe extern "system" fn FindAllWithOptionsBuildCache(this: *mut core::ffi::c_void, scope: TreeScope, condition: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, traversaloptions: TreeTraversalOptions, root: *mut core::ffi::c_void, found: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationElement7_Impl::FindAllWithOptionsBuildCache(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&condition), windows_core::from_raw_borrowed(&cacherequest), core::mem::transmute_copy(&traversaloptions), windows_core::from_raw_borrowed(&root)) { + match IUIAutomationElement7_Impl::FindAllWithOptionsBuildCache(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&condition), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&traversaloptions), core::mem::transmute_copy(&root)) { Ok(ok__) => { found.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10756,13 +10756,13 @@ pub struct IUIAutomationEventHandler_Vtbl { pub HandleAutomationEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, UIA_EVENT_ID) -> windows_core::HRESULT, } pub trait IUIAutomationEventHandler_Impl: windows_core::IUnknownImpl { - fn HandleAutomationEvent(&self, sender: Option<&IUIAutomationElement>, eventid: UIA_EVENT_ID) -> windows_core::Result<()>; + fn HandleAutomationEvent(&self, sender: windows_core::Ref<'_, IUIAutomationElement>, eventid: UIA_EVENT_ID) -> windows_core::Result<()>; } impl IUIAutomationEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HandleAutomationEvent(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, eventid: UIA_EVENT_ID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationEventHandler_Impl::HandleAutomationEvent(this, windows_core::from_raw_borrowed(&sender), core::mem::transmute_copy(&eventid)).into() + IUIAutomationEventHandler_Impl::HandleAutomationEvent(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&eventid)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), HandleAutomationEvent: HandleAutomationEvent:: } } @@ -10836,43 +10836,43 @@ pub struct IUIAutomationEventHandlerGroup_Vtbl { pub AddTextEditTextChangedEventHandler: unsafe extern "system" fn(*mut core::ffi::c_void, TreeScope, TextEditChangeType, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAutomationEventHandlerGroup_Impl: windows_core::IUnknownImpl { - fn AddActiveTextPositionChangedEventHandler(&self, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationActiveTextPositionChangedEventHandler>) -> windows_core::Result<()>; - fn AddAutomationEventHandler(&self, eventid: UIA_EVENT_ID, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationEventHandler>) -> windows_core::Result<()>; - fn AddChangesEventHandler(&self, scope: TreeScope, changetypes: *const i32, changescount: i32, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationChangesEventHandler>) -> windows_core::Result<()>; - fn AddNotificationEventHandler(&self, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationNotificationEventHandler>) -> windows_core::Result<()>; - fn AddPropertyChangedEventHandler(&self, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationPropertyChangedEventHandler>, propertyarray: *const UIA_PROPERTY_ID, propertycount: i32) -> windows_core::Result<()>; - fn AddStructureChangedEventHandler(&self, scope: TreeScope, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationStructureChangedEventHandler>) -> windows_core::Result<()>; - fn AddTextEditTextChangedEventHandler(&self, scope: TreeScope, texteditchangetype: TextEditChangeType, cacherequest: Option<&IUIAutomationCacheRequest>, handler: Option<&IUIAutomationTextEditTextChangedEventHandler>) -> windows_core::Result<()>; + fn AddActiveTextPositionChangedEventHandler(&self, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationActiveTextPositionChangedEventHandler>) -> windows_core::Result<()>; + fn AddAutomationEventHandler(&self, eventid: UIA_EVENT_ID, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationEventHandler>) -> windows_core::Result<()>; + fn AddChangesEventHandler(&self, scope: TreeScope, changetypes: *const i32, changescount: i32, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationChangesEventHandler>) -> windows_core::Result<()>; + fn AddNotificationEventHandler(&self, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationNotificationEventHandler>) -> windows_core::Result<()>; + fn AddPropertyChangedEventHandler(&self, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationPropertyChangedEventHandler>, propertyarray: *const UIA_PROPERTY_ID, propertycount: i32) -> windows_core::Result<()>; + fn AddStructureChangedEventHandler(&self, scope: TreeScope, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationStructureChangedEventHandler>) -> windows_core::Result<()>; + fn AddTextEditTextChangedEventHandler(&self, scope: TreeScope, texteditchangetype: TextEditChangeType, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>, handler: windows_core::Ref<'_, IUIAutomationTextEditTextChangedEventHandler>) -> windows_core::Result<()>; } impl IUIAutomationEventHandlerGroup_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddActiveTextPositionChangedEventHandler(this: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationEventHandlerGroup_Impl::AddActiveTextPositionChangedEventHandler(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomationEventHandlerGroup_Impl::AddActiveTextPositionChangedEventHandler(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn AddAutomationEventHandler(this: *mut core::ffi::c_void, eventid: UIA_EVENT_ID, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationEventHandlerGroup_Impl::AddAutomationEventHandler(this, core::mem::transmute_copy(&eventid), core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomationEventHandlerGroup_Impl::AddAutomationEventHandler(this, core::mem::transmute_copy(&eventid), core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn AddChangesEventHandler(this: *mut core::ffi::c_void, scope: TreeScope, changetypes: *const i32, changescount: i32, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationEventHandlerGroup_Impl::AddChangesEventHandler(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&changetypes), core::mem::transmute_copy(&changescount), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomationEventHandlerGroup_Impl::AddChangesEventHandler(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&changetypes), core::mem::transmute_copy(&changescount), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn AddNotificationEventHandler(this: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationEventHandlerGroup_Impl::AddNotificationEventHandler(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomationEventHandlerGroup_Impl::AddNotificationEventHandler(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn AddPropertyChangedEventHandler(this: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, propertyarray: *const UIA_PROPERTY_ID, propertycount: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationEventHandlerGroup_Impl::AddPropertyChangedEventHandler(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler), core::mem::transmute_copy(&propertyarray), core::mem::transmute_copy(&propertycount)).into() + IUIAutomationEventHandlerGroup_Impl::AddPropertyChangedEventHandler(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler), core::mem::transmute_copy(&propertyarray), core::mem::transmute_copy(&propertycount)).into() } unsafe extern "system" fn AddStructureChangedEventHandler(this: *mut core::ffi::c_void, scope: TreeScope, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationEventHandlerGroup_Impl::AddStructureChangedEventHandler(this, core::mem::transmute_copy(&scope), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomationEventHandlerGroup_Impl::AddStructureChangedEventHandler(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn AddTextEditTextChangedEventHandler(this: *mut core::ffi::c_void, scope: TreeScope, texteditchangetype: TextEditChangeType, cacherequest: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationEventHandlerGroup_Impl::AddTextEditTextChangedEventHandler(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&texteditchangetype), windows_core::from_raw_borrowed(&cacherequest), windows_core::from_raw_borrowed(&handler)).into() + IUIAutomationEventHandlerGroup_Impl::AddTextEditTextChangedEventHandler(this, core::mem::transmute_copy(&scope), core::mem::transmute_copy(&texteditchangetype), core::mem::transmute_copy(&cacherequest), core::mem::transmute_copy(&handler)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -10981,13 +10981,13 @@ pub struct IUIAutomationFocusChangedEventHandler_Vtbl { pub HandleFocusChangedEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAutomationFocusChangedEventHandler_Impl: windows_core::IUnknownImpl { - fn HandleFocusChangedEvent(&self, sender: Option<&IUIAutomationElement>) -> windows_core::Result<()>; + fn HandleFocusChangedEvent(&self, sender: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result<()>; } impl IUIAutomationFocusChangedEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HandleFocusChangedEvent(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationFocusChangedEventHandler_Impl::HandleFocusChangedEvent(this, windows_core::from_raw_borrowed(&sender)).into() + IUIAutomationFocusChangedEventHandler_Impl::HandleFocusChangedEvent(this, core::mem::transmute_copy(&sender)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), HandleFocusChangedEvent: HandleFocusChangedEvent:: } } @@ -11343,14 +11343,14 @@ pub struct IUIAutomationItemContainerPattern_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomationItemContainerPattern_Impl: windows_core::IUnknownImpl { - fn FindItemByProperty(&self, pstartafter: Option<&IUIAutomationElement>, propertyid: UIA_PROPERTY_ID, value: &super::super::System::Variant::VARIANT) -> windows_core::Result; + fn FindItemByProperty(&self, pstartafter: windows_core::Ref<'_, IUIAutomationElement>, propertyid: UIA_PROPERTY_ID, value: &super::super::System::Variant::VARIANT) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUIAutomationItemContainerPattern_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FindItemByProperty(this: *mut core::ffi::c_void, pstartafter: *mut core::ffi::c_void, propertyid: UIA_PROPERTY_ID, value: super::super::System::Variant::VARIANT, pfound: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationItemContainerPattern_Impl::FindItemByProperty(this, windows_core::from_raw_borrowed(&pstartafter), core::mem::transmute_copy(&propertyid), core::mem::transmute(&value)) { + match IUIAutomationItemContainerPattern_Impl::FindItemByProperty(this, core::mem::transmute_copy(&pstartafter), core::mem::transmute_copy(&propertyid), core::mem::transmute(&value)) { Ok(ok__) => { pfound.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11968,13 +11968,13 @@ pub struct IUIAutomationNotificationEventHandler_Vtbl { pub HandleNotificationEvent: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, NotificationKind, NotificationProcessing, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAutomationNotificationEventHandler_Impl: windows_core::IUnknownImpl { - fn HandleNotificationEvent(&self, sender: Option<&IUIAutomationElement>, notificationkind: NotificationKind, notificationprocessing: NotificationProcessing, displaystring: &windows_core::BSTR, activityid: &windows_core::BSTR) -> windows_core::Result<()>; + fn HandleNotificationEvent(&self, sender: windows_core::Ref<'_, IUIAutomationElement>, notificationkind: NotificationKind, notificationprocessing: NotificationProcessing, displaystring: &windows_core::BSTR, activityid: &windows_core::BSTR) -> windows_core::Result<()>; } impl IUIAutomationNotificationEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HandleNotificationEvent(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, notificationkind: NotificationKind, notificationprocessing: NotificationProcessing, displaystring: *mut core::ffi::c_void, activityid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationNotificationEventHandler_Impl::HandleNotificationEvent(this, windows_core::from_raw_borrowed(&sender), core::mem::transmute_copy(¬ificationkind), core::mem::transmute_copy(¬ificationprocessing), core::mem::transmute(&displaystring), core::mem::transmute(&activityid)).into() + IUIAutomationNotificationEventHandler_Impl::HandleNotificationEvent(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(¬ificationkind), core::mem::transmute_copy(¬ificationprocessing), core::mem::transmute(&displaystring), core::mem::transmute(&activityid)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), HandleNotificationEvent: HandleNotificationEvent:: } } @@ -12120,14 +12120,14 @@ pub struct IUIAutomationPatternHandler_Vtbl { pub Dispatch: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, *const UIAutomationParameter, u32) -> windows_core::HRESULT, } pub trait IUIAutomationPatternHandler_Impl: windows_core::IUnknownImpl { - fn CreateClientWrapper(&self, ppatterninstance: Option<&IUIAutomationPatternInstance>) -> windows_core::Result; - fn Dispatch(&self, ptarget: Option<&windows_core::IUnknown>, index: u32, pparams: *const UIAutomationParameter, cparams: u32) -> windows_core::Result<()>; + fn CreateClientWrapper(&self, ppatterninstance: windows_core::Ref<'_, IUIAutomationPatternInstance>) -> windows_core::Result; + fn Dispatch(&self, ptarget: windows_core::Ref<'_, windows_core::IUnknown>, index: u32, pparams: *const UIAutomationParameter, cparams: u32) -> windows_core::Result<()>; } impl IUIAutomationPatternHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateClientWrapper(this: *mut core::ffi::c_void, ppatterninstance: *mut core::ffi::c_void, pclientwrapper: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationPatternHandler_Impl::CreateClientWrapper(this, windows_core::from_raw_borrowed(&ppatterninstance)) { + match IUIAutomationPatternHandler_Impl::CreateClientWrapper(this, core::mem::transmute_copy(&ppatterninstance)) { Ok(ok__) => { pclientwrapper.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12137,7 +12137,7 @@ impl IUIAutomationPatternHandler_Vtbl { } unsafe extern "system" fn Dispatch(this: *mut core::ffi::c_void, ptarget: *mut core::ffi::c_void, index: u32, pparams: *const UIAutomationParameter, cparams: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationPatternHandler_Impl::Dispatch(this, windows_core::from_raw_borrowed(&ptarget), core::mem::transmute_copy(&index), core::mem::transmute_copy(&pparams), core::mem::transmute_copy(&cparams)).into() + IUIAutomationPatternHandler_Impl::Dispatch(this, core::mem::transmute_copy(&ptarget), core::mem::transmute_copy(&index), core::mem::transmute_copy(&pparams), core::mem::transmute_copy(&cparams)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -12212,14 +12212,14 @@ pub struct IUIAutomationPropertyChangedEventHandler_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomationPropertyChangedEventHandler_Impl: windows_core::IUnknownImpl { - fn HandlePropertyChangedEvent(&self, sender: Option<&IUIAutomationElement>, propertyid: UIA_PROPERTY_ID, newvalue: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; + fn HandlePropertyChangedEvent(&self, sender: windows_core::Ref<'_, IUIAutomationElement>, propertyid: UIA_PROPERTY_ID, newvalue: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IUIAutomationPropertyChangedEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HandlePropertyChangedEvent(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, propertyid: UIA_PROPERTY_ID, newvalue: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationPropertyChangedEventHandler_Impl::HandlePropertyChangedEvent(this, windows_core::from_raw_borrowed(&sender), core::mem::transmute_copy(&propertyid), core::mem::transmute(&newvalue)).into() + IUIAutomationPropertyChangedEventHandler_Impl::HandlePropertyChangedEvent(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&propertyid), core::mem::transmute(&newvalue)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), HandlePropertyChangedEvent: HandlePropertyChangedEvent:: } } @@ -12655,7 +12655,7 @@ pub trait IUIAutomationProxyFactoryMapping_Impl: windows_core::IUnknownImpl { fn GetEntry(&self, index: u32) -> windows_core::Result; fn SetTable(&self, factorylist: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; fn InsertEntries(&self, before: u32, factorylist: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; - fn InsertEntry(&self, before: u32, factory: Option<&IUIAutomationProxyFactoryEntry>) -> windows_core::Result<()>; + fn InsertEntry(&self, before: u32, factory: windows_core::Ref<'_, IUIAutomationProxyFactoryEntry>) -> windows_core::Result<()>; fn RemoveEntry(&self, index: u32) -> windows_core::Result<()>; fn ClearTable(&self) -> windows_core::Result<()>; fn RestoreDefaultTable(&self) -> windows_core::Result<()>; @@ -12703,7 +12703,7 @@ impl IUIAutomationProxyFactoryMapping_Vtbl { } unsafe extern "system" fn InsertEntry(this: *mut core::ffi::c_void, before: u32, factory: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationProxyFactoryMapping_Impl::InsertEntry(this, core::mem::transmute_copy(&before), windows_core::from_raw_borrowed(&factory)).into() + IUIAutomationProxyFactoryMapping_Impl::InsertEntry(this, core::mem::transmute_copy(&before), core::mem::transmute_copy(&factory)).into() } unsafe extern "system" fn RemoveEntry(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13904,14 +13904,14 @@ pub struct IUIAutomationStructureChangedEventHandler_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IUIAutomationStructureChangedEventHandler_Impl: windows_core::IUnknownImpl { - fn HandleStructureChangedEvent(&self, sender: Option<&IUIAutomationElement>, changetype: StructureChangeType, runtimeid: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn HandleStructureChangedEvent(&self, sender: windows_core::Ref<'_, IUIAutomationElement>, changetype: StructureChangeType, runtimeid: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IUIAutomationStructureChangedEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HandleStructureChangedEvent(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, changetype: StructureChangeType, runtimeid: *const super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationStructureChangedEventHandler_Impl::HandleStructureChangedEvent(this, windows_core::from_raw_borrowed(&sender), core::mem::transmute_copy(&changetype), core::mem::transmute_copy(&runtimeid)).into() + IUIAutomationStructureChangedEventHandler_Impl::HandleStructureChangedEvent(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&changetype), core::mem::transmute_copy(&runtimeid)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), HandleStructureChangedEvent: HandleStructureChangedEvent:: } } @@ -14590,14 +14590,14 @@ pub struct IUIAutomationTextEditTextChangedEventHandler_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IUIAutomationTextEditTextChangedEventHandler_Impl: windows_core::IUnknownImpl { - fn HandleTextEditTextChangedEvent(&self, sender: Option<&IUIAutomationElement>, texteditchangetype: TextEditChangeType, eventstrings: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; + fn HandleTextEditTextChangedEvent(&self, sender: windows_core::Ref<'_, IUIAutomationElement>, texteditchangetype: TextEditChangeType, eventstrings: *const super::super::System::Com::SAFEARRAY) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IUIAutomationTextEditTextChangedEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HandleTextEditTextChangedEvent(this: *mut core::ffi::c_void, sender: *mut core::ffi::c_void, texteditchangetype: TextEditChangeType, eventstrings: *const super::super::System::Com::SAFEARRAY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationTextEditTextChangedEventHandler_Impl::HandleTextEditTextChangedEvent(this, windows_core::from_raw_borrowed(&sender), core::mem::transmute_copy(&texteditchangetype), core::mem::transmute_copy(&eventstrings)).into() + IUIAutomationTextEditTextChangedEventHandler_Impl::HandleTextEditTextChangedEvent(this, core::mem::transmute_copy(&sender), core::mem::transmute_copy(&texteditchangetype), core::mem::transmute_copy(&eventstrings)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -14653,7 +14653,7 @@ pub struct IUIAutomationTextPattern_Vtbl { } pub trait IUIAutomationTextPattern_Impl: windows_core::IUnknownImpl { fn RangeFromPoint(&self, pt: &super::super::Foundation::POINT) -> windows_core::Result; - fn RangeFromChild(&self, child: Option<&IUIAutomationElement>) -> windows_core::Result; + fn RangeFromChild(&self, child: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; fn GetSelection(&self) -> windows_core::Result; fn GetVisibleRanges(&self) -> windows_core::Result; fn DocumentRange(&self) -> windows_core::Result; @@ -14673,7 +14673,7 @@ impl IUIAutomationTextPattern_Vtbl { } unsafe extern "system" fn RangeFromChild(this: *mut core::ffi::c_void, child: *mut core::ffi::c_void, range: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTextPattern_Impl::RangeFromChild(this, windows_core::from_raw_borrowed(&child)) { + match IUIAutomationTextPattern_Impl::RangeFromChild(this, core::mem::transmute_copy(&child)) { Ok(ok__) => { range.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -14764,14 +14764,14 @@ pub struct IUIAutomationTextPattern2_Vtbl { pub GetCaretRange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::BOOL, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAutomationTextPattern2_Impl: IUIAutomationTextPattern_Impl { - fn RangeFromAnnotation(&self, annotation: Option<&IUIAutomationElement>) -> windows_core::Result; + fn RangeFromAnnotation(&self, annotation: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; fn GetCaretRange(&self, isactive: *mut super::super::Foundation::BOOL) -> windows_core::Result; } impl IUIAutomationTextPattern2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RangeFromAnnotation(this: *mut core::ffi::c_void, annotation: *mut core::ffi::c_void, range: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTextPattern2_Impl::RangeFromAnnotation(this, windows_core::from_raw_borrowed(&annotation)) { + match IUIAutomationTextPattern2_Impl::RangeFromAnnotation(this, core::mem::transmute_copy(&annotation)) { Ok(ok__) => { range.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -14916,8 +14916,8 @@ pub struct IUIAutomationTextRange_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomationTextRange_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Compare(&self, range: Option<&IUIAutomationTextRange>) -> windows_core::Result; - fn CompareEndpoints(&self, srcendpoint: TextPatternRangeEndpoint, range: Option<&IUIAutomationTextRange>, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result; + fn Compare(&self, range: windows_core::Ref<'_, IUIAutomationTextRange>) -> windows_core::Result; + fn CompareEndpoints(&self, srcendpoint: TextPatternRangeEndpoint, range: windows_core::Ref<'_, IUIAutomationTextRange>, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result; fn ExpandToEnclosingUnit(&self, textunit: TextUnit) -> windows_core::Result<()>; fn FindAttribute(&self, attr: UIA_TEXTATTRIBUTE_ID, val: &super::super::System::Variant::VARIANT, backward: super::super::Foundation::BOOL) -> windows_core::Result; fn FindText(&self, text: &windows_core::BSTR, backward: super::super::Foundation::BOOL, ignorecase: super::super::Foundation::BOOL) -> windows_core::Result; @@ -14927,7 +14927,7 @@ pub trait IUIAutomationTextRange_Impl: windows_core::IUnknownImpl { fn GetText(&self, maxlength: i32) -> windows_core::Result; fn Move(&self, unit: TextUnit, count: i32) -> windows_core::Result; fn MoveEndpointByUnit(&self, endpoint: TextPatternRangeEndpoint, unit: TextUnit, count: i32) -> windows_core::Result; - fn MoveEndpointByRange(&self, srcendpoint: TextPatternRangeEndpoint, range: Option<&IUIAutomationTextRange>, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result<()>; + fn MoveEndpointByRange(&self, srcendpoint: TextPatternRangeEndpoint, range: windows_core::Ref<'_, IUIAutomationTextRange>, targetendpoint: TextPatternRangeEndpoint) -> windows_core::Result<()>; fn Select(&self) -> windows_core::Result<()>; fn AddToSelection(&self) -> windows_core::Result<()>; fn RemoveFromSelection(&self) -> windows_core::Result<()>; @@ -14949,7 +14949,7 @@ impl IUIAutomationTextRange_Vtbl { } unsafe extern "system" fn Compare(this: *mut core::ffi::c_void, range: *mut core::ffi::c_void, aresame: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTextRange_Impl::Compare(this, windows_core::from_raw_borrowed(&range)) { + match IUIAutomationTextRange_Impl::Compare(this, core::mem::transmute_copy(&range)) { Ok(ok__) => { aresame.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -14959,7 +14959,7 @@ impl IUIAutomationTextRange_Vtbl { } unsafe extern "system" fn CompareEndpoints(this: *mut core::ffi::c_void, srcendpoint: TextPatternRangeEndpoint, range: *mut core::ffi::c_void, targetendpoint: TextPatternRangeEndpoint, compvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTextRange_Impl::CompareEndpoints(this, core::mem::transmute_copy(&srcendpoint), windows_core::from_raw_borrowed(&range), core::mem::transmute_copy(&targetendpoint)) { + match IUIAutomationTextRange_Impl::CompareEndpoints(this, core::mem::transmute_copy(&srcendpoint), core::mem::transmute_copy(&range), core::mem::transmute_copy(&targetendpoint)) { Ok(ok__) => { compvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15053,7 +15053,7 @@ impl IUIAutomationTextRange_Vtbl { } unsafe extern "system" fn MoveEndpointByRange(this: *mut core::ffi::c_void, srcendpoint: TextPatternRangeEndpoint, range: *mut core::ffi::c_void, targetendpoint: TextPatternRangeEndpoint) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAutomationTextRange_Impl::MoveEndpointByRange(this, core::mem::transmute_copy(&srcendpoint), windows_core::from_raw_borrowed(&range), core::mem::transmute_copy(&targetendpoint)).into() + IUIAutomationTextRange_Impl::MoveEndpointByRange(this, core::mem::transmute_copy(&srcendpoint), core::mem::transmute_copy(&range), core::mem::transmute_copy(&targetendpoint)).into() } unsafe extern "system" fn Select(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15187,8 +15187,8 @@ pub struct IUIAutomationTextRange3_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IUIAutomationTextRange3_Impl: IUIAutomationTextRange2_Impl { - fn GetEnclosingElementBuildCache(&self, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn GetChildrenBuildCache(&self, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; + fn GetEnclosingElementBuildCache(&self, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn GetChildrenBuildCache(&self, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; fn GetAttributeValues(&self, attributeids: *const UIA_TEXTATTRIBUTE_ID, attributeidcount: i32) -> windows_core::Result<*mut super::super::System::Com::SAFEARRAY>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -15196,7 +15196,7 @@ impl IUIAutomationTextRange3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetEnclosingElementBuildCache(this: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, enclosingelement: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTextRange3_Impl::GetEnclosingElementBuildCache(this, windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationTextRange3_Impl::GetEnclosingElementBuildCache(this, core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { enclosingelement.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15206,7 +15206,7 @@ impl IUIAutomationTextRange3_Vtbl { } unsafe extern "system" fn GetChildrenBuildCache(this: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, children: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTextRange3_Impl::GetChildrenBuildCache(this, windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationTextRange3_Impl::GetChildrenBuildCache(this, core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { children.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15805,25 +15805,25 @@ pub struct IUIAutomationTreeWalker_Vtbl { pub Condition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAutomationTreeWalker_Impl: windows_core::IUnknownImpl { - fn GetParentElement(&self, element: Option<&IUIAutomationElement>) -> windows_core::Result; - fn GetFirstChildElement(&self, element: Option<&IUIAutomationElement>) -> windows_core::Result; - fn GetLastChildElement(&self, element: Option<&IUIAutomationElement>) -> windows_core::Result; - fn GetNextSiblingElement(&self, element: Option<&IUIAutomationElement>) -> windows_core::Result; - fn GetPreviousSiblingElement(&self, element: Option<&IUIAutomationElement>) -> windows_core::Result; - fn NormalizeElement(&self, element: Option<&IUIAutomationElement>) -> windows_core::Result; - fn GetParentElementBuildCache(&self, element: Option<&IUIAutomationElement>, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn GetFirstChildElementBuildCache(&self, element: Option<&IUIAutomationElement>, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn GetLastChildElementBuildCache(&self, element: Option<&IUIAutomationElement>, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn GetNextSiblingElementBuildCache(&self, element: Option<&IUIAutomationElement>, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn GetPreviousSiblingElementBuildCache(&self, element: Option<&IUIAutomationElement>, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; - fn NormalizeElementBuildCache(&self, element: Option<&IUIAutomationElement>, cacherequest: Option<&IUIAutomationCacheRequest>) -> windows_core::Result; + fn GetParentElement(&self, element: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; + fn GetFirstChildElement(&self, element: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; + fn GetLastChildElement(&self, element: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; + fn GetNextSiblingElement(&self, element: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; + fn GetPreviousSiblingElement(&self, element: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; + fn NormalizeElement(&self, element: windows_core::Ref<'_, IUIAutomationElement>) -> windows_core::Result; + fn GetParentElementBuildCache(&self, element: windows_core::Ref<'_, IUIAutomationElement>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn GetFirstChildElementBuildCache(&self, element: windows_core::Ref<'_, IUIAutomationElement>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn GetLastChildElementBuildCache(&self, element: windows_core::Ref<'_, IUIAutomationElement>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn GetNextSiblingElementBuildCache(&self, element: windows_core::Ref<'_, IUIAutomationElement>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn GetPreviousSiblingElementBuildCache(&self, element: windows_core::Ref<'_, IUIAutomationElement>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; + fn NormalizeElementBuildCache(&self, element: windows_core::Ref<'_, IUIAutomationElement>, cacherequest: windows_core::Ref<'_, IUIAutomationCacheRequest>) -> windows_core::Result; fn Condition(&self) -> windows_core::Result; } impl IUIAutomationTreeWalker_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetParentElement(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, parent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetParentElement(this, windows_core::from_raw_borrowed(&element)) { + match IUIAutomationTreeWalker_Impl::GetParentElement(this, core::mem::transmute_copy(&element)) { Ok(ok__) => { parent.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15833,7 +15833,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn GetFirstChildElement(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, first: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetFirstChildElement(this, windows_core::from_raw_borrowed(&element)) { + match IUIAutomationTreeWalker_Impl::GetFirstChildElement(this, core::mem::transmute_copy(&element)) { Ok(ok__) => { first.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15843,7 +15843,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn GetLastChildElement(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, last: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetLastChildElement(this, windows_core::from_raw_borrowed(&element)) { + match IUIAutomationTreeWalker_Impl::GetLastChildElement(this, core::mem::transmute_copy(&element)) { Ok(ok__) => { last.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15853,7 +15853,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn GetNextSiblingElement(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, next: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetNextSiblingElement(this, windows_core::from_raw_borrowed(&element)) { + match IUIAutomationTreeWalker_Impl::GetNextSiblingElement(this, core::mem::transmute_copy(&element)) { Ok(ok__) => { next.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15863,7 +15863,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn GetPreviousSiblingElement(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, previous: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetPreviousSiblingElement(this, windows_core::from_raw_borrowed(&element)) { + match IUIAutomationTreeWalker_Impl::GetPreviousSiblingElement(this, core::mem::transmute_copy(&element)) { Ok(ok__) => { previous.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15873,7 +15873,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn NormalizeElement(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, normalized: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::NormalizeElement(this, windows_core::from_raw_borrowed(&element)) { + match IUIAutomationTreeWalker_Impl::NormalizeElement(this, core::mem::transmute_copy(&element)) { Ok(ok__) => { normalized.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15883,7 +15883,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn GetParentElementBuildCache(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, parent: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetParentElementBuildCache(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationTreeWalker_Impl::GetParentElementBuildCache(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { parent.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15893,7 +15893,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn GetFirstChildElementBuildCache(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, first: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetFirstChildElementBuildCache(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationTreeWalker_Impl::GetFirstChildElementBuildCache(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { first.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15903,7 +15903,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn GetLastChildElementBuildCache(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, last: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetLastChildElementBuildCache(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationTreeWalker_Impl::GetLastChildElementBuildCache(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { last.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15913,7 +15913,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn GetNextSiblingElementBuildCache(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, next: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetNextSiblingElementBuildCache(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationTreeWalker_Impl::GetNextSiblingElementBuildCache(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { next.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15923,7 +15923,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn GetPreviousSiblingElementBuildCache(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, previous: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::GetPreviousSiblingElementBuildCache(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationTreeWalker_Impl::GetPreviousSiblingElementBuildCache(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { previous.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -15933,7 +15933,7 @@ impl IUIAutomationTreeWalker_Vtbl { } unsafe extern "system" fn NormalizeElementBuildCache(this: *mut core::ffi::c_void, element: *mut core::ffi::c_void, cacherequest: *mut core::ffi::c_void, normalized: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAutomationTreeWalker_Impl::NormalizeElementBuildCache(this, windows_core::from_raw_borrowed(&element), windows_core::from_raw_borrowed(&cacherequest)) { + match IUIAutomationTreeWalker_Impl::NormalizeElementBuildCache(this, core::mem::transmute_copy(&element), core::mem::transmute_copy(&cacherequest)) { Ok(ok__) => { normalized.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) diff --git a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs index a84234d716..9ca31e762c 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs @@ -174,7 +174,7 @@ pub trait IUIAnimationInterpolator2_Impl: windows_core::IUnknownImpl { fn GetFinalValue(&self, value: *mut f64, cdimension: u32) -> windows_core::Result<()>; fn InterpolateValue(&self, offset: f64, value: *mut f64, cdimension: u32) -> windows_core::Result<()>; fn InterpolateVelocity(&self, offset: f64, velocity: *mut f64, cdimension: u32) -> windows_core::Result<()>; - fn GetPrimitiveInterpolation(&self, interpolation: Option<&IUIAnimationPrimitiveInterpolation>, cdimension: u32) -> windows_core::Result<()>; + fn GetPrimitiveInterpolation(&self, interpolation: windows_core::Ref<'_, IUIAnimationPrimitiveInterpolation>, cdimension: u32) -> windows_core::Result<()>; fn GetDependencies(&self, initialvaluedependencies: *mut UI_ANIMATION_DEPENDENCIES, initialvelocitydependencies: *mut UI_ANIMATION_DEPENDENCIES, durationdependencies: *mut UI_ANIMATION_DEPENDENCIES) -> windows_core::Result<()>; } impl IUIAnimationInterpolator2_Vtbl { @@ -221,7 +221,7 @@ impl IUIAnimationInterpolator2_Vtbl { } unsafe extern "system" fn GetPrimitiveInterpolation(this: *mut core::ffi::c_void, interpolation: *mut core::ffi::c_void, cdimension: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationInterpolator2_Impl::GetPrimitiveInterpolation(this, windows_core::from_raw_borrowed(&interpolation), core::mem::transmute_copy(&cdimension)).into() + IUIAnimationInterpolator2_Impl::GetPrimitiveInterpolation(this, core::mem::transmute_copy(&interpolation), core::mem::transmute_copy(&cdimension)).into() } unsafe extern "system" fn GetDependencies(this: *mut core::ffi::c_void, initialvaluedependencies: *mut UI_ANIMATION_DEPENDENCIES, initialvelocitydependencies: *mut UI_ANIMATION_DEPENDENCIES, durationdependencies: *mut UI_ANIMATION_DEPENDENCIES) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -261,13 +261,13 @@ pub struct IUIAnimationLoopIterationChangeHandler2_Vtbl { pub OnLoopIterationChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, usize, u32, u32) -> windows_core::HRESULT, } pub trait IUIAnimationLoopIterationChangeHandler2_Impl: windows_core::IUnknownImpl { - fn OnLoopIterationChanged(&self, storyboard: Option<&IUIAnimationStoryboard2>, id: usize, newiterationcount: u32, olditerationcount: u32) -> windows_core::Result<()>; + fn OnLoopIterationChanged(&self, storyboard: windows_core::Ref<'_, IUIAnimationStoryboard2>, id: usize, newiterationcount: u32, olditerationcount: u32) -> windows_core::Result<()>; } impl IUIAnimationLoopIterationChangeHandler2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnLoopIterationChanged(this: *mut core::ffi::c_void, storyboard: *mut core::ffi::c_void, id: usize, newiterationcount: u32, olditerationcount: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationLoopIterationChangeHandler2_Impl::OnLoopIterationChanged(this, windows_core::from_raw_borrowed(&storyboard), core::mem::transmute_copy(&id), core::mem::transmute_copy(&newiterationcount), core::mem::transmute_copy(&olditerationcount)).into() + IUIAnimationLoopIterationChangeHandler2_Impl::OnLoopIterationChanged(this, core::mem::transmute_copy(&storyboard), core::mem::transmute_copy(&id), core::mem::transmute_copy(&newiterationcount), core::mem::transmute_copy(&olditerationcount)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnLoopIterationChanged: OnLoopIterationChanged:: } } @@ -392,22 +392,22 @@ pub struct IUIAnimationManager_Vtbl { } pub trait IUIAnimationManager_Impl: windows_core::IUnknownImpl { fn CreateAnimationVariable(&self, initialvalue: f64) -> windows_core::Result; - fn ScheduleTransition(&self, variable: Option<&IUIAnimationVariable>, transition: Option<&IUIAnimationTransition>, timenow: f64) -> windows_core::Result<()>; + fn ScheduleTransition(&self, variable: windows_core::Ref<'_, IUIAnimationVariable>, transition: windows_core::Ref<'_, IUIAnimationTransition>, timenow: f64) -> windows_core::Result<()>; fn CreateStoryboard(&self) -> windows_core::Result; fn FinishAllStoryboards(&self, completiondeadline: f64) -> windows_core::Result<()>; fn AbandonAllStoryboards(&self) -> windows_core::Result<()>; fn Update(&self, timenow: f64, updateresult: *mut UI_ANIMATION_UPDATE_RESULT) -> windows_core::Result<()>; - fn GetVariableFromTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result; - fn GetStoryboardFromTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result; + fn GetVariableFromTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result; + fn GetStoryboardFromTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result; fn GetStatus(&self) -> windows_core::Result; fn SetAnimationMode(&self, mode: UI_ANIMATION_MODE) -> windows_core::Result<()>; fn Pause(&self) -> windows_core::Result<()>; fn Resume(&self) -> windows_core::Result<()>; - fn SetManagerEventHandler(&self, handler: Option<&IUIAnimationManagerEventHandler>) -> windows_core::Result<()>; - fn SetCancelPriorityComparison(&self, comparison: Option<&IUIAnimationPriorityComparison>) -> windows_core::Result<()>; - fn SetTrimPriorityComparison(&self, comparison: Option<&IUIAnimationPriorityComparison>) -> windows_core::Result<()>; - fn SetCompressPriorityComparison(&self, comparison: Option<&IUIAnimationPriorityComparison>) -> windows_core::Result<()>; - fn SetConcludePriorityComparison(&self, comparison: Option<&IUIAnimationPriorityComparison>) -> windows_core::Result<()>; + fn SetManagerEventHandler(&self, handler: windows_core::Ref<'_, IUIAnimationManagerEventHandler>) -> windows_core::Result<()>; + fn SetCancelPriorityComparison(&self, comparison: windows_core::Ref<'_, IUIAnimationPriorityComparison>) -> windows_core::Result<()>; + fn SetTrimPriorityComparison(&self, comparison: windows_core::Ref<'_, IUIAnimationPriorityComparison>) -> windows_core::Result<()>; + fn SetCompressPriorityComparison(&self, comparison: windows_core::Ref<'_, IUIAnimationPriorityComparison>) -> windows_core::Result<()>; + fn SetConcludePriorityComparison(&self, comparison: windows_core::Ref<'_, IUIAnimationPriorityComparison>) -> windows_core::Result<()>; fn SetDefaultLongestAcceptableDelay(&self, delay: f64) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; } @@ -425,7 +425,7 @@ impl IUIAnimationManager_Vtbl { } unsafe extern "system" fn ScheduleTransition(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, transition: *mut core::ffi::c_void, timenow: f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager_Impl::ScheduleTransition(this, windows_core::from_raw_borrowed(&variable), windows_core::from_raw_borrowed(&transition), core::mem::transmute_copy(&timenow)).into() + IUIAnimationManager_Impl::ScheduleTransition(this, core::mem::transmute_copy(&variable), core::mem::transmute_copy(&transition), core::mem::transmute_copy(&timenow)).into() } unsafe extern "system" fn CreateStoryboard(this: *mut core::ffi::c_void, storyboard: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -451,7 +451,7 @@ impl IUIAnimationManager_Vtbl { } unsafe extern "system" fn GetVariableFromTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32, variable: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAnimationManager_Impl::GetVariableFromTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)) { + match IUIAnimationManager_Impl::GetVariableFromTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)) { Ok(ok__) => { variable.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -461,7 +461,7 @@ impl IUIAnimationManager_Vtbl { } unsafe extern "system" fn GetStoryboardFromTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32, storyboard: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAnimationManager_Impl::GetStoryboardFromTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)) { + match IUIAnimationManager_Impl::GetStoryboardFromTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)) { Ok(ok__) => { storyboard.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -493,23 +493,23 @@ impl IUIAnimationManager_Vtbl { } unsafe extern "system" fn SetManagerEventHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager_Impl::SetManagerEventHandler(this, windows_core::from_raw_borrowed(&handler)).into() + IUIAnimationManager_Impl::SetManagerEventHandler(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn SetCancelPriorityComparison(this: *mut core::ffi::c_void, comparison: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager_Impl::SetCancelPriorityComparison(this, windows_core::from_raw_borrowed(&comparison)).into() + IUIAnimationManager_Impl::SetCancelPriorityComparison(this, core::mem::transmute_copy(&comparison)).into() } unsafe extern "system" fn SetTrimPriorityComparison(this: *mut core::ffi::c_void, comparison: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager_Impl::SetTrimPriorityComparison(this, windows_core::from_raw_borrowed(&comparison)).into() + IUIAnimationManager_Impl::SetTrimPriorityComparison(this, core::mem::transmute_copy(&comparison)).into() } unsafe extern "system" fn SetCompressPriorityComparison(this: *mut core::ffi::c_void, comparison: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager_Impl::SetCompressPriorityComparison(this, windows_core::from_raw_borrowed(&comparison)).into() + IUIAnimationManager_Impl::SetCompressPriorityComparison(this, core::mem::transmute_copy(&comparison)).into() } unsafe extern "system" fn SetConcludePriorityComparison(this: *mut core::ffi::c_void, comparison: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager_Impl::SetConcludePriorityComparison(this, windows_core::from_raw_borrowed(&comparison)).into() + IUIAnimationManager_Impl::SetConcludePriorityComparison(this, core::mem::transmute_copy(&comparison)).into() } unsafe extern "system" fn SetDefaultLongestAcceptableDelay(this: *mut core::ffi::c_void, delay: f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -674,23 +674,23 @@ pub struct IUIAnimationManager2_Vtbl { pub trait IUIAnimationManager2_Impl: windows_core::IUnknownImpl { fn CreateAnimationVectorVariable(&self, initialvalue: *const f64, cdimension: u32) -> windows_core::Result; fn CreateAnimationVariable(&self, initialvalue: f64) -> windows_core::Result; - fn ScheduleTransition(&self, variable: Option<&IUIAnimationVariable2>, transition: Option<&IUIAnimationTransition2>, timenow: f64) -> windows_core::Result<()>; + fn ScheduleTransition(&self, variable: windows_core::Ref<'_, IUIAnimationVariable2>, transition: windows_core::Ref<'_, IUIAnimationTransition2>, timenow: f64) -> windows_core::Result<()>; fn CreateStoryboard(&self) -> windows_core::Result; fn FinishAllStoryboards(&self, completiondeadline: f64) -> windows_core::Result<()>; fn AbandonAllStoryboards(&self) -> windows_core::Result<()>; fn Update(&self, timenow: f64, updateresult: *mut UI_ANIMATION_UPDATE_RESULT) -> windows_core::Result<()>; - fn GetVariableFromTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result; - fn GetStoryboardFromTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result; + fn GetVariableFromTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result; + fn GetStoryboardFromTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result; fn EstimateNextEventTime(&self) -> windows_core::Result; fn GetStatus(&self) -> windows_core::Result; fn SetAnimationMode(&self, mode: UI_ANIMATION_MODE) -> windows_core::Result<()>; fn Pause(&self) -> windows_core::Result<()>; fn Resume(&self) -> windows_core::Result<()>; - fn SetManagerEventHandler(&self, handler: Option<&IUIAnimationManagerEventHandler2>, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetCancelPriorityComparison(&self, comparison: Option<&IUIAnimationPriorityComparison2>) -> windows_core::Result<()>; - fn SetTrimPriorityComparison(&self, comparison: Option<&IUIAnimationPriorityComparison2>) -> windows_core::Result<()>; - fn SetCompressPriorityComparison(&self, comparison: Option<&IUIAnimationPriorityComparison2>) -> windows_core::Result<()>; - fn SetConcludePriorityComparison(&self, comparison: Option<&IUIAnimationPriorityComparison2>) -> windows_core::Result<()>; + fn SetManagerEventHandler(&self, handler: windows_core::Ref<'_, IUIAnimationManagerEventHandler2>, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetCancelPriorityComparison(&self, comparison: windows_core::Ref<'_, IUIAnimationPriorityComparison2>) -> windows_core::Result<()>; + fn SetTrimPriorityComparison(&self, comparison: windows_core::Ref<'_, IUIAnimationPriorityComparison2>) -> windows_core::Result<()>; + fn SetCompressPriorityComparison(&self, comparison: windows_core::Ref<'_, IUIAnimationPriorityComparison2>) -> windows_core::Result<()>; + fn SetConcludePriorityComparison(&self, comparison: windows_core::Ref<'_, IUIAnimationPriorityComparison2>) -> windows_core::Result<()>; fn SetDefaultLongestAcceptableDelay(&self, delay: f64) -> windows_core::Result<()>; fn Shutdown(&self) -> windows_core::Result<()>; } @@ -718,7 +718,7 @@ impl IUIAnimationManager2_Vtbl { } unsafe extern "system" fn ScheduleTransition(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, transition: *mut core::ffi::c_void, timenow: f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager2_Impl::ScheduleTransition(this, windows_core::from_raw_borrowed(&variable), windows_core::from_raw_borrowed(&transition), core::mem::transmute_copy(&timenow)).into() + IUIAnimationManager2_Impl::ScheduleTransition(this, core::mem::transmute_copy(&variable), core::mem::transmute_copy(&transition), core::mem::transmute_copy(&timenow)).into() } unsafe extern "system" fn CreateStoryboard(this: *mut core::ffi::c_void, storyboard: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -744,7 +744,7 @@ impl IUIAnimationManager2_Vtbl { } unsafe extern "system" fn GetVariableFromTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32, variable: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAnimationManager2_Impl::GetVariableFromTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)) { + match IUIAnimationManager2_Impl::GetVariableFromTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)) { Ok(ok__) => { variable.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -754,7 +754,7 @@ impl IUIAnimationManager2_Vtbl { } unsafe extern "system" fn GetStoryboardFromTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32, storyboard: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAnimationManager2_Impl::GetStoryboardFromTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)) { + match IUIAnimationManager2_Impl::GetStoryboardFromTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)) { Ok(ok__) => { storyboard.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -796,23 +796,23 @@ impl IUIAnimationManager2_Vtbl { } unsafe extern "system" fn SetManagerEventHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager2_Impl::SetManagerEventHandler(this, windows_core::from_raw_borrowed(&handler), core::mem::transmute_copy(&fregisterfornextanimationevent)).into() + IUIAnimationManager2_Impl::SetManagerEventHandler(this, core::mem::transmute_copy(&handler), core::mem::transmute_copy(&fregisterfornextanimationevent)).into() } unsafe extern "system" fn SetCancelPriorityComparison(this: *mut core::ffi::c_void, comparison: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager2_Impl::SetCancelPriorityComparison(this, windows_core::from_raw_borrowed(&comparison)).into() + IUIAnimationManager2_Impl::SetCancelPriorityComparison(this, core::mem::transmute_copy(&comparison)).into() } unsafe extern "system" fn SetTrimPriorityComparison(this: *mut core::ffi::c_void, comparison: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager2_Impl::SetTrimPriorityComparison(this, windows_core::from_raw_borrowed(&comparison)).into() + IUIAnimationManager2_Impl::SetTrimPriorityComparison(this, core::mem::transmute_copy(&comparison)).into() } unsafe extern "system" fn SetCompressPriorityComparison(this: *mut core::ffi::c_void, comparison: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager2_Impl::SetCompressPriorityComparison(this, windows_core::from_raw_borrowed(&comparison)).into() + IUIAnimationManager2_Impl::SetCompressPriorityComparison(this, core::mem::transmute_copy(&comparison)).into() } unsafe extern "system" fn SetConcludePriorityComparison(this: *mut core::ffi::c_void, comparison: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationManager2_Impl::SetConcludePriorityComparison(this, windows_core::from_raw_borrowed(&comparison)).into() + IUIAnimationManager2_Impl::SetConcludePriorityComparison(this, core::mem::transmute_copy(&comparison)).into() } unsafe extern "system" fn SetDefaultLongestAcceptableDelay(this: *mut core::ffi::c_void, delay: f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -966,13 +966,13 @@ pub struct IUIAnimationPriorityComparison_Vtbl { pub HasPriority: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, UI_ANIMATION_PRIORITY_EFFECT) -> windows_core::HRESULT, } pub trait IUIAnimationPriorityComparison_Impl: windows_core::IUnknownImpl { - fn HasPriority(&self, scheduledstoryboard: Option<&IUIAnimationStoryboard>, newstoryboard: Option<&IUIAnimationStoryboard>, priorityeffect: UI_ANIMATION_PRIORITY_EFFECT) -> windows_core::Result<()>; + fn HasPriority(&self, scheduledstoryboard: windows_core::Ref<'_, IUIAnimationStoryboard>, newstoryboard: windows_core::Ref<'_, IUIAnimationStoryboard>, priorityeffect: UI_ANIMATION_PRIORITY_EFFECT) -> windows_core::Result<()>; } impl IUIAnimationPriorityComparison_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HasPriority(this: *mut core::ffi::c_void, scheduledstoryboard: *mut core::ffi::c_void, newstoryboard: *mut core::ffi::c_void, priorityeffect: UI_ANIMATION_PRIORITY_EFFECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationPriorityComparison_Impl::HasPriority(this, windows_core::from_raw_borrowed(&scheduledstoryboard), windows_core::from_raw_borrowed(&newstoryboard), core::mem::transmute_copy(&priorityeffect)).into() + IUIAnimationPriorityComparison_Impl::HasPriority(this, core::mem::transmute_copy(&scheduledstoryboard), core::mem::transmute_copy(&newstoryboard), core::mem::transmute_copy(&priorityeffect)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), HasPriority: HasPriority:: } } @@ -998,13 +998,13 @@ pub struct IUIAnimationPriorityComparison2_Vtbl { pub HasPriority: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, UI_ANIMATION_PRIORITY_EFFECT) -> windows_core::HRESULT, } pub trait IUIAnimationPriorityComparison2_Impl: windows_core::IUnknownImpl { - fn HasPriority(&self, scheduledstoryboard: Option<&IUIAnimationStoryboard2>, newstoryboard: Option<&IUIAnimationStoryboard2>, priorityeffect: UI_ANIMATION_PRIORITY_EFFECT) -> windows_core::Result<()>; + fn HasPriority(&self, scheduledstoryboard: windows_core::Ref<'_, IUIAnimationStoryboard2>, newstoryboard: windows_core::Ref<'_, IUIAnimationStoryboard2>, priorityeffect: UI_ANIMATION_PRIORITY_EFFECT) -> windows_core::Result<()>; } impl IUIAnimationPriorityComparison2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HasPriority(this: *mut core::ffi::c_void, scheduledstoryboard: *mut core::ffi::c_void, newstoryboard: *mut core::ffi::c_void, priorityeffect: UI_ANIMATION_PRIORITY_EFFECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationPriorityComparison2_Impl::HasPriority(this, windows_core::from_raw_borrowed(&scheduledstoryboard), windows_core::from_raw_borrowed(&newstoryboard), core::mem::transmute_copy(&priorityeffect)).into() + IUIAnimationPriorityComparison2_Impl::HasPriority(this, core::mem::transmute_copy(&scheduledstoryboard), core::mem::transmute_copy(&newstoryboard), core::mem::transmute_copy(&priorityeffect)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), HasPriority: HasPriority:: } } @@ -1118,29 +1118,29 @@ pub struct IUIAnimationStoryboard_Vtbl { pub SetStoryboardEventHandler: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAnimationStoryboard_Impl: windows_core::IUnknownImpl { - fn AddTransition(&self, variable: Option<&IUIAnimationVariable>, transition: Option<&IUIAnimationTransition>) -> windows_core::Result<()>; + fn AddTransition(&self, variable: windows_core::Ref<'_, IUIAnimationVariable>, transition: windows_core::Ref<'_, IUIAnimationTransition>) -> windows_core::Result<()>; fn AddKeyframeAtOffset(&self, existingkeyframe: UI_ANIMATION_KEYFRAME, offset: f64) -> windows_core::Result; - fn AddKeyframeAfterTransition(&self, transition: Option<&IUIAnimationTransition>) -> windows_core::Result; - fn AddTransitionAtKeyframe(&self, variable: Option<&IUIAnimationVariable>, transition: Option<&IUIAnimationTransition>, startkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()>; - fn AddTransitionBetweenKeyframes(&self, variable: Option<&IUIAnimationVariable>, transition: Option<&IUIAnimationTransition>, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()>; + fn AddKeyframeAfterTransition(&self, transition: windows_core::Ref<'_, IUIAnimationTransition>) -> windows_core::Result; + fn AddTransitionAtKeyframe(&self, variable: windows_core::Ref<'_, IUIAnimationVariable>, transition: windows_core::Ref<'_, IUIAnimationTransition>, startkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()>; + fn AddTransitionBetweenKeyframes(&self, variable: windows_core::Ref<'_, IUIAnimationVariable>, transition: windows_core::Ref<'_, IUIAnimationTransition>, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()>; fn RepeatBetweenKeyframes(&self, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME, repetitioncount: i32) -> windows_core::Result<()>; - fn HoldVariable(&self, variable: Option<&IUIAnimationVariable>) -> windows_core::Result<()>; + fn HoldVariable(&self, variable: windows_core::Ref<'_, IUIAnimationVariable>) -> windows_core::Result<()>; fn SetLongestAcceptableDelay(&self, delay: f64) -> windows_core::Result<()>; fn Schedule(&self, timenow: f64, schedulingresult: *mut UI_ANIMATION_SCHEDULING_RESULT) -> windows_core::Result<()>; fn Conclude(&self) -> windows_core::Result<()>; fn Finish(&self, completiondeadline: f64) -> windows_core::Result<()>; fn Abandon(&self) -> windows_core::Result<()>; - fn SetTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; - fn GetTag(&self, object: *mut Option, id: *mut u32) -> windows_core::Result<()>; + fn SetTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; + fn GetTag(&self, object: windows_core::OutRef<'_, windows_core::IUnknown>, id: *mut u32) -> windows_core::Result<()>; fn GetStatus(&self) -> windows_core::Result; fn GetElapsedTime(&self) -> windows_core::Result; - fn SetStoryboardEventHandler(&self, handler: Option<&IUIAnimationStoryboardEventHandler>) -> windows_core::Result<()>; + fn SetStoryboardEventHandler(&self, handler: windows_core::Ref<'_, IUIAnimationStoryboardEventHandler>) -> windows_core::Result<()>; } impl IUIAnimationStoryboard_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddTransition(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, transition: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard_Impl::AddTransition(this, windows_core::from_raw_borrowed(&variable), windows_core::from_raw_borrowed(&transition)).into() + IUIAnimationStoryboard_Impl::AddTransition(this, core::mem::transmute_copy(&variable), core::mem::transmute_copy(&transition)).into() } unsafe extern "system" fn AddKeyframeAtOffset(this: *mut core::ffi::c_void, existingkeyframe: UI_ANIMATION_KEYFRAME, offset: f64, keyframe: *mut UI_ANIMATION_KEYFRAME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1154,7 +1154,7 @@ impl IUIAnimationStoryboard_Vtbl { } unsafe extern "system" fn AddKeyframeAfterTransition(this: *mut core::ffi::c_void, transition: *mut core::ffi::c_void, keyframe: *mut UI_ANIMATION_KEYFRAME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAnimationStoryboard_Impl::AddKeyframeAfterTransition(this, windows_core::from_raw_borrowed(&transition)) { + match IUIAnimationStoryboard_Impl::AddKeyframeAfterTransition(this, core::mem::transmute_copy(&transition)) { Ok(ok__) => { keyframe.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1164,11 +1164,11 @@ impl IUIAnimationStoryboard_Vtbl { } unsafe extern "system" fn AddTransitionAtKeyframe(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, transition: *mut core::ffi::c_void, startkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard_Impl::AddTransitionAtKeyframe(this, windows_core::from_raw_borrowed(&variable), windows_core::from_raw_borrowed(&transition), core::mem::transmute_copy(&startkeyframe)).into() + IUIAnimationStoryboard_Impl::AddTransitionAtKeyframe(this, core::mem::transmute_copy(&variable), core::mem::transmute_copy(&transition), core::mem::transmute_copy(&startkeyframe)).into() } unsafe extern "system" fn AddTransitionBetweenKeyframes(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, transition: *mut core::ffi::c_void, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard_Impl::AddTransitionBetweenKeyframes(this, windows_core::from_raw_borrowed(&variable), windows_core::from_raw_borrowed(&transition), core::mem::transmute_copy(&startkeyframe), core::mem::transmute_copy(&endkeyframe)).into() + IUIAnimationStoryboard_Impl::AddTransitionBetweenKeyframes(this, core::mem::transmute_copy(&variable), core::mem::transmute_copy(&transition), core::mem::transmute_copy(&startkeyframe), core::mem::transmute_copy(&endkeyframe)).into() } unsafe extern "system" fn RepeatBetweenKeyframes(this: *mut core::ffi::c_void, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME, repetitioncount: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1176,7 +1176,7 @@ impl IUIAnimationStoryboard_Vtbl { } unsafe extern "system" fn HoldVariable(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard_Impl::HoldVariable(this, windows_core::from_raw_borrowed(&variable)).into() + IUIAnimationStoryboard_Impl::HoldVariable(this, core::mem::transmute_copy(&variable)).into() } unsafe extern "system" fn SetLongestAcceptableDelay(this: *mut core::ffi::c_void, delay: f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1200,7 +1200,7 @@ impl IUIAnimationStoryboard_Vtbl { } unsafe extern "system" fn SetTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard_Impl::SetTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)).into() + IUIAnimationStoryboard_Impl::SetTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn GetTag(this: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void, id: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1228,7 +1228,7 @@ impl IUIAnimationStoryboard_Vtbl { } unsafe extern "system" fn SetStoryboardEventHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard_Impl::SetStoryboardEventHandler(this, windows_core::from_raw_borrowed(&handler)).into() + IUIAnimationStoryboard_Impl::SetStoryboardEventHandler(this, core::mem::transmute_copy(&handler)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1368,30 +1368,30 @@ pub struct IUIAnimationStoryboard2_Vtbl { pub SetStoryboardEventHandler: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::BOOL, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IUIAnimationStoryboard2_Impl: windows_core::IUnknownImpl { - fn AddTransition(&self, variable: Option<&IUIAnimationVariable2>, transition: Option<&IUIAnimationTransition2>) -> windows_core::Result<()>; + fn AddTransition(&self, variable: windows_core::Ref<'_, IUIAnimationVariable2>, transition: windows_core::Ref<'_, IUIAnimationTransition2>) -> windows_core::Result<()>; fn AddKeyframeAtOffset(&self, existingkeyframe: UI_ANIMATION_KEYFRAME, offset: f64) -> windows_core::Result; - fn AddKeyframeAfterTransition(&self, transition: Option<&IUIAnimationTransition2>) -> windows_core::Result; - fn AddTransitionAtKeyframe(&self, variable: Option<&IUIAnimationVariable2>, transition: Option<&IUIAnimationTransition2>, startkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()>; - fn AddTransitionBetweenKeyframes(&self, variable: Option<&IUIAnimationVariable2>, transition: Option<&IUIAnimationTransition2>, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()>; - fn RepeatBetweenKeyframes(&self, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME, crepetition: f64, repeatmode: UI_ANIMATION_REPEAT_MODE, piterationchangehandler: Option<&IUIAnimationLoopIterationChangeHandler2>, id: usize, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn HoldVariable(&self, variable: Option<&IUIAnimationVariable2>) -> windows_core::Result<()>; + fn AddKeyframeAfterTransition(&self, transition: windows_core::Ref<'_, IUIAnimationTransition2>) -> windows_core::Result; + fn AddTransitionAtKeyframe(&self, variable: windows_core::Ref<'_, IUIAnimationVariable2>, transition: windows_core::Ref<'_, IUIAnimationTransition2>, startkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()>; + fn AddTransitionBetweenKeyframes(&self, variable: windows_core::Ref<'_, IUIAnimationVariable2>, transition: windows_core::Ref<'_, IUIAnimationTransition2>, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::Result<()>; + fn RepeatBetweenKeyframes(&self, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME, crepetition: f64, repeatmode: UI_ANIMATION_REPEAT_MODE, piterationchangehandler: windows_core::Ref<'_, IUIAnimationLoopIterationChangeHandler2>, id: usize, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn HoldVariable(&self, variable: windows_core::Ref<'_, IUIAnimationVariable2>) -> windows_core::Result<()>; fn SetLongestAcceptableDelay(&self, delay: f64) -> windows_core::Result<()>; fn SetSkipDuration(&self, secondsduration: f64) -> windows_core::Result<()>; fn Schedule(&self, timenow: f64, schedulingresult: *mut UI_ANIMATION_SCHEDULING_RESULT) -> windows_core::Result<()>; fn Conclude(&self) -> windows_core::Result<()>; fn Finish(&self, completiondeadline: f64) -> windows_core::Result<()>; fn Abandon(&self) -> windows_core::Result<()>; - fn SetTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; - fn GetTag(&self, object: *mut Option, id: *mut u32) -> windows_core::Result<()>; + fn SetTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; + fn GetTag(&self, object: windows_core::OutRef<'_, windows_core::IUnknown>, id: *mut u32) -> windows_core::Result<()>; fn GetStatus(&self) -> windows_core::Result; fn GetElapsedTime(&self) -> windows_core::Result; - fn SetStoryboardEventHandler(&self, handler: Option<&IUIAnimationStoryboardEventHandler2>, fregisterstatuschangefornextanimationevent: super::super::Foundation::BOOL, fregisterupdatefornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetStoryboardEventHandler(&self, handler: windows_core::Ref<'_, IUIAnimationStoryboardEventHandler2>, fregisterstatuschangefornextanimationevent: super::super::Foundation::BOOL, fregisterupdatefornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IUIAnimationStoryboard2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddTransition(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, transition: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard2_Impl::AddTransition(this, windows_core::from_raw_borrowed(&variable), windows_core::from_raw_borrowed(&transition)).into() + IUIAnimationStoryboard2_Impl::AddTransition(this, core::mem::transmute_copy(&variable), core::mem::transmute_copy(&transition)).into() } unsafe extern "system" fn AddKeyframeAtOffset(this: *mut core::ffi::c_void, existingkeyframe: UI_ANIMATION_KEYFRAME, offset: f64, keyframe: *mut UI_ANIMATION_KEYFRAME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1405,7 +1405,7 @@ impl IUIAnimationStoryboard2_Vtbl { } unsafe extern "system" fn AddKeyframeAfterTransition(this: *mut core::ffi::c_void, transition: *mut core::ffi::c_void, keyframe: *mut UI_ANIMATION_KEYFRAME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAnimationStoryboard2_Impl::AddKeyframeAfterTransition(this, windows_core::from_raw_borrowed(&transition)) { + match IUIAnimationStoryboard2_Impl::AddKeyframeAfterTransition(this, core::mem::transmute_copy(&transition)) { Ok(ok__) => { keyframe.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1415,19 +1415,19 @@ impl IUIAnimationStoryboard2_Vtbl { } unsafe extern "system" fn AddTransitionAtKeyframe(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, transition: *mut core::ffi::c_void, startkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard2_Impl::AddTransitionAtKeyframe(this, windows_core::from_raw_borrowed(&variable), windows_core::from_raw_borrowed(&transition), core::mem::transmute_copy(&startkeyframe)).into() + IUIAnimationStoryboard2_Impl::AddTransitionAtKeyframe(this, core::mem::transmute_copy(&variable), core::mem::transmute_copy(&transition), core::mem::transmute_copy(&startkeyframe)).into() } unsafe extern "system" fn AddTransitionBetweenKeyframes(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, transition: *mut core::ffi::c_void, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard2_Impl::AddTransitionBetweenKeyframes(this, windows_core::from_raw_borrowed(&variable), windows_core::from_raw_borrowed(&transition), core::mem::transmute_copy(&startkeyframe), core::mem::transmute_copy(&endkeyframe)).into() + IUIAnimationStoryboard2_Impl::AddTransitionBetweenKeyframes(this, core::mem::transmute_copy(&variable), core::mem::transmute_copy(&transition), core::mem::transmute_copy(&startkeyframe), core::mem::transmute_copy(&endkeyframe)).into() } unsafe extern "system" fn RepeatBetweenKeyframes(this: *mut core::ffi::c_void, startkeyframe: UI_ANIMATION_KEYFRAME, endkeyframe: UI_ANIMATION_KEYFRAME, crepetition: f64, repeatmode: UI_ANIMATION_REPEAT_MODE, piterationchangehandler: *mut core::ffi::c_void, id: usize, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard2_Impl::RepeatBetweenKeyframes(this, core::mem::transmute_copy(&startkeyframe), core::mem::transmute_copy(&endkeyframe), core::mem::transmute_copy(&crepetition), core::mem::transmute_copy(&repeatmode), windows_core::from_raw_borrowed(&piterationchangehandler), core::mem::transmute_copy(&id), core::mem::transmute_copy(&fregisterfornextanimationevent)).into() + IUIAnimationStoryboard2_Impl::RepeatBetweenKeyframes(this, core::mem::transmute_copy(&startkeyframe), core::mem::transmute_copy(&endkeyframe), core::mem::transmute_copy(&crepetition), core::mem::transmute_copy(&repeatmode), core::mem::transmute_copy(&piterationchangehandler), core::mem::transmute_copy(&id), core::mem::transmute_copy(&fregisterfornextanimationevent)).into() } unsafe extern "system" fn HoldVariable(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard2_Impl::HoldVariable(this, windows_core::from_raw_borrowed(&variable)).into() + IUIAnimationStoryboard2_Impl::HoldVariable(this, core::mem::transmute_copy(&variable)).into() } unsafe extern "system" fn SetLongestAcceptableDelay(this: *mut core::ffi::c_void, delay: f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1455,7 +1455,7 @@ impl IUIAnimationStoryboard2_Vtbl { } unsafe extern "system" fn SetTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard2_Impl::SetTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)).into() + IUIAnimationStoryboard2_Impl::SetTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn GetTag(this: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void, id: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1483,7 +1483,7 @@ impl IUIAnimationStoryboard2_Vtbl { } unsafe extern "system" fn SetStoryboardEventHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, fregisterstatuschangefornextanimationevent: super::super::Foundation::BOOL, fregisterupdatefornextanimationevent: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboard2_Impl::SetStoryboardEventHandler(this, windows_core::from_raw_borrowed(&handler), core::mem::transmute_copy(&fregisterstatuschangefornextanimationevent), core::mem::transmute_copy(&fregisterupdatefornextanimationevent)).into() + IUIAnimationStoryboard2_Impl::SetStoryboardEventHandler(this, core::mem::transmute_copy(&handler), core::mem::transmute_copy(&fregisterstatuschangefornextanimationevent), core::mem::transmute_copy(&fregisterupdatefornextanimationevent)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1535,18 +1535,18 @@ pub struct IUIAnimationStoryboardEventHandler_Vtbl { pub OnStoryboardUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAnimationStoryboardEventHandler_Impl: windows_core::IUnknownImpl { - fn OnStoryboardStatusChanged(&self, storyboard: Option<&IUIAnimationStoryboard>, newstatus: UI_ANIMATION_STORYBOARD_STATUS, previousstatus: UI_ANIMATION_STORYBOARD_STATUS) -> windows_core::Result<()>; - fn OnStoryboardUpdated(&self, storyboard: Option<&IUIAnimationStoryboard>) -> windows_core::Result<()>; + fn OnStoryboardStatusChanged(&self, storyboard: windows_core::Ref<'_, IUIAnimationStoryboard>, newstatus: UI_ANIMATION_STORYBOARD_STATUS, previousstatus: UI_ANIMATION_STORYBOARD_STATUS) -> windows_core::Result<()>; + fn OnStoryboardUpdated(&self, storyboard: windows_core::Ref<'_, IUIAnimationStoryboard>) -> windows_core::Result<()>; } impl IUIAnimationStoryboardEventHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnStoryboardStatusChanged(this: *mut core::ffi::c_void, storyboard: *mut core::ffi::c_void, newstatus: UI_ANIMATION_STORYBOARD_STATUS, previousstatus: UI_ANIMATION_STORYBOARD_STATUS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboardEventHandler_Impl::OnStoryboardStatusChanged(this, windows_core::from_raw_borrowed(&storyboard), core::mem::transmute_copy(&newstatus), core::mem::transmute_copy(&previousstatus)).into() + IUIAnimationStoryboardEventHandler_Impl::OnStoryboardStatusChanged(this, core::mem::transmute_copy(&storyboard), core::mem::transmute_copy(&newstatus), core::mem::transmute_copy(&previousstatus)).into() } unsafe extern "system" fn OnStoryboardUpdated(this: *mut core::ffi::c_void, storyboard: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboardEventHandler_Impl::OnStoryboardUpdated(this, windows_core::from_raw_borrowed(&storyboard)).into() + IUIAnimationStoryboardEventHandler_Impl::OnStoryboardUpdated(this, core::mem::transmute_copy(&storyboard)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1582,18 +1582,18 @@ pub struct IUIAnimationStoryboardEventHandler2_Vtbl { pub OnStoryboardUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAnimationStoryboardEventHandler2_Impl: windows_core::IUnknownImpl { - fn OnStoryboardStatusChanged(&self, storyboard: Option<&IUIAnimationStoryboard2>, newstatus: UI_ANIMATION_STORYBOARD_STATUS, previousstatus: UI_ANIMATION_STORYBOARD_STATUS) -> windows_core::Result<()>; - fn OnStoryboardUpdated(&self, storyboard: Option<&IUIAnimationStoryboard2>) -> windows_core::Result<()>; + fn OnStoryboardStatusChanged(&self, storyboard: windows_core::Ref<'_, IUIAnimationStoryboard2>, newstatus: UI_ANIMATION_STORYBOARD_STATUS, previousstatus: UI_ANIMATION_STORYBOARD_STATUS) -> windows_core::Result<()>; + fn OnStoryboardUpdated(&self, storyboard: windows_core::Ref<'_, IUIAnimationStoryboard2>) -> windows_core::Result<()>; } impl IUIAnimationStoryboardEventHandler2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnStoryboardStatusChanged(this: *mut core::ffi::c_void, storyboard: *mut core::ffi::c_void, newstatus: UI_ANIMATION_STORYBOARD_STATUS, previousstatus: UI_ANIMATION_STORYBOARD_STATUS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboardEventHandler2_Impl::OnStoryboardStatusChanged(this, windows_core::from_raw_borrowed(&storyboard), core::mem::transmute_copy(&newstatus), core::mem::transmute_copy(&previousstatus)).into() + IUIAnimationStoryboardEventHandler2_Impl::OnStoryboardStatusChanged(this, core::mem::transmute_copy(&storyboard), core::mem::transmute_copy(&newstatus), core::mem::transmute_copy(&previousstatus)).into() } unsafe extern "system" fn OnStoryboardUpdated(this: *mut core::ffi::c_void, storyboard: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationStoryboardEventHandler2_Impl::OnStoryboardUpdated(this, windows_core::from_raw_borrowed(&storyboard)).into() + IUIAnimationStoryboardEventHandler2_Impl::OnStoryboardUpdated(this, core::mem::transmute_copy(&storyboard)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1650,8 +1650,8 @@ pub struct IUIAnimationTimer_Vtbl { pub SetFrameRateThreshold: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IUIAnimationTimer_Impl: windows_core::IUnknownImpl { - fn SetTimerUpdateHandler(&self, updatehandler: Option<&IUIAnimationTimerUpdateHandler>, idlebehavior: UI_ANIMATION_IDLE_BEHAVIOR) -> windows_core::Result<()>; - fn SetTimerEventHandler(&self, handler: Option<&IUIAnimationTimerEventHandler>) -> windows_core::Result<()>; + fn SetTimerUpdateHandler(&self, updatehandler: windows_core::Ref<'_, IUIAnimationTimerUpdateHandler>, idlebehavior: UI_ANIMATION_IDLE_BEHAVIOR) -> windows_core::Result<()>; + fn SetTimerEventHandler(&self, handler: windows_core::Ref<'_, IUIAnimationTimerEventHandler>) -> windows_core::Result<()>; fn Enable(&self) -> windows_core::Result<()>; fn Disable(&self) -> windows_core::Result<()>; fn IsEnabled(&self) -> windows_core::Result<()>; @@ -1662,11 +1662,11 @@ impl IUIAnimationTimer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetTimerUpdateHandler(this: *mut core::ffi::c_void, updatehandler: *mut core::ffi::c_void, idlebehavior: UI_ANIMATION_IDLE_BEHAVIOR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationTimer_Impl::SetTimerUpdateHandler(this, windows_core::from_raw_borrowed(&updatehandler), core::mem::transmute_copy(&idlebehavior)).into() + IUIAnimationTimer_Impl::SetTimerUpdateHandler(this, core::mem::transmute_copy(&updatehandler), core::mem::transmute_copy(&idlebehavior)).into() } unsafe extern "system" fn SetTimerEventHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationTimer_Impl::SetTimerEventHandler(this, windows_core::from_raw_borrowed(&handler)).into() + IUIAnimationTimer_Impl::SetTimerEventHandler(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn Enable(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1815,7 +1815,7 @@ pub struct IUIAnimationTimerUpdateHandler_Vtbl { } pub trait IUIAnimationTimerUpdateHandler_Impl: windows_core::IUnknownImpl { fn OnUpdate(&self, timenow: f64) -> windows_core::Result; - fn SetTimerClientEventHandler(&self, handler: Option<&IUIAnimationTimerClientEventHandler>) -> windows_core::Result<()>; + fn SetTimerClientEventHandler(&self, handler: windows_core::Ref<'_, IUIAnimationTimerClientEventHandler>) -> windows_core::Result<()>; fn ClearTimerClientEventHandler(&self) -> windows_core::Result<()>; } impl IUIAnimationTimerUpdateHandler_Vtbl { @@ -1832,7 +1832,7 @@ impl IUIAnimationTimerUpdateHandler_Vtbl { } unsafe extern "system" fn SetTimerClientEventHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationTimerUpdateHandler_Impl::SetTimerClientEventHandler(this, windows_core::from_raw_borrowed(&handler)).into() + IUIAnimationTimerUpdateHandler_Impl::SetTimerClientEventHandler(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn ClearTimerClientEventHandler(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2040,13 +2040,13 @@ pub struct IUIAnimationTransitionFactory_Vtbl { pub CreateTransition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAnimationTransitionFactory_Impl: windows_core::IUnknownImpl { - fn CreateTransition(&self, interpolator: Option<&IUIAnimationInterpolator>) -> windows_core::Result; + fn CreateTransition(&self, interpolator: windows_core::Ref<'_, IUIAnimationInterpolator>) -> windows_core::Result; } impl IUIAnimationTransitionFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateTransition(this: *mut core::ffi::c_void, interpolator: *mut core::ffi::c_void, transition: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAnimationTransitionFactory_Impl::CreateTransition(this, windows_core::from_raw_borrowed(&interpolator)) { + match IUIAnimationTransitionFactory_Impl::CreateTransition(this, core::mem::transmute_copy(&interpolator)) { Ok(ok__) => { transition.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2078,13 +2078,13 @@ pub struct IUIAnimationTransitionFactory2_Vtbl { pub CreateTransition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAnimationTransitionFactory2_Impl: windows_core::IUnknownImpl { - fn CreateTransition(&self, interpolator: Option<&IUIAnimationInterpolator2>) -> windows_core::Result; + fn CreateTransition(&self, interpolator: windows_core::Ref<'_, IUIAnimationInterpolator2>) -> windows_core::Result; } impl IUIAnimationTransitionFactory2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateTransition(this: *mut core::ffi::c_void, interpolator: *mut core::ffi::c_void, transition: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUIAnimationTransitionFactory2_Impl::CreateTransition(this, windows_core::from_raw_borrowed(&interpolator)) { + match IUIAnimationTransitionFactory2_Impl::CreateTransition(this, core::mem::transmute_copy(&interpolator)) { Ok(ok__) => { transition.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2759,10 +2759,10 @@ pub trait IUIAnimationVariable_Impl: windows_core::IUnknownImpl { fn SetLowerBound(&self, bound: f64) -> windows_core::Result<()>; fn SetUpperBound(&self, bound: f64) -> windows_core::Result<()>; fn SetRoundingMode(&self, mode: UI_ANIMATION_ROUNDING_MODE) -> windows_core::Result<()>; - fn SetTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; - fn GetTag(&self, object: *mut Option, id: *mut u32) -> windows_core::Result<()>; - fn SetVariableChangeHandler(&self, handler: Option<&IUIAnimationVariableChangeHandler>) -> windows_core::Result<()>; - fn SetVariableIntegerChangeHandler(&self, handler: Option<&IUIAnimationVariableIntegerChangeHandler>) -> windows_core::Result<()>; + fn SetTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; + fn GetTag(&self, object: windows_core::OutRef<'_, windows_core::IUnknown>, id: *mut u32) -> windows_core::Result<()>; + fn SetVariableChangeHandler(&self, handler: windows_core::Ref<'_, IUIAnimationVariableChangeHandler>) -> windows_core::Result<()>; + fn SetVariableIntegerChangeHandler(&self, handler: windows_core::Ref<'_, IUIAnimationVariableIntegerChangeHandler>) -> windows_core::Result<()>; } impl IUIAnimationVariable_Vtbl { pub const fn new() -> Self { @@ -2850,7 +2850,7 @@ impl IUIAnimationVariable_Vtbl { } unsafe extern "system" fn SetTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariable_Impl::SetTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)).into() + IUIAnimationVariable_Impl::SetTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn GetTag(this: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void, id: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2858,11 +2858,11 @@ impl IUIAnimationVariable_Vtbl { } unsafe extern "system" fn SetVariableChangeHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariable_Impl::SetVariableChangeHandler(this, windows_core::from_raw_borrowed(&handler)).into() + IUIAnimationVariable_Impl::SetVariableChangeHandler(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn SetVariableIntegerChangeHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariable_Impl::SetVariableIntegerChangeHandler(this, windows_core::from_raw_borrowed(&handler)).into() + IUIAnimationVariable_Impl::SetVariableIntegerChangeHandler(this, core::mem::transmute_copy(&handler)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3035,7 +3035,7 @@ pub trait IUIAnimationVariable2_Impl: windows_core::IUnknownImpl { fn GetDimension(&self) -> windows_core::Result; fn GetValue(&self) -> windows_core::Result; fn GetVectorValue(&self, value: *mut f64, cdimension: u32) -> windows_core::Result<()>; - fn GetCurve(&self, animation: Option<&super::super::Graphics::DirectComposition::IDCompositionAnimation>) -> windows_core::Result<()>; + fn GetCurve(&self, animation: windows_core::Ref<'_, super::super::Graphics::DirectComposition::IDCompositionAnimation>) -> windows_core::Result<()>; fn GetVectorCurve(&self, animation: *const Option, cdimension: u32) -> windows_core::Result<()>; fn GetFinalValue(&self) -> windows_core::Result; fn GetFinalVectorValue(&self, finalvalue: *mut f64, cdimension: u32) -> windows_core::Result<()>; @@ -3053,11 +3053,11 @@ pub trait IUIAnimationVariable2_Impl: windows_core::IUnknownImpl { fn SetUpperBound(&self, bound: f64) -> windows_core::Result<()>; fn SetUpperBoundVector(&self, bound: *const f64, cdimension: u32) -> windows_core::Result<()>; fn SetRoundingMode(&self, mode: UI_ANIMATION_ROUNDING_MODE) -> windows_core::Result<()>; - fn SetTag(&self, object: Option<&windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; - fn GetTag(&self, object: *mut Option, id: *mut u32) -> windows_core::Result<()>; - fn SetVariableChangeHandler(&self, handler: Option<&IUIAnimationVariableChangeHandler2>, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetVariableIntegerChangeHandler(&self, handler: Option<&IUIAnimationVariableIntegerChangeHandler2>, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetVariableCurveChangeHandler(&self, handler: Option<&IUIAnimationVariableCurveChangeHandler2>) -> windows_core::Result<()>; + fn SetTag(&self, object: windows_core::Ref<'_, windows_core::IUnknown>, id: u32) -> windows_core::Result<()>; + fn GetTag(&self, object: windows_core::OutRef<'_, windows_core::IUnknown>, id: *mut u32) -> windows_core::Result<()>; + fn SetVariableChangeHandler(&self, handler: windows_core::Ref<'_, IUIAnimationVariableChangeHandler2>, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetVariableIntegerChangeHandler(&self, handler: windows_core::Ref<'_, IUIAnimationVariableIntegerChangeHandler2>, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetVariableCurveChangeHandler(&self, handler: windows_core::Ref<'_, IUIAnimationVariableCurveChangeHandler2>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_DirectComposition")] impl IUIAnimationVariable2_Vtbl { @@ -3088,7 +3088,7 @@ impl IUIAnimationVariable2_Vtbl { } unsafe extern "system" fn GetCurve(this: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariable2_Impl::GetCurve(this, windows_core::from_raw_borrowed(&animation)).into() + IUIAnimationVariable2_Impl::GetCurve(this, core::mem::transmute_copy(&animation)).into() } unsafe extern "system" fn GetVectorCurve(this: *mut core::ffi::c_void, animation: *const *mut core::ffi::c_void, cdimension: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3196,7 +3196,7 @@ impl IUIAnimationVariable2_Vtbl { } unsafe extern "system" fn SetTag(this: *mut core::ffi::c_void, object: *mut core::ffi::c_void, id: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariable2_Impl::SetTag(this, windows_core::from_raw_borrowed(&object), core::mem::transmute_copy(&id)).into() + IUIAnimationVariable2_Impl::SetTag(this, core::mem::transmute_copy(&object), core::mem::transmute_copy(&id)).into() } unsafe extern "system" fn GetTag(this: *mut core::ffi::c_void, object: *mut *mut core::ffi::c_void, id: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3204,15 +3204,15 @@ impl IUIAnimationVariable2_Vtbl { } unsafe extern "system" fn SetVariableChangeHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariable2_Impl::SetVariableChangeHandler(this, windows_core::from_raw_borrowed(&handler), core::mem::transmute_copy(&fregisterfornextanimationevent)).into() + IUIAnimationVariable2_Impl::SetVariableChangeHandler(this, core::mem::transmute_copy(&handler), core::mem::transmute_copy(&fregisterfornextanimationevent)).into() } unsafe extern "system" fn SetVariableIntegerChangeHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void, fregisterfornextanimationevent: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariable2_Impl::SetVariableIntegerChangeHandler(this, windows_core::from_raw_borrowed(&handler), core::mem::transmute_copy(&fregisterfornextanimationevent)).into() + IUIAnimationVariable2_Impl::SetVariableIntegerChangeHandler(this, core::mem::transmute_copy(&handler), core::mem::transmute_copy(&fregisterfornextanimationevent)).into() } unsafe extern "system" fn SetVariableCurveChangeHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariable2_Impl::SetVariableCurveChangeHandler(this, windows_core::from_raw_borrowed(&handler)).into() + IUIAnimationVariable2_Impl::SetVariableCurveChangeHandler(this, core::mem::transmute_copy(&handler)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3267,13 +3267,13 @@ pub struct IUIAnimationVariableChangeHandler_Vtbl { pub OnValueChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, f64, f64) -> windows_core::HRESULT, } pub trait IUIAnimationVariableChangeHandler_Impl: windows_core::IUnknownImpl { - fn OnValueChanged(&self, storyboard: Option<&IUIAnimationStoryboard>, variable: Option<&IUIAnimationVariable>, newvalue: f64, previousvalue: f64) -> windows_core::Result<()>; + fn OnValueChanged(&self, storyboard: windows_core::Ref<'_, IUIAnimationStoryboard>, variable: windows_core::Ref<'_, IUIAnimationVariable>, newvalue: f64, previousvalue: f64) -> windows_core::Result<()>; } impl IUIAnimationVariableChangeHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnValueChanged(this: *mut core::ffi::c_void, storyboard: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, newvalue: f64, previousvalue: f64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariableChangeHandler_Impl::OnValueChanged(this, windows_core::from_raw_borrowed(&storyboard), windows_core::from_raw_borrowed(&variable), core::mem::transmute_copy(&newvalue), core::mem::transmute_copy(&previousvalue)).into() + IUIAnimationVariableChangeHandler_Impl::OnValueChanged(this, core::mem::transmute_copy(&storyboard), core::mem::transmute_copy(&variable), core::mem::transmute_copy(&newvalue), core::mem::transmute_copy(&previousvalue)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnValueChanged: OnValueChanged:: } } @@ -3299,13 +3299,13 @@ pub struct IUIAnimationVariableChangeHandler2_Vtbl { pub OnValueChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *const f64, *const f64, u32) -> windows_core::HRESULT, } pub trait IUIAnimationVariableChangeHandler2_Impl: windows_core::IUnknownImpl { - fn OnValueChanged(&self, storyboard: Option<&IUIAnimationStoryboard2>, variable: Option<&IUIAnimationVariable2>, newvalue: *const f64, previousvalue: *const f64, cdimension: u32) -> windows_core::Result<()>; + fn OnValueChanged(&self, storyboard: windows_core::Ref<'_, IUIAnimationStoryboard2>, variable: windows_core::Ref<'_, IUIAnimationVariable2>, newvalue: *const f64, previousvalue: *const f64, cdimension: u32) -> windows_core::Result<()>; } impl IUIAnimationVariableChangeHandler2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnValueChanged(this: *mut core::ffi::c_void, storyboard: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, newvalue: *const f64, previousvalue: *const f64, cdimension: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariableChangeHandler2_Impl::OnValueChanged(this, windows_core::from_raw_borrowed(&storyboard), windows_core::from_raw_borrowed(&variable), core::mem::transmute_copy(&newvalue), core::mem::transmute_copy(&previousvalue), core::mem::transmute_copy(&cdimension)).into() + IUIAnimationVariableChangeHandler2_Impl::OnValueChanged(this, core::mem::transmute_copy(&storyboard), core::mem::transmute_copy(&variable), core::mem::transmute_copy(&newvalue), core::mem::transmute_copy(&previousvalue), core::mem::transmute_copy(&cdimension)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnValueChanged: OnValueChanged:: } } @@ -3330,13 +3330,13 @@ pub struct IUIAnimationVariableCurveChangeHandler2_Vtbl { pub OnCurveChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIAnimationVariableCurveChangeHandler2_Impl: windows_core::IUnknownImpl { - fn OnCurveChanged(&self, variable: Option<&IUIAnimationVariable2>) -> windows_core::Result<()>; + fn OnCurveChanged(&self, variable: windows_core::Ref<'_, IUIAnimationVariable2>) -> windows_core::Result<()>; } impl IUIAnimationVariableCurveChangeHandler2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnCurveChanged(this: *mut core::ffi::c_void, variable: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariableCurveChangeHandler2_Impl::OnCurveChanged(this, windows_core::from_raw_borrowed(&variable)).into() + IUIAnimationVariableCurveChangeHandler2_Impl::OnCurveChanged(this, core::mem::transmute_copy(&variable)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnCurveChanged: OnCurveChanged:: } } @@ -3362,13 +3362,13 @@ pub struct IUIAnimationVariableIntegerChangeHandler_Vtbl { pub OnIntegerValueChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, i32, i32) -> windows_core::HRESULT, } pub trait IUIAnimationVariableIntegerChangeHandler_Impl: windows_core::IUnknownImpl { - fn OnIntegerValueChanged(&self, storyboard: Option<&IUIAnimationStoryboard>, variable: Option<&IUIAnimationVariable>, newvalue: i32, previousvalue: i32) -> windows_core::Result<()>; + fn OnIntegerValueChanged(&self, storyboard: windows_core::Ref<'_, IUIAnimationStoryboard>, variable: windows_core::Ref<'_, IUIAnimationVariable>, newvalue: i32, previousvalue: i32) -> windows_core::Result<()>; } impl IUIAnimationVariableIntegerChangeHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnIntegerValueChanged(this: *mut core::ffi::c_void, storyboard: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, newvalue: i32, previousvalue: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariableIntegerChangeHandler_Impl::OnIntegerValueChanged(this, windows_core::from_raw_borrowed(&storyboard), windows_core::from_raw_borrowed(&variable), core::mem::transmute_copy(&newvalue), core::mem::transmute_copy(&previousvalue)).into() + IUIAnimationVariableIntegerChangeHandler_Impl::OnIntegerValueChanged(this, core::mem::transmute_copy(&storyboard), core::mem::transmute_copy(&variable), core::mem::transmute_copy(&newvalue), core::mem::transmute_copy(&previousvalue)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnIntegerValueChanged: OnIntegerValueChanged:: } } @@ -3394,13 +3394,13 @@ pub struct IUIAnimationVariableIntegerChangeHandler2_Vtbl { pub OnIntegerValueChanged: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *const i32, *const i32, u32) -> windows_core::HRESULT, } pub trait IUIAnimationVariableIntegerChangeHandler2_Impl: windows_core::IUnknownImpl { - fn OnIntegerValueChanged(&self, storyboard: Option<&IUIAnimationStoryboard2>, variable: Option<&IUIAnimationVariable2>, newvalue: *const i32, previousvalue: *const i32, cdimension: u32) -> windows_core::Result<()>; + fn OnIntegerValueChanged(&self, storyboard: windows_core::Ref<'_, IUIAnimationStoryboard2>, variable: windows_core::Ref<'_, IUIAnimationVariable2>, newvalue: *const i32, previousvalue: *const i32, cdimension: u32) -> windows_core::Result<()>; } impl IUIAnimationVariableIntegerChangeHandler2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnIntegerValueChanged(this: *mut core::ffi::c_void, storyboard: *mut core::ffi::c_void, variable: *mut core::ffi::c_void, newvalue: *const i32, previousvalue: *const i32, cdimension: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIAnimationVariableIntegerChangeHandler2_Impl::OnIntegerValueChanged(this, windows_core::from_raw_borrowed(&storyboard), windows_core::from_raw_borrowed(&variable), core::mem::transmute_copy(&newvalue), core::mem::transmute_copy(&previousvalue), core::mem::transmute_copy(&cdimension)).into() + IUIAnimationVariableIntegerChangeHandler2_Impl::OnIntegerValueChanged(this, core::mem::transmute_copy(&storyboard), core::mem::transmute_copy(&variable), core::mem::transmute_copy(&newvalue), core::mem::transmute_copy(&previousvalue), core::mem::transmute_copy(&cdimension)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnIntegerValueChanged: OnIntegerValueChanged:: } } diff --git a/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs index 0c3c30e222..ca4365d4ec 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs @@ -1300,7 +1300,7 @@ pub trait IDeviceModelPlugIn_Impl: windows_core::IUnknownImpl { fn DeviceToColorimetricColors(&self, ccolors: u32, cchannels: u32, pdevicevalues: *const f32, pxyzcolors: *mut XYZColorF) -> windows_core::Result<()>; fn ColorimetricToDeviceColors(&self, ccolors: u32, cchannels: u32, pxyzcolors: *const XYZColorF) -> windows_core::Result; fn ColorimetricToDeviceColorsWithBlack(&self, ccolors: u32, cchannels: u32, pxyzcolors: *const XYZColorF, pblackinformation: *const BlackInformation) -> windows_core::Result; - fn SetTransformDeviceModelInfo(&self, imodelposition: u32, pidevicemodelother: Option<&IDeviceModelPlugIn>) -> windows_core::Result<()>; + fn SetTransformDeviceModelInfo(&self, imodelposition: u32, pidevicemodelother: windows_core::Ref<'_, IDeviceModelPlugIn>) -> windows_core::Result<()>; fn GetPrimarySamples(&self, pprimarycolor: *mut PrimaryXYZColors) -> windows_core::Result<()>; fn GetGamutBoundaryMeshSize(&self, pnumvertices: *mut u32, pnumtriangles: *mut u32) -> windows_core::Result<()>; fn GetGamutBoundaryMesh(&self, cchannels: u32, cvertices: u32, ctriangles: u32, pvertices: *mut f32, ptriangles: *mut GamutShellTriangle) -> windows_core::Result<()>; @@ -1349,7 +1349,7 @@ impl IDeviceModelPlugIn_Vtbl { } unsafe extern "system" fn SetTransformDeviceModelInfo(this: *mut core::ffi::c_void, imodelposition: u32, pidevicemodelother: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDeviceModelPlugIn_Impl::SetTransformDeviceModelInfo(this, core::mem::transmute_copy(&imodelposition), windows_core::from_raw_borrowed(&pidevicemodelother)).into() + IDeviceModelPlugIn_Impl::SetTransformDeviceModelInfo(this, core::mem::transmute_copy(&imodelposition), core::mem::transmute_copy(&pidevicemodelother)).into() } unsafe extern "system" fn GetPrimarySamples(this: *mut core::ffi::c_void, pprimarycolor: *mut PrimaryXYZColors) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1419,14 +1419,14 @@ pub struct IGamutMapModelPlugIn_Vtbl { pub SourceToDestinationAppearanceColors: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const JChColorF, *mut JChColorF) -> windows_core::HRESULT, } pub trait IGamutMapModelPlugIn_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, bstrxml: &windows_core::BSTR, psrcplugin: Option<&IDeviceModelPlugIn>, pdestplugin: Option<&IDeviceModelPlugIn>, psrcgbd: *const GamutBoundaryDescription, pdestgbd: *const GamutBoundaryDescription) -> windows_core::Result<()>; + fn Initialize(&self, bstrxml: &windows_core::BSTR, psrcplugin: windows_core::Ref<'_, IDeviceModelPlugIn>, pdestplugin: windows_core::Ref<'_, IDeviceModelPlugIn>, psrcgbd: *const GamutBoundaryDescription, pdestgbd: *const GamutBoundaryDescription) -> windows_core::Result<()>; fn SourceToDestinationAppearanceColors(&self, ccolors: u32, pinputcolors: *const JChColorF) -> windows_core::Result; } impl IGamutMapModelPlugIn_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, bstrxml: *mut core::ffi::c_void, psrcplugin: *mut core::ffi::c_void, pdestplugin: *mut core::ffi::c_void, psrcgbd: *const GamutBoundaryDescription, pdestgbd: *const GamutBoundaryDescription) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IGamutMapModelPlugIn_Impl::Initialize(this, core::mem::transmute(&bstrxml), windows_core::from_raw_borrowed(&psrcplugin), windows_core::from_raw_borrowed(&pdestplugin), core::mem::transmute_copy(&psrcgbd), core::mem::transmute_copy(&pdestgbd)).into() + IGamutMapModelPlugIn_Impl::Initialize(this, core::mem::transmute(&bstrxml), core::mem::transmute_copy(&psrcplugin), core::mem::transmute_copy(&pdestplugin), core::mem::transmute_copy(&psrcgbd), core::mem::transmute_copy(&pdestgbd)).into() } unsafe extern "system" fn SourceToDestinationAppearanceColors(this: *mut core::ffi::c_void, ccolors: u32, pinputcolors: *const JChColorF, poutputcolors: *mut JChColorF) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs index 3b5fba6732..ba0bf85c46 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/RichEdit/mod.rs @@ -1353,11 +1353,11 @@ pub trait IRichEditOle_Impl: windows_core::IUnknownImpl { fn SetLinkAvailable(&self, iob: i32, favailable: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetDvaspect(&self, iob: i32, dvaspect: u32) -> windows_core::Result<()>; fn HandsOffStorage(&self, iob: i32) -> windows_core::Result<()>; - fn SaveCompleted(&self, iob: i32, lpstg: Option<&super::super::super::System::Com::StructuredStorage::IStorage>) -> windows_core::Result<()>; + fn SaveCompleted(&self, iob: i32, lpstg: windows_core::Ref<'_, super::super::super::System::Com::StructuredStorage::IStorage>) -> windows_core::Result<()>; fn InPlaceDeactivate(&self) -> windows_core::Result<()>; fn ContextSensitiveHelp(&self, fentermode: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn GetClipboardData(&self, lpchrg: *mut CHARRANGE, reco: u32, lplpdataobj: *mut Option) -> windows_core::Result<()>; - fn ImportDataObject(&self, lpdataobj: Option<&super::super::super::System::Com::IDataObject>, cf: u16, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::Result<()>; + fn GetClipboardData(&self, lpchrg: *mut CHARRANGE, reco: u32, lplpdataobj: windows_core::OutRef<'_, super::super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn ImportDataObject(&self, lpdataobj: windows_core::Ref<'_, super::super::super::System::Com::IDataObject>, cf: u16, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Ole"))] impl IRichEditOle_Vtbl { @@ -1414,7 +1414,7 @@ impl IRichEditOle_Vtbl { } unsafe extern "system" fn SaveCompleted(this: *mut core::ffi::c_void, iob: i32, lpstg: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRichEditOle_Impl::SaveCompleted(this, core::mem::transmute_copy(&iob), windows_core::from_raw_borrowed(&lpstg)).into() + IRichEditOle_Impl::SaveCompleted(this, core::mem::transmute_copy(&iob), core::mem::transmute_copy(&lpstg)).into() } unsafe extern "system" fn InPlaceDeactivate(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1430,7 +1430,7 @@ impl IRichEditOle_Vtbl { } unsafe extern "system" fn ImportDataObject(this: *mut core::ffi::c_void, lpdataobj: *mut core::ffi::c_void, cf: u16, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRichEditOle_Impl::ImportDataObject(this, windows_core::from_raw_borrowed(&lpdataobj), core::mem::transmute_copy(&cf), core::mem::transmute_copy(&hmetapict)).into() + IRichEditOle_Impl::ImportDataObject(this, core::mem::transmute_copy(&lpdataobj), core::mem::transmute_copy(&cf), core::mem::transmute_copy(&hmetapict)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1554,15 +1554,15 @@ pub struct IRichEditOleCallback_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Ole", feature = "Win32_System_SystemServices", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IRichEditOleCallback_Impl: windows_core::IUnknownImpl { fn GetNewStorage(&self) -> windows_core::Result; - fn GetInPlaceContext(&self, lplpframe: *mut Option, lplpdoc: *mut Option, lpframeinfo: *mut super::super::super::System::Ole::OLEINPLACEFRAMEINFO) -> windows_core::Result<()>; + fn GetInPlaceContext(&self, lplpframe: windows_core::OutRef<'_, super::super::super::System::Ole::IOleInPlaceFrame>, lplpdoc: windows_core::OutRef<'_, super::super::super::System::Ole::IOleInPlaceUIWindow>, lpframeinfo: *mut super::super::super::System::Ole::OLEINPLACEFRAMEINFO) -> windows_core::Result<()>; fn ShowContainerUI(&self, fshow: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn QueryInsertObject(&self, lpclsid: *mut windows_core::GUID, lpstg: Option<&super::super::super::System::Com::StructuredStorage::IStorage>, cp: i32) -> windows_core::Result<()>; - fn DeleteObject(&self, lpoleobj: Option<&super::super::super::System::Ole::IOleObject>) -> windows_core::Result<()>; - fn QueryAcceptData(&self, lpdataobj: Option<&super::super::super::System::Com::IDataObject>, lpcfformat: *mut u16, reco: super::super::super::System::SystemServices::RECO_FLAGS, freally: super::super::super::Foundation::BOOL, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::Result<()>; + fn QueryInsertObject(&self, lpclsid: *mut windows_core::GUID, lpstg: windows_core::Ref<'_, super::super::super::System::Com::StructuredStorage::IStorage>, cp: i32) -> windows_core::Result<()>; + fn DeleteObject(&self, lpoleobj: windows_core::Ref<'_, super::super::super::System::Ole::IOleObject>) -> windows_core::Result<()>; + fn QueryAcceptData(&self, lpdataobj: windows_core::Ref<'_, super::super::super::System::Com::IDataObject>, lpcfformat: *mut u16, reco: super::super::super::System::SystemServices::RECO_FLAGS, freally: super::super::super::Foundation::BOOL, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::Result<()>; fn ContextSensitiveHelp(&self, fentermode: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn GetClipboardData(&self, lpchrg: *mut CHARRANGE, reco: u32, lplpdataobj: *mut Option) -> windows_core::Result<()>; + fn GetClipboardData(&self, lpchrg: *mut CHARRANGE, reco: u32, lplpdataobj: windows_core::OutRef<'_, super::super::super::System::Com::IDataObject>) -> windows_core::Result<()>; fn GetDragDropEffect(&self, fdrag: super::super::super::Foundation::BOOL, grfkeystate: super::super::super::System::SystemServices::MODIFIERKEYS_FLAGS, pdweffect: *mut super::super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()>; - fn GetContextMenu(&self, seltype: RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE, lpoleobj: Option<&super::super::super::System::Ole::IOleObject>, lpchrg: *mut CHARRANGE, lphmenu: *mut super::super::WindowsAndMessaging::HMENU) -> windows_core::Result<()>; + fn GetContextMenu(&self, seltype: RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE, lpoleobj: windows_core::Ref<'_, super::super::super::System::Ole::IOleObject>, lpchrg: *mut CHARRANGE, lphmenu: *mut super::super::WindowsAndMessaging::HMENU) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Ole", feature = "Win32_System_SystemServices", feature = "Win32_UI_WindowsAndMessaging"))] impl IRichEditOleCallback_Vtbl { @@ -1587,15 +1587,15 @@ impl IRichEditOleCallback_Vtbl { } unsafe extern "system" fn QueryInsertObject(this: *mut core::ffi::c_void, lpclsid: *mut windows_core::GUID, lpstg: *mut core::ffi::c_void, cp: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRichEditOleCallback_Impl::QueryInsertObject(this, core::mem::transmute_copy(&lpclsid), windows_core::from_raw_borrowed(&lpstg), core::mem::transmute_copy(&cp)).into() + IRichEditOleCallback_Impl::QueryInsertObject(this, core::mem::transmute_copy(&lpclsid), core::mem::transmute_copy(&lpstg), core::mem::transmute_copy(&cp)).into() } unsafe extern "system" fn DeleteObject(this: *mut core::ffi::c_void, lpoleobj: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRichEditOleCallback_Impl::DeleteObject(this, windows_core::from_raw_borrowed(&lpoleobj)).into() + IRichEditOleCallback_Impl::DeleteObject(this, core::mem::transmute_copy(&lpoleobj)).into() } unsafe extern "system" fn QueryAcceptData(this: *mut core::ffi::c_void, lpdataobj: *mut core::ffi::c_void, lpcfformat: *mut u16, reco: super::super::super::System::SystemServices::RECO_FLAGS, freally: super::super::super::Foundation::BOOL, hmetapict: super::super::super::Foundation::HGLOBAL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRichEditOleCallback_Impl::QueryAcceptData(this, windows_core::from_raw_borrowed(&lpdataobj), core::mem::transmute_copy(&lpcfformat), core::mem::transmute_copy(&reco), core::mem::transmute_copy(&freally), core::mem::transmute_copy(&hmetapict)).into() + IRichEditOleCallback_Impl::QueryAcceptData(this, core::mem::transmute_copy(&lpdataobj), core::mem::transmute_copy(&lpcfformat), core::mem::transmute_copy(&reco), core::mem::transmute_copy(&freally), core::mem::transmute_copy(&hmetapict)).into() } unsafe extern "system" fn ContextSensitiveHelp(this: *mut core::ffi::c_void, fentermode: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1611,7 +1611,7 @@ impl IRichEditOleCallback_Vtbl { } unsafe extern "system" fn GetContextMenu(this: *mut core::ffi::c_void, seltype: RICH_EDIT_GET_CONTEXT_MENU_SEL_TYPE, lpoleobj: *mut core::ffi::c_void, lpchrg: *mut CHARRANGE, lphmenu: *mut super::super::WindowsAndMessaging::HMENU) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRichEditOleCallback_Impl::GetContextMenu(this, core::mem::transmute_copy(&seltype), windows_core::from_raw_borrowed(&lpoleobj), core::mem::transmute_copy(&lpchrg), core::mem::transmute_copy(&lphmenu)).into() + IRichEditOleCallback_Impl::GetContextMenu(this, core::mem::transmute_copy(&seltype), core::mem::transmute_copy(&lpoleobj), core::mem::transmute_copy(&lpchrg), core::mem::transmute_copy(&lphmenu)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -2254,9 +2254,9 @@ pub trait ITextDocument2_Impl: ITextDocument_Impl { fn SetCaretType(&self, value: i32) -> windows_core::Result<()>; fn GetDisplays(&self) -> windows_core::Result; fn GetDocumentFont(&self) -> windows_core::Result; - fn SetDocumentFont(&self, pfont: Option<&ITextFont2>) -> windows_core::Result<()>; + fn SetDocumentFont(&self, pfont: windows_core::Ref<'_, ITextFont2>) -> windows_core::Result<()>; fn GetDocumentPara(&self) -> windows_core::Result; - fn SetDocumentPara(&self, ppara: Option<&ITextPara2>) -> windows_core::Result<()>; + fn SetDocumentPara(&self, ppara: windows_core::Ref<'_, ITextPara2>) -> windows_core::Result<()>; fn GetEastAsianFlags(&self) -> windows_core::Result; fn GetGenerator(&self) -> windows_core::Result; fn SetIMEInProgress(&self, value: i32) -> windows_core::Result<()>; @@ -2267,7 +2267,7 @@ pub trait ITextDocument2_Impl: ITextDocument_Impl { fn GetTypographyOptions(&self) -> windows_core::Result; fn GetVersion(&self) -> windows_core::Result; fn GetWindow(&self) -> windows_core::Result; - fn AttachMsgFilter(&self, pfilter: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AttachMsgFilter(&self, pfilter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn CheckTextLimit(&self, cch: i32, pcch: *const i32) -> windows_core::Result<()>; fn GetCallManager(&self) -> windows_core::Result; fn GetClientRect(&self, r#type: tomConstants, pleft: *mut i32, ptop: *mut i32, pright: *mut i32, pbottom: *mut i32) -> windows_core::Result<()>; @@ -2279,7 +2279,7 @@ pub trait ITextDocument2_Impl: ITextDocument_Impl { fn Notify(&self, notify: i32) -> windows_core::Result<()>; fn Range2(&self, cpactive: i32, cpanchor: i32) -> windows_core::Result; fn RangeFromPoint2(&self, x: i32, y: i32, r#type: i32) -> windows_core::Result; - fn ReleaseCallManager(&self, pvoid: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ReleaseCallManager(&self, pvoid: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn ReleaseImmContext(&self, context: i64) -> windows_core::Result<()>; fn SetEffectColor(&self, index: i32, value: i32) -> windows_core::Result<()>; fn SetProperty(&self, r#type: i32, value: i32) -> windows_core::Result<()>; @@ -2290,7 +2290,7 @@ pub trait ITextDocument2_Impl: ITextDocument_Impl { fn GetMathProperties(&self) -> windows_core::Result; fn SetMathProperties(&self, options: i32, mask: i32) -> windows_core::Result<()>; fn GetActiveStory(&self) -> windows_core::Result; - fn SetActiveStory(&self, pstory: Option<&ITextStory>) -> windows_core::Result<()>; + fn SetActiveStory(&self, pstory: windows_core::Ref<'_, ITextStory>) -> windows_core::Result<()>; fn GetMainStory(&self) -> windows_core::Result; fn GetNewStory(&self) -> windows_core::Result; fn GetStory(&self, index: i32) -> windows_core::Result; @@ -2334,7 +2334,7 @@ impl ITextDocument2_Vtbl { } unsafe extern "system" fn SetDocumentFont(this: *mut core::ffi::c_void, pfont: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument2_Impl::SetDocumentFont(this, windows_core::from_raw_borrowed(&pfont)).into() + ITextDocument2_Impl::SetDocumentFont(this, core::mem::transmute_copy(&pfont)).into() } unsafe extern "system" fn GetDocumentPara(this: *mut core::ffi::c_void, pppara: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2348,7 +2348,7 @@ impl ITextDocument2_Vtbl { } unsafe extern "system" fn SetDocumentPara(this: *mut core::ffi::c_void, ppara: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument2_Impl::SetDocumentPara(this, windows_core::from_raw_borrowed(&ppara)).into() + ITextDocument2_Impl::SetDocumentPara(this, core::mem::transmute_copy(&ppara)).into() } unsafe extern "system" fn GetEastAsianFlags(this: *mut core::ffi::c_void, pflags: *mut tomConstants) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2440,7 +2440,7 @@ impl ITextDocument2_Vtbl { } unsafe extern "system" fn AttachMsgFilter(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument2_Impl::AttachMsgFilter(this, windows_core::from_raw_borrowed(&pfilter)).into() + ITextDocument2_Impl::AttachMsgFilter(this, core::mem::transmute_copy(&pfilter)).into() } unsafe extern "system" fn CheckTextLimit(this: *mut core::ffi::c_void, cch: i32, pcch: *const i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2530,7 +2530,7 @@ impl ITextDocument2_Vtbl { } unsafe extern "system" fn ReleaseCallManager(this: *mut core::ffi::c_void, pvoid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument2_Impl::ReleaseCallManager(this, windows_core::from_raw_borrowed(&pvoid)).into() + ITextDocument2_Impl::ReleaseCallManager(this, core::mem::transmute_copy(&pvoid)).into() } unsafe extern "system" fn ReleaseImmContext(this: *mut core::ffi::c_void, context: i64) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2586,7 +2586,7 @@ impl ITextDocument2_Vtbl { } unsafe extern "system" fn SetActiveStory(this: *mut core::ffi::c_void, pstory: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument2_Impl::SetActiveStory(this, windows_core::from_raw_borrowed(&pstory)).into() + ITextDocument2_Impl::SetActiveStory(this, core::mem::transmute_copy(&pstory)).into() } unsafe extern "system" fn GetMainStory(this: *mut core::ffi::c_void, ppstory: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2805,7 +2805,7 @@ pub struct ITextDocument2Old_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITextDocument2Old_Impl: ITextDocument_Impl { - fn AttachMsgFilter(&self, pfilter: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AttachMsgFilter(&self, pfilter: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetEffectColor(&self, index: i32, cr: super::super::super::Foundation::COLORREF) -> windows_core::Result<()>; fn GetEffectColor(&self, index: i32) -> windows_core::Result; fn GetCaretType(&self) -> windows_core::Result; @@ -2828,14 +2828,14 @@ pub trait ITextDocument2Old_Impl: ITextDocument_Impl { fn GetDocumentFont(&self) -> windows_core::Result; fn GetDocumentPara(&self) -> windows_core::Result; fn GetCallManager(&self) -> windows_core::Result; - fn ReleaseCallManager(&self, pvoid: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn ReleaseCallManager(&self, pvoid: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITextDocument2Old_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AttachMsgFilter(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument2Old_Impl::AttachMsgFilter(this, windows_core::from_raw_borrowed(&pfilter)).into() + ITextDocument2Old_Impl::AttachMsgFilter(this, core::mem::transmute_copy(&pfilter)).into() } unsafe extern "system" fn SetEffectColor(this: *mut core::ffi::c_void, index: i32, cr: super::super::super::Foundation::COLORREF) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2987,7 +2987,7 @@ impl ITextDocument2Old_Vtbl { } unsafe extern "system" fn ReleaseCallManager(this: *mut core::ffi::c_void, pvoid: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextDocument2Old_Impl::ReleaseCallManager(this, windows_core::from_raw_borrowed(&pvoid)).into() + ITextDocument2Old_Impl::ReleaseCallManager(this, core::mem::transmute_copy(&pvoid)).into() } Self { base__: ITextDocument_Vtbl::new::(), @@ -3299,9 +3299,9 @@ pub struct ITextFont_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITextFont_Impl: super::super::super::System::Com::IDispatch_Impl { fn GetDuplicate(&self) -> windows_core::Result; - fn SetDuplicate(&self, pfont: Option<&ITextFont>) -> windows_core::Result<()>; + fn SetDuplicate(&self, pfont: windows_core::Ref<'_, ITextFont>) -> windows_core::Result<()>; fn CanChange(&self) -> windows_core::Result; - fn IsEqual(&self, pfont: Option<&ITextFont>) -> windows_core::Result; + fn IsEqual(&self, pfont: windows_core::Ref<'_, ITextFont>) -> windows_core::Result; fn Reset(&self, value: tomConstants) -> windows_core::Result<()>; fn GetStyle(&self) -> windows_core::Result; fn SetStyle(&self, value: i32) -> windows_core::Result<()>; @@ -3369,7 +3369,7 @@ impl ITextFont_Vtbl { } unsafe extern "system" fn SetDuplicate(this: *mut core::ffi::c_void, pfont: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextFont_Impl::SetDuplicate(this, windows_core::from_raw_borrowed(&pfont)).into() + ITextFont_Impl::SetDuplicate(this, core::mem::transmute_copy(&pfont)).into() } unsafe extern "system" fn CanChange(this: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3383,7 +3383,7 @@ impl ITextFont_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, pfont: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextFont_Impl::IsEqual(this, windows_core::from_raw_borrowed(&pfont)) { + match ITextFont_Impl::IsEqual(this, core::mem::transmute_copy(&pfont)) { Ok(ok__) => { pvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4061,7 +4061,7 @@ pub trait ITextFont2_Impl: ITextFont_Impl { fn GetDoubleStrike(&self) -> windows_core::Result; fn SetDoubleStrike(&self, value: i32) -> windows_core::Result<()>; fn GetDuplicate2(&self) -> windows_core::Result; - fn SetDuplicate2(&self, pfont: Option<&ITextFont2>) -> windows_core::Result<()>; + fn SetDuplicate2(&self, pfont: windows_core::Ref<'_, ITextFont2>) -> windows_core::Result<()>; fn GetLinkType(&self) -> windows_core::Result; fn GetMathZone(&self) -> windows_core::Result; fn SetMathZone(&self, value: i32) -> windows_core::Result<()>; @@ -4085,7 +4085,7 @@ pub trait ITextFont2_Impl: ITextFont_Impl { fn GetEffects2(&self, pvalue: *mut i32, pmask: *mut i32) -> windows_core::Result<()>; fn GetProperty(&self, r#type: i32) -> windows_core::Result; fn GetPropertyInfo(&self, index: i32, ptype: *mut i32, pvalue: *mut i32) -> windows_core::Result<()>; - fn IsEqual2(&self, pfont: Option<&ITextFont2>) -> windows_core::Result; + fn IsEqual2(&self, pfont: windows_core::Ref<'_, ITextFont2>) -> windows_core::Result; fn SetEffects(&self, value: i32, mask: i32) -> windows_core::Result<()>; fn SetEffects2(&self, value: i32, mask: i32) -> windows_core::Result<()>; fn SetProperty(&self, r#type: i32, value: i32) -> windows_core::Result<()>; @@ -4227,7 +4227,7 @@ impl ITextFont2_Vtbl { } unsafe extern "system" fn SetDuplicate2(this: *mut core::ffi::c_void, pfont: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextFont2_Impl::SetDuplicate2(this, windows_core::from_raw_borrowed(&pfont)).into() + ITextFont2_Impl::SetDuplicate2(this, core::mem::transmute_copy(&pfont)).into() } unsafe extern "system" fn GetLinkType(this: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4389,7 +4389,7 @@ impl ITextFont2_Vtbl { } unsafe extern "system" fn IsEqual2(this: *mut core::ffi::c_void, pfont: *mut core::ffi::c_void, pb: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextFont2_Impl::IsEqual2(this, windows_core::from_raw_borrowed(&pfont)) { + match ITextFont2_Impl::IsEqual2(this, core::mem::transmute_copy(&pfont)) { Ok(ok__) => { pb.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5336,9 +5336,9 @@ pub struct ITextPara_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITextPara_Impl: super::super::super::System::Com::IDispatch_Impl { fn GetDuplicate(&self) -> windows_core::Result; - fn SetDuplicate(&self, ppara: Option<&ITextPara>) -> windows_core::Result<()>; + fn SetDuplicate(&self, ppara: windows_core::Ref<'_, ITextPara>) -> windows_core::Result<()>; fn CanChange(&self) -> windows_core::Result; - fn IsEqual(&self, ppara: Option<&ITextPara>) -> windows_core::Result; + fn IsEqual(&self, ppara: windows_core::Ref<'_, ITextPara>) -> windows_core::Result; fn Reset(&self, value: i32) -> windows_core::Result<()>; fn GetStyle(&self) -> windows_core::Result; fn SetStyle(&self, value: i32) -> windows_core::Result<()>; @@ -5399,7 +5399,7 @@ impl ITextPara_Vtbl { } unsafe extern "system" fn SetDuplicate(this: *mut core::ffi::c_void, ppara: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextPara_Impl::SetDuplicate(this, windows_core::from_raw_borrowed(&ppara)).into() + ITextPara_Impl::SetDuplicate(this, core::mem::transmute_copy(&ppara)).into() } unsafe extern "system" fn CanChange(this: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5413,7 +5413,7 @@ impl ITextPara_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, ppara: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextPara_Impl::IsEqual(this, windows_core::from_raw_borrowed(&ppara)) { + match ITextPara_Impl::IsEqual(this, core::mem::transmute_copy(&ppara)) { Ok(ok__) => { pvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5882,7 +5882,7 @@ pub struct ITextPara2_Vtbl { pub trait ITextPara2_Impl: ITextPara_Impl { fn GetBorders(&self) -> windows_core::Result; fn GetDuplicate2(&self) -> windows_core::Result; - fn SetDuplicate2(&self, ppara: Option<&ITextPara2>) -> windows_core::Result<()>; + fn SetDuplicate2(&self, ppara: windows_core::Ref<'_, ITextPara2>) -> windows_core::Result<()>; fn GetFontAlignment(&self) -> windows_core::Result; fn SetFontAlignment(&self, value: i32) -> windows_core::Result<()>; fn GetHangingPunctuation(&self) -> windows_core::Result; @@ -5893,7 +5893,7 @@ pub trait ITextPara2_Impl: ITextPara_Impl { fn SetTrimPunctuationAtStart(&self, value: i32) -> windows_core::Result<()>; fn GetEffects(&self, pvalue: *mut i32, pmask: *mut i32) -> windows_core::Result<()>; fn GetProperty(&self, r#type: i32) -> windows_core::Result; - fn IsEqual2(&self, ppara: Option<&ITextPara2>) -> windows_core::Result; + fn IsEqual2(&self, ppara: windows_core::Ref<'_, ITextPara2>) -> windows_core::Result; fn SetEffects(&self, value: i32, mask: i32) -> windows_core::Result<()>; fn SetProperty(&self, r#type: i32, value: i32) -> windows_core::Result<()>; } @@ -5922,7 +5922,7 @@ impl ITextPara2_Vtbl { } unsafe extern "system" fn SetDuplicate2(this: *mut core::ffi::c_void, ppara: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextPara2_Impl::SetDuplicate2(this, windows_core::from_raw_borrowed(&ppara)).into() + ITextPara2_Impl::SetDuplicate2(this, core::mem::transmute_copy(&ppara)).into() } unsafe extern "system" fn GetFontAlignment(this: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5996,7 +5996,7 @@ impl ITextPara2_Vtbl { } unsafe extern "system" fn IsEqual2(this: *mut core::ffi::c_void, ppara: *mut core::ffi::c_void, pb: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextPara2_Impl::IsEqual2(this, windows_core::from_raw_borrowed(&ppara)) { + match ITextPara2_Impl::IsEqual2(this, core::mem::transmute_copy(&ppara)) { Ok(ok__) => { pb.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6362,15 +6362,15 @@ pub trait ITextRange_Impl: super::super::super::System::Com::IDispatch_Impl { fn SetChar(&self, char: i32) -> windows_core::Result<()>; fn GetDuplicate(&self) -> windows_core::Result; fn GetFormattedText(&self) -> windows_core::Result; - fn SetFormattedText(&self, prange: Option<&ITextRange>) -> windows_core::Result<()>; + fn SetFormattedText(&self, prange: windows_core::Ref<'_, ITextRange>) -> windows_core::Result<()>; fn GetStart(&self) -> windows_core::Result; fn SetStart(&self, cpfirst: i32) -> windows_core::Result<()>; fn GetEnd(&self) -> windows_core::Result; fn SetEnd(&self, cplim: i32) -> windows_core::Result<()>; fn GetFont(&self) -> windows_core::Result; - fn SetFont(&self, pfont: Option<&ITextFont>) -> windows_core::Result<()>; + fn SetFont(&self, pfont: windows_core::Ref<'_, ITextFont>) -> windows_core::Result<()>; fn GetPara(&self) -> windows_core::Result; - fn SetPara(&self, ppara: Option<&ITextPara>) -> windows_core::Result<()>; + fn SetPara(&self, ppara: windows_core::Ref<'_, ITextPara>) -> windows_core::Result<()>; fn GetStoryLength(&self) -> windows_core::Result; fn GetStoryType(&self) -> windows_core::Result; fn Collapse(&self, bstart: i32) -> windows_core::Result<()>; @@ -6378,9 +6378,9 @@ pub trait ITextRange_Impl: super::super::super::System::Com::IDispatch_Impl { fn GetIndex(&self, unit: i32) -> windows_core::Result; fn SetIndex(&self, unit: i32, index: i32, extend: i32) -> windows_core::Result<()>; fn SetRange(&self, cpanchor: i32, cpactive: i32) -> windows_core::Result<()>; - fn InRange(&self, prange: Option<&ITextRange>) -> windows_core::Result; - fn InStory(&self, prange: Option<&ITextRange>) -> windows_core::Result; - fn IsEqual(&self, prange: Option<&ITextRange>) -> windows_core::Result; + fn InRange(&self, prange: windows_core::Ref<'_, ITextRange>) -> windows_core::Result; + fn InStory(&self, prange: windows_core::Ref<'_, ITextRange>) -> windows_core::Result; + fn IsEqual(&self, prange: windows_core::Ref<'_, ITextRange>) -> windows_core::Result; fn Select(&self) -> windows_core::Result<()>; fn StartOf(&self, unit: i32, extend: i32) -> windows_core::Result; fn EndOf(&self, unit: i32, extend: i32) -> windows_core::Result; @@ -6461,7 +6461,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn SetFormattedText(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange_Impl::SetFormattedText(this, windows_core::from_raw_borrowed(&prange)).into() + ITextRange_Impl::SetFormattedText(this, core::mem::transmute_copy(&prange)).into() } unsafe extern "system" fn GetStart(this: *mut core::ffi::c_void, pcpfirst: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6503,7 +6503,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn SetFont(this: *mut core::ffi::c_void, pfont: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange_Impl::SetFont(this, windows_core::from_raw_borrowed(&pfont)).into() + ITextRange_Impl::SetFont(this, core::mem::transmute_copy(&pfont)).into() } unsafe extern "system" fn GetPara(this: *mut core::ffi::c_void, pppara: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6517,7 +6517,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn SetPara(this: *mut core::ffi::c_void, ppara: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange_Impl::SetPara(this, windows_core::from_raw_borrowed(&ppara)).into() + ITextRange_Impl::SetPara(this, core::mem::transmute_copy(&ppara)).into() } unsafe extern "system" fn GetStoryLength(this: *mut core::ffi::c_void, pcount: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6573,7 +6573,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn InRange(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRange_Impl::InRange(this, windows_core::from_raw_borrowed(&prange)) { + match ITextRange_Impl::InRange(this, core::mem::transmute_copy(&prange)) { Ok(ok__) => { pvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6583,7 +6583,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn InStory(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRange_Impl::InStory(this, windows_core::from_raw_borrowed(&prange)) { + match ITextRange_Impl::InStory(this, core::mem::transmute_copy(&prange)) { Ok(ok__) => { pvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6593,7 +6593,7 @@ impl ITextRange_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRange_Impl::IsEqual(this, windows_core::from_raw_borrowed(&prange)) { + match ITextRange_Impl::IsEqual(this, core::mem::transmute_copy(&prange)) { Ok(ok__) => { pvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7109,13 +7109,13 @@ pub trait ITextRange2_Impl: ITextSelection_Impl { fn GetCount(&self) -> windows_core::Result; fn GetDuplicate2(&self) -> windows_core::Result; fn GetFont2(&self) -> windows_core::Result; - fn SetFont2(&self, pfont: Option<&ITextFont2>) -> windows_core::Result<()>; + fn SetFont2(&self, pfont: windows_core::Ref<'_, ITextFont2>) -> windows_core::Result<()>; fn GetFormattedText2(&self) -> windows_core::Result; - fn SetFormattedText2(&self, prange: Option<&ITextRange2>) -> windows_core::Result<()>; + fn SetFormattedText2(&self, prange: windows_core::Ref<'_, ITextRange2>) -> windows_core::Result<()>; fn GetGravity(&self) -> windows_core::Result; fn SetGravity(&self, value: i32) -> windows_core::Result<()>; fn GetPara2(&self) -> windows_core::Result; - fn SetPara2(&self, ppara: Option<&ITextPara2>) -> windows_core::Result<()>; + fn SetPara2(&self, ppara: windows_core::Ref<'_, ITextPara2>) -> windows_core::Result<()>; fn GetRow(&self) -> windows_core::Result; fn GetStartPara(&self) -> windows_core::Result; fn GetTable(&self) -> windows_core::Result; @@ -7124,7 +7124,7 @@ pub trait ITextRange2_Impl: ITextSelection_Impl { fn AddSubrange(&self, cp1: i32, cp2: i32, activate: i32) -> windows_core::Result<()>; fn BuildUpMath(&self, flags: i32) -> windows_core::Result<()>; fn DeleteSubrange(&self, cpfirst: i32, cplim: i32) -> windows_core::Result<()>; - fn Find(&self, prange: Option<&ITextRange2>, count: i32, flags: i32) -> windows_core::Result; + fn Find(&self, prange: windows_core::Ref<'_, ITextRange2>, count: i32, flags: i32) -> windows_core::Result; fn GetChar2(&self, pchar: *mut i32, offset: i32) -> windows_core::Result<()>; fn GetDropCap(&self, pcline: *mut i32, pposition: *mut i32) -> windows_core::Result<()>; fn GetInlineObject(&self, ptype: *mut i32, palign: *mut i32, pchar: *mut i32, pchar1: *mut i32, pchar2: *mut i32, pcount: *mut i32, ptexstyle: *mut i32, pccol: *mut i32, plevel: *mut i32) -> windows_core::Result<()>; @@ -7142,7 +7142,7 @@ pub trait ITextRange2_Impl: ITextSelection_Impl { fn UnicodeToHex(&self) -> windows_core::Result<()>; fn SetInlineObject(&self, r#type: i32, align: i32, char: i32, char1: i32, char2: i32, count: i32, texstyle: i32, ccol: i32) -> windows_core::Result<()>; fn GetMathFunctionType(&self, bstr: &windows_core::BSTR) -> windows_core::Result; - fn InsertImage(&self, width: i32, height: i32, ascent: i32, r#type: i32, bstralttext: &windows_core::BSTR, pstream: Option<&super::super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn InsertImage(&self, width: i32, height: i32, ascent: i32, r#type: i32, bstralttext: &windows_core::BSTR, pstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITextRange2_Vtbl { @@ -7209,7 +7209,7 @@ impl ITextRange2_Vtbl { } unsafe extern "system" fn SetFont2(this: *mut core::ffi::c_void, pfont: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange2_Impl::SetFont2(this, windows_core::from_raw_borrowed(&pfont)).into() + ITextRange2_Impl::SetFont2(this, core::mem::transmute_copy(&pfont)).into() } unsafe extern "system" fn GetFormattedText2(this: *mut core::ffi::c_void, pprange: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7223,7 +7223,7 @@ impl ITextRange2_Vtbl { } unsafe extern "system" fn SetFormattedText2(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange2_Impl::SetFormattedText2(this, windows_core::from_raw_borrowed(&prange)).into() + ITextRange2_Impl::SetFormattedText2(this, core::mem::transmute_copy(&prange)).into() } unsafe extern "system" fn GetGravity(this: *mut core::ffi::c_void, pvalue: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7251,7 +7251,7 @@ impl ITextRange2_Vtbl { } unsafe extern "system" fn SetPara2(this: *mut core::ffi::c_void, ppara: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange2_Impl::SetPara2(this, windows_core::from_raw_borrowed(&ppara)).into() + ITextRange2_Impl::SetPara2(this, core::mem::transmute_copy(&ppara)).into() } unsafe extern "system" fn GetRow(this: *mut core::ffi::c_void, pprow: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7311,7 +7311,7 @@ impl ITextRange2_Vtbl { } unsafe extern "system" fn Find(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, count: i32, flags: i32, pdelta: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRange2_Impl::Find(this, windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&count), core::mem::transmute_copy(&flags)) { + match ITextRange2_Impl::Find(this, core::mem::transmute_copy(&prange), core::mem::transmute_copy(&count), core::mem::transmute_copy(&flags)) { Ok(ok__) => { pdelta.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7407,7 +7407,7 @@ impl ITextRange2_Vtbl { } unsafe extern "system" fn InsertImage(this: *mut core::ffi::c_void, width: i32, height: i32, ascent: i32, r#type: i32, bstralttext: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextRange2_Impl::InsertImage(this, core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&ascent), core::mem::transmute_copy(&r#type), core::mem::transmute(&bstralttext), windows_core::from_raw_borrowed(&pstream)).into() + ITextRange2_Impl::InsertImage(this, core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&ascent), core::mem::transmute_copy(&r#type), core::mem::transmute(&bstralttext), core::mem::transmute_copy(&pstream)).into() } Self { base__: ITextSelection_Vtbl::new::(), @@ -7731,7 +7731,7 @@ pub trait ITextRow_Impl: super::super::super::System::Com::IDispatch_Impl { fn CanChange(&self) -> windows_core::Result; fn GetProperty(&self, r#type: i32) -> windows_core::Result; fn Insert(&self, crow: i32) -> windows_core::Result<()>; - fn IsEqual(&self, prow: Option<&ITextRow>) -> windows_core::Result; + fn IsEqual(&self, prow: windows_core::Ref<'_, ITextRow>) -> windows_core::Result; fn Reset(&self, value: i32) -> windows_core::Result<()>; fn SetProperty(&self, r#type: i32, value: i32) -> windows_core::Result<()>; } @@ -8032,7 +8032,7 @@ impl ITextRow_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, prow: *mut core::ffi::c_void, pb: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextRow_Impl::IsEqual(this, windows_core::from_raw_borrowed(&prow)) { + match ITextRow_Impl::IsEqual(this, core::mem::transmute_copy(&prow)) { Ok(ok__) => { pb.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8594,7 +8594,7 @@ pub struct ITextServices2_Vtbl { #[cfg(all(feature = "Win32_Graphics_Direct2D", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub trait ITextServices2_Impl: ITextServices_Impl { fn TxGetNaturalSize2(&self, dwaspect: u32, hdcdraw: super::super::super::Graphics::Gdi::HDC, hictargetdev: super::super::super::Graphics::Gdi::HDC, ptd: *mut super::super::super::System::Com::DVTARGETDEVICE, dwmode: u32, psizelextent: *const super::super::super::Foundation::SIZE, pwidth: *mut i32, pheight: *mut i32, pascent: *mut i32) -> windows_core::Result<()>; - fn TxDrawD2D(&self, prendertarget: Option<&super::super::super::Graphics::Direct2D::ID2D1RenderTarget>, lprcbounds: *mut super::super::super::Foundation::RECTL, lprcupdate: *mut super::super::super::Foundation::RECT, lviewid: i32) -> windows_core::Result<()>; + fn TxDrawD2D(&self, prendertarget: windows_core::Ref<'_, super::super::super::Graphics::Direct2D::ID2D1RenderTarget>, lprcbounds: *mut super::super::super::Foundation::RECTL, lprcupdate: *mut super::super::super::Foundation::RECT, lviewid: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Direct2D", feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ITextServices2_Vtbl { @@ -8605,7 +8605,7 @@ impl ITextServices2_Vtbl { } unsafe extern "system" fn TxDrawD2D(this: *mut core::ffi::c_void, prendertarget: *mut core::ffi::c_void, lprcbounds: *mut super::super::super::Foundation::RECTL, lprcupdate: *mut super::super::super::Foundation::RECT, lviewid: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextServices2_Impl::TxDrawD2D(this, windows_core::from_raw_borrowed(&prendertarget), core::mem::transmute_copy(&lprcbounds), core::mem::transmute_copy(&lprcupdate), core::mem::transmute_copy(&lviewid)).into() + ITextServices2_Impl::TxDrawD2D(this, core::mem::transmute_copy(&prendertarget), core::mem::transmute_copy(&lprcbounds), core::mem::transmute_copy(&lprcupdate), core::mem::transmute_copy(&lviewid)).into() } Self { base__: ITextServices_Vtbl::new::(), @@ -8700,7 +8700,7 @@ pub trait ITextStory_Impl: windows_core::IUnknownImpl { fn GetProperty(&self, r#type: i32) -> windows_core::Result; fn GetRange(&self, cpactive: i32, cpanchor: i32) -> windows_core::Result; fn GetText(&self, flags: i32) -> windows_core::Result; - fn SetFormattedText(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetFormattedText(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetProperty(&self, r#type: i32, value: i32) -> windows_core::Result<()>; fn SetText(&self, flags: i32, bstr: &windows_core::BSTR) -> windows_core::Result<()>; } @@ -8787,7 +8787,7 @@ impl ITextStory_Vtbl { } unsafe extern "system" fn SetFormattedText(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStory_Impl::SetFormattedText(this, windows_core::from_raw_borrowed(&punk)).into() + ITextStory_Impl::SetFormattedText(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn SetProperty(this: *mut core::ffi::c_void, r#type: i32, value: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9065,19 +9065,19 @@ pub trait ITextStrings_Impl: super::super::super::System::Com::IDispatch_Impl { fn Item(&self, index: i32) -> windows_core::Result; fn GetCount(&self) -> windows_core::Result; fn Add(&self, bstr: &windows_core::BSTR) -> windows_core::Result<()>; - fn Append(&self, prange: Option<&ITextRange2>, istring: i32) -> windows_core::Result<()>; + fn Append(&self, prange: windows_core::Ref<'_, ITextRange2>, istring: i32) -> windows_core::Result<()>; fn Cat2(&self, istring: i32) -> windows_core::Result<()>; fn CatTop2(&self, bstr: &windows_core::BSTR) -> windows_core::Result<()>; - fn DeleteRange(&self, prange: Option<&ITextRange2>) -> windows_core::Result<()>; - fn EncodeFunction(&self, r#type: i32, align: i32, char: i32, char1: i32, char2: i32, count: i32, texstyle: i32, ccol: i32, prange: Option<&ITextRange2>) -> windows_core::Result<()>; + fn DeleteRange(&self, prange: windows_core::Ref<'_, ITextRange2>) -> windows_core::Result<()>; + fn EncodeFunction(&self, r#type: i32, align: i32, char: i32, char1: i32, char2: i32, count: i32, texstyle: i32, ccol: i32, prange: windows_core::Ref<'_, ITextRange2>) -> windows_core::Result<()>; fn GetCch(&self, istring: i32) -> windows_core::Result; fn InsertNullStr(&self, istring: i32) -> windows_core::Result<()>; fn MoveBoundary(&self, istring: i32, cch: i32) -> windows_core::Result<()>; fn PrefixTop(&self, bstr: &windows_core::BSTR) -> windows_core::Result<()>; fn Remove(&self, istring: i32, cstring: i32) -> windows_core::Result<()>; - fn SetFormattedText(&self, pranged: Option<&ITextRange2>, pranges: Option<&ITextRange2>) -> windows_core::Result<()>; + fn SetFormattedText(&self, pranged: windows_core::Ref<'_, ITextRange2>, pranges: windows_core::Ref<'_, ITextRange2>) -> windows_core::Result<()>; fn SetOpCp(&self, istring: i32, cp: i32) -> windows_core::Result<()>; - fn SuffixTop(&self, bstr: &windows_core::BSTR, prange: Option<&ITextRange2>) -> windows_core::Result<()>; + fn SuffixTop(&self, bstr: &windows_core::BSTR, prange: windows_core::Ref<'_, ITextRange2>) -> windows_core::Result<()>; fn Swap(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -9109,7 +9109,7 @@ impl ITextStrings_Vtbl { } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, istring: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStrings_Impl::Append(this, windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&istring)).into() + ITextStrings_Impl::Append(this, core::mem::transmute_copy(&prange), core::mem::transmute_copy(&istring)).into() } unsafe extern "system" fn Cat2(this: *mut core::ffi::c_void, istring: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9121,11 +9121,11 @@ impl ITextStrings_Vtbl { } unsafe extern "system" fn DeleteRange(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStrings_Impl::DeleteRange(this, windows_core::from_raw_borrowed(&prange)).into() + ITextStrings_Impl::DeleteRange(this, core::mem::transmute_copy(&prange)).into() } unsafe extern "system" fn EncodeFunction(this: *mut core::ffi::c_void, r#type: i32, align: i32, char: i32, char1: i32, char2: i32, count: i32, texstyle: i32, ccol: i32, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStrings_Impl::EncodeFunction(this, core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&align), core::mem::transmute_copy(&char), core::mem::transmute_copy(&char1), core::mem::transmute_copy(&char2), core::mem::transmute_copy(&count), core::mem::transmute_copy(&texstyle), core::mem::transmute_copy(&ccol), windows_core::from_raw_borrowed(&prange)).into() + ITextStrings_Impl::EncodeFunction(this, core::mem::transmute_copy(&r#type), core::mem::transmute_copy(&align), core::mem::transmute_copy(&char), core::mem::transmute_copy(&char1), core::mem::transmute_copy(&char2), core::mem::transmute_copy(&count), core::mem::transmute_copy(&texstyle), core::mem::transmute_copy(&ccol), core::mem::transmute_copy(&prange)).into() } unsafe extern "system" fn GetCch(this: *mut core::ffi::c_void, istring: i32, pcch: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9155,7 +9155,7 @@ impl ITextStrings_Vtbl { } unsafe extern "system" fn SetFormattedText(this: *mut core::ffi::c_void, pranged: *mut core::ffi::c_void, pranges: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStrings_Impl::SetFormattedText(this, windows_core::from_raw_borrowed(&pranged), windows_core::from_raw_borrowed(&pranges)).into() + ITextStrings_Impl::SetFormattedText(this, core::mem::transmute_copy(&pranged), core::mem::transmute_copy(&pranges)).into() } unsafe extern "system" fn SetOpCp(this: *mut core::ffi::c_void, istring: i32, cp: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9163,7 +9163,7 @@ impl ITextStrings_Vtbl { } unsafe extern "system" fn SuffixTop(this: *mut core::ffi::c_void, bstr: *mut core::ffi::c_void, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStrings_Impl::SuffixTop(this, core::mem::transmute(&bstr), windows_core::from_raw_borrowed(&prange)).into() + ITextStrings_Impl::SuffixTop(this, core::mem::transmute(&bstr), core::mem::transmute_copy(&prange)).into() } unsafe extern "system" fn Swap(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs index 7c222f9ae6..6e7b8d83b2 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs @@ -3645,8 +3645,8 @@ pub trait IImageList_Impl: windows_core::IUnknownImpl { fn Remove(&self, i: i32) -> windows_core::Result<()>; fn GetIcon(&self, i: i32, flags: u32) -> windows_core::Result; fn GetImageInfo(&self, i: i32, pimageinfo: *mut IMAGEINFO) -> windows_core::Result<()>; - fn Copy(&self, idst: i32, punksrc: Option<&windows_core::IUnknown>, isrc: i32, uflags: u32) -> windows_core::Result<()>; - fn Merge(&self, i1: i32, punk2: Option<&windows_core::IUnknown>, i2: i32, dx: i32, dy: i32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn Copy(&self, idst: i32, punksrc: windows_core::Ref<'_, windows_core::IUnknown>, isrc: i32, uflags: u32) -> windows_core::Result<()>; + fn Merge(&self, i1: i32, punk2: windows_core::Ref<'_, windows_core::IUnknown>, i2: i32, dx: i32, dy: i32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn Clone(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetImageRect(&self, i: i32) -> windows_core::Result; fn GetIconSize(&self, cx: *mut i32, cy: *mut i32) -> windows_core::Result<()>; @@ -3660,7 +3660,7 @@ pub trait IImageList_Impl: windows_core::IUnknownImpl { fn DragEnter(&self, hwndlock: super::super::Foundation::HWND, x: i32, y: i32) -> windows_core::Result<()>; fn DragLeave(&self, hwndlock: super::super::Foundation::HWND) -> windows_core::Result<()>; fn DragMove(&self, x: i32, y: i32) -> windows_core::Result<()>; - fn SetDragCursorImage(&self, punk: Option<&windows_core::IUnknown>, idrag: i32, dxhotspot: i32, dyhotspot: i32) -> windows_core::Result<()>; + fn SetDragCursorImage(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, idrag: i32, dxhotspot: i32, dyhotspot: i32) -> windows_core::Result<()>; fn DragShowNolock(&self, fshow: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetDragImage(&self, ppt: *mut super::super::Foundation::POINT, ppthotspot: *mut super::super::Foundation::POINT, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetItemFlags(&self, i: i32) -> windows_core::Result; @@ -3731,11 +3731,11 @@ impl IImageList_Vtbl { } unsafe extern "system" fn Copy(this: *mut core::ffi::c_void, idst: i32, punksrc: *mut core::ffi::c_void, isrc: i32, uflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImageList_Impl::Copy(this, core::mem::transmute_copy(&idst), windows_core::from_raw_borrowed(&punksrc), core::mem::transmute_copy(&isrc), core::mem::transmute_copy(&uflags)).into() + IImageList_Impl::Copy(this, core::mem::transmute_copy(&idst), core::mem::transmute_copy(&punksrc), core::mem::transmute_copy(&isrc), core::mem::transmute_copy(&uflags)).into() } unsafe extern "system" fn Merge(this: *mut core::ffi::c_void, i1: i32, punk2: *mut core::ffi::c_void, i2: i32, dx: i32, dy: i32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImageList_Impl::Merge(this, core::mem::transmute_copy(&i1), windows_core::from_raw_borrowed(&punk2), core::mem::transmute_copy(&i2), core::mem::transmute_copy(&dx), core::mem::transmute_copy(&dy), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IImageList_Impl::Merge(this, core::mem::transmute_copy(&i1), core::mem::transmute_copy(&punk2), core::mem::transmute_copy(&i2), core::mem::transmute_copy(&dx), core::mem::transmute_copy(&dy), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3815,7 +3815,7 @@ impl IImageList_Vtbl { } unsafe extern "system" fn SetDragCursorImage(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, idrag: i32, dxhotspot: i32, dyhotspot: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImageList_Impl::SetDragCursorImage(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&idrag), core::mem::transmute_copy(&dxhotspot), core::mem::transmute_copy(&dyhotspot)).into() + IImageList_Impl::SetDragCursorImage(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&idrag), core::mem::transmute_copy(&dxhotspot), core::mem::transmute_copy(&dyhotspot)).into() } unsafe extern "system" fn DragShowNolock(this: *mut core::ffi::c_void, fshow: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3969,15 +3969,15 @@ pub trait IImageList2_Impl: IImageList_Impl { fn Resize(&self, cxnewiconsize: i32, cynewiconsize: i32) -> windows_core::Result<()>; fn GetOriginalSize(&self, iimage: i32, dwflags: u32, pcx: *mut i32, pcy: *mut i32) -> windows_core::Result<()>; fn SetOriginalSize(&self, iimage: i32, cx: i32, cy: i32) -> windows_core::Result<()>; - fn SetCallback(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetCallback(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetCallback(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn ForceImagePresent(&self, iimage: i32, dwflags: u32) -> windows_core::Result<()>; fn DiscardImages(&self, ifirstimage: i32, ilastimage: i32, dwflags: u32) -> windows_core::Result<()>; fn PreloadImages(&self, pimldp: *const IMAGELISTDRAWPARAMS) -> windows_core::Result<()>; fn GetStatistics(&self, pils: *mut IMAGELISTSTATS) -> windows_core::Result<()>; fn Initialize(&self, cx: i32, cy: i32, flags: IMAGELIST_CREATION_FLAGS, cinitial: i32, cgrow: i32) -> windows_core::Result<()>; - fn Replace2(&self, i: i32, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: super::super::Graphics::Gdi::HBITMAP, punk: Option<&windows_core::IUnknown>, dwflags: u32) -> windows_core::Result<()>; - fn ReplaceFromImageList(&self, i: i32, pil: Option<&IImageList>, isrc: i32, punk: Option<&windows_core::IUnknown>, dwflags: u32) -> windows_core::Result<()>; + fn Replace2(&self, i: i32, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: super::super::Graphics::Gdi::HBITMAP, punk: windows_core::Ref<'_, windows_core::IUnknown>, dwflags: u32) -> windows_core::Result<()>; + fn ReplaceFromImageList(&self, i: i32, pil: windows_core::Ref<'_, IImageList>, isrc: i32, punk: windows_core::Ref<'_, windows_core::IUnknown>, dwflags: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] impl IImageList2_Vtbl { @@ -3996,7 +3996,7 @@ impl IImageList2_Vtbl { } unsafe extern "system" fn SetCallback(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImageList2_Impl::SetCallback(this, windows_core::from_raw_borrowed(&punk)).into() + IImageList2_Impl::SetCallback(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn GetCallback(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4024,11 +4024,11 @@ impl IImageList2_Vtbl { } unsafe extern "system" fn Replace2(this: *mut core::ffi::c_void, i: i32, hbmimage: super::super::Graphics::Gdi::HBITMAP, hbmmask: super::super::Graphics::Gdi::HBITMAP, punk: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImageList2_Impl::Replace2(this, core::mem::transmute_copy(&i), core::mem::transmute_copy(&hbmimage), core::mem::transmute_copy(&hbmmask), windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&dwflags)).into() + IImageList2_Impl::Replace2(this, core::mem::transmute_copy(&i), core::mem::transmute_copy(&hbmimage), core::mem::transmute_copy(&hbmmask), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn ReplaceFromImageList(this: *mut core::ffi::c_void, i: i32, pil: *mut core::ffi::c_void, isrc: i32, punk: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImageList2_Impl::ReplaceFromImageList(this, core::mem::transmute_copy(&i), windows_core::from_raw_borrowed(&pil), core::mem::transmute_copy(&isrc), windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&dwflags)).into() + IImageList2_Impl::ReplaceFromImageList(this, core::mem::transmute_copy(&i), core::mem::transmute_copy(&pil), core::mem::transmute_copy(&isrc), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&dwflags)).into() } Self { base__: IImageList_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs index c3b5cb80db..6b273d1f64 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs @@ -4135,13 +4135,13 @@ pub struct IImePad_Vtbl { pub Request: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, i32, super::super::super::Foundation::WPARAM, super::super::super::Foundation::LPARAM) -> windows_core::HRESULT, } pub trait IImePad_Impl: windows_core::IUnknownImpl { - fn Request(&self, piimepadapplet: Option<&IImePadApplet>, reqid: &IME_PAD_REQUEST_FLAGS, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()>; + fn Request(&self, piimepadapplet: windows_core::Ref<'_, IImePadApplet>, reqid: &IME_PAD_REQUEST_FLAGS, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()>; } impl IImePad_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Request(this: *mut core::ffi::c_void, piimepadapplet: *mut core::ffi::c_void, reqid: i32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImePad_Impl::Request(this, windows_core::from_raw_borrowed(&piimepadapplet), core::mem::transmute(&reqid), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() + IImePad_Impl::Request(this, core::mem::transmute_copy(&piimepadapplet), core::mem::transmute(&reqid), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Request: Request:: } } @@ -4190,18 +4190,18 @@ pub struct IImePadApplet_Vtbl { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub trait IImePadApplet_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, lpiimepad: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Initialize(&self, lpiimepad: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Terminate(&self) -> windows_core::Result<()>; fn GetAppletConfig(&self, lpappletcfg: *mut IMEAPPLETCFG) -> windows_core::Result<()>; fn CreateUI(&self, hwndparent: super::super::super::Foundation::HWND, lpimeappletui: *mut IMEAPPLETUI) -> windows_core::Result<()>; - fn Notify(&self, lpimepad: Option<&windows_core::IUnknown>, notify: i32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()>; + fn Notify(&self, lpimepad: windows_core::Ref<'_, windows_core::IUnknown>, notify: i32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] impl IImePadApplet_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, lpiimepad: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImePadApplet_Impl::Initialize(this, windows_core::from_raw_borrowed(&lpiimepad)).into() + IImePadApplet_Impl::Initialize(this, core::mem::transmute_copy(&lpiimepad)).into() } unsafe extern "system" fn Terminate(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4217,7 +4217,7 @@ impl IImePadApplet_Vtbl { } unsafe extern "system" fn Notify(this: *mut core::ffi::c_void, lpimepad: *mut core::ffi::c_void, notify: i32, wparam: super::super::super::Foundation::WPARAM, lparam: super::super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImePadApplet_Impl::Notify(this, windows_core::from_raw_borrowed(&lpimepad), core::mem::transmute_copy(¬ify), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() + IImePadApplet_Impl::Notify(this, core::mem::transmute_copy(&lpimepad), core::mem::transmute_copy(¬ify), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs index bd9ba03c7b..7755c10740 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Ink/mod.rs @@ -43,13 +43,13 @@ pub struct IInkD2DRenderer_Vtbl { pub Draw: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, super::super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IInkD2DRenderer_Impl: windows_core::IUnknownImpl { - fn Draw(&self, pd2d1devicecontext: Option<&windows_core::IUnknown>, pinkstrokeiterable: Option<&windows_core::IUnknown>, fhighcontrast: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Draw(&self, pd2d1devicecontext: windows_core::Ref<'_, windows_core::IUnknown>, pinkstrokeiterable: windows_core::Ref<'_, windows_core::IUnknown>, fhighcontrast: super::super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IInkD2DRenderer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Draw(this: *mut core::ffi::c_void, pd2d1devicecontext: *mut core::ffi::c_void, pinkstrokeiterable: *mut core::ffi::c_void, fhighcontrast: super::super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkD2DRenderer_Impl::Draw(this, windows_core::from_raw_borrowed(&pd2d1devicecontext), windows_core::from_raw_borrowed(&pinkstrokeiterable), core::mem::transmute_copy(&fhighcontrast)).into() + IInkD2DRenderer_Impl::Draw(this, core::mem::transmute_copy(&pd2d1devicecontext), core::mem::transmute_copy(&pinkstrokeiterable), core::mem::transmute_copy(&fhighcontrast)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Draw: Draw:: } } @@ -75,13 +75,13 @@ pub struct IInkD2DRenderer2_Vtbl { pub Draw: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, INK_HIGH_CONTRAST_ADJUSTMENT) -> windows_core::HRESULT, } pub trait IInkD2DRenderer2_Impl: windows_core::IUnknownImpl { - fn Draw(&self, pd2d1devicecontext: Option<&windows_core::IUnknown>, pinkstrokeiterable: Option<&windows_core::IUnknown>, highcontrastadjustment: INK_HIGH_CONTRAST_ADJUSTMENT) -> windows_core::Result<()>; + fn Draw(&self, pd2d1devicecontext: windows_core::Ref<'_, windows_core::IUnknown>, pinkstrokeiterable: windows_core::Ref<'_, windows_core::IUnknown>, highcontrastadjustment: INK_HIGH_CONTRAST_ADJUSTMENT) -> windows_core::Result<()>; } impl IInkD2DRenderer2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Draw(this: *mut core::ffi::c_void, pd2d1devicecontext: *mut core::ffi::c_void, pinkstrokeiterable: *mut core::ffi::c_void, highcontrastadjustment: INK_HIGH_CONTRAST_ADJUSTMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkD2DRenderer2_Impl::Draw(this, windows_core::from_raw_borrowed(&pd2d1devicecontext), windows_core::from_raw_borrowed(&pinkstrokeiterable), core::mem::transmute_copy(&highcontrastadjustment)).into() + IInkD2DRenderer2_Impl::Draw(this, core::mem::transmute_copy(&pd2d1devicecontext), core::mem::transmute_copy(&pinkstrokeiterable), core::mem::transmute_copy(&highcontrastadjustment)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Draw: Draw:: } } @@ -123,15 +123,15 @@ pub struct IInkDesktopHost_Vtbl { pub CreateAndInitializeInkPresenter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, f32, f32, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IInkDesktopHost_Impl: windows_core::IUnknownImpl { - fn QueueWorkItem(&self, workitem: Option<&IInkHostWorkItem>) -> windows_core::Result<()>; + fn QueueWorkItem(&self, workitem: windows_core::Ref<'_, IInkHostWorkItem>) -> windows_core::Result<()>; fn CreateInkPresenter(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn CreateAndInitializeInkPresenter(&self, rootvisual: Option<&windows_core::IUnknown>, width: f32, height: f32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateAndInitializeInkPresenter(&self, rootvisual: windows_core::Ref<'_, windows_core::IUnknown>, width: f32, height: f32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IInkDesktopHost_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueueWorkItem(this: *mut core::ffi::c_void, workitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkDesktopHost_Impl::QueueWorkItem(this, windows_core::from_raw_borrowed(&workitem)).into() + IInkDesktopHost_Impl::QueueWorkItem(this, core::mem::transmute_copy(&workitem)).into() } unsafe extern "system" fn CreateInkPresenter(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -139,7 +139,7 @@ impl IInkDesktopHost_Vtbl { } unsafe extern "system" fn CreateAndInitializeInkPresenter(this: *mut core::ffi::c_void, rootvisual: *mut core::ffi::c_void, width: f32, height: f32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkDesktopHost_Impl::CreateAndInitializeInkPresenter(this, windows_core::from_raw_borrowed(&rootvisual), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IInkDesktopHost_Impl::CreateAndInitializeInkPresenter(this, core::mem::transmute_copy(&rootvisual), core::mem::transmute_copy(&width), core::mem::transmute_copy(&height), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -217,8 +217,8 @@ pub struct IInkPresenterDesktop_Vtbl { pub OnHighContrastChanged: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IInkPresenterDesktop_Impl: windows_core::IUnknownImpl { - fn SetRootVisual(&self, rootvisual: Option<&windows_core::IUnknown>, device: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn SetCommitRequestHandler(&self, handler: Option<&IInkCommitRequestHandler>) -> windows_core::Result<()>; + fn SetRootVisual(&self, rootvisual: windows_core::Ref<'_, windows_core::IUnknown>, device: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetCommitRequestHandler(&self, handler: windows_core::Ref<'_, IInkCommitRequestHandler>) -> windows_core::Result<()>; fn GetSize(&self, width: *mut f32, height: *mut f32) -> windows_core::Result<()>; fn SetSize(&self, width: f32, height: f32) -> windows_core::Result<()>; fn OnHighContrastChanged(&self) -> windows_core::Result<()>; @@ -227,11 +227,11 @@ impl IInkPresenterDesktop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetRootVisual(this: *mut core::ffi::c_void, rootvisual: *mut core::ffi::c_void, device: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPresenterDesktop_Impl::SetRootVisual(this, windows_core::from_raw_borrowed(&rootvisual), windows_core::from_raw_borrowed(&device)).into() + IInkPresenterDesktop_Impl::SetRootVisual(this, core::mem::transmute_copy(&rootvisual), core::mem::transmute_copy(&device)).into() } unsafe extern "system" fn SetCommitRequestHandler(this: *mut core::ffi::c_void, handler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPresenterDesktop_Impl::SetCommitRequestHandler(this, windows_core::from_raw_borrowed(&handler)).into() + IInkPresenterDesktop_Impl::SetCommitRequestHandler(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn GetSize(this: *mut core::ffi::c_void, width: *mut f32, height: *mut f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs index 64ad385531..3f731046ca 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs @@ -48,7 +48,7 @@ pub trait IADesktopP2_Impl: windows_core::IUnknownImpl { fn ReReadWallpaper(&self) -> windows_core::Result<()>; fn GetADObjectFlags(&self, pdwflags: *mut u32, dwmask: u32) -> windows_core::Result<()>; fn UpdateAllDesktopSubscriptions(&self) -> windows_core::Result<()>; - fn MakeDynamicChanges(&self, poleobj: Option<&super::super::System::Ole::IOleObject>) -> windows_core::Result<()>; + fn MakeDynamicChanges(&self, poleobj: windows_core::Ref<'_, super::super::System::Ole::IOleObject>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Ole")] impl IADesktopP2_Vtbl { @@ -67,7 +67,7 @@ impl IADesktopP2_Vtbl { } unsafe extern "system" fn MakeDynamicChanges(this: *mut core::ffi::c_void, poleobj: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IADesktopP2_Impl::MakeDynamicChanges(this, windows_core::from_raw_borrowed(&poleobj)).into() + IADesktopP2_Impl::MakeDynamicChanges(this, core::mem::transmute_copy(&poleobj)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -168,14 +168,14 @@ pub struct IBriefcaseInitiator_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IBriefcaseInitiator_Impl: windows_core::IUnknownImpl { - fn IsMonikerInBriefcase(&self, pmk: Option<&super::super::System::Com::IMoniker>) -> windows_core::Result<()>; + fn IsMonikerInBriefcase(&self, pmk: windows_core::Ref<'_, super::super::System::Com::IMoniker>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IBriefcaseInitiator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsMonikerInBriefcase(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBriefcaseInitiator_Impl::IsMonikerInBriefcase(this, windows_core::from_raw_borrowed(&pmk)).into() + IBriefcaseInitiator_Impl::IsMonikerInBriefcase(this, core::mem::transmute_copy(&pmk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), IsMonikerInBriefcase: IsMonikerInBriefcase:: } } @@ -230,8 +230,8 @@ pub struct IEmptyVolumeCache_Vtbl { #[cfg(feature = "Win32_System_Registry")] pub trait IEmptyVolumeCache_Impl: windows_core::IUnknownImpl { fn Initialize(&self, hkregkey: super::super::System::Registry::HKEY, pcwszvolume: &windows_core::PCWSTR, ppwszdisplayname: *mut windows_core::PWSTR, ppwszdescription: *mut windows_core::PWSTR, pdwflags: *mut EMPTY_VOLUME_CACHE_FLAGS) -> windows_core::Result<()>; - fn GetSpaceUsed(&self, pdwlspaceused: *mut u64, picb: Option<&IEmptyVolumeCacheCallBack>) -> windows_core::Result<()>; - fn Purge(&self, dwlspacetofree: u64, picb: Option<&IEmptyVolumeCacheCallBack>) -> windows_core::Result<()>; + fn GetSpaceUsed(&self, pdwlspaceused: *mut u64, picb: windows_core::Ref<'_, IEmptyVolumeCacheCallBack>) -> windows_core::Result<()>; + fn Purge(&self, dwlspacetofree: u64, picb: windows_core::Ref<'_, IEmptyVolumeCacheCallBack>) -> windows_core::Result<()>; fn ShowProperties(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; fn Deactivate(&self) -> windows_core::Result; } @@ -244,11 +244,11 @@ impl IEmptyVolumeCache_Vtbl { } unsafe extern "system" fn GetSpaceUsed(this: *mut core::ffi::c_void, pdwlspaceused: *mut u64, picb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IEmptyVolumeCache_Impl::GetSpaceUsed(this, core::mem::transmute_copy(&pdwlspaceused), windows_core::from_raw_borrowed(&picb)).into() + IEmptyVolumeCache_Impl::GetSpaceUsed(this, core::mem::transmute_copy(&pdwlspaceused), core::mem::transmute_copy(&picb)).into() } unsafe extern "system" fn Purge(this: *mut core::ffi::c_void, dwlspacetofree: u64, picb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IEmptyVolumeCache_Impl::Purge(this, core::mem::transmute_copy(&dwlspacetofree), windows_core::from_raw_borrowed(&picb)).into() + IEmptyVolumeCache_Impl::Purge(this, core::mem::transmute_copy(&dwlspacetofree), core::mem::transmute_copy(&picb)).into() } unsafe extern "system" fn ShowProperties(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -398,7 +398,7 @@ pub struct IReconcilableObject_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait IReconcilableObject_Impl: windows_core::IUnknownImpl { - fn Reconcile(&self, pinitiator: Option<&IReconcileInitiator>, dwflags: u32, hwndowner: super::super::Foundation::HWND, hwndprogressfeedback: super::super::Foundation::HWND, ulcinput: u32, rgpmkotherinput: *mut Option, ploutindex: *mut i32, pstgnewresidues: Option<&super::super::System::Com::StructuredStorage::IStorage>, pvreserved: *const core::ffi::c_void) -> windows_core::Result<()>; + fn Reconcile(&self, pinitiator: windows_core::Ref<'_, IReconcileInitiator>, dwflags: u32, hwndowner: super::super::Foundation::HWND, hwndprogressfeedback: super::super::Foundation::HWND, ulcinput: u32, rgpmkotherinput: windows_core::OutRef<'_, super::super::System::Com::IMoniker>, ploutindex: *mut i32, pstgnewresidues: windows_core::Ref<'_, super::super::System::Com::StructuredStorage::IStorage>, pvreserved: *const core::ffi::c_void) -> windows_core::Result<()>; fn GetProgressFeedbackMaxEstimate(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] @@ -406,7 +406,7 @@ impl IReconcilableObject_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Reconcile(this: *mut core::ffi::c_void, pinitiator: *mut core::ffi::c_void, dwflags: u32, hwndowner: super::super::Foundation::HWND, hwndprogressfeedback: super::super::Foundation::HWND, ulcinput: u32, rgpmkotherinput: *mut *mut core::ffi::c_void, ploutindex: *mut i32, pstgnewresidues: *mut core::ffi::c_void, pvreserved: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReconcilableObject_Impl::Reconcile(this, windows_core::from_raw_borrowed(&pinitiator), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&hwndowner), core::mem::transmute_copy(&hwndprogressfeedback), core::mem::transmute_copy(&ulcinput), core::mem::transmute_copy(&rgpmkotherinput), core::mem::transmute_copy(&ploutindex), windows_core::from_raw_borrowed(&pstgnewresidues), core::mem::transmute_copy(&pvreserved)).into() + IReconcilableObject_Impl::Reconcile(this, core::mem::transmute_copy(&pinitiator), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&hwndowner), core::mem::transmute_copy(&hwndprogressfeedback), core::mem::transmute_copy(&ulcinput), core::mem::transmute_copy(&rgpmkotherinput), core::mem::transmute_copy(&ploutindex), core::mem::transmute_copy(&pstgnewresidues), core::mem::transmute_copy(&pvreserved)).into() } unsafe extern "system" fn GetProgressFeedbackMaxEstimate(this: *mut core::ffi::c_void, pulprogressmax: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -450,14 +450,14 @@ pub struct IReconcileInitiator_Vtbl { pub SetProgressFeedback: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait IReconcileInitiator_Impl: windows_core::IUnknownImpl { - fn SetAbortCallback(&self, punkforabort: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetAbortCallback(&self, punkforabort: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetProgressFeedback(&self, ulprogress: u32, ulprogressmax: u32) -> windows_core::Result<()>; } impl IReconcileInitiator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetAbortCallback(this: *mut core::ffi::c_void, punkforabort: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IReconcileInitiator_Impl::SetAbortCallback(this, windows_core::from_raw_borrowed(&punkforabort)).into() + IReconcileInitiator_Impl::SetAbortCallback(this, core::mem::transmute_copy(&punkforabort)).into() } unsafe extern "system" fn SetProgressFeedback(this: *mut core::ffi::c_void, ulprogress: u32, ulprogressmax: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs index 833fb73fad..fb8b3794c0 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs @@ -26,15 +26,15 @@ pub struct IUIApplication_Vtbl { pub OnDestroyUICommand: unsafe extern "system" fn(*mut core::ffi::c_void, u32, UI_COMMANDTYPE, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIApplication_Impl: windows_core::IUnknownImpl { - fn OnViewChanged(&self, viewid: u32, typeid: UI_VIEWTYPE, view: Option<&windows_core::IUnknown>, verb: UI_VIEWVERB, ureasoncode: i32) -> windows_core::Result<()>; + fn OnViewChanged(&self, viewid: u32, typeid: UI_VIEWTYPE, view: windows_core::Ref<'_, windows_core::IUnknown>, verb: UI_VIEWVERB, ureasoncode: i32) -> windows_core::Result<()>; fn OnCreateUICommand(&self, commandid: u32, typeid: UI_COMMANDTYPE) -> windows_core::Result; - fn OnDestroyUICommand(&self, commandid: u32, typeid: UI_COMMANDTYPE, commandhandler: Option<&IUICommandHandler>) -> windows_core::Result<()>; + fn OnDestroyUICommand(&self, commandid: u32, typeid: UI_COMMANDTYPE, commandhandler: windows_core::Ref<'_, IUICommandHandler>) -> windows_core::Result<()>; } impl IUIApplication_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnViewChanged(this: *mut core::ffi::c_void, viewid: u32, typeid: UI_VIEWTYPE, view: *mut core::ffi::c_void, verb: UI_VIEWVERB, ureasoncode: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIApplication_Impl::OnViewChanged(this, core::mem::transmute_copy(&viewid), core::mem::transmute_copy(&typeid), windows_core::from_raw_borrowed(&view), core::mem::transmute_copy(&verb), core::mem::transmute_copy(&ureasoncode)).into() + IUIApplication_Impl::OnViewChanged(this, core::mem::transmute_copy(&viewid), core::mem::transmute_copy(&typeid), core::mem::transmute_copy(&view), core::mem::transmute_copy(&verb), core::mem::transmute_copy(&ureasoncode)).into() } unsafe extern "system" fn OnCreateUICommand(this: *mut core::ffi::c_void, commandid: u32, typeid: UI_COMMANDTYPE, commandhandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -48,7 +48,7 @@ impl IUIApplication_Vtbl { } unsafe extern "system" fn OnDestroyUICommand(this: *mut core::ffi::c_void, commandid: u32, typeid: UI_COMMANDTYPE, commandhandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIApplication_Impl::OnDestroyUICommand(this, core::mem::transmute_copy(&commandid), core::mem::transmute_copy(&typeid), windows_core::from_raw_borrowed(&commandhandler)).into() + IUIApplication_Impl::OnDestroyUICommand(this, core::mem::transmute_copy(&commandid), core::mem::transmute_copy(&typeid), core::mem::transmute_copy(&commandhandler)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -112,10 +112,10 @@ pub struct IUICollection_Vtbl { pub trait IUICollection_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetItem(&self, index: u32) -> windows_core::Result; - fn Add(&self, item: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn Insert(&self, index: u32, item: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Add(&self, item: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn Insert(&self, index: u32, item: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RemoveAt(&self, index: u32) -> windows_core::Result<()>; - fn Replace(&self, indexreplaced: u32, itemreplacewith: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Replace(&self, indexreplaced: u32, itemreplacewith: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } impl IUICollection_Vtbl { @@ -142,11 +142,11 @@ impl IUICollection_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, item: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUICollection_Impl::Add(this, windows_core::from_raw_borrowed(&item)).into() + IUICollection_Impl::Add(this, core::mem::transmute_copy(&item)).into() } unsafe extern "system" fn Insert(this: *mut core::ffi::c_void, index: u32, item: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUICollection_Impl::Insert(this, core::mem::transmute_copy(&index), windows_core::from_raw_borrowed(&item)).into() + IUICollection_Impl::Insert(this, core::mem::transmute_copy(&index), core::mem::transmute_copy(&item)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, index: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -154,7 +154,7 @@ impl IUICollection_Vtbl { } unsafe extern "system" fn Replace(this: *mut core::ffi::c_void, indexreplaced: u32, itemreplacewith: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUICollection_Impl::Replace(this, core::mem::transmute_copy(&indexreplaced), windows_core::from_raw_borrowed(&itemreplacewith)).into() + IUICollection_Impl::Replace(this, core::mem::transmute_copy(&indexreplaced), core::mem::transmute_copy(&itemreplacewith)).into() } unsafe extern "system" fn Clear(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -193,13 +193,13 @@ pub struct IUICollectionChangedEvent_Vtbl { pub OnChanged: unsafe extern "system" fn(*mut core::ffi::c_void, UI_COLLECTIONCHANGE, u32, *mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUICollectionChangedEvent_Impl: windows_core::IUnknownImpl { - fn OnChanged(&self, action: UI_COLLECTIONCHANGE, oldindex: u32, olditem: Option<&windows_core::IUnknown>, newindex: u32, newitem: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnChanged(&self, action: UI_COLLECTIONCHANGE, oldindex: u32, olditem: windows_core::Ref<'_, windows_core::IUnknown>, newindex: u32, newitem: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IUICollectionChangedEvent_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnChanged(this: *mut core::ffi::c_void, action: UI_COLLECTIONCHANGE, oldindex: u32, olditem: *mut core::ffi::c_void, newindex: u32, newitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUICollectionChangedEvent_Impl::OnChanged(this, core::mem::transmute_copy(&action), core::mem::transmute_copy(&oldindex), windows_core::from_raw_borrowed(&olditem), core::mem::transmute_copy(&newindex), windows_core::from_raw_borrowed(&newitem)).into() + IUICollectionChangedEvent_Impl::OnChanged(this, core::mem::transmute_copy(&action), core::mem::transmute_copy(&oldindex), core::mem::transmute_copy(&olditem), core::mem::transmute_copy(&newindex), core::mem::transmute_copy(&newitem)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnChanged: OnChanged:: } } @@ -238,7 +238,7 @@ pub struct IUICommandHandler_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IUICommandHandler_Impl: windows_core::IUnknownImpl { - fn Execute(&self, commandid: u32, verb: UI_EXECUTIONVERB, key: *const super::super::Foundation::PROPERTYKEY, currentvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, commandexecutionproperties: Option<&IUISimplePropertySet>) -> windows_core::Result<()>; + fn Execute(&self, commandid: u32, verb: UI_EXECUTIONVERB, key: *const super::super::Foundation::PROPERTYKEY, currentvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, commandexecutionproperties: windows_core::Ref<'_, IUISimplePropertySet>) -> windows_core::Result<()>; fn UpdateProperty(&self, commandid: u32, key: *const super::super::Foundation::PROPERTYKEY, currentvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -246,7 +246,7 @@ impl IUICommandHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Execute(this: *mut core::ffi::c_void, commandid: u32, verb: UI_EXECUTIONVERB, key: *const super::super::Foundation::PROPERTYKEY, currentvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, commandexecutionproperties: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUICommandHandler_Impl::Execute(this, core::mem::transmute_copy(&commandid), core::mem::transmute_copy(&verb), core::mem::transmute_copy(&key), core::mem::transmute_copy(¤tvalue), windows_core::from_raw_borrowed(&commandexecutionproperties)).into() + IUICommandHandler_Impl::Execute(this, core::mem::transmute_copy(&commandid), core::mem::transmute_copy(&verb), core::mem::transmute_copy(&key), core::mem::transmute_copy(¤tvalue), core::mem::transmute_copy(&commandexecutionproperties)).into() } unsafe extern "system" fn UpdateProperty(this: *mut core::ffi::c_void, commandid: u32, key: *const super::super::Foundation::PROPERTYKEY, currentvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, newvalue: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -342,13 +342,13 @@ pub struct IUIEventingManager_Vtbl { pub SetEventLogger: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IUIEventingManager_Impl: windows_core::IUnknownImpl { - fn SetEventLogger(&self, eventlogger: Option<&IUIEventLogger>) -> windows_core::Result<()>; + fn SetEventLogger(&self, eventlogger: windows_core::Ref<'_, IUIEventLogger>) -> windows_core::Result<()>; } impl IUIEventingManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetEventLogger(this: *mut core::ffi::c_void, eventlogger: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIEventingManager_Impl::SetEventLogger(this, windows_core::from_raw_borrowed(&eventlogger)).into() + IUIEventingManager_Impl::SetEventLogger(this, core::mem::transmute_copy(&eventlogger)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetEventLogger: SetEventLogger:: } } @@ -418,7 +418,7 @@ pub struct IUIFramework_Vtbl { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub trait IUIFramework_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, framewnd: super::super::Foundation::HWND, application: Option<&IUIApplication>) -> windows_core::Result<()>; + fn Initialize(&self, framewnd: super::super::Foundation::HWND, application: windows_core::Ref<'_, IUIApplication>) -> windows_core::Result<()>; fn Destroy(&self) -> windows_core::Result<()>; fn LoadUI(&self, instance: super::super::Foundation::HINSTANCE, resourcename: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetView(&self, viewid: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; @@ -433,7 +433,7 @@ impl IUIFramework_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, framewnd: super::super::Foundation::HWND, application: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIFramework_Impl::Initialize(this, core::mem::transmute_copy(&framewnd), windows_core::from_raw_borrowed(&application)).into() + IUIFramework_Impl::Initialize(this, core::mem::transmute_copy(&framewnd), core::mem::transmute_copy(&application)).into() } unsafe extern "system" fn Destroy(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -614,8 +614,8 @@ pub struct IUIRibbon_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IUIRibbon_Impl: windows_core::IUnknownImpl { fn GetHeight(&self) -> windows_core::Result; - fn LoadSettingsFromStream(&self, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn SaveSettingsToStream(&self, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn LoadSettingsFromStream(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SaveSettingsToStream(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IUIRibbon_Vtbl { @@ -632,11 +632,11 @@ impl IUIRibbon_Vtbl { } unsafe extern "system" fn LoadSettingsFromStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIRibbon_Impl::LoadSettingsFromStream(this, windows_core::from_raw_borrowed(&pstream)).into() + IUIRibbon_Impl::LoadSettingsFromStream(this, core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn SaveSettingsToStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUIRibbon_Impl::SaveSettingsToStream(this, windows_core::from_raw_borrowed(&pstream)).into() + IUIRibbon_Impl::SaveSettingsToStream(this, core::mem::transmute_copy(&pstream)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Win32/UI/Shell/Common/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Shell/Common/mod.rs index 8d052da0a2..21bca19864 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/Common/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/Common/mod.rs @@ -98,8 +98,8 @@ pub struct IObjectCollection_Vtbl { pub Clear: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IObjectCollection_Impl: IObjectArray_Impl { - fn AddObject(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn AddFromArray(&self, poasource: Option<&IObjectArray>) -> windows_core::Result<()>; + fn AddObject(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddFromArray(&self, poasource: windows_core::Ref<'_, IObjectArray>) -> windows_core::Result<()>; fn RemoveObjectAt(&self, uiindex: u32) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } @@ -107,11 +107,11 @@ impl IObjectCollection_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddObject(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjectCollection_Impl::AddObject(this, windows_core::from_raw_borrowed(&punk)).into() + IObjectCollection_Impl::AddObject(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn AddFromArray(this: *mut core::ffi::c_void, poasource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjectCollection_Impl::AddFromArray(this, windows_core::from_raw_borrowed(&poasource)).into() + IObjectCollection_Impl::AddFromArray(this, core::mem::transmute_copy(&poasource)).into() } unsafe extern "system" fn RemoveObjectAt(this: *mut core::ffi::c_void, uiindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs index a1fff52fe5..38ca204075 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs @@ -744,13 +744,13 @@ pub struct ICreateObject_Vtbl { pub CreateObject: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICreateObject_Impl: windows_core::IUnknownImpl { - fn CreateObject(&self, clsid: *const windows_core::GUID, punkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn CreateObject(&self, clsid: *const windows_core::GUID, punkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl ICreateObject_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateObject(this: *mut core::ffi::c_void, clsid: *const windows_core::GUID, punkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICreateObject_Impl::CreateObject(this, core::mem::transmute_copy(&clsid), windows_core::from_raw_borrowed(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + ICreateObject_Impl::CreateObject(this, core::mem::transmute_copy(&clsid), core::mem::transmute_copy(&punkouter), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreateObject: CreateObject:: } } @@ -849,14 +849,14 @@ pub struct IInitializeWithStream_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IInitializeWithStream_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pstream: Option<&super::super::super::System::Com::IStream>, grfmode: u32) -> windows_core::Result<()>; + fn Initialize(&self, pstream: windows_core::Ref<'_, super::super::super::System::Com::IStream>, grfmode: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IInitializeWithStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, grfmode: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInitializeWithStream_Impl::Initialize(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&grfmode)).into() + IInitializeWithStream_Impl::Initialize(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&grfmode)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -1212,9 +1212,9 @@ pub struct IPropertyChangeArray_Vtbl { pub trait IPropertyChangeArray_Impl: windows_core::IUnknownImpl { fn GetCount(&self) -> windows_core::Result; fn GetAt(&self, iindex: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn InsertAt(&self, iindex: u32, ppropchange: Option<&IPropertyChange>) -> windows_core::Result<()>; - fn Append(&self, ppropchange: Option<&IPropertyChange>) -> windows_core::Result<()>; - fn AppendOrReplace(&self, ppropchange: Option<&IPropertyChange>) -> windows_core::Result<()>; + fn InsertAt(&self, iindex: u32, ppropchange: windows_core::Ref<'_, IPropertyChange>) -> windows_core::Result<()>; + fn Append(&self, ppropchange: windows_core::Ref<'_, IPropertyChange>) -> windows_core::Result<()>; + fn AppendOrReplace(&self, ppropchange: windows_core::Ref<'_, IPropertyChange>) -> windows_core::Result<()>; fn RemoveAt(&self, iindex: u32) -> windows_core::Result<()>; fn IsKeyInArray(&self, key: *const super::super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()>; } @@ -1236,15 +1236,15 @@ impl IPropertyChangeArray_Vtbl { } unsafe extern "system" fn InsertAt(this: *mut core::ffi::c_void, iindex: u32, ppropchange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertyChangeArray_Impl::InsertAt(this, core::mem::transmute_copy(&iindex), windows_core::from_raw_borrowed(&ppropchange)).into() + IPropertyChangeArray_Impl::InsertAt(this, core::mem::transmute_copy(&iindex), core::mem::transmute_copy(&ppropchange)).into() } unsafe extern "system" fn Append(this: *mut core::ffi::c_void, ppropchange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertyChangeArray_Impl::Append(this, windows_core::from_raw_borrowed(&ppropchange)).into() + IPropertyChangeArray_Impl::Append(this, core::mem::transmute_copy(&ppropchange)).into() } unsafe extern "system" fn AppendOrReplace(this: *mut core::ffi::c_void, ppropchange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertyChangeArray_Impl::AppendOrReplace(this, windows_core::from_raw_borrowed(&ppropchange)).into() + IPropertyChangeArray_Impl::AppendOrReplace(this, core::mem::transmute_copy(&ppropchange)).into() } unsafe extern "system" fn RemoveAt(this: *mut core::ffi::c_void, iindex: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2417,14 +2417,14 @@ pub struct IPropertyStoreFactory_Vtbl { pub GetPropertyStoreForKeys: unsafe extern "system" fn(*mut core::ffi::c_void, *const super::super::super::Foundation::PROPERTYKEY, u32, GETPROPERTYSTOREFLAGS, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPropertyStoreFactory_Impl: windows_core::IUnknownImpl { - fn GetPropertyStore(&self, flags: GETPROPERTYSTOREFLAGS, punkfactory: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn GetPropertyStore(&self, flags: GETPROPERTYSTOREFLAGS, punkfactory: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetPropertyStoreForKeys(&self, rgkeys: *const super::super::super::Foundation::PROPERTYKEY, ckeys: u32, flags: GETPROPERTYSTOREFLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IPropertyStoreFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetPropertyStore(this: *mut core::ffi::c_void, flags: GETPROPERTYSTOREFLAGS, punkfactory: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPropertyStoreFactory_Impl::GetPropertyStore(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&punkfactory), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IPropertyStoreFactory_Impl::GetPropertyStore(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&punkfactory), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn GetPropertyStoreForKeys(this: *mut core::ffi::c_void, rgkeys: *const super::super::super::Foundation::PROPERTYKEY, ckeys: u32, flags: GETPROPERTYSTOREFLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs index 78be975b79..47c3688a15 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs @@ -10819,7 +10819,7 @@ pub struct IAccessibilityDockingService_Vtbl { #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IAccessibilityDockingService_Impl: windows_core::IUnknownImpl { fn GetAvailableSize(&self, hmonitor: super::super::Graphics::Gdi::HMONITOR, pcxfixed: *mut u32, pcymax: *mut u32) -> windows_core::Result<()>; - fn DockWindow(&self, hwnd: super::super::Foundation::HWND, hmonitor: super::super::Graphics::Gdi::HMONITOR, cyrequested: u32, pcallback: Option<&IAccessibilityDockingServiceCallback>) -> windows_core::Result<()>; + fn DockWindow(&self, hwnd: super::super::Foundation::HWND, hmonitor: super::super::Graphics::Gdi::HMONITOR, cyrequested: u32, pcallback: windows_core::Ref<'_, IAccessibilityDockingServiceCallback>) -> windows_core::Result<()>; fn UndockWindow(&self, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -10831,7 +10831,7 @@ impl IAccessibilityDockingService_Vtbl { } unsafe extern "system" fn DockWindow(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, hmonitor: super::super::Graphics::Gdi::HMONITOR, cyrequested: u32, pcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccessibilityDockingService_Impl::DockWindow(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&hmonitor), core::mem::transmute_copy(&cyrequested), windows_core::from_raw_borrowed(&pcallback)).into() + IAccessibilityDockingService_Impl::DockWindow(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&hmonitor), core::mem::transmute_copy(&cyrequested), core::mem::transmute_copy(&pcallback)).into() } unsafe extern "system" fn UndockWindow(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11281,7 +11281,7 @@ pub struct IAppVisibility_Vtbl { pub trait IAppVisibility_Impl: windows_core::IUnknownImpl { fn GetAppVisibilityOnMonitor(&self, hmonitor: super::super::Graphics::Gdi::HMONITOR) -> windows_core::Result; fn IsLauncherVisible(&self) -> windows_core::Result; - fn Advise(&self, pcallback: Option<&IAppVisibilityEvents>) -> windows_core::Result; + fn Advise(&self, pcallback: windows_core::Ref<'_, IAppVisibilityEvents>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -11309,7 +11309,7 @@ impl IAppVisibility_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pcallback: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAppVisibility_Impl::Advise(this, windows_core::from_raw_borrowed(&pcallback)) { + match IAppVisibility_Impl::Advise(this, core::mem::transmute_copy(&pcallback)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11421,8 +11421,8 @@ pub struct IApplicationActivationManager_Vtbl { } pub trait IApplicationActivationManager_Impl: windows_core::IUnknownImpl { fn ActivateApplication(&self, appusermodelid: &windows_core::PCWSTR, arguments: &windows_core::PCWSTR, options: ACTIVATEOPTIONS) -> windows_core::Result; - fn ActivateForFile(&self, appusermodelid: &windows_core::PCWSTR, itemarray: Option<&IShellItemArray>, verb: &windows_core::PCWSTR) -> windows_core::Result; - fn ActivateForProtocol(&self, appusermodelid: &windows_core::PCWSTR, itemarray: Option<&IShellItemArray>) -> windows_core::Result; + fn ActivateForFile(&self, appusermodelid: &windows_core::PCWSTR, itemarray: windows_core::Ref<'_, IShellItemArray>, verb: &windows_core::PCWSTR) -> windows_core::Result; + fn ActivateForProtocol(&self, appusermodelid: &windows_core::PCWSTR, itemarray: windows_core::Ref<'_, IShellItemArray>) -> windows_core::Result; } impl IApplicationActivationManager_Vtbl { pub const fn new() -> Self { @@ -11438,7 +11438,7 @@ impl IApplicationActivationManager_Vtbl { } unsafe extern "system" fn ActivateForFile(this: *mut core::ffi::c_void, appusermodelid: windows_core::PCWSTR, itemarray: *mut core::ffi::c_void, verb: windows_core::PCWSTR, processid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IApplicationActivationManager_Impl::ActivateForFile(this, core::mem::transmute(&appusermodelid), windows_core::from_raw_borrowed(&itemarray), core::mem::transmute(&verb)) { + match IApplicationActivationManager_Impl::ActivateForFile(this, core::mem::transmute(&appusermodelid), core::mem::transmute_copy(&itemarray), core::mem::transmute(&verb)) { Ok(ok__) => { processid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11448,7 +11448,7 @@ impl IApplicationActivationManager_Vtbl { } unsafe extern "system" fn ActivateForProtocol(this: *mut core::ffi::c_void, appusermodelid: windows_core::PCWSTR, itemarray: *mut core::ffi::c_void, processid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IApplicationActivationManager_Impl::ActivateForProtocol(this, core::mem::transmute(&appusermodelid), windows_core::from_raw_borrowed(&itemarray)) { + match IApplicationActivationManager_Impl::ActivateForProtocol(this, core::mem::transmute(&appusermodelid), core::mem::transmute_copy(&itemarray)) { Ok(ok__) => { processid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11859,7 +11859,7 @@ pub struct IApplicationDestinations_Vtbl { } pub trait IApplicationDestinations_Impl: windows_core::IUnknownImpl { fn SetAppID(&self, pszappid: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn RemoveDestination(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn RemoveDestination(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RemoveAllDestinations(&self) -> windows_core::Result<()>; } impl IApplicationDestinations_Vtbl { @@ -11870,7 +11870,7 @@ impl IApplicationDestinations_Vtbl { } unsafe extern "system" fn RemoveDestination(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IApplicationDestinations_Impl::RemoveDestination(this, windows_core::from_raw_borrowed(&punk)).into() + IApplicationDestinations_Impl::RemoveDestination(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn RemoveAllDestinations(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11995,8 +11995,8 @@ pub trait IAssocHandler_Impl: windows_core::IUnknownImpl { fn GetIconLocation(&self, ppszpath: *mut windows_core::PWSTR, pindex: *mut i32) -> windows_core::Result<()>; fn IsRecommended(&self) -> windows_core::HRESULT; fn MakeDefault(&self, pszdescription: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn Invoke(&self, pdo: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result<()>; - fn CreateInvoker(&self, pdo: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result; + fn Invoke(&self, pdo: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn CreateInvoker(&self, pdo: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IAssocHandler_Vtbl { @@ -12035,11 +12035,11 @@ impl IAssocHandler_Vtbl { } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, pdo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAssocHandler_Impl::Invoke(this, windows_core::from_raw_borrowed(&pdo)).into() + IAssocHandler_Impl::Invoke(this, core::mem::transmute_copy(&pdo)).into() } unsafe extern "system" fn CreateInvoker(this: *mut core::ffi::c_void, pdo: *mut core::ffi::c_void, ppinvoker: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAssocHandler_Impl::CreateInvoker(this, windows_core::from_raw_borrowed(&pdo)) { + match IAssocHandler_Impl::CreateInvoker(this, core::mem::transmute_copy(&pdo)) { Ok(ok__) => { ppinvoker.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12293,14 +12293,14 @@ pub struct IAutoComplete_Vtbl { pub Enable: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IAutoComplete_Impl: windows_core::IUnknownImpl { - fn Init(&self, hwndedit: super::super::Foundation::HWND, punkacl: Option<&windows_core::IUnknown>, pwszregkeypath: &windows_core::PCWSTR, pwszquickcomplete: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn Init(&self, hwndedit: super::super::Foundation::HWND, punkacl: windows_core::Ref<'_, windows_core::IUnknown>, pwszregkeypath: &windows_core::PCWSTR, pwszquickcomplete: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Enable(&self, fenable: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IAutoComplete_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, hwndedit: super::super::Foundation::HWND, punkacl: *mut core::ffi::c_void, pwszregkeypath: windows_core::PCWSTR, pwszquickcomplete: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAutoComplete_Impl::Init(this, core::mem::transmute_copy(&hwndedit), windows_core::from_raw_borrowed(&punkacl), core::mem::transmute(&pwszregkeypath), core::mem::transmute(&pwszquickcomplete)).into() + IAutoComplete_Impl::Init(this, core::mem::transmute_copy(&hwndedit), core::mem::transmute_copy(&punkacl), core::mem::transmute(&pwszregkeypath), core::mem::transmute(&pwszquickcomplete)).into() } unsafe extern "system" fn Enable(this: *mut core::ffi::c_void, fenable: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12513,9 +12513,9 @@ pub struct IBandSite_Vtbl { } #[cfg(feature = "Win32_System_Ole")] pub trait IBandSite_Impl: windows_core::IUnknownImpl { - fn AddBand(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddBand(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn EnumBands(&self, uband: u32) -> windows_core::Result; - fn QueryBand(&self, dwbandid: u32, ppstb: *mut Option, pdwstate: *mut u32, pszname: windows_core::PWSTR, cchname: i32) -> windows_core::Result<()>; + fn QueryBand(&self, dwbandid: u32, ppstb: windows_core::OutRef<'_, IDeskBand>, pdwstate: *mut u32, pszname: windows_core::PWSTR, cchname: i32) -> windows_core::Result<()>; fn SetBandState(&self, dwbandid: u32, dwmask: u32, dwstate: u32) -> windows_core::Result<()>; fn RemoveBand(&self, dwbandid: u32) -> windows_core::Result<()>; fn GetBandObject(&self, dwbandid: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; @@ -12527,7 +12527,7 @@ impl IBandSite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddBand(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBandSite_Impl::AddBand(this, windows_core::from_raw_borrowed(&punk)).into() + IBandSite_Impl::AddBand(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn EnumBands(this: *mut core::ffi::c_void, uband: u32, pdwbandid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12963,8 +12963,8 @@ pub struct IBrowserService_Vtbl { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] pub trait IBrowserService_Impl: windows_core::IUnknownImpl { fn GetParentSite(&self) -> windows_core::Result; - fn SetTitle(&self, psv: Option<&IShellView>, pszname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn GetTitle(&self, psv: Option<&IShellView>, pszname: windows_core::PWSTR, cchname: u32) -> windows_core::Result<()>; + fn SetTitle(&self, psv: windows_core::Ref<'_, IShellView>, pszname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn GetTitle(&self, psv: windows_core::Ref<'_, IShellView>, pszname: windows_core::PWSTR, cchname: u32) -> windows_core::Result<()>; fn GetOleObject(&self) -> windows_core::Result; fn GetTravelLog(&self) -> windows_core::Result; fn ShowControlWindow(&self, id: u32, fshow: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -12975,7 +12975,7 @@ pub trait IBrowserService_Impl: windows_core::IUnknownImpl { fn NavigateToPidl(&self, pidl: *const Common::ITEMIDLIST, grfhlnf: u32) -> windows_core::Result<()>; fn SetNavigateState(&self, bnstate: BNSTATE) -> windows_core::Result<()>; fn GetNavigateState(&self) -> windows_core::Result; - fn NotifyRedirect(&self, psv: Option<&IShellView>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result; + fn NotifyRedirect(&self, psv: windows_core::Ref<'_, IShellView>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result; fn UpdateWindowList(&self) -> windows_core::Result<()>; fn UpdateBackForwardState(&self) -> windows_core::Result<()>; fn SetFlags(&self, dwflags: u32, dwflagmask: u32) -> windows_core::Result<()>; @@ -12985,11 +12985,11 @@ pub trait IBrowserService_Impl: windows_core::IUnknownImpl { fn SetReferrer(&self, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; fn GetBrowserIndex(&self) -> u32; fn GetBrowserByIndex(&self, dwid: u32) -> windows_core::Result; - fn GetHistoryObject(&self, ppole: *mut Option, pstm: *mut Option, ppbc: *mut Option) -> windows_core::Result<()>; - fn SetHistoryObject(&self, pole: Option<&super::super::System::Ole::IOleObject>, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn CacheOLEServer(&self, pole: Option<&super::super::System::Ole::IOleObject>) -> windows_core::Result<()>; + fn GetHistoryObject(&self, ppole: windows_core::OutRef<'_, super::super::System::Ole::IOleObject>, pstm: windows_core::OutRef<'_, super::super::System::Com::IStream>, ppbc: windows_core::OutRef<'_, super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; + fn SetHistoryObject(&self, pole: windows_core::Ref<'_, super::super::System::Ole::IOleObject>, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn CacheOLEServer(&self, pole: windows_core::Ref<'_, super::super::System::Ole::IOleObject>) -> windows_core::Result<()>; fn GetSetCodePage(&self, pvarin: *const super::super::System::Variant::VARIANT) -> windows_core::Result; - fn OnHttpEquiv(&self, psv: Option<&IShellView>, fdone: super::super::Foundation::BOOL, pvarargin: *const super::super::System::Variant::VARIANT) -> windows_core::Result; + fn OnHttpEquiv(&self, psv: windows_core::Ref<'_, IShellView>, fdone: super::super::Foundation::BOOL, pvarargin: *const super::super::System::Variant::VARIANT) -> windows_core::Result; fn GetPalette(&self) -> windows_core::Result; fn RegisterWindow(&self, fforceregister: super::super::Foundation::BOOL, swc: ShellWindowTypeConstants) -> windows_core::Result<()>; } @@ -13008,11 +13008,11 @@ impl IBrowserService_Vtbl { } unsafe extern "system" fn SetTitle(this: *mut core::ffi::c_void, psv: *mut core::ffi::c_void, pszname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService_Impl::SetTitle(this, windows_core::from_raw_borrowed(&psv), core::mem::transmute(&pszname)).into() + IBrowserService_Impl::SetTitle(this, core::mem::transmute_copy(&psv), core::mem::transmute(&pszname)).into() } unsafe extern "system" fn GetTitle(this: *mut core::ffi::c_void, psv: *mut core::ffi::c_void, pszname: windows_core::PWSTR, cchname: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService_Impl::GetTitle(this, windows_core::from_raw_borrowed(&psv), core::mem::transmute_copy(&pszname), core::mem::transmute_copy(&cchname)).into() + IBrowserService_Impl::GetTitle(this, core::mem::transmute_copy(&psv), core::mem::transmute_copy(&pszname), core::mem::transmute_copy(&cchname)).into() } unsafe extern "system" fn GetOleObject(this: *mut core::ffi::c_void, ppobjv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13086,7 +13086,7 @@ impl IBrowserService_Vtbl { } unsafe extern "system" fn NotifyRedirect(this: *mut core::ffi::c_void, psv: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST, pfdidbrowse: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBrowserService_Impl::NotifyRedirect(this, windows_core::from_raw_borrowed(&psv), core::mem::transmute_copy(&pidl)) { + match IBrowserService_Impl::NotifyRedirect(this, core::mem::transmute_copy(&psv), core::mem::transmute_copy(&pidl)) { Ok(ok__) => { pfdidbrowse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -13154,11 +13154,11 @@ impl IBrowserService_Vtbl { } unsafe extern "system" fn SetHistoryObject(this: *mut core::ffi::c_void, pole: *mut core::ffi::c_void, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService_Impl::SetHistoryObject(this, windows_core::from_raw_borrowed(&pole), core::mem::transmute_copy(&fislocalanchor)).into() + IBrowserService_Impl::SetHistoryObject(this, core::mem::transmute_copy(&pole), core::mem::transmute_copy(&fislocalanchor)).into() } unsafe extern "system" fn CacheOLEServer(this: *mut core::ffi::c_void, pole: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService_Impl::CacheOLEServer(this, windows_core::from_raw_borrowed(&pole)).into() + IBrowserService_Impl::CacheOLEServer(this, core::mem::transmute_copy(&pole)).into() } unsafe extern "system" fn GetSetCodePage(this: *mut core::ffi::c_void, pvarin: *const super::super::System::Variant::VARIANT, pvarout: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13172,7 +13172,7 @@ impl IBrowserService_Vtbl { } unsafe extern "system" fn OnHttpEquiv(this: *mut core::ffi::c_void, psv: *mut core::ffi::c_void, fdone: super::super::Foundation::BOOL, pvarargin: *const super::super::System::Variant::VARIANT, pvarargout: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBrowserService_Impl::OnHttpEquiv(this, windows_core::from_raw_borrowed(&psv), core::mem::transmute_copy(&fdone), core::mem::transmute_copy(&pvarargin)) { + match IBrowserService_Impl::OnHttpEquiv(this, core::mem::transmute_copy(&psv), core::mem::transmute_copy(&fdone), core::mem::transmute_copy(&pvarargin)) { Ok(ok__) => { pvarargout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -13617,12 +13617,12 @@ pub trait IBrowserService2_Impl: IBrowserService_Impl { fn OnFrameWindowActivateBS(&self, factive: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn ReleaseShellView(&self) -> windows_core::Result<()>; fn ActivatePendingView(&self) -> windows_core::Result<()>; - fn CreateViewWindow(&self, psvnew: Option<&IShellView>, psvold: Option<&IShellView>, prcview: *const super::super::Foundation::RECT) -> windows_core::Result; + fn CreateViewWindow(&self, psvnew: windows_core::Ref<'_, IShellView>, psvold: windows_core::Ref<'_, IShellView>, prcview: *const super::super::Foundation::RECT) -> windows_core::Result; fn CreateBrowserPropSheetExt(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetViewWindow(&self) -> windows_core::Result; fn GetBaseBrowserData(&self) -> windows_core::Result<*mut BASEBROWSERDATALH>; fn PutBaseBrowserData(&self) -> *mut BASEBROWSERDATALH; - fn InitializeTravelLog(&self, ptl: Option<&ITravelLog>, dw: u32) -> windows_core::Result<()>; + fn InitializeTravelLog(&self, ptl: windows_core::Ref<'_, ITravelLog>, dw: u32) -> windows_core::Result<()>; fn SetTopBrowser(&self) -> windows_core::Result<()>; fn Offline(&self, icmd: i32) -> windows_core::Result<()>; fn AllowViewResize(&self, f: super::super::Foundation::BOOL) -> windows_core::Result<()>; @@ -13630,16 +13630,16 @@ pub trait IBrowserService2_Impl: IBrowserService_Impl { fn UpdateSecureLockIcon(&self, esecurelock: i32) -> windows_core::Result<()>; fn InitializeDownloadManager(&self) -> windows_core::Result<()>; fn InitializeTransitionSite(&self) -> windows_core::Result<()>; - fn _Initialize(&self, hwnd: super::super::Foundation::HWND, pauto: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn _Initialize(&self, hwnd: super::super::Foundation::HWND, pauto: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn _CancelPendingNavigationAsync(&self) -> windows_core::Result<()>; fn _CancelPendingView(&self) -> windows_core::Result<()>; fn _MaySaveChanges(&self) -> windows_core::Result<()>; fn _PauseOrResumeView(&self, fpaused: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn _DisableModeless(&self) -> windows_core::Result<()>; fn _NavigateToPidl2(&self, pidl: *const Common::ITEMIDLIST, grfhlnf: u32, dwflags: u32) -> windows_core::Result<()>; - fn _TryShell2Rename(&self, psv: Option<&IShellView>, pidlnew: *const Common::ITEMIDLIST) -> windows_core::Result<()>; + fn _TryShell2Rename(&self, psv: windows_core::Ref<'_, IShellView>, pidlnew: *const Common::ITEMIDLIST) -> windows_core::Result<()>; fn _SwitchActivationNow(&self) -> windows_core::Result<()>; - fn _ExecChildren(&self, punkbar: Option<&windows_core::IUnknown>, fbroadcast: super::super::Foundation::BOOL, pguidcmdgroup: *const windows_core::GUID, ncmdid: u32, ncmdexecopt: u32, pvarargin: *const super::super::System::Variant::VARIANT, pvarargout: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()>; + fn _ExecChildren(&self, punkbar: windows_core::Ref<'_, windows_core::IUnknown>, fbroadcast: super::super::Foundation::BOOL, pguidcmdgroup: *const windows_core::GUID, ncmdid: u32, ncmdexecopt: u32, pvarargin: *const super::super::System::Variant::VARIANT, pvarargout: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn _SendChildren(&self, hwndbar: super::super::Foundation::HWND, fbroadcast: super::super::Foundation::BOOL, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; fn GetFolderSetData(&self, pfsd: *mut FOLDERSETDATA) -> windows_core::Result<()>; fn _OnFocusChange(&self, itb: u32) -> windows_core::Result<()>; @@ -13657,15 +13657,15 @@ pub trait IBrowserService2_Impl: IBrowserService_Impl { fn SetAcceleratorMenu(&self, hacc: super::WindowsAndMessaging::HACCEL) -> windows_core::Result<()>; fn _GetToolbarCount(&self) -> i32; fn _GetToolbarItem(&self, itb: i32) -> *mut TOOLBARITEM; - fn _SaveToolbars(&self, pstm: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn _LoadToolbars(&self, pstm: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn _SaveToolbars(&self, pstm: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn _LoadToolbars(&self, pstm: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn _CloseAndReleaseToolbars(&self, fclose: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn v_MayGetNextToolbarFocus(&self, lpmsg: *const super::WindowsAndMessaging::MSG, itbnext: u32, citb: i32, pptbi: *mut *mut TOOLBARITEM, phwnd: *mut super::super::Foundation::HWND) -> windows_core::Result<()>; fn _ResizeNextBorderHelper(&self, itb: u32, busehmonitor: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn _FindTBar(&self, punksrc: Option<&windows_core::IUnknown>) -> u32; + fn _FindTBar(&self, punksrc: windows_core::Ref<'_, windows_core::IUnknown>) -> u32; fn _SetFocus(&self, ptbi: *const TOOLBARITEM, hwnd: super::super::Foundation::HWND, lpmsg: *const super::WindowsAndMessaging::MSG) -> windows_core::Result<()>; fn v_MayTranslateAccelerator(&self, pmsg: *mut super::WindowsAndMessaging::MSG) -> windows_core::Result<()>; - fn _GetBorderDWHelper(&self, punksrc: Option<&windows_core::IUnknown>, lprectborder: *mut super::super::Foundation::RECT, busehmonitor: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn _GetBorderDWHelper(&self, punksrc: windows_core::Ref<'_, windows_core::IUnknown>, lprectborder: *mut super::super::Foundation::RECT, busehmonitor: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn v_CheckZoneCrossing(&self, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_Controls", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] @@ -13727,7 +13727,7 @@ impl IBrowserService2_Vtbl { } unsafe extern "system" fn CreateViewWindow(this: *mut core::ffi::c_void, psvnew: *mut core::ffi::c_void, psvold: *mut core::ffi::c_void, prcview: *const super::super::Foundation::RECT, phwnd: *mut super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IBrowserService2_Impl::CreateViewWindow(this, windows_core::from_raw_borrowed(&psvnew), windows_core::from_raw_borrowed(&psvold), core::mem::transmute_copy(&prcview)) { + match IBrowserService2_Impl::CreateViewWindow(this, core::mem::transmute_copy(&psvnew), core::mem::transmute_copy(&psvold), core::mem::transmute_copy(&prcview)) { Ok(ok__) => { phwnd.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -13765,7 +13765,7 @@ impl IBrowserService2_Vtbl { } unsafe extern "system" fn InitializeTravelLog(this: *mut core::ffi::c_void, ptl: *mut core::ffi::c_void, dw: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService2_Impl::InitializeTravelLog(this, windows_core::from_raw_borrowed(&ptl), core::mem::transmute_copy(&dw)).into() + IBrowserService2_Impl::InitializeTravelLog(this, core::mem::transmute_copy(&ptl), core::mem::transmute_copy(&dw)).into() } unsafe extern "system" fn SetTopBrowser(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13797,7 +13797,7 @@ impl IBrowserService2_Vtbl { } unsafe extern "system" fn _Initialize(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, pauto: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService2_Impl::_Initialize(this, core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&pauto)).into() + IBrowserService2_Impl::_Initialize(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&pauto)).into() } unsafe extern "system" fn _CancelPendingNavigationAsync(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13825,7 +13825,7 @@ impl IBrowserService2_Vtbl { } unsafe extern "system" fn _TryShell2Rename(this: *mut core::ffi::c_void, psv: *mut core::ffi::c_void, pidlnew: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService2_Impl::_TryShell2Rename(this, windows_core::from_raw_borrowed(&psv), core::mem::transmute_copy(&pidlnew)).into() + IBrowserService2_Impl::_TryShell2Rename(this, core::mem::transmute_copy(&psv), core::mem::transmute_copy(&pidlnew)).into() } unsafe extern "system" fn _SwitchActivationNow(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13833,7 +13833,7 @@ impl IBrowserService2_Vtbl { } unsafe extern "system" fn _ExecChildren(this: *mut core::ffi::c_void, punkbar: *mut core::ffi::c_void, fbroadcast: super::super::Foundation::BOOL, pguidcmdgroup: *const windows_core::GUID, ncmdid: u32, ncmdexecopt: u32, pvarargin: *const super::super::System::Variant::VARIANT, pvarargout: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService2_Impl::_ExecChildren(this, windows_core::from_raw_borrowed(&punkbar), core::mem::transmute_copy(&fbroadcast), core::mem::transmute_copy(&pguidcmdgroup), core::mem::transmute_copy(&ncmdid), core::mem::transmute_copy(&ncmdexecopt), core::mem::transmute_copy(&pvarargin), core::mem::transmute_copy(&pvarargout)).into() + IBrowserService2_Impl::_ExecChildren(this, core::mem::transmute_copy(&punkbar), core::mem::transmute_copy(&fbroadcast), core::mem::transmute_copy(&pguidcmdgroup), core::mem::transmute_copy(&ncmdid), core::mem::transmute_copy(&ncmdexecopt), core::mem::transmute_copy(&pvarargin), core::mem::transmute_copy(&pvarargout)).into() } unsafe extern "system" fn _SendChildren(this: *mut core::ffi::c_void, hwndbar: super::super::Foundation::HWND, fbroadcast: super::super::Foundation::BOOL, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13905,11 +13905,11 @@ impl IBrowserService2_Vtbl { } unsafe extern "system" fn _SaveToolbars(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService2_Impl::_SaveToolbars(this, windows_core::from_raw_borrowed(&pstm)).into() + IBrowserService2_Impl::_SaveToolbars(this, core::mem::transmute_copy(&pstm)).into() } unsafe extern "system" fn _LoadToolbars(this: *mut core::ffi::c_void, pstm: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService2_Impl::_LoadToolbars(this, windows_core::from_raw_borrowed(&pstm)).into() + IBrowserService2_Impl::_LoadToolbars(this, core::mem::transmute_copy(&pstm)).into() } unsafe extern "system" fn _CloseAndReleaseToolbars(this: *mut core::ffi::c_void, fclose: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13925,7 +13925,7 @@ impl IBrowserService2_Vtbl { } unsafe extern "system" fn _FindTBar(this: *mut core::ffi::c_void, punksrc: *mut core::ffi::c_void) -> u32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService2_Impl::_FindTBar(this, windows_core::from_raw_borrowed(&punksrc)) + IBrowserService2_Impl::_FindTBar(this, core::mem::transmute_copy(&punksrc)) } unsafe extern "system" fn _SetFocus(this: *mut core::ffi::c_void, ptbi: *const TOOLBARITEM, hwnd: super::super::Foundation::HWND, lpmsg: *const super::WindowsAndMessaging::MSG) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13937,7 +13937,7 @@ impl IBrowserService2_Vtbl { } unsafe extern "system" fn _GetBorderDWHelper(this: *mut core::ffi::c_void, punksrc: *mut core::ffi::c_void, lprectborder: *mut super::super::Foundation::RECT, busehmonitor: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IBrowserService2_Impl::_GetBorderDWHelper(this, windows_core::from_raw_borrowed(&punksrc), core::mem::transmute_copy(&lprectborder), core::mem::transmute_copy(&busehmonitor)).into() + IBrowserService2_Impl::_GetBorderDWHelper(this, core::mem::transmute_copy(&punksrc), core::mem::transmute_copy(&lprectborder), core::mem::transmute_copy(&busehmonitor)).into() } unsafe extern "system" fn v_CheckZoneCrossing(this: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14603,24 +14603,24 @@ pub struct ICommDlgBrowser_Vtbl { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))] pub trait ICommDlgBrowser_Impl: windows_core::IUnknownImpl { - fn OnDefaultCommand(&self, ppshv: Option<&IShellView>) -> windows_core::Result<()>; - fn OnStateChange(&self, ppshv: Option<&IShellView>, uchange: u32) -> windows_core::Result<()>; - fn IncludeObject(&self, ppshv: Option<&IShellView>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; + fn OnDefaultCommand(&self, ppshv: windows_core::Ref<'_, IShellView>) -> windows_core::Result<()>; + fn OnStateChange(&self, ppshv: windows_core::Ref<'_, IShellView>, uchange: u32) -> windows_core::Result<()>; + fn IncludeObject(&self, ppshv: windows_core::Ref<'_, IShellView>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))] impl ICommDlgBrowser_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnDefaultCommand(this: *mut core::ffi::c_void, ppshv: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICommDlgBrowser_Impl::OnDefaultCommand(this, windows_core::from_raw_borrowed(&ppshv)).into() + ICommDlgBrowser_Impl::OnDefaultCommand(this, core::mem::transmute_copy(&ppshv)).into() } unsafe extern "system" fn OnStateChange(this: *mut core::ffi::c_void, ppshv: *mut core::ffi::c_void, uchange: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICommDlgBrowser_Impl::OnStateChange(this, windows_core::from_raw_borrowed(&ppshv), core::mem::transmute_copy(&uchange)).into() + ICommDlgBrowser_Impl::OnStateChange(this, core::mem::transmute_copy(&ppshv), core::mem::transmute_copy(&uchange)).into() } unsafe extern "system" fn IncludeObject(this: *mut core::ffi::c_void, ppshv: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICommDlgBrowser_Impl::IncludeObject(this, windows_core::from_raw_borrowed(&ppshv), core::mem::transmute_copy(&pidl)).into() + ICommDlgBrowser_Impl::IncludeObject(this, core::mem::transmute_copy(&ppshv), core::mem::transmute_copy(&pidl)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -14678,8 +14678,8 @@ pub struct ICommDlgBrowser2_Vtbl { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))] pub trait ICommDlgBrowser2_Impl: ICommDlgBrowser_Impl { - fn Notify(&self, ppshv: Option<&IShellView>, dwnotifytype: u32) -> windows_core::Result<()>; - fn GetDefaultMenuText(&self, ppshv: Option<&IShellView>, psztext: windows_core::PWSTR, cchmax: i32) -> windows_core::Result<()>; + fn Notify(&self, ppshv: windows_core::Ref<'_, IShellView>, dwnotifytype: u32) -> windows_core::Result<()>; + fn GetDefaultMenuText(&self, ppshv: windows_core::Ref<'_, IShellView>, psztext: windows_core::PWSTR, cchmax: i32) -> windows_core::Result<()>; fn GetViewFlags(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))] @@ -14687,11 +14687,11 @@ impl ICommDlgBrowser2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Notify(this: *mut core::ffi::c_void, ppshv: *mut core::ffi::c_void, dwnotifytype: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICommDlgBrowser2_Impl::Notify(this, windows_core::from_raw_borrowed(&ppshv), core::mem::transmute_copy(&dwnotifytype)).into() + ICommDlgBrowser2_Impl::Notify(this, core::mem::transmute_copy(&ppshv), core::mem::transmute_copy(&dwnotifytype)).into() } unsafe extern "system" fn GetDefaultMenuText(this: *mut core::ffi::c_void, ppshv: *mut core::ffi::c_void, psztext: windows_core::PWSTR, cchmax: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICommDlgBrowser2_Impl::GetDefaultMenuText(this, windows_core::from_raw_borrowed(&ppshv), core::mem::transmute_copy(&psztext), core::mem::transmute_copy(&cchmax)).into() + ICommDlgBrowser2_Impl::GetDefaultMenuText(this, core::mem::transmute_copy(&ppshv), core::mem::transmute_copy(&psztext), core::mem::transmute_copy(&cchmax)).into() } unsafe extern "system" fn GetViewFlags(this: *mut core::ffi::c_void, pdwflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14758,16 +14758,16 @@ pub struct ICommDlgBrowser3_Vtbl { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))] pub trait ICommDlgBrowser3_Impl: ICommDlgBrowser2_Impl { - fn OnColumnClicked(&self, ppshv: Option<&IShellView>, icolumn: i32) -> windows_core::Result<()>; + fn OnColumnClicked(&self, ppshv: windows_core::Ref<'_, IShellView>, icolumn: i32) -> windows_core::Result<()>; fn GetCurrentFilter(&self, pszfilespec: windows_core::PWSTR, cchfilespec: i32) -> windows_core::Result<()>; - fn OnPreViewCreated(&self, ppshv: Option<&IShellView>) -> windows_core::Result<()>; + fn OnPreViewCreated(&self, ppshv: windows_core::Ref<'_, IShellView>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))] impl ICommDlgBrowser3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnColumnClicked(this: *mut core::ffi::c_void, ppshv: *mut core::ffi::c_void, icolumn: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICommDlgBrowser3_Impl::OnColumnClicked(this, windows_core::from_raw_borrowed(&ppshv), core::mem::transmute_copy(&icolumn)).into() + ICommDlgBrowser3_Impl::OnColumnClicked(this, core::mem::transmute_copy(&ppshv), core::mem::transmute_copy(&icolumn)).into() } unsafe extern "system" fn GetCurrentFilter(this: *mut core::ffi::c_void, pszfilespec: windows_core::PWSTR, cchfilespec: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14775,7 +14775,7 @@ impl ICommDlgBrowser3_Vtbl { } unsafe extern "system" fn OnPreViewCreated(this: *mut core::ffi::c_void, ppshv: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICommDlgBrowser3_Impl::OnPreViewCreated(this, windows_core::from_raw_borrowed(&ppshv)).into() + ICommDlgBrowser3_Impl::OnPreViewCreated(this, core::mem::transmute_copy(&ppshv)).into() } Self { base__: ICommDlgBrowser2_Vtbl::new::(), @@ -14845,7 +14845,7 @@ pub struct IConnectableCredentialProviderCredential_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IConnectableCredentialProviderCredential_Impl: ICredentialProviderCredential_Impl { - fn Connect(&self, pqcws: Option<&IQueryContinueWithStatus>) -> windows_core::Result<()>; + fn Connect(&self, pqcws: windows_core::Ref<'_, IQueryContinueWithStatus>) -> windows_core::Result<()>; fn Disconnect(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -14853,7 +14853,7 @@ impl IConnectableCredentialProviderCredential_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Connect(this: *mut core::ffi::c_void, pqcws: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IConnectableCredentialProviderCredential_Impl::Connect(this, windows_core::from_raw_borrowed(&pqcws)).into() + IConnectableCredentialProviderCredential_Impl::Connect(this, core::mem::transmute_copy(&pqcws)).into() } unsafe extern "system" fn Disconnect(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -14887,13 +14887,13 @@ pub struct IContactManagerInterop_Vtbl { pub ShowContactCardForWindow: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HWND, *mut core::ffi::c_void, *const super::super::Foundation::RECT, FLYOUT_PLACEMENT) -> windows_core::HRESULT, } pub trait IContactManagerInterop_Impl: windows_core::IUnknownImpl { - fn ShowContactCardForWindow(&self, appwindow: super::super::Foundation::HWND, contact: Option<&windows_core::IUnknown>, selection: *const super::super::Foundation::RECT, preferredplacement: FLYOUT_PLACEMENT) -> windows_core::Result<()>; + fn ShowContactCardForWindow(&self, appwindow: super::super::Foundation::HWND, contact: windows_core::Ref<'_, windows_core::IUnknown>, selection: *const super::super::Foundation::RECT, preferredplacement: FLYOUT_PLACEMENT) -> windows_core::Result<()>; } impl IContactManagerInterop_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ShowContactCardForWindow(this: *mut core::ffi::c_void, appwindow: super::super::Foundation::HWND, contact: *mut core::ffi::c_void, selection: *const super::super::Foundation::RECT, preferredplacement: FLYOUT_PLACEMENT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContactManagerInterop_Impl::ShowContactCardForWindow(this, core::mem::transmute_copy(&appwindow), windows_core::from_raw_borrowed(&contact), core::mem::transmute_copy(&selection), core::mem::transmute_copy(&preferredplacement)).into() + IContactManagerInterop_Impl::ShowContactCardForWindow(this, core::mem::transmute_copy(&appwindow), core::mem::transmute_copy(&contact), core::mem::transmute_copy(&selection), core::mem::transmute_copy(&preferredplacement)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ShowContactCardForWindow: ShowContactCardForWindow:: } } @@ -15056,14 +15056,14 @@ pub struct IContextMenuCB_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IContextMenuCB_Impl: windows_core::IUnknownImpl { - fn CallBack(&self, psf: Option<&IShellFolder>, hwndowner: super::super::Foundation::HWND, pdtobj: Option<&super::super::System::Com::IDataObject>, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; + fn CallBack(&self, psf: windows_core::Ref<'_, IShellFolder>, hwndowner: super::super::Foundation::HWND, pdtobj: windows_core::Ref<'_, super::super::System::Com::IDataObject>, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IContextMenuCB_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CallBack(this: *mut core::ffi::c_void, psf: *mut core::ffi::c_void, hwndowner: super::super::Foundation::HWND, pdtobj: *mut core::ffi::c_void, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContextMenuCB_Impl::CallBack(this, windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&hwndowner), windows_core::from_raw_borrowed(&pdtobj), core::mem::transmute_copy(&umsg), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() + IContextMenuCB_Impl::CallBack(this, core::mem::transmute_copy(&psf), core::mem::transmute_copy(&hwndowner), core::mem::transmute_copy(&pdtobj), core::mem::transmute_copy(&umsg), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CallBack: CallBack:: } } @@ -15089,13 +15089,13 @@ pub struct IContextMenuSite_Vtbl { pub DoContextMenuPopup: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, super::super::Foundation::POINT) -> windows_core::HRESULT, } pub trait IContextMenuSite_Impl: windows_core::IUnknownImpl { - fn DoContextMenuPopup(&self, punkcontextmenu: Option<&windows_core::IUnknown>, fflags: u32, pt: &super::super::Foundation::POINT) -> windows_core::Result<()>; + fn DoContextMenuPopup(&self, punkcontextmenu: windows_core::Ref<'_, windows_core::IUnknown>, fflags: u32, pt: &super::super::Foundation::POINT) -> windows_core::Result<()>; } impl IContextMenuSite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DoContextMenuPopup(this: *mut core::ffi::c_void, punkcontextmenu: *mut core::ffi::c_void, fflags: u32, pt: super::super::Foundation::POINT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IContextMenuSite_Impl::DoContextMenuPopup(this, windows_core::from_raw_borrowed(&punkcontextmenu), core::mem::transmute_copy(&fflags), core::mem::transmute(&pt)).into() + IContextMenuSite_Impl::DoContextMenuPopup(this, core::mem::transmute_copy(&punkcontextmenu), core::mem::transmute_copy(&fflags), core::mem::transmute(&pt)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), DoContextMenuPopup: DoContextMenuPopup:: } } @@ -15289,13 +15289,13 @@ pub struct ICreatingProcess_Vtbl { pub OnCreating: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICreatingProcess_Impl: windows_core::IUnknownImpl { - fn OnCreating(&self, pcpi: Option<&ICreateProcessInputs>) -> windows_core::Result<()>; + fn OnCreating(&self, pcpi: windows_core::Ref<'_, ICreateProcessInputs>) -> windows_core::Result<()>; } impl ICreatingProcess_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnCreating(this: *mut core::ffi::c_void, pcpi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICreatingProcess_Impl::OnCreating(this, windows_core::from_raw_borrowed(&pcpi)).into() + ICreatingProcess_Impl::OnCreating(this, core::mem::transmute_copy(&pcpi)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnCreating: OnCreating:: } } @@ -15353,7 +15353,7 @@ pub struct ICredentialProvider_Vtbl { pub trait ICredentialProvider_Impl: windows_core::IUnknownImpl { fn SetUsageScenario(&self, cpus: CREDENTIAL_PROVIDER_USAGE_SCENARIO, dwflags: u32) -> windows_core::Result<()>; fn SetSerialization(&self, pcpcs: *const CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION) -> windows_core::Result<()>; - fn Advise(&self, pcpe: Option<&ICredentialProviderEvents>, upadvisecontext: usize) -> windows_core::Result<()>; + fn Advise(&self, pcpe: windows_core::Ref<'_, ICredentialProviderEvents>, upadvisecontext: usize) -> windows_core::Result<()>; fn UnAdvise(&self) -> windows_core::Result<()>; fn GetFieldDescriptorCount(&self) -> windows_core::Result; fn GetFieldDescriptorAt(&self, dwindex: u32) -> windows_core::Result<*mut CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR>; @@ -15372,7 +15372,7 @@ impl ICredentialProvider_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pcpe: *mut core::ffi::c_void, upadvisecontext: usize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProvider_Impl::Advise(this, windows_core::from_raw_borrowed(&pcpe), core::mem::transmute_copy(&upadvisecontext)).into() + ICredentialProvider_Impl::Advise(this, core::mem::transmute_copy(&pcpe), core::mem::transmute_copy(&upadvisecontext)).into() } unsafe extern "system" fn UnAdvise(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15522,7 +15522,7 @@ pub struct ICredentialProviderCredential_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait ICredentialProviderCredential_Impl: windows_core::IUnknownImpl { - fn Advise(&self, pcpce: Option<&ICredentialProviderCredentialEvents>) -> windows_core::Result<()>; + fn Advise(&self, pcpce: windows_core::Ref<'_, ICredentialProviderCredentialEvents>) -> windows_core::Result<()>; fn UnAdvise(&self) -> windows_core::Result<()>; fn SetSelected(&self) -> windows_core::Result; fn SetDeselected(&self) -> windows_core::Result<()>; @@ -15545,7 +15545,7 @@ impl ICredentialProviderCredential_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pcpce: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredential_Impl::Advise(this, windows_core::from_raw_borrowed(&pcpce)).into() + ICredentialProviderCredential_Impl::Advise(this, core::mem::transmute_copy(&pcpce)).into() } unsafe extern "system" fn UnAdvise(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15797,15 +15797,15 @@ pub struct ICredentialProviderCredentialEvents_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait ICredentialProviderCredentialEvents_Impl: windows_core::IUnknownImpl { - fn SetFieldState(&self, pcpc: Option<&ICredentialProviderCredential>, dwfieldid: u32, cpfs: CREDENTIAL_PROVIDER_FIELD_STATE) -> windows_core::Result<()>; - fn SetFieldInteractiveState(&self, pcpc: Option<&ICredentialProviderCredential>, dwfieldid: u32, cpfis: CREDENTIAL_PROVIDER_FIELD_INTERACTIVE_STATE) -> windows_core::Result<()>; - fn SetFieldString(&self, pcpc: Option<&ICredentialProviderCredential>, dwfieldid: u32, psz: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetFieldCheckbox(&self, pcpc: Option<&ICredentialProviderCredential>, dwfieldid: u32, bchecked: super::super::Foundation::BOOL, pszlabel: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetFieldBitmap(&self, pcpc: Option<&ICredentialProviderCredential>, dwfieldid: u32, hbmp: super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()>; - fn SetFieldComboBoxSelectedItem(&self, pcpc: Option<&ICredentialProviderCredential>, dwfieldid: u32, dwselecteditem: u32) -> windows_core::Result<()>; - fn DeleteFieldComboBoxItem(&self, pcpc: Option<&ICredentialProviderCredential>, dwfieldid: u32, dwitem: u32) -> windows_core::Result<()>; - fn AppendFieldComboBoxItem(&self, pcpc: Option<&ICredentialProviderCredential>, dwfieldid: u32, pszitem: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetFieldSubmitButton(&self, pcpc: Option<&ICredentialProviderCredential>, dwfieldid: u32, dwadjacentto: u32) -> windows_core::Result<()>; + fn SetFieldState(&self, pcpc: windows_core::Ref<'_, ICredentialProviderCredential>, dwfieldid: u32, cpfs: CREDENTIAL_PROVIDER_FIELD_STATE) -> windows_core::Result<()>; + fn SetFieldInteractiveState(&self, pcpc: windows_core::Ref<'_, ICredentialProviderCredential>, dwfieldid: u32, cpfis: CREDENTIAL_PROVIDER_FIELD_INTERACTIVE_STATE) -> windows_core::Result<()>; + fn SetFieldString(&self, pcpc: windows_core::Ref<'_, ICredentialProviderCredential>, dwfieldid: u32, psz: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn SetFieldCheckbox(&self, pcpc: windows_core::Ref<'_, ICredentialProviderCredential>, dwfieldid: u32, bchecked: super::super::Foundation::BOOL, pszlabel: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn SetFieldBitmap(&self, pcpc: windows_core::Ref<'_, ICredentialProviderCredential>, dwfieldid: u32, hbmp: super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()>; + fn SetFieldComboBoxSelectedItem(&self, pcpc: windows_core::Ref<'_, ICredentialProviderCredential>, dwfieldid: u32, dwselecteditem: u32) -> windows_core::Result<()>; + fn DeleteFieldComboBoxItem(&self, pcpc: windows_core::Ref<'_, ICredentialProviderCredential>, dwfieldid: u32, dwitem: u32) -> windows_core::Result<()>; + fn AppendFieldComboBoxItem(&self, pcpc: windows_core::Ref<'_, ICredentialProviderCredential>, dwfieldid: u32, pszitem: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn SetFieldSubmitButton(&self, pcpc: windows_core::Ref<'_, ICredentialProviderCredential>, dwfieldid: u32, dwadjacentto: u32) -> windows_core::Result<()>; fn OnCreatingWindow(&self) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Gdi")] @@ -15813,39 +15813,39 @@ impl ICredentialProviderCredentialEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetFieldState(this: *mut core::ffi::c_void, pcpc: *mut core::ffi::c_void, dwfieldid: u32, cpfs: CREDENTIAL_PROVIDER_FIELD_STATE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents_Impl::SetFieldState(this, windows_core::from_raw_borrowed(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&cpfs)).into() + ICredentialProviderCredentialEvents_Impl::SetFieldState(this, core::mem::transmute_copy(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&cpfs)).into() } unsafe extern "system" fn SetFieldInteractiveState(this: *mut core::ffi::c_void, pcpc: *mut core::ffi::c_void, dwfieldid: u32, cpfis: CREDENTIAL_PROVIDER_FIELD_INTERACTIVE_STATE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents_Impl::SetFieldInteractiveState(this, windows_core::from_raw_borrowed(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&cpfis)).into() + ICredentialProviderCredentialEvents_Impl::SetFieldInteractiveState(this, core::mem::transmute_copy(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&cpfis)).into() } unsafe extern "system" fn SetFieldString(this: *mut core::ffi::c_void, pcpc: *mut core::ffi::c_void, dwfieldid: u32, psz: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents_Impl::SetFieldString(this, windows_core::from_raw_borrowed(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute(&psz)).into() + ICredentialProviderCredentialEvents_Impl::SetFieldString(this, core::mem::transmute_copy(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute(&psz)).into() } unsafe extern "system" fn SetFieldCheckbox(this: *mut core::ffi::c_void, pcpc: *mut core::ffi::c_void, dwfieldid: u32, bchecked: super::super::Foundation::BOOL, pszlabel: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents_Impl::SetFieldCheckbox(this, windows_core::from_raw_borrowed(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&bchecked), core::mem::transmute(&pszlabel)).into() + ICredentialProviderCredentialEvents_Impl::SetFieldCheckbox(this, core::mem::transmute_copy(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&bchecked), core::mem::transmute(&pszlabel)).into() } unsafe extern "system" fn SetFieldBitmap(this: *mut core::ffi::c_void, pcpc: *mut core::ffi::c_void, dwfieldid: u32, hbmp: super::super::Graphics::Gdi::HBITMAP) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents_Impl::SetFieldBitmap(this, windows_core::from_raw_borrowed(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&hbmp)).into() + ICredentialProviderCredentialEvents_Impl::SetFieldBitmap(this, core::mem::transmute_copy(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&hbmp)).into() } unsafe extern "system" fn SetFieldComboBoxSelectedItem(this: *mut core::ffi::c_void, pcpc: *mut core::ffi::c_void, dwfieldid: u32, dwselecteditem: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents_Impl::SetFieldComboBoxSelectedItem(this, windows_core::from_raw_borrowed(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&dwselecteditem)).into() + ICredentialProviderCredentialEvents_Impl::SetFieldComboBoxSelectedItem(this, core::mem::transmute_copy(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&dwselecteditem)).into() } unsafe extern "system" fn DeleteFieldComboBoxItem(this: *mut core::ffi::c_void, pcpc: *mut core::ffi::c_void, dwfieldid: u32, dwitem: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents_Impl::DeleteFieldComboBoxItem(this, windows_core::from_raw_borrowed(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&dwitem)).into() + ICredentialProviderCredentialEvents_Impl::DeleteFieldComboBoxItem(this, core::mem::transmute_copy(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&dwitem)).into() } unsafe extern "system" fn AppendFieldComboBoxItem(this: *mut core::ffi::c_void, pcpc: *mut core::ffi::c_void, dwfieldid: u32, pszitem: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents_Impl::AppendFieldComboBoxItem(this, windows_core::from_raw_borrowed(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute(&pszitem)).into() + ICredentialProviderCredentialEvents_Impl::AppendFieldComboBoxItem(this, core::mem::transmute_copy(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute(&pszitem)).into() } unsafe extern "system" fn SetFieldSubmitButton(this: *mut core::ffi::c_void, pcpc: *mut core::ffi::c_void, dwfieldid: u32, dwadjacentto: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents_Impl::SetFieldSubmitButton(this, windows_core::from_raw_borrowed(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&dwadjacentto)).into() + ICredentialProviderCredentialEvents_Impl::SetFieldSubmitButton(this, core::mem::transmute_copy(&pcpc), core::mem::transmute_copy(&dwfieldid), core::mem::transmute_copy(&dwadjacentto)).into() } unsafe extern "system" fn OnCreatingWindow(this: *mut core::ffi::c_void, phwndowner: *mut super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -15910,7 +15910,7 @@ pub struct ICredentialProviderCredentialEvents2_Vtbl { pub trait ICredentialProviderCredentialEvents2_Impl: ICredentialProviderCredentialEvents_Impl { fn BeginFieldUpdates(&self) -> windows_core::Result<()>; fn EndFieldUpdates(&self) -> windows_core::Result<()>; - fn SetFieldOptions(&self, credential: Option<&ICredentialProviderCredential>, fieldid: u32, options: CREDENTIAL_PROVIDER_CREDENTIAL_FIELD_OPTIONS) -> windows_core::Result<()>; + fn SetFieldOptions(&self, credential: windows_core::Ref<'_, ICredentialProviderCredential>, fieldid: u32, options: CREDENTIAL_PROVIDER_CREDENTIAL_FIELD_OPTIONS) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] impl ICredentialProviderCredentialEvents2_Vtbl { @@ -15925,7 +15925,7 @@ impl ICredentialProviderCredentialEvents2_Vtbl { } unsafe extern "system" fn SetFieldOptions(this: *mut core::ffi::c_void, credential: *mut core::ffi::c_void, fieldid: u32, options: CREDENTIAL_PROVIDER_CREDENTIAL_FIELD_OPTIONS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderCredentialEvents2_Impl::SetFieldOptions(this, windows_core::from_raw_borrowed(&credential), core::mem::transmute_copy(&fieldid), core::mem::transmute_copy(&options)).into() + ICredentialProviderCredentialEvents2_Impl::SetFieldOptions(this, core::mem::transmute_copy(&credential), core::mem::transmute_copy(&fieldid), core::mem::transmute_copy(&options)).into() } Self { base__: ICredentialProviderCredentialEvents_Vtbl::new::(), @@ -16060,13 +16060,13 @@ pub struct ICredentialProviderSetUserArray_Vtbl { pub SetUserArray: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ICredentialProviderSetUserArray_Impl: windows_core::IUnknownImpl { - fn SetUserArray(&self, users: Option<&ICredentialProviderUserArray>) -> windows_core::Result<()>; + fn SetUserArray(&self, users: windows_core::Ref<'_, ICredentialProviderUserArray>) -> windows_core::Result<()>; } impl ICredentialProviderSetUserArray_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetUserArray(this: *mut core::ffi::c_void, users: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICredentialProviderSetUserArray_Impl::SetUserArray(this, windows_core::from_raw_borrowed(&users)).into() + ICredentialProviderSetUserArray_Impl::SetUserArray(this, core::mem::transmute_copy(&users)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetUserArray: SetUserArray:: } } @@ -16399,9 +16399,9 @@ pub struct ICustomDestinationList_Vtbl { pub trait ICustomDestinationList_Impl: windows_core::IUnknownImpl { fn SetAppID(&self, pszappid: &windows_core::PCWSTR) -> windows_core::Result<()>; fn BeginList(&self, pcminslots: *mut u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn AppendCategory(&self, pszcategory: &windows_core::PCWSTR, poa: Option<&Common::IObjectArray>) -> windows_core::Result<()>; + fn AppendCategory(&self, pszcategory: &windows_core::PCWSTR, poa: windows_core::Ref<'_, Common::IObjectArray>) -> windows_core::Result<()>; fn AppendKnownCategory(&self, category: KNOWNDESTCATEGORY) -> windows_core::Result<()>; - fn AddUserTasks(&self, poa: Option<&Common::IObjectArray>) -> windows_core::Result<()>; + fn AddUserTasks(&self, poa: windows_core::Ref<'_, Common::IObjectArray>) -> windows_core::Result<()>; fn CommitList(&self) -> windows_core::Result<()>; fn GetRemovedDestinations(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn DeleteList(&self, pszappid: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -16420,7 +16420,7 @@ impl ICustomDestinationList_Vtbl { } unsafe extern "system" fn AppendCategory(this: *mut core::ffi::c_void, pszcategory: windows_core::PCWSTR, poa: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICustomDestinationList_Impl::AppendCategory(this, core::mem::transmute(&pszcategory), windows_core::from_raw_borrowed(&poa)).into() + ICustomDestinationList_Impl::AppendCategory(this, core::mem::transmute(&pszcategory), core::mem::transmute_copy(&poa)).into() } unsafe extern "system" fn AppendKnownCategory(this: *mut core::ffi::c_void, category: KNOWNDESTCATEGORY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16428,7 +16428,7 @@ impl ICustomDestinationList_Vtbl { } unsafe extern "system" fn AddUserTasks(this: *mut core::ffi::c_void, poa: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICustomDestinationList_Impl::AddUserTasks(this, windows_core::from_raw_borrowed(&poa)).into() + ICustomDestinationList_Impl::AddUserTasks(this, core::mem::transmute_copy(&poa)).into() } unsafe extern "system" fn CommitList(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16524,9 +16524,9 @@ pub struct IDataObjectAsyncCapability_Vtbl { pub trait IDataObjectAsyncCapability_Impl: windows_core::IUnknownImpl { fn SetAsyncMode(&self, fdoopasync: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetAsyncMode(&self) -> windows_core::Result; - fn StartOperation(&self, pbcreserved: Option<&super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; + fn StartOperation(&self, pbcreserved: windows_core::Ref<'_, super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; fn InOperation(&self) -> windows_core::Result; - fn EndOperation(&self, hresult: windows_core::HRESULT, pbcreserved: Option<&super::super::System::Com::IBindCtx>, dweffects: u32) -> windows_core::Result<()>; + fn EndOperation(&self, hresult: windows_core::HRESULT, pbcreserved: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, dweffects: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IDataObjectAsyncCapability_Vtbl { @@ -16547,7 +16547,7 @@ impl IDataObjectAsyncCapability_Vtbl { } unsafe extern "system" fn StartOperation(this: *mut core::ffi::c_void, pbcreserved: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataObjectAsyncCapability_Impl::StartOperation(this, windows_core::from_raw_borrowed(&pbcreserved)).into() + IDataObjectAsyncCapability_Impl::StartOperation(this, core::mem::transmute_copy(&pbcreserved)).into() } unsafe extern "system" fn InOperation(this: *mut core::ffi::c_void, pfinasyncop: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16561,7 +16561,7 @@ impl IDataObjectAsyncCapability_Vtbl { } unsafe extern "system" fn EndOperation(this: *mut core::ffi::c_void, hresult: windows_core::HRESULT, pbcreserved: *mut core::ffi::c_void, dweffects: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataObjectAsyncCapability_Impl::EndOperation(this, core::mem::transmute_copy(&hresult), windows_core::from_raw_borrowed(&pbcreserved), core::mem::transmute_copy(&dweffects)).into() + IDataObjectAsyncCapability_Impl::EndOperation(this, core::mem::transmute_copy(&hresult), core::mem::transmute_copy(&pbcreserved), core::mem::transmute_copy(&dweffects)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -16609,7 +16609,7 @@ pub struct IDataObjectProvider_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IDataObjectProvider_Impl: windows_core::IUnknownImpl { fn GetDataObject(&self) -> windows_core::Result; - fn SetDataObject(&self, dataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn SetDataObject(&self, dataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IDataObjectProvider_Vtbl { @@ -16626,7 +16626,7 @@ impl IDataObjectProvider_Vtbl { } unsafe extern "system" fn SetDataObject(this: *mut core::ffi::c_void, dataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDataObjectProvider_Impl::SetDataObject(this, windows_core::from_raw_borrowed(&dataobject)).into() + IDataObjectProvider_Impl::SetDataObject(this, core::mem::transmute_copy(&dataobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -16821,7 +16821,7 @@ pub struct IDefaultFolderMenuInitialize_Vtbl { } #[cfg(all(feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] pub trait IDefaultFolderMenuInitialize_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, hwnd: super::super::Foundation::HWND, pcmcb: Option<&IContextMenuCB>, pidlfolder: *const Common::ITEMIDLIST, psf: Option<&IShellFolder>, cidl: u32, apidl: *const *const Common::ITEMIDLIST, punkassociation: Option<&windows_core::IUnknown>, ckeys: u32, akeys: *const super::super::System::Registry::HKEY) -> windows_core::Result<()>; + fn Initialize(&self, hwnd: super::super::Foundation::HWND, pcmcb: windows_core::Ref<'_, IContextMenuCB>, pidlfolder: *const Common::ITEMIDLIST, psf: windows_core::Ref<'_, IShellFolder>, cidl: u32, apidl: *const *const Common::ITEMIDLIST, punkassociation: windows_core::Ref<'_, windows_core::IUnknown>, ckeys: u32, akeys: *const super::super::System::Registry::HKEY) -> windows_core::Result<()>; fn SetMenuRestrictions(&self, dfmrvalues: DEFAULT_FOLDER_MENU_RESTRICTIONS) -> windows_core::Result<()>; fn GetMenuRestrictions(&self, dfmrmask: DEFAULT_FOLDER_MENU_RESTRICTIONS) -> windows_core::Result; fn SetHandlerClsid(&self, rclsid: *const windows_core::GUID) -> windows_core::Result<()>; @@ -16831,7 +16831,7 @@ impl IDefaultFolderMenuInitialize_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, pcmcb: *mut core::ffi::c_void, pidlfolder: *const Common::ITEMIDLIST, psf: *mut core::ffi::c_void, cidl: u32, apidl: *const *const Common::ITEMIDLIST, punkassociation: *mut core::ffi::c_void, ckeys: u32, akeys: *const super::super::System::Registry::HKEY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDefaultFolderMenuInitialize_Impl::Initialize(this, core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&pcmcb), core::mem::transmute_copy(&pidlfolder), windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&cidl), core::mem::transmute_copy(&apidl), windows_core::from_raw_borrowed(&punkassociation), core::mem::transmute_copy(&ckeys), core::mem::transmute_copy(&akeys)).into() + IDefaultFolderMenuInitialize_Impl::Initialize(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&pcmcb), core::mem::transmute_copy(&pidlfolder), core::mem::transmute_copy(&psf), core::mem::transmute_copy(&cidl), core::mem::transmute_copy(&apidl), core::mem::transmute_copy(&punkassociation), core::mem::transmute_copy(&ckeys), core::mem::transmute_copy(&akeys)).into() } unsafe extern "system" fn SetMenuRestrictions(this: *mut core::ffi::c_void, dfmrvalues: DEFAULT_FOLDER_MENU_RESTRICTIONS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -16886,14 +16886,14 @@ pub struct IDelegateFolder_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IDelegateFolder_Impl: windows_core::IUnknownImpl { - fn SetItemAlloc(&self, pmalloc: Option<&super::super::System::Com::IMalloc>) -> windows_core::Result<()>; + fn SetItemAlloc(&self, pmalloc: windows_core::Ref<'_, super::super::System::Com::IMalloc>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IDelegateFolder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetItemAlloc(this: *mut core::ffi::c_void, pmalloc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDelegateFolder_Impl::SetItemAlloc(this, windows_core::from_raw_borrowed(&pmalloc)).into() + IDelegateFolder_Impl::SetItemAlloc(this, core::mem::transmute_copy(&pmalloc)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetItemAlloc: SetItemAlloc:: } } @@ -17121,7 +17121,7 @@ pub struct IDeskBar_Vtbl { } #[cfg(feature = "Win32_System_Ole")] pub trait IDeskBar_Impl: super::super::System::Ole::IOleWindow_Impl { - fn SetClient(&self, punkclient: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetClient(&self, punkclient: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetClient(&self) -> windows_core::Result; fn OnPosRectChangeDB(&self, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()>; } @@ -17130,7 +17130,7 @@ impl IDeskBar_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetClient(this: *mut core::ffi::c_void, punkclient: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDeskBar_Impl::SetClient(this, windows_core::from_raw_borrowed(&punkclient)).into() + IDeskBar_Impl::SetClient(this, core::mem::transmute_copy(&punkclient)).into() } unsafe extern "system" fn GetClient(this: *mut core::ffi::c_void, ppunkclient: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17200,7 +17200,7 @@ pub struct IDeskBarClient_Vtbl { } #[cfg(feature = "Win32_System_Ole")] pub trait IDeskBarClient_Impl: super::super::System::Ole::IOleWindow_Impl { - fn SetDeskBarSite(&self, punksite: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetDeskBarSite(&self, punksite: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn SetModeDBC(&self, dwmode: u32) -> windows_core::Result<()>; fn UIActivateDBC(&self, dwstate: u32) -> windows_core::Result<()>; fn GetSize(&self, dwwhich: u32) -> windows_core::Result; @@ -17210,7 +17210,7 @@ impl IDeskBarClient_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDeskBarSite(this: *mut core::ffi::c_void, punksite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDeskBarClient_Impl::SetDeskBarSite(this, windows_core::from_raw_borrowed(&punksite)).into() + IDeskBarClient_Impl::SetDeskBarSite(this, core::mem::transmute_copy(&punksite)).into() } unsafe extern "system" fn SetModeDBC(this: *mut core::ffi::c_void, dwmode: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17381,7 +17381,7 @@ pub trait IDesktopWallpaper_Impl: windows_core::IUnknownImpl { fn GetBackgroundColor(&self) -> windows_core::Result; fn SetPosition(&self, position: DESKTOP_WALLPAPER_POSITION) -> windows_core::Result<()>; fn GetPosition(&self) -> windows_core::Result; - fn SetSlideshow(&self, items: Option<&IShellItemArray>) -> windows_core::Result<()>; + fn SetSlideshow(&self, items: windows_core::Ref<'_, IShellItemArray>) -> windows_core::Result<()>; fn GetSlideshow(&self) -> windows_core::Result; fn SetSlideshowOptions(&self, options: DESKTOP_SLIDESHOW_OPTIONS, slideshowtick: u32) -> windows_core::Result<()>; fn GetSlideshowOptions(&self, options: *mut DESKTOP_SLIDESHOW_OPTIONS, slideshowtick: *mut u32) -> windows_core::Result<()>; @@ -17465,7 +17465,7 @@ impl IDesktopWallpaper_Vtbl { } unsafe extern "system" fn SetSlideshow(this: *mut core::ffi::c_void, items: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDesktopWallpaper_Impl::SetSlideshow(this, windows_core::from_raw_borrowed(&items)).into() + IDesktopWallpaper_Impl::SetSlideshow(this, core::mem::transmute_copy(&items)).into() } unsafe extern "system" fn GetSlideshow(this: *mut core::ffi::c_void, items: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17668,7 +17668,7 @@ pub struct IDockingWindow_Vtbl { pub trait IDockingWindow_Impl: super::super::System::Ole::IOleWindow_Impl { fn ShowDW(&self, fshow: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn CloseDW(&self, dwreserved: u32) -> windows_core::Result<()>; - fn ResizeBorderDW(&self, prcborder: *const super::super::Foundation::RECT, punktoolbarsite: Option<&windows_core::IUnknown>, freserved: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn ResizeBorderDW(&self, prcborder: *const super::super::Foundation::RECT, punktoolbarsite: windows_core::Ref<'_, windows_core::IUnknown>, freserved: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Ole")] impl IDockingWindow_Vtbl { @@ -17683,7 +17683,7 @@ impl IDockingWindow_Vtbl { } unsafe extern "system" fn ResizeBorderDW(this: *mut core::ffi::c_void, prcborder: *const super::super::Foundation::RECT, punktoolbarsite: *mut core::ffi::c_void, freserved: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDockingWindow_Impl::ResizeBorderDW(this, core::mem::transmute_copy(&prcborder), windows_core::from_raw_borrowed(&punktoolbarsite), core::mem::transmute_copy(&freserved)).into() + IDockingWindow_Impl::ResizeBorderDW(this, core::mem::transmute_copy(&prcborder), core::mem::transmute_copy(&punktoolbarsite), core::mem::transmute_copy(&freserved)).into() } Self { base__: super::super::System::Ole::IOleWindow_Vtbl::new::(), @@ -17741,8 +17741,8 @@ pub struct IDockingWindowFrame_Vtbl { } #[cfg(feature = "Win32_System_Ole")] pub trait IDockingWindowFrame_Impl: super::super::System::Ole::IOleWindow_Impl { - fn AddToolbar(&self, punksrc: Option<&windows_core::IUnknown>, pwszitem: &windows_core::PCWSTR, dwaddflags: u32) -> windows_core::Result<()>; - fn RemoveToolbar(&self, punksrc: Option<&windows_core::IUnknown>, dwremoveflags: u32) -> windows_core::Result<()>; + fn AddToolbar(&self, punksrc: windows_core::Ref<'_, windows_core::IUnknown>, pwszitem: &windows_core::PCWSTR, dwaddflags: u32) -> windows_core::Result<()>; + fn RemoveToolbar(&self, punksrc: windows_core::Ref<'_, windows_core::IUnknown>, dwremoveflags: u32) -> windows_core::Result<()>; fn FindToolbar(&self, pwszitem: &windows_core::PCWSTR, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Ole")] @@ -17750,11 +17750,11 @@ impl IDockingWindowFrame_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddToolbar(this: *mut core::ffi::c_void, punksrc: *mut core::ffi::c_void, pwszitem: windows_core::PCWSTR, dwaddflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDockingWindowFrame_Impl::AddToolbar(this, windows_core::from_raw_borrowed(&punksrc), core::mem::transmute(&pwszitem), core::mem::transmute_copy(&dwaddflags)).into() + IDockingWindowFrame_Impl::AddToolbar(this, core::mem::transmute_copy(&punksrc), core::mem::transmute(&pwszitem), core::mem::transmute_copy(&dwaddflags)).into() } unsafe extern "system" fn RemoveToolbar(this: *mut core::ffi::c_void, punksrc: *mut core::ffi::c_void, dwremoveflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDockingWindowFrame_Impl::RemoveToolbar(this, windows_core::from_raw_borrowed(&punksrc), core::mem::transmute_copy(&dwremoveflags)).into() + IDockingWindowFrame_Impl::RemoveToolbar(this, core::mem::transmute_copy(&punksrc), core::mem::transmute_copy(&dwremoveflags)).into() } unsafe extern "system" fn FindToolbar(this: *mut core::ffi::c_void, pwszitem: windows_core::PCWSTR, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -17816,16 +17816,16 @@ pub struct IDockingWindowSite_Vtbl { } #[cfg(feature = "Win32_System_Ole")] pub trait IDockingWindowSite_Impl: super::super::System::Ole::IOleWindow_Impl { - fn GetBorderDW(&self, punkobj: Option<&windows_core::IUnknown>) -> windows_core::Result; - fn RequestBorderSpaceDW(&self, punkobj: Option<&windows_core::IUnknown>, pbw: *const super::super::Foundation::RECT) -> windows_core::Result<()>; - fn SetBorderSpaceDW(&self, punkobj: Option<&windows_core::IUnknown>, pbw: *const super::super::Foundation::RECT) -> windows_core::Result<()>; + fn GetBorderDW(&self, punkobj: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; + fn RequestBorderSpaceDW(&self, punkobj: windows_core::Ref<'_, windows_core::IUnknown>, pbw: *const super::super::Foundation::RECT) -> windows_core::Result<()>; + fn SetBorderSpaceDW(&self, punkobj: windows_core::Ref<'_, windows_core::IUnknown>, pbw: *const super::super::Foundation::RECT) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Ole")] impl IDockingWindowSite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetBorderDW(this: *mut core::ffi::c_void, punkobj: *mut core::ffi::c_void, prcborder: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDockingWindowSite_Impl::GetBorderDW(this, windows_core::from_raw_borrowed(&punkobj)) { + match IDockingWindowSite_Impl::GetBorderDW(this, core::mem::transmute_copy(&punkobj)) { Ok(ok__) => { prcborder.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -17835,11 +17835,11 @@ impl IDockingWindowSite_Vtbl { } unsafe extern "system" fn RequestBorderSpaceDW(this: *mut core::ffi::c_void, punkobj: *mut core::ffi::c_void, pbw: *const super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDockingWindowSite_Impl::RequestBorderSpaceDW(this, windows_core::from_raw_borrowed(&punkobj), core::mem::transmute_copy(&pbw)).into() + IDockingWindowSite_Impl::RequestBorderSpaceDW(this, core::mem::transmute_copy(&punkobj), core::mem::transmute_copy(&pbw)).into() } unsafe extern "system" fn SetBorderSpaceDW(this: *mut core::ffi::c_void, punkobj: *mut core::ffi::c_void, pbw: *const super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDockingWindowSite_Impl::SetBorderSpaceDW(this, windows_core::from_raw_borrowed(&punkobj), core::mem::transmute_copy(&pbw)).into() + IDockingWindowSite_Impl::SetBorderSpaceDW(this, core::mem::transmute_copy(&punkobj), core::mem::transmute_copy(&pbw)).into() } Self { base__: super::super::System::Ole::IOleWindow_Vtbl::new::(), @@ -17886,19 +17886,19 @@ pub struct IDragSourceHelper_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] pub trait IDragSourceHelper_Impl: windows_core::IUnknownImpl { - fn InitializeFromBitmap(&self, pshdi: *const SHDRAGIMAGE, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result<()>; - fn InitializeFromWindow(&self, hwnd: super::super::Foundation::HWND, ppt: *const super::super::Foundation::POINT, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn InitializeFromBitmap(&self, pshdi: *const SHDRAGIMAGE, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn InitializeFromWindow(&self, hwnd: super::super::Foundation::HWND, ppt: *const super::super::Foundation::POINT, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] impl IDragSourceHelper_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeFromBitmap(this: *mut core::ffi::c_void, pshdi: *const SHDRAGIMAGE, pdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDragSourceHelper_Impl::InitializeFromBitmap(this, core::mem::transmute_copy(&pshdi), windows_core::from_raw_borrowed(&pdataobject)).into() + IDragSourceHelper_Impl::InitializeFromBitmap(this, core::mem::transmute_copy(&pshdi), core::mem::transmute_copy(&pdataobject)).into() } unsafe extern "system" fn InitializeFromWindow(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, ppt: *const super::super::Foundation::POINT, pdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDragSourceHelper_Impl::InitializeFromWindow(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&ppt), windows_core::from_raw_borrowed(&pdataobject)).into() + IDragSourceHelper_Impl::InitializeFromWindow(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&ppt), core::mem::transmute_copy(&pdataobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -17997,10 +17997,10 @@ pub struct IDropTargetHelper_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub trait IDropTargetHelper_Impl: windows_core::IUnknownImpl { - fn DragEnter(&self, hwndtarget: super::super::Foundation::HWND, pdataobject: Option<&super::super::System::Com::IDataObject>, ppt: *const super::super::Foundation::POINT, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()>; + fn DragEnter(&self, hwndtarget: super::super::Foundation::HWND, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>, ppt: *const super::super::Foundation::POINT, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()>; fn DragLeave(&self) -> windows_core::Result<()>; fn DragOver(&self, ppt: *const super::super::Foundation::POINT, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()>; - fn Drop(&self, pdataobject: Option<&super::super::System::Com::IDataObject>, ppt: *const super::super::Foundation::POINT, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()>; + fn Drop(&self, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>, ppt: *const super::super::Foundation::POINT, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::Result<()>; fn Show(&self, fshow: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -18008,7 +18008,7 @@ impl IDropTargetHelper_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn DragEnter(this: *mut core::ffi::c_void, hwndtarget: super::super::Foundation::HWND, pdataobject: *mut core::ffi::c_void, ppt: *const super::super::Foundation::POINT, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDropTargetHelper_Impl::DragEnter(this, core::mem::transmute_copy(&hwndtarget), windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute_copy(&ppt), core::mem::transmute_copy(&dweffect)).into() + IDropTargetHelper_Impl::DragEnter(this, core::mem::transmute_copy(&hwndtarget), core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&ppt), core::mem::transmute_copy(&dweffect)).into() } unsafe extern "system" fn DragLeave(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18020,7 +18020,7 @@ impl IDropTargetHelper_Vtbl { } unsafe extern "system" fn Drop(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void, ppt: *const super::super::Foundation::POINT, dweffect: super::super::System::Ole::DROPEFFECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDropTargetHelper_Impl::Drop(this, windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute_copy(&ppt), core::mem::transmute_copy(&dweffect)).into() + IDropTargetHelper_Impl::Drop(this, core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&ppt), core::mem::transmute_copy(&dweffect)).into() } unsafe extern "system" fn Show(this: *mut core::ffi::c_void, fshow: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -18190,7 +18190,7 @@ pub struct IEnumAssocHandlers_Vtbl { pub Next: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IEnumAssocHandlers_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IAssocHandler>, pceltfetched: *mut u32) -> windows_core::Result<()>; } impl IEnumAssocHandlers_Vtbl { pub const fn new() -> Self { @@ -18231,7 +18231,7 @@ pub struct IEnumExplorerCommand_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumExplorerCommand_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, puicommand: *mut Option, pceltfetched: *mut u32) -> windows_core::HRESULT; + fn Next(&self, celt: u32, puicommand: windows_core::OutRef<'_, IExplorerCommand>, pceltfetched: *mut u32) -> windows_core::HRESULT; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -18517,7 +18517,7 @@ pub trait IEnumIDList_Impl: windows_core::IUnknownImpl { fn Next(&self, celt: u32, rgelt: *mut *mut Common::ITEMIDLIST, pceltfetched: *mut u32) -> windows_core::HRESULT; fn Skip(&self, celt: u32) -> windows_core::HRESULT; fn Reset(&self) -> windows_core::HRESULT; - fn Clone(&self, ppenum: *mut Option) -> windows_core::HRESULT; + fn Clone(&self, ppenum: windows_core::OutRef<'_, IEnumIDList>) -> windows_core::HRESULT; } #[cfg(feature = "Win32_UI_Shell_Common")] impl IEnumIDList_Vtbl { @@ -18786,7 +18786,7 @@ pub struct IEnumShellItems_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumShellItems_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IShellItem>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -18854,7 +18854,7 @@ pub struct IEnumSyncMgrConflict_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumSyncMgrConflict_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, ISyncMgrConflict>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -18922,7 +18922,7 @@ pub struct IEnumSyncMgrEvents_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumSyncMgrEvents_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, ISyncMgrEvent>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -18990,7 +18990,7 @@ pub struct IEnumSyncMgrSyncItems_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumSyncMgrSyncItems_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, ISyncMgrSyncItem>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -19058,7 +19058,7 @@ pub struct IEnumTravelLogEntry_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumTravelLogEntry_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, ITravelLogEntry>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -19126,7 +19126,7 @@ pub struct IEnumerableView_Vtbl { } #[cfg(feature = "Win32_UI_Shell_Common")] pub trait IEnumerableView_Impl: windows_core::IUnknownImpl { - fn SetEnumReadyCallback(&self, percb: Option<&IEnumReadyCallback>) -> windows_core::Result<()>; + fn SetEnumReadyCallback(&self, percb: windows_core::Ref<'_, IEnumReadyCallback>) -> windows_core::Result<()>; fn CreateEnumIDListFromContents(&self, pidlfolder: *const Common::ITEMIDLIST, dwenumflags: u32) -> windows_core::Result; } #[cfg(feature = "Win32_UI_Shell_Common")] @@ -19134,7 +19134,7 @@ impl IEnumerableView_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetEnumReadyCallback(this: *mut core::ffi::c_void, percb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IEnumerableView_Impl::SetEnumReadyCallback(this, windows_core::from_raw_borrowed(&percb)).into() + IEnumerableView_Impl::SetEnumReadyCallback(this, core::mem::transmute_copy(&percb)).into() } unsafe extern "system" fn CreateEnumIDListFromContents(this: *mut core::ffi::c_void, pidlfolder: *const Common::ITEMIDLIST, dwenumflags: u32, ppenumidlist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19576,13 +19576,13 @@ pub trait IExplorerBrowser_Impl: windows_core::IUnknownImpl { fn SetPropertyBag(&self, pszpropertybag: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetEmptyText(&self, pszemptytext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetFolderSettings(&self, pfs: *const FOLDERSETTINGS) -> windows_core::Result<()>; - fn Advise(&self, psbe: Option<&IExplorerBrowserEvents>) -> windows_core::Result; + fn Advise(&self, psbe: windows_core::Ref<'_, IExplorerBrowserEvents>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; fn SetOptions(&self, dwflag: EXPLORER_BROWSER_OPTIONS) -> windows_core::Result<()>; fn GetOptions(&self) -> windows_core::Result; fn BrowseToIDList(&self, pidl: *const Common::ITEMIDLIST, uflags: u32) -> windows_core::Result<()>; - fn BrowseToObject(&self, punk: Option<&windows_core::IUnknown>, uflags: u32) -> windows_core::Result<()>; - fn FillFromObject(&self, punk: Option<&windows_core::IUnknown>, dwflags: EXPLORER_BROWSER_FILL_FLAGS) -> windows_core::Result<()>; + fn BrowseToObject(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, uflags: u32) -> windows_core::Result<()>; + fn FillFromObject(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, dwflags: EXPLORER_BROWSER_FILL_FLAGS) -> windows_core::Result<()>; fn RemoveAll(&self) -> windows_core::Result<()>; fn GetCurrentView(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } @@ -19615,7 +19615,7 @@ impl IExplorerBrowser_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, psbe: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IExplorerBrowser_Impl::Advise(this, windows_core::from_raw_borrowed(&psbe)) { + match IExplorerBrowser_Impl::Advise(this, core::mem::transmute_copy(&psbe)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19647,11 +19647,11 @@ impl IExplorerBrowser_Vtbl { } unsafe extern "system" fn BrowseToObject(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, uflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExplorerBrowser_Impl::BrowseToObject(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&uflags)).into() + IExplorerBrowser_Impl::BrowseToObject(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&uflags)).into() } unsafe extern "system" fn FillFromObject(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, dwflags: EXPLORER_BROWSER_FILL_FLAGS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExplorerBrowser_Impl::FillFromObject(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&dwflags)).into() + IExplorerBrowser_Impl::FillFromObject(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn RemoveAll(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19732,7 +19732,7 @@ pub struct IExplorerBrowserEvents_Vtbl { #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))] pub trait IExplorerBrowserEvents_Impl: windows_core::IUnknownImpl { fn OnNavigationPending(&self, pidlfolder: *const Common::ITEMIDLIST) -> windows_core::Result<()>; - fn OnViewCreated(&self, psv: Option<&IShellView>) -> windows_core::Result<()>; + fn OnViewCreated(&self, psv: windows_core::Ref<'_, IShellView>) -> windows_core::Result<()>; fn OnNavigationComplete(&self, pidlfolder: *const Common::ITEMIDLIST) -> windows_core::Result<()>; fn OnNavigationFailed(&self, pidlfolder: *const Common::ITEMIDLIST) -> windows_core::Result<()>; } @@ -19745,7 +19745,7 @@ impl IExplorerBrowserEvents_Vtbl { } unsafe extern "system" fn OnViewCreated(this: *mut core::ffi::c_void, psv: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExplorerBrowserEvents_Impl::OnViewCreated(this, windows_core::from_raw_borrowed(&psv)).into() + IExplorerBrowserEvents_Impl::OnViewCreated(this, core::mem::transmute_copy(&psv)).into() } unsafe extern "system" fn OnNavigationComplete(this: *mut core::ffi::c_void, pidlfolder: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19838,12 +19838,12 @@ pub struct IExplorerCommand_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IExplorerCommand_Impl: windows_core::IUnknownImpl { - fn GetTitle(&self, psiitemarray: Option<&IShellItemArray>) -> windows_core::Result; - fn GetIcon(&self, psiitemarray: Option<&IShellItemArray>) -> windows_core::Result; - fn GetToolTip(&self, psiitemarray: Option<&IShellItemArray>) -> windows_core::Result; + fn GetTitle(&self, psiitemarray: windows_core::Ref<'_, IShellItemArray>) -> windows_core::Result; + fn GetIcon(&self, psiitemarray: windows_core::Ref<'_, IShellItemArray>) -> windows_core::Result; + fn GetToolTip(&self, psiitemarray: windows_core::Ref<'_, IShellItemArray>) -> windows_core::Result; fn GetCanonicalName(&self) -> windows_core::Result; - fn GetState(&self, psiitemarray: Option<&IShellItemArray>, foktobeslow: super::super::Foundation::BOOL) -> windows_core::Result; - fn Invoke(&self, psiitemarray: Option<&IShellItemArray>, pbc: Option<&super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; + fn GetState(&self, psiitemarray: windows_core::Ref<'_, IShellItemArray>, foktobeslow: super::super::Foundation::BOOL) -> windows_core::Result; + fn Invoke(&self, psiitemarray: windows_core::Ref<'_, IShellItemArray>, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; fn GetFlags(&self) -> windows_core::Result; fn EnumSubCommands(&self) -> windows_core::Result; } @@ -19852,7 +19852,7 @@ impl IExplorerCommand_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetTitle(this: *mut core::ffi::c_void, psiitemarray: *mut core::ffi::c_void, ppszname: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IExplorerCommand_Impl::GetTitle(this, windows_core::from_raw_borrowed(&psiitemarray)) { + match IExplorerCommand_Impl::GetTitle(this, core::mem::transmute_copy(&psiitemarray)) { Ok(ok__) => { ppszname.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19862,7 +19862,7 @@ impl IExplorerCommand_Vtbl { } unsafe extern "system" fn GetIcon(this: *mut core::ffi::c_void, psiitemarray: *mut core::ffi::c_void, ppszicon: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IExplorerCommand_Impl::GetIcon(this, windows_core::from_raw_borrowed(&psiitemarray)) { + match IExplorerCommand_Impl::GetIcon(this, core::mem::transmute_copy(&psiitemarray)) { Ok(ok__) => { ppszicon.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19872,7 +19872,7 @@ impl IExplorerCommand_Vtbl { } unsafe extern "system" fn GetToolTip(this: *mut core::ffi::c_void, psiitemarray: *mut core::ffi::c_void, ppszinfotip: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IExplorerCommand_Impl::GetToolTip(this, windows_core::from_raw_borrowed(&psiitemarray)) { + match IExplorerCommand_Impl::GetToolTip(this, core::mem::transmute_copy(&psiitemarray)) { Ok(ok__) => { ppszinfotip.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19892,7 +19892,7 @@ impl IExplorerCommand_Vtbl { } unsafe extern "system" fn GetState(this: *mut core::ffi::c_void, psiitemarray: *mut core::ffi::c_void, foktobeslow: super::super::Foundation::BOOL, pcmdstate: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IExplorerCommand_Impl::GetState(this, windows_core::from_raw_borrowed(&psiitemarray), core::mem::transmute_copy(&foktobeslow)) { + match IExplorerCommand_Impl::GetState(this, core::mem::transmute_copy(&psiitemarray), core::mem::transmute_copy(&foktobeslow)) { Ok(ok__) => { pcmdstate.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -19902,7 +19902,7 @@ impl IExplorerCommand_Vtbl { } unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, psiitemarray: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExplorerCommand_Impl::Invoke(this, windows_core::from_raw_borrowed(&psiitemarray), windows_core::from_raw_borrowed(&pbc)).into() + IExplorerCommand_Impl::Invoke(this, core::mem::transmute_copy(&psiitemarray), core::mem::transmute_copy(&pbc)).into() } unsafe extern "system" fn GetFlags(this: *mut core::ffi::c_void, pflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -19968,14 +19968,14 @@ pub struct IExplorerCommandProvider_Vtbl { pub GetCommand: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IExplorerCommandProvider_Impl: windows_core::IUnknownImpl { - fn GetCommands(&self, punksite: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn GetCommands(&self, punksite: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetCommand(&self, rguidcommandid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IExplorerCommandProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetCommands(this: *mut core::ffi::c_void, punksite: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IExplorerCommandProvider_Impl::GetCommands(this, windows_core::from_raw_borrowed(&punksite), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IExplorerCommandProvider_Impl::GetCommands(this, core::mem::transmute_copy(&punksite), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn GetCommand(this: *mut core::ffi::c_void, rguidcommandid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20009,13 +20009,13 @@ pub struct IExplorerCommandState_Vtbl { pub GetState: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::BOOL, *mut u32) -> windows_core::HRESULT, } pub trait IExplorerCommandState_Impl: windows_core::IUnknownImpl { - fn GetState(&self, psiitemarray: Option<&IShellItemArray>, foktobeslow: super::super::Foundation::BOOL) -> windows_core::Result; + fn GetState(&self, psiitemarray: windows_core::Ref<'_, IShellItemArray>, foktobeslow: super::super::Foundation::BOOL) -> windows_core::Result; } impl IExplorerCommandState_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetState(this: *mut core::ffi::c_void, psiitemarray: *mut core::ffi::c_void, foktobeslow: super::super::Foundation::BOOL, pcmdstate: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IExplorerCommandState_Impl::GetState(this, windows_core::from_raw_borrowed(&psiitemarray), core::mem::transmute_copy(&foktobeslow)) { + match IExplorerCommandState_Impl::GetState(this, core::mem::transmute_copy(&psiitemarray), core::mem::transmute_copy(&foktobeslow)) { Ok(ok__) => { pcmdstate.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -20466,12 +20466,12 @@ pub trait IFileDialog_Impl: IModalWindow_Impl { fn SetFileTypes(&self, cfiletypes: u32, rgfilterspec: *const Common::COMDLG_FILTERSPEC) -> windows_core::Result<()>; fn SetFileTypeIndex(&self, ifiletype: u32) -> windows_core::Result<()>; fn GetFileTypeIndex(&self) -> windows_core::Result; - fn Advise(&self, pfde: Option<&IFileDialogEvents>) -> windows_core::Result; + fn Advise(&self, pfde: windows_core::Ref<'_, IFileDialogEvents>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; fn SetOptions(&self, fos: FILEOPENDIALOGOPTIONS) -> windows_core::Result<()>; fn GetOptions(&self) -> windows_core::Result; - fn SetDefaultFolder(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn SetFolder(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; + fn SetDefaultFolder(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn SetFolder(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn GetFolder(&self) -> windows_core::Result; fn GetCurrentSelection(&self) -> windows_core::Result; fn SetFileName(&self, pszname: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -20480,12 +20480,12 @@ pub trait IFileDialog_Impl: IModalWindow_Impl { fn SetOkButtonLabel(&self, psztext: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetFileNameLabel(&self, pszlabel: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetResult(&self) -> windows_core::Result; - fn AddPlace(&self, psi: Option<&IShellItem>, fdap: FDAP) -> windows_core::Result<()>; + fn AddPlace(&self, psi: windows_core::Ref<'_, IShellItem>, fdap: FDAP) -> windows_core::Result<()>; fn SetDefaultExtension(&self, pszdefaultextension: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Close(&self, hr: windows_core::HRESULT) -> windows_core::Result<()>; fn SetClientGuid(&self, guid: *const windows_core::GUID) -> windows_core::Result<()>; fn ClearClientData(&self) -> windows_core::Result<()>; - fn SetFilter(&self, pfilter: Option<&IShellItemFilter>) -> windows_core::Result<()>; + fn SetFilter(&self, pfilter: windows_core::Ref<'_, IShellItemFilter>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_Common")] impl IFileDialog_Vtbl { @@ -20510,7 +20510,7 @@ impl IFileDialog_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pfde: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFileDialog_Impl::Advise(this, windows_core::from_raw_borrowed(&pfde)) { + match IFileDialog_Impl::Advise(this, core::mem::transmute_copy(&pfde)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -20538,11 +20538,11 @@ impl IFileDialog_Vtbl { } unsafe extern "system" fn SetDefaultFolder(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialog_Impl::SetDefaultFolder(this, windows_core::from_raw_borrowed(&psi)).into() + IFileDialog_Impl::SetDefaultFolder(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn SetFolder(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialog_Impl::SetFolder(this, windows_core::from_raw_borrowed(&psi)).into() + IFileDialog_Impl::SetFolder(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn GetFolder(this: *mut core::ffi::c_void, ppsi: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20602,7 +20602,7 @@ impl IFileDialog_Vtbl { } unsafe extern "system" fn AddPlace(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, fdap: FDAP) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialog_Impl::AddPlace(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&fdap)).into() + IFileDialog_Impl::AddPlace(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&fdap)).into() } unsafe extern "system" fn SetDefaultExtension(this: *mut core::ffi::c_void, pszdefaultextension: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -20622,7 +20622,7 @@ impl IFileDialog_Vtbl { } unsafe extern "system" fn SetFilter(this: *mut core::ffi::c_void, pfilter: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialog_Impl::SetFilter(this, windows_core::from_raw_borrowed(&pfilter)).into() + IFileDialog_Impl::SetFilter(this, core::mem::transmute_copy(&pfilter)).into() } Self { base__: IModalWindow_Vtbl::new::(), @@ -20688,7 +20688,7 @@ pub struct IFileDialog2_Vtbl { #[cfg(feature = "Win32_UI_Shell_Common")] pub trait IFileDialog2_Impl: IFileDialog_Impl { fn SetCancelButtonLabel(&self, pszlabel: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetNavigationRoot(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; + fn SetNavigationRoot(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_Common")] impl IFileDialog2_Vtbl { @@ -20699,7 +20699,7 @@ impl IFileDialog2_Vtbl { } unsafe extern "system" fn SetNavigationRoot(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialog2_Impl::SetNavigationRoot(this, windows_core::from_raw_borrowed(&psi)).into() + IFileDialog2_Impl::SetNavigationRoot(this, core::mem::transmute_copy(&psi)).into() } Self { base__: IFileDialog_Vtbl::new::(), @@ -20750,28 +20750,28 @@ pub struct IFileDialogControlEvents_Vtbl { pub OnControlActivating: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IFileDialogControlEvents_Impl: windows_core::IUnknownImpl { - fn OnItemSelected(&self, pfdc: Option<&IFileDialogCustomize>, dwidctl: u32, dwiditem: u32) -> windows_core::Result<()>; - fn OnButtonClicked(&self, pfdc: Option<&IFileDialogCustomize>, dwidctl: u32) -> windows_core::Result<()>; - fn OnCheckButtonToggled(&self, pfdc: Option<&IFileDialogCustomize>, dwidctl: u32, bchecked: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn OnControlActivating(&self, pfdc: Option<&IFileDialogCustomize>, dwidctl: u32) -> windows_core::Result<()>; + fn OnItemSelected(&self, pfdc: windows_core::Ref<'_, IFileDialogCustomize>, dwidctl: u32, dwiditem: u32) -> windows_core::Result<()>; + fn OnButtonClicked(&self, pfdc: windows_core::Ref<'_, IFileDialogCustomize>, dwidctl: u32) -> windows_core::Result<()>; + fn OnCheckButtonToggled(&self, pfdc: windows_core::Ref<'_, IFileDialogCustomize>, dwidctl: u32, bchecked: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnControlActivating(&self, pfdc: windows_core::Ref<'_, IFileDialogCustomize>, dwidctl: u32) -> windows_core::Result<()>; } impl IFileDialogControlEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnItemSelected(this: *mut core::ffi::c_void, pfdc: *mut core::ffi::c_void, dwidctl: u32, dwiditem: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialogControlEvents_Impl::OnItemSelected(this, windows_core::from_raw_borrowed(&pfdc), core::mem::transmute_copy(&dwidctl), core::mem::transmute_copy(&dwiditem)).into() + IFileDialogControlEvents_Impl::OnItemSelected(this, core::mem::transmute_copy(&pfdc), core::mem::transmute_copy(&dwidctl), core::mem::transmute_copy(&dwiditem)).into() } unsafe extern "system" fn OnButtonClicked(this: *mut core::ffi::c_void, pfdc: *mut core::ffi::c_void, dwidctl: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialogControlEvents_Impl::OnButtonClicked(this, windows_core::from_raw_borrowed(&pfdc), core::mem::transmute_copy(&dwidctl)).into() + IFileDialogControlEvents_Impl::OnButtonClicked(this, core::mem::transmute_copy(&pfdc), core::mem::transmute_copy(&dwidctl)).into() } unsafe extern "system" fn OnCheckButtonToggled(this: *mut core::ffi::c_void, pfdc: *mut core::ffi::c_void, dwidctl: u32, bchecked: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialogControlEvents_Impl::OnCheckButtonToggled(this, windows_core::from_raw_borrowed(&pfdc), core::mem::transmute_copy(&dwidctl), core::mem::transmute_copy(&bchecked)).into() + IFileDialogControlEvents_Impl::OnCheckButtonToggled(this, core::mem::transmute_copy(&pfdc), core::mem::transmute_copy(&dwidctl), core::mem::transmute_copy(&bchecked)).into() } unsafe extern "system" fn OnControlActivating(this: *mut core::ffi::c_void, pfdc: *mut core::ffi::c_void, dwidctl: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialogControlEvents_Impl::OnControlActivating(this, windows_core::from_raw_borrowed(&pfdc), core::mem::transmute_copy(&dwidctl)).into() + IFileDialogControlEvents_Impl::OnControlActivating(this, core::mem::transmute_copy(&pfdc), core::mem::transmute_copy(&dwidctl)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -21205,35 +21205,35 @@ pub struct IFileDialogEvents_Vtbl { pub OnOverwrite: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut FDE_OVERWRITE_RESPONSE) -> windows_core::HRESULT, } pub trait IFileDialogEvents_Impl: windows_core::IUnknownImpl { - fn OnFileOk(&self, pfd: Option<&IFileDialog>) -> windows_core::Result<()>; - fn OnFolderChanging(&self, pfd: Option<&IFileDialog>, psifolder: Option<&IShellItem>) -> windows_core::Result<()>; - fn OnFolderChange(&self, pfd: Option<&IFileDialog>) -> windows_core::Result<()>; - fn OnSelectionChange(&self, pfd: Option<&IFileDialog>) -> windows_core::Result<()>; - fn OnShareViolation(&self, pfd: Option<&IFileDialog>, psi: Option<&IShellItem>) -> windows_core::Result; - fn OnTypeChange(&self, pfd: Option<&IFileDialog>) -> windows_core::Result<()>; - fn OnOverwrite(&self, pfd: Option<&IFileDialog>, psi: Option<&IShellItem>) -> windows_core::Result; + fn OnFileOk(&self, pfd: windows_core::Ref<'_, IFileDialog>) -> windows_core::Result<()>; + fn OnFolderChanging(&self, pfd: windows_core::Ref<'_, IFileDialog>, psifolder: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn OnFolderChange(&self, pfd: windows_core::Ref<'_, IFileDialog>) -> windows_core::Result<()>; + fn OnSelectionChange(&self, pfd: windows_core::Ref<'_, IFileDialog>) -> windows_core::Result<()>; + fn OnShareViolation(&self, pfd: windows_core::Ref<'_, IFileDialog>, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; + fn OnTypeChange(&self, pfd: windows_core::Ref<'_, IFileDialog>) -> windows_core::Result<()>; + fn OnOverwrite(&self, pfd: windows_core::Ref<'_, IFileDialog>, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; } impl IFileDialogEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnFileOk(this: *mut core::ffi::c_void, pfd: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialogEvents_Impl::OnFileOk(this, windows_core::from_raw_borrowed(&pfd)).into() + IFileDialogEvents_Impl::OnFileOk(this, core::mem::transmute_copy(&pfd)).into() } unsafe extern "system" fn OnFolderChanging(this: *mut core::ffi::c_void, pfd: *mut core::ffi::c_void, psifolder: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialogEvents_Impl::OnFolderChanging(this, windows_core::from_raw_borrowed(&pfd), windows_core::from_raw_borrowed(&psifolder)).into() + IFileDialogEvents_Impl::OnFolderChanging(this, core::mem::transmute_copy(&pfd), core::mem::transmute_copy(&psifolder)).into() } unsafe extern "system" fn OnFolderChange(this: *mut core::ffi::c_void, pfd: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialogEvents_Impl::OnFolderChange(this, windows_core::from_raw_borrowed(&pfd)).into() + IFileDialogEvents_Impl::OnFolderChange(this, core::mem::transmute_copy(&pfd)).into() } unsafe extern "system" fn OnSelectionChange(this: *mut core::ffi::c_void, pfd: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialogEvents_Impl::OnSelectionChange(this, windows_core::from_raw_borrowed(&pfd)).into() + IFileDialogEvents_Impl::OnSelectionChange(this, core::mem::transmute_copy(&pfd)).into() } unsafe extern "system" fn OnShareViolation(this: *mut core::ffi::c_void, pfd: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, presponse: *mut FDE_SHAREVIOLATION_RESPONSE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFileDialogEvents_Impl::OnShareViolation(this, windows_core::from_raw_borrowed(&pfd), windows_core::from_raw_borrowed(&psi)) { + match IFileDialogEvents_Impl::OnShareViolation(this, core::mem::transmute_copy(&pfd), core::mem::transmute_copy(&psi)) { Ok(ok__) => { presponse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -21243,11 +21243,11 @@ impl IFileDialogEvents_Vtbl { } unsafe extern "system" fn OnTypeChange(this: *mut core::ffi::c_void, pfd: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileDialogEvents_Impl::OnTypeChange(this, windows_core::from_raw_borrowed(&pfd)).into() + IFileDialogEvents_Impl::OnTypeChange(this, core::mem::transmute_copy(&pfd)).into() } unsafe extern "system" fn OnOverwrite(this: *mut core::ffi::c_void, pfd: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, presponse: *mut FDE_OVERWRITE_RESPONSE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFileDialogEvents_Impl::OnOverwrite(this, windows_core::from_raw_borrowed(&pfd), windows_core::from_raw_borrowed(&psi)) { + match IFileDialogEvents_Impl::OnOverwrite(this, core::mem::transmute_copy(&pfd), core::mem::transmute_copy(&psi)) { Ok(ok__) => { presponse.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -21590,24 +21590,24 @@ pub struct IFileOperation_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IFileOperation_Impl: windows_core::IUnknownImpl { - fn Advise(&self, pfops: Option<&IFileOperationProgressSink>) -> windows_core::Result; + fn Advise(&self, pfops: windows_core::Ref<'_, IFileOperationProgressSink>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; fn SetOperationFlags(&self, dwoperationflags: FILEOPERATION_FLAGS) -> windows_core::Result<()>; fn SetProgressMessage(&self, pszmessage: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn SetProgressDialog(&self, popd: Option<&IOperationsProgressDialog>) -> windows_core::Result<()>; - fn SetProperties(&self, pproparray: Option<&PropertiesSystem::IPropertyChangeArray>) -> windows_core::Result<()>; + fn SetProgressDialog(&self, popd: windows_core::Ref<'_, IOperationsProgressDialog>) -> windows_core::Result<()>; + fn SetProperties(&self, pproparray: windows_core::Ref<'_, PropertiesSystem::IPropertyChangeArray>) -> windows_core::Result<()>; fn SetOwnerWindow(&self, hwndowner: super::super::Foundation::HWND) -> windows_core::Result<()>; - fn ApplyPropertiesToItem(&self, psiitem: Option<&IShellItem>) -> windows_core::Result<()>; - fn ApplyPropertiesToItems(&self, punkitems: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn RenameItem(&self, psiitem: Option<&IShellItem>, psznewname: &windows_core::PCWSTR, pfopsitem: Option<&IFileOperationProgressSink>) -> windows_core::Result<()>; - fn RenameItems(&self, punkitems: Option<&windows_core::IUnknown>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn MoveItem(&self, psiitem: Option<&IShellItem>, psidestinationfolder: Option<&IShellItem>, psznewname: &windows_core::PCWSTR, pfopsitem: Option<&IFileOperationProgressSink>) -> windows_core::Result<()>; - fn MoveItems(&self, punkitems: Option<&windows_core::IUnknown>, psidestinationfolder: Option<&IShellItem>) -> windows_core::Result<()>; - fn CopyItem(&self, psiitem: Option<&IShellItem>, psidestinationfolder: Option<&IShellItem>, pszcopyname: &windows_core::PCWSTR, pfopsitem: Option<&IFileOperationProgressSink>) -> windows_core::Result<()>; - fn CopyItems(&self, punkitems: Option<&windows_core::IUnknown>, psidestinationfolder: Option<&IShellItem>) -> windows_core::Result<()>; - fn DeleteItem(&self, psiitem: Option<&IShellItem>, pfopsitem: Option<&IFileOperationProgressSink>) -> windows_core::Result<()>; - fn DeleteItems(&self, punkitems: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn NewItem(&self, psidestinationfolder: Option<&IShellItem>, dwfileattributes: u32, pszname: &windows_core::PCWSTR, psztemplatename: &windows_core::PCWSTR, pfopsitem: Option<&IFileOperationProgressSink>) -> windows_core::Result<()>; + fn ApplyPropertiesToItem(&self, psiitem: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn ApplyPropertiesToItems(&self, punkitems: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn RenameItem(&self, psiitem: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR, pfopsitem: windows_core::Ref<'_, IFileOperationProgressSink>) -> windows_core::Result<()>; + fn RenameItems(&self, punkitems: windows_core::Ref<'_, windows_core::IUnknown>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn MoveItem(&self, psiitem: windows_core::Ref<'_, IShellItem>, psidestinationfolder: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR, pfopsitem: windows_core::Ref<'_, IFileOperationProgressSink>) -> windows_core::Result<()>; + fn MoveItems(&self, punkitems: windows_core::Ref<'_, windows_core::IUnknown>, psidestinationfolder: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn CopyItem(&self, psiitem: windows_core::Ref<'_, IShellItem>, psidestinationfolder: windows_core::Ref<'_, IShellItem>, pszcopyname: &windows_core::PCWSTR, pfopsitem: windows_core::Ref<'_, IFileOperationProgressSink>) -> windows_core::Result<()>; + fn CopyItems(&self, punkitems: windows_core::Ref<'_, windows_core::IUnknown>, psidestinationfolder: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn DeleteItem(&self, psiitem: windows_core::Ref<'_, IShellItem>, pfopsitem: windows_core::Ref<'_, IFileOperationProgressSink>) -> windows_core::Result<()>; + fn DeleteItems(&self, punkitems: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn NewItem(&self, psidestinationfolder: windows_core::Ref<'_, IShellItem>, dwfileattributes: u32, pszname: &windows_core::PCWSTR, psztemplatename: &windows_core::PCWSTR, pfopsitem: windows_core::Ref<'_, IFileOperationProgressSink>) -> windows_core::Result<()>; fn PerformOperations(&self) -> windows_core::Result<()>; fn GetAnyOperationsAborted(&self) -> windows_core::Result; } @@ -21616,7 +21616,7 @@ impl IFileOperation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pfops: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFileOperation_Impl::Advise(this, windows_core::from_raw_borrowed(&pfops)) { + match IFileOperation_Impl::Advise(this, core::mem::transmute_copy(&pfops)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -21638,11 +21638,11 @@ impl IFileOperation_Vtbl { } unsafe extern "system" fn SetProgressDialog(this: *mut core::ffi::c_void, popd: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::SetProgressDialog(this, windows_core::from_raw_borrowed(&popd)).into() + IFileOperation_Impl::SetProgressDialog(this, core::mem::transmute_copy(&popd)).into() } unsafe extern "system" fn SetProperties(this: *mut core::ffi::c_void, pproparray: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::SetProperties(this, windows_core::from_raw_borrowed(&pproparray)).into() + IFileOperation_Impl::SetProperties(this, core::mem::transmute_copy(&pproparray)).into() } unsafe extern "system" fn SetOwnerWindow(this: *mut core::ffi::c_void, hwndowner: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21650,47 +21650,47 @@ impl IFileOperation_Vtbl { } unsafe extern "system" fn ApplyPropertiesToItem(this: *mut core::ffi::c_void, psiitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::ApplyPropertiesToItem(this, windows_core::from_raw_borrowed(&psiitem)).into() + IFileOperation_Impl::ApplyPropertiesToItem(this, core::mem::transmute_copy(&psiitem)).into() } unsafe extern "system" fn ApplyPropertiesToItems(this: *mut core::ffi::c_void, punkitems: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::ApplyPropertiesToItems(this, windows_core::from_raw_borrowed(&punkitems)).into() + IFileOperation_Impl::ApplyPropertiesToItems(this, core::mem::transmute_copy(&punkitems)).into() } unsafe extern "system" fn RenameItem(this: *mut core::ffi::c_void, psiitem: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR, pfopsitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::RenameItem(this, windows_core::from_raw_borrowed(&psiitem), core::mem::transmute(&psznewname), windows_core::from_raw_borrowed(&pfopsitem)).into() + IFileOperation_Impl::RenameItem(this, core::mem::transmute_copy(&psiitem), core::mem::transmute(&psznewname), core::mem::transmute_copy(&pfopsitem)).into() } unsafe extern "system" fn RenameItems(this: *mut core::ffi::c_void, punkitems: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::RenameItems(this, windows_core::from_raw_borrowed(&punkitems), core::mem::transmute(&psznewname)).into() + IFileOperation_Impl::RenameItems(this, core::mem::transmute_copy(&punkitems), core::mem::transmute(&psznewname)).into() } unsafe extern "system" fn MoveItem(this: *mut core::ffi::c_void, psiitem: *mut core::ffi::c_void, psidestinationfolder: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR, pfopsitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::MoveItem(this, windows_core::from_raw_borrowed(&psiitem), windows_core::from_raw_borrowed(&psidestinationfolder), core::mem::transmute(&psznewname), windows_core::from_raw_borrowed(&pfopsitem)).into() + IFileOperation_Impl::MoveItem(this, core::mem::transmute_copy(&psiitem), core::mem::transmute_copy(&psidestinationfolder), core::mem::transmute(&psznewname), core::mem::transmute_copy(&pfopsitem)).into() } unsafe extern "system" fn MoveItems(this: *mut core::ffi::c_void, punkitems: *mut core::ffi::c_void, psidestinationfolder: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::MoveItems(this, windows_core::from_raw_borrowed(&punkitems), windows_core::from_raw_borrowed(&psidestinationfolder)).into() + IFileOperation_Impl::MoveItems(this, core::mem::transmute_copy(&punkitems), core::mem::transmute_copy(&psidestinationfolder)).into() } unsafe extern "system" fn CopyItem(this: *mut core::ffi::c_void, psiitem: *mut core::ffi::c_void, psidestinationfolder: *mut core::ffi::c_void, pszcopyname: windows_core::PCWSTR, pfopsitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::CopyItem(this, windows_core::from_raw_borrowed(&psiitem), windows_core::from_raw_borrowed(&psidestinationfolder), core::mem::transmute(&pszcopyname), windows_core::from_raw_borrowed(&pfopsitem)).into() + IFileOperation_Impl::CopyItem(this, core::mem::transmute_copy(&psiitem), core::mem::transmute_copy(&psidestinationfolder), core::mem::transmute(&pszcopyname), core::mem::transmute_copy(&pfopsitem)).into() } unsafe extern "system" fn CopyItems(this: *mut core::ffi::c_void, punkitems: *mut core::ffi::c_void, psidestinationfolder: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::CopyItems(this, windows_core::from_raw_borrowed(&punkitems), windows_core::from_raw_borrowed(&psidestinationfolder)).into() + IFileOperation_Impl::CopyItems(this, core::mem::transmute_copy(&punkitems), core::mem::transmute_copy(&psidestinationfolder)).into() } unsafe extern "system" fn DeleteItem(this: *mut core::ffi::c_void, psiitem: *mut core::ffi::c_void, pfopsitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::DeleteItem(this, windows_core::from_raw_borrowed(&psiitem), windows_core::from_raw_borrowed(&pfopsitem)).into() + IFileOperation_Impl::DeleteItem(this, core::mem::transmute_copy(&psiitem), core::mem::transmute_copy(&pfopsitem)).into() } unsafe extern "system" fn DeleteItems(this: *mut core::ffi::c_void, punkitems: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::DeleteItems(this, windows_core::from_raw_borrowed(&punkitems)).into() + IFileOperation_Impl::DeleteItems(this, core::mem::transmute_copy(&punkitems)).into() } unsafe extern "system" fn NewItem(this: *mut core::ffi::c_void, psidestinationfolder: *mut core::ffi::c_void, dwfileattributes: u32, pszname: windows_core::PCWSTR, psztemplatename: windows_core::PCWSTR, pfopsitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperation_Impl::NewItem(this, windows_core::from_raw_borrowed(&psidestinationfolder), core::mem::transmute_copy(&dwfileattributes), core::mem::transmute(&pszname), core::mem::transmute(&psztemplatename), windows_core::from_raw_borrowed(&pfopsitem)).into() + IFileOperation_Impl::NewItem(this, core::mem::transmute_copy(&psidestinationfolder), core::mem::transmute_copy(&dwfileattributes), core::mem::transmute(&pszname), core::mem::transmute(&psztemplatename), core::mem::transmute_copy(&pfopsitem)).into() } unsafe extern "system" fn PerformOperations(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -21896,16 +21896,16 @@ pub struct IFileOperationProgressSink_Vtbl { pub trait IFileOperationProgressSink_Impl: windows_core::IUnknownImpl { fn StartOperations(&self) -> windows_core::Result<()>; fn FinishOperations(&self, hrresult: windows_core::HRESULT) -> windows_core::Result<()>; - fn PreRenameItem(&self, dwflags: u32, psiitem: Option<&IShellItem>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn PostRenameItem(&self, dwflags: u32, psiitem: Option<&IShellItem>, psznewname: &windows_core::PCWSTR, hrrename: windows_core::HRESULT, psinewlycreated: Option<&IShellItem>) -> windows_core::Result<()>; - fn PreMoveItem(&self, dwflags: u32, psiitem: Option<&IShellItem>, psidestinationfolder: Option<&IShellItem>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn PostMoveItem(&self, dwflags: u32, psiitem: Option<&IShellItem>, psidestinationfolder: Option<&IShellItem>, psznewname: &windows_core::PCWSTR, hrmove: windows_core::HRESULT, psinewlycreated: Option<&IShellItem>) -> windows_core::Result<()>; - fn PreCopyItem(&self, dwflags: u32, psiitem: Option<&IShellItem>, psidestinationfolder: Option<&IShellItem>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn PostCopyItem(&self, dwflags: u32, psiitem: Option<&IShellItem>, psidestinationfolder: Option<&IShellItem>, psznewname: &windows_core::PCWSTR, hrcopy: windows_core::HRESULT, psinewlycreated: Option<&IShellItem>) -> windows_core::Result<()>; - fn PreDeleteItem(&self, dwflags: u32, psiitem: Option<&IShellItem>) -> windows_core::Result<()>; - fn PostDeleteItem(&self, dwflags: u32, psiitem: Option<&IShellItem>, hrdelete: windows_core::HRESULT, psinewlycreated: Option<&IShellItem>) -> windows_core::Result<()>; - fn PreNewItem(&self, dwflags: u32, psidestinationfolder: Option<&IShellItem>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn PostNewItem(&self, dwflags: u32, psidestinationfolder: Option<&IShellItem>, psznewname: &windows_core::PCWSTR, psztemplatename: &windows_core::PCWSTR, dwfileattributes: u32, hrnew: windows_core::HRESULT, psinewitem: Option<&IShellItem>) -> windows_core::Result<()>; + fn PreRenameItem(&self, dwflags: u32, psiitem: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn PostRenameItem(&self, dwflags: u32, psiitem: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR, hrrename: windows_core::HRESULT, psinewlycreated: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn PreMoveItem(&self, dwflags: u32, psiitem: windows_core::Ref<'_, IShellItem>, psidestinationfolder: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn PostMoveItem(&self, dwflags: u32, psiitem: windows_core::Ref<'_, IShellItem>, psidestinationfolder: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR, hrmove: windows_core::HRESULT, psinewlycreated: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn PreCopyItem(&self, dwflags: u32, psiitem: windows_core::Ref<'_, IShellItem>, psidestinationfolder: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn PostCopyItem(&self, dwflags: u32, psiitem: windows_core::Ref<'_, IShellItem>, psidestinationfolder: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR, hrcopy: windows_core::HRESULT, psinewlycreated: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn PreDeleteItem(&self, dwflags: u32, psiitem: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn PostDeleteItem(&self, dwflags: u32, psiitem: windows_core::Ref<'_, IShellItem>, hrdelete: windows_core::HRESULT, psinewlycreated: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn PreNewItem(&self, dwflags: u32, psidestinationfolder: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn PostNewItem(&self, dwflags: u32, psidestinationfolder: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR, psztemplatename: &windows_core::PCWSTR, dwfileattributes: u32, hrnew: windows_core::HRESULT, psinewitem: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn UpdateProgress(&self, iworktotal: u32, iworksofar: u32) -> windows_core::Result<()>; fn ResetTimer(&self) -> windows_core::Result<()>; fn PauseTimer(&self) -> windows_core::Result<()>; @@ -21923,43 +21923,43 @@ impl IFileOperationProgressSink_Vtbl { } unsafe extern "system" fn PreRenameItem(this: *mut core::ffi::c_void, dwflags: u32, psiitem: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PreRenameItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psiitem), core::mem::transmute(&psznewname)).into() + IFileOperationProgressSink_Impl::PreRenameItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psiitem), core::mem::transmute(&psznewname)).into() } unsafe extern "system" fn PostRenameItem(this: *mut core::ffi::c_void, dwflags: u32, psiitem: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR, hrrename: windows_core::HRESULT, psinewlycreated: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PostRenameItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psiitem), core::mem::transmute(&psznewname), core::mem::transmute_copy(&hrrename), windows_core::from_raw_borrowed(&psinewlycreated)).into() + IFileOperationProgressSink_Impl::PostRenameItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psiitem), core::mem::transmute(&psznewname), core::mem::transmute_copy(&hrrename), core::mem::transmute_copy(&psinewlycreated)).into() } unsafe extern "system" fn PreMoveItem(this: *mut core::ffi::c_void, dwflags: u32, psiitem: *mut core::ffi::c_void, psidestinationfolder: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PreMoveItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psiitem), windows_core::from_raw_borrowed(&psidestinationfolder), core::mem::transmute(&psznewname)).into() + IFileOperationProgressSink_Impl::PreMoveItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psiitem), core::mem::transmute_copy(&psidestinationfolder), core::mem::transmute(&psznewname)).into() } unsafe extern "system" fn PostMoveItem(this: *mut core::ffi::c_void, dwflags: u32, psiitem: *mut core::ffi::c_void, psidestinationfolder: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR, hrmove: windows_core::HRESULT, psinewlycreated: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PostMoveItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psiitem), windows_core::from_raw_borrowed(&psidestinationfolder), core::mem::transmute(&psznewname), core::mem::transmute_copy(&hrmove), windows_core::from_raw_borrowed(&psinewlycreated)).into() + IFileOperationProgressSink_Impl::PostMoveItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psiitem), core::mem::transmute_copy(&psidestinationfolder), core::mem::transmute(&psznewname), core::mem::transmute_copy(&hrmove), core::mem::transmute_copy(&psinewlycreated)).into() } unsafe extern "system" fn PreCopyItem(this: *mut core::ffi::c_void, dwflags: u32, psiitem: *mut core::ffi::c_void, psidestinationfolder: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PreCopyItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psiitem), windows_core::from_raw_borrowed(&psidestinationfolder), core::mem::transmute(&psznewname)).into() + IFileOperationProgressSink_Impl::PreCopyItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psiitem), core::mem::transmute_copy(&psidestinationfolder), core::mem::transmute(&psznewname)).into() } unsafe extern "system" fn PostCopyItem(this: *mut core::ffi::c_void, dwflags: u32, psiitem: *mut core::ffi::c_void, psidestinationfolder: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR, hrcopy: windows_core::HRESULT, psinewlycreated: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PostCopyItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psiitem), windows_core::from_raw_borrowed(&psidestinationfolder), core::mem::transmute(&psznewname), core::mem::transmute_copy(&hrcopy), windows_core::from_raw_borrowed(&psinewlycreated)).into() + IFileOperationProgressSink_Impl::PostCopyItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psiitem), core::mem::transmute_copy(&psidestinationfolder), core::mem::transmute(&psznewname), core::mem::transmute_copy(&hrcopy), core::mem::transmute_copy(&psinewlycreated)).into() } unsafe extern "system" fn PreDeleteItem(this: *mut core::ffi::c_void, dwflags: u32, psiitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PreDeleteItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psiitem)).into() + IFileOperationProgressSink_Impl::PreDeleteItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psiitem)).into() } unsafe extern "system" fn PostDeleteItem(this: *mut core::ffi::c_void, dwflags: u32, psiitem: *mut core::ffi::c_void, hrdelete: windows_core::HRESULT, psinewlycreated: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PostDeleteItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psiitem), core::mem::transmute_copy(&hrdelete), windows_core::from_raw_borrowed(&psinewlycreated)).into() + IFileOperationProgressSink_Impl::PostDeleteItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psiitem), core::mem::transmute_copy(&hrdelete), core::mem::transmute_copy(&psinewlycreated)).into() } unsafe extern "system" fn PreNewItem(this: *mut core::ffi::c_void, dwflags: u32, psidestinationfolder: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PreNewItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psidestinationfolder), core::mem::transmute(&psznewname)).into() + IFileOperationProgressSink_Impl::PreNewItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psidestinationfolder), core::mem::transmute(&psznewname)).into() } unsafe extern "system" fn PostNewItem(this: *mut core::ffi::c_void, dwflags: u32, psidestinationfolder: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR, psztemplatename: windows_core::PCWSTR, dwfileattributes: u32, hrnew: windows_core::HRESULT, psinewitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileOperationProgressSink_Impl::PostNewItem(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&psidestinationfolder), core::mem::transmute(&psznewname), core::mem::transmute(&psztemplatename), core::mem::transmute_copy(&dwfileattributes), core::mem::transmute_copy(&hrnew), windows_core::from_raw_borrowed(&psinewitem)).into() + IFileOperationProgressSink_Impl::PostNewItem(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&psidestinationfolder), core::mem::transmute(&psznewname), core::mem::transmute(&psztemplatename), core::mem::transmute_copy(&dwfileattributes), core::mem::transmute_copy(&hrnew), core::mem::transmute_copy(&psinewitem)).into() } unsafe extern "system" fn UpdateProgress(this: *mut core::ffi::c_void, iworktotal: u32, iworksofar: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22069,26 +22069,26 @@ pub struct IFileSaveDialog_Vtbl { } #[cfg(all(feature = "Win32_UI_Shell_Common", feature = "Win32_UI_Shell_PropertiesSystem"))] pub trait IFileSaveDialog_Impl: IFileDialog_Impl { - fn SetSaveAsItem(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn SetProperties(&self, pstore: Option<&PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; - fn SetCollectedProperties(&self, plist: Option<&PropertiesSystem::IPropertyDescriptionList>, fappenddefault: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetSaveAsItem(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn SetProperties(&self, pstore: windows_core::Ref<'_, PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn SetCollectedProperties(&self, plist: windows_core::Ref<'_, PropertiesSystem::IPropertyDescriptionList>, fappenddefault: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetProperties(&self) -> windows_core::Result; - fn ApplyProperties(&self, psi: Option<&IShellItem>, pstore: Option<&PropertiesSystem::IPropertyStore>, hwnd: super::super::Foundation::HWND, psink: Option<&IFileOperationProgressSink>) -> windows_core::Result<()>; + fn ApplyProperties(&self, psi: windows_core::Ref<'_, IShellItem>, pstore: windows_core::Ref<'_, PropertiesSystem::IPropertyStore>, hwnd: super::super::Foundation::HWND, psink: windows_core::Ref<'_, IFileOperationProgressSink>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_UI_Shell_Common", feature = "Win32_UI_Shell_PropertiesSystem"))] impl IFileSaveDialog_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSaveAsItem(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileSaveDialog_Impl::SetSaveAsItem(this, windows_core::from_raw_borrowed(&psi)).into() + IFileSaveDialog_Impl::SetSaveAsItem(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn SetProperties(this: *mut core::ffi::c_void, pstore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileSaveDialog_Impl::SetProperties(this, windows_core::from_raw_borrowed(&pstore)).into() + IFileSaveDialog_Impl::SetProperties(this, core::mem::transmute_copy(&pstore)).into() } unsafe extern "system" fn SetCollectedProperties(this: *mut core::ffi::c_void, plist: *mut core::ffi::c_void, fappenddefault: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileSaveDialog_Impl::SetCollectedProperties(this, windows_core::from_raw_borrowed(&plist), core::mem::transmute_copy(&fappenddefault)).into() + IFileSaveDialog_Impl::SetCollectedProperties(this, core::mem::transmute_copy(&plist), core::mem::transmute_copy(&fappenddefault)).into() } unsafe extern "system" fn GetProperties(this: *mut core::ffi::c_void, ppstore: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -22102,7 +22102,7 @@ impl IFileSaveDialog_Vtbl { } unsafe extern "system" fn ApplyProperties(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pstore: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFileSaveDialog_Impl::ApplyProperties(this, windows_core::from_raw_borrowed(&psi), windows_core::from_raw_borrowed(&pstore), core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&psink)).into() + IFileSaveDialog_Impl::ApplyProperties(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&pstore), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&psink)).into() } Self { base__: IFileDialog_Vtbl::new::(), @@ -22528,19 +22528,19 @@ pub struct IFolderFilter_Vtbl { } #[cfg(feature = "Win32_UI_Shell_Common")] pub trait IFolderFilter_Impl: windows_core::IUnknownImpl { - fn ShouldShow(&self, psf: Option<&IShellFolder>, pidlfolder: *const Common::ITEMIDLIST, pidlitem: *const Common::ITEMIDLIST) -> windows_core::Result<()>; - fn GetEnumFlags(&self, psf: Option<&IShellFolder>, pidlfolder: *const Common::ITEMIDLIST, phwnd: *mut super::super::Foundation::HWND, pgrfflags: *mut u32) -> windows_core::Result<()>; + fn ShouldShow(&self, psf: windows_core::Ref<'_, IShellFolder>, pidlfolder: *const Common::ITEMIDLIST, pidlitem: *const Common::ITEMIDLIST) -> windows_core::Result<()>; + fn GetEnumFlags(&self, psf: windows_core::Ref<'_, IShellFolder>, pidlfolder: *const Common::ITEMIDLIST, phwnd: *mut super::super::Foundation::HWND, pgrfflags: *mut u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_Common")] impl IFolderFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ShouldShow(this: *mut core::ffi::c_void, psf: *mut core::ffi::c_void, pidlfolder: *const Common::ITEMIDLIST, pidlitem: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFolderFilter_Impl::ShouldShow(this, windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&pidlfolder), core::mem::transmute_copy(&pidlitem)).into() + IFolderFilter_Impl::ShouldShow(this, core::mem::transmute_copy(&psf), core::mem::transmute_copy(&pidlfolder), core::mem::transmute_copy(&pidlitem)).into() } unsafe extern "system" fn GetEnumFlags(this: *mut core::ffi::c_void, psf: *mut core::ffi::c_void, pidlfolder: *const Common::ITEMIDLIST, phwnd: *mut super::super::Foundation::HWND, pgrfflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFolderFilter_Impl::GetEnumFlags(this, windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&pidlfolder), core::mem::transmute_copy(&phwnd), core::mem::transmute_copy(&pgrfflags)).into() + IFolderFilter_Impl::GetEnumFlags(this, core::mem::transmute_copy(&psf), core::mem::transmute_copy(&pidlfolder), core::mem::transmute_copy(&phwnd), core::mem::transmute_copy(&pgrfflags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -22570,13 +22570,13 @@ pub struct IFolderFilterSite_Vtbl { pub SetFilter: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IFolderFilterSite_Impl: windows_core::IUnknownImpl { - fn SetFilter(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetFilter(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IFolderFilterSite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetFilter(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFolderFilterSite_Impl::SetFilter(this, windows_core::from_raw_borrowed(&punk)).into() + IFolderFilterSite_Impl::SetFilter(this, core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetFilter: SetFilter:: } } @@ -23211,14 +23211,14 @@ pub struct IFolderViewHost_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IFolderViewHost_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, hwndparent: super::super::Foundation::HWND, pdo: Option<&super::super::System::Com::IDataObject>, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()>; + fn Initialize(&self, hwndparent: super::super::Foundation::HWND, pdo: windows_core::Ref<'_, super::super::System::Com::IDataObject>, prc: *const super::super::Foundation::RECT) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IFolderViewHost_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, pdo: *mut core::ffi::c_void, prc: *const super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFolderViewHost_Impl::Initialize(this, core::mem::transmute_copy(&hwndparent), windows_core::from_raw_borrowed(&pdo), core::mem::transmute_copy(&prc)).into() + IFolderViewHost_Impl::Initialize(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&pdo), core::mem::transmute_copy(&prc)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -23256,14 +23256,14 @@ pub struct IFolderViewOC_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IFolderViewOC_Impl: super::super::System::Com::IDispatch_Impl { - fn SetFolderView(&self, pdisp: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetFolderView(&self, pdisp: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IFolderViewOC_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetFolderView(this: *mut core::ffi::c_void, pdisp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IFolderViewOC_Impl::SetFolderView(this, windows_core::from_raw_borrowed(&pdisp)).into() + IFolderViewOC_Impl::SetFolderView(this, core::mem::transmute_copy(&pdisp)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), SetFolderView: SetFolderView:: } } @@ -23472,8 +23472,8 @@ pub struct IFrameworkInputPane_Vtbl { pub Location: unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::super::Foundation::RECT) -> windows_core::HRESULT, } pub trait IFrameworkInputPane_Impl: windows_core::IUnknownImpl { - fn Advise(&self, pwindow: Option<&windows_core::IUnknown>, phandler: Option<&IFrameworkInputPaneHandler>) -> windows_core::Result; - fn AdviseWithHWND(&self, hwnd: super::super::Foundation::HWND, phandler: Option<&IFrameworkInputPaneHandler>) -> windows_core::Result; + fn Advise(&self, pwindow: windows_core::Ref<'_, windows_core::IUnknown>, phandler: windows_core::Ref<'_, IFrameworkInputPaneHandler>) -> windows_core::Result; + fn AdviseWithHWND(&self, hwnd: super::super::Foundation::HWND, phandler: windows_core::Ref<'_, IFrameworkInputPaneHandler>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; fn Location(&self) -> windows_core::Result; } @@ -23481,7 +23481,7 @@ impl IFrameworkInputPane_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, pwindow: *mut core::ffi::c_void, phandler: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFrameworkInputPane_Impl::Advise(this, windows_core::from_raw_borrowed(&pwindow), windows_core::from_raw_borrowed(&phandler)) { + match IFrameworkInputPane_Impl::Advise(this, core::mem::transmute_copy(&pwindow), core::mem::transmute_copy(&phandler)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -23491,7 +23491,7 @@ impl IFrameworkInputPane_Vtbl { } unsafe extern "system" fn AdviseWithHWND(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, phandler: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IFrameworkInputPane_Impl::AdviseWithHWND(this, core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&phandler)) { + match IFrameworkInputPane_Impl::AdviseWithHWND(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&phandler)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -23634,7 +23634,7 @@ pub struct IHWEventHandler_Vtbl { pub trait IHWEventHandler_Impl: windows_core::IUnknownImpl { fn Initialize(&self, pszparams: &windows_core::PCWSTR) -> windows_core::Result<()>; fn HandleEvent(&self, pszdeviceid: &windows_core::PCWSTR, pszaltdeviceid: &windows_core::PCWSTR, pszeventtype: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn HandleEventWithContent(&self, pszdeviceid: &windows_core::PCWSTR, pszaltdeviceid: &windows_core::PCWSTR, pszeventtype: &windows_core::PCWSTR, pszcontenttypehandler: &windows_core::PCWSTR, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn HandleEventWithContent(&self, pszdeviceid: &windows_core::PCWSTR, pszaltdeviceid: &windows_core::PCWSTR, pszeventtype: &windows_core::PCWSTR, pszcontenttypehandler: &windows_core::PCWSTR, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IHWEventHandler_Vtbl { @@ -23649,7 +23649,7 @@ impl IHWEventHandler_Vtbl { } unsafe extern "system" fn HandleEventWithContent(this: *mut core::ffi::c_void, pszdeviceid: windows_core::PCWSTR, pszaltdeviceid: windows_core::PCWSTR, pszeventtype: windows_core::PCWSTR, pszcontenttypehandler: windows_core::PCWSTR, pdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHWEventHandler_Impl::HandleEventWithContent(this, core::mem::transmute(&pszdeviceid), core::mem::transmute(&pszaltdeviceid), core::mem::transmute(&pszeventtype), core::mem::transmute(&pszcontenttypehandler), windows_core::from_raw_borrowed(&pdataobject)).into() + IHWEventHandler_Impl::HandleEventWithContent(this, core::mem::transmute(&pszdeviceid), core::mem::transmute(&pszaltdeviceid), core::mem::transmute(&pszeventtype), core::mem::transmute(&pszcontenttypehandler), core::mem::transmute_copy(&pdataobject)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -23732,18 +23732,18 @@ pub struct IHandlerActivationHost_Vtbl { pub BeforeCreateProcess: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, windows_core::PCWSTR, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IHandlerActivationHost_Impl: windows_core::IUnknownImpl { - fn BeforeCoCreateInstance(&self, clsidhandler: *const windows_core::GUID, itemsbeingactivated: Option<&IShellItemArray>, handlerinfo: Option<&IHandlerInfo>) -> windows_core::Result<()>; - fn BeforeCreateProcess(&self, applicationpath: &windows_core::PCWSTR, commandline: &windows_core::PCWSTR, handlerinfo: Option<&IHandlerInfo>) -> windows_core::Result<()>; + fn BeforeCoCreateInstance(&self, clsidhandler: *const windows_core::GUID, itemsbeingactivated: windows_core::Ref<'_, IShellItemArray>, handlerinfo: windows_core::Ref<'_, IHandlerInfo>) -> windows_core::Result<()>; + fn BeforeCreateProcess(&self, applicationpath: &windows_core::PCWSTR, commandline: &windows_core::PCWSTR, handlerinfo: windows_core::Ref<'_, IHandlerInfo>) -> windows_core::Result<()>; } impl IHandlerActivationHost_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeforeCoCreateInstance(this: *mut core::ffi::c_void, clsidhandler: *const windows_core::GUID, itemsbeingactivated: *mut core::ffi::c_void, handlerinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHandlerActivationHost_Impl::BeforeCoCreateInstance(this, core::mem::transmute_copy(&clsidhandler), windows_core::from_raw_borrowed(&itemsbeingactivated), windows_core::from_raw_borrowed(&handlerinfo)).into() + IHandlerActivationHost_Impl::BeforeCoCreateInstance(this, core::mem::transmute_copy(&clsidhandler), core::mem::transmute_copy(&itemsbeingactivated), core::mem::transmute_copy(&handlerinfo)).into() } unsafe extern "system" fn BeforeCreateProcess(this: *mut core::ffi::c_void, applicationpath: windows_core::PCWSTR, commandline: windows_core::PCWSTR, handlerinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHandlerActivationHost_Impl::BeforeCreateProcess(this, core::mem::transmute(&applicationpath), core::mem::transmute(&commandline), windows_core::from_raw_borrowed(&handlerinfo)).into() + IHandlerActivationHost_Impl::BeforeCreateProcess(this, core::mem::transmute(&applicationpath), core::mem::transmute(&commandline), core::mem::transmute_copy(&handlerinfo)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -23976,10 +23976,10 @@ pub struct IHlink_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IHlink_Impl: windows_core::IUnknownImpl { - fn SetHlinkSite(&self, pihlsite: Option<&IHlinkSite>, dwsitedata: u32) -> windows_core::Result<()>; - fn GetHlinkSite(&self, ppihlsite: *mut Option, pdwsitedata: *mut u32) -> windows_core::Result<()>; - fn SetMonikerReference(&self, grfhlsetf: u32, pimktarget: Option<&super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn GetMonikerReference(&self, dwwhichref: u32, ppimktarget: *mut Option, ppwzlocation: *mut windows_core::PWSTR) -> windows_core::Result<()>; + fn SetHlinkSite(&self, pihlsite: windows_core::Ref<'_, IHlinkSite>, dwsitedata: u32) -> windows_core::Result<()>; + fn GetHlinkSite(&self, ppihlsite: windows_core::OutRef<'_, IHlinkSite>, pdwsitedata: *mut u32) -> windows_core::Result<()>; + fn SetMonikerReference(&self, grfhlsetf: u32, pimktarget: windows_core::Ref<'_, super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn GetMonikerReference(&self, dwwhichref: u32, ppimktarget: windows_core::OutRef<'_, super::super::System::Com::IMoniker>, ppwzlocation: *mut windows_core::PWSTR) -> windows_core::Result<()>; fn SetStringReference(&self, grfhlsetf: u32, pwztarget: &windows_core::PCWSTR, pwzlocation: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetStringReference(&self, dwwhichref: u32, ppwztarget: *mut windows_core::PWSTR, ppwzlocation: *mut windows_core::PWSTR) -> windows_core::Result<()>; fn SetFriendlyName(&self, pwzfriendlyname: &windows_core::PCWSTR) -> windows_core::Result<()>; @@ -23987,7 +23987,7 @@ pub trait IHlink_Impl: windows_core::IUnknownImpl { fn SetTargetFrameName(&self, pwztargetframename: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetTargetFrameName(&self) -> windows_core::Result; fn GetMiscStatus(&self) -> windows_core::Result; - fn Navigate(&self, grfhlnf: u32, pibc: Option<&super::super::System::Com::IBindCtx>, pibsc: Option<&super::super::System::Com::IBindStatusCallback>, pihlbc: Option<&IHlinkBrowseContext>) -> windows_core::Result<()>; + fn Navigate(&self, grfhlnf: u32, pibc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, pibsc: windows_core::Ref<'_, super::super::System::Com::IBindStatusCallback>, pihlbc: windows_core::Ref<'_, IHlinkBrowseContext>) -> windows_core::Result<()>; fn SetAdditionalParams(&self, pwzadditionalparams: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetAdditionalParams(&self) -> windows_core::Result; } @@ -23996,7 +23996,7 @@ impl IHlink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetHlinkSite(this: *mut core::ffi::c_void, pihlsite: *mut core::ffi::c_void, dwsitedata: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlink_Impl::SetHlinkSite(this, windows_core::from_raw_borrowed(&pihlsite), core::mem::transmute_copy(&dwsitedata)).into() + IHlink_Impl::SetHlinkSite(this, core::mem::transmute_copy(&pihlsite), core::mem::transmute_copy(&dwsitedata)).into() } unsafe extern "system" fn GetHlinkSite(this: *mut core::ffi::c_void, ppihlsite: *mut *mut core::ffi::c_void, pdwsitedata: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24004,7 +24004,7 @@ impl IHlink_Vtbl { } unsafe extern "system" fn SetMonikerReference(this: *mut core::ffi::c_void, grfhlsetf: u32, pimktarget: *mut core::ffi::c_void, pwzlocation: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlink_Impl::SetMonikerReference(this, core::mem::transmute_copy(&grfhlsetf), windows_core::from_raw_borrowed(&pimktarget), core::mem::transmute(&pwzlocation)).into() + IHlink_Impl::SetMonikerReference(this, core::mem::transmute_copy(&grfhlsetf), core::mem::transmute_copy(&pimktarget), core::mem::transmute(&pwzlocation)).into() } unsafe extern "system" fn GetMonikerReference(this: *mut core::ffi::c_void, dwwhichref: u32, ppimktarget: *mut *mut core::ffi::c_void, ppwzlocation: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24058,7 +24058,7 @@ impl IHlink_Vtbl { } unsafe extern "system" fn Navigate(this: *mut core::ffi::c_void, grfhlnf: u32, pibc: *mut core::ffi::c_void, pibsc: *mut core::ffi::c_void, pihlbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlink_Impl::Navigate(this, core::mem::transmute_copy(&grfhlnf), windows_core::from_raw_borrowed(&pibc), windows_core::from_raw_borrowed(&pibsc), windows_core::from_raw_borrowed(&pihlbc)).into() + IHlink_Impl::Navigate(this, core::mem::transmute_copy(&grfhlnf), core::mem::transmute_copy(&pibc), core::mem::transmute_copy(&pibsc), core::mem::transmute_copy(&pihlbc)).into() } unsafe extern "system" fn SetAdditionalParams(this: *mut core::ffi::c_void, pwzadditionalparams: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24215,19 +24215,19 @@ pub struct IHlinkBrowseContext_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IHlinkBrowseContext_Impl: windows_core::IUnknownImpl { - fn Register(&self, reserved: u32, piunk: Option<&windows_core::IUnknown>, pimk: Option<&super::super::System::Com::IMoniker>) -> windows_core::Result; - fn GetObject(&self, pimk: Option<&super::super::System::Com::IMoniker>, fbindifrootregistered: super::super::Foundation::BOOL) -> windows_core::Result; + fn Register(&self, reserved: u32, piunk: windows_core::Ref<'_, windows_core::IUnknown>, pimk: windows_core::Ref<'_, super::super::System::Com::IMoniker>) -> windows_core::Result; + fn GetObject(&self, pimk: windows_core::Ref<'_, super::super::System::Com::IMoniker>, fbindifrootregistered: super::super::Foundation::BOOL) -> windows_core::Result; fn Revoke(&self, dwregister: u32) -> windows_core::Result<()>; fn SetBrowseWindowInfo(&self, phlbwi: *const HLBWINFO) -> windows_core::Result<()>; fn GetBrowseWindowInfo(&self, phlbwi: *mut HLBWINFO) -> windows_core::Result<()>; - fn SetInitialHlink(&self, pimktarget: Option<&super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn OnNavigateHlink(&self, grfhlnf: u32, pimktarget: Option<&super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR) -> windows_core::Result; - fn UpdateHlink(&self, uhlid: u32, pimktarget: Option<&super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn SetInitialHlink(&self, pimktarget: windows_core::Ref<'_, super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn OnNavigateHlink(&self, grfhlnf: u32, pimktarget: windows_core::Ref<'_, super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR) -> windows_core::Result; + fn UpdateHlink(&self, uhlid: u32, pimktarget: windows_core::Ref<'_, super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn EnumNavigationStack(&self, dwreserved: u32, grfhlfnamef: u32) -> windows_core::Result; fn QueryHlink(&self, grfhlqf: u32, uhlid: u32) -> windows_core::Result<()>; fn GetHlink(&self, uhlid: u32) -> windows_core::Result; fn SetCurrentHlink(&self, uhlid: u32) -> windows_core::Result<()>; - fn Clone(&self, piunkouter: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; + fn Clone(&self, piunkouter: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID) -> windows_core::Result; fn Close(&self, reserved: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -24235,7 +24235,7 @@ impl IHlinkBrowseContext_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Register(this: *mut core::ffi::c_void, reserved: u32, piunk: *mut core::ffi::c_void, pimk: *mut core::ffi::c_void, pdwregister: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHlinkBrowseContext_Impl::Register(this, core::mem::transmute_copy(&reserved), windows_core::from_raw_borrowed(&piunk), windows_core::from_raw_borrowed(&pimk)) { + match IHlinkBrowseContext_Impl::Register(this, core::mem::transmute_copy(&reserved), core::mem::transmute_copy(&piunk), core::mem::transmute_copy(&pimk)) { Ok(ok__) => { pdwregister.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24245,7 +24245,7 @@ impl IHlinkBrowseContext_Vtbl { } unsafe extern "system" fn GetObject(this: *mut core::ffi::c_void, pimk: *mut core::ffi::c_void, fbindifrootregistered: super::super::Foundation::BOOL, ppiunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHlinkBrowseContext_Impl::GetObject(this, windows_core::from_raw_borrowed(&pimk), core::mem::transmute_copy(&fbindifrootregistered)) { + match IHlinkBrowseContext_Impl::GetObject(this, core::mem::transmute_copy(&pimk), core::mem::transmute_copy(&fbindifrootregistered)) { Ok(ok__) => { ppiunk.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24267,11 +24267,11 @@ impl IHlinkBrowseContext_Vtbl { } unsafe extern "system" fn SetInitialHlink(this: *mut core::ffi::c_void, pimktarget: *mut core::ffi::c_void, pwzlocation: windows_core::PCWSTR, pwzfriendlyname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlinkBrowseContext_Impl::SetInitialHlink(this, windows_core::from_raw_borrowed(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname)).into() + IHlinkBrowseContext_Impl::SetInitialHlink(this, core::mem::transmute_copy(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname)).into() } unsafe extern "system" fn OnNavigateHlink(this: *mut core::ffi::c_void, grfhlnf: u32, pimktarget: *mut core::ffi::c_void, pwzlocation: windows_core::PCWSTR, pwzfriendlyname: windows_core::PCWSTR, puhlid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHlinkBrowseContext_Impl::OnNavigateHlink(this, core::mem::transmute_copy(&grfhlnf), windows_core::from_raw_borrowed(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname)) { + match IHlinkBrowseContext_Impl::OnNavigateHlink(this, core::mem::transmute_copy(&grfhlnf), core::mem::transmute_copy(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname)) { Ok(ok__) => { puhlid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24281,7 +24281,7 @@ impl IHlinkBrowseContext_Vtbl { } unsafe extern "system" fn UpdateHlink(this: *mut core::ffi::c_void, uhlid: u32, pimktarget: *mut core::ffi::c_void, pwzlocation: windows_core::PCWSTR, pwzfriendlyname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlinkBrowseContext_Impl::UpdateHlink(this, core::mem::transmute_copy(&uhlid), windows_core::from_raw_borrowed(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname)).into() + IHlinkBrowseContext_Impl::UpdateHlink(this, core::mem::transmute_copy(&uhlid), core::mem::transmute_copy(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname)).into() } unsafe extern "system" fn EnumNavigationStack(this: *mut core::ffi::c_void, dwreserved: u32, grfhlfnamef: u32, ppienumhlitem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24313,7 +24313,7 @@ impl IHlinkBrowseContext_Vtbl { } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, piunkouter: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppiunkobj: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHlinkBrowseContext_Impl::Clone(this, windows_core::from_raw_borrowed(&piunkouter), core::mem::transmute_copy(&riid)) { + match IHlinkBrowseContext_Impl::Clone(this, core::mem::transmute_copy(&piunkouter), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppiunkobj.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24410,18 +24410,18 @@ pub struct IHlinkFrame_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IHlinkFrame_Impl: windows_core::IUnknownImpl { - fn SetBrowseContext(&self, pihlbc: Option<&IHlinkBrowseContext>) -> windows_core::Result<()>; + fn SetBrowseContext(&self, pihlbc: windows_core::Ref<'_, IHlinkBrowseContext>) -> windows_core::Result<()>; fn GetBrowseContext(&self) -> windows_core::Result; - fn Navigate(&self, grfhlnf: u32, pbc: Option<&super::super::System::Com::IBindCtx>, pibsc: Option<&super::super::System::Com::IBindStatusCallback>, pihlnavigate: Option<&IHlink>) -> windows_core::Result<()>; - fn OnNavigate(&self, grfhlnf: u32, pimktarget: Option<&super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR, dwreserved: u32) -> windows_core::Result<()>; - fn UpdateHlink(&self, uhlid: u32, pimktarget: Option<&super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn Navigate(&self, grfhlnf: u32, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, pibsc: windows_core::Ref<'_, super::super::System::Com::IBindStatusCallback>, pihlnavigate: windows_core::Ref<'_, IHlink>) -> windows_core::Result<()>; + fn OnNavigate(&self, grfhlnf: u32, pimktarget: windows_core::Ref<'_, super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR, dwreserved: u32) -> windows_core::Result<()>; + fn UpdateHlink(&self, uhlid: u32, pimktarget: windows_core::Ref<'_, super::super::System::Com::IMoniker>, pwzlocation: &windows_core::PCWSTR, pwzfriendlyname: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IHlinkFrame_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetBrowseContext(this: *mut core::ffi::c_void, pihlbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlinkFrame_Impl::SetBrowseContext(this, windows_core::from_raw_borrowed(&pihlbc)).into() + IHlinkFrame_Impl::SetBrowseContext(this, core::mem::transmute_copy(&pihlbc)).into() } unsafe extern "system" fn GetBrowseContext(this: *mut core::ffi::c_void, ppihlbc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24435,15 +24435,15 @@ impl IHlinkFrame_Vtbl { } unsafe extern "system" fn Navigate(this: *mut core::ffi::c_void, grfhlnf: u32, pbc: *mut core::ffi::c_void, pibsc: *mut core::ffi::c_void, pihlnavigate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlinkFrame_Impl::Navigate(this, core::mem::transmute_copy(&grfhlnf), windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pibsc), windows_core::from_raw_borrowed(&pihlnavigate)).into() + IHlinkFrame_Impl::Navigate(this, core::mem::transmute_copy(&grfhlnf), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pibsc), core::mem::transmute_copy(&pihlnavigate)).into() } unsafe extern "system" fn OnNavigate(this: *mut core::ffi::c_void, grfhlnf: u32, pimktarget: *mut core::ffi::c_void, pwzlocation: windows_core::PCWSTR, pwzfriendlyname: windows_core::PCWSTR, dwreserved: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlinkFrame_Impl::OnNavigate(this, core::mem::transmute_copy(&grfhlnf), windows_core::from_raw_borrowed(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname), core::mem::transmute_copy(&dwreserved)).into() + IHlinkFrame_Impl::OnNavigate(this, core::mem::transmute_copy(&grfhlnf), core::mem::transmute_copy(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname), core::mem::transmute_copy(&dwreserved)).into() } unsafe extern "system" fn UpdateHlink(this: *mut core::ffi::c_void, uhlid: u32, pimktarget: *mut core::ffi::c_void, pwzlocation: windows_core::PCWSTR, pwzfriendlyname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlinkFrame_Impl::UpdateHlink(this, core::mem::transmute_copy(&uhlid), windows_core::from_raw_borrowed(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname)).into() + IHlinkFrame_Impl::UpdateHlink(this, core::mem::transmute_copy(&uhlid), core::mem::transmute_copy(&pimktarget), core::mem::transmute(&pwzlocation), core::mem::transmute(&pwzfriendlyname)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -24594,7 +24594,7 @@ pub struct IHlinkTarget_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IHlinkTarget_Impl: windows_core::IUnknownImpl { - fn SetBrowseContext(&self, pihlbc: Option<&IHlinkBrowseContext>) -> windows_core::Result<()>; + fn SetBrowseContext(&self, pihlbc: windows_core::Ref<'_, IHlinkBrowseContext>) -> windows_core::Result<()>; fn GetBrowseContext(&self) -> windows_core::Result; fn Navigate(&self, grfhlnf: u32, pwzjumplocation: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetMoniker(&self, pwzlocation: &windows_core::PCWSTR, dwassign: u32) -> windows_core::Result; @@ -24605,7 +24605,7 @@ impl IHlinkTarget_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetBrowseContext(this: *mut core::ffi::c_void, pihlbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHlinkTarget_Impl::SetBrowseContext(this, windows_core::from_raw_borrowed(&pihlbc)).into() + IHlinkTarget_Impl::SetBrowseContext(this, core::mem::transmute_copy(&pihlbc)).into() } unsafe extern "system" fn GetBrowseContext(this: *mut core::ffi::c_void, ppihlbc: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -24800,14 +24800,14 @@ pub struct IImageRecompress_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait IImageRecompress_Impl: windows_core::IUnknownImpl { - fn RecompressImage(&self, psi: Option<&IShellItem>, cx: i32, cy: i32, iquality: i32, pstg: Option<&super::super::System::Com::StructuredStorage::IStorage>) -> windows_core::Result; + fn RecompressImage(&self, psi: windows_core::Ref<'_, IShellItem>, cx: i32, cy: i32, iquality: i32, pstg: windows_core::Ref<'_, super::super::System::Com::StructuredStorage::IStorage>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl IImageRecompress_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RecompressImage(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, cx: i32, cy: i32, iquality: i32, pstg: *mut core::ffi::c_void, ppstrmout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IImageRecompress_Impl::RecompressImage(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&cx), core::mem::transmute_copy(&cy), core::mem::transmute_copy(&iquality), windows_core::from_raw_borrowed(&pstg)) { + match IImageRecompress_Impl::RecompressImage(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&cx), core::mem::transmute_copy(&cy), core::mem::transmute_copy(&iquality), core::mem::transmute_copy(&pstg)) { Ok(ok__) => { ppstrmout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -24845,14 +24845,14 @@ pub struct IInitializeCommand_Vtbl { } #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub trait IInitializeCommand_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pszcommandname: &windows_core::PCWSTR, ppb: Option<&super::super::System::Com::StructuredStorage::IPropertyBag>) -> windows_core::Result<()>; + fn Initialize(&self, pszcommandname: &windows_core::PCWSTR, ppb: windows_core::Ref<'_, super::super::System::Com::StructuredStorage::IPropertyBag>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com_StructuredStorage")] impl IInitializeCommand_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pszcommandname: windows_core::PCWSTR, ppb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInitializeCommand_Impl::Initialize(this, core::mem::transmute(&pszcommandname), windows_core::from_raw_borrowed(&ppb)).into() + IInitializeCommand_Impl::Initialize(this, core::mem::transmute(&pszcommandname), core::mem::transmute_copy(&ppb)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -24950,14 +24950,14 @@ pub struct IInitializeWithBindCtx_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IInitializeWithBindCtx_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pbc: Option<&super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; + fn Initialize(&self, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IInitializeWithBindCtx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInitializeWithBindCtx_Impl::Initialize(this, windows_core::from_raw_borrowed(&pbc)).into() + IInitializeWithBindCtx_Impl::Initialize(this, core::mem::transmute_copy(&pbc)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -24983,13 +24983,13 @@ pub struct IInitializeWithItem_Vtbl { pub Initialize: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait IInitializeWithItem_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psi: Option<&IShellItem>, grfmode: u32) -> windows_core::Result<()>; + fn Initialize(&self, psi: windows_core::Ref<'_, IShellItem>, grfmode: u32) -> windows_core::Result<()>; } impl IInitializeWithItem_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, grfmode: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInitializeWithItem_Impl::Initialize(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&grfmode)).into() + IInitializeWithItem_Impl::Initialize(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&grfmode)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -25019,14 +25019,14 @@ pub struct IInitializeWithPropertyStore_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IInitializeWithPropertyStore_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pps: Option<&PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn Initialize(&self, pps: windows_core::Ref<'_, PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] impl IInitializeWithPropertyStore_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pps: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInitializeWithPropertyStore_Impl::Initialize(this, windows_core::from_raw_borrowed(&pps)).into() + IInitializeWithPropertyStore_Impl::Initialize(this, core::mem::transmute_copy(&pps)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -25183,13 +25183,13 @@ pub struct IInputObjectSite_Vtbl { pub OnFocusChangeIS: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait IInputObjectSite_Impl: windows_core::IUnknownImpl { - fn OnFocusChangeIS(&self, punkobj: Option<&windows_core::IUnknown>, fsetfocus: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnFocusChangeIS(&self, punkobj: windows_core::Ref<'_, windows_core::IUnknown>, fsetfocus: super::super::Foundation::BOOL) -> windows_core::Result<()>; } impl IInputObjectSite_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnFocusChangeIS(this: *mut core::ffi::c_void, punkobj: *mut core::ffi::c_void, fsetfocus: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInputObjectSite_Impl::OnFocusChangeIS(this, windows_core::from_raw_borrowed(&punkobj), core::mem::transmute_copy(&fsetfocus)).into() + IInputObjectSite_Impl::OnFocusChangeIS(this, core::mem::transmute_copy(&punkobj), core::mem::transmute_copy(&fsetfocus)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnFocusChangeIS: OnFocusChangeIS:: } } @@ -25220,14 +25220,14 @@ pub struct IInputPaneAnimationCoordinator_Vtbl { } #[cfg(feature = "Win32_Graphics_DirectComposition")] pub trait IInputPaneAnimationCoordinator_Impl: windows_core::IUnknownImpl { - fn AddAnimation(&self, device: Option<&windows_core::IUnknown>, animation: Option<&super::super::Graphics::DirectComposition::IDCompositionAnimation>) -> windows_core::Result<()>; + fn AddAnimation(&self, device: windows_core::Ref<'_, windows_core::IUnknown>, animation: windows_core::Ref<'_, super::super::Graphics::DirectComposition::IDCompositionAnimation>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_DirectComposition")] impl IInputPaneAnimationCoordinator_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddAnimation(this: *mut core::ffi::c_void, device: *mut core::ffi::c_void, animation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInputPaneAnimationCoordinator_Impl::AddAnimation(this, windows_core::from_raw_borrowed(&device), windows_core::from_raw_borrowed(&animation)).into() + IInputPaneAnimationCoordinator_Impl::AddAnimation(this, core::mem::transmute_copy(&device), core::mem::transmute_copy(&animation)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), AddAnimation: AddAnimation:: } } @@ -25950,13 +25950,13 @@ pub struct ILaunchUIContextProvider_Vtbl { pub UpdateContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ILaunchUIContextProvider_Impl: windows_core::IUnknownImpl { - fn UpdateContext(&self, context: Option<&ILaunchUIContext>) -> windows_core::Result<()>; + fn UpdateContext(&self, context: windows_core::Ref<'_, ILaunchUIContext>) -> windows_core::Result<()>; } impl ILaunchUIContextProvider_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn UpdateContext(this: *mut core::ffi::c_void, context: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILaunchUIContextProvider_Impl::UpdateContext(this, windows_core::from_raw_borrowed(&context)).into() + ILaunchUIContextProvider_Impl::UpdateContext(this, core::mem::transmute_copy(&context)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), UpdateContext: UpdateContext:: } } @@ -26058,7 +26058,7 @@ pub struct IMenuPopup_Vtbl { pub trait IMenuPopup_Impl: IDeskBar_Impl { fn Popup(&self, ppt: *const super::super::Foundation::POINTL, prcexclude: *const super::super::Foundation::RECTL, dwflags: i32) -> windows_core::Result<()>; fn OnSelect(&self, dwselecttype: u32) -> windows_core::Result<()>; - fn SetSubMenu(&self, pmp: Option<&IMenuPopup>, fset: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetSubMenu(&self, pmp: windows_core::Ref<'_, IMenuPopup>, fset: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Ole")] impl IMenuPopup_Vtbl { @@ -26073,7 +26073,7 @@ impl IMenuPopup_Vtbl { } unsafe extern "system" fn SetSubMenu(this: *mut core::ffi::c_void, pmp: *mut core::ffi::c_void, fset: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMenuPopup_Impl::SetSubMenu(this, windows_core::from_raw_borrowed(&pmp), core::mem::transmute_copy(&fset)).into() + IMenuPopup_Impl::SetSubMenu(this, core::mem::transmute_copy(&pmp), core::mem::transmute_copy(&fset)).into() } Self { base__: IDeskBar_Vtbl::new::(), @@ -26155,16 +26155,16 @@ pub struct INameSpaceTreeAccessible_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait INameSpaceTreeAccessible_Impl: windows_core::IUnknownImpl { - fn OnGetDefaultAccessibilityAction(&self, psi: Option<&IShellItem>) -> windows_core::Result; - fn OnDoDefaultAccessibilityAction(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn OnGetAccessibilityRole(&self, psi: Option<&IShellItem>) -> windows_core::Result; + fn OnGetDefaultAccessibilityAction(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; + fn OnDoDefaultAccessibilityAction(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn OnGetAccessibilityRole(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl INameSpaceTreeAccessible_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnGetDefaultAccessibilityAction(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pbstrdefaultaction: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INameSpaceTreeAccessible_Impl::OnGetDefaultAccessibilityAction(this, windows_core::from_raw_borrowed(&psi)) { + match INameSpaceTreeAccessible_Impl::OnGetDefaultAccessibilityAction(this, core::mem::transmute_copy(&psi)) { Ok(ok__) => { pbstrdefaultaction.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -26174,11 +26174,11 @@ impl INameSpaceTreeAccessible_Vtbl { } unsafe extern "system" fn OnDoDefaultAccessibilityAction(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeAccessible_Impl::OnDoDefaultAccessibilityAction(this, windows_core::from_raw_borrowed(&psi)).into() + INameSpaceTreeAccessible_Impl::OnDoDefaultAccessibilityAction(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn OnGetAccessibilityRole(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pvarrole: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INameSpaceTreeAccessible_Impl::OnGetAccessibilityRole(this, windows_core::from_raw_borrowed(&psi)) { + match INameSpaceTreeAccessible_Impl::OnGetAccessibilityRole(this, core::mem::transmute_copy(&psi)) { Ok(ok__) => { pvarrole.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -26331,23 +26331,23 @@ pub struct INameSpaceTreeControl_Vtbl { } pub trait INameSpaceTreeControl_Impl: windows_core::IUnknownImpl { fn Initialize(&self, hwndparent: super::super::Foundation::HWND, prc: *const super::super::Foundation::RECT, nsctsflags: u32) -> windows_core::Result<()>; - fn TreeAdvise(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn TreeAdvise(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn TreeUnadvise(&self, dwcookie: u32) -> windows_core::Result<()>; - fn AppendRoot(&self, psiroot: Option<&IShellItem>, grfenumflags: u32, grfrootstyle: u32, pif: Option<&IShellItemFilter>) -> windows_core::Result<()>; - fn InsertRoot(&self, iindex: i32, psiroot: Option<&IShellItem>, grfenumflags: u32, grfrootstyle: u32, pif: Option<&IShellItemFilter>) -> windows_core::Result<()>; - fn RemoveRoot(&self, psiroot: Option<&IShellItem>) -> windows_core::Result<()>; + fn AppendRoot(&self, psiroot: windows_core::Ref<'_, IShellItem>, grfenumflags: u32, grfrootstyle: u32, pif: windows_core::Ref<'_, IShellItemFilter>) -> windows_core::Result<()>; + fn InsertRoot(&self, iindex: i32, psiroot: windows_core::Ref<'_, IShellItem>, grfenumflags: u32, grfrootstyle: u32, pif: windows_core::Ref<'_, IShellItemFilter>) -> windows_core::Result<()>; + fn RemoveRoot(&self, psiroot: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn RemoveAllRoots(&self) -> windows_core::Result<()>; fn GetRootItems(&self) -> windows_core::Result; - fn SetItemState(&self, psi: Option<&IShellItem>, nstcismask: u32, nstcisflags: u32) -> windows_core::Result<()>; - fn GetItemState(&self, psi: Option<&IShellItem>, nstcismask: u32) -> windows_core::Result; + fn SetItemState(&self, psi: windows_core::Ref<'_, IShellItem>, nstcismask: u32, nstcisflags: u32) -> windows_core::Result<()>; + fn GetItemState(&self, psi: windows_core::Ref<'_, IShellItem>, nstcismask: u32) -> windows_core::Result; fn GetSelectedItems(&self) -> windows_core::Result; - fn GetItemCustomState(&self, psi: Option<&IShellItem>) -> windows_core::Result; - fn SetItemCustomState(&self, psi: Option<&IShellItem>, istatenumber: i32) -> windows_core::Result<()>; - fn EnsureItemVisible(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; + fn GetItemCustomState(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; + fn SetItemCustomState(&self, psi: windows_core::Ref<'_, IShellItem>, istatenumber: i32) -> windows_core::Result<()>; + fn EnsureItemVisible(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn SetTheme(&self, psztheme: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn GetNextItem(&self, psi: Option<&IShellItem>, nstcgi: NSTCGNI) -> windows_core::Result; + fn GetNextItem(&self, psi: windows_core::Ref<'_, IShellItem>, nstcgi: NSTCGNI) -> windows_core::Result; fn HitTest(&self, ppt: *const super::super::Foundation::POINT) -> windows_core::Result; - fn GetItemRect(&self, psi: Option<&IShellItem>) -> windows_core::Result; + fn GetItemRect(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; fn CollapseAll(&self) -> windows_core::Result<()>; } impl INameSpaceTreeControl_Vtbl { @@ -26358,7 +26358,7 @@ impl INameSpaceTreeControl_Vtbl { } unsafe extern "system" fn TreeAdvise(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INameSpaceTreeControl_Impl::TreeAdvise(this, windows_core::from_raw_borrowed(&punk)) { + match INameSpaceTreeControl_Impl::TreeAdvise(this, core::mem::transmute_copy(&punk)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -26372,15 +26372,15 @@ impl INameSpaceTreeControl_Vtbl { } unsafe extern "system" fn AppendRoot(this: *mut core::ffi::c_void, psiroot: *mut core::ffi::c_void, grfenumflags: u32, grfrootstyle: u32, pif: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControl_Impl::AppendRoot(this, windows_core::from_raw_borrowed(&psiroot), core::mem::transmute_copy(&grfenumflags), core::mem::transmute_copy(&grfrootstyle), windows_core::from_raw_borrowed(&pif)).into() + INameSpaceTreeControl_Impl::AppendRoot(this, core::mem::transmute_copy(&psiroot), core::mem::transmute_copy(&grfenumflags), core::mem::transmute_copy(&grfrootstyle), core::mem::transmute_copy(&pif)).into() } unsafe extern "system" fn InsertRoot(this: *mut core::ffi::c_void, iindex: i32, psiroot: *mut core::ffi::c_void, grfenumflags: u32, grfrootstyle: u32, pif: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControl_Impl::InsertRoot(this, core::mem::transmute_copy(&iindex), windows_core::from_raw_borrowed(&psiroot), core::mem::transmute_copy(&grfenumflags), core::mem::transmute_copy(&grfrootstyle), windows_core::from_raw_borrowed(&pif)).into() + INameSpaceTreeControl_Impl::InsertRoot(this, core::mem::transmute_copy(&iindex), core::mem::transmute_copy(&psiroot), core::mem::transmute_copy(&grfenumflags), core::mem::transmute_copy(&grfrootstyle), core::mem::transmute_copy(&pif)).into() } unsafe extern "system" fn RemoveRoot(this: *mut core::ffi::c_void, psiroot: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControl_Impl::RemoveRoot(this, windows_core::from_raw_borrowed(&psiroot)).into() + INameSpaceTreeControl_Impl::RemoveRoot(this, core::mem::transmute_copy(&psiroot)).into() } unsafe extern "system" fn RemoveAllRoots(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -26398,11 +26398,11 @@ impl INameSpaceTreeControl_Vtbl { } unsafe extern "system" fn SetItemState(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, nstcismask: u32, nstcisflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControl_Impl::SetItemState(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&nstcismask), core::mem::transmute_copy(&nstcisflags)).into() + INameSpaceTreeControl_Impl::SetItemState(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&nstcismask), core::mem::transmute_copy(&nstcisflags)).into() } unsafe extern "system" fn GetItemState(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, nstcismask: u32, pnstcisflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INameSpaceTreeControl_Impl::GetItemState(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&nstcismask)) { + match INameSpaceTreeControl_Impl::GetItemState(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&nstcismask)) { Ok(ok__) => { pnstcisflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -26422,7 +26422,7 @@ impl INameSpaceTreeControl_Vtbl { } unsafe extern "system" fn GetItemCustomState(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pistatenumber: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INameSpaceTreeControl_Impl::GetItemCustomState(this, windows_core::from_raw_borrowed(&psi)) { + match INameSpaceTreeControl_Impl::GetItemCustomState(this, core::mem::transmute_copy(&psi)) { Ok(ok__) => { pistatenumber.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -26432,11 +26432,11 @@ impl INameSpaceTreeControl_Vtbl { } unsafe extern "system" fn SetItemCustomState(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, istatenumber: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControl_Impl::SetItemCustomState(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&istatenumber)).into() + INameSpaceTreeControl_Impl::SetItemCustomState(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&istatenumber)).into() } unsafe extern "system" fn EnsureItemVisible(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControl_Impl::EnsureItemVisible(this, windows_core::from_raw_borrowed(&psi)).into() + INameSpaceTreeControl_Impl::EnsureItemVisible(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn SetTheme(this: *mut core::ffi::c_void, psztheme: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -26444,7 +26444,7 @@ impl INameSpaceTreeControl_Vtbl { } unsafe extern "system" fn GetNextItem(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, nstcgi: NSTCGNI, ppsinext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INameSpaceTreeControl_Impl::GetNextItem(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&nstcgi)) { + match INameSpaceTreeControl_Impl::GetNextItem(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&nstcgi)) { Ok(ok__) => { ppsinext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -26464,7 +26464,7 @@ impl INameSpaceTreeControl_Vtbl { } unsafe extern "system" fn GetItemRect(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, prect: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match INameSpaceTreeControl_Impl::GetItemRect(this, windows_core::from_raw_borrowed(&psi)) { + match INameSpaceTreeControl_Impl::GetItemRect(this, core::mem::transmute_copy(&psi)) { Ok(ok__) => { prect.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -26728,38 +26728,38 @@ pub struct INameSpaceTreeControlDropHandler_Vtbl { pub OnDragLeave: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait INameSpaceTreeControlDropHandler_Impl: windows_core::IUnknownImpl { - fn OnDragEnter(&self, psiover: Option<&IShellItem>, psiadata: Option<&IShellItemArray>, foutsidesource: super::super::Foundation::BOOL, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()>; - fn OnDragOver(&self, psiover: Option<&IShellItem>, psiadata: Option<&IShellItemArray>, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()>; - fn OnDragPosition(&self, psiover: Option<&IShellItem>, psiadata: Option<&IShellItemArray>, inewposition: i32, ioldposition: i32) -> windows_core::Result<()>; - fn OnDrop(&self, psiover: Option<&IShellItem>, psiadata: Option<&IShellItemArray>, iposition: i32, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()>; - fn OnDropPosition(&self, psiover: Option<&IShellItem>, psiadata: Option<&IShellItemArray>, inewposition: i32, ioldposition: i32) -> windows_core::Result<()>; - fn OnDragLeave(&self, psiover: Option<&IShellItem>) -> windows_core::Result<()>; + fn OnDragEnter(&self, psiover: windows_core::Ref<'_, IShellItem>, psiadata: windows_core::Ref<'_, IShellItemArray>, foutsidesource: super::super::Foundation::BOOL, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()>; + fn OnDragOver(&self, psiover: windows_core::Ref<'_, IShellItem>, psiadata: windows_core::Ref<'_, IShellItemArray>, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()>; + fn OnDragPosition(&self, psiover: windows_core::Ref<'_, IShellItem>, psiadata: windows_core::Ref<'_, IShellItemArray>, inewposition: i32, ioldposition: i32) -> windows_core::Result<()>; + fn OnDrop(&self, psiover: windows_core::Ref<'_, IShellItem>, psiadata: windows_core::Ref<'_, IShellItemArray>, iposition: i32, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::Result<()>; + fn OnDropPosition(&self, psiover: windows_core::Ref<'_, IShellItem>, psiadata: windows_core::Ref<'_, IShellItemArray>, inewposition: i32, ioldposition: i32) -> windows_core::Result<()>; + fn OnDragLeave(&self, psiover: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; } impl INameSpaceTreeControlDropHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnDragEnter(this: *mut core::ffi::c_void, psiover: *mut core::ffi::c_void, psiadata: *mut core::ffi::c_void, foutsidesource: super::super::Foundation::BOOL, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlDropHandler_Impl::OnDragEnter(this, windows_core::from_raw_borrowed(&psiover), windows_core::from_raw_borrowed(&psiadata), core::mem::transmute_copy(&foutsidesource), core::mem::transmute_copy(&grfkeystate), core::mem::transmute_copy(&pdweffect)).into() + INameSpaceTreeControlDropHandler_Impl::OnDragEnter(this, core::mem::transmute_copy(&psiover), core::mem::transmute_copy(&psiadata), core::mem::transmute_copy(&foutsidesource), core::mem::transmute_copy(&grfkeystate), core::mem::transmute_copy(&pdweffect)).into() } unsafe extern "system" fn OnDragOver(this: *mut core::ffi::c_void, psiover: *mut core::ffi::c_void, psiadata: *mut core::ffi::c_void, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlDropHandler_Impl::OnDragOver(this, windows_core::from_raw_borrowed(&psiover), windows_core::from_raw_borrowed(&psiadata), core::mem::transmute_copy(&grfkeystate), core::mem::transmute_copy(&pdweffect)).into() + INameSpaceTreeControlDropHandler_Impl::OnDragOver(this, core::mem::transmute_copy(&psiover), core::mem::transmute_copy(&psiadata), core::mem::transmute_copy(&grfkeystate), core::mem::transmute_copy(&pdweffect)).into() } unsafe extern "system" fn OnDragPosition(this: *mut core::ffi::c_void, psiover: *mut core::ffi::c_void, psiadata: *mut core::ffi::c_void, inewposition: i32, ioldposition: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlDropHandler_Impl::OnDragPosition(this, windows_core::from_raw_borrowed(&psiover), windows_core::from_raw_borrowed(&psiadata), core::mem::transmute_copy(&inewposition), core::mem::transmute_copy(&ioldposition)).into() + INameSpaceTreeControlDropHandler_Impl::OnDragPosition(this, core::mem::transmute_copy(&psiover), core::mem::transmute_copy(&psiadata), core::mem::transmute_copy(&inewposition), core::mem::transmute_copy(&ioldposition)).into() } unsafe extern "system" fn OnDrop(this: *mut core::ffi::c_void, psiover: *mut core::ffi::c_void, psiadata: *mut core::ffi::c_void, iposition: i32, grfkeystate: u32, pdweffect: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlDropHandler_Impl::OnDrop(this, windows_core::from_raw_borrowed(&psiover), windows_core::from_raw_borrowed(&psiadata), core::mem::transmute_copy(&iposition), core::mem::transmute_copy(&grfkeystate), core::mem::transmute_copy(&pdweffect)).into() + INameSpaceTreeControlDropHandler_Impl::OnDrop(this, core::mem::transmute_copy(&psiover), core::mem::transmute_copy(&psiadata), core::mem::transmute_copy(&iposition), core::mem::transmute_copy(&grfkeystate), core::mem::transmute_copy(&pdweffect)).into() } unsafe extern "system" fn OnDropPosition(this: *mut core::ffi::c_void, psiover: *mut core::ffi::c_void, psiadata: *mut core::ffi::c_void, inewposition: i32, ioldposition: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlDropHandler_Impl::OnDropPosition(this, windows_core::from_raw_borrowed(&psiover), windows_core::from_raw_borrowed(&psiadata), core::mem::transmute_copy(&inewposition), core::mem::transmute_copy(&ioldposition)).into() + INameSpaceTreeControlDropHandler_Impl::OnDropPosition(this, core::mem::transmute_copy(&psiover), core::mem::transmute_copy(&psiadata), core::mem::transmute_copy(&inewposition), core::mem::transmute_copy(&ioldposition)).into() } unsafe extern "system" fn OnDragLeave(this: *mut core::ffi::c_void, psiover: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlDropHandler_Impl::OnDragLeave(this, windows_core::from_raw_borrowed(&psiover)).into() + INameSpaceTreeControlDropHandler_Impl::OnDragLeave(this, core::mem::transmute_copy(&psiover)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -26909,46 +26909,46 @@ pub struct INameSpaceTreeControlEvents_Vtbl { pub OnGetDefaultIconIndex: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut i32, *mut i32) -> windows_core::HRESULT, } pub trait INameSpaceTreeControlEvents_Impl: windows_core::IUnknownImpl { - fn OnItemClick(&self, psi: Option<&IShellItem>, nstcehittest: u32, nstceclicktype: u32) -> windows_core::Result<()>; - fn OnPropertyItemCommit(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn OnItemStateChanging(&self, psi: Option<&IShellItem>, nstcismask: u32, nstcisstate: u32) -> windows_core::Result<()>; - fn OnItemStateChanged(&self, psi: Option<&IShellItem>, nstcismask: u32, nstcisstate: u32) -> windows_core::Result<()>; - fn OnSelectionChanged(&self, psiaselection: Option<&IShellItemArray>) -> windows_core::Result<()>; + fn OnItemClick(&self, psi: windows_core::Ref<'_, IShellItem>, nstcehittest: u32, nstceclicktype: u32) -> windows_core::Result<()>; + fn OnPropertyItemCommit(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn OnItemStateChanging(&self, psi: windows_core::Ref<'_, IShellItem>, nstcismask: u32, nstcisstate: u32) -> windows_core::Result<()>; + fn OnItemStateChanged(&self, psi: windows_core::Ref<'_, IShellItem>, nstcismask: u32, nstcisstate: u32) -> windows_core::Result<()>; + fn OnSelectionChanged(&self, psiaselection: windows_core::Ref<'_, IShellItemArray>) -> windows_core::Result<()>; fn OnKeyboardInput(&self, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; - fn OnBeforeExpand(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn OnAfterExpand(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn OnBeginLabelEdit(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn OnEndLabelEdit(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn OnGetToolTip(&self, psi: Option<&IShellItem>, psztip: windows_core::PWSTR, cchtip: i32) -> windows_core::Result<()>; - fn OnBeforeItemDelete(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn OnItemAdded(&self, psi: Option<&IShellItem>, fisroot: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn OnItemDeleted(&self, psi: Option<&IShellItem>, fisroot: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn OnBeforeContextMenu(&self, psi: Option<&IShellItem>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn OnAfterContextMenu(&self, psi: Option<&IShellItem>, pcmin: Option<&IContextMenu>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn OnBeforeStateImageChange(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn OnGetDefaultIconIndex(&self, psi: Option<&IShellItem>, pidefaulticon: *mut i32, piopenicon: *mut i32) -> windows_core::Result<()>; + fn OnBeforeExpand(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn OnAfterExpand(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn OnBeginLabelEdit(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn OnEndLabelEdit(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn OnGetToolTip(&self, psi: windows_core::Ref<'_, IShellItem>, psztip: windows_core::PWSTR, cchtip: i32) -> windows_core::Result<()>; + fn OnBeforeItemDelete(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn OnItemAdded(&self, psi: windows_core::Ref<'_, IShellItem>, fisroot: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnItemDeleted(&self, psi: windows_core::Ref<'_, IShellItem>, fisroot: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn OnBeforeContextMenu(&self, psi: windows_core::Ref<'_, IShellItem>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn OnAfterContextMenu(&self, psi: windows_core::Ref<'_, IShellItem>, pcmin: windows_core::Ref<'_, IContextMenu>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn OnBeforeStateImageChange(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn OnGetDefaultIconIndex(&self, psi: windows_core::Ref<'_, IShellItem>, pidefaulticon: *mut i32, piopenicon: *mut i32) -> windows_core::Result<()>; } impl INameSpaceTreeControlEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnItemClick(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, nstcehittest: u32, nstceclicktype: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnItemClick(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&nstcehittest), core::mem::transmute_copy(&nstceclicktype)).into() + INameSpaceTreeControlEvents_Impl::OnItemClick(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&nstcehittest), core::mem::transmute_copy(&nstceclicktype)).into() } unsafe extern "system" fn OnPropertyItemCommit(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnPropertyItemCommit(this, windows_core::from_raw_borrowed(&psi)).into() + INameSpaceTreeControlEvents_Impl::OnPropertyItemCommit(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn OnItemStateChanging(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, nstcismask: u32, nstcisstate: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnItemStateChanging(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&nstcismask), core::mem::transmute_copy(&nstcisstate)).into() + INameSpaceTreeControlEvents_Impl::OnItemStateChanging(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&nstcismask), core::mem::transmute_copy(&nstcisstate)).into() } unsafe extern "system" fn OnItemStateChanged(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, nstcismask: u32, nstcisstate: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnItemStateChanged(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&nstcismask), core::mem::transmute_copy(&nstcisstate)).into() + INameSpaceTreeControlEvents_Impl::OnItemStateChanged(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&nstcismask), core::mem::transmute_copy(&nstcisstate)).into() } unsafe extern "system" fn OnSelectionChanged(this: *mut core::ffi::c_void, psiaselection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnSelectionChanged(this, windows_core::from_raw_borrowed(&psiaselection)).into() + INameSpaceTreeControlEvents_Impl::OnSelectionChanged(this, core::mem::transmute_copy(&psiaselection)).into() } unsafe extern "system" fn OnKeyboardInput(this: *mut core::ffi::c_void, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -26956,51 +26956,51 @@ impl INameSpaceTreeControlEvents_Vtbl { } unsafe extern "system" fn OnBeforeExpand(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnBeforeExpand(this, windows_core::from_raw_borrowed(&psi)).into() + INameSpaceTreeControlEvents_Impl::OnBeforeExpand(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn OnAfterExpand(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnAfterExpand(this, windows_core::from_raw_borrowed(&psi)).into() + INameSpaceTreeControlEvents_Impl::OnAfterExpand(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn OnBeginLabelEdit(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnBeginLabelEdit(this, windows_core::from_raw_borrowed(&psi)).into() + INameSpaceTreeControlEvents_Impl::OnBeginLabelEdit(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn OnEndLabelEdit(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnEndLabelEdit(this, windows_core::from_raw_borrowed(&psi)).into() + INameSpaceTreeControlEvents_Impl::OnEndLabelEdit(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn OnGetToolTip(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, psztip: windows_core::PWSTR, cchtip: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnGetToolTip(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&psztip), core::mem::transmute_copy(&cchtip)).into() + INameSpaceTreeControlEvents_Impl::OnGetToolTip(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&psztip), core::mem::transmute_copy(&cchtip)).into() } unsafe extern "system" fn OnBeforeItemDelete(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnBeforeItemDelete(this, windows_core::from_raw_borrowed(&psi)).into() + INameSpaceTreeControlEvents_Impl::OnBeforeItemDelete(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn OnItemAdded(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, fisroot: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnItemAdded(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&fisroot)).into() + INameSpaceTreeControlEvents_Impl::OnItemAdded(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&fisroot)).into() } unsafe extern "system" fn OnItemDeleted(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, fisroot: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnItemDeleted(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&fisroot)).into() + INameSpaceTreeControlEvents_Impl::OnItemDeleted(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&fisroot)).into() } unsafe extern "system" fn OnBeforeContextMenu(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnBeforeContextMenu(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + INameSpaceTreeControlEvents_Impl::OnBeforeContextMenu(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn OnAfterContextMenu(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pcmin: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnAfterContextMenu(this, windows_core::from_raw_borrowed(&psi), windows_core::from_raw_borrowed(&pcmin), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + INameSpaceTreeControlEvents_Impl::OnAfterContextMenu(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&pcmin), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn OnBeforeStateImageChange(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnBeforeStateImageChange(this, windows_core::from_raw_borrowed(&psi)).into() + INameSpaceTreeControlEvents_Impl::OnBeforeStateImageChange(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn OnGetDefaultIconIndex(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pidefaulticon: *mut i32, piopenicon: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INameSpaceTreeControlEvents_Impl::OnGetDefaultIconIndex(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&pidefaulticon), core::mem::transmute_copy(&piopenicon)).into() + INameSpaceTreeControlEvents_Impl::OnGetDefaultIconIndex(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&pidefaulticon), core::mem::transmute_copy(&piopenicon)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -27164,7 +27164,7 @@ pub struct INamespaceWalk_Vtbl { } #[cfg(feature = "Win32_UI_Shell_Common")] pub trait INamespaceWalk_Impl: windows_core::IUnknownImpl { - fn Walk(&self, punktowalk: Option<&windows_core::IUnknown>, dwflags: u32, cdepth: i32, pnswcb: Option<&INamespaceWalkCB>) -> windows_core::Result<()>; + fn Walk(&self, punktowalk: windows_core::Ref<'_, windows_core::IUnknown>, dwflags: u32, cdepth: i32, pnswcb: windows_core::Ref<'_, INamespaceWalkCB>) -> windows_core::Result<()>; fn GetIDArrayResult(&self, pcitems: *mut u32, prgpidl: *mut *mut *mut Common::ITEMIDLIST) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_Common")] @@ -27172,7 +27172,7 @@ impl INamespaceWalk_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Walk(this: *mut core::ffi::c_void, punktowalk: *mut core::ffi::c_void, dwflags: u32, cdepth: i32, pnswcb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INamespaceWalk_Impl::Walk(this, windows_core::from_raw_borrowed(&punktowalk), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&cdepth), windows_core::from_raw_borrowed(&pnswcb)).into() + INamespaceWalk_Impl::Walk(this, core::mem::transmute_copy(&punktowalk), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&cdepth), core::mem::transmute_copy(&pnswcb)).into() } unsafe extern "system" fn GetIDArrayResult(this: *mut core::ffi::c_void, pcitems: *mut u32, prgpidl: *mut *mut *mut Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -27237,9 +27237,9 @@ pub struct INamespaceWalkCB_Vtbl { } #[cfg(feature = "Win32_UI_Shell_Common")] pub trait INamespaceWalkCB_Impl: windows_core::IUnknownImpl { - fn FoundItem(&self, psf: Option<&IShellFolder>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; - fn EnterFolder(&self, psf: Option<&IShellFolder>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; - fn LeaveFolder(&self, psf: Option<&IShellFolder>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; + fn FoundItem(&self, psf: windows_core::Ref<'_, IShellFolder>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; + fn EnterFolder(&self, psf: windows_core::Ref<'_, IShellFolder>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; + fn LeaveFolder(&self, psf: windows_core::Ref<'_, IShellFolder>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; fn InitializeProgressDialog(&self, ppsztitle: *mut windows_core::PWSTR, ppszcancel: *mut windows_core::PWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_Common")] @@ -27247,15 +27247,15 @@ impl INamespaceWalkCB_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FoundItem(this: *mut core::ffi::c_void, psf: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INamespaceWalkCB_Impl::FoundItem(this, windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&pidl)).into() + INamespaceWalkCB_Impl::FoundItem(this, core::mem::transmute_copy(&psf), core::mem::transmute_copy(&pidl)).into() } unsafe extern "system" fn EnterFolder(this: *mut core::ffi::c_void, psf: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INamespaceWalkCB_Impl::EnterFolder(this, windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&pidl)).into() + INamespaceWalkCB_Impl::EnterFolder(this, core::mem::transmute_copy(&psf), core::mem::transmute_copy(&pidl)).into() } unsafe extern "system" fn LeaveFolder(this: *mut core::ffi::c_void, psf: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - INamespaceWalkCB_Impl::LeaveFolder(this, windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&pidl)).into() + INamespaceWalkCB_Impl::LeaveFolder(this, core::mem::transmute_copy(&psf), core::mem::transmute_copy(&pidl)).into() } unsafe extern "system" fn InitializeProgressDialog(this: *mut core::ffi::c_void, ppsztitle: *mut windows_core::PWSTR, ppszcancel: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -27718,7 +27718,7 @@ pub struct INotifyReplica_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait INotifyReplica_Impl: windows_core::IUnknownImpl { - fn YouAreAReplica(&self, ulcotherreplicas: u32, rgpmkotherreplicas: *mut Option) -> windows_core::Result<()>; + fn YouAreAReplica(&self, ulcotherreplicas: u32, rgpmkotherreplicas: windows_core::OutRef<'_, super::super::System::Com::IMoniker>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl INotifyReplica_Vtbl { @@ -27758,18 +27758,18 @@ pub struct IObjMgr_Vtbl { pub Remove: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IObjMgr_Impl: windows_core::IUnknownImpl { - fn Append(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn Remove(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Append(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn Remove(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IObjMgr_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Append(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjMgr_Impl::Append(this, windows_core::from_raw_borrowed(&punk)).into() + IObjMgr_Impl::Append(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjMgr_Impl::Remove(this, windows_core::from_raw_borrowed(&punk)).into() + IObjMgr_Impl::Remove(this, core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Append: Append::, Remove: Remove:: } } @@ -28039,14 +28039,14 @@ pub struct IObjectWithSelection_Vtbl { pub GetSelection: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IObjectWithSelection_Impl: windows_core::IUnknownImpl { - fn SetSelection(&self, psia: Option<&IShellItemArray>) -> windows_core::Result<()>; + fn SetSelection(&self, psia: windows_core::Ref<'_, IShellItemArray>) -> windows_core::Result<()>; fn GetSelection(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IObjectWithSelection_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSelection(this: *mut core::ffi::c_void, psia: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IObjectWithSelection_Impl::SetSelection(this, windows_core::from_raw_borrowed(&psia)).into() + IObjectWithSelection_Impl::SetSelection(this, core::mem::transmute_copy(&psia)).into() } unsafe extern "system" fn GetSelection(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28093,7 +28093,7 @@ pub struct IOpenControlPanel_Vtbl { pub GetCurrentView: unsafe extern "system" fn(*mut core::ffi::c_void, *mut CPVIEW) -> windows_core::HRESULT, } pub trait IOpenControlPanel_Impl: windows_core::IUnknownImpl { - fn Open(&self, pszname: &windows_core::PCWSTR, pszpage: &windows_core::PCWSTR, punksite: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Open(&self, pszname: &windows_core::PCWSTR, pszpage: &windows_core::PCWSTR, punksite: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetPath(&self, pszname: &windows_core::PCWSTR, pszpath: windows_core::PWSTR, cchpath: u32) -> windows_core::Result<()>; fn GetCurrentView(&self) -> windows_core::Result; } @@ -28101,7 +28101,7 @@ impl IOpenControlPanel_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Open(this: *mut core::ffi::c_void, pszname: windows_core::PCWSTR, pszpage: windows_core::PCWSTR, punksite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpenControlPanel_Impl::Open(this, core::mem::transmute(&pszname), core::mem::transmute(&pszpage), windows_core::from_raw_borrowed(&punksite)).into() + IOpenControlPanel_Impl::Open(this, core::mem::transmute(&pszname), core::mem::transmute(&pszpage), core::mem::transmute_copy(&punksite)).into() } unsafe extern "system" fn GetPath(this: *mut core::ffi::c_void, pszname: windows_core::PCWSTR, pszpath: windows_core::PWSTR, cchpath: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28231,7 +28231,7 @@ pub trait IOperationsProgressDialog_Impl: windows_core::IUnknownImpl { fn SetOperation(&self, action: SPACTION) -> windows_core::Result<()>; fn SetMode(&self, mode: u32) -> windows_core::Result<()>; fn UpdateProgress(&self, ullpointscurrent: u64, ullpointstotal: u64, ullsizecurrent: u64, ullsizetotal: u64, ullitemscurrent: u64, ullitemstotal: u64) -> windows_core::Result<()>; - fn UpdateLocations(&self, psisource: Option<&IShellItem>, psitarget: Option<&IShellItem>, psiitem: Option<&IShellItem>) -> windows_core::Result<()>; + fn UpdateLocations(&self, psisource: windows_core::Ref<'_, IShellItem>, psitarget: windows_core::Ref<'_, IShellItem>, psiitem: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn ResetTimer(&self) -> windows_core::Result<()>; fn PauseTimer(&self) -> windows_core::Result<()>; fn ResumeTimer(&self) -> windows_core::Result<()>; @@ -28263,7 +28263,7 @@ impl IOperationsProgressDialog_Vtbl { } unsafe extern "system" fn UpdateLocations(this: *mut core::ffi::c_void, psisource: *mut core::ffi::c_void, psitarget: *mut core::ffi::c_void, psiitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOperationsProgressDialog_Impl::UpdateLocations(this, windows_core::from_raw_borrowed(&psisource), windows_core::from_raw_borrowed(&psitarget), windows_core::from_raw_borrowed(&psiitem)).into() + IOperationsProgressDialog_Impl::UpdateLocations(this, core::mem::transmute_copy(&psisource), core::mem::transmute_copy(&psitarget), core::mem::transmute_copy(&psiitem)).into() } unsafe extern "system" fn ResetTimer(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28435,7 +28435,7 @@ pub trait IPackageDebugSettings_Impl: windows_core::IUnknownImpl { fn StartSessionRedirection(&self, packagefullname: &windows_core::PCWSTR, sessionid: u32) -> windows_core::Result<()>; fn StopSessionRedirection(&self, packagefullname: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetPackageExecutionState(&self, packagefullname: &windows_core::PCWSTR) -> windows_core::Result; - fn RegisterForPackageStateChanges(&self, packagefullname: &windows_core::PCWSTR, ppackageexecutionstatechangenotification: Option<&IPackageExecutionStateChangeNotification>) -> windows_core::Result; + fn RegisterForPackageStateChanges(&self, packagefullname: &windows_core::PCWSTR, ppackageexecutionstatechangenotification: windows_core::Ref<'_, IPackageExecutionStateChangeNotification>) -> windows_core::Result; fn UnregisterForPackageStateChanges(&self, dwcookie: u32) -> windows_core::Result<()>; } impl IPackageDebugSettings_Vtbl { @@ -28500,7 +28500,7 @@ impl IPackageDebugSettings_Vtbl { } unsafe extern "system" fn RegisterForPackageStateChanges(this: *mut core::ffi::c_void, packagefullname: windows_core::PCWSTR, ppackageexecutionstatechangenotification: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IPackageDebugSettings_Impl::RegisterForPackageStateChanges(this, core::mem::transmute(&packagefullname), windows_core::from_raw_borrowed(&ppackageexecutionstatechangenotification)) { + match IPackageDebugSettings_Impl::RegisterForPackageStateChanges(this, core::mem::transmute(&packagefullname), core::mem::transmute_copy(&ppackageexecutionstatechangenotification)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -28633,15 +28633,15 @@ pub struct IParentAndItem_Vtbl { } #[cfg(feature = "Win32_UI_Shell_Common")] pub trait IParentAndItem_Impl: windows_core::IUnknownImpl { - fn SetParentAndItem(&self, pidlparent: *const Common::ITEMIDLIST, psf: Option<&IShellFolder>, pidlchild: *const Common::ITEMIDLIST) -> windows_core::Result<()>; - fn GetParentAndItem(&self, ppidlparent: *mut *mut Common::ITEMIDLIST, ppsf: *mut Option, ppidlchild: *mut *mut Common::ITEMIDLIST) -> windows_core::Result<()>; + fn SetParentAndItem(&self, pidlparent: *const Common::ITEMIDLIST, psf: windows_core::Ref<'_, IShellFolder>, pidlchild: *const Common::ITEMIDLIST) -> windows_core::Result<()>; + fn GetParentAndItem(&self, ppidlparent: *mut *mut Common::ITEMIDLIST, ppsf: windows_core::OutRef<'_, IShellFolder>, ppidlchild: *mut *mut Common::ITEMIDLIST) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_Common")] impl IParentAndItem_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetParentAndItem(this: *mut core::ffi::c_void, pidlparent: *const Common::ITEMIDLIST, psf: *mut core::ffi::c_void, pidlchild: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IParentAndItem_Impl::SetParentAndItem(this, core::mem::transmute_copy(&pidlparent), windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&pidlchild)).into() + IParentAndItem_Impl::SetParentAndItem(this, core::mem::transmute_copy(&pidlparent), core::mem::transmute_copy(&psf), core::mem::transmute_copy(&pidlchild)).into() } unsafe extern "system" fn GetParentAndItem(this: *mut core::ffi::c_void, ppidlparent: *mut *mut Common::ITEMIDLIST, ppsf: *mut *mut core::ffi::c_void, ppidlchild: *mut *mut Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28683,14 +28683,14 @@ pub struct IParseAndCreateItem_Vtbl { pub GetItem: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IParseAndCreateItem_Impl: windows_core::IUnknownImpl { - fn SetItem(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; + fn SetItem(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn GetItem(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } impl IParseAndCreateItem_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetItem(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IParseAndCreateItem_Impl::SetItem(this, windows_core::from_raw_borrowed(&psi)).into() + IParseAndCreateItem_Impl::SetItem(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn GetItem(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -28842,7 +28842,7 @@ pub struct IPersistFolder3_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] pub trait IPersistFolder3_Impl: IPersistFolder2_Impl { - fn InitializeEx(&self, pbc: Option<&super::super::System::Com::IBindCtx>, pidlroot: *const Common::ITEMIDLIST, ppfti: *const PERSIST_FOLDER_TARGET_INFO) -> windows_core::Result<()>; + fn InitializeEx(&self, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, pidlroot: *const Common::ITEMIDLIST, ppfti: *const PERSIST_FOLDER_TARGET_INFO) -> windows_core::Result<()>; fn GetFolderTargetInfo(&self, ppfti: *mut PERSIST_FOLDER_TARGET_INFO) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] @@ -28850,7 +28850,7 @@ impl IPersistFolder3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeEx(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pidlroot: *const Common::ITEMIDLIST, ppfti: *const PERSIST_FOLDER_TARGET_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistFolder3_Impl::InitializeEx(this, windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&pidlroot), core::mem::transmute_copy(&ppfti)).into() + IPersistFolder3_Impl::InitializeEx(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pidlroot), core::mem::transmute_copy(&ppfti)).into() } unsafe extern "system" fn GetFolderTargetInfo(this: *mut core::ffi::c_void, ppfti: *mut PERSIST_FOLDER_TARGET_INFO) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29249,7 +29249,7 @@ pub struct IProfferService_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IProfferService_Impl: windows_core::IUnknownImpl { - fn ProfferService(&self, serviceid: *const windows_core::GUID, serviceprovider: Option<&super::super::System::Com::IServiceProvider>) -> windows_core::Result; + fn ProfferService(&self, serviceid: *const windows_core::GUID, serviceprovider: windows_core::Ref<'_, super::super::System::Com::IServiceProvider>) -> windows_core::Result; fn RevokeService(&self, cookie: u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -29257,7 +29257,7 @@ impl IProfferService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ProfferService(this: *mut core::ffi::c_void, serviceid: *const windows_core::GUID, serviceprovider: *mut core::ffi::c_void, cookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IProfferService_Impl::ProfferService(this, core::mem::transmute_copy(&serviceid), windows_core::from_raw_borrowed(&serviceprovider)) { + match IProfferService_Impl::ProfferService(this, core::mem::transmute_copy(&serviceid), core::mem::transmute_copy(&serviceprovider)) { Ok(ok__) => { cookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -29342,7 +29342,7 @@ pub struct IProgressDialog_Vtbl { pub Timer: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const core::ffi::c_void) -> windows_core::HRESULT, } pub trait IProgressDialog_Impl: windows_core::IUnknownImpl { - fn StartProgressDialog(&self, hwndparent: super::super::Foundation::HWND, punkenablemodless: Option<&windows_core::IUnknown>, dwflags: u32, pvresevered: *const core::ffi::c_void) -> windows_core::Result<()>; + fn StartProgressDialog(&self, hwndparent: super::super::Foundation::HWND, punkenablemodless: windows_core::Ref<'_, windows_core::IUnknown>, dwflags: u32, pvresevered: *const core::ffi::c_void) -> windows_core::Result<()>; fn StopProgressDialog(&self) -> windows_core::Result<()>; fn SetTitle(&self, pwztitle: &windows_core::PCWSTR) -> windows_core::Result<()>; fn SetAnimation(&self, hinstanimation: super::super::Foundation::HINSTANCE, idanimation: u32) -> windows_core::Result<()>; @@ -29357,7 +29357,7 @@ impl IProgressDialog_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartProgressDialog(this: *mut core::ffi::c_void, hwndparent: super::super::Foundation::HWND, punkenablemodless: *mut core::ffi::c_void, dwflags: u32, pvresevered: *const core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IProgressDialog_Impl::StartProgressDialog(this, core::mem::transmute_copy(&hwndparent), windows_core::from_raw_borrowed(&punkenablemodless), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pvresevered)).into() + IProgressDialog_Impl::StartProgressDialog(this, core::mem::transmute_copy(&hwndparent), core::mem::transmute_copy(&punkenablemodless), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pvresevered)).into() } unsafe extern "system" fn StopProgressDialog(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -29629,15 +29629,15 @@ pub struct IPublishingWizard_Vtbl { } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com", feature = "Win32_UI_Controls"))] pub trait IPublishingWizard_Impl: IWizardExtension_Impl { - fn Initialize(&self, pdo: Option<&super::super::System::Com::IDataObject>, dwoptions: u32, pszservicescope: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn GetTransferManifest(&self, phrfromtransfer: *mut windows_core::HRESULT, pdocmanifest: *mut Option) -> windows_core::Result<()>; + fn Initialize(&self, pdo: windows_core::Ref<'_, super::super::System::Com::IDataObject>, dwoptions: u32, pszservicescope: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn GetTransferManifest(&self, phrfromtransfer: *mut windows_core::HRESULT, pdocmanifest: windows_core::OutRef<'_, super::super::Data::Xml::MsXml::IXMLDOMDocument>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com", feature = "Win32_UI_Controls"))] impl IPublishingWizard_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pdo: *mut core::ffi::c_void, dwoptions: u32, pszservicescope: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPublishingWizard_Impl::Initialize(this, windows_core::from_raw_borrowed(&pdo), core::mem::transmute_copy(&dwoptions), core::mem::transmute(&pszservicescope)).into() + IPublishingWizard_Impl::Initialize(this, core::mem::transmute_copy(&pdo), core::mem::transmute_copy(&dwoptions), core::mem::transmute(&pszservicescope)).into() } unsafe extern "system" fn GetTransferManifest(this: *mut core::ffi::c_void, phrfromtransfer: *mut windows_core::HRESULT, pdocmanifest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30121,13 +30121,13 @@ pub struct IResolveShellLink_Vtbl { pub ResolveShellLink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::HWND, u32) -> windows_core::HRESULT, } pub trait IResolveShellLink_Impl: windows_core::IUnknownImpl { - fn ResolveShellLink(&self, punklink: Option<&windows_core::IUnknown>, hwnd: super::super::Foundation::HWND, fflags: u32) -> windows_core::Result<()>; + fn ResolveShellLink(&self, punklink: windows_core::Ref<'_, windows_core::IUnknown>, hwnd: super::super::Foundation::HWND, fflags: u32) -> windows_core::Result<()>; } impl IResolveShellLink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ResolveShellLink(this: *mut core::ffi::c_void, punklink: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, fflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResolveShellLink_Impl::ResolveShellLink(this, windows_core::from_raw_borrowed(&punklink), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&fflags)).into() + IResolveShellLink_Impl::ResolveShellLink(this, core::mem::transmute_copy(&punklink), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&fflags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ResolveShellLink: ResolveShellLink:: } } @@ -30180,9 +30180,9 @@ pub struct IResultsFolder_Vtbl { } #[cfg(feature = "Win32_UI_Shell_Common")] pub trait IResultsFolder_Impl: windows_core::IUnknownImpl { - fn AddItem(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; + fn AddItem(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn AddIDList(&self, pidl: *const Common::ITEMIDLIST, ppidladded: *mut *mut Common::ITEMIDLIST) -> windows_core::Result<()>; - fn RemoveItem(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; + fn RemoveItem(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn RemoveIDList(&self, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; fn RemoveAll(&self) -> windows_core::Result<()>; } @@ -30191,7 +30191,7 @@ impl IResultsFolder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddItem(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResultsFolder_Impl::AddItem(this, windows_core::from_raw_borrowed(&psi)).into() + IResultsFolder_Impl::AddItem(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn AddIDList(this: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST, ppidladded: *mut *mut Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30199,7 +30199,7 @@ impl IResultsFolder_Vtbl { } unsafe extern "system" fn RemoveItem(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IResultsFolder_Impl::RemoveItem(this, windows_core::from_raw_borrowed(&psi)).into() + IResultsFolder_Impl::RemoveItem(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn RemoveIDList(this: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -30780,8 +30780,8 @@ pub trait ISearchFolderItemFactory_Impl: windows_core::IUnknownImpl { fn SetSortColumns(&self, csortcolumns: u32, rgsortcolumns: *const SORTCOLUMN) -> windows_core::Result<()>; fn SetGroupColumn(&self, keygroup: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()>; fn SetStacks(&self, cstackkeys: u32, rgstackkeys: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result<()>; - fn SetScope(&self, psiascope: Option<&IShellItemArray>) -> windows_core::Result<()>; - fn SetCondition(&self, pcondition: Option<&super::super::System::Search::ICondition>) -> windows_core::Result<()>; + fn SetScope(&self, psiascope: windows_core::Ref<'_, IShellItemArray>) -> windows_core::Result<()>; + fn SetCondition(&self, pcondition: windows_core::Ref<'_, super::super::System::Search::ICondition>) -> windows_core::Result<()>; fn GetShellItem(&self, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetIDList(&self) -> windows_core::Result<*mut Common::ITEMIDLIST>; } @@ -30822,11 +30822,11 @@ impl ISearchFolderItemFactory_Vtbl { } unsafe extern "system" fn SetScope(this: *mut core::ffi::c_void, psiascope: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISearchFolderItemFactory_Impl::SetScope(this, windows_core::from_raw_borrowed(&psiascope)).into() + ISearchFolderItemFactory_Impl::SetScope(this, core::mem::transmute_copy(&psiascope)).into() } unsafe extern "system" fn SetCondition(this: *mut core::ffi::c_void, pcondition: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISearchFolderItemFactory_Impl::SetCondition(this, windows_core::from_raw_borrowed(&pcondition)).into() + ISearchFolderItemFactory_Impl::SetCondition(this, core::mem::transmute_copy(&pcondition)).into() } unsafe extern "system" fn GetShellItem(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -31275,7 +31275,7 @@ pub trait IShellBrowser_Impl: super::super::System::Ole::IOleWindow_Impl { fn GetControlWindow(&self, id: u32) -> windows_core::Result; fn SendControlMsg(&self, id: u32, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, pret: *mut super::super::Foundation::LRESULT) -> windows_core::Result<()>; fn QueryActiveShellView(&self) -> windows_core::Result; - fn OnViewWindowActive(&self, pshv: Option<&IShellView>) -> windows_core::Result<()>; + fn OnViewWindowActive(&self, pshv: windows_core::Ref<'_, IShellView>) -> windows_core::Result<()>; fn SetToolbarItems(&self, lpbuttons: *const super::Controls::TBBUTTON, nbuttons: u32, uflags: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_UI_Controls", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] @@ -31345,7 +31345,7 @@ impl IShellBrowser_Vtbl { } unsafe extern "system" fn OnViewWindowActive(this: *mut core::ffi::c_void, pshv: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellBrowser_Impl::OnViewWindowActive(this, windows_core::from_raw_borrowed(&pshv)).into() + IShellBrowser_Impl::OnViewWindowActive(this, core::mem::transmute_copy(&pshv)).into() } unsafe extern "system" fn SetToolbarItems(this: *mut core::ffi::c_void, lpbuttons: *const super::Controls::TBBUTTON, nbuttons: u32, uflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32219,14 +32219,14 @@ pub struct IShellExtInit_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] pub trait IShellExtInit_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, pidlfolder: *const Common::ITEMIDLIST, pdtobj: Option<&super::super::System::Com::IDataObject>, hkeyprogid: super::super::System::Registry::HKEY) -> windows_core::Result<()>; + fn Initialize(&self, pidlfolder: *const Common::ITEMIDLIST, pdtobj: windows_core::Ref<'_, super::super::System::Com::IDataObject>, hkeyprogid: super::super::System::Registry::HKEY) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] impl IShellExtInit_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pidlfolder: *const Common::ITEMIDLIST, pdtobj: *mut core::ffi::c_void, hkeyprogid: super::super::System::Registry::HKEY) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellExtInit_Impl::Initialize(this, core::mem::transmute_copy(&pidlfolder), windows_core::from_raw_borrowed(&pdtobj), core::mem::transmute_copy(&hkeyprogid)).into() + IShellExtInit_Impl::Initialize(this, core::mem::transmute_copy(&pidlfolder), core::mem::transmute_copy(&pdtobj), core::mem::transmute_copy(&hkeyprogid)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Initialize: Initialize:: } } @@ -32529,10 +32529,10 @@ pub struct IShellFolder_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] pub trait IShellFolder_Impl: windows_core::IUnknownImpl { - fn ParseDisplayName(&self, hwnd: super::super::Foundation::HWND, pbc: Option<&super::super::System::Com::IBindCtx>, pszdisplayname: &windows_core::PCWSTR, pcheaten: *const u32, ppidl: *mut *mut Common::ITEMIDLIST, pdwattributes: *mut u32) -> windows_core::Result<()>; - fn EnumObjects(&self, hwnd: super::super::Foundation::HWND, grfflags: u32, ppenumidlist: *mut Option) -> windows_core::HRESULT; - fn BindToObject(&self, pidl: *const Common::ITEMIDLIST, pbc: Option<&super::super::System::Com::IBindCtx>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn BindToStorage(&self, pidl: *const Common::ITEMIDLIST, pbc: Option<&super::super::System::Com::IBindCtx>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ParseDisplayName(&self, hwnd: super::super::Foundation::HWND, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, pszdisplayname: &windows_core::PCWSTR, pcheaten: *const u32, ppidl: *mut *mut Common::ITEMIDLIST, pdwattributes: *mut u32) -> windows_core::Result<()>; + fn EnumObjects(&self, hwnd: super::super::Foundation::HWND, grfflags: u32, ppenumidlist: windows_core::OutRef<'_, IEnumIDList>) -> windows_core::HRESULT; + fn BindToObject(&self, pidl: *const Common::ITEMIDLIST, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn BindToStorage(&self, pidl: *const Common::ITEMIDLIST, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn CompareIDs(&self, lparam: super::super::Foundation::LPARAM, pidl1: *const Common::ITEMIDLIST, pidl2: *const Common::ITEMIDLIST) -> windows_core::HRESULT; fn CreateViewObject(&self, hwndowner: super::super::Foundation::HWND, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetAttributesOf(&self, cidl: u32, apidl: *const *const Common::ITEMIDLIST, rgfinout: *mut u32) -> windows_core::Result<()>; @@ -32545,7 +32545,7 @@ impl IShellFolder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ParseDisplayName(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, pbc: *mut core::ffi::c_void, pszdisplayname: windows_core::PCWSTR, pcheaten: *const u32, ppidl: *mut *mut Common::ITEMIDLIST, pdwattributes: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellFolder_Impl::ParseDisplayName(this, core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&pbc), core::mem::transmute(&pszdisplayname), core::mem::transmute_copy(&pcheaten), core::mem::transmute_copy(&ppidl), core::mem::transmute_copy(&pdwattributes)).into() + IShellFolder_Impl::ParseDisplayName(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&pbc), core::mem::transmute(&pszdisplayname), core::mem::transmute_copy(&pcheaten), core::mem::transmute_copy(&ppidl), core::mem::transmute_copy(&pdwattributes)).into() } unsafe extern "system" fn EnumObjects(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, grfflags: u32, ppenumidlist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32553,11 +32553,11 @@ impl IShellFolder_Vtbl { } unsafe extern "system" fn BindToObject(this: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST, pbc: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellFolder_Impl::BindToObject(this, core::mem::transmute_copy(&pidl), windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IShellFolder_Impl::BindToObject(this, core::mem::transmute_copy(&pidl), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn BindToStorage(this: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST, pbc: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellFolder_Impl::BindToStorage(this, core::mem::transmute_copy(&pidl), windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IShellFolder_Impl::BindToStorage(this, core::mem::transmute_copy(&pidl), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn CompareIDs(this: *mut core::ffi::c_void, lparam: super::super::Foundation::LPARAM, pidl1: *const Common::ITEMIDLIST, pidl2: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -32780,7 +32780,7 @@ pub struct IShellFolderBand_Vtbl { } #[cfg(feature = "Win32_UI_Shell_Common")] pub trait IShellFolderBand_Impl: windows_core::IUnknownImpl { - fn InitializeSFB(&self, psf: Option<&IShellFolder>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; + fn InitializeSFB(&self, psf: windows_core::Ref<'_, IShellFolder>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result<()>; fn SetBandInfoSFB(&self, pbi: *const BANDINFOSFB) -> windows_core::Result<()>; fn GetBandInfoSFB(&self, pbi: *mut BANDINFOSFB) -> windows_core::Result<()>; } @@ -32789,7 +32789,7 @@ impl IShellFolderBand_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitializeSFB(this: *mut core::ffi::c_void, psf: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellFolderBand_Impl::InitializeSFB(this, windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&pidl)).into() + IShellFolderBand_Impl::InitializeSFB(this, core::mem::transmute_copy(&psf), core::mem::transmute_copy(&pidl)).into() } unsafe extern "system" fn SetBandInfoSFB(this: *mut core::ffi::c_void, pbi: *const BANDINFOSFB) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33026,19 +33026,19 @@ pub trait IShellFolderView_Impl: windows_core::IUnknownImpl { fn SetRedraw(&self, bredraw: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetSelectedCount(&self) -> windows_core::Result; fn GetSelectedObjects(&self, pppidl: *mut *mut *mut Common::ITEMIDLIST, puitems: *mut u32) -> windows_core::Result<()>; - fn IsDropOnSource(&self, pdroptarget: Option<&super::super::System::Ole::IDropTarget>) -> windows_core::Result<()>; + fn IsDropOnSource(&self, pdroptarget: windows_core::Ref<'_, super::super::System::Ole::IDropTarget>) -> windows_core::Result<()>; fn GetDragPoint(&self) -> windows_core::Result; fn GetDropPoint(&self) -> windows_core::Result; - fn MoveIcons(&self, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn MoveIcons(&self, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; fn SetItemPos(&self, pidl: *const Common::ITEMIDLIST, ppt: *const super::super::Foundation::POINT) -> windows_core::Result<()>; - fn IsBkDropTarget(&self, pdroptarget: Option<&super::super::System::Ole::IDropTarget>) -> windows_core::Result<()>; + fn IsBkDropTarget(&self, pdroptarget: windows_core::Ref<'_, super::super::System::Ole::IDropTarget>) -> windows_core::Result<()>; fn SetClipboard(&self, bmove: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetPoints(&self, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn SetPoints(&self, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; fn GetItemSpacing(&self) -> windows_core::Result; - fn SetCallback(&self, pnewcb: Option<&IShellFolderViewCB>) -> windows_core::Result; + fn SetCallback(&self, pnewcb: windows_core::Ref<'_, IShellFolderViewCB>) -> windows_core::Result; fn Select(&self, dwflags: &SFVS_SELECT) -> windows_core::Result<()>; fn QuerySupport(&self, pdwsupport: *mut u32) -> windows_core::Result<()>; - fn SetAutomationObject(&self, pdisp: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetAutomationObject(&self, pdisp: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_UI_Shell_Common"))] impl IShellFolderView_Vtbl { @@ -33147,7 +33147,7 @@ impl IShellFolderView_Vtbl { } unsafe extern "system" fn IsDropOnSource(this: *mut core::ffi::c_void, pdroptarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellFolderView_Impl::IsDropOnSource(this, windows_core::from_raw_borrowed(&pdroptarget)).into() + IShellFolderView_Impl::IsDropOnSource(this, core::mem::transmute_copy(&pdroptarget)).into() } unsafe extern "system" fn GetDragPoint(this: *mut core::ffi::c_void, ppt: *mut super::super::Foundation::POINT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33171,7 +33171,7 @@ impl IShellFolderView_Vtbl { } unsafe extern "system" fn MoveIcons(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellFolderView_Impl::MoveIcons(this, windows_core::from_raw_borrowed(&pdataobject)).into() + IShellFolderView_Impl::MoveIcons(this, core::mem::transmute_copy(&pdataobject)).into() } unsafe extern "system" fn SetItemPos(this: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST, ppt: *const super::super::Foundation::POINT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33179,7 +33179,7 @@ impl IShellFolderView_Vtbl { } unsafe extern "system" fn IsBkDropTarget(this: *mut core::ffi::c_void, pdroptarget: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellFolderView_Impl::IsBkDropTarget(this, windows_core::from_raw_borrowed(&pdroptarget)).into() + IShellFolderView_Impl::IsBkDropTarget(this, core::mem::transmute_copy(&pdroptarget)).into() } unsafe extern "system" fn SetClipboard(this: *mut core::ffi::c_void, bmove: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33187,7 +33187,7 @@ impl IShellFolderView_Vtbl { } unsafe extern "system" fn SetPoints(this: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellFolderView_Impl::SetPoints(this, windows_core::from_raw_borrowed(&pdataobject)).into() + IShellFolderView_Impl::SetPoints(this, core::mem::transmute_copy(&pdataobject)).into() } unsafe extern "system" fn GetItemSpacing(this: *mut core::ffi::c_void, pspacing: *mut ITEMSPACING) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -33201,7 +33201,7 @@ impl IShellFolderView_Vtbl { } unsafe extern "system" fn SetCallback(this: *mut core::ffi::c_void, pnewcb: *mut core::ffi::c_void, ppoldcb: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellFolderView_Impl::SetCallback(this, windows_core::from_raw_borrowed(&pnewcb)) { + match IShellFolderView_Impl::SetCallback(this, core::mem::transmute_copy(&pnewcb)) { Ok(ok__) => { ppoldcb.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -33219,7 +33219,7 @@ impl IShellFolderView_Vtbl { } unsafe extern "system" fn SetAutomationObject(this: *mut core::ffi::c_void, pdisp: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellFolderView_Impl::SetAutomationObject(this, windows_core::from_raw_borrowed(&pdisp)).into() + IShellFolderView_Impl::SetAutomationObject(this, core::mem::transmute_copy(&pdisp)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -33369,7 +33369,7 @@ pub trait IShellFolderViewDual_Impl: super::super::System::Com::IDispatch_Impl { fn SelectedItems(&self) -> windows_core::Result; fn FocusedItem(&self) -> windows_core::Result; fn SelectItem(&self, pvfi: *const super::super::System::Variant::VARIANT, dwflags: i32) -> windows_core::Result<()>; - fn PopupItemMenu(&self, pfi: Option<&FolderItem>, vx: &super::super::System::Variant::VARIANT, vy: &super::super::System::Variant::VARIANT) -> windows_core::Result; + fn PopupItemMenu(&self, pfi: windows_core::Ref<'_, FolderItem>, vx: &super::super::System::Variant::VARIANT, vy: &super::super::System::Variant::VARIANT) -> windows_core::Result; fn Script(&self) -> windows_core::Result; fn ViewOptions(&self) -> windows_core::Result; } @@ -33432,7 +33432,7 @@ impl IShellFolderViewDual_Vtbl { } unsafe extern "system" fn PopupItemMenu(this: *mut core::ffi::c_void, pfi: *mut core::ffi::c_void, vx: super::super::System::Variant::VARIANT, vy: super::super::System::Variant::VARIANT, pbs: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellFolderViewDual_Impl::PopupItemMenu(this, windows_core::from_raw_borrowed(&pfi), core::mem::transmute(&vx), core::mem::transmute(&vy)) { + match IShellFolderViewDual_Impl::PopupItemMenu(this, core::mem::transmute_copy(&pfi), core::mem::transmute(&vx), core::mem::transmute(&vy)) { Ok(ok__) => { pbs.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -34116,11 +34116,11 @@ pub trait IShellImageData_Impl: windows_core::IUnknownImpl { fn Rotate(&self, dwangle: u32) -> windows_core::Result<()>; fn Scale(&self, cx: u32, cy: u32, hints: super::super::Graphics::GdiPlus::InterpolationMode) -> windows_core::Result<()>; fn DiscardEdit(&self) -> windows_core::Result<()>; - fn SetEncoderParams(&self, pbagenc: Option<&super::super::System::Com::StructuredStorage::IPropertyBag>) -> windows_core::Result<()>; + fn SetEncoderParams(&self, pbagenc: windows_core::Ref<'_, super::super::System::Com::StructuredStorage::IPropertyBag>) -> windows_core::Result<()>; fn DisplayName(&self, wszname: &windows_core::PCWSTR, cch: u32) -> windows_core::Result<()>; fn GetResolution(&self, puresolutionx: *mut u32, puresolutiony: *mut u32) -> windows_core::Result<()>; fn GetEncoderParams(&self, pguidfmt: *mut windows_core::GUID, ppencparams: *mut *mut u8) -> windows_core::Result<()>; - fn RegisterAbort(&self, pabort: Option<&IShellImageDataAbort>) -> windows_core::Result; + fn RegisterAbort(&self, pabort: windows_core::Ref<'_, IShellImageDataAbort>) -> windows_core::Result; fn CloneFrame(&self, ppimg: *mut *mut u8) -> windows_core::Result<()>; fn ReplaceFrame(&self, pimg: *mut u8) -> windows_core::Result<()>; } @@ -34227,7 +34227,7 @@ impl IShellImageData_Vtbl { } unsafe extern "system" fn SetEncoderParams(this: *mut core::ffi::c_void, pbagenc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellImageData_Impl::SetEncoderParams(this, windows_core::from_raw_borrowed(&pbagenc)).into() + IShellImageData_Impl::SetEncoderParams(this, core::mem::transmute_copy(&pbagenc)).into() } unsafe extern "system" fn DisplayName(this: *mut core::ffi::c_void, wszname: windows_core::PCWSTR, cch: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -34243,7 +34243,7 @@ impl IShellImageData_Vtbl { } unsafe extern "system" fn RegisterAbort(this: *mut core::ffi::c_void, pabort: *mut core::ffi::c_void, ppabortprev: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellImageData_Impl::RegisterAbort(this, windows_core::from_raw_borrowed(&pabort)) { + match IShellImageData_Impl::RegisterAbort(this, core::mem::transmute_copy(&pabort)) { Ok(ok__) => { ppabortprev.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -34372,7 +34372,7 @@ pub struct IShellImageDataFactory_Vtbl { pub trait IShellImageDataFactory_Impl: windows_core::IUnknownImpl { fn CreateIShellImageData(&self) -> windows_core::Result; fn CreateImageFromFile(&self, pszpath: &windows_core::PCWSTR) -> windows_core::Result; - fn CreateImageFromStream(&self, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn CreateImageFromStream(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; fn GetDataFormatFromPath(&self, pszpath: &windows_core::PCWSTR) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -34400,7 +34400,7 @@ impl IShellImageDataFactory_Vtbl { } unsafe extern "system" fn CreateImageFromStream(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, ppshimg: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellImageDataFactory_Impl::CreateImageFromStream(this, windows_core::from_raw_borrowed(&pstream)) { + match IShellImageDataFactory_Impl::CreateImageFromStream(this, core::mem::transmute_copy(&pstream)) { Ok(ok__) => { ppshimg.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -34482,18 +34482,18 @@ pub struct IShellItem_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_SystemServices"))] pub trait IShellItem_Impl: windows_core::IUnknownImpl { - fn BindToHandler(&self, pbc: Option<&super::super::System::Com::IBindCtx>, bhid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn BindToHandler(&self, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, bhid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetParent(&self) -> windows_core::Result; fn GetDisplayName(&self, sigdnname: SIGDN) -> windows_core::Result; fn GetAttributes(&self, sfgaomask: super::super::System::SystemServices::SFGAO_FLAGS) -> windows_core::Result; - fn Compare(&self, psi: Option<&IShellItem>, hint: u32) -> windows_core::Result; + fn Compare(&self, psi: windows_core::Ref<'_, IShellItem>, hint: u32) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_SystemServices"))] impl IShellItem_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BindToHandler(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, bhid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellItem_Impl::BindToHandler(this, windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&bhid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IShellItem_Impl::BindToHandler(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&bhid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn GetParent(this: *mut core::ffi::c_void, ppsi: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -34527,7 +34527,7 @@ impl IShellItem_Vtbl { } unsafe extern "system" fn Compare(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, hint: u32, piorder: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellItem_Impl::Compare(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&hint)) { + match IShellItem_Impl::Compare(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&hint)) { Ok(ok__) => { piorder.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -34667,10 +34667,10 @@ pub struct IShellItem2_Vtbl { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_SystemServices", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] pub trait IShellItem2_Impl: IShellItem_Impl { fn GetPropertyStore(&self, flags: PropertiesSystem::GETPROPERTYSTOREFLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn GetPropertyStoreWithCreateObject(&self, flags: PropertiesSystem::GETPROPERTYSTOREFLAGS, punkcreateobject: Option<&windows_core::IUnknown>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn GetPropertyStoreWithCreateObject(&self, flags: PropertiesSystem::GETPROPERTYSTOREFLAGS, punkcreateobject: windows_core::Ref<'_, windows_core::IUnknown>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetPropertyStoreForKeys(&self, rgkeys: *const super::super::Foundation::PROPERTYKEY, ckeys: u32, flags: PropertiesSystem::GETPROPERTYSTOREFLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetPropertyDescriptionList(&self, keytype: *const super::super::Foundation::PROPERTYKEY, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn Update(&self, pbc: Option<&super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; + fn Update(&self, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; fn GetProperty(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; fn GetCLSID(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; fn GetFileTime(&self, key: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; @@ -34689,7 +34689,7 @@ impl IShellItem2_Vtbl { } unsafe extern "system" fn GetPropertyStoreWithCreateObject(this: *mut core::ffi::c_void, flags: PropertiesSystem::GETPROPERTYSTOREFLAGS, punkcreateobject: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellItem2_Impl::GetPropertyStoreWithCreateObject(this, core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&punkcreateobject), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IShellItem2_Impl::GetPropertyStoreWithCreateObject(this, core::mem::transmute_copy(&flags), core::mem::transmute_copy(&punkcreateobject), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn GetPropertyStoreForKeys(this: *mut core::ffi::c_void, rgkeys: *const super::super::Foundation::PROPERTYKEY, ckeys: u32, flags: PropertiesSystem::GETPROPERTYSTOREFLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -34701,7 +34701,7 @@ impl IShellItem2_Vtbl { } unsafe extern "system" fn Update(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellItem2_Impl::Update(this, windows_core::from_raw_borrowed(&pbc)).into() + IShellItem2_Impl::Update(this, core::mem::transmute_copy(&pbc)).into() } unsafe extern "system" fn GetProperty(this: *mut core::ffi::c_void, key: *const super::super::Foundation::PROPERTYKEY, ppropvar: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -34873,7 +34873,7 @@ pub struct IShellItemArray_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_SystemServices", feature = "Win32_UI_Shell_PropertiesSystem"))] pub trait IShellItemArray_Impl: windows_core::IUnknownImpl { - fn BindToHandler(&self, pbc: Option<&super::super::System::Com::IBindCtx>, bhid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvout: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn BindToHandler(&self, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, bhid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvout: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetPropertyStore(&self, flags: PropertiesSystem::GETPROPERTYSTOREFLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetPropertyDescriptionList(&self, keytype: *const super::super::Foundation::PROPERTYKEY, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetAttributes(&self, attribflags: SIATTRIBFLAGS, sfgaomask: super::super::System::SystemServices::SFGAO_FLAGS) -> windows_core::Result; @@ -34886,7 +34886,7 @@ impl IShellItemArray_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BindToHandler(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, bhid: *const windows_core::GUID, riid: *const windows_core::GUID, ppvout: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellItemArray_Impl::BindToHandler(this, windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&bhid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvout)).into() + IShellItemArray_Impl::BindToHandler(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&bhid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppvout)).into() } unsafe extern "system" fn GetPropertyStore(this: *mut core::ffi::c_void, flags: PropertiesSystem::GETPROPERTYSTOREFLAGS, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -34977,18 +34977,18 @@ pub struct IShellItemFilter_Vtbl { pub GetEnumFlagsForItem: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait IShellItemFilter_Impl: windows_core::IUnknownImpl { - fn IncludeItem(&self, psi: Option<&IShellItem>) -> windows_core::Result<()>; - fn GetEnumFlagsForItem(&self, psi: Option<&IShellItem>) -> windows_core::Result; + fn IncludeItem(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn GetEnumFlagsForItem(&self, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; } impl IShellItemFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IncludeItem(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellItemFilter_Impl::IncludeItem(this, windows_core::from_raw_borrowed(&psi)).into() + IShellItemFilter_Impl::IncludeItem(this, core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn GetEnumFlagsForItem(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pgrfflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellItemFilter_Impl::GetEnumFlagsForItem(this, windows_core::from_raw_borrowed(&psi)) { + match IShellItemFilter_Impl::GetEnumFlagsForItem(this, core::mem::transmute_copy(&psi)) { Ok(ok__) => { pgrfflags.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -35323,14 +35323,14 @@ pub struct IShellLibrary_Vtbl { pub SaveInKnownFolder: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, windows_core::PCWSTR, LIBRARYSAVEFLAGS, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IShellLibrary_Impl: windows_core::IUnknownImpl { - fn LoadLibraryFromItem(&self, psilibrary: Option<&IShellItem>, grfmode: u32) -> windows_core::Result<()>; + fn LoadLibraryFromItem(&self, psilibrary: windows_core::Ref<'_, IShellItem>, grfmode: u32) -> windows_core::Result<()>; fn LoadLibraryFromKnownFolder(&self, kfidlibrary: *const windows_core::GUID, grfmode: u32) -> windows_core::Result<()>; - fn AddFolder(&self, psilocation: Option<&IShellItem>) -> windows_core::Result<()>; - fn RemoveFolder(&self, psilocation: Option<&IShellItem>) -> windows_core::Result<()>; + fn AddFolder(&self, psilocation: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn RemoveFolder(&self, psilocation: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn GetFolders(&self, lff: LIBRARYFOLDERFILTER, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn ResolveFolder(&self, psifoldertoresolve: Option<&IShellItem>, dwtimeout: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn ResolveFolder(&self, psifoldertoresolve: windows_core::Ref<'_, IShellItem>, dwtimeout: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn GetDefaultSaveFolder(&self, dsft: DEFAULTSAVEFOLDERTYPE, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn SetDefaultSaveFolder(&self, dsft: DEFAULTSAVEFOLDERTYPE, psi: Option<&IShellItem>) -> windows_core::Result<()>; + fn SetDefaultSaveFolder(&self, dsft: DEFAULTSAVEFOLDERTYPE, psi: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; fn GetOptions(&self) -> windows_core::Result; fn SetOptions(&self, lofmask: LIBRARYOPTIONFLAGS, lofoptions: LIBRARYOPTIONFLAGS) -> windows_core::Result<()>; fn GetFolderType(&self) -> windows_core::Result; @@ -35338,14 +35338,14 @@ pub trait IShellLibrary_Impl: windows_core::IUnknownImpl { fn GetIcon(&self) -> windows_core::Result; fn SetIcon(&self, pszicon: &windows_core::PCWSTR) -> windows_core::Result<()>; fn Commit(&self) -> windows_core::Result<()>; - fn Save(&self, psifoldertosavein: Option<&IShellItem>, pszlibraryname: &windows_core::PCWSTR, lsf: LIBRARYSAVEFLAGS) -> windows_core::Result; + fn Save(&self, psifoldertosavein: windows_core::Ref<'_, IShellItem>, pszlibraryname: &windows_core::PCWSTR, lsf: LIBRARYSAVEFLAGS) -> windows_core::Result; fn SaveInKnownFolder(&self, kfidtosavein: *const windows_core::GUID, pszlibraryname: &windows_core::PCWSTR, lsf: LIBRARYSAVEFLAGS) -> windows_core::Result; } impl IShellLibrary_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn LoadLibraryFromItem(this: *mut core::ffi::c_void, psilibrary: *mut core::ffi::c_void, grfmode: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellLibrary_Impl::LoadLibraryFromItem(this, windows_core::from_raw_borrowed(&psilibrary), core::mem::transmute_copy(&grfmode)).into() + IShellLibrary_Impl::LoadLibraryFromItem(this, core::mem::transmute_copy(&psilibrary), core::mem::transmute_copy(&grfmode)).into() } unsafe extern "system" fn LoadLibraryFromKnownFolder(this: *mut core::ffi::c_void, kfidlibrary: *const windows_core::GUID, grfmode: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35353,11 +35353,11 @@ impl IShellLibrary_Vtbl { } unsafe extern "system" fn AddFolder(this: *mut core::ffi::c_void, psilocation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellLibrary_Impl::AddFolder(this, windows_core::from_raw_borrowed(&psilocation)).into() + IShellLibrary_Impl::AddFolder(this, core::mem::transmute_copy(&psilocation)).into() } unsafe extern "system" fn RemoveFolder(this: *mut core::ffi::c_void, psilocation: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellLibrary_Impl::RemoveFolder(this, windows_core::from_raw_borrowed(&psilocation)).into() + IShellLibrary_Impl::RemoveFolder(this, core::mem::transmute_copy(&psilocation)).into() } unsafe extern "system" fn GetFolders(this: *mut core::ffi::c_void, lff: LIBRARYFOLDERFILTER, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35365,7 +35365,7 @@ impl IShellLibrary_Vtbl { } unsafe extern "system" fn ResolveFolder(this: *mut core::ffi::c_void, psifoldertoresolve: *mut core::ffi::c_void, dwtimeout: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellLibrary_Impl::ResolveFolder(this, windows_core::from_raw_borrowed(&psifoldertoresolve), core::mem::transmute_copy(&dwtimeout), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IShellLibrary_Impl::ResolveFolder(this, core::mem::transmute_copy(&psifoldertoresolve), core::mem::transmute_copy(&dwtimeout), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn GetDefaultSaveFolder(this: *mut core::ffi::c_void, dsft: DEFAULTSAVEFOLDERTYPE, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35373,7 +35373,7 @@ impl IShellLibrary_Vtbl { } unsafe extern "system" fn SetDefaultSaveFolder(this: *mut core::ffi::c_void, dsft: DEFAULTSAVEFOLDERTYPE, psi: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellLibrary_Impl::SetDefaultSaveFolder(this, core::mem::transmute_copy(&dsft), windows_core::from_raw_borrowed(&psi)).into() + IShellLibrary_Impl::SetDefaultSaveFolder(this, core::mem::transmute_copy(&dsft), core::mem::transmute_copy(&psi)).into() } unsafe extern "system" fn GetOptions(this: *mut core::ffi::c_void, plofoptions: *mut LIBRARYOPTIONFLAGS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -35423,7 +35423,7 @@ impl IShellLibrary_Vtbl { } unsafe extern "system" fn Save(this: *mut core::ffi::c_void, psifoldertosavein: *mut core::ffi::c_void, pszlibraryname: windows_core::PCWSTR, lsf: LIBRARYSAVEFLAGS, ppsisavedto: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellLibrary_Impl::Save(this, windows_core::from_raw_borrowed(&psifoldertosavein), core::mem::transmute(&pszlibraryname), core::mem::transmute_copy(&lsf)) { + match IShellLibrary_Impl::Save(this, core::mem::transmute_copy(&psifoldertosavein), core::mem::transmute(&pszlibraryname), core::mem::transmute_copy(&lsf)) { Ok(ok__) => { ppsisavedto.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -36447,22 +36447,22 @@ pub struct IShellMenu_Vtbl { } #[cfg(all(feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IShellMenu_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, psmc: Option<&IShellMenuCallback>, uid: u32, uidancestor: u32, dwflags: u32) -> windows_core::Result<()>; - fn GetMenuInfo(&self, ppsmc: *mut Option, puid: *mut u32, puidancestor: *mut u32, pdwflags: *mut u32) -> windows_core::Result<()>; - fn SetShellFolder(&self, psf: Option<&IShellFolder>, pidlfolder: *const Common::ITEMIDLIST, hkey: super::super::System::Registry::HKEY, dwflags: u32) -> windows_core::Result<()>; + fn Initialize(&self, psmc: windows_core::Ref<'_, IShellMenuCallback>, uid: u32, uidancestor: u32, dwflags: u32) -> windows_core::Result<()>; + fn GetMenuInfo(&self, ppsmc: windows_core::OutRef<'_, IShellMenuCallback>, puid: *mut u32, puidancestor: *mut u32, pdwflags: *mut u32) -> windows_core::Result<()>; + fn SetShellFolder(&self, psf: windows_core::Ref<'_, IShellFolder>, pidlfolder: *const Common::ITEMIDLIST, hkey: super::super::System::Registry::HKEY, dwflags: u32) -> windows_core::Result<()>; fn GetShellFolder(&self, pdwflags: *mut u32, ppidl: *mut *mut Common::ITEMIDLIST, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn SetMenu(&self, hmenu: super::WindowsAndMessaging::HMENU, hwnd: super::super::Foundation::HWND, dwflags: u32) -> windows_core::Result<()>; fn GetMenu(&self, phmenu: *mut super::WindowsAndMessaging::HMENU, phwnd: *mut super::super::Foundation::HWND, pdwflags: *mut u32) -> windows_core::Result<()>; fn InvalidateItem(&self, psmd: *const SMDATA, dwflags: u32) -> windows_core::Result<()>; fn GetState(&self, psmd: *mut SMDATA) -> windows_core::Result<()>; - fn SetMenuToolbar(&self, punk: Option<&windows_core::IUnknown>, dwflags: u32) -> windows_core::Result<()>; + fn SetMenuToolbar(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, dwflags: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] impl IShellMenu_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, psmc: *mut core::ffi::c_void, uid: u32, uidancestor: u32, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellMenu_Impl::Initialize(this, windows_core::from_raw_borrowed(&psmc), core::mem::transmute_copy(&uid), core::mem::transmute_copy(&uidancestor), core::mem::transmute_copy(&dwflags)).into() + IShellMenu_Impl::Initialize(this, core::mem::transmute_copy(&psmc), core::mem::transmute_copy(&uid), core::mem::transmute_copy(&uidancestor), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn GetMenuInfo(this: *mut core::ffi::c_void, ppsmc: *mut *mut core::ffi::c_void, puid: *mut u32, puidancestor: *mut u32, pdwflags: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -36470,7 +36470,7 @@ impl IShellMenu_Vtbl { } unsafe extern "system" fn SetShellFolder(this: *mut core::ffi::c_void, psf: *mut core::ffi::c_void, pidlfolder: *const Common::ITEMIDLIST, hkey: super::super::System::Registry::HKEY, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellMenu_Impl::SetShellFolder(this, windows_core::from_raw_borrowed(&psf), core::mem::transmute_copy(&pidlfolder), core::mem::transmute_copy(&hkey), core::mem::transmute_copy(&dwflags)).into() + IShellMenu_Impl::SetShellFolder(this, core::mem::transmute_copy(&psf), core::mem::transmute_copy(&pidlfolder), core::mem::transmute_copy(&hkey), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn GetShellFolder(this: *mut core::ffi::c_void, pdwflags: *mut u32, ppidl: *mut *mut Common::ITEMIDLIST, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -36494,7 +36494,7 @@ impl IShellMenu_Vtbl { } unsafe extern "system" fn SetMenuToolbar(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellMenu_Impl::SetMenuToolbar(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&dwflags)).into() + IShellMenu_Impl::SetMenuToolbar(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&dwflags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -36683,7 +36683,7 @@ pub trait IShellNameSpace_Impl: IShellFavoritesNameSpace_Impl { fn EnumOptions(&self) -> windows_core::Result; fn SetEnumOptions(&self, lval: i32) -> windows_core::Result<()>; fn SelectedItem(&self) -> windows_core::Result; - fn SetSelectedItem(&self, pitem: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetSelectedItem(&self, pitem: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn Root(&self) -> windows_core::Result; fn SetRoot(&self, var: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn Depth(&self) -> windows_core::Result; @@ -36731,7 +36731,7 @@ impl IShellNameSpace_Vtbl { } unsafe extern "system" fn SetSelectedItem(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellNameSpace_Impl::SetSelectedItem(this, windows_core::from_raw_borrowed(&pitem)).into() + IShellNameSpace_Impl::SetSelectedItem(this, core::mem::transmute_copy(&pitem)).into() } unsafe extern "system" fn Root(this: *mut core::ffi::c_void, pvar: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -36979,13 +36979,13 @@ pub struct IShellService_Vtbl { pub SetOwner: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IShellService_Impl: windows_core::IUnknownImpl { - fn SetOwner(&self, punkowner: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetOwner(&self, punkowner: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IShellService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetOwner(this: *mut core::ffi::c_void, punkowner: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellService_Impl::SetOwner(this, windows_core::from_raw_borrowed(&punkowner)).into() + IShellService_Impl::SetOwner(this, core::mem::transmute_copy(&punkowner)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), SetOwner: SetOwner:: } } @@ -37022,7 +37022,7 @@ pub struct IShellTaskScheduler_Vtbl { pub Status: unsafe extern "system" fn(*mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait IShellTaskScheduler_Impl: windows_core::IUnknownImpl { - fn AddTask(&self, prt: Option<&IRunnableTask>, rtoid: *const windows_core::GUID, lparam: usize, dwpriority: u32) -> windows_core::Result<()>; + fn AddTask(&self, prt: windows_core::Ref<'_, IRunnableTask>, rtoid: *const windows_core::GUID, lparam: usize, dwpriority: u32) -> windows_core::Result<()>; fn RemoveTasks(&self, rtoid: *const windows_core::GUID, lparam: usize, bwaitifrunning: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn CountTasks(&self, rtoid: *const windows_core::GUID) -> u32; fn Status(&self, dwreleasestatus: u32, dwthreadtimeout: u32) -> windows_core::Result<()>; @@ -37031,7 +37031,7 @@ impl IShellTaskScheduler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddTask(this: *mut core::ffi::c_void, prt: *mut core::ffi::c_void, rtoid: *const windows_core::GUID, lparam: usize, dwpriority: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellTaskScheduler_Impl::AddTask(this, windows_core::from_raw_borrowed(&prt), core::mem::transmute_copy(&rtoid), core::mem::transmute_copy(&lparam), core::mem::transmute_copy(&dwpriority)).into() + IShellTaskScheduler_Impl::AddTask(this, core::mem::transmute_copy(&prt), core::mem::transmute_copy(&rtoid), core::mem::transmute_copy(&lparam), core::mem::transmute_copy(&dwpriority)).into() } unsafe extern "system" fn RemoveTasks(this: *mut core::ffi::c_void, rtoid: *const windows_core::GUID, lparam: usize, bwaitifrunning: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -38735,7 +38735,7 @@ pub trait IShellView_Impl: super::super::System::Ole::IOleWindow_Impl { fn EnableModeless(&self, fenable: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn UIActivate(&self, ustate: u32) -> windows_core::Result<()>; fn Refresh(&self) -> windows_core::Result<()>; - fn CreateViewWindow(&self, psvprevious: Option<&IShellView>, pfs: *const FOLDERSETTINGS, psb: Option<&IShellBrowser>, prcview: *const super::super::Foundation::RECT) -> windows_core::Result; + fn CreateViewWindow(&self, psvprevious: windows_core::Ref<'_, IShellView>, pfs: *const FOLDERSETTINGS, psb: windows_core::Ref<'_, IShellBrowser>, prcview: *const super::super::Foundation::RECT) -> windows_core::Result; fn DestroyViewWindow(&self) -> windows_core::Result<()>; fn GetCurrentInfo(&self) -> windows_core::Result; fn AddPropertySheetPages(&self, dwreserved: u32, pfn: super::Controls::LPFNSVADDPROPSHEETPAGE, lparam: super::super::Foundation::LPARAM) -> windows_core::Result<()>; @@ -38764,7 +38764,7 @@ impl IShellView_Vtbl { } unsafe extern "system" fn CreateViewWindow(this: *mut core::ffi::c_void, psvprevious: *mut core::ffi::c_void, pfs: *const FOLDERSETTINGS, psb: *mut core::ffi::c_void, prcview: *const super::super::Foundation::RECT, phwnd: *mut super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellView_Impl::CreateViewWindow(this, windows_core::from_raw_borrowed(&psvprevious), core::mem::transmute_copy(&pfs), windows_core::from_raw_borrowed(&psb), core::mem::transmute_copy(&prcview)) { + match IShellView_Impl::CreateViewWindow(this, core::mem::transmute_copy(&psvprevious), core::mem::transmute_copy(&pfs), core::mem::transmute_copy(&psb), core::mem::transmute_copy(&prcview)) { Ok(ok__) => { phwnd.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -38936,14 +38936,14 @@ pub struct IShellView3_Vtbl { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_Controls", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] pub trait IShellView3_Impl: IShellView2_Impl { - fn CreateViewWindow3(&self, psbowner: Option<&IShellBrowser>, psvprev: Option<&IShellView>, dwviewflags: u32, dwmask: FOLDERFLAGS, dwflags: FOLDERFLAGS, fvmode: FOLDERVIEWMODE, pvid: *const windows_core::GUID, prcview: *const super::super::Foundation::RECT) -> windows_core::Result; + fn CreateViewWindow3(&self, psbowner: windows_core::Ref<'_, IShellBrowser>, psvprev: windows_core::Ref<'_, IShellView>, dwviewflags: u32, dwmask: FOLDERFLAGS, dwflags: FOLDERFLAGS, fvmode: FOLDERVIEWMODE, pvid: *const windows_core::GUID, prcview: *const super::super::Foundation::RECT) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_UI_Controls", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] impl IShellView3_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateViewWindow3(this: *mut core::ffi::c_void, psbowner: *mut core::ffi::c_void, psvprev: *mut core::ffi::c_void, dwviewflags: u32, dwmask: FOLDERFLAGS, dwflags: FOLDERFLAGS, fvmode: FOLDERVIEWMODE, pvid: *const windows_core::GUID, prcview: *const super::super::Foundation::RECT, phwndview: *mut super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellView3_Impl::CreateViewWindow3(this, windows_core::from_raw_borrowed(&psbowner), windows_core::from_raw_borrowed(&psvprev), core::mem::transmute_copy(&dwviewflags), core::mem::transmute_copy(&dwmask), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&fvmode), core::mem::transmute_copy(&pvid), core::mem::transmute_copy(&prcview)) { + match IShellView3_Impl::CreateViewWindow3(this, core::mem::transmute_copy(&psbowner), core::mem::transmute_copy(&psvprev), core::mem::transmute_copy(&dwviewflags), core::mem::transmute_copy(&dwmask), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&fvmode), core::mem::transmute_copy(&pvid), core::mem::transmute_copy(&prcview)) { Ok(ok__) => { phwndview.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -39055,13 +39055,13 @@ pub trait IShellWindows_Impl: super::super::System::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; fn Item(&self, index: &super::super::System::Variant::VARIANT) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; - fn Register(&self, pid: Option<&super::super::System::Com::IDispatch>, hwnd: i32, swclass: ShellWindowTypeConstants) -> windows_core::Result; + fn Register(&self, pid: windows_core::Ref<'_, super::super::System::Com::IDispatch>, hwnd: i32, swclass: ShellWindowTypeConstants) -> windows_core::Result; fn RegisterPending(&self, lthreadid: i32, pvarloc: *const super::super::System::Variant::VARIANT, pvarlocroot: *const super::super::System::Variant::VARIANT, swclass: ShellWindowTypeConstants) -> windows_core::Result; fn Revoke(&self, lcookie: i32) -> windows_core::Result<()>; fn OnNavigate(&self, lcookie: i32, pvarloc: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn OnActivated(&self, lcookie: i32, factive: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn FindWindowSW(&self, pvarloc: *const super::super::System::Variant::VARIANT, pvarlocroot: *const super::super::System::Variant::VARIANT, swclass: ShellWindowTypeConstants, phwnd: *mut i32, swfwoptions: ShellWindowFindWindowOptions) -> windows_core::Result; - fn OnCreated(&self, lcookie: i32, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnCreated(&self, lcookie: i32, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn ProcessAttachDetach(&self, fattach: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -39099,7 +39099,7 @@ impl IShellWindows_Vtbl { } unsafe extern "system" fn Register(this: *mut core::ffi::c_void, pid: *mut core::ffi::c_void, hwnd: i32, swclass: ShellWindowTypeConstants, plcookie: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IShellWindows_Impl::Register(this, windows_core::from_raw_borrowed(&pid), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&swclass)) { + match IShellWindows_Impl::Register(this, core::mem::transmute_copy(&pid), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&swclass)) { Ok(ok__) => { plcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -39141,7 +39141,7 @@ impl IShellWindows_Vtbl { } unsafe extern "system" fn OnCreated(this: *mut core::ffi::c_void, lcookie: i32, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IShellWindows_Impl::OnCreated(this, core::mem::transmute_copy(&lcookie), windows_core::from_raw_borrowed(&punk)).into() + IShellWindows_Impl::OnCreated(this, core::mem::transmute_copy(&lcookie), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn ProcessAttachDetach(this: *mut core::ffi::c_void, fattach: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -39249,13 +39249,13 @@ pub struct IStartMenuPinnedList_Vtbl { pub RemoveFromList: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IStartMenuPinnedList_Impl: windows_core::IUnknownImpl { - fn RemoveFromList(&self, pitem: Option<&IShellItem>) -> windows_core::Result<()>; + fn RemoveFromList(&self, pitem: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; } impl IStartMenuPinnedList_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RemoveFromList(this: *mut core::ffi::c_void, pitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStartMenuPinnedList_Impl::RemoveFromList(this, windows_core::from_raw_borrowed(&pitem)).into() + IStartMenuPinnedList_Impl::RemoveFromList(this, core::mem::transmute_copy(&pitem)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), RemoveFromList: RemoveFromList:: } } @@ -39499,7 +39499,7 @@ pub struct IStorageProviderPropertyHandler_Vtbl { #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait IStorageProviderPropertyHandler_Impl: windows_core::IUnknownImpl { fn RetrieveProperties(&self, propertiestoretrieve: *const super::super::Foundation::PROPERTYKEY, propertiestoretrievecount: u32) -> windows_core::Result; - fn SaveProperties(&self, propertiestosave: Option<&PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; + fn SaveProperties(&self, propertiestosave: windows_core::Ref<'_, PropertiesSystem::IPropertyStore>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] impl IStorageProviderPropertyHandler_Vtbl { @@ -39516,7 +39516,7 @@ impl IStorageProviderPropertyHandler_Vtbl { } unsafe extern "system" fn SaveProperties(this: *mut core::ffi::c_void, propertiestosave: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStorageProviderPropertyHandler_Impl::SaveProperties(this, windows_core::from_raw_borrowed(&propertiestosave)).into() + IStorageProviderPropertyHandler_Impl::SaveProperties(this, core::mem::transmute_copy(&propertiestosave)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -39754,7 +39754,7 @@ pub trait ISyncMgrConflict_Impl: windows_core::IUnknownImpl { fn GetProperty(&self, propkey: *const super::super::Foundation::PROPERTYKEY) -> windows_core::Result; fn GetConflictIdInfo(&self) -> windows_core::Result; fn GetItemsArray(&self) -> windows_core::Result; - fn Resolve(&self, presolveinfo: Option<&ISyncMgrConflictResolveInfo>) -> windows_core::Result<()>; + fn Resolve(&self, presolveinfo: windows_core::Ref<'_, ISyncMgrConflictResolveInfo>) -> windows_core::Result<()>; fn GetResolutionHandler(&self, riid: *const windows_core::GUID, ppvresolutionhandler: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -39792,7 +39792,7 @@ impl ISyncMgrConflict_Vtbl { } unsafe extern "system" fn Resolve(this: *mut core::ffi::c_void, presolveinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrConflict_Impl::Resolve(this, windows_core::from_raw_borrowed(&presolveinfo)).into() + ISyncMgrConflict_Impl::Resolve(this, core::mem::transmute_copy(&presolveinfo)).into() } unsafe extern "system" fn GetResolutionHandler(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppvresolutionhandler: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -39835,14 +39835,14 @@ pub struct ISyncMgrConflictFolder_Vtbl { } #[cfg(feature = "Win32_UI_Shell_Common")] pub trait ISyncMgrConflictFolder_Impl: windows_core::IUnknownImpl { - fn GetConflictIDList(&self, pconflict: Option<&ISyncMgrConflict>) -> windows_core::Result<*mut Common::ITEMIDLIST>; + fn GetConflictIDList(&self, pconflict: windows_core::Ref<'_, ISyncMgrConflict>) -> windows_core::Result<*mut Common::ITEMIDLIST>; } #[cfg(feature = "Win32_UI_Shell_Common")] impl ISyncMgrConflictFolder_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetConflictIDList(this: *mut core::ffi::c_void, pconflict: *mut core::ffi::c_void, ppidlconflict: *mut *mut Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncMgrConflictFolder_Impl::GetConflictIDList(this, windows_core::from_raw_borrowed(&pconflict)) { + match ISyncMgrConflictFolder_Impl::GetConflictIDList(this, core::mem::transmute_copy(&pconflict)) { Ok(ok__) => { ppidlconflict.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -39919,13 +39919,13 @@ pub struct ISyncMgrConflictPresenter_Vtbl { pub PresentConflict: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISyncMgrConflictPresenter_Impl: windows_core::IUnknownImpl { - fn PresentConflict(&self, pconflict: Option<&ISyncMgrConflict>, presolveinfo: Option<&ISyncMgrConflictResolveInfo>) -> windows_core::Result<()>; + fn PresentConflict(&self, pconflict: windows_core::Ref<'_, ISyncMgrConflict>, presolveinfo: windows_core::Ref<'_, ISyncMgrConflictResolveInfo>) -> windows_core::Result<()>; } impl ISyncMgrConflictPresenter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PresentConflict(this: *mut core::ffi::c_void, pconflict: *mut core::ffi::c_void, presolveinfo: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrConflictPresenter_Impl::PresentConflict(this, windows_core::from_raw_borrowed(&pconflict), windows_core::from_raw_borrowed(&presolveinfo)).into() + ISyncMgrConflictPresenter_Impl::PresentConflict(this, core::mem::transmute_copy(&pconflict), core::mem::transmute_copy(&presolveinfo)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), PresentConflict: PresentConflict:: } } @@ -40320,8 +40320,8 @@ pub struct ISyncMgrControl_Vtbl { pub EnableItem: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::BOOL, windows_core::PCWSTR, windows_core::PCWSTR, super::super::Foundation::HWND, SYNCMGR_CONTROL_FLAGS) -> windows_core::HRESULT, } pub trait ISyncMgrControl_Impl: windows_core::IUnknownImpl { - fn StartHandlerSync(&self, pszhandlerid: &windows_core::PCWSTR, hwndowner: super::super::Foundation::HWND, punk: Option<&windows_core::IUnknown>, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: Option<&ISyncMgrSyncResult>) -> windows_core::Result<()>; - fn StartItemSync(&self, pszhandlerid: &windows_core::PCWSTR, ppszitemids: *const windows_core::PCWSTR, citems: u32, hwndowner: super::super::Foundation::HWND, punk: Option<&windows_core::IUnknown>, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: Option<&ISyncMgrSyncResult>) -> windows_core::Result<()>; + fn StartHandlerSync(&self, pszhandlerid: &windows_core::PCWSTR, hwndowner: super::super::Foundation::HWND, punk: windows_core::Ref<'_, windows_core::IUnknown>, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: windows_core::Ref<'_, ISyncMgrSyncResult>) -> windows_core::Result<()>; + fn StartItemSync(&self, pszhandlerid: &windows_core::PCWSTR, ppszitemids: *const windows_core::PCWSTR, citems: u32, hwndowner: super::super::Foundation::HWND, punk: windows_core::Ref<'_, windows_core::IUnknown>, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: windows_core::Ref<'_, ISyncMgrSyncResult>) -> windows_core::Result<()>; fn StartSyncAll(&self, hwndowner: super::super::Foundation::HWND) -> windows_core::Result<()>; fn StopHandlerSync(&self, pszhandlerid: &windows_core::PCWSTR) -> windows_core::Result<()>; fn StopItemSync(&self, pszhandlerid: &windows_core::PCWSTR, ppszitemids: *const windows_core::PCWSTR, citems: u32) -> windows_core::Result<()>; @@ -40330,7 +40330,7 @@ pub trait ISyncMgrControl_Impl: windows_core::IUnknownImpl { fn UpdateHandler(&self, pszhandlerid: &windows_core::PCWSTR, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()>; fn UpdateItem(&self, pszhandlerid: &windows_core::PCWSTR, pszitemid: &windows_core::PCWSTR, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()>; fn UpdateEvents(&self, pszhandlerid: &windows_core::PCWSTR, pszitemid: &windows_core::PCWSTR, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()>; - fn UpdateConflict(&self, pszhandlerid: &windows_core::PCWSTR, pszitemid: &windows_core::PCWSTR, pconflict: Option<&ISyncMgrConflict>, nreason: SYNCMGR_UPDATE_REASON) -> windows_core::Result<()>; + fn UpdateConflict(&self, pszhandlerid: &windows_core::PCWSTR, pszitemid: &windows_core::PCWSTR, pconflict: windows_core::Ref<'_, ISyncMgrConflict>, nreason: SYNCMGR_UPDATE_REASON) -> windows_core::Result<()>; fn UpdateConflicts(&self, pszhandlerid: &windows_core::PCWSTR, pszitemid: &windows_core::PCWSTR, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()>; fn ActivateHandler(&self, factivate: super::super::Foundation::BOOL, pszhandlerid: &windows_core::PCWSTR, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()>; fn EnableHandler(&self, fenable: super::super::Foundation::BOOL, pszhandlerid: &windows_core::PCWSTR, hwndowner: super::super::Foundation::HWND, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::Result<()>; @@ -40340,11 +40340,11 @@ impl ISyncMgrControl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartHandlerSync(this: *mut core::ffi::c_void, pszhandlerid: windows_core::PCWSTR, hwndowner: super::super::Foundation::HWND, punk: *mut core::ffi::c_void, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrControl_Impl::StartHandlerSync(this, core::mem::transmute(&pszhandlerid), core::mem::transmute_copy(&hwndowner), windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&nsynccontrolflags), windows_core::from_raw_borrowed(&presult)).into() + ISyncMgrControl_Impl::StartHandlerSync(this, core::mem::transmute(&pszhandlerid), core::mem::transmute_copy(&hwndowner), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&nsynccontrolflags), core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn StartItemSync(this: *mut core::ffi::c_void, pszhandlerid: windows_core::PCWSTR, ppszitemids: *const windows_core::PCWSTR, citems: u32, hwndowner: super::super::Foundation::HWND, punk: *mut core::ffi::c_void, nsynccontrolflags: SYNCMGR_SYNC_CONTROL_FLAGS, presult: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrControl_Impl::StartItemSync(this, core::mem::transmute(&pszhandlerid), core::mem::transmute_copy(&ppszitemids), core::mem::transmute_copy(&citems), core::mem::transmute_copy(&hwndowner), windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&nsynccontrolflags), windows_core::from_raw_borrowed(&presult)).into() + ISyncMgrControl_Impl::StartItemSync(this, core::mem::transmute(&pszhandlerid), core::mem::transmute_copy(&ppszitemids), core::mem::transmute_copy(&citems), core::mem::transmute_copy(&hwndowner), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&nsynccontrolflags), core::mem::transmute_copy(&presult)).into() } unsafe extern "system" fn StartSyncAll(this: *mut core::ffi::c_void, hwndowner: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -40380,7 +40380,7 @@ impl ISyncMgrControl_Vtbl { } unsafe extern "system" fn UpdateConflict(this: *mut core::ffi::c_void, pszhandlerid: windows_core::PCWSTR, pszitemid: windows_core::PCWSTR, pconflict: *mut core::ffi::c_void, nreason: SYNCMGR_UPDATE_REASON) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrControl_Impl::UpdateConflict(this, core::mem::transmute(&pszhandlerid), core::mem::transmute(&pszitemid), windows_core::from_raw_borrowed(&pconflict), core::mem::transmute_copy(&nreason)).into() + ISyncMgrControl_Impl::UpdateConflict(this, core::mem::transmute(&pszhandlerid), core::mem::transmute(&pszitemid), core::mem::transmute_copy(&pconflict), core::mem::transmute_copy(&nreason)).into() } unsafe extern "system" fn UpdateConflicts(this: *mut core::ffi::c_void, pszhandlerid: windows_core::PCWSTR, pszitemid: windows_core::PCWSTR, ncontrolflags: SYNCMGR_CONTROL_FLAGS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -40727,13 +40727,13 @@ pub struct ISyncMgrEventLinkUIOperation_Vtbl { pub Init: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ISyncMgrEventLinkUIOperation_Impl: ISyncMgrUIOperation_Impl { - fn Init(&self, rguideventid: *const windows_core::GUID, pevent: Option<&ISyncMgrEvent>) -> windows_core::Result<()>; + fn Init(&self, rguideventid: *const windows_core::GUID, pevent: windows_core::Ref<'_, ISyncMgrEvent>) -> windows_core::Result<()>; } impl ISyncMgrEventLinkUIOperation_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, rguideventid: *const windows_core::GUID, pevent: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrEventLinkUIOperation_Impl::Init(this, core::mem::transmute_copy(&rguideventid), windows_core::from_raw_borrowed(&pevent)).into() + ISyncMgrEventLinkUIOperation_Impl::Init(this, core::mem::transmute_copy(&rguideventid), core::mem::transmute_copy(&pevent)).into() } Self { base__: ISyncMgrUIOperation_Vtbl::new::(), Init: Init:: } } @@ -40884,7 +40884,7 @@ pub trait ISyncMgrHandler_Impl: windows_core::IUnknownImpl { fn GetPolicies(&self) -> windows_core::Result; fn Activate(&self, factivate: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn Enable(&self, fenable: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn Synchronize(&self, ppszitemids: *const windows_core::PCWSTR, citems: u32, hwndowner: super::super::Foundation::HWND, psessioncreator: Option<&ISyncMgrSessionCreator>, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Synchronize(&self, ppszitemids: *const windows_core::PCWSTR, citems: u32, hwndowner: super::super::Foundation::HWND, psessioncreator: windows_core::Ref<'_, ISyncMgrSessionCreator>, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ISyncMgrHandler_Vtbl { pub const fn new() -> Self { @@ -40942,7 +40942,7 @@ impl ISyncMgrHandler_Vtbl { } unsafe extern "system" fn Synchronize(this: *mut core::ffi::c_void, ppszitemids: *const windows_core::PCWSTR, citems: u32, hwndowner: super::super::Foundation::HWND, psessioncreator: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrHandler_Impl::Synchronize(this, core::mem::transmute_copy(&ppszitemids), core::mem::transmute_copy(&citems), core::mem::transmute_copy(&hwndowner), windows_core::from_raw_borrowed(&psessioncreator), windows_core::from_raw_borrowed(&punk)).into() + ISyncMgrHandler_Impl::Synchronize(this, core::mem::transmute_copy(&ppszitemids), core::mem::transmute_copy(&citems), core::mem::transmute_copy(&hwndowner), core::mem::transmute_copy(&psessioncreator), core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -41235,10 +41235,10 @@ pub struct ISyncMgrResolutionHandler_Vtbl { } pub trait ISyncMgrResolutionHandler_Impl: windows_core::IUnknownImpl { fn QueryAbilities(&self) -> windows_core::Result; - fn KeepOther(&self, psiother: Option<&IShellItem>) -> windows_core::Result; + fn KeepOther(&self, psiother: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; fn KeepRecent(&self) -> windows_core::Result; fn RemoveFromSyncSet(&self) -> windows_core::Result; - fn KeepItems(&self, parray: Option<&ISyncMgrConflictResolutionItems>) -> windows_core::Result; + fn KeepItems(&self, parray: windows_core::Ref<'_, ISyncMgrConflictResolutionItems>) -> windows_core::Result; } impl ISyncMgrResolutionHandler_Vtbl { pub const fn new() -> Self { @@ -41254,7 +41254,7 @@ impl ISyncMgrResolutionHandler_Vtbl { } unsafe extern "system" fn KeepOther(this: *mut core::ffi::c_void, psiother: *mut core::ffi::c_void, pfeedback: *mut SYNCMGR_RESOLUTION_FEEDBACK) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncMgrResolutionHandler_Impl::KeepOther(this, windows_core::from_raw_borrowed(&psiother)) { + match ISyncMgrResolutionHandler_Impl::KeepOther(this, core::mem::transmute_copy(&psiother)) { Ok(ok__) => { pfeedback.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -41284,7 +41284,7 @@ impl ISyncMgrResolutionHandler_Vtbl { } unsafe extern "system" fn KeepItems(this: *mut core::ffi::c_void, parray: *mut core::ffi::c_void, pfeedback: *mut SYNCMGR_RESOLUTION_FEEDBACK) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ISyncMgrResolutionHandler_Impl::KeepItems(this, windows_core::from_raw_borrowed(&parray)) { + match ISyncMgrResolutionHandler_Impl::KeepItems(this, core::mem::transmute_copy(&parray)) { Ok(ok__) => { pfeedback.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -41470,10 +41470,10 @@ pub trait ISyncMgrSyncCallback_Impl: windows_core::IUnknownImpl { fn SetHandlerProgressText(&self, pszprogresstext: &windows_core::PCWSTR, pncancelrequest: *mut SYNCMGR_CANCEL_REQUEST) -> windows_core::Result<()>; fn ReportEvent(&self, pszitemid: &windows_core::PCWSTR, nlevel: SYNCMGR_EVENT_LEVEL, nflags: SYNCMGR_EVENT_FLAGS, pszname: &windows_core::PCWSTR, pszdescription: &windows_core::PCWSTR, pszlinktext: &windows_core::PCWSTR, pszlinkreference: &windows_core::PCWSTR, pszcontext: &windows_core::PCWSTR) -> windows_core::Result; fn CanContinue(&self, pszitemid: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn QueryForAdditionalItems(&self, ppenumitemids: *mut Option, ppenumpunks: *mut Option) -> windows_core::Result<()>; + fn QueryForAdditionalItems(&self, ppenumitemids: windows_core::OutRef<'_, super::super::System::Com::IEnumString>, ppenumpunks: windows_core::OutRef<'_, super::super::System::Com::IEnumUnknown>) -> windows_core::Result<()>; fn AddItemToSession(&self, pszitemid: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn AddIUnknownToSession(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn ProposeItem(&self, pnewitem: Option<&ISyncMgrSyncItem>) -> windows_core::Result<()>; + fn AddIUnknownToSession(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn ProposeItem(&self, pnewitem: windows_core::Ref<'_, ISyncMgrSyncItem>) -> windows_core::Result<()>; fn CommitItem(&self, pszitemid: &windows_core::PCWSTR) -> windows_core::Result<()>; fn ReportManualSync(&self) -> windows_core::Result<()>; } @@ -41512,11 +41512,11 @@ impl ISyncMgrSyncCallback_Vtbl { } unsafe extern "system" fn AddIUnknownToSession(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrSyncCallback_Impl::AddIUnknownToSession(this, windows_core::from_raw_borrowed(&punk)).into() + ISyncMgrSyncCallback_Impl::AddIUnknownToSession(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn ProposeItem(this: *mut core::ffi::c_void, pnewitem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrSyncCallback_Impl::ProposeItem(this, windows_core::from_raw_borrowed(&pnewitem)).into() + ISyncMgrSyncCallback_Impl::ProposeItem(this, core::mem::transmute_copy(&pnewitem)).into() } unsafe extern "system" fn CommitItem(this: *mut core::ffi::c_void, pszitemid: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -41949,7 +41949,7 @@ pub trait ISyncMgrSynchronize_Impl: windows_core::IUnknownImpl { fn EnumSyncMgrItems(&self) -> windows_core::Result; fn GetItemObject(&self, itemid: *const windows_core::GUID, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; fn ShowProperties(&self, hwndparent: super::super::Foundation::HWND, itemid: *const windows_core::GUID) -> windows_core::Result<()>; - fn SetProgressCallback(&self, lpcallback: Option<&ISyncMgrSynchronizeCallback>) -> windows_core::Result<()>; + fn SetProgressCallback(&self, lpcallback: windows_core::Ref<'_, ISyncMgrSynchronizeCallback>) -> windows_core::Result<()>; fn PrepareForSync(&self, cbnumitems: u32, pitemids: *const windows_core::GUID, hwndparent: super::super::Foundation::HWND, dwreserved: u32) -> windows_core::Result<()>; fn Synchronize(&self, hwndparent: super::super::Foundation::HWND) -> windows_core::Result<()>; fn SetItemStatus(&self, pitemid: *const windows_core::GUID, dwsyncmgrstatus: u32) -> windows_core::Result<()>; @@ -41992,7 +41992,7 @@ impl ISyncMgrSynchronize_Vtbl { } unsafe extern "system" fn SetProgressCallback(this: *mut core::ffi::c_void, lpcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISyncMgrSynchronize_Impl::SetProgressCallback(this, windows_core::from_raw_borrowed(&lpcallback)).into() + ISyncMgrSynchronize_Impl::SetProgressCallback(this, core::mem::transmute_copy(&lpcallback)).into() } unsafe extern "system" fn PrepareForSync(this: *mut core::ffi::c_void, cbnumitems: u32, pitemids: *const windows_core::GUID, hwndparent: super::super::Foundation::HWND, dwreserved: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -42570,14 +42570,14 @@ pub struct IThumbnailCache_Vtbl { pub GetThumbnailByID: unsafe extern "system" fn(*mut core::ffi::c_void, WTS_THUMBNAILID, u32, *mut *mut core::ffi::c_void, *mut WTS_CACHEFLAGS) -> windows_core::HRESULT, } pub trait IThumbnailCache_Impl: windows_core::IUnknownImpl { - fn GetThumbnail(&self, pshellitem: Option<&IShellItem>, cxyrequestedthumbsize: u32, flags: WTS_FLAGS, ppvthumb: *mut Option, poutflags: *mut WTS_CACHEFLAGS, pthumbnailid: *mut WTS_THUMBNAILID) -> windows_core::Result<()>; - fn GetThumbnailByID(&self, thumbnailid: &WTS_THUMBNAILID, cxyrequestedthumbsize: u32, ppvthumb: *mut Option, poutflags: *mut WTS_CACHEFLAGS) -> windows_core::Result<()>; + fn GetThumbnail(&self, pshellitem: windows_core::Ref<'_, IShellItem>, cxyrequestedthumbsize: u32, flags: WTS_FLAGS, ppvthumb: windows_core::OutRef<'_, ISharedBitmap>, poutflags: *mut WTS_CACHEFLAGS, pthumbnailid: *mut WTS_THUMBNAILID) -> windows_core::Result<()>; + fn GetThumbnailByID(&self, thumbnailid: &WTS_THUMBNAILID, cxyrequestedthumbsize: u32, ppvthumb: windows_core::OutRef<'_, ISharedBitmap>, poutflags: *mut WTS_CACHEFLAGS) -> windows_core::Result<()>; } impl IThumbnailCache_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetThumbnail(this: *mut core::ffi::c_void, pshellitem: *mut core::ffi::c_void, cxyrequestedthumbsize: u32, flags: WTS_FLAGS, ppvthumb: *mut *mut core::ffi::c_void, poutflags: *mut WTS_CACHEFLAGS, pthumbnailid: *mut WTS_THUMBNAILID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IThumbnailCache_Impl::GetThumbnail(this, windows_core::from_raw_borrowed(&pshellitem), core::mem::transmute_copy(&cxyrequestedthumbsize), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&ppvthumb), core::mem::transmute_copy(&poutflags), core::mem::transmute_copy(&pthumbnailid)).into() + IThumbnailCache_Impl::GetThumbnail(this, core::mem::transmute_copy(&pshellitem), core::mem::transmute_copy(&cxyrequestedthumbsize), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&ppvthumb), core::mem::transmute_copy(&poutflags), core::mem::transmute_copy(&pthumbnailid)).into() } unsafe extern "system" fn GetThumbnailByID(this: *mut core::ffi::c_void, thumbnailid: WTS_THUMBNAILID, cxyrequestedthumbsize: u32, ppvthumb: *mut *mut core::ffi::c_void, poutflags: *mut WTS_CACHEFLAGS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -42610,13 +42610,13 @@ pub struct IThumbnailCachePrimer_Vtbl { pub PageInThumbnail: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, WTS_FLAGS, u32) -> windows_core::HRESULT, } pub trait IThumbnailCachePrimer_Impl: windows_core::IUnknownImpl { - fn PageInThumbnail(&self, psi: Option<&IShellItem>, wtsflags: WTS_FLAGS, cxyrequestedthumbsize: u32) -> windows_core::Result<()>; + fn PageInThumbnail(&self, psi: windows_core::Ref<'_, IShellItem>, wtsflags: WTS_FLAGS, cxyrequestedthumbsize: u32) -> windows_core::Result<()>; } impl IThumbnailCachePrimer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PageInThumbnail(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, wtsflags: WTS_FLAGS, cxyrequestedthumbsize: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IThumbnailCachePrimer_Impl::PageInThumbnail(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&wtsflags), core::mem::transmute_copy(&cxyrequestedthumbsize)).into() + IThumbnailCachePrimer_Impl::PageInThumbnail(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&wtsflags), core::mem::transmute_copy(&cxyrequestedthumbsize)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), PageInThumbnail: PageInThumbnail:: } } @@ -42647,14 +42647,14 @@ pub struct IThumbnailCapture_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IThumbnailCapture_Impl: windows_core::IUnknownImpl { - fn CaptureThumbnail(&self, pmaxsize: *const super::super::Foundation::SIZE, phtmldoc2: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn CaptureThumbnail(&self, pmaxsize: *const super::super::Foundation::SIZE, phtmldoc2: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; } #[cfg(feature = "Win32_Graphics_Gdi")] impl IThumbnailCapture_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CaptureThumbnail(this: *mut core::ffi::c_void, pmaxsize: *const super::super::Foundation::SIZE, phtmldoc2: *mut core::ffi::c_void, phbmthumbnail: *mut super::super::Graphics::Gdi::HBITMAP) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IThumbnailCapture_Impl::CaptureThumbnail(this, core::mem::transmute_copy(&pmaxsize), windows_core::from_raw_borrowed(&phtmldoc2)) { + match IThumbnailCapture_Impl::CaptureThumbnail(this, core::mem::transmute_copy(&pmaxsize), core::mem::transmute_copy(&phtmldoc2)) { Ok(ok__) => { phbmthumbnail.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -42693,14 +42693,14 @@ pub struct IThumbnailHandlerFactory_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] pub trait IThumbnailHandlerFactory_Impl: windows_core::IUnknownImpl { - fn GetThumbnailHandler(&self, pidlchild: *const Common::ITEMIDLIST, pbc: Option<&super::super::System::Com::IBindCtx>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn GetThumbnailHandler(&self, pidlchild: *const Common::ITEMIDLIST, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] impl IThumbnailHandlerFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetThumbnailHandler(this: *mut core::ffi::c_void, pidlchild: *const Common::ITEMIDLIST, pbc: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IThumbnailHandlerFactory_Impl::GetThumbnailHandler(this, core::mem::transmute_copy(&pidlchild), windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + IThumbnailHandlerFactory_Impl::GetThumbnailHandler(this, core::mem::transmute_copy(&pidlchild), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), GetThumbnailHandler: GetThumbnailHandler:: } } @@ -42806,8 +42806,8 @@ pub struct IThumbnailStreamCache_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IThumbnailStreamCache_Impl: windows_core::IUnknownImpl { - fn GetThumbnailStream(&self, path: &windows_core::PCWSTR, cacheid: u64, options: ThumbnailStreamCacheOptions, requestedthumbnailsize: u32, thumbnailsize: *mut super::super::Foundation::SIZE, thumbnailstream: *mut Option) -> windows_core::Result<()>; - fn SetThumbnailStream(&self, path: &windows_core::PCWSTR, cacheid: u64, thumbnailsize: &super::super::Foundation::SIZE, thumbnailstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn GetThumbnailStream(&self, path: &windows_core::PCWSTR, cacheid: u64, options: ThumbnailStreamCacheOptions, requestedthumbnailsize: u32, thumbnailsize: *mut super::super::Foundation::SIZE, thumbnailstream: windows_core::OutRef<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn SetThumbnailStream(&self, path: &windows_core::PCWSTR, cacheid: u64, thumbnailsize: &super::super::Foundation::SIZE, thumbnailstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IThumbnailStreamCache_Vtbl { @@ -42818,7 +42818,7 @@ impl IThumbnailStreamCache_Vtbl { } unsafe extern "system" fn SetThumbnailStream(this: *mut core::ffi::c_void, path: windows_core::PCWSTR, cacheid: u64, thumbnailsize: super::super::Foundation::SIZE, thumbnailstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IThumbnailStreamCache_Impl::SetThumbnailStream(this, core::mem::transmute(&path), core::mem::transmute_copy(&cacheid), core::mem::transmute(&thumbnailsize), windows_core::from_raw_borrowed(&thumbnailstream)).into() + IThumbnailStreamCache_Impl::SetThumbnailStream(this, core::mem::transmute(&path), core::mem::transmute_copy(&cacheid), core::mem::transmute(&thumbnailsize), core::mem::transmute_copy(&thumbnailstream)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -42859,7 +42859,7 @@ pub struct ITrackShellMenu_Vtbl { } #[cfg(all(feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] pub trait ITrackShellMenu_Impl: IShellMenu_Impl { - fn SetObscured(&self, hwndtb: super::super::Foundation::HWND, punkband: Option<&windows_core::IUnknown>, dwsmsetflags: u32) -> windows_core::Result<()>; + fn SetObscured(&self, hwndtb: super::super::Foundation::HWND, punkband: windows_core::Ref<'_, windows_core::IUnknown>, dwsmsetflags: u32) -> windows_core::Result<()>; fn Popup(&self, hwnd: super::super::Foundation::HWND, ppt: *mut super::super::Foundation::POINTL, prcexclude: *mut super::super::Foundation::RECTL, dwflags: i32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] @@ -42867,7 +42867,7 @@ impl ITrackShellMenu_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetObscured(this: *mut core::ffi::c_void, hwndtb: super::super::Foundation::HWND, punkband: *mut core::ffi::c_void, dwsmsetflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITrackShellMenu_Impl::SetObscured(this, core::mem::transmute_copy(&hwndtb), windows_core::from_raw_borrowed(&punkband), core::mem::transmute_copy(&dwsmsetflags)).into() + ITrackShellMenu_Impl::SetObscured(this, core::mem::transmute_copy(&hwndtb), core::mem::transmute_copy(&punkband), core::mem::transmute_copy(&dwsmsetflags)).into() } unsafe extern "system" fn Popup(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, ppt: *mut super::super::Foundation::POINTL, prcexclude: *mut super::super::Foundation::RECTL, dwflags: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -42903,14 +42903,14 @@ pub struct ITranscodeImage_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITranscodeImage_Impl: windows_core::IUnknownImpl { - fn TranscodeImage(&self, pshellitem: Option<&IShellItem>, uimaxwidth: u32, uimaxheight: u32, flags: u32, pvimage: Option<&super::super::System::Com::IStream>, puiwidth: *mut u32, puiheight: *mut u32) -> windows_core::Result<()>; + fn TranscodeImage(&self, pshellitem: windows_core::Ref<'_, IShellItem>, uimaxwidth: u32, uimaxheight: u32, flags: u32, pvimage: windows_core::Ref<'_, super::super::System::Com::IStream>, puiwidth: *mut u32, puiheight: *mut u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ITranscodeImage_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TranscodeImage(this: *mut core::ffi::c_void, pshellitem: *mut core::ffi::c_void, uimaxwidth: u32, uimaxheight: u32, flags: u32, pvimage: *mut core::ffi::c_void, puiwidth: *mut u32, puiheight: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITranscodeImage_Impl::TranscodeImage(this, windows_core::from_raw_borrowed(&pshellitem), core::mem::transmute_copy(&uimaxwidth), core::mem::transmute_copy(&uimaxheight), core::mem::transmute_copy(&flags), windows_core::from_raw_borrowed(&pvimage), core::mem::transmute_copy(&puiwidth), core::mem::transmute_copy(&puiheight)).into() + ITranscodeImage_Impl::TranscodeImage(this, core::mem::transmute_copy(&pshellitem), core::mem::transmute_copy(&uimaxwidth), core::mem::transmute_copy(&uimaxheight), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&pvimage), core::mem::transmute_copy(&puiwidth), core::mem::transmute_copy(&puiheight)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), TranscodeImage: TranscodeImage:: } } @@ -42978,11 +42978,11 @@ pub struct ITransferAdviseSink_Vtbl { pub trait ITransferAdviseSink_Impl: windows_core::IUnknownImpl { fn UpdateProgress(&self, ullsizecurrent: u64, ullsizetotal: u64, nfilescurrent: i32, nfilestotal: i32, nfolderscurrent: i32, nfolderstotal: i32) -> windows_core::Result<()>; fn UpdateTransferState(&self, ts: u32) -> windows_core::Result<()>; - fn ConfirmOverwrite(&self, psisource: Option<&IShellItem>, psidestparent: Option<&IShellItem>, pszname: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn ConfirmEncryptionLoss(&self, psisource: Option<&IShellItem>) -> windows_core::Result<()>; - fn FileFailure(&self, psi: Option<&IShellItem>, pszitem: &windows_core::PCWSTR, hrerror: windows_core::HRESULT, pszrename: &windows_core::PWSTR, cchrename: u32) -> windows_core::Result<()>; - fn SubStreamFailure(&self, psi: Option<&IShellItem>, pszstreamname: &windows_core::PCWSTR, hrerror: windows_core::HRESULT) -> windows_core::Result<()>; - fn PropertyFailure(&self, psi: Option<&IShellItem>, pkey: *const super::super::Foundation::PROPERTYKEY, hrerror: windows_core::HRESULT) -> windows_core::Result<()>; + fn ConfirmOverwrite(&self, psisource: windows_core::Ref<'_, IShellItem>, psidestparent: windows_core::Ref<'_, IShellItem>, pszname: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn ConfirmEncryptionLoss(&self, psisource: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn FileFailure(&self, psi: windows_core::Ref<'_, IShellItem>, pszitem: &windows_core::PCWSTR, hrerror: windows_core::HRESULT, pszrename: &windows_core::PWSTR, cchrename: u32) -> windows_core::Result<()>; + fn SubStreamFailure(&self, psi: windows_core::Ref<'_, IShellItem>, pszstreamname: &windows_core::PCWSTR, hrerror: windows_core::HRESULT) -> windows_core::Result<()>; + fn PropertyFailure(&self, psi: windows_core::Ref<'_, IShellItem>, pkey: *const super::super::Foundation::PROPERTYKEY, hrerror: windows_core::HRESULT) -> windows_core::Result<()>; } impl ITransferAdviseSink_Vtbl { pub const fn new() -> Self { @@ -42996,23 +42996,23 @@ impl ITransferAdviseSink_Vtbl { } unsafe extern "system" fn ConfirmOverwrite(this: *mut core::ffi::c_void, psisource: *mut core::ffi::c_void, psidestparent: *mut core::ffi::c_void, pszname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferAdviseSink_Impl::ConfirmOverwrite(this, windows_core::from_raw_borrowed(&psisource), windows_core::from_raw_borrowed(&psidestparent), core::mem::transmute(&pszname)).into() + ITransferAdviseSink_Impl::ConfirmOverwrite(this, core::mem::transmute_copy(&psisource), core::mem::transmute_copy(&psidestparent), core::mem::transmute(&pszname)).into() } unsafe extern "system" fn ConfirmEncryptionLoss(this: *mut core::ffi::c_void, psisource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferAdviseSink_Impl::ConfirmEncryptionLoss(this, windows_core::from_raw_borrowed(&psisource)).into() + ITransferAdviseSink_Impl::ConfirmEncryptionLoss(this, core::mem::transmute_copy(&psisource)).into() } unsafe extern "system" fn FileFailure(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pszitem: windows_core::PCWSTR, hrerror: windows_core::HRESULT, pszrename: windows_core::PWSTR, cchrename: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferAdviseSink_Impl::FileFailure(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute(&pszitem), core::mem::transmute_copy(&hrerror), core::mem::transmute(&pszrename), core::mem::transmute_copy(&cchrename)).into() + ITransferAdviseSink_Impl::FileFailure(this, core::mem::transmute_copy(&psi), core::mem::transmute(&pszitem), core::mem::transmute_copy(&hrerror), core::mem::transmute(&pszrename), core::mem::transmute_copy(&cchrename)).into() } unsafe extern "system" fn SubStreamFailure(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pszstreamname: windows_core::PCWSTR, hrerror: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferAdviseSink_Impl::SubStreamFailure(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute(&pszstreamname), core::mem::transmute_copy(&hrerror)).into() + ITransferAdviseSink_Impl::SubStreamFailure(this, core::mem::transmute_copy(&psi), core::mem::transmute(&pszstreamname), core::mem::transmute_copy(&hrerror)).into() } unsafe extern "system" fn PropertyFailure(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, pkey: *const super::super::Foundation::PROPERTYKEY, hrerror: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferAdviseSink_Impl::PropertyFailure(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&pkey), core::mem::transmute_copy(&hrerror)).into() + ITransferAdviseSink_Impl::PropertyFailure(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&pkey), core::mem::transmute_copy(&hrerror)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -43058,7 +43058,7 @@ pub struct ITransferDestination_Vtbl { pub CreateItem: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PCWSTR, u32, u64, u32, *const windows_core::GUID, *mut *mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITransferDestination_Impl: windows_core::IUnknownImpl { - fn Advise(&self, psink: Option<&ITransferAdviseSink>) -> windows_core::Result; + fn Advise(&self, psink: windows_core::Ref<'_, ITransferAdviseSink>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; fn CreateItem(&self, pszname: &windows_core::PCWSTR, dwattributes: u32, ullsize: u64, flags: u32, riiditem: *const windows_core::GUID, ppvitem: *mut *mut core::ffi::c_void, riidresources: *const windows_core::GUID, ppvresources: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; } @@ -43066,7 +43066,7 @@ impl ITransferDestination_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransferDestination_Impl::Advise(this, windows_core::from_raw_borrowed(&psink)) { + match ITransferDestination_Impl::Advise(this, core::mem::transmute_copy(&psink)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43235,26 +43235,26 @@ pub struct ITransferSource_Vtbl { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub trait ITransferSource_Impl: windows_core::IUnknownImpl { - fn Advise(&self, psink: Option<&ITransferAdviseSink>) -> windows_core::Result; + fn Advise(&self, psink: windows_core::Ref<'_, ITransferAdviseSink>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; - fn SetProperties(&self, pproparray: Option<&PropertiesSystem::IPropertyChangeArray>) -> windows_core::Result<()>; - fn OpenItem(&self, psi: Option<&IShellItem>, flags: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; - fn MoveItem(&self, psi: Option<&IShellItem>, psiparentdst: Option<&IShellItem>, psznamedst: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; - fn RecycleItem(&self, psisource: Option<&IShellItem>, psiparentdest: Option<&IShellItem>, flags: u32) -> windows_core::Result; - fn RemoveItem(&self, psisource: Option<&IShellItem>, flags: u32) -> windows_core::Result<()>; - fn RenameItem(&self, psisource: Option<&IShellItem>, psznewname: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; - fn LinkItem(&self, psisource: Option<&IShellItem>, psiparentdest: Option<&IShellItem>, psznewname: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; - fn ApplyPropertiesToItem(&self, psisource: Option<&IShellItem>) -> windows_core::Result; - fn GetDefaultDestinationName(&self, psisource: Option<&IShellItem>, psiparentdest: Option<&IShellItem>) -> windows_core::Result; - fn EnterFolder(&self, psichildfolderdest: Option<&IShellItem>) -> windows_core::Result<()>; - fn LeaveFolder(&self, psichildfolderdest: Option<&IShellItem>) -> windows_core::Result<()>; + fn SetProperties(&self, pproparray: windows_core::Ref<'_, PropertiesSystem::IPropertyChangeArray>) -> windows_core::Result<()>; + fn OpenItem(&self, psi: windows_core::Ref<'_, IShellItem>, flags: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()>; + fn MoveItem(&self, psi: windows_core::Ref<'_, IShellItem>, psiparentdst: windows_core::Ref<'_, IShellItem>, psznamedst: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; + fn RecycleItem(&self, psisource: windows_core::Ref<'_, IShellItem>, psiparentdest: windows_core::Ref<'_, IShellItem>, flags: u32) -> windows_core::Result; + fn RemoveItem(&self, psisource: windows_core::Ref<'_, IShellItem>, flags: u32) -> windows_core::Result<()>; + fn RenameItem(&self, psisource: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; + fn LinkItem(&self, psisource: windows_core::Ref<'_, IShellItem>, psiparentdest: windows_core::Ref<'_, IShellItem>, psznewname: &windows_core::PCWSTR, flags: u32) -> windows_core::Result; + fn ApplyPropertiesToItem(&self, psisource: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; + fn GetDefaultDestinationName(&self, psisource: windows_core::Ref<'_, IShellItem>, psiparentdest: windows_core::Ref<'_, IShellItem>) -> windows_core::Result; + fn EnterFolder(&self, psichildfolderdest: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; + fn LeaveFolder(&self, psichildfolderdest: windows_core::Ref<'_, IShellItem>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] impl ITransferSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransferSource_Impl::Advise(this, windows_core::from_raw_borrowed(&psink)) { + match ITransferSource_Impl::Advise(this, core::mem::transmute_copy(&psink)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43268,15 +43268,15 @@ impl ITransferSource_Vtbl { } unsafe extern "system" fn SetProperties(this: *mut core::ffi::c_void, pproparray: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferSource_Impl::SetProperties(this, windows_core::from_raw_borrowed(&pproparray)).into() + ITransferSource_Impl::SetProperties(this, core::mem::transmute_copy(&pproparray)).into() } unsafe extern "system" fn OpenItem(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, flags: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferSource_Impl::OpenItem(this, windows_core::from_raw_borrowed(&psi), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() + ITransferSource_Impl::OpenItem(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&flags), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&ppv)).into() } unsafe extern "system" fn MoveItem(this: *mut core::ffi::c_void, psi: *mut core::ffi::c_void, psiparentdst: *mut core::ffi::c_void, psznamedst: windows_core::PCWSTR, flags: u32, ppsinew: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransferSource_Impl::MoveItem(this, windows_core::from_raw_borrowed(&psi), windows_core::from_raw_borrowed(&psiparentdst), core::mem::transmute(&psznamedst), core::mem::transmute_copy(&flags)) { + match ITransferSource_Impl::MoveItem(this, core::mem::transmute_copy(&psi), core::mem::transmute_copy(&psiparentdst), core::mem::transmute(&psznamedst), core::mem::transmute_copy(&flags)) { Ok(ok__) => { ppsinew.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43286,7 +43286,7 @@ impl ITransferSource_Vtbl { } unsafe extern "system" fn RecycleItem(this: *mut core::ffi::c_void, psisource: *mut core::ffi::c_void, psiparentdest: *mut core::ffi::c_void, flags: u32, ppsinewdest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransferSource_Impl::RecycleItem(this, windows_core::from_raw_borrowed(&psisource), windows_core::from_raw_borrowed(&psiparentdest), core::mem::transmute_copy(&flags)) { + match ITransferSource_Impl::RecycleItem(this, core::mem::transmute_copy(&psisource), core::mem::transmute_copy(&psiparentdest), core::mem::transmute_copy(&flags)) { Ok(ok__) => { ppsinewdest.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43296,11 +43296,11 @@ impl ITransferSource_Vtbl { } unsafe extern "system" fn RemoveItem(this: *mut core::ffi::c_void, psisource: *mut core::ffi::c_void, flags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferSource_Impl::RemoveItem(this, windows_core::from_raw_borrowed(&psisource), core::mem::transmute_copy(&flags)).into() + ITransferSource_Impl::RemoveItem(this, core::mem::transmute_copy(&psisource), core::mem::transmute_copy(&flags)).into() } unsafe extern "system" fn RenameItem(this: *mut core::ffi::c_void, psisource: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR, flags: u32, ppsinewdest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransferSource_Impl::RenameItem(this, windows_core::from_raw_borrowed(&psisource), core::mem::transmute(&psznewname), core::mem::transmute_copy(&flags)) { + match ITransferSource_Impl::RenameItem(this, core::mem::transmute_copy(&psisource), core::mem::transmute(&psznewname), core::mem::transmute_copy(&flags)) { Ok(ok__) => { ppsinewdest.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43310,7 +43310,7 @@ impl ITransferSource_Vtbl { } unsafe extern "system" fn LinkItem(this: *mut core::ffi::c_void, psisource: *mut core::ffi::c_void, psiparentdest: *mut core::ffi::c_void, psznewname: windows_core::PCWSTR, flags: u32, ppsinewdest: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransferSource_Impl::LinkItem(this, windows_core::from_raw_borrowed(&psisource), windows_core::from_raw_borrowed(&psiparentdest), core::mem::transmute(&psznewname), core::mem::transmute_copy(&flags)) { + match ITransferSource_Impl::LinkItem(this, core::mem::transmute_copy(&psisource), core::mem::transmute_copy(&psiparentdest), core::mem::transmute(&psznewname), core::mem::transmute_copy(&flags)) { Ok(ok__) => { ppsinewdest.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43320,7 +43320,7 @@ impl ITransferSource_Vtbl { } unsafe extern "system" fn ApplyPropertiesToItem(this: *mut core::ffi::c_void, psisource: *mut core::ffi::c_void, ppsinew: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransferSource_Impl::ApplyPropertiesToItem(this, windows_core::from_raw_borrowed(&psisource)) { + match ITransferSource_Impl::ApplyPropertiesToItem(this, core::mem::transmute_copy(&psisource)) { Ok(ok__) => { ppsinew.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43330,7 +43330,7 @@ impl ITransferSource_Vtbl { } unsafe extern "system" fn GetDefaultDestinationName(this: *mut core::ffi::c_void, psisource: *mut core::ffi::c_void, psiparentdest: *mut core::ffi::c_void, ppszdestinationname: *mut windows_core::PWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITransferSource_Impl::GetDefaultDestinationName(this, windows_core::from_raw_borrowed(&psisource), windows_core::from_raw_borrowed(&psiparentdest)) { + match ITransferSource_Impl::GetDefaultDestinationName(this, core::mem::transmute_copy(&psisource), core::mem::transmute_copy(&psiparentdest)) { Ok(ok__) => { ppszdestinationname.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43340,11 +43340,11 @@ impl ITransferSource_Vtbl { } unsafe extern "system" fn EnterFolder(this: *mut core::ffi::c_void, psichildfolderdest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferSource_Impl::EnterFolder(this, windows_core::from_raw_borrowed(&psichildfolderdest)).into() + ITransferSource_Impl::EnterFolder(this, core::mem::transmute_copy(&psichildfolderdest)).into() } unsafe extern "system" fn LeaveFolder(this: *mut core::ffi::c_void, psichildfolderdest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITransferSource_Impl::LeaveFolder(this, windows_core::from_raw_borrowed(&psichildfolderdest)).into() + ITransferSource_Impl::LeaveFolder(this, core::mem::transmute_copy(&psichildfolderdest)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -43402,8 +43402,8 @@ pub struct ITravelEntry_Vtbl { } #[cfg(feature = "Win32_UI_Shell_Common")] pub trait ITravelEntry_Impl: windows_core::IUnknownImpl { - fn Invoke(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn Update(&self, punk: Option<&windows_core::IUnknown>, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Invoke(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn Update(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetPidl(&self) -> windows_core::Result<*mut Common::ITEMIDLIST>; } #[cfg(feature = "Win32_UI_Shell_Common")] @@ -43411,11 +43411,11 @@ impl ITravelEntry_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Invoke(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelEntry_Impl::Invoke(this, windows_core::from_raw_borrowed(&punk)).into() + ITravelEntry_Impl::Invoke(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn Update(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelEntry_Impl::Update(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&fislocalanchor)).into() + ITravelEntry_Impl::Update(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&fislocalanchor)).into() } unsafe extern "system" fn GetPidl(this: *mut core::ffi::c_void, ppidl: *mut *mut Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -43532,16 +43532,16 @@ pub struct ITravelLog_Vtbl { } #[cfg(all(feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] pub trait ITravelLog_Impl: windows_core::IUnknownImpl { - fn AddEntry(&self, punk: Option<&windows_core::IUnknown>, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn UpdateEntry(&self, punk: Option<&windows_core::IUnknown>, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn UpdateExternal(&self, punk: Option<&windows_core::IUnknown>, punkhlbrowsecontext: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn Travel(&self, punk: Option<&windows_core::IUnknown>, ioffset: i32) -> windows_core::Result<()>; - fn GetTravelEntry(&self, punk: Option<&windows_core::IUnknown>, ioffset: i32, ppte: *mut Option) -> windows_core::Result<()>; - fn FindTravelEntry(&self, punk: Option<&windows_core::IUnknown>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result; - fn GetToolTipText(&self, punk: Option<&windows_core::IUnknown>, ioffset: i32, idstemplate: i32, pwztext: windows_core::PWSTR, cchtext: u32) -> windows_core::Result<()>; - fn InsertMenuEntries(&self, punk: Option<&windows_core::IUnknown>, hmenu: super::WindowsAndMessaging::HMENU, npos: i32, idfirst: i32, idlast: i32, dwflags: u32) -> windows_core::Result<()>; + fn AddEntry(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn UpdateEntry(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn UpdateExternal(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, punkhlbrowsecontext: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn Travel(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, ioffset: i32) -> windows_core::Result<()>; + fn GetTravelEntry(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, ioffset: i32, ppte: windows_core::OutRef<'_, ITravelEntry>) -> windows_core::Result<()>; + fn FindTravelEntry(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, pidl: *const Common::ITEMIDLIST) -> windows_core::Result; + fn GetToolTipText(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, ioffset: i32, idstemplate: i32, pwztext: windows_core::PWSTR, cchtext: u32) -> windows_core::Result<()>; + fn InsertMenuEntries(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, hmenu: super::WindowsAndMessaging::HMENU, npos: i32, idfirst: i32, idlast: i32, dwflags: u32) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; - fn CountEntries(&self, punk: Option<&windows_core::IUnknown>) -> u32; + fn CountEntries(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> u32; fn Revert(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] @@ -43549,27 +43549,27 @@ impl ITravelLog_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddEntry(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLog_Impl::AddEntry(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&fislocalanchor)).into() + ITravelLog_Impl::AddEntry(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&fislocalanchor)).into() } unsafe extern "system" fn UpdateEntry(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, fislocalanchor: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLog_Impl::UpdateEntry(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&fislocalanchor)).into() + ITravelLog_Impl::UpdateEntry(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&fislocalanchor)).into() } unsafe extern "system" fn UpdateExternal(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, punkhlbrowsecontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLog_Impl::UpdateExternal(this, windows_core::from_raw_borrowed(&punk), windows_core::from_raw_borrowed(&punkhlbrowsecontext)).into() + ITravelLog_Impl::UpdateExternal(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&punkhlbrowsecontext)).into() } unsafe extern "system" fn Travel(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, ioffset: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLog_Impl::Travel(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&ioffset)).into() + ITravelLog_Impl::Travel(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&ioffset)).into() } unsafe extern "system" fn GetTravelEntry(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, ioffset: i32, ppte: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLog_Impl::GetTravelEntry(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&ioffset), core::mem::transmute_copy(&ppte)).into() + ITravelLog_Impl::GetTravelEntry(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&ioffset), core::mem::transmute_copy(&ppte)).into() } unsafe extern "system" fn FindTravelEntry(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, pidl: *const Common::ITEMIDLIST, ppte: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITravelLog_Impl::FindTravelEntry(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&pidl)) { + match ITravelLog_Impl::FindTravelEntry(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&pidl)) { Ok(ok__) => { ppte.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43579,11 +43579,11 @@ impl ITravelLog_Vtbl { } unsafe extern "system" fn GetToolTipText(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, ioffset: i32, idstemplate: i32, pwztext: windows_core::PWSTR, cchtext: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLog_Impl::GetToolTipText(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&ioffset), core::mem::transmute_copy(&idstemplate), core::mem::transmute_copy(&pwztext), core::mem::transmute_copy(&cchtext)).into() + ITravelLog_Impl::GetToolTipText(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&ioffset), core::mem::transmute_copy(&idstemplate), core::mem::transmute_copy(&pwztext), core::mem::transmute_copy(&cchtext)).into() } unsafe extern "system" fn InsertMenuEntries(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, hmenu: super::WindowsAndMessaging::HMENU, npos: i32, idfirst: i32, idlast: i32, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLog_Impl::InsertMenuEntries(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&hmenu), core::mem::transmute_copy(&npos), core::mem::transmute_copy(&idfirst), core::mem::transmute_copy(&idlast), core::mem::transmute_copy(&dwflags)).into() + ITravelLog_Impl::InsertMenuEntries(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&hmenu), core::mem::transmute_copy(&npos), core::mem::transmute_copy(&idfirst), core::mem::transmute_copy(&idlast), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, pptl: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -43597,7 +43597,7 @@ impl ITravelLog_Vtbl { } unsafe extern "system" fn CountEntries(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> u32 { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLog_Impl::CountEntries(this, windows_core::from_raw_borrowed(&punk)) + ITravelLog_Impl::CountEntries(this, core::mem::transmute_copy(&punk)) } unsafe extern "system" fn Revert(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -43658,7 +43658,7 @@ pub struct ITravelLogClient_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] pub trait ITravelLogClient_Impl: windows_core::IUnknownImpl { fn FindWindowByIndex(&self, dwid: u32) -> windows_core::Result; - fn GetWindowData(&self, pstream: Option<&super::super::System::Com::IStream>, pwindata: *mut WINDOWDATA) -> windows_core::Result<()>; + fn GetWindowData(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, pwindata: *mut WINDOWDATA) -> windows_core::Result<()>; fn LoadHistoryPosition(&self, pszurllocation: &windows_core::PCWSTR, dwposition: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] @@ -43676,7 +43676,7 @@ impl ITravelLogClient_Vtbl { } unsafe extern "system" fn GetWindowData(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, pwindata: *mut WINDOWDATA) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLogClient_Impl::GetWindowData(this, windows_core::from_raw_borrowed(&pstream), core::mem::transmute_copy(&pwindata)).into() + ITravelLogClient_Impl::GetWindowData(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&pwindata)).into() } unsafe extern "system" fn LoadHistoryPosition(this: *mut core::ffi::c_void, pszurllocation: windows_core::PCWSTR, dwposition: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -43802,19 +43802,19 @@ pub struct ITravelLogStg_Vtbl { pub GetRelativeEntry: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITravelLogStg_Impl: windows_core::IUnknownImpl { - fn CreateEntry(&self, pszurl: &windows_core::PCWSTR, psztitle: &windows_core::PCWSTR, ptlerelativeto: Option<&ITravelLogEntry>, fprepend: super::super::Foundation::BOOL) -> windows_core::Result; - fn TravelTo(&self, ptle: Option<&ITravelLogEntry>) -> windows_core::Result<()>; + fn CreateEntry(&self, pszurl: &windows_core::PCWSTR, psztitle: &windows_core::PCWSTR, ptlerelativeto: windows_core::Ref<'_, ITravelLogEntry>, fprepend: super::super::Foundation::BOOL) -> windows_core::Result; + fn TravelTo(&self, ptle: windows_core::Ref<'_, ITravelLogEntry>) -> windows_core::Result<()>; fn EnumEntries(&self, flags: TLENUMF) -> windows_core::Result; fn FindEntries(&self, flags: TLENUMF, pszurl: &windows_core::PCWSTR) -> windows_core::Result; fn GetCount(&self, flags: TLENUMF) -> windows_core::Result; - fn RemoveEntry(&self, ptle: Option<&ITravelLogEntry>) -> windows_core::Result<()>; + fn RemoveEntry(&self, ptle: windows_core::Ref<'_, ITravelLogEntry>) -> windows_core::Result<()>; fn GetRelativeEntry(&self, ioffset: i32) -> windows_core::Result; } impl ITravelLogStg_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateEntry(this: *mut core::ffi::c_void, pszurl: windows_core::PCWSTR, psztitle: windows_core::PCWSTR, ptlerelativeto: *mut core::ffi::c_void, fprepend: super::super::Foundation::BOOL, pptle: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITravelLogStg_Impl::CreateEntry(this, core::mem::transmute(&pszurl), core::mem::transmute(&psztitle), windows_core::from_raw_borrowed(&ptlerelativeto), core::mem::transmute_copy(&fprepend)) { + match ITravelLogStg_Impl::CreateEntry(this, core::mem::transmute(&pszurl), core::mem::transmute(&psztitle), core::mem::transmute_copy(&ptlerelativeto), core::mem::transmute_copy(&fprepend)) { Ok(ok__) => { pptle.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -43824,7 +43824,7 @@ impl ITravelLogStg_Vtbl { } unsafe extern "system" fn TravelTo(this: *mut core::ffi::c_void, ptle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLogStg_Impl::TravelTo(this, windows_core::from_raw_borrowed(&ptle)).into() + ITravelLogStg_Impl::TravelTo(this, core::mem::transmute_copy(&ptle)).into() } unsafe extern "system" fn EnumEntries(this: *mut core::ffi::c_void, flags: TLENUMF, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -43858,7 +43858,7 @@ impl ITravelLogStg_Vtbl { } unsafe extern "system" fn RemoveEntry(this: *mut core::ffi::c_void, ptle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITravelLogStg_Impl::RemoveEntry(this, windows_core::from_raw_borrowed(&ptle)).into() + ITravelLogStg_Impl::RemoveEntry(this, core::mem::transmute_copy(&ptle)).into() } unsafe extern "system" fn GetRelativeEntry(this: *mut core::ffi::c_void, ioffset: i32, ptle: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -43997,13 +43997,13 @@ pub struct IURLSearchHook2_Vtbl { pub TranslateWithSearchContext: unsafe extern "system" fn(*mut core::ffi::c_void, windows_core::PWSTR, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IURLSearchHook2_Impl: IURLSearchHook_Impl { - fn TranslateWithSearchContext(&self, pwszsearchurl: windows_core::PWSTR, cchbuffersize: u32, psearchcontext: Option<&ISearchContext>) -> windows_core::Result<()>; + fn TranslateWithSearchContext(&self, pwszsearchurl: windows_core::PWSTR, cchbuffersize: u32, psearchcontext: windows_core::Ref<'_, ISearchContext>) -> windows_core::Result<()>; } impl IURLSearchHook2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TranslateWithSearchContext(this: *mut core::ffi::c_void, pwszsearchurl: windows_core::PWSTR, cchbuffersize: u32, psearchcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IURLSearchHook2_Impl::TranslateWithSearchContext(this, core::mem::transmute_copy(&pwszsearchurl), core::mem::transmute_copy(&cchbuffersize), windows_core::from_raw_borrowed(&psearchcontext)).into() + IURLSearchHook2_Impl::TranslateWithSearchContext(this, core::mem::transmute_copy(&pwszsearchurl), core::mem::transmute_copy(&cchbuffersize), core::mem::transmute_copy(&psearchcontext)).into() } Self { base__: IURLSearchHook_Vtbl::new::(), TranslateWithSearchContext: TranslateWithSearchContext:: } } @@ -44169,14 +44169,14 @@ pub struct IUpdateIDList_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] pub trait IUpdateIDList_Impl: windows_core::IUnknownImpl { - fn Update(&self, pbc: Option<&super::super::System::Com::IBindCtx>, pidlin: *const Common::ITEMIDLIST) -> windows_core::Result<*mut Common::ITEMIDLIST>; + fn Update(&self, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, pidlin: *const Common::ITEMIDLIST) -> windows_core::Result<*mut Common::ITEMIDLIST>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] impl IUpdateIDList_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Update(this: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, pidlin: *const Common::ITEMIDLIST, ppidlout: *mut *mut Common::ITEMIDLIST) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IUpdateIDList_Impl::Update(this, windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&pidlin)) { + match IUpdateIDList_Impl::Update(this, core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pidlin)) { Ok(ok__) => { ppidlout.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -44298,7 +44298,7 @@ pub trait IUserNotification_Impl: windows_core::IUnknownImpl { fn SetBalloonInfo(&self, psztitle: &windows_core::PCWSTR, psztext: &windows_core::PCWSTR, dwinfoflags: u32) -> windows_core::Result<()>; fn SetBalloonRetry(&self, dwshowtime: u32, dwinterval: u32, cretrycount: u32) -> windows_core::Result<()>; fn SetIconInfo(&self, hicon: super::WindowsAndMessaging::HICON, psztooltip: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn Show(&self, pqc: Option<&IQueryContinue>, dwcontinuepollinterval: u32) -> windows_core::Result<()>; + fn Show(&self, pqc: windows_core::Ref<'_, IQueryContinue>, dwcontinuepollinterval: u32) -> windows_core::Result<()>; fn PlaySound(&self, pszsoundname: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -44318,7 +44318,7 @@ impl IUserNotification_Vtbl { } unsafe extern "system" fn Show(this: *mut core::ffi::c_void, pqc: *mut core::ffi::c_void, dwcontinuepollinterval: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUserNotification_Impl::Show(this, windows_core::from_raw_borrowed(&pqc), core::mem::transmute_copy(&dwcontinuepollinterval)).into() + IUserNotification_Impl::Show(this, core::mem::transmute_copy(&pqc), core::mem::transmute_copy(&dwcontinuepollinterval)).into() } unsafe extern "system" fn PlaySound(this: *mut core::ffi::c_void, pszsoundname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -44390,7 +44390,7 @@ pub trait IUserNotification2_Impl: windows_core::IUnknownImpl { fn SetBalloonInfo(&self, psztitle: &windows_core::PCWSTR, psztext: &windows_core::PCWSTR, dwinfoflags: u32) -> windows_core::Result<()>; fn SetBalloonRetry(&self, dwshowtime: u32, dwinterval: u32, cretrycount: u32) -> windows_core::Result<()>; fn SetIconInfo(&self, hicon: super::WindowsAndMessaging::HICON, psztooltip: &windows_core::PCWSTR) -> windows_core::Result<()>; - fn Show(&self, pqc: Option<&IQueryContinue>, dwcontinuepollinterval: u32, psink: Option<&IUserNotificationCallback>) -> windows_core::Result<()>; + fn Show(&self, pqc: windows_core::Ref<'_, IQueryContinue>, dwcontinuepollinterval: u32, psink: windows_core::Ref<'_, IUserNotificationCallback>) -> windows_core::Result<()>; fn PlaySound(&self, pszsoundname: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -44410,7 +44410,7 @@ impl IUserNotification2_Vtbl { } unsafe extern "system" fn Show(this: *mut core::ffi::c_void, pqc: *mut core::ffi::c_void, dwcontinuepollinterval: u32, psink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUserNotification2_Impl::Show(this, windows_core::from_raw_borrowed(&pqc), core::mem::transmute_copy(&dwcontinuepollinterval), windows_core::from_raw_borrowed(&psink)).into() + IUserNotification2_Impl::Show(this, core::mem::transmute_copy(&pqc), core::mem::transmute_copy(&dwcontinuepollinterval), core::mem::transmute_copy(&psink)).into() } unsafe extern "system" fn PlaySound(this: *mut core::ffi::c_void, pszsoundname: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs index 8ea42f2a57..3c874c7d12 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs @@ -1350,7 +1350,7 @@ pub trait IDynamicRenderer_Impl: windows_core::IUnknownImpl { fn ClipRegion(&self) -> windows_core::Result; fn SetClipRegion(&self, hcliprgn: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()>; fn DrawingAttributes(&self) -> windows_core::Result; - fn putref_DrawingAttributes(&self, pida: Option<&IInkDrawingAttributes>) -> windows_core::Result<()>; + fn putref_DrawingAttributes(&self, pida: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result<()>; fn DataCacheEnabled(&self) -> windows_core::Result; fn SetDataCacheEnabled(&self, fcachedata: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn ReleaseCachedData(&self, strokeid: u32) -> windows_core::Result<()>; @@ -1428,7 +1428,7 @@ impl IDynamicRenderer_Vtbl { } unsafe extern "system" fn putref_DrawingAttributes(this: *mut core::ffi::c_void, pida: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDynamicRenderer_Impl::putref_DrawingAttributes(this, windows_core::from_raw_borrowed(&pida)).into() + IDynamicRenderer_Impl::putref_DrawingAttributes(this, core::mem::transmute_copy(&pida)).into() } unsafe extern "system" fn DataCacheEnabled(this: *mut core::ffi::c_void, pfcachedata: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -1669,7 +1669,7 @@ pub struct IHandwrittenTextInsertion_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait IHandwrittenTextInsertion_Impl: windows_core::IUnknownImpl { fn InsertRecognitionResultsArray(&self, psaalternates: *const super::super::System::Com::SAFEARRAY, locale: u32, falternatecontainsautospacinginformation: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn InsertInkRecognitionResult(&self, piinkrecoresult: Option<&IInkRecognitionResult>, locale: u32, falternatecontainsautospacinginformation: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn InsertInkRecognitionResult(&self, piinkrecoresult: windows_core::Ref<'_, IInkRecognitionResult>, locale: u32, falternatecontainsautospacinginformation: super::super::Foundation::BOOL) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IHandwrittenTextInsertion_Vtbl { @@ -1680,7 +1680,7 @@ impl IHandwrittenTextInsertion_Vtbl { } unsafe extern "system" fn InsertInkRecognitionResult(this: *mut core::ffi::c_void, piinkrecoresult: *mut core::ffi::c_void, locale: u32, falternatecontainsautospacinginformation: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IHandwrittenTextInsertion_Impl::InsertInkRecognitionResult(this, windows_core::from_raw_borrowed(&piinkrecoresult), core::mem::transmute_copy(&locale), core::mem::transmute_copy(&falternatecontainsautospacinginformation)).into() + IHandwrittenTextInsertion_Impl::InsertInkRecognitionResult(this, core::mem::transmute_copy(&piinkrecoresult), core::mem::transmute_copy(&locale), core::mem::transmute_copy(&falternatecontainsautospacinginformation)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1969,11 +1969,11 @@ pub trait IInkCollector_Impl: super::super::System::Com::IDispatch_Impl { fn Enabled(&self) -> windows_core::Result; fn SetEnabled(&self, collecting: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn DefaultDrawingAttributes(&self) -> windows_core::Result; - fn putref_DefaultDrawingAttributes(&self, newattributes: Option<&IInkDrawingAttributes>) -> windows_core::Result<()>; + fn putref_DefaultDrawingAttributes(&self, newattributes: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result<()>; fn Renderer(&self) -> windows_core::Result; - fn putref_Renderer(&self, newinkrenderer: Option<&IInkRenderer>) -> windows_core::Result<()>; + fn putref_Renderer(&self, newinkrenderer: windows_core::Ref<'_, IInkRenderer>) -> windows_core::Result<()>; fn Ink(&self) -> windows_core::Result; - fn putref_Ink(&self, newink: Option<&IInkDisp>) -> windows_core::Result<()>; + fn putref_Ink(&self, newink: windows_core::Ref<'_, IInkDisp>) -> windows_core::Result<()>; fn AutoRedraw(&self) -> windows_core::Result; fn SetAutoRedraw(&self, autoredraw: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn CollectingInk(&self) -> windows_core::Result; @@ -1984,8 +1984,8 @@ pub trait IInkCollector_Impl: super::super::System::Com::IDispatch_Impl { fn DesiredPacketDescription(&self) -> windows_core::Result; fn SetDesiredPacketDescription(&self, packetguids: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn MouseIcon(&self) -> windows_core::Result; - fn SetMouseIcon(&self, mouseicon: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; - fn putref_MouseIcon(&self, mouseicon: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn SetMouseIcon(&self, mouseicon: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn putref_MouseIcon(&self, mouseicon: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; fn MousePointer(&self) -> windows_core::Result; fn SetMousePointer(&self, mousepointer: InkMousePointer) -> windows_core::Result<()>; fn Cursors(&self) -> windows_core::Result; @@ -1998,10 +1998,10 @@ pub trait IInkCollector_Impl: super::super::System::Com::IDispatch_Impl { fn SetSupportHighContrastInk(&self, support: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn GetGestureStatus(&self, gesture: InkApplicationGesture) -> windows_core::Result; - fn GetWindowInputRectangle(&self, windowinputrectangle: *mut Option) -> windows_core::Result<()>; - fn SetWindowInputRectangle(&self, windowinputrectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn GetWindowInputRectangle(&self, windowinputrectangle: windows_core::OutRef<'_, IInkRectangle>) -> windows_core::Result<()>; + fn SetWindowInputRectangle(&self, windowinputrectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn SetAllTabletsMode(&self, usemouseforinput: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn SetSingleTabletIntegratedMode(&self, tablet: Option<&IInkTablet>) -> windows_core::Result<()>; + fn SetSingleTabletIntegratedMode(&self, tablet: windows_core::Ref<'_, IInkTablet>) -> windows_core::Result<()>; fn GetEventInterest(&self, eventid: InkCollectorEventInterest) -> windows_core::Result; fn SetEventInterest(&self, eventid: InkCollectorEventInterest, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } @@ -2048,7 +2048,7 @@ impl IInkCollector_Vtbl { } unsafe extern "system" fn putref_DefaultDrawingAttributes(this: *mut core::ffi::c_void, newattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkCollector_Impl::putref_DefaultDrawingAttributes(this, windows_core::from_raw_borrowed(&newattributes)).into() + IInkCollector_Impl::putref_DefaultDrawingAttributes(this, core::mem::transmute_copy(&newattributes)).into() } unsafe extern "system" fn Renderer(this: *mut core::ffi::c_void, currentinkrenderer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2062,7 +2062,7 @@ impl IInkCollector_Vtbl { } unsafe extern "system" fn putref_Renderer(this: *mut core::ffi::c_void, newinkrenderer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkCollector_Impl::putref_Renderer(this, windows_core::from_raw_borrowed(&newinkrenderer)).into() + IInkCollector_Impl::putref_Renderer(this, core::mem::transmute_copy(&newinkrenderer)).into() } unsafe extern "system" fn Ink(this: *mut core::ffi::c_void, ink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2076,7 +2076,7 @@ impl IInkCollector_Vtbl { } unsafe extern "system" fn putref_Ink(this: *mut core::ffi::c_void, newink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkCollector_Impl::putref_Ink(this, windows_core::from_raw_borrowed(&newink)).into() + IInkCollector_Impl::putref_Ink(this, core::mem::transmute_copy(&newink)).into() } unsafe extern "system" fn AutoRedraw(this: *mut core::ffi::c_void, autoredraw: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2156,11 +2156,11 @@ impl IInkCollector_Vtbl { } unsafe extern "system" fn SetMouseIcon(this: *mut core::ffi::c_void, mouseicon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkCollector_Impl::SetMouseIcon(this, windows_core::from_raw_borrowed(&mouseicon)).into() + IInkCollector_Impl::SetMouseIcon(this, core::mem::transmute_copy(&mouseicon)).into() } unsafe extern "system" fn putref_MouseIcon(this: *mut core::ffi::c_void, mouseicon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkCollector_Impl::putref_MouseIcon(this, windows_core::from_raw_borrowed(&mouseicon)).into() + IInkCollector_Impl::putref_MouseIcon(this, core::mem::transmute_copy(&mouseicon)).into() } unsafe extern "system" fn MousePointer(this: *mut core::ffi::c_void, mousepointer: *mut InkMousePointer) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2258,7 +2258,7 @@ impl IInkCollector_Vtbl { } unsafe extern "system" fn SetWindowInputRectangle(this: *mut core::ffi::c_void, windowinputrectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkCollector_Impl::SetWindowInputRectangle(this, windows_core::from_raw_borrowed(&windowinputrectangle)).into() + IInkCollector_Impl::SetWindowInputRectangle(this, core::mem::transmute_copy(&windowinputrectangle)).into() } unsafe extern "system" fn SetAllTabletsMode(this: *mut core::ffi::c_void, usemouseforinput: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2266,7 +2266,7 @@ impl IInkCollector_Vtbl { } unsafe extern "system" fn SetSingleTabletIntegratedMode(this: *mut core::ffi::c_void, tablet: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkCollector_Impl::SetSingleTabletIntegratedMode(this, windows_core::from_raw_borrowed(&tablet)).into() + IInkCollector_Impl::SetSingleTabletIntegratedMode(this, core::mem::transmute_copy(&tablet)).into() } unsafe extern "system" fn GetEventInterest(this: *mut core::ffi::c_void, eventid: InkCollectorEventInterest, listen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2394,7 +2394,7 @@ pub trait IInkCursor_Impl: super::super::System::Com::IDispatch_Impl { fn Id(&self) -> windows_core::Result; fn Inverted(&self) -> windows_core::Result; fn DrawingAttributes(&self) -> windows_core::Result; - fn putref_DrawingAttributes(&self, attributes: Option<&IInkDrawingAttributes>) -> windows_core::Result<()>; + fn putref_DrawingAttributes(&self, attributes: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result<()>; fn Tablet(&self) -> windows_core::Result; fn Buttons(&self) -> windows_core::Result; } @@ -2443,7 +2443,7 @@ impl IInkCursor_Vtbl { } unsafe extern "system" fn putref_DrawingAttributes(this: *mut core::ffi::c_void, attributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkCursor_Impl::putref_DrawingAttributes(this, windows_core::from_raw_borrowed(&attributes)).into() + IInkCursor_Impl::putref_DrawingAttributes(this, core::mem::transmute_copy(&attributes)).into() } unsafe extern "system" fn Tablet(this: *mut core::ffi::c_void, tablet: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2806,7 +2806,7 @@ pub trait IInkCustomStrokes_Impl: super::super::System::Com::IDispatch_Impl { fn Count(&self) -> windows_core::Result; fn _NewEnum(&self) -> windows_core::Result; fn Item(&self, identifier: &super::super::System::Variant::VARIANT) -> windows_core::Result; - fn Add(&self, name: &windows_core::BSTR, strokes: Option<&IInkStrokes>) -> windows_core::Result<()>; + fn Add(&self, name: &windows_core::BSTR, strokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result<()>; fn Remove(&self, identifier: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn Clear(&self) -> windows_core::Result<()>; } @@ -2845,7 +2845,7 @@ impl IInkCustomStrokes_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, name: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkCustomStrokes_Impl::Add(this, core::mem::transmute(&name), windows_core::from_raw_borrowed(&strokes)).into() + IInkCustomStrokes_Impl::Add(this, core::mem::transmute(&name), core::mem::transmute_copy(&strokes)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, identifier: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3085,25 +3085,25 @@ pub trait IInkDisp_Impl: super::super::System::Com::IDispatch_Impl { fn SetDirty(&self, dirty: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn CustomStrokes(&self) -> windows_core::Result; fn GetBoundingBox(&self, boundingboxmode: InkBoundingBoxMode) -> windows_core::Result; - fn DeleteStrokes(&self, strokes: Option<&IInkStrokes>) -> windows_core::Result<()>; - fn DeleteStroke(&self, stroke: Option<&IInkStrokeDisp>) -> windows_core::Result<()>; - fn ExtractStrokes(&self, strokes: Option<&IInkStrokes>, extractflags: InkExtractFlags) -> windows_core::Result; - fn ExtractWithRectangle(&self, rectangle: Option<&IInkRectangle>, extractflags: InkExtractFlags) -> windows_core::Result; - fn Clip(&self, rectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn DeleteStrokes(&self, strokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result<()>; + fn DeleteStroke(&self, stroke: windows_core::Ref<'_, IInkStrokeDisp>) -> windows_core::Result<()>; + fn ExtractStrokes(&self, strokes: windows_core::Ref<'_, IInkStrokes>, extractflags: InkExtractFlags) -> windows_core::Result; + fn ExtractWithRectangle(&self, rectangle: windows_core::Ref<'_, IInkRectangle>, extractflags: InkExtractFlags) -> windows_core::Result; + fn Clip(&self, rectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; fn HitTestCircle(&self, x: i32, y: i32, radius: f32) -> windows_core::Result; - fn HitTestWithRectangle(&self, selectionrectangle: Option<&IInkRectangle>, intersectpercent: f32) -> windows_core::Result; - fn HitTestWithLasso(&self, points: &super::super::System::Variant::VARIANT, intersectpercent: f32, lassopoints: *mut super::super::System::Variant::VARIANT, strokes: *mut Option) -> windows_core::Result<()>; - fn NearestPoint(&self, x: i32, y: i32, pointonstroke: *mut f32, distancefrompacket: *mut f32, stroke: *mut Option) -> windows_core::Result<()>; + fn HitTestWithRectangle(&self, selectionrectangle: windows_core::Ref<'_, IInkRectangle>, intersectpercent: f32) -> windows_core::Result; + fn HitTestWithLasso(&self, points: &super::super::System::Variant::VARIANT, intersectpercent: f32, lassopoints: *mut super::super::System::Variant::VARIANT, strokes: windows_core::OutRef<'_, IInkStrokes>) -> windows_core::Result<()>; + fn NearestPoint(&self, x: i32, y: i32, pointonstroke: *mut f32, distancefrompacket: *mut f32, stroke: windows_core::OutRef<'_, IInkStrokeDisp>) -> windows_core::Result<()>; fn CreateStrokes(&self, strokeids: &super::super::System::Variant::VARIANT) -> windows_core::Result; - fn AddStrokesAtRectangle(&self, sourcestrokes: Option<&IInkStrokes>, targetrectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn AddStrokesAtRectangle(&self, sourcestrokes: windows_core::Ref<'_, IInkStrokes>, targetrectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn Save(&self, persistenceformat: InkPersistenceFormat, compressionmode: InkPersistenceCompressionMode) -> windows_core::Result; fn Load(&self, data: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn CreateStroke(&self, packetdata: &super::super::System::Variant::VARIANT, packetdescription: &super::super::System::Variant::VARIANT) -> windows_core::Result; - fn ClipboardCopyWithRectangle(&self, rectangle: Option<&IInkRectangle>, clipboardformats: InkClipboardFormats, clipboardmodes: InkClipboardModes) -> windows_core::Result; - fn ClipboardCopy(&self, strokes: Option<&IInkStrokes>, clipboardformats: InkClipboardFormats, clipboardmodes: InkClipboardModes) -> windows_core::Result; - fn CanPaste(&self, dataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result; - fn ClipboardPaste(&self, x: i32, y: i32, dataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result; + fn ClipboardCopyWithRectangle(&self, rectangle: windows_core::Ref<'_, IInkRectangle>, clipboardformats: InkClipboardFormats, clipboardmodes: InkClipboardModes) -> windows_core::Result; + fn ClipboardCopy(&self, strokes: windows_core::Ref<'_, IInkStrokes>, clipboardformats: InkClipboardFormats, clipboardmodes: InkClipboardModes) -> windows_core::Result; + fn CanPaste(&self, dataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result; + fn ClipboardPaste(&self, x: i32, y: i32, dataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IInkDisp_Vtbl { @@ -3164,15 +3164,15 @@ impl IInkDisp_Vtbl { } unsafe extern "system" fn DeleteStrokes(this: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkDisp_Impl::DeleteStrokes(this, windows_core::from_raw_borrowed(&strokes)).into() + IInkDisp_Impl::DeleteStrokes(this, core::mem::transmute_copy(&strokes)).into() } unsafe extern "system" fn DeleteStroke(this: *mut core::ffi::c_void, stroke: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkDisp_Impl::DeleteStroke(this, windows_core::from_raw_borrowed(&stroke)).into() + IInkDisp_Impl::DeleteStroke(this, core::mem::transmute_copy(&stroke)).into() } unsafe extern "system" fn ExtractStrokes(this: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void, extractflags: InkExtractFlags, extractedink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkDisp_Impl::ExtractStrokes(this, windows_core::from_raw_borrowed(&strokes), core::mem::transmute_copy(&extractflags)) { + match IInkDisp_Impl::ExtractStrokes(this, core::mem::transmute_copy(&strokes), core::mem::transmute_copy(&extractflags)) { Ok(ok__) => { extractedink.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3182,7 +3182,7 @@ impl IInkDisp_Vtbl { } unsafe extern "system" fn ExtractWithRectangle(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void, extractflags: InkExtractFlags, extractedink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkDisp_Impl::ExtractWithRectangle(this, windows_core::from_raw_borrowed(&rectangle), core::mem::transmute_copy(&extractflags)) { + match IInkDisp_Impl::ExtractWithRectangle(this, core::mem::transmute_copy(&rectangle), core::mem::transmute_copy(&extractflags)) { Ok(ok__) => { extractedink.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3192,7 +3192,7 @@ impl IInkDisp_Vtbl { } unsafe extern "system" fn Clip(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkDisp_Impl::Clip(this, windows_core::from_raw_borrowed(&rectangle)).into() + IInkDisp_Impl::Clip(this, core::mem::transmute_copy(&rectangle)).into() } unsafe extern "system" fn Clone(this: *mut core::ffi::c_void, newink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3216,7 +3216,7 @@ impl IInkDisp_Vtbl { } unsafe extern "system" fn HitTestWithRectangle(this: *mut core::ffi::c_void, selectionrectangle: *mut core::ffi::c_void, intersectpercent: f32, strokes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkDisp_Impl::HitTestWithRectangle(this, windows_core::from_raw_borrowed(&selectionrectangle), core::mem::transmute_copy(&intersectpercent)) { + match IInkDisp_Impl::HitTestWithRectangle(this, core::mem::transmute_copy(&selectionrectangle), core::mem::transmute_copy(&intersectpercent)) { Ok(ok__) => { strokes.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3244,7 +3244,7 @@ impl IInkDisp_Vtbl { } unsafe extern "system" fn AddStrokesAtRectangle(this: *mut core::ffi::c_void, sourcestrokes: *mut core::ffi::c_void, targetrectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkDisp_Impl::AddStrokesAtRectangle(this, windows_core::from_raw_borrowed(&sourcestrokes), windows_core::from_raw_borrowed(&targetrectangle)).into() + IInkDisp_Impl::AddStrokesAtRectangle(this, core::mem::transmute_copy(&sourcestrokes), core::mem::transmute_copy(&targetrectangle)).into() } unsafe extern "system" fn Save(this: *mut core::ffi::c_void, persistenceformat: InkPersistenceFormat, compressionmode: InkPersistenceCompressionMode, data: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3272,7 +3272,7 @@ impl IInkDisp_Vtbl { } unsafe extern "system" fn ClipboardCopyWithRectangle(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void, clipboardformats: InkClipboardFormats, clipboardmodes: InkClipboardModes, dataobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkDisp_Impl::ClipboardCopyWithRectangle(this, windows_core::from_raw_borrowed(&rectangle), core::mem::transmute_copy(&clipboardformats), core::mem::transmute_copy(&clipboardmodes)) { + match IInkDisp_Impl::ClipboardCopyWithRectangle(this, core::mem::transmute_copy(&rectangle), core::mem::transmute_copy(&clipboardformats), core::mem::transmute_copy(&clipboardmodes)) { Ok(ok__) => { dataobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3282,7 +3282,7 @@ impl IInkDisp_Vtbl { } unsafe extern "system" fn ClipboardCopy(this: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void, clipboardformats: InkClipboardFormats, clipboardmodes: InkClipboardModes, dataobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkDisp_Impl::ClipboardCopy(this, windows_core::from_raw_borrowed(&strokes), core::mem::transmute_copy(&clipboardformats), core::mem::transmute_copy(&clipboardmodes)) { + match IInkDisp_Impl::ClipboardCopy(this, core::mem::transmute_copy(&strokes), core::mem::transmute_copy(&clipboardformats), core::mem::transmute_copy(&clipboardmodes)) { Ok(ok__) => { dataobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3292,7 +3292,7 @@ impl IInkDisp_Vtbl { } unsafe extern "system" fn CanPaste(this: *mut core::ffi::c_void, dataobject: *mut core::ffi::c_void, canpaste: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkDisp_Impl::CanPaste(this, windows_core::from_raw_borrowed(&dataobject)) { + match IInkDisp_Impl::CanPaste(this, core::mem::transmute_copy(&dataobject)) { Ok(ok__) => { canpaste.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3302,7 +3302,7 @@ impl IInkDisp_Vtbl { } unsafe extern "system" fn ClipboardPaste(this: *mut core::ffi::c_void, x: i32, y: i32, dataobject: *mut core::ffi::c_void, strokes: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkDisp_Impl::ClipboardPaste(this, core::mem::transmute_copy(&x), core::mem::transmute_copy(&y), windows_core::from_raw_borrowed(&dataobject)) { + match IInkDisp_Impl::ClipboardPaste(this, core::mem::transmute_copy(&x), core::mem::transmute_copy(&y), core::mem::transmute_copy(&dataobject)) { Ok(ok__) => { strokes.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3405,9 +3405,9 @@ pub struct IInkDivider_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IInkDivider_Impl: super::super::System::Com::IDispatch_Impl { fn Strokes(&self) -> windows_core::Result; - fn putref_Strokes(&self, strokes: Option<&IInkStrokes>) -> windows_core::Result<()>; + fn putref_Strokes(&self, strokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result<()>; fn RecognizerContext(&self) -> windows_core::Result; - fn putref_RecognizerContext(&self, recognizercontext: Option<&IInkRecognizerContext>) -> windows_core::Result<()>; + fn putref_RecognizerContext(&self, recognizercontext: windows_core::Ref<'_, IInkRecognizerContext>) -> windows_core::Result<()>; fn LineHeight(&self) -> windows_core::Result; fn SetLineHeight(&self, lineheight: i32) -> windows_core::Result<()>; fn Divide(&self) -> windows_core::Result; @@ -3427,7 +3427,7 @@ impl IInkDivider_Vtbl { } unsafe extern "system" fn putref_Strokes(this: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkDivider_Impl::putref_Strokes(this, windows_core::from_raw_borrowed(&strokes)).into() + IInkDivider_Impl::putref_Strokes(this, core::mem::transmute_copy(&strokes)).into() } unsafe extern "system" fn RecognizerContext(this: *mut core::ffi::c_void, recognizercontext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3441,7 +3441,7 @@ impl IInkDivider_Vtbl { } unsafe extern "system" fn putref_RecognizerContext(this: *mut core::ffi::c_void, recognizercontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkDivider_Impl::putref_RecognizerContext(this, windows_core::from_raw_borrowed(&recognizercontext)).into() + IInkDivider_Impl::putref_RecognizerContext(this, core::mem::transmute_copy(&recognizercontext)).into() } unsafe extern "system" fn LineHeight(this: *mut core::ffi::c_void, lineheight: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4540,11 +4540,11 @@ pub trait IInkEdit_Impl: super::super::System::Com::IDispatch_Impl { fn InkInsertMode(&self) -> windows_core::Result; fn SetInkInsertMode(&self, newval: InkInsertMode) -> windows_core::Result<()>; fn DrawingAttributes(&self) -> windows_core::Result; - fn putref_DrawingAttributes(&self, newval: Option<&IInkDrawingAttributes>) -> windows_core::Result<()>; + fn putref_DrawingAttributes(&self, newval: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result<()>; fn RecognitionTimeout(&self) -> windows_core::Result; fn SetRecognitionTimeout(&self, newval: i32) -> windows_core::Result<()>; fn Recognizer(&self) -> windows_core::Result; - fn putref_Recognizer(&self, newval: Option<&IInkRecognizer>) -> windows_core::Result<()>; + fn putref_Recognizer(&self, newval: windows_core::Ref<'_, IInkRecognizer>) -> windows_core::Result<()>; fn Factoid(&self) -> windows_core::Result; fn SetFactoid(&self, newval: &windows_core::BSTR) -> windows_core::Result<()>; fn SelInks(&self) -> windows_core::Result; @@ -4562,12 +4562,12 @@ pub trait IInkEdit_Impl: super::super::System::Com::IDispatch_Impl { fn SetBorderStyle(&self, pborderstyle: BorderStyleConstants) -> windows_core::Result<()>; fn Hwnd(&self) -> windows_core::Result; fn Font(&self) -> windows_core::Result; - fn putref_Font(&self, ppfont: Option<&super::super::System::Ole::IFontDisp>) -> windows_core::Result<()>; + fn putref_Font(&self, ppfont: windows_core::Ref<'_, super::super::System::Ole::IFontDisp>) -> windows_core::Result<()>; fn Text(&self) -> windows_core::Result; fn SetText(&self, pbstrtext: &windows_core::BSTR) -> windows_core::Result<()>; fn MouseIcon(&self) -> windows_core::Result; - fn SetMouseIcon(&self, mouseicon: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; - fn putref_MouseIcon(&self, mouseicon: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn SetMouseIcon(&self, mouseicon: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn putref_MouseIcon(&self, mouseicon: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; fn MousePointer(&self) -> windows_core::Result; fn SetMousePointer(&self, mousepointer: InkMousePointer) -> windows_core::Result<()>; fn Locked(&self) -> windows_core::Result; @@ -4677,7 +4677,7 @@ impl IInkEdit_Vtbl { } unsafe extern "system" fn putref_DrawingAttributes(this: *mut core::ffi::c_void, newval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkEdit_Impl::putref_DrawingAttributes(this, windows_core::from_raw_borrowed(&newval)).into() + IInkEdit_Impl::putref_DrawingAttributes(this, core::mem::transmute_copy(&newval)).into() } unsafe extern "system" fn RecognitionTimeout(this: *mut core::ffi::c_void, pval: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4705,7 +4705,7 @@ impl IInkEdit_Vtbl { } unsafe extern "system" fn putref_Recognizer(this: *mut core::ffi::c_void, newval: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkEdit_Impl::putref_Recognizer(this, windows_core::from_raw_borrowed(&newval)).into() + IInkEdit_Impl::putref_Recognizer(this, core::mem::transmute_copy(&newval)).into() } unsafe extern "system" fn Factoid(this: *mut core::ffi::c_void, pval: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4831,7 +4831,7 @@ impl IInkEdit_Vtbl { } unsafe extern "system" fn putref_Font(this: *mut core::ffi::c_void, ppfont: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkEdit_Impl::putref_Font(this, windows_core::from_raw_borrowed(&ppfont)).into() + IInkEdit_Impl::putref_Font(this, core::mem::transmute_copy(&ppfont)).into() } unsafe extern "system" fn Text(this: *mut core::ffi::c_void, pbstrtext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4859,11 +4859,11 @@ impl IInkEdit_Vtbl { } unsafe extern "system" fn SetMouseIcon(this: *mut core::ffi::c_void, mouseicon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkEdit_Impl::SetMouseIcon(this, windows_core::from_raw_borrowed(&mouseicon)).into() + IInkEdit_Impl::SetMouseIcon(this, core::mem::transmute_copy(&mouseicon)).into() } unsafe extern "system" fn putref_MouseIcon(this: *mut core::ffi::c_void, mouseicon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkEdit_Impl::putref_MouseIcon(this, windows_core::from_raw_borrowed(&mouseicon)).into() + IInkEdit_Impl::putref_MouseIcon(this, core::mem::transmute_copy(&mouseicon)).into() } unsafe extern "system" fn MousePointer(this: *mut core::ffi::c_void, mousepointer: *mut InkMousePointer) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5956,11 +5956,11 @@ pub trait IInkOverlay_Impl: super::super::System::Com::IDispatch_Impl { fn Enabled(&self) -> windows_core::Result; fn SetEnabled(&self, collecting: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn DefaultDrawingAttributes(&self) -> windows_core::Result; - fn putref_DefaultDrawingAttributes(&self, newattributes: Option<&IInkDrawingAttributes>) -> windows_core::Result<()>; + fn putref_DefaultDrawingAttributes(&self, newattributes: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result<()>; fn Renderer(&self) -> windows_core::Result; - fn putref_Renderer(&self, newinkrenderer: Option<&IInkRenderer>) -> windows_core::Result<()>; + fn putref_Renderer(&self, newinkrenderer: windows_core::Ref<'_, IInkRenderer>) -> windows_core::Result<()>; fn Ink(&self) -> windows_core::Result; - fn putref_Ink(&self, newink: Option<&IInkDisp>) -> windows_core::Result<()>; + fn putref_Ink(&self, newink: windows_core::Ref<'_, IInkDisp>) -> windows_core::Result<()>; fn AutoRedraw(&self) -> windows_core::Result; fn SetAutoRedraw(&self, autoredraw: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn CollectingInk(&self) -> windows_core::Result; @@ -5971,14 +5971,14 @@ pub trait IInkOverlay_Impl: super::super::System::Com::IDispatch_Impl { fn DesiredPacketDescription(&self) -> windows_core::Result; fn SetDesiredPacketDescription(&self, packetguids: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn MouseIcon(&self) -> windows_core::Result; - fn SetMouseIcon(&self, mouseicon: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; - fn putref_MouseIcon(&self, mouseicon: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn SetMouseIcon(&self, mouseicon: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn putref_MouseIcon(&self, mouseicon: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; fn MousePointer(&self) -> windows_core::Result; fn SetMousePointer(&self, mousepointer: InkMousePointer) -> windows_core::Result<()>; fn EditingMode(&self) -> windows_core::Result; fn SetEditingMode(&self, editingmode: InkOverlayEditingMode) -> windows_core::Result<()>; fn Selection(&self) -> windows_core::Result; - fn SetSelection(&self, selection: Option<&IInkStrokes>) -> windows_core::Result<()>; + fn SetSelection(&self, selection: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result<()>; fn EraserMode(&self) -> windows_core::Result; fn SetEraserMode(&self, erasermode: InkOverlayEraserMode) -> windows_core::Result<()>; fn EraserWidth(&self) -> windows_core::Result; @@ -5996,13 +5996,13 @@ pub trait IInkOverlay_Impl: super::super::System::Com::IDispatch_Impl { fn SupportHighContrastSelectionUI(&self) -> windows_core::Result; fn SetSupportHighContrastSelectionUI(&self, support: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn HitTestSelection(&self, x: i32, y: i32) -> windows_core::Result; - fn Draw(&self, rect: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn Draw(&self, rect: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn GetGestureStatus(&self, gesture: InkApplicationGesture) -> windows_core::Result; - fn GetWindowInputRectangle(&self, windowinputrectangle: *mut Option) -> windows_core::Result<()>; - fn SetWindowInputRectangle(&self, windowinputrectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn GetWindowInputRectangle(&self, windowinputrectangle: windows_core::OutRef<'_, IInkRectangle>) -> windows_core::Result<()>; + fn SetWindowInputRectangle(&self, windowinputrectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn SetAllTabletsMode(&self, usemouseforinput: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn SetSingleTabletIntegratedMode(&self, tablet: Option<&IInkTablet>) -> windows_core::Result<()>; + fn SetSingleTabletIntegratedMode(&self, tablet: windows_core::Ref<'_, IInkTablet>) -> windows_core::Result<()>; fn GetEventInterest(&self, eventid: InkCollectorEventInterest) -> windows_core::Result; fn SetEventInterest(&self, eventid: InkCollectorEventInterest, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; } @@ -6049,7 +6049,7 @@ impl IInkOverlay_Vtbl { } unsafe extern "system" fn putref_DefaultDrawingAttributes(this: *mut core::ffi::c_void, newattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkOverlay_Impl::putref_DefaultDrawingAttributes(this, windows_core::from_raw_borrowed(&newattributes)).into() + IInkOverlay_Impl::putref_DefaultDrawingAttributes(this, core::mem::transmute_copy(&newattributes)).into() } unsafe extern "system" fn Renderer(this: *mut core::ffi::c_void, currentinkrenderer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6063,7 +6063,7 @@ impl IInkOverlay_Vtbl { } unsafe extern "system" fn putref_Renderer(this: *mut core::ffi::c_void, newinkrenderer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkOverlay_Impl::putref_Renderer(this, windows_core::from_raw_borrowed(&newinkrenderer)).into() + IInkOverlay_Impl::putref_Renderer(this, core::mem::transmute_copy(&newinkrenderer)).into() } unsafe extern "system" fn Ink(this: *mut core::ffi::c_void, ink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6077,7 +6077,7 @@ impl IInkOverlay_Vtbl { } unsafe extern "system" fn putref_Ink(this: *mut core::ffi::c_void, newink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkOverlay_Impl::putref_Ink(this, windows_core::from_raw_borrowed(&newink)).into() + IInkOverlay_Impl::putref_Ink(this, core::mem::transmute_copy(&newink)).into() } unsafe extern "system" fn AutoRedraw(this: *mut core::ffi::c_void, autoredraw: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6157,11 +6157,11 @@ impl IInkOverlay_Vtbl { } unsafe extern "system" fn SetMouseIcon(this: *mut core::ffi::c_void, mouseicon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkOverlay_Impl::SetMouseIcon(this, windows_core::from_raw_borrowed(&mouseicon)).into() + IInkOverlay_Impl::SetMouseIcon(this, core::mem::transmute_copy(&mouseicon)).into() } unsafe extern "system" fn putref_MouseIcon(this: *mut core::ffi::c_void, mouseicon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkOverlay_Impl::putref_MouseIcon(this, windows_core::from_raw_borrowed(&mouseicon)).into() + IInkOverlay_Impl::putref_MouseIcon(this, core::mem::transmute_copy(&mouseicon)).into() } unsafe extern "system" fn MousePointer(this: *mut core::ffi::c_void, mousepointer: *mut InkMousePointer) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6203,7 +6203,7 @@ impl IInkOverlay_Vtbl { } unsafe extern "system" fn SetSelection(this: *mut core::ffi::c_void, selection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkOverlay_Impl::SetSelection(this, windows_core::from_raw_borrowed(&selection)).into() + IInkOverlay_Impl::SetSelection(this, core::mem::transmute_copy(&selection)).into() } unsafe extern "system" fn EraserMode(this: *mut core::ffi::c_void, erasermode: *mut InkOverlayEraserMode) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6335,7 +6335,7 @@ impl IInkOverlay_Vtbl { } unsafe extern "system" fn Draw(this: *mut core::ffi::c_void, rect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkOverlay_Impl::Draw(this, windows_core::from_raw_borrowed(&rect)).into() + IInkOverlay_Impl::Draw(this, core::mem::transmute_copy(&rect)).into() } unsafe extern "system" fn SetGestureStatus(this: *mut core::ffi::c_void, gesture: InkApplicationGesture, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6357,7 +6357,7 @@ impl IInkOverlay_Vtbl { } unsafe extern "system" fn SetWindowInputRectangle(this: *mut core::ffi::c_void, windowinputrectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkOverlay_Impl::SetWindowInputRectangle(this, windows_core::from_raw_borrowed(&windowinputrectangle)).into() + IInkOverlay_Impl::SetWindowInputRectangle(this, core::mem::transmute_copy(&windowinputrectangle)).into() } unsafe extern "system" fn SetAllTabletsMode(this: *mut core::ffi::c_void, usemouseforinput: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6365,7 +6365,7 @@ impl IInkOverlay_Vtbl { } unsafe extern "system" fn SetSingleTabletIntegratedMode(this: *mut core::ffi::c_void, tablet: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkOverlay_Impl::SetSingleTabletIntegratedMode(this, windows_core::from_raw_borrowed(&tablet)).into() + IInkOverlay_Impl::SetSingleTabletIntegratedMode(this, core::mem::transmute_copy(&tablet)).into() } unsafe extern "system" fn GetEventInterest(this: *mut core::ffi::c_void, eventid: InkCollectorEventInterest, listen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6795,11 +6795,11 @@ pub struct IInkPicture_Vtbl { pub trait IInkPicture_Impl: super::super::System::Com::IDispatch_Impl { fn hWnd(&self) -> windows_core::Result; fn DefaultDrawingAttributes(&self) -> windows_core::Result; - fn putref_DefaultDrawingAttributes(&self, newattributes: Option<&IInkDrawingAttributes>) -> windows_core::Result<()>; + fn putref_DefaultDrawingAttributes(&self, newattributes: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result<()>; fn Renderer(&self) -> windows_core::Result; - fn putref_Renderer(&self, newinkrenderer: Option<&IInkRenderer>) -> windows_core::Result<()>; + fn putref_Renderer(&self, newinkrenderer: windows_core::Ref<'_, IInkRenderer>) -> windows_core::Result<()>; fn Ink(&self) -> windows_core::Result; - fn putref_Ink(&self, newink: Option<&IInkDisp>) -> windows_core::Result<()>; + fn putref_Ink(&self, newink: windows_core::Ref<'_, IInkDisp>) -> windows_core::Result<()>; fn AutoRedraw(&self) -> windows_core::Result; fn SetAutoRedraw(&self, autoredraw: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn CollectingInk(&self) -> windows_core::Result; @@ -6810,20 +6810,20 @@ pub trait IInkPicture_Impl: super::super::System::Com::IDispatch_Impl { fn DesiredPacketDescription(&self) -> windows_core::Result; fn SetDesiredPacketDescription(&self, packetguids: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn MouseIcon(&self) -> windows_core::Result; - fn SetMouseIcon(&self, mouseicon: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; - fn putref_MouseIcon(&self, mouseicon: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn SetMouseIcon(&self, mouseicon: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn putref_MouseIcon(&self, mouseicon: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; fn MousePointer(&self) -> windows_core::Result; fn SetMousePointer(&self, mousepointer: InkMousePointer) -> windows_core::Result<()>; fn EditingMode(&self) -> windows_core::Result; fn SetEditingMode(&self, editingmode: InkOverlayEditingMode) -> windows_core::Result<()>; fn Selection(&self) -> windows_core::Result; - fn SetSelection(&self, selection: Option<&IInkStrokes>) -> windows_core::Result<()>; + fn SetSelection(&self, selection: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result<()>; fn EraserMode(&self) -> windows_core::Result; fn SetEraserMode(&self, erasermode: InkOverlayEraserMode) -> windows_core::Result<()>; fn EraserWidth(&self) -> windows_core::Result; fn SetEraserWidth(&self, neweraserwidth: i32) -> windows_core::Result<()>; - fn putref_Picture(&self, ppicture: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; - fn SetPicture(&self, ppicture: Option<&super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn putref_Picture(&self, ppicture: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; + fn SetPicture(&self, ppicture: windows_core::Ref<'_, super::super::System::Ole::IPictureDisp>) -> windows_core::Result<()>; fn Picture(&self) -> windows_core::Result; fn SetSizeMode(&self, smnewsizemode: InkPictureSizeMode) -> windows_core::Result<()>; fn SizeMode(&self) -> windows_core::Result; @@ -6842,10 +6842,10 @@ pub trait IInkPicture_Impl: super::super::System::Com::IDispatch_Impl { fn HitTestSelection(&self, x: i32, y: i32) -> windows_core::Result; fn SetGestureStatus(&self, gesture: InkApplicationGesture, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn GetGestureStatus(&self, gesture: InkApplicationGesture) -> windows_core::Result; - fn GetWindowInputRectangle(&self, windowinputrectangle: *mut Option) -> windows_core::Result<()>; - fn SetWindowInputRectangle(&self, windowinputrectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn GetWindowInputRectangle(&self, windowinputrectangle: windows_core::OutRef<'_, IInkRectangle>) -> windows_core::Result<()>; + fn SetWindowInputRectangle(&self, windowinputrectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn SetAllTabletsMode(&self, usemouseforinput: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn SetSingleTabletIntegratedMode(&self, tablet: Option<&IInkTablet>) -> windows_core::Result<()>; + fn SetSingleTabletIntegratedMode(&self, tablet: windows_core::Ref<'_, IInkTablet>) -> windows_core::Result<()>; fn GetEventInterest(&self, eventid: InkCollectorEventInterest) -> windows_core::Result; fn SetEventInterest(&self, eventid: InkCollectorEventInterest, listen: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn InkEnabled(&self) -> windows_core::Result; @@ -6878,7 +6878,7 @@ impl IInkPicture_Vtbl { } unsafe extern "system" fn putref_DefaultDrawingAttributes(this: *mut core::ffi::c_void, newattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::putref_DefaultDrawingAttributes(this, windows_core::from_raw_borrowed(&newattributes)).into() + IInkPicture_Impl::putref_DefaultDrawingAttributes(this, core::mem::transmute_copy(&newattributes)).into() } unsafe extern "system" fn Renderer(this: *mut core::ffi::c_void, currentinkrenderer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6892,7 +6892,7 @@ impl IInkPicture_Vtbl { } unsafe extern "system" fn putref_Renderer(this: *mut core::ffi::c_void, newinkrenderer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::putref_Renderer(this, windows_core::from_raw_borrowed(&newinkrenderer)).into() + IInkPicture_Impl::putref_Renderer(this, core::mem::transmute_copy(&newinkrenderer)).into() } unsafe extern "system" fn Ink(this: *mut core::ffi::c_void, ink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6906,7 +6906,7 @@ impl IInkPicture_Vtbl { } unsafe extern "system" fn putref_Ink(this: *mut core::ffi::c_void, newink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::putref_Ink(this, windows_core::from_raw_borrowed(&newink)).into() + IInkPicture_Impl::putref_Ink(this, core::mem::transmute_copy(&newink)).into() } unsafe extern "system" fn AutoRedraw(this: *mut core::ffi::c_void, autoredraw: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6986,11 +6986,11 @@ impl IInkPicture_Vtbl { } unsafe extern "system" fn SetMouseIcon(this: *mut core::ffi::c_void, mouseicon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::SetMouseIcon(this, windows_core::from_raw_borrowed(&mouseicon)).into() + IInkPicture_Impl::SetMouseIcon(this, core::mem::transmute_copy(&mouseicon)).into() } unsafe extern "system" fn putref_MouseIcon(this: *mut core::ffi::c_void, mouseicon: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::putref_MouseIcon(this, windows_core::from_raw_borrowed(&mouseicon)).into() + IInkPicture_Impl::putref_MouseIcon(this, core::mem::transmute_copy(&mouseicon)).into() } unsafe extern "system" fn MousePointer(this: *mut core::ffi::c_void, mousepointer: *mut InkMousePointer) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7032,7 +7032,7 @@ impl IInkPicture_Vtbl { } unsafe extern "system" fn SetSelection(this: *mut core::ffi::c_void, selection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::SetSelection(this, windows_core::from_raw_borrowed(&selection)).into() + IInkPicture_Impl::SetSelection(this, core::mem::transmute_copy(&selection)).into() } unsafe extern "system" fn EraserMode(this: *mut core::ffi::c_void, erasermode: *mut InkOverlayEraserMode) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7064,11 +7064,11 @@ impl IInkPicture_Vtbl { } unsafe extern "system" fn putref_Picture(this: *mut core::ffi::c_void, ppicture: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::putref_Picture(this, windows_core::from_raw_borrowed(&ppicture)).into() + IInkPicture_Impl::putref_Picture(this, core::mem::transmute_copy(&ppicture)).into() } unsafe extern "system" fn SetPicture(this: *mut core::ffi::c_void, ppicture: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::SetPicture(this, windows_core::from_raw_borrowed(&ppicture)).into() + IInkPicture_Impl::SetPicture(this, core::mem::transmute_copy(&ppicture)).into() } unsafe extern "system" fn Picture(this: *mut core::ffi::c_void, pppicture: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7214,7 +7214,7 @@ impl IInkPicture_Vtbl { } unsafe extern "system" fn SetWindowInputRectangle(this: *mut core::ffi::c_void, windowinputrectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::SetWindowInputRectangle(this, windows_core::from_raw_borrowed(&windowinputrectangle)).into() + IInkPicture_Impl::SetWindowInputRectangle(this, core::mem::transmute_copy(&windowinputrectangle)).into() } unsafe extern "system" fn SetAllTabletsMode(this: *mut core::ffi::c_void, usemouseforinput: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7222,7 +7222,7 @@ impl IInkPicture_Vtbl { } unsafe extern "system" fn SetSingleTabletIntegratedMode(this: *mut core::ffi::c_void, tablet: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkPicture_Impl::SetSingleTabletIntegratedMode(this, windows_core::from_raw_borrowed(&tablet)).into() + IInkPicture_Impl::SetSingleTabletIntegratedMode(this, core::mem::transmute_copy(&tablet)).into() } unsafe extern "system" fn GetEventInterest(this: *mut core::ffi::c_void, eventid: InkCollectorEventInterest, listen: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7465,9 +7465,9 @@ pub trait IInkRecognitionAlternate_Impl: super::super::System::Com::IDispatch_Im fn Strokes(&self) -> windows_core::Result; fn LineAlternates(&self) -> windows_core::Result; fn ConfidenceAlternates(&self) -> windows_core::Result; - fn GetStrokesFromStrokeRanges(&self, strokes: Option<&IInkStrokes>) -> windows_core::Result; - fn GetStrokesFromTextRange(&self, selectionstart: *mut i32, selectionlength: *mut i32, getstrokesfromtextrange: *mut Option) -> windows_core::Result<()>; - fn GetTextRangeFromStrokes(&self, strokes: Option<&IInkStrokes>, selectionstart: *mut i32, selectionlength: *mut i32) -> windows_core::Result<()>; + fn GetStrokesFromStrokeRanges(&self, strokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result; + fn GetStrokesFromTextRange(&self, selectionstart: *mut i32, selectionlength: *mut i32, getstrokesfromtextrange: windows_core::OutRef<'_, IInkStrokes>) -> windows_core::Result<()>; + fn GetTextRangeFromStrokes(&self, strokes: windows_core::Ref<'_, IInkStrokes>, selectionstart: *mut i32, selectionlength: *mut i32) -> windows_core::Result<()>; fn AlternatesWithConstantPropertyValues(&self, propertytype: &windows_core::BSTR) -> windows_core::Result; fn GetPropertyValue(&self, propertytype: &windows_core::BSTR) -> windows_core::Result; } @@ -7576,7 +7576,7 @@ impl IInkRecognitionAlternate_Vtbl { } unsafe extern "system" fn GetStrokesFromStrokeRanges(this: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void, getstrokesfromstrokeranges: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkRecognitionAlternate_Impl::GetStrokesFromStrokeRanges(this, windows_core::from_raw_borrowed(&strokes)) { + match IInkRecognitionAlternate_Impl::GetStrokesFromStrokeRanges(this, core::mem::transmute_copy(&strokes)) { Ok(ok__) => { getstrokesfromstrokeranges.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7590,7 +7590,7 @@ impl IInkRecognitionAlternate_Vtbl { } unsafe extern "system" fn GetTextRangeFromStrokes(this: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void, selectionstart: *mut i32, selectionlength: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRecognitionAlternate_Impl::GetTextRangeFromStrokes(this, windows_core::from_raw_borrowed(&strokes), core::mem::transmute_copy(&selectionstart), core::mem::transmute_copy(&selectionlength)).into() + IInkRecognitionAlternate_Impl::GetTextRangeFromStrokes(this, core::mem::transmute_copy(&strokes), core::mem::transmute_copy(&selectionstart), core::mem::transmute_copy(&selectionlength)).into() } unsafe extern "system" fn AlternatesWithConstantPropertyValues(this: *mut core::ffi::c_void, propertytype: *mut core::ffi::c_void, alternateswithconstantpropertyvalues: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -7802,7 +7802,7 @@ pub trait IInkRecognitionResult_Impl: super::super::System::Com::IDispatch_Impl fn TopConfidence(&self) -> windows_core::Result; fn Strokes(&self) -> windows_core::Result; fn AlternatesFromSelection(&self, selectionstart: i32, selectionlength: i32, maximumalternates: i32) -> windows_core::Result; - fn ModifyTopAlternate(&self, alternate: Option<&IInkRecognitionAlternate>) -> windows_core::Result<()>; + fn ModifyTopAlternate(&self, alternate: windows_core::Ref<'_, IInkRecognitionAlternate>) -> windows_core::Result<()>; fn SetResultOnStrokes(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -7860,7 +7860,7 @@ impl IInkRecognitionResult_Vtbl { } unsafe extern "system" fn ModifyTopAlternate(this: *mut core::ffi::c_void, alternate: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRecognitionResult_Impl::ModifyTopAlternate(this, windows_core::from_raw_borrowed(&alternate)).into() + IInkRecognitionResult_Impl::ModifyTopAlternate(this, core::mem::transmute_copy(&alternate)).into() } unsafe extern "system" fn SetResultOnStrokes(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8268,13 +8268,13 @@ pub struct IInkRecognizerContext_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IInkRecognizerContext_Impl: super::super::System::Com::IDispatch_Impl { fn Strokes(&self) -> windows_core::Result; - fn putref_Strokes(&self, strokes: Option<&IInkStrokes>) -> windows_core::Result<()>; + fn putref_Strokes(&self, strokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result<()>; fn CharacterAutoCompletionMode(&self) -> windows_core::Result; fn SetCharacterAutoCompletionMode(&self, mode: InkRecognizerCharacterAutoCompletionMode) -> windows_core::Result<()>; fn Factoid(&self) -> windows_core::Result; fn SetFactoid(&self, factoid: &windows_core::BSTR) -> windows_core::Result<()>; fn Guide(&self) -> windows_core::Result; - fn putref_Guide(&self, recognizerguide: Option<&IInkRecognizerGuide>) -> windows_core::Result<()>; + fn putref_Guide(&self, recognizerguide: windows_core::Ref<'_, IInkRecognizerGuide>) -> windows_core::Result<()>; fn PrefixText(&self) -> windows_core::Result; fn SetPrefixText(&self, prefix: &windows_core::BSTR) -> windows_core::Result<()>; fn SuffixText(&self) -> windows_core::Result; @@ -8282,9 +8282,9 @@ pub trait IInkRecognizerContext_Impl: super::super::System::Com::IDispatch_Impl fn RecognitionFlags(&self) -> windows_core::Result; fn SetRecognitionFlags(&self, modes: InkRecognitionModes) -> windows_core::Result<()>; fn WordList(&self) -> windows_core::Result; - fn putref_WordList(&self, wordlist: Option<&IInkWordList>) -> windows_core::Result<()>; + fn putref_WordList(&self, wordlist: windows_core::Ref<'_, IInkWordList>) -> windows_core::Result<()>; fn Recognizer(&self) -> windows_core::Result; - fn Recognize(&self, recognitionstatus: *mut InkRecognitionStatus, recognitionresult: *mut Option) -> windows_core::Result<()>; + fn Recognize(&self, recognitionstatus: *mut InkRecognitionStatus, recognitionresult: windows_core::OutRef<'_, IInkRecognitionResult>) -> windows_core::Result<()>; fn StopBackgroundRecognition(&self) -> windows_core::Result<()>; fn EndInkInput(&self) -> windows_core::Result<()>; fn BackgroundRecognize(&self, customdata: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; @@ -8307,7 +8307,7 @@ impl IInkRecognizerContext_Vtbl { } unsafe extern "system" fn putref_Strokes(this: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRecognizerContext_Impl::putref_Strokes(this, windows_core::from_raw_borrowed(&strokes)).into() + IInkRecognizerContext_Impl::putref_Strokes(this, core::mem::transmute_copy(&strokes)).into() } unsafe extern "system" fn CharacterAutoCompletionMode(this: *mut core::ffi::c_void, mode: *mut InkRecognizerCharacterAutoCompletionMode) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8349,7 +8349,7 @@ impl IInkRecognizerContext_Vtbl { } unsafe extern "system" fn putref_Guide(this: *mut core::ffi::c_void, recognizerguide: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRecognizerContext_Impl::putref_Guide(this, windows_core::from_raw_borrowed(&recognizerguide)).into() + IInkRecognizerContext_Impl::putref_Guide(this, core::mem::transmute_copy(&recognizerguide)).into() } unsafe extern "system" fn PrefixText(this: *mut core::ffi::c_void, prefix: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8405,7 +8405,7 @@ impl IInkRecognizerContext_Vtbl { } unsafe extern "system" fn putref_WordList(this: *mut core::ffi::c_void, wordlist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRecognizerContext_Impl::putref_WordList(this, windows_core::from_raw_borrowed(&wordlist)).into() + IInkRecognizerContext_Impl::putref_WordList(this, core::mem::transmute_copy(&wordlist)).into() } unsafe extern "system" fn Recognizer(this: *mut core::ffi::c_void, recognizer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8642,9 +8642,9 @@ pub struct IInkRecognizerGuide_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IInkRecognizerGuide_Impl: super::super::System::Com::IDispatch_Impl { fn WritingBox(&self) -> windows_core::Result; - fn SetWritingBox(&self, rectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn SetWritingBox(&self, rectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn DrawnBox(&self) -> windows_core::Result; - fn SetDrawnBox(&self, rectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn SetDrawnBox(&self, rectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn Rows(&self) -> windows_core::Result; fn SetRows(&self, units: i32) -> windows_core::Result<()>; fn Columns(&self) -> windows_core::Result; @@ -8669,7 +8669,7 @@ impl IInkRecognizerGuide_Vtbl { } unsafe extern "system" fn SetWritingBox(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRecognizerGuide_Impl::SetWritingBox(this, windows_core::from_raw_borrowed(&rectangle)).into() + IInkRecognizerGuide_Impl::SetWritingBox(this, core::mem::transmute_copy(&rectangle)).into() } unsafe extern "system" fn DrawnBox(this: *mut core::ffi::c_void, rectangle: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8683,7 +8683,7 @@ impl IInkRecognizerGuide_Vtbl { } unsafe extern "system" fn SetDrawnBox(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRecognizerGuide_Impl::SetDrawnBox(this, windows_core::from_raw_borrowed(&rectangle)).into() + IInkRecognizerGuide_Impl::SetDrawnBox(this, core::mem::transmute_copy(&rectangle)).into() } unsafe extern "system" fn Rows(this: *mut core::ffi::c_void, units: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9167,18 +9167,18 @@ pub struct IInkRenderer_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IInkRenderer_Impl: super::super::System::Com::IDispatch_Impl { - fn GetViewTransform(&self, viewtransform: Option<&IInkTransform>) -> windows_core::Result<()>; - fn SetViewTransform(&self, viewtransform: Option<&IInkTransform>) -> windows_core::Result<()>; - fn GetObjectTransform(&self, objecttransform: Option<&IInkTransform>) -> windows_core::Result<()>; - fn SetObjectTransform(&self, objecttransform: Option<&IInkTransform>) -> windows_core::Result<()>; - fn Draw(&self, hdc: isize, strokes: Option<&IInkStrokes>) -> windows_core::Result<()>; - fn DrawStroke(&self, hdc: isize, stroke: Option<&IInkStrokeDisp>, drawingattributes: Option<&IInkDrawingAttributes>) -> windows_core::Result<()>; + fn GetViewTransform(&self, viewtransform: windows_core::Ref<'_, IInkTransform>) -> windows_core::Result<()>; + fn SetViewTransform(&self, viewtransform: windows_core::Ref<'_, IInkTransform>) -> windows_core::Result<()>; + fn GetObjectTransform(&self, objecttransform: windows_core::Ref<'_, IInkTransform>) -> windows_core::Result<()>; + fn SetObjectTransform(&self, objecttransform: windows_core::Ref<'_, IInkTransform>) -> windows_core::Result<()>; + fn Draw(&self, hdc: isize, strokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result<()>; + fn DrawStroke(&self, hdc: isize, stroke: windows_core::Ref<'_, IInkStrokeDisp>, drawingattributes: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result<()>; fn PixelToInkSpace(&self, hdc: isize, x: *mut i32, y: *mut i32) -> windows_core::Result<()>; fn InkSpaceToPixel(&self, hdcdisplay: isize, x: *mut i32, y: *mut i32) -> windows_core::Result<()>; fn PixelToInkSpaceFromPoints(&self, hdc: isize, points: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()>; fn InkSpaceToPixelFromPoints(&self, hdc: isize, points: *mut super::super::System::Variant::VARIANT) -> windows_core::Result<()>; - fn Measure(&self, strokes: Option<&IInkStrokes>) -> windows_core::Result; - fn MeasureStroke(&self, stroke: Option<&IInkStrokeDisp>, drawingattributes: Option<&IInkDrawingAttributes>) -> windows_core::Result; + fn Measure(&self, strokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result; + fn MeasureStroke(&self, stroke: windows_core::Ref<'_, IInkStrokeDisp>, drawingattributes: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result; fn Move(&self, horizontalcomponent: f32, verticalcomponent: f32) -> windows_core::Result<()>; fn Rotate(&self, degrees: f32, x: f32, y: f32) -> windows_core::Result<()>; fn ScaleTransform(&self, horizontalmultiplier: f32, verticalmultiplier: f32, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; @@ -9188,27 +9188,27 @@ impl IInkRenderer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetViewTransform(this: *mut core::ffi::c_void, viewtransform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRenderer_Impl::GetViewTransform(this, windows_core::from_raw_borrowed(&viewtransform)).into() + IInkRenderer_Impl::GetViewTransform(this, core::mem::transmute_copy(&viewtransform)).into() } unsafe extern "system" fn SetViewTransform(this: *mut core::ffi::c_void, viewtransform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRenderer_Impl::SetViewTransform(this, windows_core::from_raw_borrowed(&viewtransform)).into() + IInkRenderer_Impl::SetViewTransform(this, core::mem::transmute_copy(&viewtransform)).into() } unsafe extern "system" fn GetObjectTransform(this: *mut core::ffi::c_void, objecttransform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRenderer_Impl::GetObjectTransform(this, windows_core::from_raw_borrowed(&objecttransform)).into() + IInkRenderer_Impl::GetObjectTransform(this, core::mem::transmute_copy(&objecttransform)).into() } unsafe extern "system" fn SetObjectTransform(this: *mut core::ffi::c_void, objecttransform: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRenderer_Impl::SetObjectTransform(this, windows_core::from_raw_borrowed(&objecttransform)).into() + IInkRenderer_Impl::SetObjectTransform(this, core::mem::transmute_copy(&objecttransform)).into() } unsafe extern "system" fn Draw(this: *mut core::ffi::c_void, hdc: isize, strokes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRenderer_Impl::Draw(this, core::mem::transmute_copy(&hdc), windows_core::from_raw_borrowed(&strokes)).into() + IInkRenderer_Impl::Draw(this, core::mem::transmute_copy(&hdc), core::mem::transmute_copy(&strokes)).into() } unsafe extern "system" fn DrawStroke(this: *mut core::ffi::c_void, hdc: isize, stroke: *mut core::ffi::c_void, drawingattributes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkRenderer_Impl::DrawStroke(this, core::mem::transmute_copy(&hdc), windows_core::from_raw_borrowed(&stroke), windows_core::from_raw_borrowed(&drawingattributes)).into() + IInkRenderer_Impl::DrawStroke(this, core::mem::transmute_copy(&hdc), core::mem::transmute_copy(&stroke), core::mem::transmute_copy(&drawingattributes)).into() } unsafe extern "system" fn PixelToInkSpace(this: *mut core::ffi::c_void, hdc: isize, x: *mut i32, y: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9228,7 +9228,7 @@ impl IInkRenderer_Vtbl { } unsafe extern "system" fn Measure(this: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void, rectangle: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkRenderer_Impl::Measure(this, windows_core::from_raw_borrowed(&strokes)) { + match IInkRenderer_Impl::Measure(this, core::mem::transmute_copy(&strokes)) { Ok(ok__) => { rectangle.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9238,7 +9238,7 @@ impl IInkRenderer_Vtbl { } unsafe extern "system" fn MeasureStroke(this: *mut core::ffi::c_void, stroke: *mut core::ffi::c_void, drawingattributes: *mut core::ffi::c_void, rectangle: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkRenderer_Impl::MeasureStroke(this, windows_core::from_raw_borrowed(&stroke), windows_core::from_raw_borrowed(&drawingattributes)) { + match IInkRenderer_Impl::MeasureStroke(this, core::mem::transmute_copy(&stroke), core::mem::transmute_copy(&drawingattributes)) { Ok(ok__) => { rectangle.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9532,7 +9532,7 @@ pub trait IInkStrokeDisp_Impl: super::super::System::Com::IDispatch_Impl { fn ID(&self) -> windows_core::Result; fn BezierPoints(&self) -> windows_core::Result; fn DrawingAttributes(&self) -> windows_core::Result; - fn putref_DrawingAttributes(&self, drawattrs: Option<&IInkDrawingAttributes>) -> windows_core::Result<()>; + fn putref_DrawingAttributes(&self, drawattrs: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result<()>; fn Ink(&self) -> windows_core::Result; fn ExtendedProperties(&self) -> windows_core::Result; fn PolylineCusps(&self) -> windows_core::Result; @@ -9543,9 +9543,9 @@ pub trait IInkStrokeDisp_Impl: super::super::System::Com::IDispatch_Impl { fn PacketDescription(&self) -> windows_core::Result; fn Deleted(&self) -> windows_core::Result; fn GetBoundingBox(&self, boundingboxmode: InkBoundingBoxMode) -> windows_core::Result; - fn FindIntersections(&self, strokes: Option<&IInkStrokes>) -> windows_core::Result; - fn GetRectangleIntersections(&self, rectangle: Option<&IInkRectangle>) -> windows_core::Result; - fn Clip(&self, rectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn FindIntersections(&self, strokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result; + fn GetRectangleIntersections(&self, rectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result; + fn Clip(&self, rectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn HitTestCircle(&self, x: i32, y: i32, radius: f32) -> windows_core::Result; fn NearestPoint(&self, x: i32, y: i32, distance: *mut f32, point: *mut f32) -> windows_core::Result<()>; fn Split(&self, splitat: f32) -> windows_core::Result; @@ -9556,8 +9556,8 @@ pub trait IInkStrokeDisp_Impl: super::super::System::Com::IDispatch_Impl { fn GetPacketValuesByProperty(&self, propertyname: &windows_core::BSTR, index: i32, count: i32) -> windows_core::Result; fn SetPacketValuesByProperty(&self, bstrpropertyname: &windows_core::BSTR, packetvalues: &super::super::System::Variant::VARIANT, index: i32, count: i32) -> windows_core::Result; fn GetFlattenedBezierPoints(&self, fittingerror: i32) -> windows_core::Result; - fn Transform(&self, transform: Option<&IInkTransform>, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn ScaleToRectangle(&self, rectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn Transform(&self, transform: windows_core::Ref<'_, IInkTransform>, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn ScaleToRectangle(&self, rectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn Move(&self, horizontalcomponent: f32, verticalcomponent: f32) -> windows_core::Result<()>; fn Rotate(&self, degrees: f32, x: f32, y: f32) -> windows_core::Result<()>; fn Shear(&self, horizontalmultiplier: f32, verticalmultiplier: f32) -> windows_core::Result<()>; @@ -9598,7 +9598,7 @@ impl IInkStrokeDisp_Vtbl { } unsafe extern "system" fn putref_DrawingAttributes(this: *mut core::ffi::c_void, drawattrs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokeDisp_Impl::putref_DrawingAttributes(this, windows_core::from_raw_borrowed(&drawattrs)).into() + IInkStrokeDisp_Impl::putref_DrawingAttributes(this, core::mem::transmute_copy(&drawattrs)).into() } unsafe extern "system" fn Ink(this: *mut core::ffi::c_void, ink: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9702,7 +9702,7 @@ impl IInkStrokeDisp_Vtbl { } unsafe extern "system" fn FindIntersections(this: *mut core::ffi::c_void, strokes: *mut core::ffi::c_void, intersections: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkStrokeDisp_Impl::FindIntersections(this, windows_core::from_raw_borrowed(&strokes)) { + match IInkStrokeDisp_Impl::FindIntersections(this, core::mem::transmute_copy(&strokes)) { Ok(ok__) => { intersections.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9712,7 +9712,7 @@ impl IInkStrokeDisp_Vtbl { } unsafe extern "system" fn GetRectangleIntersections(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void, intersections: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IInkStrokeDisp_Impl::GetRectangleIntersections(this, windows_core::from_raw_borrowed(&rectangle)) { + match IInkStrokeDisp_Impl::GetRectangleIntersections(this, core::mem::transmute_copy(&rectangle)) { Ok(ok__) => { intersections.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9722,7 +9722,7 @@ impl IInkStrokeDisp_Vtbl { } unsafe extern "system" fn Clip(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokeDisp_Impl::Clip(this, windows_core::from_raw_borrowed(&rectangle)).into() + IInkStrokeDisp_Impl::Clip(this, core::mem::transmute_copy(&rectangle)).into() } unsafe extern "system" fn HitTestCircle(this: *mut core::ffi::c_void, x: i32, y: i32, radius: f32, intersects: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9814,11 +9814,11 @@ impl IInkStrokeDisp_Vtbl { } unsafe extern "system" fn Transform(this: *mut core::ffi::c_void, transform: *mut core::ffi::c_void, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokeDisp_Impl::Transform(this, windows_core::from_raw_borrowed(&transform), core::mem::transmute_copy(&applyonpenwidth)).into() + IInkStrokeDisp_Impl::Transform(this, core::mem::transmute_copy(&transform), core::mem::transmute_copy(&applyonpenwidth)).into() } unsafe extern "system" fn ScaleToRectangle(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokeDisp_Impl::ScaleToRectangle(this, windows_core::from_raw_borrowed(&rectangle)).into() + IInkStrokeDisp_Impl::ScaleToRectangle(this, core::mem::transmute_copy(&rectangle)).into() } unsafe extern "system" fn Move(this: *mut core::ffi::c_void, horizontalcomponent: f32, verticalcomponent: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10017,19 +10017,19 @@ pub trait IInkStrokes_Impl: super::super::System::Com::IDispatch_Impl { fn RecognitionResult(&self) -> windows_core::Result; fn ToString(&self) -> windows_core::Result; fn Item(&self, index: i32) -> windows_core::Result; - fn Add(&self, inkstroke: Option<&IInkStrokeDisp>) -> windows_core::Result<()>; - fn AddStrokes(&self, inkstrokes: Option<&IInkStrokes>) -> windows_core::Result<()>; - fn Remove(&self, inkstroke: Option<&IInkStrokeDisp>) -> windows_core::Result<()>; - fn RemoveStrokes(&self, inkstrokes: Option<&IInkStrokes>) -> windows_core::Result<()>; - fn ModifyDrawingAttributes(&self, drawattrs: Option<&IInkDrawingAttributes>) -> windows_core::Result<()>; + fn Add(&self, inkstroke: windows_core::Ref<'_, IInkStrokeDisp>) -> windows_core::Result<()>; + fn AddStrokes(&self, inkstrokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result<()>; + fn Remove(&self, inkstroke: windows_core::Ref<'_, IInkStrokeDisp>) -> windows_core::Result<()>; + fn RemoveStrokes(&self, inkstrokes: windows_core::Ref<'_, IInkStrokes>) -> windows_core::Result<()>; + fn ModifyDrawingAttributes(&self, drawattrs: windows_core::Ref<'_, IInkDrawingAttributes>) -> windows_core::Result<()>; fn GetBoundingBox(&self, boundingboxmode: InkBoundingBoxMode) -> windows_core::Result; - fn Transform(&self, transform: Option<&IInkTransform>, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn ScaleToRectangle(&self, rectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn Transform(&self, transform: windows_core::Ref<'_, IInkTransform>, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn ScaleToRectangle(&self, rectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn Move(&self, horizontalcomponent: f32, verticalcomponent: f32) -> windows_core::Result<()>; fn Rotate(&self, degrees: f32, x: f32, y: f32) -> windows_core::Result<()>; fn Shear(&self, horizontalmultiplier: f32, verticalmultiplier: f32) -> windows_core::Result<()>; fn ScaleTransform(&self, horizontalmultiplier: f32, verticalmultiplier: f32) -> windows_core::Result<()>; - fn Clip(&self, rectangle: Option<&IInkRectangle>) -> windows_core::Result<()>; + fn Clip(&self, rectangle: windows_core::Ref<'_, IInkRectangle>) -> windows_core::Result<()>; fn RemoveRecognitionResult(&self) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -10097,23 +10097,23 @@ impl IInkStrokes_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, inkstroke: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokes_Impl::Add(this, windows_core::from_raw_borrowed(&inkstroke)).into() + IInkStrokes_Impl::Add(this, core::mem::transmute_copy(&inkstroke)).into() } unsafe extern "system" fn AddStrokes(this: *mut core::ffi::c_void, inkstrokes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokes_Impl::AddStrokes(this, windows_core::from_raw_borrowed(&inkstrokes)).into() + IInkStrokes_Impl::AddStrokes(this, core::mem::transmute_copy(&inkstrokes)).into() } unsafe extern "system" fn Remove(this: *mut core::ffi::c_void, inkstroke: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokes_Impl::Remove(this, windows_core::from_raw_borrowed(&inkstroke)).into() + IInkStrokes_Impl::Remove(this, core::mem::transmute_copy(&inkstroke)).into() } unsafe extern "system" fn RemoveStrokes(this: *mut core::ffi::c_void, inkstrokes: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokes_Impl::RemoveStrokes(this, windows_core::from_raw_borrowed(&inkstrokes)).into() + IInkStrokes_Impl::RemoveStrokes(this, core::mem::transmute_copy(&inkstrokes)).into() } unsafe extern "system" fn ModifyDrawingAttributes(this: *mut core::ffi::c_void, drawattrs: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokes_Impl::ModifyDrawingAttributes(this, windows_core::from_raw_borrowed(&drawattrs)).into() + IInkStrokes_Impl::ModifyDrawingAttributes(this, core::mem::transmute_copy(&drawattrs)).into() } unsafe extern "system" fn GetBoundingBox(this: *mut core::ffi::c_void, boundingboxmode: InkBoundingBoxMode, boundingbox: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10127,11 +10127,11 @@ impl IInkStrokes_Vtbl { } unsafe extern "system" fn Transform(this: *mut core::ffi::c_void, transform: *mut core::ffi::c_void, applyonpenwidth: super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokes_Impl::Transform(this, windows_core::from_raw_borrowed(&transform), core::mem::transmute_copy(&applyonpenwidth)).into() + IInkStrokes_Impl::Transform(this, core::mem::transmute_copy(&transform), core::mem::transmute_copy(&applyonpenwidth)).into() } unsafe extern "system" fn ScaleToRectangle(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokes_Impl::ScaleToRectangle(this, windows_core::from_raw_borrowed(&rectangle)).into() + IInkStrokes_Impl::ScaleToRectangle(this, core::mem::transmute_copy(&rectangle)).into() } unsafe extern "system" fn Move(this: *mut core::ffi::c_void, horizontalcomponent: f32, verticalcomponent: f32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10151,7 +10151,7 @@ impl IInkStrokes_Vtbl { } unsafe extern "system" fn Clip(this: *mut core::ffi::c_void, rectangle: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkStrokes_Impl::Clip(this, windows_core::from_raw_borrowed(&rectangle)).into() + IInkStrokes_Impl::Clip(this, core::mem::transmute_copy(&rectangle)).into() } unsafe extern "system" fn RemoveRecognitionResult(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10898,7 +10898,7 @@ pub struct IInkWordList_Vtbl { pub trait IInkWordList_Impl: super::super::System::Com::IDispatch_Impl { fn AddWord(&self, newword: &windows_core::BSTR) -> windows_core::Result<()>; fn RemoveWord(&self, removeword: &windows_core::BSTR) -> windows_core::Result<()>; - fn Merge(&self, mergewordlist: Option<&IInkWordList>) -> windows_core::Result<()>; + fn Merge(&self, mergewordlist: windows_core::Ref<'_, IInkWordList>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IInkWordList_Vtbl { @@ -10913,7 +10913,7 @@ impl IInkWordList_Vtbl { } unsafe extern "system" fn Merge(this: *mut core::ffi::c_void, mergewordlist: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IInkWordList_Impl::Merge(this, windows_core::from_raw_borrowed(&mergewordlist)).into() + IInkWordList_Impl::Merge(this, core::mem::transmute_copy(&mergewordlist)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), @@ -11177,7 +11177,7 @@ pub trait IMathInputControl_Impl: super::super::System::Com::IDispatch_Impl { fn Clear(&self) -> windows_core::Result<()>; fn SetCustomPaint(&self, element: i32, paint: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn SetCaptionText(&self, captiontext: &windows_core::BSTR) -> windows_core::Result<()>; - fn LoadInk(&self, ink: Option<&IInkDisp>) -> windows_core::Result<()>; + fn LoadInk(&self, ink: windows_core::Ref<'_, IInkDisp>) -> windows_core::Result<()>; fn SetOwnerWindow(&self, ownerwindow: isize) -> windows_core::Result<()>; fn EnableExtendedButtons(&self, extended: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn GetPreviewHeight(&self) -> windows_core::Result; @@ -11230,7 +11230,7 @@ impl IMathInputControl_Vtbl { } unsafe extern "system" fn LoadInk(this: *mut core::ffi::c_void, ink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMathInputControl_Impl::LoadInk(this, windows_core::from_raw_borrowed(&ink)).into() + IMathInputControl_Impl::LoadInk(this, core::mem::transmute_copy(&ink)).into() } unsafe extern "system" fn SetOwnerWindow(this: *mut core::ffi::c_void, ownerwindow: isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11989,24 +11989,24 @@ pub trait IRealTimeStylus_Impl: windows_core::IUnknownImpl { fn SetHWND(&self, hwnd: super::super::Foundation::HANDLE_PTR) -> windows_core::Result<()>; fn WindowInputRectangle(&self) -> windows_core::Result; fn SetWindowInputRectangle(&self, prcwndinputrect: *const super::super::Foundation::RECT) -> windows_core::Result<()>; - fn AddStylusSyncPlugin(&self, iindex: u32, piplugin: Option<&IStylusSyncPlugin>) -> windows_core::Result<()>; - fn RemoveStylusSyncPlugin(&self, iindex: u32, ppiplugin: *mut Option) -> windows_core::Result<()>; + fn AddStylusSyncPlugin(&self, iindex: u32, piplugin: windows_core::Ref<'_, IStylusSyncPlugin>) -> windows_core::Result<()>; + fn RemoveStylusSyncPlugin(&self, iindex: u32, ppiplugin: windows_core::OutRef<'_, IStylusSyncPlugin>) -> windows_core::Result<()>; fn RemoveAllStylusSyncPlugins(&self) -> windows_core::Result<()>; fn GetStylusSyncPlugin(&self, iindex: u32) -> windows_core::Result; fn GetStylusSyncPluginCount(&self) -> windows_core::Result; - fn AddStylusAsyncPlugin(&self, iindex: u32, piplugin: Option<&IStylusAsyncPlugin>) -> windows_core::Result<()>; - fn RemoveStylusAsyncPlugin(&self, iindex: u32, ppiplugin: *mut Option) -> windows_core::Result<()>; + fn AddStylusAsyncPlugin(&self, iindex: u32, piplugin: windows_core::Ref<'_, IStylusAsyncPlugin>) -> windows_core::Result<()>; + fn RemoveStylusAsyncPlugin(&self, iindex: u32, ppiplugin: windows_core::OutRef<'_, IStylusAsyncPlugin>) -> windows_core::Result<()>; fn RemoveAllStylusAsyncPlugins(&self) -> windows_core::Result<()>; fn GetStylusAsyncPlugin(&self, iindex: u32) -> windows_core::Result; fn GetStylusAsyncPluginCount(&self) -> windows_core::Result; fn ChildRealTimeStylusPlugin(&self) -> windows_core::Result; - fn putref_ChildRealTimeStylusPlugin(&self, pirts: Option<&IRealTimeStylus>) -> windows_core::Result<()>; + fn putref_ChildRealTimeStylusPlugin(&self, pirts: windows_core::Ref<'_, IRealTimeStylus>) -> windows_core::Result<()>; fn AddCustomStylusDataToQueue(&self, sq: StylusQueue, pguidid: *const windows_core::GUID, cbdata: u32, pbdata: *const u8) -> windows_core::Result<()>; fn ClearStylusQueues(&self) -> windows_core::Result<()>; fn SetAllTabletsMode(&self, fusemouseforinput: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetSingleTabletMode(&self, pitablet: Option<&IInkTablet>) -> windows_core::Result<()>; + fn SetSingleTabletMode(&self, pitablet: windows_core::Ref<'_, IInkTablet>) -> windows_core::Result<()>; fn GetTablet(&self) -> windows_core::Result; - fn GetTabletContextIdFromTablet(&self, pitablet: Option<&IInkTablet>) -> windows_core::Result; + fn GetTabletContextIdFromTablet(&self, pitablet: windows_core::Ref<'_, IInkTablet>) -> windows_core::Result; fn GetTabletFromTabletContextId(&self, tcid: u32) -> windows_core::Result; fn GetAllTabletContextIds(&self, pctcidcount: *mut u32, pptcids: *mut *mut u32) -> windows_core::Result<()>; fn GetStyluses(&self) -> windows_core::Result; @@ -12062,7 +12062,7 @@ impl IRealTimeStylus_Vtbl { } unsafe extern "system" fn AddStylusSyncPlugin(this: *mut core::ffi::c_void, iindex: u32, piplugin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRealTimeStylus_Impl::AddStylusSyncPlugin(this, core::mem::transmute_copy(&iindex), windows_core::from_raw_borrowed(&piplugin)).into() + IRealTimeStylus_Impl::AddStylusSyncPlugin(this, core::mem::transmute_copy(&iindex), core::mem::transmute_copy(&piplugin)).into() } unsafe extern "system" fn RemoveStylusSyncPlugin(this: *mut core::ffi::c_void, iindex: u32, ppiplugin: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12094,7 +12094,7 @@ impl IRealTimeStylus_Vtbl { } unsafe extern "system" fn AddStylusAsyncPlugin(this: *mut core::ffi::c_void, iindex: u32, piplugin: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRealTimeStylus_Impl::AddStylusAsyncPlugin(this, core::mem::transmute_copy(&iindex), windows_core::from_raw_borrowed(&piplugin)).into() + IRealTimeStylus_Impl::AddStylusAsyncPlugin(this, core::mem::transmute_copy(&iindex), core::mem::transmute_copy(&piplugin)).into() } unsafe extern "system" fn RemoveStylusAsyncPlugin(this: *mut core::ffi::c_void, iindex: u32, ppiplugin: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12136,7 +12136,7 @@ impl IRealTimeStylus_Vtbl { } unsafe extern "system" fn putref_ChildRealTimeStylusPlugin(this: *mut core::ffi::c_void, pirts: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRealTimeStylus_Impl::putref_ChildRealTimeStylusPlugin(this, windows_core::from_raw_borrowed(&pirts)).into() + IRealTimeStylus_Impl::putref_ChildRealTimeStylusPlugin(this, core::mem::transmute_copy(&pirts)).into() } unsafe extern "system" fn AddCustomStylusDataToQueue(this: *mut core::ffi::c_void, sq: StylusQueue, pguidid: *const windows_core::GUID, cbdata: u32, pbdata: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12152,7 +12152,7 @@ impl IRealTimeStylus_Vtbl { } unsafe extern "system" fn SetSingleTabletMode(this: *mut core::ffi::c_void, pitablet: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IRealTimeStylus_Impl::SetSingleTabletMode(this, windows_core::from_raw_borrowed(&pitablet)).into() + IRealTimeStylus_Impl::SetSingleTabletMode(this, core::mem::transmute_copy(&pitablet)).into() } unsafe extern "system" fn GetTablet(this: *mut core::ffi::c_void, ppisingletablet: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -12166,7 +12166,7 @@ impl IRealTimeStylus_Vtbl { } unsafe extern "system" fn GetTabletContextIdFromTablet(this: *mut core::ffi::c_void, pitablet: *mut core::ffi::c_void, ptcid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IRealTimeStylus_Impl::GetTabletContextIdFromTablet(this, windows_core::from_raw_borrowed(&pitablet)) { + match IRealTimeStylus_Impl::GetTabletContextIdFromTablet(this, core::mem::transmute_copy(&pitablet)) { Ok(ok__) => { ptcid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12497,12 +12497,12 @@ pub struct IStrokeBuilder_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IStrokeBuilder_Impl: windows_core::IUnknownImpl { - fn CreateStroke(&self, cpktbufflength: u32, ppackets: *const i32, cpacketproperties: u32, ppacketproperties: *const PACKET_PROPERTY, finktodevicescalex: f32, finktodevicescaley: f32, ppiinkstroke: *mut Option) -> windows_core::Result<()>; - fn BeginStroke(&self, tcid: u32, sid: u32, ppacket: *const i32, cpacketproperties: u32, ppacketproperties: *const PACKET_PROPERTY, finktodevicescalex: f32, finktodevicescaley: f32, ppiinkstroke: *mut Option) -> windows_core::Result<()>; + fn CreateStroke(&self, cpktbufflength: u32, ppackets: *const i32, cpacketproperties: u32, ppacketproperties: *const PACKET_PROPERTY, finktodevicescalex: f32, finktodevicescaley: f32, ppiinkstroke: windows_core::OutRef<'_, IInkStrokeDisp>) -> windows_core::Result<()>; + fn BeginStroke(&self, tcid: u32, sid: u32, ppacket: *const i32, cpacketproperties: u32, ppacketproperties: *const PACKET_PROPERTY, finktodevicescalex: f32, finktodevicescaley: f32, ppiinkstroke: windows_core::OutRef<'_, IInkStrokeDisp>) -> windows_core::Result<()>; fn AppendPackets(&self, tcid: u32, sid: u32, cpktbufflength: u32, ppackets: *const i32) -> windows_core::Result<()>; - fn EndStroke(&self, tcid: u32, sid: u32, ppiinkstroke: *mut Option, pdirtyrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; + fn EndStroke(&self, tcid: u32, sid: u32, ppiinkstroke: windows_core::OutRef<'_, IInkStrokeDisp>, pdirtyrect: *mut super::super::Foundation::RECT) -> windows_core::Result<()>; fn Ink(&self) -> windows_core::Result; - fn putref_Ink(&self, piinkobj: Option<&IInkDisp>) -> windows_core::Result<()>; + fn putref_Ink(&self, piinkobj: windows_core::Ref<'_, IInkDisp>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl IStrokeBuilder_Vtbl { @@ -12535,7 +12535,7 @@ impl IStrokeBuilder_Vtbl { } unsafe extern "system" fn putref_Ink(this: *mut core::ffi::c_void, piinkobj: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStrokeBuilder_Impl::putref_Ink(this, windows_core::from_raw_borrowed(&piinkobj)).into() + IStrokeBuilder_Impl::putref_Ink(this, core::mem::transmute_copy(&piinkobj)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -12711,22 +12711,22 @@ pub struct IStylusPlugin_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IStylusPlugin_Impl: windows_core::IUnknownImpl { - fn RealTimeStylusEnabled(&self, pirtssrc: Option<&IRealTimeStylus>, ctcidcount: u32, ptcids: *const u32) -> windows_core::Result<()>; - fn RealTimeStylusDisabled(&self, pirtssrc: Option<&IRealTimeStylus>, ctcidcount: u32, ptcids: *const u32) -> windows_core::Result<()>; - fn StylusInRange(&self, pirtssrc: Option<&IRealTimeStylus>, tcid: u32, sid: u32) -> windows_core::Result<()>; - fn StylusOutOfRange(&self, pirtssrc: Option<&IRealTimeStylus>, tcid: u32, sid: u32) -> windows_core::Result<()>; - fn StylusDown(&self, pirtssrc: Option<&IRealTimeStylus>, pstylusinfo: *const StylusInfo, cpropcountperpkt: u32, ppacket: *const i32, ppinoutpkt: *mut *mut i32) -> windows_core::Result<()>; - fn StylusUp(&self, pirtssrc: Option<&IRealTimeStylus>, pstylusinfo: *const StylusInfo, cpropcountperpkt: u32, ppacket: *const i32, ppinoutpkt: *mut *mut i32) -> windows_core::Result<()>; - fn StylusButtonDown(&self, pirtssrc: Option<&IRealTimeStylus>, sid: u32, pguidstylusbutton: *const windows_core::GUID, pstyluspos: *mut super::super::Foundation::POINT) -> windows_core::Result<()>; - fn StylusButtonUp(&self, pirtssrc: Option<&IRealTimeStylus>, sid: u32, pguidstylusbutton: *const windows_core::GUID, pstyluspos: *mut super::super::Foundation::POINT) -> windows_core::Result<()>; - fn InAirPackets(&self, pirtssrc: Option<&IRealTimeStylus>, pstylusinfo: *const StylusInfo, cpktcount: u32, cpktbufflength: u32, ppackets: *const i32, pcinoutpkts: *mut u32, ppinoutpkts: *mut *mut i32) -> windows_core::Result<()>; - fn Packets(&self, pirtssrc: Option<&IRealTimeStylus>, pstylusinfo: *const StylusInfo, cpktcount: u32, cpktbufflength: u32, ppackets: *const i32, pcinoutpkts: *mut u32, ppinoutpkts: *mut *mut i32) -> windows_core::Result<()>; - fn CustomStylusDataAdded(&self, pirtssrc: Option<&IRealTimeStylus>, pguidid: *const windows_core::GUID, cbdata: u32, pbdata: *const u8) -> windows_core::Result<()>; - fn SystemEvent(&self, pirtssrc: Option<&IRealTimeStylus>, tcid: u32, sid: u32, event: u16, eventdata: &SYSTEM_EVENT_DATA) -> windows_core::Result<()>; - fn TabletAdded(&self, pirtssrc: Option<&IRealTimeStylus>, pitablet: Option<&IInkTablet>) -> windows_core::Result<()>; - fn TabletRemoved(&self, pirtssrc: Option<&IRealTimeStylus>, itabletindex: i32) -> windows_core::Result<()>; - fn Error(&self, pirtssrc: Option<&IRealTimeStylus>, piplugin: Option<&IStylusPlugin>, datainterest: RealTimeStylusDataInterest, hrerrorcode: windows_core::HRESULT, lptrkey: *mut isize) -> windows_core::Result<()>; - fn UpdateMapping(&self, pirtssrc: Option<&IRealTimeStylus>) -> windows_core::Result<()>; + fn RealTimeStylusEnabled(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, ctcidcount: u32, ptcids: *const u32) -> windows_core::Result<()>; + fn RealTimeStylusDisabled(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, ctcidcount: u32, ptcids: *const u32) -> windows_core::Result<()>; + fn StylusInRange(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, tcid: u32, sid: u32) -> windows_core::Result<()>; + fn StylusOutOfRange(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, tcid: u32, sid: u32) -> windows_core::Result<()>; + fn StylusDown(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, pstylusinfo: *const StylusInfo, cpropcountperpkt: u32, ppacket: *const i32, ppinoutpkt: *mut *mut i32) -> windows_core::Result<()>; + fn StylusUp(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, pstylusinfo: *const StylusInfo, cpropcountperpkt: u32, ppacket: *const i32, ppinoutpkt: *mut *mut i32) -> windows_core::Result<()>; + fn StylusButtonDown(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, sid: u32, pguidstylusbutton: *const windows_core::GUID, pstyluspos: *mut super::super::Foundation::POINT) -> windows_core::Result<()>; + fn StylusButtonUp(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, sid: u32, pguidstylusbutton: *const windows_core::GUID, pstyluspos: *mut super::super::Foundation::POINT) -> windows_core::Result<()>; + fn InAirPackets(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, pstylusinfo: *const StylusInfo, cpktcount: u32, cpktbufflength: u32, ppackets: *const i32, pcinoutpkts: *mut u32, ppinoutpkts: *mut *mut i32) -> windows_core::Result<()>; + fn Packets(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, pstylusinfo: *const StylusInfo, cpktcount: u32, cpktbufflength: u32, ppackets: *const i32, pcinoutpkts: *mut u32, ppinoutpkts: *mut *mut i32) -> windows_core::Result<()>; + fn CustomStylusDataAdded(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, pguidid: *const windows_core::GUID, cbdata: u32, pbdata: *const u8) -> windows_core::Result<()>; + fn SystemEvent(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, tcid: u32, sid: u32, event: u16, eventdata: &SYSTEM_EVENT_DATA) -> windows_core::Result<()>; + fn TabletAdded(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, pitablet: windows_core::Ref<'_, IInkTablet>) -> windows_core::Result<()>; + fn TabletRemoved(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, itabletindex: i32) -> windows_core::Result<()>; + fn Error(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>, piplugin: windows_core::Ref<'_, IStylusPlugin>, datainterest: RealTimeStylusDataInterest, hrerrorcode: windows_core::HRESULT, lptrkey: *mut isize) -> windows_core::Result<()>; + fn UpdateMapping(&self, pirtssrc: windows_core::Ref<'_, IRealTimeStylus>) -> windows_core::Result<()>; fn DataInterest(&self) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -12734,67 +12734,67 @@ impl IStylusPlugin_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RealTimeStylusEnabled(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, ctcidcount: u32, ptcids: *const u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::RealTimeStylusEnabled(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&ctcidcount), core::mem::transmute_copy(&ptcids)).into() + IStylusPlugin_Impl::RealTimeStylusEnabled(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&ctcidcount), core::mem::transmute_copy(&ptcids)).into() } unsafe extern "system" fn RealTimeStylusDisabled(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, ctcidcount: u32, ptcids: *const u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::RealTimeStylusDisabled(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&ctcidcount), core::mem::transmute_copy(&ptcids)).into() + IStylusPlugin_Impl::RealTimeStylusDisabled(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&ctcidcount), core::mem::transmute_copy(&ptcids)).into() } unsafe extern "system" fn StylusInRange(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, tcid: u32, sid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::StylusInRange(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&tcid), core::mem::transmute_copy(&sid)).into() + IStylusPlugin_Impl::StylusInRange(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&tcid), core::mem::transmute_copy(&sid)).into() } unsafe extern "system" fn StylusOutOfRange(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, tcid: u32, sid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::StylusOutOfRange(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&tcid), core::mem::transmute_copy(&sid)).into() + IStylusPlugin_Impl::StylusOutOfRange(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&tcid), core::mem::transmute_copy(&sid)).into() } unsafe extern "system" fn StylusDown(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, pstylusinfo: *const StylusInfo, cpropcountperpkt: u32, ppacket: *const i32, ppinoutpkt: *mut *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::StylusDown(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&pstylusinfo), core::mem::transmute_copy(&cpropcountperpkt), core::mem::transmute_copy(&ppacket), core::mem::transmute_copy(&ppinoutpkt)).into() + IStylusPlugin_Impl::StylusDown(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&pstylusinfo), core::mem::transmute_copy(&cpropcountperpkt), core::mem::transmute_copy(&ppacket), core::mem::transmute_copy(&ppinoutpkt)).into() } unsafe extern "system" fn StylusUp(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, pstylusinfo: *const StylusInfo, cpropcountperpkt: u32, ppacket: *const i32, ppinoutpkt: *mut *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::StylusUp(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&pstylusinfo), core::mem::transmute_copy(&cpropcountperpkt), core::mem::transmute_copy(&ppacket), core::mem::transmute_copy(&ppinoutpkt)).into() + IStylusPlugin_Impl::StylusUp(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&pstylusinfo), core::mem::transmute_copy(&cpropcountperpkt), core::mem::transmute_copy(&ppacket), core::mem::transmute_copy(&ppinoutpkt)).into() } unsafe extern "system" fn StylusButtonDown(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, sid: u32, pguidstylusbutton: *const windows_core::GUID, pstyluspos: *mut super::super::Foundation::POINT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::StylusButtonDown(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&sid), core::mem::transmute_copy(&pguidstylusbutton), core::mem::transmute_copy(&pstyluspos)).into() + IStylusPlugin_Impl::StylusButtonDown(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&sid), core::mem::transmute_copy(&pguidstylusbutton), core::mem::transmute_copy(&pstyluspos)).into() } unsafe extern "system" fn StylusButtonUp(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, sid: u32, pguidstylusbutton: *const windows_core::GUID, pstyluspos: *mut super::super::Foundation::POINT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::StylusButtonUp(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&sid), core::mem::transmute_copy(&pguidstylusbutton), core::mem::transmute_copy(&pstyluspos)).into() + IStylusPlugin_Impl::StylusButtonUp(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&sid), core::mem::transmute_copy(&pguidstylusbutton), core::mem::transmute_copy(&pstyluspos)).into() } unsafe extern "system" fn InAirPackets(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, pstylusinfo: *const StylusInfo, cpktcount: u32, cpktbufflength: u32, ppackets: *const i32, pcinoutpkts: *mut u32, ppinoutpkts: *mut *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::InAirPackets(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&pstylusinfo), core::mem::transmute_copy(&cpktcount), core::mem::transmute_copy(&cpktbufflength), core::mem::transmute_copy(&ppackets), core::mem::transmute_copy(&pcinoutpkts), core::mem::transmute_copy(&ppinoutpkts)).into() + IStylusPlugin_Impl::InAirPackets(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&pstylusinfo), core::mem::transmute_copy(&cpktcount), core::mem::transmute_copy(&cpktbufflength), core::mem::transmute_copy(&ppackets), core::mem::transmute_copy(&pcinoutpkts), core::mem::transmute_copy(&ppinoutpkts)).into() } unsafe extern "system" fn Packets(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, pstylusinfo: *const StylusInfo, cpktcount: u32, cpktbufflength: u32, ppackets: *const i32, pcinoutpkts: *mut u32, ppinoutpkts: *mut *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::Packets(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&pstylusinfo), core::mem::transmute_copy(&cpktcount), core::mem::transmute_copy(&cpktbufflength), core::mem::transmute_copy(&ppackets), core::mem::transmute_copy(&pcinoutpkts), core::mem::transmute_copy(&ppinoutpkts)).into() + IStylusPlugin_Impl::Packets(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&pstylusinfo), core::mem::transmute_copy(&cpktcount), core::mem::transmute_copy(&cpktbufflength), core::mem::transmute_copy(&ppackets), core::mem::transmute_copy(&pcinoutpkts), core::mem::transmute_copy(&ppinoutpkts)).into() } unsafe extern "system" fn CustomStylusDataAdded(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, pguidid: *const windows_core::GUID, cbdata: u32, pbdata: *const u8) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::CustomStylusDataAdded(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&pguidid), core::mem::transmute_copy(&cbdata), core::mem::transmute_copy(&pbdata)).into() + IStylusPlugin_Impl::CustomStylusDataAdded(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&pguidid), core::mem::transmute_copy(&cbdata), core::mem::transmute_copy(&pbdata)).into() } unsafe extern "system" fn SystemEvent(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, tcid: u32, sid: u32, event: u16, eventdata: SYSTEM_EVENT_DATA) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::SystemEvent(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&tcid), core::mem::transmute_copy(&sid), core::mem::transmute_copy(&event), core::mem::transmute(&eventdata)).into() + IStylusPlugin_Impl::SystemEvent(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&tcid), core::mem::transmute_copy(&sid), core::mem::transmute_copy(&event), core::mem::transmute(&eventdata)).into() } unsafe extern "system" fn TabletAdded(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, pitablet: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::TabletAdded(this, windows_core::from_raw_borrowed(&pirtssrc), windows_core::from_raw_borrowed(&pitablet)).into() + IStylusPlugin_Impl::TabletAdded(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&pitablet)).into() } unsafe extern "system" fn TabletRemoved(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, itabletindex: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::TabletRemoved(this, windows_core::from_raw_borrowed(&pirtssrc), core::mem::transmute_copy(&itabletindex)).into() + IStylusPlugin_Impl::TabletRemoved(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&itabletindex)).into() } unsafe extern "system" fn Error(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void, piplugin: *mut core::ffi::c_void, datainterest: RealTimeStylusDataInterest, hrerrorcode: windows_core::HRESULT, lptrkey: *mut isize) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::Error(this, windows_core::from_raw_borrowed(&pirtssrc), windows_core::from_raw_borrowed(&piplugin), core::mem::transmute_copy(&datainterest), core::mem::transmute_copy(&hrerrorcode), core::mem::transmute_copy(&lptrkey)).into() + IStylusPlugin_Impl::Error(this, core::mem::transmute_copy(&pirtssrc), core::mem::transmute_copy(&piplugin), core::mem::transmute_copy(&datainterest), core::mem::transmute_copy(&hrerrorcode), core::mem::transmute_copy(&lptrkey)).into() } unsafe extern "system" fn UpdateMapping(this: *mut core::ffi::c_void, pirtssrc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IStylusPlugin_Impl::UpdateMapping(this, windows_core::from_raw_borrowed(&pirtssrc)).into() + IStylusPlugin_Impl::UpdateMapping(this, core::mem::transmute_copy(&pirtssrc)).into() } unsafe extern "system" fn DataInterest(this: *mut core::ffi::c_void, pdatainterest: *mut RealTimeStylusDataInterest) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -13009,8 +13009,8 @@ pub trait ITextInputPanel_Impl: windows_core::IUnknownImpl { fn SetInPlaceVisibility(&self, visible: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn SetInPlacePosition(&self, xposition: i32, yposition: i32, position: CorrectionPosition) -> windows_core::Result<()>; fn SetInPlaceHoverTargetPosition(&self, xposition: i32, yposition: i32) -> windows_core::Result<()>; - fn Advise(&self, eventsink: Option<&ITextInputPanelEventSink>, eventmask: u32) -> windows_core::Result<()>; - fn Unadvise(&self, eventsink: Option<&ITextInputPanelEventSink>) -> windows_core::Result<()>; + fn Advise(&self, eventsink: windows_core::Ref<'_, ITextInputPanelEventSink>, eventmask: u32) -> windows_core::Result<()>; + fn Unadvise(&self, eventsink: windows_core::Ref<'_, ITextInputPanelEventSink>) -> windows_core::Result<()>; } impl ITextInputPanel_Vtbl { pub const fn new() -> Self { @@ -13186,11 +13186,11 @@ impl ITextInputPanel_Vtbl { } unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, eventsink: *mut core::ffi::c_void, eventmask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextInputPanel_Impl::Advise(this, windows_core::from_raw_borrowed(&eventsink), core::mem::transmute_copy(&eventmask)).into() + ITextInputPanel_Impl::Advise(this, core::mem::transmute_copy(&eventsink), core::mem::transmute_copy(&eventmask)).into() } unsafe extern "system" fn Unadvise(this: *mut core::ffi::c_void, eventsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextInputPanel_Impl::Unadvise(this, windows_core::from_raw_borrowed(&eventsink)).into() + ITextInputPanel_Impl::Unadvise(this, core::mem::transmute_copy(&eventsink)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -13449,8 +13449,8 @@ pub struct ITipAutoCompleteClient_Vtbl { pub RequestShowUI: unsafe extern "system" fn(*mut core::ffi::c_void, super::super::Foundation::HWND, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait ITipAutoCompleteClient_Impl: windows_core::IUnknownImpl { - fn AdviseProvider(&self, hwndfield: super::super::Foundation::HWND, piprovider: Option<&ITipAutoCompleteProvider>) -> windows_core::Result<()>; - fn UnadviseProvider(&self, hwndfield: super::super::Foundation::HWND, piprovider: Option<&ITipAutoCompleteProvider>) -> windows_core::Result<()>; + fn AdviseProvider(&self, hwndfield: super::super::Foundation::HWND, piprovider: windows_core::Ref<'_, ITipAutoCompleteProvider>) -> windows_core::Result<()>; + fn UnadviseProvider(&self, hwndfield: super::super::Foundation::HWND, piprovider: windows_core::Ref<'_, ITipAutoCompleteProvider>) -> windows_core::Result<()>; fn UserSelection(&self) -> windows_core::Result<()>; fn PreferredRects(&self, prcaclist: *const super::super::Foundation::RECT, prcfield: *const super::super::Foundation::RECT, prcmodifiedaclist: *mut super::super::Foundation::RECT, pfshownabovetip: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn RequestShowUI(&self, hwndlist: super::super::Foundation::HWND) -> windows_core::Result; @@ -13459,11 +13459,11 @@ impl ITipAutoCompleteClient_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseProvider(this: *mut core::ffi::c_void, hwndfield: super::super::Foundation::HWND, piprovider: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITipAutoCompleteClient_Impl::AdviseProvider(this, core::mem::transmute_copy(&hwndfield), windows_core::from_raw_borrowed(&piprovider)).into() + ITipAutoCompleteClient_Impl::AdviseProvider(this, core::mem::transmute_copy(&hwndfield), core::mem::transmute_copy(&piprovider)).into() } unsafe extern "system" fn UnadviseProvider(this: *mut core::ffi::c_void, hwndfield: super::super::Foundation::HWND, piprovider: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITipAutoCompleteClient_Impl::UnadviseProvider(this, core::mem::transmute_copy(&hwndfield), windows_core::from_raw_borrowed(&piprovider)).into() + ITipAutoCompleteClient_Impl::UnadviseProvider(this, core::mem::transmute_copy(&hwndfield), core::mem::transmute_copy(&piprovider)).into() } unsafe extern "system" fn UserSelection(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs index 1600e7cef4..fdffa995b0 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs @@ -409,23 +409,23 @@ pub struct IAccServerDocMgr_Vtbl { pub OnDocumentFocus: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IAccServerDocMgr_Impl: windows_core::IUnknownImpl { - fn NewDocument(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn RevokeDocument(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn OnDocumentFocus(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn NewDocument(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn RevokeDocument(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnDocumentFocus(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl IAccServerDocMgr_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn NewDocument(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccServerDocMgr_Impl::NewDocument(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)).into() + IAccServerDocMgr_Impl::NewDocument(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn RevokeDocument(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccServerDocMgr_Impl::RevokeDocument(this, windows_core::from_raw_borrowed(&punk)).into() + IAccServerDocMgr_Impl::RevokeDocument(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn OnDocumentFocus(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccServerDocMgr_Impl::OnDocumentFocus(this, windows_core::from_raw_borrowed(&punk)).into() + IAccServerDocMgr_Impl::OnDocumentFocus(this, core::mem::transmute_copy(&punk)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -494,12 +494,12 @@ pub struct IAccStore_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IAccStore_Impl: windows_core::IUnknownImpl { - fn Register(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn Unregister(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn Register(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn Unregister(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetDocuments(&self) -> windows_core::Result; fn LookupByHWND(&self, hwnd: super::super::Foundation::HWND, riid: *const windows_core::GUID) -> windows_core::Result; fn LookupByPoint(&self, pt: &super::super::Foundation::POINT, riid: *const windows_core::GUID) -> windows_core::Result; - fn OnDocumentFocus(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnDocumentFocus(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetFocused(&self, riid: *const windows_core::GUID) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -507,11 +507,11 @@ impl IAccStore_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Register(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccStore_Impl::Register(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)).into() + IAccStore_Impl::Register(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn Unregister(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccStore_Impl::Unregister(this, windows_core::from_raw_borrowed(&punk)).into() + IAccStore_Impl::Unregister(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn GetDocuments(this: *mut core::ffi::c_void, enumunknown: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -545,7 +545,7 @@ impl IAccStore_Vtbl { } unsafe extern "system" fn OnDocumentFocus(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAccStore_Impl::OnDocumentFocus(this, windows_core::from_raw_borrowed(&punk)).into() + IAccStore_Impl::OnDocumentFocus(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn GetFocused(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -647,10 +647,10 @@ pub struct IAnchor_Vtbl { pub trait IAnchor_Impl: windows_core::IUnknownImpl { fn SetGravity(&self, gravity: TsGravity) -> windows_core::Result<()>; fn GetGravity(&self) -> windows_core::Result; - fn IsEqual(&self, pawith: Option<&IAnchor>) -> windows_core::Result; - fn Compare(&self, pawith: Option<&IAnchor>) -> windows_core::Result; - fn Shift(&self, dwflags: u32, cchreq: i32, pcch: *mut i32, pahaltanchor: Option<&IAnchor>) -> windows_core::Result<()>; - fn ShiftTo(&self, pasite: Option<&IAnchor>) -> windows_core::Result<()>; + fn IsEqual(&self, pawith: windows_core::Ref<'_, IAnchor>) -> windows_core::Result; + fn Compare(&self, pawith: windows_core::Ref<'_, IAnchor>) -> windows_core::Result; + fn Shift(&self, dwflags: u32, cchreq: i32, pcch: *mut i32, pahaltanchor: windows_core::Ref<'_, IAnchor>) -> windows_core::Result<()>; + fn ShiftTo(&self, pasite: windows_core::Ref<'_, IAnchor>) -> windows_core::Result<()>; fn ShiftRegion(&self, dwflags: u32, dir: TsShiftDir) -> windows_core::Result; fn SetChangeHistoryMask(&self, dwmask: u32) -> windows_core::Result<()>; fn GetChangeHistory(&self) -> windows_core::Result; @@ -675,7 +675,7 @@ impl IAnchor_Vtbl { } unsafe extern "system" fn IsEqual(this: *mut core::ffi::c_void, pawith: *mut core::ffi::c_void, pfequal: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAnchor_Impl::IsEqual(this, windows_core::from_raw_borrowed(&pawith)) { + match IAnchor_Impl::IsEqual(this, core::mem::transmute_copy(&pawith)) { Ok(ok__) => { pfequal.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -685,7 +685,7 @@ impl IAnchor_Vtbl { } unsafe extern "system" fn Compare(this: *mut core::ffi::c_void, pawith: *mut core::ffi::c_void, plresult: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IAnchor_Impl::Compare(this, windows_core::from_raw_borrowed(&pawith)) { + match IAnchor_Impl::Compare(this, core::mem::transmute_copy(&pawith)) { Ok(ok__) => { plresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -695,11 +695,11 @@ impl IAnchor_Vtbl { } unsafe extern "system" fn Shift(this: *mut core::ffi::c_void, dwflags: u32, cchreq: i32, pcch: *mut i32, pahaltanchor: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAnchor_Impl::Shift(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&cchreq), core::mem::transmute_copy(&pcch), windows_core::from_raw_borrowed(&pahaltanchor)).into() + IAnchor_Impl::Shift(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&cchreq), core::mem::transmute_copy(&pcch), core::mem::transmute_copy(&pahaltanchor)).into() } unsafe extern "system" fn ShiftTo(this: *mut core::ffi::c_void, pasite: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAnchor_Impl::ShiftTo(this, windows_core::from_raw_borrowed(&pasite)).into() + IAnchor_Impl::ShiftTo(this, core::mem::transmute_copy(&pasite)).into() } unsafe extern "system" fn ShiftRegion(this: *mut core::ffi::c_void, dwflags: u32, dir: TsShiftDir, pfnoregion: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -812,14 +812,14 @@ pub struct ICoCreateLocally_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ICoCreateLocally_Impl: windows_core::IUnknownImpl { - fn CoCreateLocally(&self, rclsid: *const windows_core::GUID, dwclscontext: u32, riid: *const windows_core::GUID, punk: *mut Option, riidparam: *const windows_core::GUID, punkparam: Option<&windows_core::IUnknown>, varparam: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; + fn CoCreateLocally(&self, rclsid: *const windows_core::GUID, dwclscontext: u32, riid: *const windows_core::GUID, punk: windows_core::OutRef<'_, windows_core::IUnknown>, riidparam: *const windows_core::GUID, punkparam: windows_core::Ref<'_, windows_core::IUnknown>, varparam: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ICoCreateLocally_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CoCreateLocally(this: *mut core::ffi::c_void, rclsid: *const windows_core::GUID, dwclscontext: u32, riid: *const windows_core::GUID, punk: *mut *mut core::ffi::c_void, riidparam: *const windows_core::GUID, punkparam: *mut core::ffi::c_void, varparam: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICoCreateLocally_Impl::CoCreateLocally(this, core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&riidparam), windows_core::from_raw_borrowed(&punkparam), core::mem::transmute(&varparam)).into() + ICoCreateLocally_Impl::CoCreateLocally(this, core::mem::transmute_copy(&rclsid), core::mem::transmute_copy(&dwclscontext), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&riidparam), core::mem::transmute_copy(&punkparam), core::mem::transmute(&varparam)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CoCreateLocally: CoCreateLocally:: } } @@ -851,14 +851,14 @@ pub struct ICoCreatedLocally_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ICoCreatedLocally_Impl: windows_core::IUnknownImpl { - fn LocalInit(&self, punklocalobject: Option<&windows_core::IUnknown>, riidparam: *const windows_core::GUID, punkparam: Option<&windows_core::IUnknown>, varparam: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; + fn LocalInit(&self, punklocalobject: windows_core::Ref<'_, windows_core::IUnknown>, riidparam: *const windows_core::GUID, punkparam: windows_core::Ref<'_, windows_core::IUnknown>, varparam: &super::super::System::Variant::VARIANT) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ICoCreatedLocally_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn LocalInit(this: *mut core::ffi::c_void, punklocalobject: *mut core::ffi::c_void, riidparam: *const windows_core::GUID, punkparam: *mut core::ffi::c_void, varparam: super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ICoCreatedLocally_Impl::LocalInit(this, windows_core::from_raw_borrowed(&punklocalobject), core::mem::transmute_copy(&riidparam), windows_core::from_raw_borrowed(&punkparam), core::mem::transmute(&varparam)).into() + ICoCreatedLocally_Impl::LocalInit(this, core::mem::transmute_copy(&punklocalobject), core::mem::transmute_copy(&riidparam), core::mem::transmute_copy(&punkparam), core::mem::transmute(&varparam)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), LocalInit: LocalInit:: } } @@ -889,14 +889,14 @@ pub struct IDocWrap_Vtbl { pub GetWrappedDoc: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IDocWrap_Impl: windows_core::IUnknownImpl { - fn SetDoc(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetDoc(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn GetWrappedDoc(&self, riid: *const windows_core::GUID) -> windows_core::Result; } impl IDocWrap_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetDoc(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDocWrap_Impl::SetDoc(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)).into() + IDocWrap_Impl::SetDoc(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn GetWrappedDoc(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -946,7 +946,7 @@ pub struct IEnumITfCompositionView_Vtbl { } pub trait IEnumITfCompositionView_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, rgcompositionview: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, rgcompositionview: windows_core::OutRef<'_, ITfCompositionView>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1082,7 +1082,7 @@ pub struct IEnumTfCandidates_Vtbl { } pub trait IEnumTfCandidates_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, ppcand: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, ppcand: windows_core::OutRef<'_, ITfCandidateString>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1150,7 +1150,7 @@ pub struct IEnumTfContextViews_Vtbl { } pub trait IEnumTfContextViews_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, rgviews: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, rgviews: windows_core::OutRef<'_, ITfContextView>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1218,7 +1218,7 @@ pub struct IEnumTfContexts_Vtbl { } pub trait IEnumTfContexts_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, rgcontext: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, rgcontext: windows_core::OutRef<'_, ITfContext>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1286,7 +1286,7 @@ pub struct IEnumTfDisplayAttributeInfo_Vtbl { } pub trait IEnumTfDisplayAttributeInfo_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, rginfo: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, rginfo: windows_core::OutRef<'_, ITfDisplayAttributeInfo>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1354,7 +1354,7 @@ pub struct IEnumTfDocumentMgrs_Vtbl { } pub trait IEnumTfDocumentMgrs_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, rgdocumentmgr: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, rgdocumentmgr: windows_core::OutRef<'_, ITfDocumentMgr>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1422,7 +1422,7 @@ pub struct IEnumTfFunctionProviders_Vtbl { } pub trait IEnumTfFunctionProviders_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, ppcmdobj: *mut Option, pcfetch: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, ppcmdobj: windows_core::OutRef<'_, ITfFunctionProvider>, pcfetch: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1565,7 +1565,7 @@ pub struct IEnumTfLangBarItems_Vtbl { } pub trait IEnumTfLangBarItems_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, ppitem: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, ppitem: windows_core::OutRef<'_, ITfLangBarItem>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1769,7 +1769,7 @@ pub struct IEnumTfProperties_Vtbl { } pub trait IEnumTfProperties_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, ppprop: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, ppprop: windows_core::OutRef<'_, ITfProperty>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1912,7 +1912,7 @@ pub struct IEnumTfRanges_Vtbl { } pub trait IEnumTfRanges_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, pprange: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, pprange: windows_core::OutRef<'_, ITfRange>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -1980,7 +1980,7 @@ pub struct IEnumTfUIElements_Vtbl { } pub trait IEnumTfUIElements_Impl: windows_core::IUnknownImpl { fn Clone(&self) -> windows_core::Result; - fn Next(&self, ulcount: u32, ppelement: *mut Option, pcfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, ulcount: u32, ppelement: windows_core::OutRef<'_, ITfUIElement>, pcfetched: *mut u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Skip(&self, ulcount: u32) -> windows_core::Result<()>; } @@ -2334,8 +2334,8 @@ pub struct ITextStoreACP_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITextStoreACP_Impl: windows_core::IUnknownImpl { - fn AdviseSink(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>, dwmask: u32) -> windows_core::Result<()>; - fn UnadviseSink(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AdviseSink(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>, dwmask: u32) -> windows_core::Result<()>; + fn UnadviseSink(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RequestLock(&self, dwlockflags: u32) -> windows_core::Result; fn GetStatus(&self) -> windows_core::Result; fn QueryInsert(&self, acpteststart: i32, acptestend: i32, cch: u32, pacpresultstart: *mut i32, pacpresultend: *mut i32) -> windows_core::Result<()>; @@ -2346,9 +2346,9 @@ pub trait ITextStoreACP_Impl: windows_core::IUnknownImpl { fn GetFormattedText(&self, acpstart: i32, acpend: i32) -> windows_core::Result; fn GetEmbedded(&self, acppos: i32, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID) -> windows_core::Result; fn QueryInsertEmbedded(&self, pguidservice: *const windows_core::GUID, pformatetc: *const super::super::System::Com::FORMATETC) -> windows_core::Result; - fn InsertEmbedded(&self, dwflags: u32, acpstart: i32, acpend: i32, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result; + fn InsertEmbedded(&self, dwflags: u32, acpstart: i32, acpend: i32, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result; fn InsertTextAtSelection(&self, dwflags: u32, pchtext: &windows_core::PCWSTR, cch: u32, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()>; - fn InsertEmbeddedAtSelection(&self, dwflags: u32, pdataobject: Option<&super::super::System::Com::IDataObject>, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()>; + fn InsertEmbeddedAtSelection(&self, dwflags: u32, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()>; fn RequestSupportedAttrs(&self, dwflags: u32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID) -> windows_core::Result<()>; fn RequestAttrsAtPosition(&self, acppos: i32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()>; fn RequestAttrsTransitioningAtPosition(&self, acppos: i32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()>; @@ -2366,11 +2366,11 @@ impl ITextStoreACP_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseSink(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void, dwmask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreACP_Impl::AdviseSink(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&dwmask)).into() + ITextStoreACP_Impl::AdviseSink(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&dwmask)).into() } unsafe extern "system" fn UnadviseSink(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreACP_Impl::UnadviseSink(this, windows_core::from_raw_borrowed(&punk)).into() + ITextStoreACP_Impl::UnadviseSink(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn RequestLock(this: *mut core::ffi::c_void, dwlockflags: u32, phrsession: *mut windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2450,7 +2450,7 @@ impl ITextStoreACP_Vtbl { } unsafe extern "system" fn InsertEmbedded(this: *mut core::ffi::c_void, dwflags: u32, acpstart: i32, acpend: i32, pdataobject: *mut core::ffi::c_void, pchange: *mut TS_TEXTCHANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextStoreACP_Impl::InsertEmbedded(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&acpstart), core::mem::transmute_copy(&acpend), windows_core::from_raw_borrowed(&pdataobject)) { + match ITextStoreACP_Impl::InsertEmbedded(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&acpstart), core::mem::transmute_copy(&acpend), core::mem::transmute_copy(&pdataobject)) { Ok(ok__) => { pchange.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2464,7 +2464,7 @@ impl ITextStoreACP_Vtbl { } unsafe extern "system" fn InsertEmbeddedAtSelection(this: *mut core::ffi::c_void, dwflags: u32, pdataobject: *mut core::ffi::c_void, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreACP_Impl::InsertEmbeddedAtSelection(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute_copy(&pacpstart), core::mem::transmute_copy(&pacpend), core::mem::transmute_copy(&pchange)).into() + ITextStoreACP_Impl::InsertEmbeddedAtSelection(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&pacpstart), core::mem::transmute_copy(&pacpend), core::mem::transmute_copy(&pchange)).into() } unsafe extern "system" fn RequestSupportedAttrs(this: *mut core::ffi::c_void, dwflags: u32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2729,8 +2729,8 @@ pub struct ITextStoreACP2_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITextStoreACP2_Impl: windows_core::IUnknownImpl { - fn AdviseSink(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>, dwmask: u32) -> windows_core::Result<()>; - fn UnadviseSink(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AdviseSink(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>, dwmask: u32) -> windows_core::Result<()>; + fn UnadviseSink(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RequestLock(&self, dwlockflags: u32) -> windows_core::Result; fn GetStatus(&self) -> windows_core::Result; fn QueryInsert(&self, acpteststart: i32, acptestend: i32, cch: u32, pacpresultstart: *mut i32, pacpresultend: *mut i32) -> windows_core::Result<()>; @@ -2741,9 +2741,9 @@ pub trait ITextStoreACP2_Impl: windows_core::IUnknownImpl { fn GetFormattedText(&self, acpstart: i32, acpend: i32) -> windows_core::Result; fn GetEmbedded(&self, acppos: i32, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID) -> windows_core::Result; fn QueryInsertEmbedded(&self, pguidservice: *const windows_core::GUID, pformatetc: *const super::super::System::Com::FORMATETC) -> windows_core::Result; - fn InsertEmbedded(&self, dwflags: u32, acpstart: i32, acpend: i32, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result; + fn InsertEmbedded(&self, dwflags: u32, acpstart: i32, acpend: i32, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result; fn InsertTextAtSelection(&self, dwflags: u32, pchtext: &windows_core::PCWSTR, cch: u32, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()>; - fn InsertEmbeddedAtSelection(&self, dwflags: u32, pdataobject: Option<&super::super::System::Com::IDataObject>, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()>; + fn InsertEmbeddedAtSelection(&self, dwflags: u32, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::Result<()>; fn RequestSupportedAttrs(&self, dwflags: u32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID) -> windows_core::Result<()>; fn RequestAttrsAtPosition(&self, acppos: i32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()>; fn RequestAttrsTransitioningAtPosition(&self, acppos: i32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()>; @@ -2760,11 +2760,11 @@ impl ITextStoreACP2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseSink(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void, dwmask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreACP2_Impl::AdviseSink(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&dwmask)).into() + ITextStoreACP2_Impl::AdviseSink(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&dwmask)).into() } unsafe extern "system" fn UnadviseSink(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreACP2_Impl::UnadviseSink(this, windows_core::from_raw_borrowed(&punk)).into() + ITextStoreACP2_Impl::UnadviseSink(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn RequestLock(this: *mut core::ffi::c_void, dwlockflags: u32, phrsession: *mut windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -2844,7 +2844,7 @@ impl ITextStoreACP2_Vtbl { } unsafe extern "system" fn InsertEmbedded(this: *mut core::ffi::c_void, dwflags: u32, acpstart: i32, acpend: i32, pdataobject: *mut core::ffi::c_void, pchange: *mut TS_TEXTCHANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextStoreACP2_Impl::InsertEmbedded(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&acpstart), core::mem::transmute_copy(&acpend), windows_core::from_raw_borrowed(&pdataobject)) { + match ITextStoreACP2_Impl::InsertEmbedded(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&acpstart), core::mem::transmute_copy(&acpend), core::mem::transmute_copy(&pdataobject)) { Ok(ok__) => { pchange.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2858,7 +2858,7 @@ impl ITextStoreACP2_Vtbl { } unsafe extern "system" fn InsertEmbeddedAtSelection(this: *mut core::ffi::c_void, dwflags: u32, pdataobject: *mut core::ffi::c_void, pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreACP2_Impl::InsertEmbeddedAtSelection(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute_copy(&pacpstart), core::mem::transmute_copy(&pacpend), core::mem::transmute_copy(&pchange)).into() + ITextStoreACP2_Impl::InsertEmbeddedAtSelection(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&pacpstart), core::mem::transmute_copy(&pacpend), core::mem::transmute_copy(&pchange)).into() } unsafe extern "system" fn RequestSupportedAttrs(this: *mut core::ffi::c_void, dwflags: u32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3035,9 +3035,9 @@ pub struct ITextStoreACPServices_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITextStoreACPServices_Impl: windows_core::IUnknownImpl { - fn Serialize(&self, pprop: Option<&ITfProperty>, prange: Option<&ITfRange>, phdr: *mut TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn Unserialize(&self, pprop: Option<&ITfProperty>, phdr: *const TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: Option<&super::super::System::Com::IStream>, ploader: Option<&ITfPersistentPropertyLoaderACP>) -> windows_core::Result<()>; - fn ForceLoadProperty(&self, pprop: Option<&ITfProperty>) -> windows_core::Result<()>; + fn Serialize(&self, pprop: windows_core::Ref<'_, ITfProperty>, prange: windows_core::Ref<'_, ITfRange>, phdr: *mut TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Unserialize(&self, pprop: windows_core::Ref<'_, ITfProperty>, phdr: *const TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, ploader: windows_core::Ref<'_, ITfPersistentPropertyLoaderACP>) -> windows_core::Result<()>; + fn ForceLoadProperty(&self, pprop: windows_core::Ref<'_, ITfProperty>) -> windows_core::Result<()>; fn CreateRange(&self, acpstart: i32, acpend: i32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -3045,15 +3045,15 @@ impl ITextStoreACPServices_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Serialize(this: *mut core::ffi::c_void, pprop: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, phdr: *mut TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreACPServices_Impl::Serialize(this, windows_core::from_raw_borrowed(&pprop), windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&phdr), windows_core::from_raw_borrowed(&pstream)).into() + ITextStoreACPServices_Impl::Serialize(this, core::mem::transmute_copy(&pprop), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&phdr), core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn Unserialize(this: *mut core::ffi::c_void, pprop: *mut core::ffi::c_void, phdr: *const TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: *mut core::ffi::c_void, ploader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreACPServices_Impl::Unserialize(this, windows_core::from_raw_borrowed(&pprop), core::mem::transmute_copy(&phdr), windows_core::from_raw_borrowed(&pstream), windows_core::from_raw_borrowed(&ploader)).into() + ITextStoreACPServices_Impl::Unserialize(this, core::mem::transmute_copy(&pprop), core::mem::transmute_copy(&phdr), core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&ploader)).into() } unsafe extern "system" fn ForceLoadProperty(this: *mut core::ffi::c_void, pprop: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreACPServices_Impl::ForceLoadProperty(this, windows_core::from_raw_borrowed(&pprop)).into() + ITextStoreACPServices_Impl::ForceLoadProperty(this, core::mem::transmute_copy(&pprop)).into() } unsafe extern "system" fn CreateRange(this: *mut core::ffi::c_void, acpstart: i32, acpend: i32, pprange: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3410,44 +3410,44 @@ pub struct ITextStoreAnchor_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITextStoreAnchor_Impl: windows_core::IUnknownImpl { - fn AdviseSink(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>, dwmask: u32) -> windows_core::Result<()>; - fn UnadviseSink(&self, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AdviseSink(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>, dwmask: u32) -> windows_core::Result<()>; + fn UnadviseSink(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn RequestLock(&self, dwlockflags: u32) -> windows_core::Result; fn GetStatus(&self) -> windows_core::Result; - fn QueryInsert(&self, pateststart: Option<&IAnchor>, patestend: Option<&IAnchor>, cch: u32, pparesultstart: *mut Option, pparesultend: *mut Option) -> windows_core::Result<()>; + fn QueryInsert(&self, pateststart: windows_core::Ref<'_, IAnchor>, patestend: windows_core::Ref<'_, IAnchor>, cch: u32, pparesultstart: windows_core::OutRef<'_, IAnchor>, pparesultend: windows_core::OutRef<'_, IAnchor>) -> windows_core::Result<()>; fn GetSelection(&self, ulindex: u32, ulcount: u32, pselection: *mut TS_SELECTION_ANCHOR, pcfetched: *mut u32) -> windows_core::Result<()>; fn SetSelection(&self, ulcount: u32, pselection: *const TS_SELECTION_ANCHOR) -> windows_core::Result<()>; - fn GetText(&self, dwflags: u32, pastart: Option<&IAnchor>, paend: Option<&IAnchor>, pchtext: windows_core::PWSTR, cchreq: u32, pcch: *mut u32, fupdateanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetText(&self, dwflags: u32, pastart: Option<&IAnchor>, paend: Option<&IAnchor>, pchtext: &windows_core::PCWSTR, cch: u32) -> windows_core::Result<()>; - fn GetFormattedText(&self, pastart: Option<&IAnchor>, paend: Option<&IAnchor>) -> windows_core::Result; - fn GetEmbedded(&self, dwflags: u32, papos: Option<&IAnchor>, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID) -> windows_core::Result; - fn InsertEmbedded(&self, dwflags: u32, pastart: Option<&IAnchor>, paend: Option<&IAnchor>, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn GetText(&self, dwflags: u32, pastart: windows_core::Ref<'_, IAnchor>, paend: windows_core::Ref<'_, IAnchor>, pchtext: windows_core::PWSTR, cchreq: u32, pcch: *mut u32, fupdateanchor: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn SetText(&self, dwflags: u32, pastart: windows_core::Ref<'_, IAnchor>, paend: windows_core::Ref<'_, IAnchor>, pchtext: &windows_core::PCWSTR, cch: u32) -> windows_core::Result<()>; + fn GetFormattedText(&self, pastart: windows_core::Ref<'_, IAnchor>, paend: windows_core::Ref<'_, IAnchor>) -> windows_core::Result; + fn GetEmbedded(&self, dwflags: u32, papos: windows_core::Ref<'_, IAnchor>, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID) -> windows_core::Result; + fn InsertEmbedded(&self, dwflags: u32, pastart: windows_core::Ref<'_, IAnchor>, paend: windows_core::Ref<'_, IAnchor>, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; fn RequestSupportedAttrs(&self, dwflags: u32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID) -> windows_core::Result<()>; - fn RequestAttrsAtPosition(&self, papos: Option<&IAnchor>, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()>; - fn RequestAttrsTransitioningAtPosition(&self, papos: Option<&IAnchor>, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()>; - fn FindNextAttrTransition(&self, pastart: Option<&IAnchor>, pahalt: Option<&IAnchor>, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32, pffound: *mut super::super::Foundation::BOOL, plfoundoffset: *mut i32) -> windows_core::Result<()>; + fn RequestAttrsAtPosition(&self, papos: windows_core::Ref<'_, IAnchor>, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()>; + fn RequestAttrsTransitioningAtPosition(&self, papos: windows_core::Ref<'_, IAnchor>, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::Result<()>; + fn FindNextAttrTransition(&self, pastart: windows_core::Ref<'_, IAnchor>, pahalt: windows_core::Ref<'_, IAnchor>, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32, pffound: *mut super::super::Foundation::BOOL, plfoundoffset: *mut i32) -> windows_core::Result<()>; fn RetrieveRequestedAttrs(&self, ulcount: u32, paattrvals: *mut TS_ATTRVAL, pcfetched: *mut u32) -> windows_core::Result<()>; fn GetStart(&self) -> windows_core::Result; fn GetEnd(&self) -> windows_core::Result; fn GetActiveView(&self) -> windows_core::Result; fn GetAnchorFromPoint(&self, vcview: u32, ptscreen: *const super::super::Foundation::POINT, dwflags: u32) -> windows_core::Result; - fn GetTextExt(&self, vcview: u32, pastart: Option<&IAnchor>, paend: Option<&IAnchor>, prc: *mut super::super::Foundation::RECT, pfclipped: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn GetTextExt(&self, vcview: u32, pastart: windows_core::Ref<'_, IAnchor>, paend: windows_core::Ref<'_, IAnchor>, prc: *mut super::super::Foundation::RECT, pfclipped: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetScreenExt(&self, vcview: u32) -> windows_core::Result; fn GetWnd(&self, vcview: u32) -> windows_core::Result; fn QueryInsertEmbedded(&self, pguidservice: *const windows_core::GUID, pformatetc: *const super::super::System::Com::FORMATETC) -> windows_core::Result; - fn InsertTextAtSelection(&self, dwflags: u32, pchtext: &windows_core::PCWSTR, cch: u32, ppastart: *mut Option, ppaend: *mut Option) -> windows_core::Result<()>; - fn InsertEmbeddedAtSelection(&self, dwflags: u32, pdataobject: Option<&super::super::System::Com::IDataObject>, ppastart: *mut Option, ppaend: *mut Option) -> windows_core::Result<()>; + fn InsertTextAtSelection(&self, dwflags: u32, pchtext: &windows_core::PCWSTR, cch: u32, ppastart: windows_core::OutRef<'_, IAnchor>, ppaend: windows_core::OutRef<'_, IAnchor>) -> windows_core::Result<()>; + fn InsertEmbeddedAtSelection(&self, dwflags: u32, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>, ppastart: windows_core::OutRef<'_, IAnchor>, ppaend: windows_core::OutRef<'_, IAnchor>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITextStoreAnchor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseSink(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void, dwmask: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::AdviseSink(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&dwmask)).into() + ITextStoreAnchor_Impl::AdviseSink(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&dwmask)).into() } unsafe extern "system" fn UnadviseSink(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::UnadviseSink(this, windows_core::from_raw_borrowed(&punk)).into() + ITextStoreAnchor_Impl::UnadviseSink(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn RequestLock(this: *mut core::ffi::c_void, dwlockflags: u32, phrsession: *mut windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3471,7 +3471,7 @@ impl ITextStoreAnchor_Vtbl { } unsafe extern "system" fn QueryInsert(this: *mut core::ffi::c_void, pateststart: *mut core::ffi::c_void, patestend: *mut core::ffi::c_void, cch: u32, pparesultstart: *mut *mut core::ffi::c_void, pparesultend: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::QueryInsert(this, windows_core::from_raw_borrowed(&pateststart), windows_core::from_raw_borrowed(&patestend), core::mem::transmute_copy(&cch), core::mem::transmute_copy(&pparesultstart), core::mem::transmute_copy(&pparesultend)).into() + ITextStoreAnchor_Impl::QueryInsert(this, core::mem::transmute_copy(&pateststart), core::mem::transmute_copy(&patestend), core::mem::transmute_copy(&cch), core::mem::transmute_copy(&pparesultstart), core::mem::transmute_copy(&pparesultend)).into() } unsafe extern "system" fn GetSelection(this: *mut core::ffi::c_void, ulindex: u32, ulcount: u32, pselection: *mut TS_SELECTION_ANCHOR, pcfetched: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3483,15 +3483,15 @@ impl ITextStoreAnchor_Vtbl { } unsafe extern "system" fn GetText(this: *mut core::ffi::c_void, dwflags: u32, pastart: *mut core::ffi::c_void, paend: *mut core::ffi::c_void, pchtext: windows_core::PWSTR, cchreq: u32, pcch: *mut u32, fupdateanchor: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::GetText(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pastart), windows_core::from_raw_borrowed(&paend), core::mem::transmute_copy(&pchtext), core::mem::transmute_copy(&cchreq), core::mem::transmute_copy(&pcch), core::mem::transmute_copy(&fupdateanchor)).into() + ITextStoreAnchor_Impl::GetText(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pastart), core::mem::transmute_copy(&paend), core::mem::transmute_copy(&pchtext), core::mem::transmute_copy(&cchreq), core::mem::transmute_copy(&pcch), core::mem::transmute_copy(&fupdateanchor)).into() } unsafe extern "system" fn SetText(this: *mut core::ffi::c_void, dwflags: u32, pastart: *mut core::ffi::c_void, paend: *mut core::ffi::c_void, pchtext: windows_core::PCWSTR, cch: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::SetText(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pastart), windows_core::from_raw_borrowed(&paend), core::mem::transmute(&pchtext), core::mem::transmute_copy(&cch)).into() + ITextStoreAnchor_Impl::SetText(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pastart), core::mem::transmute_copy(&paend), core::mem::transmute(&pchtext), core::mem::transmute_copy(&cch)).into() } unsafe extern "system" fn GetFormattedText(this: *mut core::ffi::c_void, pastart: *mut core::ffi::c_void, paend: *mut core::ffi::c_void, ppdataobject: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextStoreAnchor_Impl::GetFormattedText(this, windows_core::from_raw_borrowed(&pastart), windows_core::from_raw_borrowed(&paend)) { + match ITextStoreAnchor_Impl::GetFormattedText(this, core::mem::transmute_copy(&pastart), core::mem::transmute_copy(&paend)) { Ok(ok__) => { ppdataobject.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3501,7 +3501,7 @@ impl ITextStoreAnchor_Vtbl { } unsafe extern "system" fn GetEmbedded(this: *mut core::ffi::c_void, dwflags: u32, papos: *mut core::ffi::c_void, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunk: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITextStoreAnchor_Impl::GetEmbedded(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&papos), core::mem::transmute_copy(&rguidservice), core::mem::transmute_copy(&riid)) { + match ITextStoreAnchor_Impl::GetEmbedded(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&papos), core::mem::transmute_copy(&rguidservice), core::mem::transmute_copy(&riid)) { Ok(ok__) => { ppunk.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3511,7 +3511,7 @@ impl ITextStoreAnchor_Vtbl { } unsafe extern "system" fn InsertEmbedded(this: *mut core::ffi::c_void, dwflags: u32, pastart: *mut core::ffi::c_void, paend: *mut core::ffi::c_void, pdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::InsertEmbedded(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pastart), windows_core::from_raw_borrowed(&paend), windows_core::from_raw_borrowed(&pdataobject)).into() + ITextStoreAnchor_Impl::InsertEmbedded(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pastart), core::mem::transmute_copy(&paend), core::mem::transmute_copy(&pdataobject)).into() } unsafe extern "system" fn RequestSupportedAttrs(this: *mut core::ffi::c_void, dwflags: u32, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3519,15 +3519,15 @@ impl ITextStoreAnchor_Vtbl { } unsafe extern "system" fn RequestAttrsAtPosition(this: *mut core::ffi::c_void, papos: *mut core::ffi::c_void, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::RequestAttrsAtPosition(this, windows_core::from_raw_borrowed(&papos), core::mem::transmute_copy(&cfilterattrs), core::mem::transmute_copy(&pafilterattrs), core::mem::transmute_copy(&dwflags)).into() + ITextStoreAnchor_Impl::RequestAttrsAtPosition(this, core::mem::transmute_copy(&papos), core::mem::transmute_copy(&cfilterattrs), core::mem::transmute_copy(&pafilterattrs), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn RequestAttrsTransitioningAtPosition(this: *mut core::ffi::c_void, papos: *mut core::ffi::c_void, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::RequestAttrsTransitioningAtPosition(this, windows_core::from_raw_borrowed(&papos), core::mem::transmute_copy(&cfilterattrs), core::mem::transmute_copy(&pafilterattrs), core::mem::transmute_copy(&dwflags)).into() + ITextStoreAnchor_Impl::RequestAttrsTransitioningAtPosition(this, core::mem::transmute_copy(&papos), core::mem::transmute_copy(&cfilterattrs), core::mem::transmute_copy(&pafilterattrs), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn FindNextAttrTransition(this: *mut core::ffi::c_void, pastart: *mut core::ffi::c_void, pahalt: *mut core::ffi::c_void, cfilterattrs: u32, pafilterattrs: *const windows_core::GUID, dwflags: u32, pffound: *mut super::super::Foundation::BOOL, plfoundoffset: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::FindNextAttrTransition(this, windows_core::from_raw_borrowed(&pastart), windows_core::from_raw_borrowed(&pahalt), core::mem::transmute_copy(&cfilterattrs), core::mem::transmute_copy(&pafilterattrs), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pffound), core::mem::transmute_copy(&plfoundoffset)).into() + ITextStoreAnchor_Impl::FindNextAttrTransition(this, core::mem::transmute_copy(&pastart), core::mem::transmute_copy(&pahalt), core::mem::transmute_copy(&cfilterattrs), core::mem::transmute_copy(&pafilterattrs), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pffound), core::mem::transmute_copy(&plfoundoffset)).into() } unsafe extern "system" fn RetrieveRequestedAttrs(this: *mut core::ffi::c_void, ulcount: u32, paattrvals: *mut TS_ATTRVAL, pcfetched: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3575,7 +3575,7 @@ impl ITextStoreAnchor_Vtbl { } unsafe extern "system" fn GetTextExt(this: *mut core::ffi::c_void, vcview: u32, pastart: *mut core::ffi::c_void, paend: *mut core::ffi::c_void, prc: *mut super::super::Foundation::RECT, pfclipped: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::GetTextExt(this, core::mem::transmute_copy(&vcview), windows_core::from_raw_borrowed(&pastart), windows_core::from_raw_borrowed(&paend), core::mem::transmute_copy(&prc), core::mem::transmute_copy(&pfclipped)).into() + ITextStoreAnchor_Impl::GetTextExt(this, core::mem::transmute_copy(&vcview), core::mem::transmute_copy(&pastart), core::mem::transmute_copy(&paend), core::mem::transmute_copy(&prc), core::mem::transmute_copy(&pfclipped)).into() } unsafe extern "system" fn GetScreenExt(this: *mut core::ffi::c_void, vcview: u32, prc: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3613,7 +3613,7 @@ impl ITextStoreAnchor_Vtbl { } unsafe extern "system" fn InsertEmbeddedAtSelection(this: *mut core::ffi::c_void, dwflags: u32, pdataobject: *mut core::ffi::c_void, ppastart: *mut *mut core::ffi::c_void, ppaend: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchor_Impl::InsertEmbeddedAtSelection(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pdataobject), core::mem::transmute_copy(&ppastart), core::mem::transmute_copy(&ppaend)).into() + ITextStoreAnchor_Impl::InsertEmbeddedAtSelection(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pdataobject), core::mem::transmute_copy(&ppastart), core::mem::transmute_copy(&ppaend)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -3669,13 +3669,13 @@ pub struct ITextStoreAnchorEx_Vtbl { pub ScrollToRect: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void, super::super::Foundation::RECT, u32) -> windows_core::HRESULT, } pub trait ITextStoreAnchorEx_Impl: windows_core::IUnknownImpl { - fn ScrollToRect(&self, pstart: Option<&IAnchor>, pend: Option<&IAnchor>, rc: &super::super::Foundation::RECT, dwposition: u32) -> windows_core::Result<()>; + fn ScrollToRect(&self, pstart: windows_core::Ref<'_, IAnchor>, pend: windows_core::Ref<'_, IAnchor>, rc: &super::super::Foundation::RECT, dwposition: u32) -> windows_core::Result<()>; } impl ITextStoreAnchorEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ScrollToRect(this: *mut core::ffi::c_void, pstart: *mut core::ffi::c_void, pend: *mut core::ffi::c_void, rc: super::super::Foundation::RECT, dwposition: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchorEx_Impl::ScrollToRect(this, windows_core::from_raw_borrowed(&pstart), windows_core::from_raw_borrowed(&pend), core::mem::transmute(&rc), core::mem::transmute_copy(&dwposition)).into() + ITextStoreAnchorEx_Impl::ScrollToRect(this, core::mem::transmute_copy(&pstart), core::mem::transmute_copy(&pend), core::mem::transmute(&rc), core::mem::transmute_copy(&dwposition)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), ScrollToRect: ScrollToRect:: } } @@ -3733,11 +3733,11 @@ pub struct ITextStoreAnchorSink_Vtbl { pub OnEndEditTransaction: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITextStoreAnchorSink_Impl: windows_core::IUnknownImpl { - fn OnTextChange(&self, dwflags: TEXT_STORE_CHANGE_FLAGS, pastart: Option<&IAnchor>, paend: Option<&IAnchor>) -> windows_core::Result<()>; + fn OnTextChange(&self, dwflags: TEXT_STORE_CHANGE_FLAGS, pastart: windows_core::Ref<'_, IAnchor>, paend: windows_core::Ref<'_, IAnchor>) -> windows_core::Result<()>; fn OnSelectionChange(&self) -> windows_core::Result<()>; fn OnLayoutChange(&self, lcode: TsLayoutCode, vcview: u32) -> windows_core::Result<()>; fn OnStatusChange(&self, dwflags: u32) -> windows_core::Result<()>; - fn OnAttrsChange(&self, pastart: Option<&IAnchor>, paend: Option<&IAnchor>, cattrs: u32, paattrs: *const windows_core::GUID) -> windows_core::Result<()>; + fn OnAttrsChange(&self, pastart: windows_core::Ref<'_, IAnchor>, paend: windows_core::Ref<'_, IAnchor>, cattrs: u32, paattrs: *const windows_core::GUID) -> windows_core::Result<()>; fn OnLockGranted(&self, dwlockflags: TEXT_STORE_LOCK_FLAGS) -> windows_core::Result<()>; fn OnStartEditTransaction(&self) -> windows_core::Result<()>; fn OnEndEditTransaction(&self) -> windows_core::Result<()>; @@ -3746,7 +3746,7 @@ impl ITextStoreAnchorSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnTextChange(this: *mut core::ffi::c_void, dwflags: TEXT_STORE_CHANGE_FLAGS, pastart: *mut core::ffi::c_void, paend: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchorSink_Impl::OnTextChange(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pastart), windows_core::from_raw_borrowed(&paend)).into() + ITextStoreAnchorSink_Impl::OnTextChange(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pastart), core::mem::transmute_copy(&paend)).into() } unsafe extern "system" fn OnSelectionChange(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3762,7 +3762,7 @@ impl ITextStoreAnchorSink_Vtbl { } unsafe extern "system" fn OnAttrsChange(this: *mut core::ffi::c_void, pastart: *mut core::ffi::c_void, paend: *mut core::ffi::c_void, cattrs: u32, paattrs: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITextStoreAnchorSink_Impl::OnAttrsChange(this, windows_core::from_raw_borrowed(&pastart), windows_core::from_raw_borrowed(&paend), core::mem::transmute_copy(&cattrs), core::mem::transmute_copy(&paattrs)).into() + ITextStoreAnchorSink_Impl::OnAttrsChange(this, core::mem::transmute_copy(&pastart), core::mem::transmute_copy(&paend), core::mem::transmute_copy(&cattrs), core::mem::transmute_copy(&paattrs)).into() } unsafe extern "system" fn OnLockGranted(this: *mut core::ffi::c_void, dwlockflags: TEXT_STORE_LOCK_FLAGS) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4472,13 +4472,13 @@ pub struct ITfCleanupContextSink_Vtbl { pub OnCleanupContext: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfCleanupContextSink_Impl: windows_core::IUnknownImpl { - fn OnCleanupContext(&self, ecwrite: u32, pic: Option<&ITfContext>) -> windows_core::Result<()>; + fn OnCleanupContext(&self, ecwrite: u32, pic: windows_core::Ref<'_, ITfContext>) -> windows_core::Result<()>; } impl ITfCleanupContextSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnCleanupContext(this: *mut core::ffi::c_void, ecwrite: u32, pic: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfCleanupContextSink_Impl::OnCleanupContext(this, core::mem::transmute_copy(&ecwrite), windows_core::from_raw_borrowed(&pic)).into() + ITfCleanupContextSink_Impl::OnCleanupContext(this, core::mem::transmute_copy(&ecwrite), core::mem::transmute_copy(&pic)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnCleanupContext: OnCleanupContext:: } } @@ -4710,8 +4710,8 @@ pub struct ITfComposition_Vtbl { } pub trait ITfComposition_Impl: windows_core::IUnknownImpl { fn GetRange(&self) -> windows_core::Result; - fn ShiftStart(&self, ecwrite: u32, pnewstart: Option<&ITfRange>) -> windows_core::Result<()>; - fn ShiftEnd(&self, ecwrite: u32, pnewend: Option<&ITfRange>) -> windows_core::Result<()>; + fn ShiftStart(&self, ecwrite: u32, pnewstart: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; + fn ShiftEnd(&self, ecwrite: u32, pnewend: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; fn EndComposition(&self, ecwrite: u32) -> windows_core::Result<()>; } impl ITfComposition_Vtbl { @@ -4728,11 +4728,11 @@ impl ITfComposition_Vtbl { } unsafe extern "system" fn ShiftStart(this: *mut core::ffi::c_void, ecwrite: u32, pnewstart: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfComposition_Impl::ShiftStart(this, core::mem::transmute_copy(&ecwrite), windows_core::from_raw_borrowed(&pnewstart)).into() + ITfComposition_Impl::ShiftStart(this, core::mem::transmute_copy(&ecwrite), core::mem::transmute_copy(&pnewstart)).into() } unsafe extern "system" fn ShiftEnd(this: *mut core::ffi::c_void, ecwrite: u32, pnewend: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfComposition_Impl::ShiftEnd(this, core::mem::transmute_copy(&ecwrite), windows_core::from_raw_borrowed(&pnewend)).into() + ITfComposition_Impl::ShiftEnd(this, core::mem::transmute_copy(&ecwrite), core::mem::transmute_copy(&pnewend)).into() } unsafe extern "system" fn EndComposition(this: *mut core::ffi::c_void, ecwrite: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4767,13 +4767,13 @@ pub struct ITfCompositionSink_Vtbl { pub OnCompositionTerminated: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfCompositionSink_Impl: windows_core::IUnknownImpl { - fn OnCompositionTerminated(&self, ecwrite: u32, pcomposition: Option<&ITfComposition>) -> windows_core::Result<()>; + fn OnCompositionTerminated(&self, ecwrite: u32, pcomposition: windows_core::Ref<'_, ITfComposition>) -> windows_core::Result<()>; } impl ITfCompositionSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnCompositionTerminated(this: *mut core::ffi::c_void, ecwrite: u32, pcomposition: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfCompositionSink_Impl::OnCompositionTerminated(this, core::mem::transmute_copy(&ecwrite), windows_core::from_raw_borrowed(&pcomposition)).into() + ITfCompositionSink_Impl::OnCompositionTerminated(this, core::mem::transmute_copy(&ecwrite), core::mem::transmute_copy(&pcomposition)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnCompositionTerminated: OnCompositionTerminated:: } } @@ -4966,7 +4966,7 @@ pub struct ITfContext_Vtbl { pub CreateRangeBackup: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfContext_Impl: windows_core::IUnknownImpl { - fn RequestEditSession(&self, tid: u32, pes: Option<&ITfEditSession>, dwflags: TF_CONTEXT_EDIT_CONTEXT_FLAGS) -> windows_core::Result; + fn RequestEditSession(&self, tid: u32, pes: windows_core::Ref<'_, ITfEditSession>, dwflags: TF_CONTEXT_EDIT_CONTEXT_FLAGS) -> windows_core::Result; fn InWriteSession(&self, tid: u32) -> windows_core::Result; fn GetSelection(&self, ec: u32, ulindex: u32, ulcount: u32, pselection: *mut TF_SELECTION, pcfetched: *mut u32) -> windows_core::Result<()>; fn SetSelection(&self, ec: u32, ulcount: u32, pselection: *const TF_SELECTION) -> windows_core::Result<()>; @@ -4980,13 +4980,13 @@ pub trait ITfContext_Impl: windows_core::IUnknownImpl { fn TrackProperties(&self, prgprop: *const *const windows_core::GUID, cprop: u32, prgappprop: *const *const windows_core::GUID, cappprop: u32) -> windows_core::Result; fn EnumProperties(&self) -> windows_core::Result; fn GetDocumentMgr(&self) -> windows_core::Result; - fn CreateRangeBackup(&self, ec: u32, prange: Option<&ITfRange>) -> windows_core::Result; + fn CreateRangeBackup(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; } impl ITfContext_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn RequestEditSession(this: *mut core::ffi::c_void, tid: u32, pes: *mut core::ffi::c_void, dwflags: TF_CONTEXT_EDIT_CONTEXT_FLAGS, phrsession: *mut windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfContext_Impl::RequestEditSession(this, core::mem::transmute_copy(&tid), windows_core::from_raw_borrowed(&pes), core::mem::transmute_copy(&dwflags)) { + match ITfContext_Impl::RequestEditSession(this, core::mem::transmute_copy(&tid), core::mem::transmute_copy(&pes), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { phrsession.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5114,7 +5114,7 @@ impl ITfContext_Vtbl { } unsafe extern "system" fn CreateRangeBackup(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void, ppbackup: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfContext_Impl::CreateRangeBackup(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange)) { + match ITfContext_Impl::CreateRangeBackup(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange)) { Ok(ok__) => { ppbackup.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5186,16 +5186,16 @@ pub struct ITfContextComposition_Vtbl { pub TakeOwnership: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfContextComposition_Impl: windows_core::IUnknownImpl { - fn StartComposition(&self, ecwrite: u32, pcompositionrange: Option<&ITfRange>, psink: Option<&ITfCompositionSink>) -> windows_core::Result; + fn StartComposition(&self, ecwrite: u32, pcompositionrange: windows_core::Ref<'_, ITfRange>, psink: windows_core::Ref<'_, ITfCompositionSink>) -> windows_core::Result; fn EnumCompositions(&self) -> windows_core::Result; - fn FindComposition(&self, ecread: u32, ptestrange: Option<&ITfRange>) -> windows_core::Result; - fn TakeOwnership(&self, ecwrite: u32, pcomposition: Option<&ITfCompositionView>, psink: Option<&ITfCompositionSink>) -> windows_core::Result; + fn FindComposition(&self, ecread: u32, ptestrange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; + fn TakeOwnership(&self, ecwrite: u32, pcomposition: windows_core::Ref<'_, ITfCompositionView>, psink: windows_core::Ref<'_, ITfCompositionSink>) -> windows_core::Result; } impl ITfContextComposition_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn StartComposition(this: *mut core::ffi::c_void, ecwrite: u32, pcompositionrange: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, ppcomposition: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfContextComposition_Impl::StartComposition(this, core::mem::transmute_copy(&ecwrite), windows_core::from_raw_borrowed(&pcompositionrange), windows_core::from_raw_borrowed(&psink)) { + match ITfContextComposition_Impl::StartComposition(this, core::mem::transmute_copy(&ecwrite), core::mem::transmute_copy(&pcompositionrange), core::mem::transmute_copy(&psink)) { Ok(ok__) => { ppcomposition.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5215,7 +5215,7 @@ impl ITfContextComposition_Vtbl { } unsafe extern "system" fn FindComposition(this: *mut core::ffi::c_void, ecread: u32, ptestrange: *mut core::ffi::c_void, ppenum: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfContextComposition_Impl::FindComposition(this, core::mem::transmute_copy(&ecread), windows_core::from_raw_borrowed(&ptestrange)) { + match ITfContextComposition_Impl::FindComposition(this, core::mem::transmute_copy(&ecread), core::mem::transmute_copy(&ptestrange)) { Ok(ok__) => { ppenum.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5225,7 +5225,7 @@ impl ITfContextComposition_Vtbl { } unsafe extern "system" fn TakeOwnership(this: *mut core::ffi::c_void, ecwrite: u32, pcomposition: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, ppcomposition: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfContextComposition_Impl::TakeOwnership(this, core::mem::transmute_copy(&ecwrite), windows_core::from_raw_borrowed(&pcomposition), windows_core::from_raw_borrowed(&psink)) { + match ITfContextComposition_Impl::TakeOwnership(this, core::mem::transmute_copy(&ecwrite), core::mem::transmute_copy(&pcomposition), core::mem::transmute_copy(&psink)) { Ok(ok__) => { ppcomposition.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5480,13 +5480,13 @@ pub struct ITfContextOwnerCompositionServices_Vtbl { pub TerminateComposition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfContextOwnerCompositionServices_Impl: ITfContextComposition_Impl { - fn TerminateComposition(&self, pcomposition: Option<&ITfCompositionView>) -> windows_core::Result<()>; + fn TerminateComposition(&self, pcomposition: windows_core::Ref<'_, ITfCompositionView>) -> windows_core::Result<()>; } impl ITfContextOwnerCompositionServices_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn TerminateComposition(this: *mut core::ffi::c_void, pcomposition: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfContextOwnerCompositionServices_Impl::TerminateComposition(this, windows_core::from_raw_borrowed(&pcomposition)).into() + ITfContextOwnerCompositionServices_Impl::TerminateComposition(this, core::mem::transmute_copy(&pcomposition)).into() } Self { base__: ITfContextComposition_Vtbl::new::(), TerminateComposition: TerminateComposition:: } } @@ -5527,15 +5527,15 @@ pub struct ITfContextOwnerCompositionSink_Vtbl { pub OnEndComposition: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfContextOwnerCompositionSink_Impl: windows_core::IUnknownImpl { - fn OnStartComposition(&self, pcomposition: Option<&ITfCompositionView>) -> windows_core::Result; - fn OnUpdateComposition(&self, pcomposition: Option<&ITfCompositionView>, prangenew: Option<&ITfRange>) -> windows_core::Result<()>; - fn OnEndComposition(&self, pcomposition: Option<&ITfCompositionView>) -> windows_core::Result<()>; + fn OnStartComposition(&self, pcomposition: windows_core::Ref<'_, ITfCompositionView>) -> windows_core::Result; + fn OnUpdateComposition(&self, pcomposition: windows_core::Ref<'_, ITfCompositionView>, prangenew: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; + fn OnEndComposition(&self, pcomposition: windows_core::Ref<'_, ITfCompositionView>) -> windows_core::Result<()>; } impl ITfContextOwnerCompositionSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnStartComposition(this: *mut core::ffi::c_void, pcomposition: *mut core::ffi::c_void, pfok: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfContextOwnerCompositionSink_Impl::OnStartComposition(this, windows_core::from_raw_borrowed(&pcomposition)) { + match ITfContextOwnerCompositionSink_Impl::OnStartComposition(this, core::mem::transmute_copy(&pcomposition)) { Ok(ok__) => { pfok.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5545,11 +5545,11 @@ impl ITfContextOwnerCompositionSink_Vtbl { } unsafe extern "system" fn OnUpdateComposition(this: *mut core::ffi::c_void, pcomposition: *mut core::ffi::c_void, prangenew: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfContextOwnerCompositionSink_Impl::OnUpdateComposition(this, windows_core::from_raw_borrowed(&pcomposition), windows_core::from_raw_borrowed(&prangenew)).into() + ITfContextOwnerCompositionSink_Impl::OnUpdateComposition(this, core::mem::transmute_copy(&pcomposition), core::mem::transmute_copy(&prangenew)).into() } unsafe extern "system" fn OnEndComposition(this: *mut core::ffi::c_void, pcomposition: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfContextOwnerCompositionSink_Impl::OnEndComposition(this, windows_core::from_raw_borrowed(&pcomposition)).into() + ITfContextOwnerCompositionSink_Impl::OnEndComposition(this, core::mem::transmute_copy(&pcomposition)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5626,9 +5626,9 @@ pub trait ITfContextOwnerServices_Impl: windows_core::IUnknownImpl { fn OnLayoutChange(&self) -> windows_core::Result<()>; fn OnStatusChange(&self, dwflags: u32) -> windows_core::Result<()>; fn OnAttributeChange(&self, rguidattribute: *const windows_core::GUID) -> windows_core::Result<()>; - fn Serialize(&self, pprop: Option<&ITfProperty>, prange: Option<&ITfRange>, phdr: *mut TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn Unserialize(&self, pprop: Option<&ITfProperty>, phdr: *const TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: Option<&super::super::System::Com::IStream>, ploader: Option<&ITfPersistentPropertyLoaderACP>) -> windows_core::Result<()>; - fn ForceLoadProperty(&self, pprop: Option<&ITfProperty>) -> windows_core::Result<()>; + fn Serialize(&self, pprop: windows_core::Ref<'_, ITfProperty>, prange: windows_core::Ref<'_, ITfRange>, phdr: *mut TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Unserialize(&self, pprop: windows_core::Ref<'_, ITfProperty>, phdr: *const TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, ploader: windows_core::Ref<'_, ITfPersistentPropertyLoaderACP>) -> windows_core::Result<()>; + fn ForceLoadProperty(&self, pprop: windows_core::Ref<'_, ITfProperty>) -> windows_core::Result<()>; fn CreateRange(&self, acpstart: i32, acpend: i32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -5648,15 +5648,15 @@ impl ITfContextOwnerServices_Vtbl { } unsafe extern "system" fn Serialize(this: *mut core::ffi::c_void, pprop: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, phdr: *mut TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfContextOwnerServices_Impl::Serialize(this, windows_core::from_raw_borrowed(&pprop), windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&phdr), windows_core::from_raw_borrowed(&pstream)).into() + ITfContextOwnerServices_Impl::Serialize(this, core::mem::transmute_copy(&pprop), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&phdr), core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn Unserialize(this: *mut core::ffi::c_void, pprop: *mut core::ffi::c_void, phdr: *const TF_PERSISTENT_PROPERTY_HEADER_ACP, pstream: *mut core::ffi::c_void, ploader: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfContextOwnerServices_Impl::Unserialize(this, windows_core::from_raw_borrowed(&pprop), core::mem::transmute_copy(&phdr), windows_core::from_raw_borrowed(&pstream), windows_core::from_raw_borrowed(&ploader)).into() + ITfContextOwnerServices_Impl::Unserialize(this, core::mem::transmute_copy(&pprop), core::mem::transmute_copy(&phdr), core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&ploader)).into() } unsafe extern "system" fn ForceLoadProperty(this: *mut core::ffi::c_void, pprop: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfContextOwnerServices_Impl::ForceLoadProperty(this, windows_core::from_raw_borrowed(&pprop)).into() + ITfContextOwnerServices_Impl::ForceLoadProperty(this, core::mem::transmute_copy(&pprop)).into() } unsafe extern "system" fn CreateRange(this: *mut core::ffi::c_void, acpstart: i32, acpend: i32, pprange: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5717,7 +5717,7 @@ pub struct ITfContextView_Vtbl { } pub trait ITfContextView_Impl: windows_core::IUnknownImpl { fn GetRangeFromPoint(&self, ec: u32, ppt: *const super::super::Foundation::POINT, dwflags: u32) -> windows_core::Result; - fn GetTextExt(&self, ec: u32, prange: Option<&ITfRange>, prc: *mut super::super::Foundation::RECT, pfclipped: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn GetTextExt(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>, prc: *mut super::super::Foundation::RECT, pfclipped: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetScreenExt(&self) -> windows_core::Result; fn GetWnd(&self) -> windows_core::Result; } @@ -5735,7 +5735,7 @@ impl ITfContextView_Vtbl { } unsafe extern "system" fn GetTextExt(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void, prc: *mut super::super::Foundation::RECT, pfclipped: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfContextView_Impl::GetTextExt(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&prc), core::mem::transmute_copy(&pfclipped)).into() + ITfContextView_Impl::GetTextExt(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&prc), core::mem::transmute_copy(&pfclipped)).into() } unsafe extern "system" fn GetScreenExt(this: *mut core::ffi::c_void, prc: *mut super::super::Foundation::RECT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5802,15 +5802,15 @@ pub struct ITfCreatePropertyStore_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITfCreatePropertyStore_Impl: windows_core::IUnknownImpl { - fn IsStoreSerializable(&self, guidprop: *const windows_core::GUID, prange: Option<&ITfRange>, ppropstore: Option<&ITfPropertyStore>) -> windows_core::Result; - fn CreatePropertyStore(&self, guidprop: *const windows_core::GUID, prange: Option<&ITfRange>, cb: u32, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn IsStoreSerializable(&self, guidprop: *const windows_core::GUID, prange: windows_core::Ref<'_, ITfRange>, ppropstore: windows_core::Ref<'_, ITfPropertyStore>) -> windows_core::Result; + fn CreatePropertyStore(&self, guidprop: *const windows_core::GUID, prange: windows_core::Ref<'_, ITfRange>, cb: u32, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl ITfCreatePropertyStore_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsStoreSerializable(this: *mut core::ffi::c_void, guidprop: *const windows_core::GUID, prange: *mut core::ffi::c_void, ppropstore: *mut core::ffi::c_void, pfserializable: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfCreatePropertyStore_Impl::IsStoreSerializable(this, core::mem::transmute_copy(&guidprop), windows_core::from_raw_borrowed(&prange), windows_core::from_raw_borrowed(&ppropstore)) { + match ITfCreatePropertyStore_Impl::IsStoreSerializable(this, core::mem::transmute_copy(&guidprop), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&ppropstore)) { Ok(ok__) => { pfserializable.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5820,7 +5820,7 @@ impl ITfCreatePropertyStore_Vtbl { } unsafe extern "system" fn CreatePropertyStore(this: *mut core::ffi::c_void, guidprop: *const windows_core::GUID, prange: *mut core::ffi::c_void, cb: u32, pstream: *mut core::ffi::c_void, ppstore: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfCreatePropertyStore_Impl::CreatePropertyStore(this, core::mem::transmute_copy(&guidprop), windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&cb), windows_core::from_raw_borrowed(&pstream)) { + match ITfCreatePropertyStore_Impl::CreatePropertyStore(this, core::mem::transmute_copy(&guidprop), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&cb), core::mem::transmute_copy(&pstream)) { Ok(ok__) => { ppstore.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5949,7 +5949,7 @@ pub struct ITfDisplayAttributeMgr_Vtbl { pub trait ITfDisplayAttributeMgr_Impl: windows_core::IUnknownImpl { fn OnUpdateInfo(&self) -> windows_core::Result<()>; fn EnumDisplayAttributeInfo(&self) -> windows_core::Result; - fn GetDisplayAttributeInfo(&self, guid: *const windows_core::GUID, ppinfo: *mut Option, pclsidowner: *mut windows_core::GUID) -> windows_core::Result<()>; + fn GetDisplayAttributeInfo(&self, guid: *const windows_core::GUID, ppinfo: windows_core::OutRef<'_, ITfDisplayAttributeInfo>, pclsidowner: *mut windows_core::GUID) -> windows_core::Result<()>; } impl ITfDisplayAttributeMgr_Vtbl { pub const fn new() -> Self { @@ -6108,8 +6108,8 @@ pub struct ITfDocumentMgr_Vtbl { pub EnumContexts: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfDocumentMgr_Impl: windows_core::IUnknownImpl { - fn CreateContext(&self, tidowner: u32, dwflags: u32, punk: Option<&windows_core::IUnknown>, ppic: *mut Option, pectextstore: *mut u32) -> windows_core::Result<()>; - fn Push(&self, pic: Option<&ITfContext>) -> windows_core::Result<()>; + fn CreateContext(&self, tidowner: u32, dwflags: u32, punk: windows_core::Ref<'_, windows_core::IUnknown>, ppic: windows_core::OutRef<'_, ITfContext>, pectextstore: *mut u32) -> windows_core::Result<()>; + fn Push(&self, pic: windows_core::Ref<'_, ITfContext>) -> windows_core::Result<()>; fn Pop(&self, dwflags: u32) -> windows_core::Result<()>; fn GetTop(&self) -> windows_core::Result; fn GetBase(&self) -> windows_core::Result; @@ -6119,11 +6119,11 @@ impl ITfDocumentMgr_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateContext(this: *mut core::ffi::c_void, tidowner: u32, dwflags: u32, punk: *mut core::ffi::c_void, ppic: *mut *mut core::ffi::c_void, pectextstore: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfDocumentMgr_Impl::CreateContext(this, core::mem::transmute_copy(&tidowner), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&ppic), core::mem::transmute_copy(&pectextstore)).into() + ITfDocumentMgr_Impl::CreateContext(this, core::mem::transmute_copy(&tidowner), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&punk), core::mem::transmute_copy(&ppic), core::mem::transmute_copy(&pectextstore)).into() } unsafe extern "system" fn Push(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfDocumentMgr_Impl::Push(this, windows_core::from_raw_borrowed(&pic)).into() + ITfDocumentMgr_Impl::Push(this, core::mem::transmute_copy(&pic)).into() } unsafe extern "system" fn Pop(this: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6280,18 +6280,18 @@ pub struct ITfEditTransactionSink_Vtbl { pub OnEndEditTransaction: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfEditTransactionSink_Impl: windows_core::IUnknownImpl { - fn OnStartEditTransaction(&self, pic: Option<&ITfContext>) -> windows_core::Result<()>; - fn OnEndEditTransaction(&self, pic: Option<&ITfContext>) -> windows_core::Result<()>; + fn OnStartEditTransaction(&self, pic: windows_core::Ref<'_, ITfContext>) -> windows_core::Result<()>; + fn OnEndEditTransaction(&self, pic: windows_core::Ref<'_, ITfContext>) -> windows_core::Result<()>; } impl ITfEditTransactionSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnStartEditTransaction(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfEditTransactionSink_Impl::OnStartEditTransaction(this, windows_core::from_raw_borrowed(&pic)).into() + ITfEditTransactionSink_Impl::OnStartEditTransaction(this, core::mem::transmute_copy(&pic)).into() } unsafe extern "system" fn OnEndEditTransaction(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfEditTransactionSink_Impl::OnEndEditTransaction(this, windows_core::from_raw_borrowed(&pic)).into() + ITfEditTransactionSink_Impl::OnEndEditTransaction(this, core::mem::transmute_copy(&pic)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6334,18 +6334,18 @@ pub struct ITfFnAdviseText_Vtbl { pub OnLatticeUpdate: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfFnAdviseText_Impl: ITfFunction_Impl { - fn OnTextUpdate(&self, prange: Option<&ITfRange>, pchtext: &windows_core::PCWSTR, cch: i32) -> windows_core::Result<()>; - fn OnLatticeUpdate(&self, prange: Option<&ITfRange>, plattice: Option<&ITfLMLattice>) -> windows_core::Result<()>; + fn OnTextUpdate(&self, prange: windows_core::Ref<'_, ITfRange>, pchtext: &windows_core::PCWSTR, cch: i32) -> windows_core::Result<()>; + fn OnLatticeUpdate(&self, prange: windows_core::Ref<'_, ITfRange>, plattice: windows_core::Ref<'_, ITfLMLattice>) -> windows_core::Result<()>; } impl ITfFnAdviseText_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnTextUpdate(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, pchtext: windows_core::PCWSTR, cch: i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnAdviseText_Impl::OnTextUpdate(this, windows_core::from_raw_borrowed(&prange), core::mem::transmute(&pchtext), core::mem::transmute_copy(&cch)).into() + ITfFnAdviseText_Impl::OnTextUpdate(this, core::mem::transmute_copy(&prange), core::mem::transmute(&pchtext), core::mem::transmute_copy(&cch)).into() } unsafe extern "system" fn OnLatticeUpdate(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, plattice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnAdviseText_Impl::OnLatticeUpdate(this, windows_core::from_raw_borrowed(&prange), windows_core::from_raw_borrowed(&plattice)).into() + ITfFnAdviseText_Impl::OnLatticeUpdate(this, core::mem::transmute_copy(&prange), core::mem::transmute_copy(&plattice)).into() } Self { base__: ITfFunction_Vtbl::new::(), @@ -6510,13 +6510,13 @@ pub struct ITfFnCustomSpeechCommand_Vtbl { pub SetSpeechCommandProvider: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfFnCustomSpeechCommand_Impl: ITfFunction_Impl { - fn SetSpeechCommandProvider(&self, pspcmdprovider: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn SetSpeechCommandProvider(&self, pspcmdprovider: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ITfFnCustomSpeechCommand_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn SetSpeechCommandProvider(this: *mut core::ffi::c_void, pspcmdprovider: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnCustomSpeechCommand_Impl::SetSpeechCommandProvider(this, windows_core::from_raw_borrowed(&pspcmdprovider)).into() + ITfFnCustomSpeechCommand_Impl::SetSpeechCommandProvider(this, core::mem::transmute_copy(&pspcmdprovider)).into() } Self { base__: ITfFunction_Vtbl::new::(), SetSpeechCommandProvider: SetSpeechCommandProvider:: } } @@ -6548,13 +6548,13 @@ pub struct ITfFnGetLinguisticAlternates_Vtbl { pub GetAlternates: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfFnGetLinguisticAlternates_Impl: ITfFunction_Impl { - fn GetAlternates(&self, prange: Option<&ITfRange>) -> windows_core::Result; + fn GetAlternates(&self, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; } impl ITfFnGetLinguisticAlternates_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetAlternates(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, ppcandidatelist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfFnGetLinguisticAlternates_Impl::GetAlternates(this, windows_core::from_raw_borrowed(&prange)) { + match ITfFnGetLinguisticAlternates_Impl::GetAlternates(this, core::mem::transmute_copy(&prange)) { Ok(ok__) => { ppcandidatelist.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6666,13 +6666,13 @@ pub struct ITfFnLMInternal_Vtbl { pub ProcessLattice: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfFnLMInternal_Impl: ITfFnLMProcessor_Impl { - fn ProcessLattice(&self, prange: Option<&ITfRange>) -> windows_core::Result<()>; + fn ProcessLattice(&self, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; } impl ITfFnLMInternal_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ProcessLattice(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnLMInternal_Impl::ProcessLattice(this, windows_core::from_raw_borrowed(&prange)).into() + ITfFnLMInternal_Impl::ProcessLattice(this, core::mem::transmute_copy(&prange)).into() } Self { base__: ITfFnLMProcessor_Vtbl::new::(), ProcessLattice: ProcessLattice:: } } @@ -6739,19 +6739,19 @@ pub struct ITfFnLMProcessor_Vtbl { pub InvokeFunc: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait ITfFnLMProcessor_Impl: ITfFunction_Impl { - fn QueryRange(&self, prange: Option<&ITfRange>, ppnewrange: *mut Option, pfaccepted: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn QueryRange(&self, prange: windows_core::Ref<'_, ITfRange>, ppnewrange: windows_core::OutRef<'_, ITfRange>, pfaccepted: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; fn QueryLangID(&self, langid: u16) -> windows_core::Result; - fn GetReconversion(&self, prange: Option<&ITfRange>) -> windows_core::Result; - fn Reconvert(&self, prange: Option<&ITfRange>) -> windows_core::Result<()>; + fn GetReconversion(&self, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; + fn Reconvert(&self, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; fn QueryKey(&self, fup: super::super::Foundation::BOOL, vkey: super::super::Foundation::WPARAM, lparamkeydata: super::super::Foundation::LPARAM) -> windows_core::Result; fn InvokeKey(&self, fup: super::super::Foundation::BOOL, vkey: super::super::Foundation::WPARAM, lparamkeydata: super::super::Foundation::LPARAM) -> windows_core::Result<()>; - fn InvokeFunc(&self, pic: Option<&ITfContext>, refguidfunc: *const windows_core::GUID) -> windows_core::Result<()>; + fn InvokeFunc(&self, pic: windows_core::Ref<'_, ITfContext>, refguidfunc: *const windows_core::GUID) -> windows_core::Result<()>; } impl ITfFnLMProcessor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryRange(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, ppnewrange: *mut *mut core::ffi::c_void, pfaccepted: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnLMProcessor_Impl::QueryRange(this, windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&ppnewrange), core::mem::transmute_copy(&pfaccepted)).into() + ITfFnLMProcessor_Impl::QueryRange(this, core::mem::transmute_copy(&prange), core::mem::transmute_copy(&ppnewrange), core::mem::transmute_copy(&pfaccepted)).into() } unsafe extern "system" fn QueryLangID(this: *mut core::ffi::c_void, langid: u16, pfaccepted: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6765,7 +6765,7 @@ impl ITfFnLMProcessor_Vtbl { } unsafe extern "system" fn GetReconversion(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, ppcandlist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfFnLMProcessor_Impl::GetReconversion(this, windows_core::from_raw_borrowed(&prange)) { + match ITfFnLMProcessor_Impl::GetReconversion(this, core::mem::transmute_copy(&prange)) { Ok(ok__) => { ppcandlist.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -6775,7 +6775,7 @@ impl ITfFnLMProcessor_Vtbl { } unsafe extern "system" fn Reconvert(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnLMProcessor_Impl::Reconvert(this, windows_core::from_raw_borrowed(&prange)).into() + ITfFnLMProcessor_Impl::Reconvert(this, core::mem::transmute_copy(&prange)).into() } unsafe extern "system" fn QueryKey(this: *mut core::ffi::c_void, fup: super::super::Foundation::BOOL, vkey: super::super::Foundation::WPARAM, lparamkeydata: super::super::Foundation::LPARAM, pfinterested: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -6793,7 +6793,7 @@ impl ITfFnLMProcessor_Vtbl { } unsafe extern "system" fn InvokeFunc(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, refguidfunc: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnLMProcessor_Impl::InvokeFunc(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&refguidfunc)).into() + ITfFnLMProcessor_Impl::InvokeFunc(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&refguidfunc)).into() } Self { base__: ITfFunction_Vtbl::new::(), @@ -6894,18 +6894,18 @@ pub struct ITfFnPlayBack_Vtbl { pub Play: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfFnPlayBack_Impl: ITfFunction_Impl { - fn QueryRange(&self, prange: Option<&ITfRange>, ppnewrange: *mut Option, pfplayable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn Play(&self, prange: Option<&ITfRange>) -> windows_core::Result<()>; + fn QueryRange(&self, prange: windows_core::Ref<'_, ITfRange>, ppnewrange: windows_core::OutRef<'_, ITfRange>, pfplayable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn Play(&self, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; } impl ITfFnPlayBack_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryRange(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, ppnewrange: *mut *mut core::ffi::c_void, pfplayable: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnPlayBack_Impl::QueryRange(this, windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&ppnewrange), core::mem::transmute_copy(&pfplayable)).into() + ITfFnPlayBack_Impl::QueryRange(this, core::mem::transmute_copy(&prange), core::mem::transmute_copy(&ppnewrange), core::mem::transmute_copy(&pfplayable)).into() } unsafe extern "system" fn Play(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnPlayBack_Impl::Play(this, windows_core::from_raw_borrowed(&prange)).into() + ITfFnPlayBack_Impl::Play(this, core::mem::transmute_copy(&prange)).into() } Self { base__: ITfFunction_Vtbl::new::(), QueryRange: QueryRange::, Play: Play:: } } @@ -7001,19 +7001,19 @@ pub struct ITfFnReconversion_Vtbl { pub Reconvert: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfFnReconversion_Impl: ITfFunction_Impl { - fn QueryRange(&self, prange: Option<&ITfRange>, ppnewrange: *mut Option, pfconvertable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn GetReconversion(&self, prange: Option<&ITfRange>) -> windows_core::Result; - fn Reconvert(&self, prange: Option<&ITfRange>) -> windows_core::Result<()>; + fn QueryRange(&self, prange: windows_core::Ref<'_, ITfRange>, ppnewrange: windows_core::OutRef<'_, ITfRange>, pfconvertable: *mut super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn GetReconversion(&self, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; + fn Reconvert(&self, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; } impl ITfFnReconversion_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn QueryRange(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, ppnewrange: *mut *mut core::ffi::c_void, pfconvertable: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnReconversion_Impl::QueryRange(this, windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&ppnewrange), core::mem::transmute_copy(&pfconvertable)).into() + ITfFnReconversion_Impl::QueryRange(this, core::mem::transmute_copy(&prange), core::mem::transmute_copy(&ppnewrange), core::mem::transmute_copy(&pfconvertable)).into() } unsafe extern "system" fn GetReconversion(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void, ppcandlist: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfFnReconversion_Impl::GetReconversion(this, windows_core::from_raw_borrowed(&prange)) { + match ITfFnReconversion_Impl::GetReconversion(this, core::mem::transmute_copy(&prange)) { Ok(ok__) => { ppcandlist.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -7023,7 +7023,7 @@ impl ITfFnReconversion_Vtbl { } unsafe extern "system" fn Reconvert(this: *mut core::ffi::c_void, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfFnReconversion_Impl::Reconvert(this, windows_core::from_raw_borrowed(&prange)).into() + ITfFnReconversion_Impl::Reconvert(this, core::mem::transmute_copy(&prange)).into() } Self { base__: ITfFunction_Vtbl::new::(), @@ -7895,7 +7895,7 @@ pub struct ITfInsertAtSelection_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait ITfInsertAtSelection_Impl: windows_core::IUnknownImpl { fn InsertTextAtSelection(&self, ec: u32, dwflags: INSERT_TEXT_AT_SELECTION_FLAGS, pchtext: &windows_core::PCWSTR, cch: i32) -> windows_core::Result; - fn InsertEmbeddedAtSelection(&self, ec: u32, dwflags: u32, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result; + fn InsertEmbeddedAtSelection(&self, ec: u32, dwflags: u32, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl ITfInsertAtSelection_Vtbl { @@ -7912,7 +7912,7 @@ impl ITfInsertAtSelection_Vtbl { } unsafe extern "system" fn InsertEmbeddedAtSelection(this: *mut core::ffi::c_void, ec: u32, dwflags: u32, pdataobject: *mut core::ffi::c_void, pprange: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfInsertAtSelection_Impl::InsertEmbeddedAtSelection(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pdataobject)) { + match ITfInsertAtSelection_Impl::InsertEmbeddedAtSelection(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pdataobject)) { Ok(ok__) => { pprange.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8078,11 +8078,11 @@ pub struct ITfKeyEventSink_Vtbl { } pub trait ITfKeyEventSink_Impl: windows_core::IUnknownImpl { fn OnSetFocus(&self, fforeground: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn OnTestKeyDown(&self, pic: Option<&ITfContext>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; - fn OnTestKeyUp(&self, pic: Option<&ITfContext>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; - fn OnKeyDown(&self, pic: Option<&ITfContext>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; - fn OnKeyUp(&self, pic: Option<&ITfContext>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; - fn OnPreservedKey(&self, pic: Option<&ITfContext>, rguid: *const windows_core::GUID) -> windows_core::Result; + fn OnTestKeyDown(&self, pic: windows_core::Ref<'_, ITfContext>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; + fn OnTestKeyUp(&self, pic: windows_core::Ref<'_, ITfContext>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; + fn OnKeyDown(&self, pic: windows_core::Ref<'_, ITfContext>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; + fn OnKeyUp(&self, pic: windows_core::Ref<'_, ITfContext>, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; + fn OnPreservedKey(&self, pic: windows_core::Ref<'_, ITfContext>, rguid: *const windows_core::GUID) -> windows_core::Result; } impl ITfKeyEventSink_Vtbl { pub const fn new() -> Self { @@ -8092,7 +8092,7 @@ impl ITfKeyEventSink_Vtbl { } unsafe extern "system" fn OnTestKeyDown(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, pfeaten: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfKeyEventSink_Impl::OnTestKeyDown(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)) { + match ITfKeyEventSink_Impl::OnTestKeyDown(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)) { Ok(ok__) => { pfeaten.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8102,7 +8102,7 @@ impl ITfKeyEventSink_Vtbl { } unsafe extern "system" fn OnTestKeyUp(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, pfeaten: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfKeyEventSink_Impl::OnTestKeyUp(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)) { + match ITfKeyEventSink_Impl::OnTestKeyUp(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)) { Ok(ok__) => { pfeaten.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8112,7 +8112,7 @@ impl ITfKeyEventSink_Vtbl { } unsafe extern "system" fn OnKeyDown(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, pfeaten: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfKeyEventSink_Impl::OnKeyDown(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)) { + match ITfKeyEventSink_Impl::OnKeyDown(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)) { Ok(ok__) => { pfeaten.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8122,7 +8122,7 @@ impl ITfKeyEventSink_Vtbl { } unsafe extern "system" fn OnKeyUp(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, pfeaten: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfKeyEventSink_Impl::OnKeyUp(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)) { + match ITfKeyEventSink_Impl::OnKeyUp(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&wparam), core::mem::transmute_copy(&lparam)) { Ok(ok__) => { pfeaten.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8132,7 +8132,7 @@ impl ITfKeyEventSink_Vtbl { } unsafe extern "system" fn OnPreservedKey(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, rguid: *const windows_core::GUID, pfeaten: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfKeyEventSink_Impl::OnPreservedKey(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&rguid)) { + match ITfKeyEventSink_Impl::OnPreservedKey(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&rguid)) { Ok(ok__) => { pfeaten.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8279,26 +8279,26 @@ pub struct ITfKeystrokeMgr_Vtbl { pub SimulatePreservedKey: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const windows_core::GUID, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait ITfKeystrokeMgr_Impl: windows_core::IUnknownImpl { - fn AdviseKeyEventSink(&self, tid: u32, psink: Option<&ITfKeyEventSink>, fforeground: super::super::Foundation::BOOL) -> windows_core::Result<()>; + fn AdviseKeyEventSink(&self, tid: u32, psink: windows_core::Ref<'_, ITfKeyEventSink>, fforeground: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn UnadviseKeyEventSink(&self, tid: u32) -> windows_core::Result<()>; fn GetForeground(&self) -> windows_core::Result; fn TestKeyDown(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; fn TestKeyUp(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; fn KeyDown(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; fn KeyUp(&self, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> windows_core::Result; - fn GetPreservedKey(&self, pic: Option<&ITfContext>, pprekey: *const TF_PRESERVEDKEY) -> windows_core::Result; + fn GetPreservedKey(&self, pic: windows_core::Ref<'_, ITfContext>, pprekey: *const TF_PRESERVEDKEY) -> windows_core::Result; fn IsPreservedKey(&self, rguid: *const windows_core::GUID, pprekey: *const TF_PRESERVEDKEY) -> windows_core::Result; fn PreserveKey(&self, tid: u32, rguid: *const windows_core::GUID, prekey: *const TF_PRESERVEDKEY, pchdesc: &windows_core::PCWSTR, cchdesc: u32) -> windows_core::Result<()>; fn UnpreserveKey(&self, rguid: *const windows_core::GUID, pprekey: *const TF_PRESERVEDKEY) -> windows_core::Result<()>; fn SetPreservedKeyDescription(&self, rguid: *const windows_core::GUID, pchdesc: &windows_core::PCWSTR, cchdesc: u32) -> windows_core::Result<()>; fn GetPreservedKeyDescription(&self, rguid: *const windows_core::GUID) -> windows_core::Result; - fn SimulatePreservedKey(&self, pic: Option<&ITfContext>, rguid: *const windows_core::GUID) -> windows_core::Result; + fn SimulatePreservedKey(&self, pic: windows_core::Ref<'_, ITfContext>, rguid: *const windows_core::GUID) -> windows_core::Result; } impl ITfKeystrokeMgr_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseKeyEventSink(this: *mut core::ffi::c_void, tid: u32, psink: *mut core::ffi::c_void, fforeground: super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfKeystrokeMgr_Impl::AdviseKeyEventSink(this, core::mem::transmute_copy(&tid), windows_core::from_raw_borrowed(&psink), core::mem::transmute_copy(&fforeground)).into() + ITfKeystrokeMgr_Impl::AdviseKeyEventSink(this, core::mem::transmute_copy(&tid), core::mem::transmute_copy(&psink), core::mem::transmute_copy(&fforeground)).into() } unsafe extern "system" fn UnadviseKeyEventSink(this: *mut core::ffi::c_void, tid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8356,7 +8356,7 @@ impl ITfKeystrokeMgr_Vtbl { } unsafe extern "system" fn GetPreservedKey(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, pprekey: *const TF_PRESERVEDKEY, pguid: *mut windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfKeystrokeMgr_Impl::GetPreservedKey(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&pprekey)) { + match ITfKeystrokeMgr_Impl::GetPreservedKey(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&pprekey)) { Ok(ok__) => { pguid.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8398,7 +8398,7 @@ impl ITfKeystrokeMgr_Vtbl { } unsafe extern "system" fn SimulatePreservedKey(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, rguid: *const windows_core::GUID, pfeaten: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfKeystrokeMgr_Impl::SimulatePreservedKey(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&rguid)) { + match ITfKeystrokeMgr_Impl::SimulatePreservedKey(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&rguid)) { Ok(ok__) => { pfeaten.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -8839,7 +8839,7 @@ pub struct ITfLangBarItemBitmapButton_Vtbl { #[cfg(feature = "Win32_Graphics_Gdi")] pub trait ITfLangBarItemBitmapButton_Impl: ITfLangBarItem_Impl { fn OnClick(&self, click: TfLBIClick, pt: &super::super::Foundation::POINT, prcarea: *const super::super::Foundation::RECT) -> windows_core::Result<()>; - fn InitMenu(&self, pmenu: Option<&ITfMenu>) -> windows_core::Result<()>; + fn InitMenu(&self, pmenu: windows_core::Ref<'_, ITfMenu>) -> windows_core::Result<()>; fn OnMenuSelect(&self, wid: u32) -> windows_core::Result<()>; fn GetPreferredSize(&self, pszdefault: *const super::super::Foundation::SIZE) -> windows_core::Result; fn DrawBitmap(&self, bmwidth: i32, bmheight: i32, dwflags: u32, phbmp: *mut super::super::Graphics::Gdi::HBITMAP, phbmpmask: *mut super::super::Graphics::Gdi::HBITMAP) -> windows_core::Result<()>; @@ -8854,7 +8854,7 @@ impl ITfLangBarItemBitmapButton_Vtbl { } unsafe extern "system" fn InitMenu(this: *mut core::ffi::c_void, pmenu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfLangBarItemBitmapButton_Impl::InitMenu(this, windows_core::from_raw_borrowed(&pmenu)).into() + ITfLangBarItemBitmapButton_Impl::InitMenu(this, core::mem::transmute_copy(&pmenu)).into() } unsafe extern "system" fn OnMenuSelect(this: *mut core::ffi::c_void, wid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -8946,7 +8946,7 @@ pub struct ITfLangBarItemButton_Vtbl { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub trait ITfLangBarItemButton_Impl: ITfLangBarItem_Impl { fn OnClick(&self, click: TfLBIClick, pt: &super::super::Foundation::POINT, prcarea: *const super::super::Foundation::RECT) -> windows_core::Result<()>; - fn InitMenu(&self, pmenu: Option<&ITfMenu>) -> windows_core::Result<()>; + fn InitMenu(&self, pmenu: windows_core::Ref<'_, ITfMenu>) -> windows_core::Result<()>; fn OnMenuSelect(&self, wid: u32) -> windows_core::Result<()>; fn GetIcon(&self) -> windows_core::Result; fn GetText(&self) -> windows_core::Result; @@ -8960,7 +8960,7 @@ impl ITfLangBarItemButton_Vtbl { } unsafe extern "system" fn InitMenu(this: *mut core::ffi::c_void, pmenu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfLangBarItemButton_Impl::InitMenu(this, windows_core::from_raw_borrowed(&pmenu)).into() + ITfLangBarItemButton_Impl::InitMenu(this, core::mem::transmute_copy(&pmenu)).into() } unsafe extern "system" fn OnMenuSelect(this: *mut core::ffi::c_void, wid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9075,14 +9075,14 @@ pub struct ITfLangBarItemMgr_Vtbl { pub trait ITfLangBarItemMgr_Impl: windows_core::IUnknownImpl { fn EnumItems(&self) -> windows_core::Result; fn GetItem(&self, rguid: *const windows_core::GUID) -> windows_core::Result; - fn AddItem(&self, punk: Option<&ITfLangBarItem>) -> windows_core::Result<()>; - fn RemoveItem(&self, punk: Option<&ITfLangBarItem>) -> windows_core::Result<()>; - fn AdviseItemSink(&self, punk: Option<&ITfLangBarItemSink>, pdwcookie: *mut u32, rguiditem: *const windows_core::GUID) -> windows_core::Result<()>; + fn AddItem(&self, punk: windows_core::Ref<'_, ITfLangBarItem>) -> windows_core::Result<()>; + fn RemoveItem(&self, punk: windows_core::Ref<'_, ITfLangBarItem>) -> windows_core::Result<()>; + fn AdviseItemSink(&self, punk: windows_core::Ref<'_, ITfLangBarItemSink>, pdwcookie: *mut u32, rguiditem: *const windows_core::GUID) -> windows_core::Result<()>; fn UnadviseItemSink(&self, dwcookie: u32) -> windows_core::Result<()>; fn GetItemFloatingRect(&self, dwthreadid: u32, rguid: *const windows_core::GUID) -> windows_core::Result; fn GetItemsStatus(&self, ulcount: u32, prgguid: *const windows_core::GUID) -> windows_core::Result; fn GetItemNum(&self) -> windows_core::Result; - fn GetItems(&self, ulcount: u32, ppitem: *mut Option, pinfo: *mut TF_LANGBARITEMINFO, pdwstatus: *mut u32, pcfetched: *mut u32) -> windows_core::Result<()>; + fn GetItems(&self, ulcount: u32, ppitem: windows_core::OutRef<'_, ITfLangBarItem>, pinfo: *mut TF_LANGBARITEMINFO, pdwstatus: *mut u32, pcfetched: *mut u32) -> windows_core::Result<()>; fn AdviseItemsSink(&self, ulcount: u32, ppunk: *const Option, pguiditem: *const windows_core::GUID) -> windows_core::Result; fn UnadviseItemsSink(&self, ulcount: u32, pdwcookie: *const u32) -> windows_core::Result<()>; } @@ -9110,15 +9110,15 @@ impl ITfLangBarItemMgr_Vtbl { } unsafe extern "system" fn AddItem(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfLangBarItemMgr_Impl::AddItem(this, windows_core::from_raw_borrowed(&punk)).into() + ITfLangBarItemMgr_Impl::AddItem(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn RemoveItem(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfLangBarItemMgr_Impl::RemoveItem(this, windows_core::from_raw_borrowed(&punk)).into() + ITfLangBarItemMgr_Impl::RemoveItem(this, core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn AdviseItemSink(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, pdwcookie: *mut u32, rguiditem: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfLangBarItemMgr_Impl::AdviseItemSink(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(&pdwcookie), core::mem::transmute_copy(&rguiditem)).into() + ITfLangBarItemMgr_Impl::AdviseItemSink(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(&pdwcookie), core::mem::transmute_copy(&rguiditem)).into() } unsafe extern "system" fn UnadviseItemSink(this: *mut core::ffi::c_void, dwcookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9274,13 +9274,13 @@ pub struct ITfLangBarMgr_Vtbl { pub GetShowFloatingStatus: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT, } pub trait ITfLangBarMgr_Impl: windows_core::IUnknownImpl { - fn AdviseEventSink(&self, psink: Option<&ITfLangBarEventSink>, hwnd: super::super::Foundation::HWND, dwflags: u32, pdwcookie: *const u32) -> windows_core::Result<()>; + fn AdviseEventSink(&self, psink: windows_core::Ref<'_, ITfLangBarEventSink>, hwnd: super::super::Foundation::HWND, dwflags: u32, pdwcookie: *const u32) -> windows_core::Result<()>; fn UnadviseEventSink(&self, dwcookie: u32) -> windows_core::Result<()>; fn GetThreadMarshalInterface(&self, dwthreadid: u32, dwtype: u32, riid: *const windows_core::GUID) -> windows_core::Result; - fn GetThreadLangBarItemMgr(&self, dwthreadid: u32, pplbi: *mut Option, pdwthreadid: *mut u32) -> windows_core::Result<()>; - fn GetInputProcessorProfiles(&self, dwthreadid: u32, ppaip: *mut Option, pdwthreadid: *mut u32) -> windows_core::Result<()>; + fn GetThreadLangBarItemMgr(&self, dwthreadid: u32, pplbi: windows_core::OutRef<'_, ITfLangBarItemMgr>, pdwthreadid: *mut u32) -> windows_core::Result<()>; + fn GetInputProcessorProfiles(&self, dwthreadid: u32, ppaip: windows_core::OutRef<'_, ITfInputProcessorProfiles>, pdwthreadid: *mut u32) -> windows_core::Result<()>; fn RestoreLastFocus(&self, pdwthreadid: *mut u32, fprev: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn SetModalInput(&self, psink: Option<&ITfLangBarEventSink>, dwthreadid: u32, dwflags: u32) -> windows_core::Result<()>; + fn SetModalInput(&self, psink: windows_core::Ref<'_, ITfLangBarEventSink>, dwthreadid: u32, dwflags: u32) -> windows_core::Result<()>; fn ShowFloating(&self, dwflags: u32) -> windows_core::Result<()>; fn GetShowFloatingStatus(&self) -> windows_core::Result; } @@ -9288,7 +9288,7 @@ impl ITfLangBarMgr_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseEventSink(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, dwflags: u32, pdwcookie: *const u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfLangBarMgr_Impl::AdviseEventSink(this, windows_core::from_raw_borrowed(&psink), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pdwcookie)).into() + ITfLangBarMgr_Impl::AdviseEventSink(this, core::mem::transmute_copy(&psink), core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pdwcookie)).into() } unsafe extern "system" fn UnadviseEventSink(this: *mut core::ffi::c_void, dwcookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9318,7 +9318,7 @@ impl ITfLangBarMgr_Vtbl { } unsafe extern "system" fn SetModalInput(this: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, dwthreadid: u32, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfLangBarMgr_Impl::SetModalInput(this, windows_core::from_raw_borrowed(&psink), core::mem::transmute_copy(&dwthreadid), core::mem::transmute_copy(&dwflags)).into() + ITfLangBarMgr_Impl::SetModalInput(this, core::mem::transmute_copy(&psink), core::mem::transmute_copy(&dwthreadid), core::mem::transmute_copy(&dwflags)).into() } unsafe extern "system" fn ShowFloating(this: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -9459,7 +9459,7 @@ pub struct ITfMenu_Vtbl { } #[cfg(feature = "Win32_Graphics_Gdi")] pub trait ITfMenu_Impl: windows_core::IUnknownImpl { - fn AddMenuItem(&self, uid: u32, dwflags: u32, hbmp: super::super::Graphics::Gdi::HBITMAP, hbmpmask: super::super::Graphics::Gdi::HBITMAP, pch: &windows_core::PCWSTR, cch: u32, ppmenu: *mut Option) -> windows_core::Result<()>; + fn AddMenuItem(&self, uid: u32, dwflags: u32, hbmp: super::super::Graphics::Gdi::HBITMAP, hbmpmask: super::super::Graphics::Gdi::HBITMAP, pch: &windows_core::PCWSTR, cch: u32, ppmenu: windows_core::OutRef<'_, ITfMenu>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] impl ITfMenu_Vtbl { @@ -9613,14 +9613,14 @@ pub struct ITfMouseTracker_Vtbl { pub UnadviseMouseSink: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait ITfMouseTracker_Impl: windows_core::IUnknownImpl { - fn AdviseMouseSink(&self, range: Option<&ITfRange>, psink: Option<&ITfMouseSink>) -> windows_core::Result; + fn AdviseMouseSink(&self, range: windows_core::Ref<'_, ITfRange>, psink: windows_core::Ref<'_, ITfMouseSink>) -> windows_core::Result; fn UnadviseMouseSink(&self, dwcookie: u32) -> windows_core::Result<()>; } impl ITfMouseTracker_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseMouseSink(this: *mut core::ffi::c_void, range: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfMouseTracker_Impl::AdviseMouseSink(this, windows_core::from_raw_borrowed(&range), windows_core::from_raw_borrowed(&psink)) { + match ITfMouseTracker_Impl::AdviseMouseSink(this, core::mem::transmute_copy(&range), core::mem::transmute_copy(&psink)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9665,14 +9665,14 @@ pub struct ITfMouseTrackerACP_Vtbl { pub UnadviseMouseSink: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait ITfMouseTrackerACP_Impl: windows_core::IUnknownImpl { - fn AdviseMouseSink(&self, range: Option<&ITfRangeACP>, psink: Option<&ITfMouseSink>) -> windows_core::Result; + fn AdviseMouseSink(&self, range: windows_core::Ref<'_, ITfRangeACP>, psink: windows_core::Ref<'_, ITfMouseSink>) -> windows_core::Result; fn UnadviseMouseSink(&self, dwcookie: u32) -> windows_core::Result<()>; } impl ITfMouseTrackerACP_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseMouseSink(this: *mut core::ffi::c_void, range: *mut core::ffi::c_void, psink: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfMouseTrackerACP_Impl::AdviseMouseSink(this, windows_core::from_raw_borrowed(&range), windows_core::from_raw_borrowed(&psink)) { + match ITfMouseTrackerACP_Impl::AdviseMouseSink(this, core::mem::transmute_copy(&range), core::mem::transmute_copy(&psink)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9814,29 +9814,29 @@ pub struct ITfProperty_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITfProperty_Impl: ITfReadOnlyProperty_Impl { - fn FindRange(&self, ec: u32, prange: Option<&ITfRange>, pprange: *mut Option, apos: TfAnchor) -> windows_core::Result<()>; - fn SetValueStore(&self, ec: u32, prange: Option<&ITfRange>, ppropstore: Option<&ITfPropertyStore>) -> windows_core::Result<()>; - fn SetValue(&self, ec: u32, prange: Option<&ITfRange>, pvarvalue: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()>; - fn Clear(&self, ec: u32, prange: Option<&ITfRange>) -> windows_core::Result<()>; + fn FindRange(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>, pprange: windows_core::OutRef<'_, ITfRange>, apos: TfAnchor) -> windows_core::Result<()>; + fn SetValueStore(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>, ppropstore: windows_core::Ref<'_, ITfPropertyStore>) -> windows_core::Result<()>; + fn SetValue(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>, pvarvalue: *const super::super::System::Variant::VARIANT) -> windows_core::Result<()>; + fn Clear(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITfProperty_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FindRange(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void, pprange: *mut *mut core::ffi::c_void, apos: TfAnchor) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfProperty_Impl::FindRange(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&pprange), core::mem::transmute_copy(&apos)).into() + ITfProperty_Impl::FindRange(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&pprange), core::mem::transmute_copy(&apos)).into() } unsafe extern "system" fn SetValueStore(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void, ppropstore: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfProperty_Impl::SetValueStore(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange), windows_core::from_raw_borrowed(&ppropstore)).into() + ITfProperty_Impl::SetValueStore(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&ppropstore)).into() } unsafe extern "system" fn SetValue(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void, pvarvalue: *const super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfProperty_Impl::SetValue(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&pvarvalue)).into() + ITfProperty_Impl::SetValue(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&pvarvalue)).into() } unsafe extern "system" fn Clear(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfProperty_Impl::Clear(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange)).into() + ITfProperty_Impl::Clear(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange)).into() } Self { base__: ITfReadOnlyProperty_Vtbl::new::(), @@ -9931,12 +9931,12 @@ pub trait ITfPropertyStore_Impl: windows_core::IUnknownImpl { fn GetType(&self) -> windows_core::Result; fn GetDataType(&self) -> windows_core::Result; fn GetData(&self) -> windows_core::Result; - fn OnTextUpdated(&self, dwflags: u32, prangenew: Option<&ITfRange>) -> windows_core::Result; - fn Shrink(&self, prangenew: Option<&ITfRange>) -> windows_core::Result; - fn Divide(&self, prangethis: Option<&ITfRange>, prangenew: Option<&ITfRange>) -> windows_core::Result; + fn OnTextUpdated(&self, dwflags: u32, prangenew: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; + fn Shrink(&self, prangenew: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; + fn Divide(&self, prangethis: windows_core::Ref<'_, ITfRange>, prangenew: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; fn Clone(&self) -> windows_core::Result; fn GetPropertyRangeCreator(&self) -> windows_core::Result; - fn Serialize(&self, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn Serialize(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl ITfPropertyStore_Vtbl { @@ -9973,7 +9973,7 @@ impl ITfPropertyStore_Vtbl { } unsafe extern "system" fn OnTextUpdated(this: *mut core::ffi::c_void, dwflags: u32, prangenew: *mut core::ffi::c_void, pfaccept: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfPropertyStore_Impl::OnTextUpdated(this, core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&prangenew)) { + match ITfPropertyStore_Impl::OnTextUpdated(this, core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&prangenew)) { Ok(ok__) => { pfaccept.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9983,7 +9983,7 @@ impl ITfPropertyStore_Vtbl { } unsafe extern "system" fn Shrink(this: *mut core::ffi::c_void, prangenew: *mut core::ffi::c_void, pffree: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfPropertyStore_Impl::Shrink(this, windows_core::from_raw_borrowed(&prangenew)) { + match ITfPropertyStore_Impl::Shrink(this, core::mem::transmute_copy(&prangenew)) { Ok(ok__) => { pffree.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -9993,7 +9993,7 @@ impl ITfPropertyStore_Vtbl { } unsafe extern "system" fn Divide(this: *mut core::ffi::c_void, prangethis: *mut core::ffi::c_void, prangenew: *mut core::ffi::c_void, pppropstore: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfPropertyStore_Impl::Divide(this, windows_core::from_raw_borrowed(&prangethis), windows_core::from_raw_borrowed(&prangenew)) { + match ITfPropertyStore_Impl::Divide(this, core::mem::transmute_copy(&prangethis), core::mem::transmute_copy(&prangenew)) { Ok(ok__) => { pppropstore.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10023,7 +10023,7 @@ impl ITfPropertyStore_Vtbl { } unsafe extern "system" fn Serialize(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, pcb: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfPropertyStore_Impl::Serialize(this, windows_core::from_raw_borrowed(&pstream)) { + match ITfPropertyStore_Impl::Serialize(this, core::mem::transmute_copy(&pstream)) { Ok(ok__) => { pcb.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10235,19 +10235,19 @@ pub trait ITfRange_Impl: windows_core::IUnknownImpl { fn SetText(&self, ec: u32, dwflags: u32, pchtext: &windows_core::PCWSTR, cch: i32) -> windows_core::Result<()>; fn GetFormattedText(&self, ec: u32) -> windows_core::Result; fn GetEmbedded(&self, ec: u32, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID) -> windows_core::Result; - fn InsertEmbedded(&self, ec: u32, dwflags: u32, pdataobject: Option<&super::super::System::Com::IDataObject>) -> windows_core::Result<()>; + fn InsertEmbedded(&self, ec: u32, dwflags: u32, pdataobject: windows_core::Ref<'_, super::super::System::Com::IDataObject>) -> windows_core::Result<()>; fn ShiftStart(&self, ec: u32, cchreq: i32, pcch: *mut i32, phalt: *const TF_HALTCOND) -> windows_core::Result<()>; fn ShiftEnd(&self, ec: u32, cchreq: i32, pcch: *mut i32, phalt: *const TF_HALTCOND) -> windows_core::Result<()>; - fn ShiftStartToRange(&self, ec: u32, prange: Option<&ITfRange>, apos: TfAnchor) -> windows_core::Result<()>; - fn ShiftEndToRange(&self, ec: u32, prange: Option<&ITfRange>, apos: TfAnchor) -> windows_core::Result<()>; + fn ShiftStartToRange(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>, apos: TfAnchor) -> windows_core::Result<()>; + fn ShiftEndToRange(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>, apos: TfAnchor) -> windows_core::Result<()>; fn ShiftStartRegion(&self, ec: u32, dir: TfShiftDir) -> windows_core::Result; fn ShiftEndRegion(&self, ec: u32, dir: TfShiftDir) -> windows_core::Result; fn IsEmpty(&self, ec: u32) -> windows_core::Result; fn Collapse(&self, ec: u32, apos: TfAnchor) -> windows_core::Result<()>; - fn IsEqualStart(&self, ec: u32, pwith: Option<&ITfRange>, apos: TfAnchor) -> windows_core::Result; - fn IsEqualEnd(&self, ec: u32, pwith: Option<&ITfRange>, apos: TfAnchor) -> windows_core::Result; - fn CompareStart(&self, ec: u32, pwith: Option<&ITfRange>, apos: TfAnchor) -> windows_core::Result; - fn CompareEnd(&self, ec: u32, pwith: Option<&ITfRange>, apos: TfAnchor) -> windows_core::Result; + fn IsEqualStart(&self, ec: u32, pwith: windows_core::Ref<'_, ITfRange>, apos: TfAnchor) -> windows_core::Result; + fn IsEqualEnd(&self, ec: u32, pwith: windows_core::Ref<'_, ITfRange>, apos: TfAnchor) -> windows_core::Result; + fn CompareStart(&self, ec: u32, pwith: windows_core::Ref<'_, ITfRange>, apos: TfAnchor) -> windows_core::Result; + fn CompareEnd(&self, ec: u32, pwith: windows_core::Ref<'_, ITfRange>, apos: TfAnchor) -> windows_core::Result; fn AdjustForInsert(&self, ec: u32, cchinsert: u32) -> windows_core::Result; fn GetGravity(&self, pgstart: *mut TfGravity, pgend: *mut TfGravity) -> windows_core::Result<()>; fn SetGravity(&self, ec: u32, gstart: TfGravity, gend: TfGravity) -> windows_core::Result<()>; @@ -10287,7 +10287,7 @@ impl ITfRange_Vtbl { } unsafe extern "system" fn InsertEmbedded(this: *mut core::ffi::c_void, ec: u32, dwflags: u32, pdataobject: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfRange_Impl::InsertEmbedded(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&pdataobject)).into() + ITfRange_Impl::InsertEmbedded(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&pdataobject)).into() } unsafe extern "system" fn ShiftStart(this: *mut core::ffi::c_void, ec: u32, cchreq: i32, pcch: *mut i32, phalt: *const TF_HALTCOND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10299,11 +10299,11 @@ impl ITfRange_Vtbl { } unsafe extern "system" fn ShiftStartToRange(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void, apos: TfAnchor) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfRange_Impl::ShiftStartToRange(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&apos)).into() + ITfRange_Impl::ShiftStartToRange(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&apos)).into() } unsafe extern "system" fn ShiftEndToRange(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void, apos: TfAnchor) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfRange_Impl::ShiftEndToRange(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange), core::mem::transmute_copy(&apos)).into() + ITfRange_Impl::ShiftEndToRange(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange), core::mem::transmute_copy(&apos)).into() } unsafe extern "system" fn ShiftStartRegion(this: *mut core::ffi::c_void, ec: u32, dir: TfShiftDir, pfnoregion: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -10341,7 +10341,7 @@ impl ITfRange_Vtbl { } unsafe extern "system" fn IsEqualStart(this: *mut core::ffi::c_void, ec: u32, pwith: *mut core::ffi::c_void, apos: TfAnchor, pfequal: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfRange_Impl::IsEqualStart(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&pwith), core::mem::transmute_copy(&apos)) { + match ITfRange_Impl::IsEqualStart(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&pwith), core::mem::transmute_copy(&apos)) { Ok(ok__) => { pfequal.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10351,7 +10351,7 @@ impl ITfRange_Vtbl { } unsafe extern "system" fn IsEqualEnd(this: *mut core::ffi::c_void, ec: u32, pwith: *mut core::ffi::c_void, apos: TfAnchor, pfequal: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfRange_Impl::IsEqualEnd(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&pwith), core::mem::transmute_copy(&apos)) { + match ITfRange_Impl::IsEqualEnd(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&pwith), core::mem::transmute_copy(&apos)) { Ok(ok__) => { pfequal.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10361,7 +10361,7 @@ impl ITfRange_Vtbl { } unsafe extern "system" fn CompareStart(this: *mut core::ffi::c_void, ec: u32, pwith: *mut core::ffi::c_void, apos: TfAnchor, plresult: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfRange_Impl::CompareStart(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&pwith), core::mem::transmute_copy(&apos)) { + match ITfRange_Impl::CompareStart(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&pwith), core::mem::transmute_copy(&apos)) { Ok(ok__) => { plresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10371,7 +10371,7 @@ impl ITfRange_Vtbl { } unsafe extern "system" fn CompareEnd(this: *mut core::ffi::c_void, ec: u32, pwith: *mut core::ffi::c_void, apos: TfAnchor, plresult: *mut i32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfRange_Impl::CompareEnd(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&pwith), core::mem::transmute_copy(&apos)) { + match ITfRange_Impl::CompareEnd(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&pwith), core::mem::transmute_copy(&apos)) { Ok(ok__) => { plresult.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10511,13 +10511,13 @@ pub struct ITfRangeBackup_Vtbl { pub Restore: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfRangeBackup_Impl: windows_core::IUnknownImpl { - fn Restore(&self, ec: u32, prange: Option<&ITfRange>) -> windows_core::Result<()>; + fn Restore(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; } impl ITfRangeBackup_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Restore(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfRangeBackup_Impl::Restore(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange)).into() + ITfRangeBackup_Impl::Restore(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Restore: Restore:: } } @@ -10566,8 +10566,8 @@ pub struct ITfReadOnlyProperty_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITfReadOnlyProperty_Impl: windows_core::IUnknownImpl { fn GetType(&self) -> windows_core::Result; - fn EnumRanges(&self, ec: u32, ppenum: *mut Option, ptargetrange: Option<&ITfRange>) -> windows_core::Result<()>; - fn GetValue(&self, ec: u32, prange: Option<&ITfRange>) -> windows_core::Result; + fn EnumRanges(&self, ec: u32, ppenum: windows_core::OutRef<'_, IEnumTfRanges>, ptargetrange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result<()>; + fn GetValue(&self, ec: u32, prange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; fn GetContext(&self) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -10585,11 +10585,11 @@ impl ITfReadOnlyProperty_Vtbl { } unsafe extern "system" fn EnumRanges(this: *mut core::ffi::c_void, ec: u32, ppenum: *mut *mut core::ffi::c_void, ptargetrange: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfReadOnlyProperty_Impl::EnumRanges(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&ppenum), windows_core::from_raw_borrowed(&ptargetrange)).into() + ITfReadOnlyProperty_Impl::EnumRanges(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&ppenum), core::mem::transmute_copy(&ptargetrange)).into() } unsafe extern "system" fn GetValue(this: *mut core::ffi::c_void, ec: u32, prange: *mut core::ffi::c_void, pvarvalue: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfReadOnlyProperty_Impl::GetValue(this, core::mem::transmute_copy(&ec), windows_core::from_raw_borrowed(&prange)) { + match ITfReadOnlyProperty_Impl::GetValue(this, core::mem::transmute_copy(&ec), core::mem::transmute_copy(&prange)) { Ok(ok__) => { pvarvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10899,14 +10899,14 @@ pub struct ITfSource_Vtbl { pub UnadviseSink: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait ITfSource_Impl: windows_core::IUnknownImpl { - fn AdviseSink(&self, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result; + fn AdviseSink(&self, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result; fn UnadviseSink(&self, dwcookie: u32) -> windows_core::Result<()>; } impl ITfSource_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseSink(this: *mut core::ffi::c_void, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfSource_Impl::AdviseSink(this, core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)) { + match ITfSource_Impl::AdviseSink(this, core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -10949,14 +10949,14 @@ pub struct ITfSourceSingle_Vtbl { pub UnadviseSingleSink: unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const windows_core::GUID) -> windows_core::HRESULT, } pub trait ITfSourceSingle_Impl: windows_core::IUnknownImpl { - fn AdviseSingleSink(&self, tid: u32, riid: *const windows_core::GUID, punk: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AdviseSingleSink(&self, tid: u32, riid: *const windows_core::GUID, punk: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn UnadviseSingleSink(&self, tid: u32, riid: *const windows_core::GUID) -> windows_core::Result<()>; } impl ITfSourceSingle_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AdviseSingleSink(this: *mut core::ffi::c_void, tid: u32, riid: *const windows_core::GUID, punk: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfSourceSingle_Impl::AdviseSingleSink(this, core::mem::transmute_copy(&tid), core::mem::transmute_copy(&riid), windows_core::from_raw_borrowed(&punk)).into() + ITfSourceSingle_Impl::AdviseSingleSink(this, core::mem::transmute_copy(&tid), core::mem::transmute_copy(&riid), core::mem::transmute_copy(&punk)).into() } unsafe extern "system" fn UnadviseSingleSink(this: *mut core::ffi::c_void, tid: u32, riid: *const windows_core::GUID) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11040,13 +11040,13 @@ pub struct ITfStatusSink_Vtbl { pub OnStatusChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait ITfStatusSink_Impl: windows_core::IUnknownImpl { - fn OnStatusChange(&self, pic: Option<&ITfContext>, dwflags: u32) -> windows_core::Result<()>; + fn OnStatusChange(&self, pic: windows_core::Ref<'_, ITfContext>, dwflags: u32) -> windows_core::Result<()>; } impl ITfStatusSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnStatusChange(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfStatusSink_Impl::OnStatusChange(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&dwflags)).into() + ITfStatusSink_Impl::OnStatusChange(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&dwflags)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnStatusChange: OnStatusChange:: } } @@ -11171,14 +11171,14 @@ pub struct ITfSystemLangBarItemSink_Vtbl { pub OnMenuSelect: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT, } pub trait ITfSystemLangBarItemSink_Impl: windows_core::IUnknownImpl { - fn InitMenu(&self, pmenu: Option<&ITfMenu>) -> windows_core::Result<()>; + fn InitMenu(&self, pmenu: windows_core::Ref<'_, ITfMenu>) -> windows_core::Result<()>; fn OnMenuSelect(&self, wid: u32) -> windows_core::Result<()>; } impl ITfSystemLangBarItemSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn InitMenu(this: *mut core::ffi::c_void, pmenu: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfSystemLangBarItemSink_Impl::InitMenu(this, windows_core::from_raw_borrowed(&pmenu)).into() + ITfSystemLangBarItemSink_Impl::InitMenu(this, core::mem::transmute_copy(&pmenu)).into() } unsafe extern "system" fn OnMenuSelect(this: *mut core::ffi::c_void, wid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11260,13 +11260,13 @@ pub struct ITfTextEditSink_Vtbl { pub OnEndEdit: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfTextEditSink_Impl: windows_core::IUnknownImpl { - fn OnEndEdit(&self, pic: Option<&ITfContext>, ecreadonly: u32, peditrecord: Option<&ITfEditRecord>) -> windows_core::Result<()>; + fn OnEndEdit(&self, pic: windows_core::Ref<'_, ITfContext>, ecreadonly: u32, peditrecord: windows_core::Ref<'_, ITfEditRecord>) -> windows_core::Result<()>; } impl ITfTextEditSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnEndEdit(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, ecreadonly: u32, peditrecord: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfTextEditSink_Impl::OnEndEdit(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&ecreadonly), windows_core::from_raw_borrowed(&peditrecord)).into() + ITfTextEditSink_Impl::OnEndEdit(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&ecreadonly), core::mem::transmute_copy(&peditrecord)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnEndEdit: OnEndEdit:: } } @@ -11295,14 +11295,14 @@ pub struct ITfTextInputProcessor_Vtbl { pub Deactivate: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfTextInputProcessor_Impl: windows_core::IUnknownImpl { - fn Activate(&self, ptim: Option<&ITfThreadMgr>, tid: u32) -> windows_core::Result<()>; + fn Activate(&self, ptim: windows_core::Ref<'_, ITfThreadMgr>, tid: u32) -> windows_core::Result<()>; fn Deactivate(&self) -> windows_core::Result<()>; } impl ITfTextInputProcessor_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Activate(this: *mut core::ffi::c_void, ptim: *mut core::ffi::c_void, tid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfTextInputProcessor_Impl::Activate(this, windows_core::from_raw_borrowed(&ptim), core::mem::transmute_copy(&tid)).into() + ITfTextInputProcessor_Impl::Activate(this, core::mem::transmute_copy(&ptim), core::mem::transmute_copy(&tid)).into() } unsafe extern "system" fn Deactivate(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11341,13 +11341,13 @@ pub struct ITfTextInputProcessorEx_Vtbl { pub ActivateEx: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, u32) -> windows_core::HRESULT, } pub trait ITfTextInputProcessorEx_Impl: ITfTextInputProcessor_Impl { - fn ActivateEx(&self, ptim: Option<&ITfThreadMgr>, tid: u32, dwflags: u32) -> windows_core::Result<()>; + fn ActivateEx(&self, ptim: windows_core::Ref<'_, ITfThreadMgr>, tid: u32, dwflags: u32) -> windows_core::Result<()>; } impl ITfTextInputProcessorEx_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ActivateEx(this: *mut core::ffi::c_void, ptim: *mut core::ffi::c_void, tid: u32, dwflags: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfTextInputProcessorEx_Impl::ActivateEx(this, windows_core::from_raw_borrowed(&ptim), core::mem::transmute_copy(&tid), core::mem::transmute_copy(&dwflags)).into() + ITfTextInputProcessorEx_Impl::ActivateEx(this, core::mem::transmute_copy(&ptim), core::mem::transmute_copy(&tid), core::mem::transmute_copy(&dwflags)).into() } Self { base__: ITfTextInputProcessor_Vtbl::new::(), ActivateEx: ActivateEx:: } } @@ -11373,13 +11373,13 @@ pub struct ITfTextLayoutSink_Vtbl { pub OnLayoutChange: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, TfLayoutCode, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfTextLayoutSink_Impl: windows_core::IUnknownImpl { - fn OnLayoutChange(&self, pic: Option<&ITfContext>, lcode: TfLayoutCode, pview: Option<&ITfContextView>) -> windows_core::Result<()>; + fn OnLayoutChange(&self, pic: windows_core::Ref<'_, ITfContext>, lcode: TfLayoutCode, pview: windows_core::Ref<'_, ITfContextView>) -> windows_core::Result<()>; } impl ITfTextLayoutSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnLayoutChange(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, lcode: TfLayoutCode, pview: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfTextLayoutSink_Impl::OnLayoutChange(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&lcode), windows_core::from_raw_borrowed(&pview)).into() + ITfTextLayoutSink_Impl::OnLayoutChange(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&lcode), core::mem::transmute_copy(&pview)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnLayoutChange: OnLayoutChange:: } } @@ -11502,8 +11502,8 @@ pub trait ITfThreadMgr_Impl: windows_core::IUnknownImpl { fn CreateDocumentMgr(&self) -> windows_core::Result; fn EnumDocumentMgrs(&self) -> windows_core::Result; fn GetFocus(&self) -> windows_core::Result; - fn SetFocus(&self, pdimfocus: Option<&ITfDocumentMgr>) -> windows_core::Result<()>; - fn AssociateFocus(&self, hwnd: super::super::Foundation::HWND, pdimnew: Option<&ITfDocumentMgr>) -> windows_core::Result; + fn SetFocus(&self, pdimfocus: windows_core::Ref<'_, ITfDocumentMgr>) -> windows_core::Result<()>; + fn AssociateFocus(&self, hwnd: super::super::Foundation::HWND, pdimnew: windows_core::Ref<'_, ITfDocumentMgr>) -> windows_core::Result; fn IsThreadFocus(&self) -> windows_core::Result; fn GetFunctionProvider(&self, clsid: *const windows_core::GUID) -> windows_core::Result; fn EnumFunctionProviders(&self) -> windows_core::Result; @@ -11557,11 +11557,11 @@ impl ITfThreadMgr_Vtbl { } unsafe extern "system" fn SetFocus(this: *mut core::ffi::c_void, pdimfocus: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfThreadMgr_Impl::SetFocus(this, windows_core::from_raw_borrowed(&pdimfocus)).into() + ITfThreadMgr_Impl::SetFocus(this, core::mem::transmute_copy(&pdimfocus)).into() } unsafe extern "system" fn AssociateFocus(this: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND, pdimnew: *mut core::ffi::c_void, ppdimprev: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfThreadMgr_Impl::AssociateFocus(this, core::mem::transmute_copy(&hwnd), windows_core::from_raw_borrowed(&pdimnew)) { + match ITfThreadMgr_Impl::AssociateFocus(this, core::mem::transmute_copy(&hwnd), core::mem::transmute_copy(&pdimnew)) { Ok(ok__) => { ppdimprev.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -11711,7 +11711,7 @@ pub trait ITfThreadMgr2_Impl: windows_core::IUnknownImpl { fn CreateDocumentMgr(&self) -> windows_core::Result; fn EnumDocumentMgrs(&self) -> windows_core::Result; fn GetFocus(&self) -> windows_core::Result; - fn SetFocus(&self, pdimfocus: Option<&ITfDocumentMgr>) -> windows_core::Result<()>; + fn SetFocus(&self, pdimfocus: windows_core::Ref<'_, ITfDocumentMgr>) -> windows_core::Result<()>; fn IsThreadFocus(&self) -> windows_core::Result; fn GetFunctionProvider(&self, clsid: *const windows_core::GUID) -> windows_core::Result; fn EnumFunctionProviders(&self) -> windows_core::Result; @@ -11769,7 +11769,7 @@ impl ITfThreadMgr2_Vtbl { } unsafe extern "system" fn SetFocus(this: *mut core::ffi::c_void, pdimfocus: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfThreadMgr2_Impl::SetFocus(this, windows_core::from_raw_borrowed(&pdimfocus)).into() + ITfThreadMgr2_Impl::SetFocus(this, core::mem::transmute_copy(&pdimfocus)).into() } unsafe extern "system" fn IsThreadFocus(this: *mut core::ffi::c_void, pfthreadfocus: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -11901,33 +11901,33 @@ pub struct ITfThreadMgrEventSink_Vtbl { pub OnPopContext: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfThreadMgrEventSink_Impl: windows_core::IUnknownImpl { - fn OnInitDocumentMgr(&self, pdim: Option<&ITfDocumentMgr>) -> windows_core::Result<()>; - fn OnUninitDocumentMgr(&self, pdim: Option<&ITfDocumentMgr>) -> windows_core::Result<()>; - fn OnSetFocus(&self, pdimfocus: Option<&ITfDocumentMgr>, pdimprevfocus: Option<&ITfDocumentMgr>) -> windows_core::Result<()>; - fn OnPushContext(&self, pic: Option<&ITfContext>) -> windows_core::Result<()>; - fn OnPopContext(&self, pic: Option<&ITfContext>) -> windows_core::Result<()>; + fn OnInitDocumentMgr(&self, pdim: windows_core::Ref<'_, ITfDocumentMgr>) -> windows_core::Result<()>; + fn OnUninitDocumentMgr(&self, pdim: windows_core::Ref<'_, ITfDocumentMgr>) -> windows_core::Result<()>; + fn OnSetFocus(&self, pdimfocus: windows_core::Ref<'_, ITfDocumentMgr>, pdimprevfocus: windows_core::Ref<'_, ITfDocumentMgr>) -> windows_core::Result<()>; + fn OnPushContext(&self, pic: windows_core::Ref<'_, ITfContext>) -> windows_core::Result<()>; + fn OnPopContext(&self, pic: windows_core::Ref<'_, ITfContext>) -> windows_core::Result<()>; } impl ITfThreadMgrEventSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnInitDocumentMgr(this: *mut core::ffi::c_void, pdim: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfThreadMgrEventSink_Impl::OnInitDocumentMgr(this, windows_core::from_raw_borrowed(&pdim)).into() + ITfThreadMgrEventSink_Impl::OnInitDocumentMgr(this, core::mem::transmute_copy(&pdim)).into() } unsafe extern "system" fn OnUninitDocumentMgr(this: *mut core::ffi::c_void, pdim: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfThreadMgrEventSink_Impl::OnUninitDocumentMgr(this, windows_core::from_raw_borrowed(&pdim)).into() + ITfThreadMgrEventSink_Impl::OnUninitDocumentMgr(this, core::mem::transmute_copy(&pdim)).into() } unsafe extern "system" fn OnSetFocus(this: *mut core::ffi::c_void, pdimfocus: *mut core::ffi::c_void, pdimprevfocus: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfThreadMgrEventSink_Impl::OnSetFocus(this, windows_core::from_raw_borrowed(&pdimfocus), windows_core::from_raw_borrowed(&pdimprevfocus)).into() + ITfThreadMgrEventSink_Impl::OnSetFocus(this, core::mem::transmute_copy(&pdimfocus), core::mem::transmute_copy(&pdimprevfocus)).into() } unsafe extern "system" fn OnPushContext(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfThreadMgrEventSink_Impl::OnPushContext(this, windows_core::from_raw_borrowed(&pic)).into() + ITfThreadMgrEventSink_Impl::OnPushContext(this, core::mem::transmute_copy(&pic)).into() } unsafe extern "system" fn OnPopContext(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfThreadMgrEventSink_Impl::OnPopContext(this, windows_core::from_raw_borrowed(&pic)).into() + ITfThreadMgrEventSink_Impl::OnPopContext(this, core::mem::transmute_copy(&pic)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -12057,13 +12057,13 @@ pub struct ITfTransitoryExtensionSink_Vtbl { pub OnTransitoryExtensionUpdated: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32, *mut core::ffi::c_void, *mut core::ffi::c_void, *mut super::super::Foundation::BOOL) -> windows_core::HRESULT, } pub trait ITfTransitoryExtensionSink_Impl: windows_core::IUnknownImpl { - fn OnTransitoryExtensionUpdated(&self, pic: Option<&ITfContext>, ecreadonly: u32, presultrange: Option<&ITfRange>, pcompositionrange: Option<&ITfRange>) -> windows_core::Result; + fn OnTransitoryExtensionUpdated(&self, pic: windows_core::Ref<'_, ITfContext>, ecreadonly: u32, presultrange: windows_core::Ref<'_, ITfRange>, pcompositionrange: windows_core::Ref<'_, ITfRange>) -> windows_core::Result; } impl ITfTransitoryExtensionSink_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnTransitoryExtensionUpdated(this: *mut core::ffi::c_void, pic: *mut core::ffi::c_void, ecreadonly: u32, presultrange: *mut core::ffi::c_void, pcompositionrange: *mut core::ffi::c_void, pfdeleteresultrange: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITfTransitoryExtensionSink_Impl::OnTransitoryExtensionUpdated(this, windows_core::from_raw_borrowed(&pic), core::mem::transmute_copy(&ecreadonly), windows_core::from_raw_borrowed(&presultrange), windows_core::from_raw_borrowed(&pcompositionrange)) { + match ITfTransitoryExtensionSink_Impl::OnTransitoryExtensionUpdated(this, core::mem::transmute_copy(&pic), core::mem::transmute_copy(&ecreadonly), core::mem::transmute_copy(&presultrange), core::mem::transmute_copy(&pcompositionrange)) { Ok(ok__) => { pfdeleteresultrange.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -12235,7 +12235,7 @@ pub struct ITfUIElementMgr_Vtbl { pub EnumUIElements: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITfUIElementMgr_Impl: windows_core::IUnknownImpl { - fn BeginUIElement(&self, pelement: Option<&ITfUIElement>, pbshow: *mut super::super::Foundation::BOOL, pdwuielementid: *mut u32) -> windows_core::Result<()>; + fn BeginUIElement(&self, pelement: windows_core::Ref<'_, ITfUIElement>, pbshow: *mut super::super::Foundation::BOOL, pdwuielementid: *mut u32) -> windows_core::Result<()>; fn UpdateUIElement(&self, dwuielementid: u32) -> windows_core::Result<()>; fn EndUIElement(&self, dwuielementid: u32) -> windows_core::Result<()>; fn GetUIElement(&self, dwuielementid: u32) -> windows_core::Result; @@ -12245,7 +12245,7 @@ impl ITfUIElementMgr_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn BeginUIElement(this: *mut core::ffi::c_void, pelement: *mut core::ffi::c_void, pbshow: *mut super::super::Foundation::BOOL, pdwuielementid: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITfUIElementMgr_Impl::BeginUIElement(this, windows_core::from_raw_borrowed(&pelement), core::mem::transmute_copy(&pbshow), core::mem::transmute_copy(&pdwuielementid)).into() + ITfUIElementMgr_Impl::BeginUIElement(this, core::mem::transmute_copy(&pelement), core::mem::transmute_copy(&pbshow), core::mem::transmute_copy(&pdwuielementid)).into() } unsafe extern "system" fn UpdateUIElement(this: *mut core::ffi::c_void, dwuielementid: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs index e68b363be1..909d283ccc 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Wpf/mod.rs @@ -42,16 +42,16 @@ pub struct IMILBitmapEffect_Vtbl { } #[cfg(feature = "Win32_Graphics_Imaging")] pub trait IMILBitmapEffect_Impl: windows_core::IUnknownImpl { - fn GetOutput(&self, uiindex: u32, pcontext: Option<&IMILBitmapEffectRenderContext>) -> windows_core::Result; + fn GetOutput(&self, uiindex: u32, pcontext: windows_core::Ref<'_, IMILBitmapEffectRenderContext>) -> windows_core::Result; fn GetParentEffect(&self) -> windows_core::Result; - fn SetInputSource(&self, uiindex: u32, pbitmapsource: Option<&super::super::Graphics::Imaging::IWICBitmapSource>) -> windows_core::Result<()>; + fn SetInputSource(&self, uiindex: u32, pbitmapsource: windows_core::Ref<'_, super::super::Graphics::Imaging::IWICBitmapSource>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Imaging")] impl IMILBitmapEffect_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetOutput(this: *mut core::ffi::c_void, uiindex: u32, pcontext: *mut core::ffi::c_void, ppbitmapsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMILBitmapEffect_Impl::GetOutput(this, core::mem::transmute_copy(&uiindex), windows_core::from_raw_borrowed(&pcontext)) { + match IMILBitmapEffect_Impl::GetOutput(this, core::mem::transmute_copy(&uiindex), core::mem::transmute_copy(&pcontext)) { Ok(ok__) => { ppbitmapsource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -71,7 +71,7 @@ impl IMILBitmapEffect_Vtbl { } unsafe extern "system" fn SetInputSource(this: *mut core::ffi::c_void, uiindex: u32, pbitmapsource: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffect_Impl::SetInputSource(this, core::mem::transmute_copy(&uiindex), windows_core::from_raw_borrowed(&pbitmapsource)).into() + IMILBitmapEffect_Impl::SetInputSource(this, core::mem::transmute_copy(&uiindex), core::mem::transmute_copy(&pbitmapsource)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -403,18 +403,18 @@ pub struct IMILBitmapEffectEvents_Vtbl { pub DirtyRegion: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, *const MilRectD) -> windows_core::HRESULT, } pub trait IMILBitmapEffectEvents_Impl: windows_core::IUnknownImpl { - fn PropertyChange(&self, peffect: Option<&IMILBitmapEffect>, bstrpropertyname: &windows_core::BSTR) -> windows_core::Result<()>; - fn DirtyRegion(&self, peffect: Option<&IMILBitmapEffect>, prect: *const MilRectD) -> windows_core::Result<()>; + fn PropertyChange(&self, peffect: windows_core::Ref<'_, IMILBitmapEffect>, bstrpropertyname: &windows_core::BSTR) -> windows_core::Result<()>; + fn DirtyRegion(&self, peffect: windows_core::Ref<'_, IMILBitmapEffect>, prect: *const MilRectD) -> windows_core::Result<()>; } impl IMILBitmapEffectEvents_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn PropertyChange(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void, bstrpropertyname: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectEvents_Impl::PropertyChange(this, windows_core::from_raw_borrowed(&peffect), core::mem::transmute(&bstrpropertyname)).into() + IMILBitmapEffectEvents_Impl::PropertyChange(this, core::mem::transmute_copy(&peffect), core::mem::transmute(&bstrpropertyname)).into() } unsafe extern "system" fn DirtyRegion(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void, prect: *const MilRectD) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectEvents_Impl::DirtyRegion(this, windows_core::from_raw_borrowed(&peffect), core::mem::transmute_copy(&prect)).into() + IMILBitmapEffectEvents_Impl::DirtyRegion(this, core::mem::transmute_copy(&peffect), core::mem::transmute_copy(&prect)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -527,7 +527,7 @@ pub struct IMILBitmapEffectGroup_Vtbl { pub trait IMILBitmapEffectGroup_Impl: windows_core::IUnknownImpl { fn GetInteriorInputConnector(&self, uiindex: u32) -> windows_core::Result; fn GetInteriorOutputConnector(&self, uiindex: u32) -> windows_core::Result; - fn Add(&self, peffect: Option<&IMILBitmapEffect>) -> windows_core::Result<()>; + fn Add(&self, peffect: windows_core::Ref<'_, IMILBitmapEffect>) -> windows_core::Result<()>; } impl IMILBitmapEffectGroup_Vtbl { pub const fn new() -> Self { @@ -553,7 +553,7 @@ impl IMILBitmapEffectGroup_Vtbl { } unsafe extern "system" fn Add(this: *mut core::ffi::c_void, peffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectGroup_Impl::Add(this, windows_core::from_raw_borrowed(&peffect)).into() + IMILBitmapEffectGroup_Impl::Add(this, core::mem::transmute_copy(&peffect)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -593,7 +593,7 @@ pub struct IMILBitmapEffectGroupImpl_Vtbl { pub GetChildren: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMILBitmapEffectGroupImpl_Impl: windows_core::IUnknownImpl { - fn Preprocess(&self, pcontext: Option<&IMILBitmapEffectRenderContext>) -> windows_core::Result<()>; + fn Preprocess(&self, pcontext: windows_core::Ref<'_, IMILBitmapEffectRenderContext>) -> windows_core::Result<()>; fn GetNumberChildren(&self) -> windows_core::Result; fn GetChildren(&self) -> windows_core::Result; } @@ -601,7 +601,7 @@ impl IMILBitmapEffectGroupImpl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Preprocess(this: *mut core::ffi::c_void, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectGroupImpl_Impl::Preprocess(this, windows_core::from_raw_borrowed(&pcontext)).into() + IMILBitmapEffectGroupImpl_Impl::Preprocess(this, core::mem::transmute_copy(&pcontext)).into() } unsafe extern "system" fn GetNumberChildren(this: *mut core::ffi::c_void, puinumberchildren: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -704,20 +704,20 @@ pub struct IMILBitmapEffectImpl_Vtbl { } #[cfg(feature = "Win32_Graphics_Imaging")] pub trait IMILBitmapEffectImpl_Impl: windows_core::IUnknownImpl { - fn IsInPlaceModificationAllowed(&self, poutputconnector: Option<&IMILBitmapEffectOutputConnector>) -> windows_core::Result; - fn SetParentEffect(&self, pparenteffect: Option<&IMILBitmapEffectGroup>) -> windows_core::Result<()>; + fn IsInPlaceModificationAllowed(&self, poutputconnector: windows_core::Ref<'_, IMILBitmapEffectOutputConnector>) -> windows_core::Result; + fn SetParentEffect(&self, pparenteffect: windows_core::Ref<'_, IMILBitmapEffectGroup>) -> windows_core::Result<()>; fn GetInputSource(&self, uiindex: u32) -> windows_core::Result; fn GetInputSourceBounds(&self, uiindex: u32, prect: *mut MilRectD) -> windows_core::Result<()>; - fn GetInputBitmapSource(&self, uiindex: u32, prendercontext: Option<&IMILBitmapEffectRenderContext>, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; - fn GetOutputBitmapSource(&self, uiindex: u32, prendercontext: Option<&IMILBitmapEffectRenderContext>, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; - fn Initialize(&self, pinner: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetInputBitmapSource(&self, uiindex: u32, prendercontext: windows_core::Ref<'_, IMILBitmapEffectRenderContext>, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; + fn GetOutputBitmapSource(&self, uiindex: u32, prendercontext: windows_core::Ref<'_, IMILBitmapEffectRenderContext>, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; + fn Initialize(&self, pinner: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Imaging")] impl IMILBitmapEffectImpl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn IsInPlaceModificationAllowed(this: *mut core::ffi::c_void, poutputconnector: *mut core::ffi::c_void, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMILBitmapEffectImpl_Impl::IsInPlaceModificationAllowed(this, windows_core::from_raw_borrowed(&poutputconnector)) { + match IMILBitmapEffectImpl_Impl::IsInPlaceModificationAllowed(this, core::mem::transmute_copy(&poutputconnector)) { Ok(ok__) => { pfmodifyinplace.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -727,7 +727,7 @@ impl IMILBitmapEffectImpl_Vtbl { } unsafe extern "system" fn SetParentEffect(this: *mut core::ffi::c_void, pparenteffect: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectImpl_Impl::SetParentEffect(this, windows_core::from_raw_borrowed(&pparenteffect)).into() + IMILBitmapEffectImpl_Impl::SetParentEffect(this, core::mem::transmute_copy(&pparenteffect)).into() } unsafe extern "system" fn GetInputSource(this: *mut core::ffi::c_void, uiindex: u32, ppbitmapsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -745,7 +745,7 @@ impl IMILBitmapEffectImpl_Vtbl { } unsafe extern "system" fn GetInputBitmapSource(this: *mut core::ffi::c_void, uiindex: u32, prendercontext: *mut core::ffi::c_void, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL, ppbitmapsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMILBitmapEffectImpl_Impl::GetInputBitmapSource(this, core::mem::transmute_copy(&uiindex), windows_core::from_raw_borrowed(&prendercontext), core::mem::transmute_copy(&pfmodifyinplace)) { + match IMILBitmapEffectImpl_Impl::GetInputBitmapSource(this, core::mem::transmute_copy(&uiindex), core::mem::transmute_copy(&prendercontext), core::mem::transmute_copy(&pfmodifyinplace)) { Ok(ok__) => { ppbitmapsource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -755,7 +755,7 @@ impl IMILBitmapEffectImpl_Vtbl { } unsafe extern "system" fn GetOutputBitmapSource(this: *mut core::ffi::c_void, uiindex: u32, prendercontext: *mut core::ffi::c_void, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL, ppbitmapsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMILBitmapEffectImpl_Impl::GetOutputBitmapSource(this, core::mem::transmute_copy(&uiindex), windows_core::from_raw_borrowed(&prendercontext), core::mem::transmute_copy(&pfmodifyinplace)) { + match IMILBitmapEffectImpl_Impl::GetOutputBitmapSource(this, core::mem::transmute_copy(&uiindex), core::mem::transmute_copy(&prendercontext), core::mem::transmute_copy(&pfmodifyinplace)) { Ok(ok__) => { ppbitmapsource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -765,7 +765,7 @@ impl IMILBitmapEffectImpl_Vtbl { } unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, pinner: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectImpl_Impl::Initialize(this, windows_core::from_raw_borrowed(&pinner)).into() + IMILBitmapEffectImpl_Impl::Initialize(this, core::mem::transmute_copy(&pinner)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -811,14 +811,14 @@ pub struct IMILBitmapEffectInputConnector_Vtbl { pub GetConnection: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMILBitmapEffectInputConnector_Impl: IMILBitmapEffectConnector_Impl { - fn ConnectTo(&self, pconnector: Option<&IMILBitmapEffectOutputConnector>) -> windows_core::Result<()>; + fn ConnectTo(&self, pconnector: windows_core::Ref<'_, IMILBitmapEffectOutputConnector>) -> windows_core::Result<()>; fn GetConnection(&self) -> windows_core::Result; } impl IMILBitmapEffectInputConnector_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn ConnectTo(this: *mut core::ffi::c_void, pconnector: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectInputConnector_Impl::ConnectTo(this, windows_core::from_raw_borrowed(&pconnector)).into() + IMILBitmapEffectInputConnector_Impl::ConnectTo(this, core::mem::transmute_copy(&pconnector)).into() } unsafe extern "system" fn GetConnection(this: *mut core::ffi::c_void, ppconnector: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -995,18 +995,18 @@ pub struct IMILBitmapEffectOutputConnectorImpl_Vtbl { pub RemoveBackLink: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IMILBitmapEffectOutputConnectorImpl_Impl: windows_core::IUnknownImpl { - fn AddBackLink(&self, pconnection: Option<&IMILBitmapEffectInputConnector>) -> windows_core::Result<()>; - fn RemoveBackLink(&self, pconnection: Option<&IMILBitmapEffectInputConnector>) -> windows_core::Result<()>; + fn AddBackLink(&self, pconnection: windows_core::Ref<'_, IMILBitmapEffectInputConnector>) -> windows_core::Result<()>; + fn RemoveBackLink(&self, pconnection: windows_core::Ref<'_, IMILBitmapEffectInputConnector>) -> windows_core::Result<()>; } impl IMILBitmapEffectOutputConnectorImpl_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddBackLink(this: *mut core::ffi::c_void, pconnection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectOutputConnectorImpl_Impl::AddBackLink(this, windows_core::from_raw_borrowed(&pconnection)).into() + IMILBitmapEffectOutputConnectorImpl_Impl::AddBackLink(this, core::mem::transmute_copy(&pconnection)).into() } unsafe extern "system" fn RemoveBackLink(this: *mut core::ffi::c_void, pconnection: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectOutputConnectorImpl_Impl::RemoveBackLink(this, windows_core::from_raw_borrowed(&pconnection)).into() + IMILBitmapEffectOutputConnectorImpl_Impl::RemoveBackLink(this, core::mem::transmute_copy(&pconnection)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1073,9 +1073,9 @@ pub struct IMILBitmapEffectPrimitive_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Dwm", feature = "Win32_Graphics_Imaging"))] pub trait IMILBitmapEffectPrimitive_Impl: windows_core::IUnknownImpl { - fn GetOutput(&self, uiindex: u32, pcontext: Option<&IMILBitmapEffectRenderContext>, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; - fn TransformPoint(&self, uiindex: u32, p: *mut MilPoint2D, fforwardtransform: super::super::Foundation::VARIANT_BOOL, pcontext: Option<&IMILBitmapEffectRenderContext>, pfpointtransformed: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; - fn TransformRect(&self, uiindex: u32, p: *mut MilRectD, fforwardtransform: super::super::Foundation::VARIANT_BOOL, pcontext: Option<&IMILBitmapEffectRenderContext>) -> windows_core::Result<()>; + fn GetOutput(&self, uiindex: u32, pcontext: windows_core::Ref<'_, IMILBitmapEffectRenderContext>, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result; + fn TransformPoint(&self, uiindex: u32, p: *mut MilPoint2D, fforwardtransform: super::super::Foundation::VARIANT_BOOL, pcontext: windows_core::Ref<'_, IMILBitmapEffectRenderContext>, pfpointtransformed: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; + fn TransformRect(&self, uiindex: u32, p: *mut MilRectD, fforwardtransform: super::super::Foundation::VARIANT_BOOL, pcontext: windows_core::Ref<'_, IMILBitmapEffectRenderContext>) -> windows_core::Result<()>; fn HasAffineTransform(&self, uiindex: u32) -> windows_core::Result; fn HasInverseTransform(&self, uiindex: u32) -> windows_core::Result; fn GetAffineMatrix(&self, uiindex: u32, pmatrix: *mut super::super::Graphics::Dwm::MilMatrix3x2D) -> windows_core::Result<()>; @@ -1085,7 +1085,7 @@ impl IMILBitmapEffectPrimitive_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn GetOutput(this: *mut core::ffi::c_void, uiindex: u32, pcontext: *mut core::ffi::c_void, pfmodifyinplace: *mut super::super::Foundation::VARIANT_BOOL, ppbitmapsource: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IMILBitmapEffectPrimitive_Impl::GetOutput(this, core::mem::transmute_copy(&uiindex), windows_core::from_raw_borrowed(&pcontext), core::mem::transmute_copy(&pfmodifyinplace)) { + match IMILBitmapEffectPrimitive_Impl::GetOutput(this, core::mem::transmute_copy(&uiindex), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pfmodifyinplace)) { Ok(ok__) => { ppbitmapsource.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1095,11 +1095,11 @@ impl IMILBitmapEffectPrimitive_Vtbl { } unsafe extern "system" fn TransformPoint(this: *mut core::ffi::c_void, uiindex: u32, p: *mut MilPoint2D, fforwardtransform: super::super::Foundation::VARIANT_BOOL, pcontext: *mut core::ffi::c_void, pfpointtransformed: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectPrimitive_Impl::TransformPoint(this, core::mem::transmute_copy(&uiindex), core::mem::transmute_copy(&p), core::mem::transmute_copy(&fforwardtransform), windows_core::from_raw_borrowed(&pcontext), core::mem::transmute_copy(&pfpointtransformed)).into() + IMILBitmapEffectPrimitive_Impl::TransformPoint(this, core::mem::transmute_copy(&uiindex), core::mem::transmute_copy(&p), core::mem::transmute_copy(&fforwardtransform), core::mem::transmute_copy(&pcontext), core::mem::transmute_copy(&pfpointtransformed)).into() } unsafe extern "system" fn TransformRect(this: *mut core::ffi::c_void, uiindex: u32, p: *mut MilRectD, fforwardtransform: super::super::Foundation::VARIANT_BOOL, pcontext: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IMILBitmapEffectPrimitive_Impl::TransformRect(this, core::mem::transmute_copy(&uiindex), core::mem::transmute_copy(&p), core::mem::transmute_copy(&fforwardtransform), windows_core::from_raw_borrowed(&pcontext)).into() + IMILBitmapEffectPrimitive_Impl::TransformRect(this, core::mem::transmute_copy(&uiindex), core::mem::transmute_copy(&p), core::mem::transmute_copy(&fforwardtransform), core::mem::transmute_copy(&pcontext)).into() } unsafe extern "system" fn HasAffineTransform(this: *mut core::ffi::c_void, uiindex: u32, pfaffine: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); diff --git a/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs b/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs index bf19b44d1d..62f88bb09f 100644 --- a/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs @@ -726,7 +726,7 @@ pub struct IActiveXUIHandlerSite_Vtbl { } pub trait IActiveXUIHandlerSite_Impl: windows_core::IUnknownImpl { fn CreateScrollableContextMenu(&self) -> windows_core::Result; - fn PickFileAndGetResult(&self, filepicker: Option<&windows_core::IUnknown>, allowmultipleselections: super::super::Foundation::BOOL) -> windows_core::Result; + fn PickFileAndGetResult(&self, filepicker: windows_core::Ref<'_, windows_core::IUnknown>, allowmultipleselections: super::super::Foundation::BOOL) -> windows_core::Result; } impl IActiveXUIHandlerSite_Vtbl { pub const fn new() -> Self { @@ -742,7 +742,7 @@ impl IActiveXUIHandlerSite_Vtbl { } unsafe extern "system" fn PickFileAndGetResult(this: *mut core::ffi::c_void, filepicker: *mut core::ffi::c_void, allowmultipleselections: super::super::Foundation::BOOL, result: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IActiveXUIHandlerSite_Impl::PickFileAndGetResult(this, windows_core::from_raw_borrowed(&filepicker), core::mem::transmute_copy(&allowmultipleselections)) { + match IActiveXUIHandlerSite_Impl::PickFileAndGetResult(this, core::mem::transmute_copy(&filepicker), core::mem::transmute_copy(&allowmultipleselections)) { Ok(ok__) => { result.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1037,7 +1037,7 @@ pub struct IDithererImpl_Vtbl { #[cfg(feature = "Win32_Graphics_Gdi")] pub trait IDithererImpl_Impl: windows_core::IUnknownImpl { fn SetDestColorTable(&self, ncolors: u32, prgbcolors: *const super::super::Graphics::Gdi::RGBQUAD) -> windows_core::Result<()>; - fn SetEventSink(&self, peventsink: Option<&IImageDecodeEventSink>) -> windows_core::Result<()>; + fn SetEventSink(&self, peventsink: windows_core::Ref<'_, IImageDecodeEventSink>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_Graphics_Gdi")] impl IDithererImpl_Vtbl { @@ -1048,7 +1048,7 @@ impl IDithererImpl_Vtbl { } unsafe extern "system" fn SetEventSink(this: *mut core::ffi::c_void, peventsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDithererImpl_Impl::SetEventSink(this, windows_core::from_raw_borrowed(&peventsink)).into() + IDithererImpl_Impl::SetEventSink(this, core::mem::transmute_copy(&peventsink)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -1117,7 +1117,7 @@ pub struct IDocObjectService_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IDocObjectService_Impl: windows_core::IUnknownImpl { - fn FireBeforeNavigate2(&self, pdispatch: Option<&super::super::System::Com::IDispatch>, lpszurl: &windows_core::PCWSTR, dwflags: u32, lpszframename: &windows_core::PCWSTR, ppostdata: *const u8, cbpostdata: u32, lpszheaders: &windows_core::PCWSTR, fplaynavsound: super::super::Foundation::BOOL) -> windows_core::Result; + fn FireBeforeNavigate2(&self, pdispatch: windows_core::Ref<'_, super::super::System::Com::IDispatch>, lpszurl: &windows_core::PCWSTR, dwflags: u32, lpszframename: &windows_core::PCWSTR, ppostdata: *const u8, cbpostdata: u32, lpszheaders: &windows_core::PCWSTR, fplaynavsound: super::super::Foundation::BOOL) -> windows_core::Result; fn FireDownloadBegin(&self) -> windows_core::Result<()>; fn FireDownloadComplete(&self) -> windows_core::Result<()>; fn GetPendingUrl(&self) -> windows_core::Result; @@ -1129,7 +1129,7 @@ impl IDocObjectService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn FireBeforeNavigate2(this: *mut core::ffi::c_void, pdispatch: *mut core::ffi::c_void, lpszurl: windows_core::PCWSTR, dwflags: u32, lpszframename: windows_core::PCWSTR, ppostdata: *const u8, cbpostdata: u32, lpszheaders: windows_core::PCWSTR, fplaynavsound: super::super::Foundation::BOOL, pfcancel: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IDocObjectService_Impl::FireBeforeNavigate2(this, windows_core::from_raw_borrowed(&pdispatch), core::mem::transmute(&lpszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute(&lpszframename), core::mem::transmute_copy(&ppostdata), core::mem::transmute_copy(&cbpostdata), core::mem::transmute(&lpszheaders), core::mem::transmute_copy(&fplaynavsound)) { + match IDocObjectService_Impl::FireBeforeNavigate2(this, core::mem::transmute_copy(&pdispatch), core::mem::transmute(&lpszurl), core::mem::transmute_copy(&dwflags), core::mem::transmute(&lpszframename), core::mem::transmute_copy(&ppostdata), core::mem::transmute_copy(&cbpostdata), core::mem::transmute(&lpszheaders), core::mem::transmute_copy(&fplaynavsound)) { Ok(ok__) => { pfcancel.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1223,14 +1223,14 @@ pub struct IDownloadBehavior_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IDownloadBehavior_Impl: super::super::System::Com::IDispatch_Impl { - fn startDownload(&self, bstrurl: &windows_core::BSTR, pdispcallback: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn startDownload(&self, bstrurl: &windows_core::BSTR, pdispcallback: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IDownloadBehavior_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn startDownload(this: *mut core::ffi::c_void, bstrurl: *mut core::ffi::c_void, pdispcallback: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDownloadBehavior_Impl::startDownload(this, core::mem::transmute(&bstrurl), windows_core::from_raw_borrowed(&pdispcallback)).into() + IDownloadBehavior_Impl::startDownload(this, core::mem::transmute(&bstrurl), core::mem::transmute_copy(&pdispcallback)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), startDownload: startDownload:: } } @@ -1264,14 +1264,14 @@ pub struct IDownloadManager_Vtbl { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] pub trait IDownloadManager_Impl: windows_core::IUnknownImpl { - fn Download(&self, pmk: Option<&super::super::System::Com::IMoniker>, pbc: Option<&super::super::System::Com::IBindCtx>, dwbindverb: u32, grfbindf: i32, pbindinfo: *const super::super::System::Com::BINDINFO, pszheaders: &windows_core::PCWSTR, pszredir: &windows_core::PCWSTR, uicp: u32) -> windows_core::Result<()>; + fn Download(&self, pmk: windows_core::Ref<'_, super::super::System::Com::IMoniker>, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, dwbindverb: u32, grfbindf: i32, pbindinfo: *const super::super::System::Com::BINDINFO, pszheaders: &windows_core::PCWSTR, pszredir: &windows_core::PCWSTR, uicp: u32) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security", feature = "Win32_System_Com_StructuredStorage"))] impl IDownloadManager_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Download(this: *mut core::ffi::c_void, pmk: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void, dwbindverb: u32, grfbindf: i32, pbindinfo: *const super::super::System::Com::BINDINFO, pszheaders: windows_core::PCWSTR, pszredir: windows_core::PCWSTR, uicp: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IDownloadManager_Impl::Download(this, windows_core::from_raw_borrowed(&pmk), windows_core::from_raw_borrowed(&pbc), core::mem::transmute_copy(&dwbindverb), core::mem::transmute_copy(&grfbindf), core::mem::transmute_copy(&pbindinfo), core::mem::transmute(&pszheaders), core::mem::transmute(&pszredir), core::mem::transmute_copy(&uicp)).into() + IDownloadManager_Impl::Download(this, core::mem::transmute_copy(&pmk), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&dwbindverb), core::mem::transmute_copy(&grfbindf), core::mem::transmute_copy(&pbindinfo), core::mem::transmute(&pszheaders), core::mem::transmute(&pszredir), core::mem::transmute_copy(&uicp)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), Download: Download:: } } @@ -1433,7 +1433,7 @@ pub struct IEnumOpenServiceActivity_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumOpenServiceActivity_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IOpenServiceActivity>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1501,7 +1501,7 @@ pub struct IEnumOpenServiceActivityCategory_Vtbl { pub Clone: unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IEnumOpenServiceActivityCategory_Impl: windows_core::IUnknownImpl { - fn Next(&self, celt: u32, rgelt: *mut Option, pceltfetched: *mut u32) -> windows_core::Result<()>; + fn Next(&self, celt: u32, rgelt: windows_core::OutRef<'_, IOpenServiceActivityCategory>, pceltfetched: *mut u32) -> windows_core::Result<()>; fn Skip(&self, celt: u32) -> windows_core::Result<()>; fn Reset(&self) -> windows_core::Result<()>; fn Clone(&self) -> windows_core::Result; @@ -1690,15 +1690,15 @@ pub struct IHTMLPersistData_Vtbl { pub queryType: unsafe extern "system" fn(*mut core::ffi::c_void, i32, *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT, } pub trait IHTMLPersistData_Impl: windows_core::IUnknownImpl { - fn save(&self, punk: Option<&windows_core::IUnknown>, ltype: i32) -> windows_core::Result; - fn load(&self, punk: Option<&windows_core::IUnknown>, ltype: i32) -> windows_core::Result; + fn save(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, ltype: i32) -> windows_core::Result; + fn load(&self, punk: windows_core::Ref<'_, windows_core::IUnknown>, ltype: i32) -> windows_core::Result; fn queryType(&self, ltype: i32) -> windows_core::Result; } impl IHTMLPersistData_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn save(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, ltype: i32, fcontinuebroacast: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHTMLPersistData_Impl::save(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(<ype)) { + match IHTMLPersistData_Impl::save(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(<ype)) { Ok(ok__) => { fcontinuebroacast.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -1708,7 +1708,7 @@ impl IHTMLPersistData_Vtbl { } unsafe extern "system" fn load(this: *mut core::ffi::c_void, punk: *mut core::ffi::c_void, ltype: i32, fdodefault: *mut super::super::Foundation::VARIANT_BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IHTMLPersistData_Impl::load(this, windows_core::from_raw_borrowed(&punk), core::mem::transmute_copy(<ype)) { + match IHTMLPersistData_Impl::load(this, core::mem::transmute_copy(&punk), core::mem::transmute_copy(<ype)) { Ok(ok__) => { fdodefault.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2611,8 +2611,8 @@ pub struct IIEWebDriverSite_Vtbl { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait IIEWebDriverSite_Impl: super::super::System::Com::IDispatch_Impl { fn WindowOperation(&self, operationcode: u32, hwnd: u32) -> windows_core::Result<()>; - fn DetachWebdriver(&self, punkwd: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn GetCapabilityValue(&self, punkwd: Option<&windows_core::IUnknown>, capname: &windows_core::PCWSTR) -> windows_core::Result; + fn DetachWebdriver(&self, punkwd: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn GetCapabilityValue(&self, punkwd: windows_core::Ref<'_, windows_core::IUnknown>, capname: &windows_core::PCWSTR) -> windows_core::Result; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl IIEWebDriverSite_Vtbl { @@ -2623,11 +2623,11 @@ impl IIEWebDriverSite_Vtbl { } unsafe extern "system" fn DetachWebdriver(this: *mut core::ffi::c_void, punkwd: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IIEWebDriverSite_Impl::DetachWebdriver(this, windows_core::from_raw_borrowed(&punkwd)).into() + IIEWebDriverSite_Impl::DetachWebdriver(this, core::mem::transmute_copy(&punkwd)).into() } unsafe extern "system" fn GetCapabilityValue(this: *mut core::ffi::c_void, punkwd: *mut core::ffi::c_void, capname: windows_core::PCWSTR, capvalue: *mut super::super::System::Variant::VARIANT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IIEWebDriverSite_Impl::GetCapabilityValue(this, windows_core::from_raw_borrowed(&punkwd), core::mem::transmute(&capname)) { + match IIEWebDriverSite_Impl::GetCapabilityValue(this, core::mem::transmute_copy(&punkwd), core::mem::transmute(&capname)) { Ok(ok__) => { capvalue.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -2809,8 +2809,8 @@ pub struct IImageDecodeFilter_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IImageDecodeFilter_Impl: windows_core::IUnknownImpl { - fn Initialize(&self, peventsink: Option<&IImageDecodeEventSink>) -> windows_core::Result<()>; - fn Process(&self, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Initialize(&self, peventsink: windows_core::Ref<'_, IImageDecodeEventSink>) -> windows_core::Result<()>; + fn Process(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn Terminate(&self, hrstatus: windows_core::HRESULT) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -2818,11 +2818,11 @@ impl IImageDecodeFilter_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Initialize(this: *mut core::ffi::c_void, peventsink: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImageDecodeFilter_Impl::Initialize(this, windows_core::from_raw_borrowed(&peventsink)).into() + IImageDecodeFilter_Impl::Initialize(this, core::mem::transmute_copy(&peventsink)).into() } unsafe extern "system" fn Process(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IImageDecodeFilter_Impl::Process(this, windows_core::from_raw_borrowed(&pstream)).into() + IImageDecodeFilter_Impl::Process(this, core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn Terminate(this: *mut core::ffi::c_void, hrstatus: windows_core::HRESULT) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3061,7 +3061,7 @@ pub trait ILayoutRect_Impl: super::super::System::Com::IDispatch_Impl { fn honorPageBreaks(&self) -> windows_core::Result; fn SethonorPageRules(&self, v: super::super::Foundation::VARIANT_BOOL) -> windows_core::Result<()>; fn honorPageRules(&self) -> windows_core::Result; - fn SetnextRectElement(&self, pelem: Option<&super::super::System::Com::IDispatch>) -> windows_core::Result<()>; + fn SetnextRectElement(&self, pelem: windows_core::Ref<'_, super::super::System::Com::IDispatch>) -> windows_core::Result<()>; fn nextRectElement(&self) -> windows_core::Result; fn contentDocument(&self) -> windows_core::Result; } @@ -3126,7 +3126,7 @@ impl ILayoutRect_Vtbl { } unsafe extern "system" fn SetnextRectElement(this: *mut core::ffi::c_void, pelem: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ILayoutRect_Impl::SetnextRectElement(this, windows_core::from_raw_borrowed(&pelem)).into() + ILayoutRect_Impl::SetnextRectElement(this, core::mem::transmute_copy(&pelem)).into() } unsafe extern "system" fn nextRectElement(this: *mut core::ffi::c_void, ppelem: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3472,13 +3472,13 @@ pub struct IOpenServiceActivity_Vtbl { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub trait IOpenServiceActivity_Impl: IOpenService_Impl { - fn Execute(&self, pinput: Option<&IOpenServiceActivityInput>, poutput: Option<&IOpenServiceActivityOutputContext>) -> windows_core::Result<()>; - fn CanExecute(&self, pinput: Option<&IOpenServiceActivityInput>, poutput: Option<&IOpenServiceActivityOutputContext>) -> windows_core::Result; + fn Execute(&self, pinput: windows_core::Ref<'_, IOpenServiceActivityInput>, poutput: windows_core::Ref<'_, IOpenServiceActivityOutputContext>) -> windows_core::Result<()>; + fn CanExecute(&self, pinput: windows_core::Ref<'_, IOpenServiceActivityInput>, poutput: windows_core::Ref<'_, IOpenServiceActivityOutputContext>) -> windows_core::Result; fn CanExecuteType(&self, r#type: OpenServiceActivityContentType) -> windows_core::Result; - fn Preview(&self, pinput: Option<&IOpenServiceActivityInput>, poutput: Option<&IOpenServiceActivityOutputContext>) -> windows_core::Result<()>; - fn CanPreview(&self, pinput: Option<&IOpenServiceActivityInput>, poutput: Option<&IOpenServiceActivityOutputContext>) -> windows_core::Result; + fn Preview(&self, pinput: windows_core::Ref<'_, IOpenServiceActivityInput>, poutput: windows_core::Ref<'_, IOpenServiceActivityOutputContext>) -> windows_core::Result<()>; + fn CanPreview(&self, pinput: windows_core::Ref<'_, IOpenServiceActivityInput>, poutput: windows_core::Ref<'_, IOpenServiceActivityOutputContext>) -> windows_core::Result; fn CanPreviewType(&self, r#type: OpenServiceActivityContentType) -> windows_core::Result; - fn GetStatusText(&self, pinput: Option<&IOpenServiceActivityInput>) -> windows_core::Result; + fn GetStatusText(&self, pinput: windows_core::Ref<'_, IOpenServiceActivityInput>) -> windows_core::Result; fn GetHomepageUrl(&self) -> windows_core::Result; fn GetDisplayName(&self) -> windows_core::Result; fn GetDescription(&self) -> windows_core::Result; @@ -3496,11 +3496,11 @@ impl IOpenServiceActivity_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Execute(this: *mut core::ffi::c_void, pinput: *mut core::ffi::c_void, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpenServiceActivity_Impl::Execute(this, windows_core::from_raw_borrowed(&pinput), windows_core::from_raw_borrowed(&poutput)).into() + IOpenServiceActivity_Impl::Execute(this, core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&poutput)).into() } unsafe extern "system" fn CanExecute(this: *mut core::ffi::c_void, pinput: *mut core::ffi::c_void, poutput: *mut core::ffi::c_void, pfcanexecute: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpenServiceActivity_Impl::CanExecute(this, windows_core::from_raw_borrowed(&pinput), windows_core::from_raw_borrowed(&poutput)) { + match IOpenServiceActivity_Impl::CanExecute(this, core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&poutput)) { Ok(ok__) => { pfcanexecute.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3520,11 +3520,11 @@ impl IOpenServiceActivity_Vtbl { } unsafe extern "system" fn Preview(this: *mut core::ffi::c_void, pinput: *mut core::ffi::c_void, poutput: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpenServiceActivity_Impl::Preview(this, windows_core::from_raw_borrowed(&pinput), windows_core::from_raw_borrowed(&poutput)).into() + IOpenServiceActivity_Impl::Preview(this, core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&poutput)).into() } unsafe extern "system" fn CanPreview(this: *mut core::ffi::c_void, pinput: *mut core::ffi::c_void, poutput: *mut core::ffi::c_void, pfcanpreview: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpenServiceActivity_Impl::CanPreview(this, windows_core::from_raw_borrowed(&pinput), windows_core::from_raw_borrowed(&poutput)) { + match IOpenServiceActivity_Impl::CanPreview(this, core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&poutput)) { Ok(ok__) => { pfcanpreview.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3544,7 +3544,7 @@ impl IOpenServiceActivity_Vtbl { } unsafe extern "system" fn GetStatusText(this: *mut core::ffi::c_void, pinput: *mut core::ffi::c_void, pbstrstatustext: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpenServiceActivity_Impl::GetStatusText(this, windows_core::from_raw_borrowed(&pinput)) { + match IOpenServiceActivity_Impl::GetStatusText(this, core::mem::transmute_copy(&pinput)) { Ok(ok__) => { pbstrstatustext.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -3726,9 +3726,9 @@ pub struct IOpenServiceActivityCategory_Vtbl { pub trait IOpenServiceActivityCategory_Impl: windows_core::IUnknownImpl { fn HasDefaultActivity(&self) -> windows_core::Result; fn GetDefaultActivity(&self) -> windows_core::Result; - fn SetDefaultActivity(&self, pactivity: Option<&IOpenServiceActivity>, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; + fn SetDefaultActivity(&self, pactivity: windows_core::Ref<'_, IOpenServiceActivity>, hwnd: super::super::Foundation::HWND) -> windows_core::Result<()>; fn GetName(&self) -> windows_core::Result; - fn GetActivityEnumerator(&self, pinput: Option<&IOpenServiceActivityInput>, poutput: Option<&IOpenServiceActivityOutputContext>) -> windows_core::Result; + fn GetActivityEnumerator(&self, pinput: windows_core::Ref<'_, IOpenServiceActivityInput>, poutput: windows_core::Ref<'_, IOpenServiceActivityOutputContext>) -> windows_core::Result; } impl IOpenServiceActivityCategory_Vtbl { pub const fn new() -> Self { @@ -3754,7 +3754,7 @@ impl IOpenServiceActivityCategory_Vtbl { } unsafe extern "system" fn SetDefaultActivity(this: *mut core::ffi::c_void, pactivity: *mut core::ffi::c_void, hwnd: super::super::Foundation::HWND) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpenServiceActivityCategory_Impl::SetDefaultActivity(this, windows_core::from_raw_borrowed(&pactivity), core::mem::transmute_copy(&hwnd)).into() + IOpenServiceActivityCategory_Impl::SetDefaultActivity(this, core::mem::transmute_copy(&pactivity), core::mem::transmute_copy(&hwnd)).into() } unsafe extern "system" fn GetName(this: *mut core::ffi::c_void, pbstrname: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -3768,7 +3768,7 @@ impl IOpenServiceActivityCategory_Vtbl { } unsafe extern "system" fn GetActivityEnumerator(this: *mut core::ffi::c_void, pinput: *mut core::ffi::c_void, poutput: *mut core::ffi::c_void, ppenumactivity: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpenServiceActivityCategory_Impl::GetActivityEnumerator(this, windows_core::from_raw_borrowed(&pinput), windows_core::from_raw_borrowed(&poutput)) { + match IOpenServiceActivityCategory_Impl::GetActivityEnumerator(this, core::mem::transmute_copy(&pinput), core::mem::transmute_copy(&poutput)) { Ok(ok__) => { ppenumactivity.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4005,19 +4005,19 @@ pub struct IOpenServiceActivityOutputContext_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IOpenServiceActivityOutputContext_Impl: windows_core::IUnknownImpl { - fn Navigate(&self, pwzuri: &windows_core::PCWSTR, pwzmethod: &windows_core::PCWSTR, pwzheaders: &windows_core::PCWSTR, ppostdata: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; - fn CanNavigate(&self, pwzuri: &windows_core::PCWSTR, pwzmethod: &windows_core::PCWSTR, pwzheaders: &windows_core::PCWSTR, ppostdata: Option<&super::super::System::Com::IStream>) -> windows_core::Result; + fn Navigate(&self, pwzuri: &windows_core::PCWSTR, pwzmethod: &windows_core::PCWSTR, pwzheaders: &windows_core::PCWSTR, ppostdata: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn CanNavigate(&self, pwzuri: &windows_core::PCWSTR, pwzmethod: &windows_core::PCWSTR, pwzheaders: &windows_core::PCWSTR, ppostdata: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] impl IOpenServiceActivityOutputContext_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Navigate(this: *mut core::ffi::c_void, pwzuri: windows_core::PCWSTR, pwzmethod: windows_core::PCWSTR, pwzheaders: windows_core::PCWSTR, ppostdata: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpenServiceActivityOutputContext_Impl::Navigate(this, core::mem::transmute(&pwzuri), core::mem::transmute(&pwzmethod), core::mem::transmute(&pwzheaders), windows_core::from_raw_borrowed(&ppostdata)).into() + IOpenServiceActivityOutputContext_Impl::Navigate(this, core::mem::transmute(&pwzuri), core::mem::transmute(&pwzmethod), core::mem::transmute(&pwzheaders), core::mem::transmute_copy(&ppostdata)).into() } unsafe extern "system" fn CanNavigate(this: *mut core::ffi::c_void, pwzuri: windows_core::PCWSTR, pwzmethod: windows_core::PCWSTR, pwzheaders: windows_core::PCWSTR, ppostdata: *mut core::ffi::c_void, pfcannavigate: *mut super::super::Foundation::BOOL) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IOpenServiceActivityOutputContext_Impl::CanNavigate(this, core::mem::transmute(&pwzuri), core::mem::transmute(&pwzmethod), core::mem::transmute(&pwzheaders), windows_core::from_raw_borrowed(&ppostdata)) { + match IOpenServiceActivityOutputContext_Impl::CanNavigate(this, core::mem::transmute(&pwzuri), core::mem::transmute(&pwzmethod), core::mem::transmute(&pwzheaders), core::mem::transmute_copy(&ppostdata)) { Ok(ok__) => { pfcannavigate.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4070,7 +4070,7 @@ pub struct IOpenServiceManager_Vtbl { } pub trait IOpenServiceManager_Impl: windows_core::IUnknownImpl { fn InstallService(&self, pwzserviceurl: &windows_core::PCWSTR) -> windows_core::Result; - fn UninstallService(&self, pservice: Option<&IOpenService>) -> windows_core::Result<()>; + fn UninstallService(&self, pservice: windows_core::Ref<'_, IOpenService>) -> windows_core::Result<()>; fn GetServiceByID(&self, pwzid: &windows_core::PCWSTR) -> windows_core::Result; } impl IOpenServiceManager_Vtbl { @@ -4087,7 +4087,7 @@ impl IOpenServiceManager_Vtbl { } unsafe extern "system" fn UninstallService(this: *mut core::ffi::c_void, pservice: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IOpenServiceManager_Impl::UninstallService(this, windows_core::from_raw_borrowed(&pservice)).into() + IOpenServiceManager_Impl::UninstallService(this, core::mem::transmute_copy(&pservice)).into() } unsafe extern "system" fn GetServiceByID(this: *mut core::ffi::c_void, pwzid: windows_core::PCWSTR, ppservice: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4180,8 +4180,8 @@ pub struct IPersistHistory_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait IPersistHistory_Impl: super::super::System::Com::IPersist_Impl { - fn LoadHistory(&self, pstream: Option<&super::super::System::Com::IStream>, pbc: Option<&super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; - fn SaveHistory(&self, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn LoadHistory(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>) -> windows_core::Result<()>; + fn SaveHistory(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn SetPositionCookie(&self, dwpositioncookie: u32) -> windows_core::Result<()>; fn GetPositionCookie(&self) -> windows_core::Result; } @@ -4190,11 +4190,11 @@ impl IPersistHistory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn LoadHistory(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void, pbc: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistHistory_Impl::LoadHistory(this, windows_core::from_raw_borrowed(&pstream), windows_core::from_raw_borrowed(&pbc)).into() + IPersistHistory_Impl::LoadHistory(this, core::mem::transmute_copy(&pstream), core::mem::transmute_copy(&pbc)).into() } unsafe extern "system" fn SaveHistory(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPersistHistory_Impl::SaveHistory(this, windows_core::from_raw_borrowed(&pstream)).into() + IPersistHistory_Impl::SaveHistory(this, core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn SetPositionCookie(this: *mut core::ffi::c_void, dwpositioncookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4240,13 +4240,13 @@ pub struct IPrintTaskRequestFactory_Vtbl { pub CreatePrintTaskRequest: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPrintTaskRequestFactory_Impl: windows_core::IUnknownImpl { - fn CreatePrintTaskRequest(&self, pprinttaskrequesthandler: Option<&IPrintTaskRequestHandler>) -> windows_core::Result<()>; + fn CreatePrintTaskRequest(&self, pprinttaskrequesthandler: windows_core::Ref<'_, IPrintTaskRequestHandler>) -> windows_core::Result<()>; } impl IPrintTaskRequestFactory_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreatePrintTaskRequest(this: *mut core::ffi::c_void, pprinttaskrequesthandler: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintTaskRequestFactory_Impl::CreatePrintTaskRequest(this, windows_core::from_raw_borrowed(&pprinttaskrequesthandler)).into() + IPrintTaskRequestFactory_Impl::CreatePrintTaskRequest(this, core::mem::transmute_copy(&pprinttaskrequesthandler)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), CreatePrintTaskRequest: CreatePrintTaskRequest:: } } @@ -4271,13 +4271,13 @@ pub struct IPrintTaskRequestHandler_Vtbl { pub HandlePrintTaskRequest: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait IPrintTaskRequestHandler_Impl: windows_core::IUnknownImpl { - fn HandlePrintTaskRequest(&self, pprinttaskrequest: Option<&windows_core::IInspectable>) -> windows_core::Result<()>; + fn HandlePrintTaskRequest(&self, pprinttaskrequest: windows_core::Ref<'_, windows_core::IInspectable>) -> windows_core::Result<()>; } impl IPrintTaskRequestHandler_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn HandlePrintTaskRequest(this: *mut core::ffi::c_void, pprinttaskrequest: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IPrintTaskRequestHandler_Impl::HandlePrintTaskRequest(this, windows_core::from_raw_borrowed(&pprinttaskrequest)).into() + IPrintTaskRequestHandler_Impl::HandlePrintTaskRequest(this, core::mem::transmute_copy(&pprinttaskrequest)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), HandlePrintTaskRequest: HandlePrintTaskRequest:: } } @@ -4405,7 +4405,7 @@ pub struct ISniffStream_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ISniffStream_Impl: windows_core::IUnknownImpl { - fn Init(&self, pstream: Option<&super::super::System::Com::IStream>) -> windows_core::Result<()>; + fn Init(&self, pstream: windows_core::Ref<'_, super::super::System::Com::IStream>) -> windows_core::Result<()>; fn Peek(&self, pbuffer: *mut core::ffi::c_void, nbytes: u32, pnbytesread: *mut u32) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] @@ -4413,7 +4413,7 @@ impl ISniffStream_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Init(this: *mut core::ffi::c_void, pstream: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ISniffStream_Impl::Init(this, windows_core::from_raw_borrowed(&pstream)).into() + ISniffStream_Impl::Init(this, core::mem::transmute_copy(&pstream)).into() } unsafe extern "system" fn Peek(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void, nbytes: u32, pnbytesread: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -4728,7 +4728,7 @@ pub trait ITargetFrame_Impl: windows_core::IUnknownImpl { fn SetFrameName(&self, pszframename: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetFrameName(&self) -> windows_core::Result; fn GetParentFrame(&self) -> windows_core::Result; - fn FindFrame(&self, psztargetname: &windows_core::PCWSTR, ppunkcontextframe: Option<&windows_core::IUnknown>, dwflags: u32) -> windows_core::Result; + fn FindFrame(&self, psztargetname: &windows_core::PCWSTR, ppunkcontextframe: windows_core::Ref<'_, windows_core::IUnknown>, dwflags: u32) -> windows_core::Result; fn SetFrameSrc(&self, pszframesrc: &windows_core::PCWSTR) -> windows_core::Result<()>; fn GetFrameSrc(&self) -> windows_core::Result; fn GetFramesContainer(&self) -> windows_core::Result; @@ -4737,8 +4737,8 @@ pub trait ITargetFrame_Impl: windows_core::IUnknownImpl { fn SetFrameMargins(&self, dwwidth: u32, dwheight: u32) -> windows_core::Result<()>; fn GetFrameMargins(&self, pdwwidth: *mut u32, pdwheight: *mut u32) -> windows_core::Result<()>; fn RemoteNavigate(&self, clength: u32, puldata: *const u32) -> windows_core::Result<()>; - fn OnChildFrameActivate(&self, punkchildframe: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn OnChildFrameDeactivate(&self, punkchildframe: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnChildFrameActivate(&self, punkchildframe: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnChildFrameDeactivate(&self, punkchildframe: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Ole")] impl ITargetFrame_Vtbl { @@ -4769,7 +4769,7 @@ impl ITargetFrame_Vtbl { } unsafe extern "system" fn FindFrame(this: *mut core::ffi::c_void, psztargetname: windows_core::PCWSTR, ppunkcontextframe: *mut core::ffi::c_void, dwflags: u32, ppunktargetframe: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITargetFrame_Impl::FindFrame(this, core::mem::transmute(&psztargetname), windows_core::from_raw_borrowed(&ppunkcontextframe), core::mem::transmute_copy(&dwflags)) { + match ITargetFrame_Impl::FindFrame(this, core::mem::transmute(&psztargetname), core::mem::transmute_copy(&ppunkcontextframe), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppunktargetframe.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -4829,11 +4829,11 @@ impl ITargetFrame_Vtbl { } unsafe extern "system" fn OnChildFrameActivate(this: *mut core::ffi::c_void, punkchildframe: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITargetFrame_Impl::OnChildFrameActivate(this, windows_core::from_raw_borrowed(&punkchildframe)).into() + ITargetFrame_Impl::OnChildFrameActivate(this, core::mem::transmute_copy(&punkchildframe)).into() } unsafe extern "system" fn OnChildFrameDeactivate(this: *mut core::ffi::c_void, punkchildframe: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITargetFrame_Impl::OnChildFrameDeactivate(this, windows_core::from_raw_borrowed(&punkchildframe)).into() + ITargetFrame_Impl::OnChildFrameDeactivate(this, core::mem::transmute_copy(&punkchildframe)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5130,10 +5130,10 @@ pub struct ITargetFramePriv_Vtbl { #[cfg(feature = "Win32_System_Com")] pub trait ITargetFramePriv_Impl: windows_core::IUnknownImpl { fn FindFrameDownwards(&self, psztargetname: &windows_core::PCWSTR, dwflags: u32) -> windows_core::Result; - fn FindFrameInContext(&self, psztargetname: &windows_core::PCWSTR, punkcontextframe: Option<&windows_core::IUnknown>, dwflags: u32) -> windows_core::Result; - fn OnChildFrameActivate(&self, punkchildframe: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn OnChildFrameDeactivate(&self, punkchildframe: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn NavigateHack(&self, grfhlnf: u32, pbc: Option<&super::super::System::Com::IBindCtx>, pibsc: Option<&super::super::System::Com::IBindStatusCallback>, psztargetname: &windows_core::PCWSTR, pszurl: &windows_core::PCWSTR, pszlocation: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn FindFrameInContext(&self, psztargetname: &windows_core::PCWSTR, punkcontextframe: windows_core::Ref<'_, windows_core::IUnknown>, dwflags: u32) -> windows_core::Result; + fn OnChildFrameActivate(&self, punkchildframe: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnChildFrameDeactivate(&self, punkchildframe: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn NavigateHack(&self, grfhlnf: u32, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, pibsc: windows_core::Ref<'_, super::super::System::Com::IBindStatusCallback>, psztargetname: &windows_core::PCWSTR, pszurl: &windows_core::PCWSTR, pszlocation: &windows_core::PCWSTR) -> windows_core::Result<()>; fn FindBrowserByIndex(&self, dwid: u32) -> windows_core::Result; } #[cfg(feature = "Win32_System_Com")] @@ -5151,7 +5151,7 @@ impl ITargetFramePriv_Vtbl { } unsafe extern "system" fn FindFrameInContext(this: *mut core::ffi::c_void, psztargetname: windows_core::PCWSTR, punkcontextframe: *mut core::ffi::c_void, dwflags: u32, ppunktargetframe: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITargetFramePriv_Impl::FindFrameInContext(this, core::mem::transmute(&psztargetname), windows_core::from_raw_borrowed(&punkcontextframe), core::mem::transmute_copy(&dwflags)) { + match ITargetFramePriv_Impl::FindFrameInContext(this, core::mem::transmute(&psztargetname), core::mem::transmute_copy(&punkcontextframe), core::mem::transmute_copy(&dwflags)) { Ok(ok__) => { ppunktargetframe.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5161,15 +5161,15 @@ impl ITargetFramePriv_Vtbl { } unsafe extern "system" fn OnChildFrameActivate(this: *mut core::ffi::c_void, punkchildframe: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITargetFramePriv_Impl::OnChildFrameActivate(this, windows_core::from_raw_borrowed(&punkchildframe)).into() + ITargetFramePriv_Impl::OnChildFrameActivate(this, core::mem::transmute_copy(&punkchildframe)).into() } unsafe extern "system" fn OnChildFrameDeactivate(this: *mut core::ffi::c_void, punkchildframe: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITargetFramePriv_Impl::OnChildFrameDeactivate(this, windows_core::from_raw_borrowed(&punkchildframe)).into() + ITargetFramePriv_Impl::OnChildFrameDeactivate(this, core::mem::transmute_copy(&punkchildframe)).into() } unsafe extern "system" fn NavigateHack(this: *mut core::ffi::c_void, grfhlnf: u32, pbc: *mut core::ffi::c_void, pibsc: *mut core::ffi::c_void, psztargetname: windows_core::PCWSTR, pszurl: windows_core::PCWSTR, pszlocation: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITargetFramePriv_Impl::NavigateHack(this, core::mem::transmute_copy(&grfhlnf), windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pibsc), core::mem::transmute(&psztargetname), core::mem::transmute(&pszurl), core::mem::transmute(&pszlocation)).into() + ITargetFramePriv_Impl::NavigateHack(this, core::mem::transmute_copy(&grfhlnf), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pibsc), core::mem::transmute(&psztargetname), core::mem::transmute(&pszurl), core::mem::transmute(&pszlocation)).into() } unsafe extern "system" fn FindBrowserByIndex(this: *mut core::ffi::c_void, dwid: u32, ppunkbrowser: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5228,14 +5228,14 @@ pub struct ITargetFramePriv2_Vtbl { } #[cfg(feature = "Win32_System_Com")] pub trait ITargetFramePriv2_Impl: ITargetFramePriv_Impl { - fn AggregatedNavigation2(&self, grfhlnf: u32, pbc: Option<&super::super::System::Com::IBindCtx>, pibsc: Option<&super::super::System::Com::IBindStatusCallback>, psztargetname: &windows_core::PCWSTR, puri: Option<&super::super::System::Com::IUri>, pszlocation: &windows_core::PCWSTR) -> windows_core::Result<()>; + fn AggregatedNavigation2(&self, grfhlnf: u32, pbc: windows_core::Ref<'_, super::super::System::Com::IBindCtx>, pibsc: windows_core::Ref<'_, super::super::System::Com::IBindStatusCallback>, psztargetname: &windows_core::PCWSTR, puri: windows_core::Ref<'_, super::super::System::Com::IUri>, pszlocation: &windows_core::PCWSTR) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Com")] impl ITargetFramePriv2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AggregatedNavigation2(this: *mut core::ffi::c_void, grfhlnf: u32, pbc: *mut core::ffi::c_void, pibsc: *mut core::ffi::c_void, psztargetname: windows_core::PCWSTR, puri: *mut core::ffi::c_void, pszlocation: windows_core::PCWSTR) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITargetFramePriv2_Impl::AggregatedNavigation2(this, core::mem::transmute_copy(&grfhlnf), windows_core::from_raw_borrowed(&pbc), windows_core::from_raw_borrowed(&pibsc), core::mem::transmute(&psztargetname), windows_core::from_raw_borrowed(&puri), core::mem::transmute(&pszlocation)).into() + ITargetFramePriv2_Impl::AggregatedNavigation2(this, core::mem::transmute_copy(&grfhlnf), core::mem::transmute_copy(&pbc), core::mem::transmute_copy(&pibsc), core::mem::transmute(&psztargetname), core::mem::transmute_copy(&puri), core::mem::transmute(&pszlocation)).into() } Self { base__: ITargetFramePriv_Vtbl::new::(), AggregatedNavigation2: AggregatedNavigation2:: } } @@ -5268,18 +5268,18 @@ pub struct ITargetNotify_Vtbl { pub OnReuse: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITargetNotify_Impl: windows_core::IUnknownImpl { - fn OnCreate(&self, punkdestination: Option<&windows_core::IUnknown>, cbcookie: u32) -> windows_core::Result<()>; - fn OnReuse(&self, punkdestination: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn OnCreate(&self, punkdestination: windows_core::Ref<'_, windows_core::IUnknown>, cbcookie: u32) -> windows_core::Result<()>; + fn OnReuse(&self, punkdestination: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } impl ITargetNotify_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn OnCreate(this: *mut core::ffi::c_void, punkdestination: *mut core::ffi::c_void, cbcookie: u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITargetNotify_Impl::OnCreate(this, windows_core::from_raw_borrowed(&punkdestination), core::mem::transmute_copy(&cbcookie)).into() + ITargetNotify_Impl::OnCreate(this, core::mem::transmute_copy(&punkdestination), core::mem::transmute_copy(&cbcookie)).into() } unsafe extern "system" fn OnReuse(this: *mut core::ffi::c_void, punkdestination: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITargetNotify_Impl::OnReuse(this, windows_core::from_raw_borrowed(&punkdestination)).into() + ITargetNotify_Impl::OnReuse(this, core::mem::transmute_copy(&punkdestination)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), OnCreate: OnCreate::, OnReuse: OnReuse:: } } @@ -5361,7 +5361,7 @@ pub struct ITimer_Vtbl { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub trait ITimer_Impl: windows_core::IUnknownImpl { - fn Advise(&self, vtimemin: &super::super::System::Variant::VARIANT, vtimemax: &super::super::System::Variant::VARIANT, vtimeinterval: &super::super::System::Variant::VARIANT, dwflags: u32, ptimersink: Option<&ITimerSink>) -> windows_core::Result; + fn Advise(&self, vtimemin: &super::super::System::Variant::VARIANT, vtimemax: &super::super::System::Variant::VARIANT, vtimeinterval: &super::super::System::Variant::VARIANT, dwflags: u32, ptimersink: windows_core::Ref<'_, ITimerSink>) -> windows_core::Result; fn Unadvise(&self, dwcookie: u32) -> windows_core::Result<()>; fn Freeze(&self, ffreeze: super::super::Foundation::BOOL) -> windows_core::Result<()>; fn GetTime(&self) -> windows_core::Result; @@ -5371,7 +5371,7 @@ impl ITimer_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn Advise(this: *mut core::ffi::c_void, vtimemin: super::super::System::Variant::VARIANT, vtimemax: super::super::System::Variant::VARIANT, vtimeinterval: super::super::System::Variant::VARIANT, dwflags: u32, ptimersink: *mut core::ffi::c_void, pdwcookie: *mut u32) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITimer_Impl::Advise(this, core::mem::transmute(&vtimemin), core::mem::transmute(&vtimemax), core::mem::transmute(&vtimeinterval), core::mem::transmute_copy(&dwflags), windows_core::from_raw_borrowed(&ptimersink)) { + match ITimer_Impl::Advise(this, core::mem::transmute(&vtimemin), core::mem::transmute(&vtimemax), core::mem::transmute(&vtimeinterval), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&ptimersink)) { Ok(ok__) => { pdwcookie.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5477,15 +5477,15 @@ pub struct ITimerService_Vtbl { pub SetNamedTimerReference: unsafe extern "system" fn(*mut core::ffi::c_void, *const windows_core::GUID, *mut core::ffi::c_void) -> windows_core::HRESULT, } pub trait ITimerService_Impl: windows_core::IUnknownImpl { - fn CreateTimer(&self, preferencetimer: Option<&ITimer>) -> windows_core::Result; + fn CreateTimer(&self, preferencetimer: windows_core::Ref<'_, ITimer>) -> windows_core::Result; fn GetNamedTimer(&self, rguidname: *const windows_core::GUID) -> windows_core::Result; - fn SetNamedTimerReference(&self, rguidname: *const windows_core::GUID, preferencetimer: Option<&ITimer>) -> windows_core::Result<()>; + fn SetNamedTimerReference(&self, rguidname: *const windows_core::GUID, preferencetimer: windows_core::Ref<'_, ITimer>) -> windows_core::Result<()>; } impl ITimerService_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn CreateTimer(this: *mut core::ffi::c_void, preferencetimer: *mut core::ffi::c_void, ppnewtimer: *mut *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match ITimerService_Impl::CreateTimer(this, windows_core::from_raw_borrowed(&preferencetimer)) { + match ITimerService_Impl::CreateTimer(this, core::mem::transmute_copy(&preferencetimer)) { Ok(ok__) => { ppnewtimer.write(core::mem::transmute(ok__)); windows_core::HRESULT(0) @@ -5505,7 +5505,7 @@ impl ITimerService_Vtbl { } unsafe extern "system" fn SetNamedTimerReference(this: *mut core::ffi::c_void, rguidname: *const windows_core::GUID, preferencetimer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITimerService_Impl::SetNamedTimerReference(this, core::mem::transmute_copy(&rguidname), windows_core::from_raw_borrowed(&preferencetimer)).into() + ITimerService_Impl::SetNamedTimerReference(this, core::mem::transmute_copy(&rguidname), core::mem::transmute_copy(&preferencetimer)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -5774,7 +5774,7 @@ pub struct IUrlHistoryStg2_Vtbl { } #[cfg(feature = "Win32_System_Ole")] pub trait IUrlHistoryStg2_Impl: IUrlHistoryStg_Impl { - fn AddUrlAndNotify(&self, pocsurl: &windows_core::PCWSTR, pocstitle: &windows_core::PCWSTR, dwflags: u32, fwritehistory: super::super::Foundation::BOOL, poctnotify: Option<&super::super::System::Ole::IOleCommandTarget>, punkisfolder: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn AddUrlAndNotify(&self, pocsurl: &windows_core::PCWSTR, pocstitle: &windows_core::PCWSTR, dwflags: u32, fwritehistory: super::super::Foundation::BOOL, poctnotify: windows_core::Ref<'_, super::super::System::Ole::IOleCommandTarget>, punkisfolder: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; fn ClearHistory(&self) -> windows_core::Result<()>; } #[cfg(feature = "Win32_System_Ole")] @@ -5782,7 +5782,7 @@ impl IUrlHistoryStg2_Vtbl { pub const fn new() -> Self { unsafe extern "system" fn AddUrlAndNotify(this: *mut core::ffi::c_void, pocsurl: windows_core::PCWSTR, pocstitle: windows_core::PCWSTR, dwflags: u32, fwritehistory: super::super::Foundation::BOOL, poctnotify: *mut core::ffi::c_void, punkisfolder: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IUrlHistoryStg2_Impl::AddUrlAndNotify(this, core::mem::transmute(&pocsurl), core::mem::transmute(&pocstitle), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&fwritehistory), windows_core::from_raw_borrowed(&poctnotify), windows_core::from_raw_borrowed(&punkisfolder)).into() + IUrlHistoryStg2_Impl::AddUrlAndNotify(this, core::mem::transmute(&pocsurl), core::mem::transmute(&pocstitle), core::mem::transmute_copy(&dwflags), core::mem::transmute_copy(&fwritehistory), core::mem::transmute_copy(&poctnotify), core::mem::transmute_copy(&punkisfolder)).into() } unsafe extern "system" fn ClearHistory(this: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); @@ -5828,8 +5828,8 @@ pub struct IViewObjectPresentFlip_Vtbl { } pub trait IViewObjectPresentFlip_Impl: windows_core::IUnknownImpl { fn NotifyRender(&self, frecreatepresenter: super::super::Foundation::BOOL) -> windows_core::Result<()>; - fn RenderObjectToBitmap(&self, pbitmap: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; - fn RenderObjectToSharedBuffer(&self, pbuffer: Option<&ISurfacePresenterFlipBuffer>) -> windows_core::Result<()>; + fn RenderObjectToBitmap(&self, pbitmap: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; + fn RenderObjectToSharedBuffer(&self, pbuffer: windows_core::Ref<'_, ISurfacePresenterFlipBuffer>) -> windows_core::Result<()>; } impl IViewObjectPresentFlip_Vtbl { pub const fn new() -> Self { @@ -5839,11 +5839,11 @@ impl IViewObjectPresentFlip_Vtbl { } unsafe extern "system" fn RenderObjectToBitmap(this: *mut core::ffi::c_void, pbitmap: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IViewObjectPresentFlip_Impl::RenderObjectToBitmap(this, windows_core::from_raw_borrowed(&pbitmap)).into() + IViewObjectPresentFlip_Impl::RenderObjectToBitmap(this, core::mem::transmute_copy(&pbitmap)).into() } unsafe extern "system" fn RenderObjectToSharedBuffer(this: *mut core::ffi::c_void, pbuffer: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IViewObjectPresentFlip_Impl::RenderObjectToSharedBuffer(this, windows_core::from_raw_borrowed(&pbuffer)).into() + IViewObjectPresentFlip_Impl::RenderObjectToSharedBuffer(this, core::mem::transmute_copy(&pbuffer)).into() } Self { base__: windows_core::IUnknown_Vtbl::new::(), @@ -6203,7 +6203,7 @@ pub struct Iwfolders_Vtbl { pub trait Iwfolders_Impl: super::super::System::Com::IDispatch_Impl { fn navigate(&self, bstrurl: &windows_core::BSTR) -> windows_core::Result; fn navigateFrame(&self, bstrurl: &windows_core::BSTR, bstrtargetframe: &windows_core::BSTR) -> windows_core::Result; - fn navigateNoSite(&self, bstrurl: &windows_core::BSTR, bstrtargetframe: &windows_core::BSTR, dwhwnd: u32, pwb: Option<&windows_core::IUnknown>) -> windows_core::Result<()>; + fn navigateNoSite(&self, bstrurl: &windows_core::BSTR, bstrtargetframe: &windows_core::BSTR, dwhwnd: u32, pwb: windows_core::Ref<'_, windows_core::IUnknown>) -> windows_core::Result<()>; } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] impl Iwfolders_Vtbl { @@ -6230,7 +6230,7 @@ impl Iwfolders_Vtbl { } unsafe extern "system" fn navigateNoSite(this: *mut core::ffi::c_void, bstrurl: *mut core::ffi::c_void, bstrtargetframe: *mut core::ffi::c_void, dwhwnd: u32, pwb: *mut core::ffi::c_void) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - Iwfolders_Impl::navigateNoSite(this, core::mem::transmute(&bstrurl), core::mem::transmute(&bstrtargetframe), core::mem::transmute_copy(&dwhwnd), windows_core::from_raw_borrowed(&pwb)).into() + Iwfolders_Impl::navigateNoSite(this, core::mem::transmute(&bstrurl), core::mem::transmute(&bstrtargetframe), core::mem::transmute_copy(&dwhwnd), core::mem::transmute_copy(&pwb)).into() } Self { base__: super::super::System::Com::IDispatch_Vtbl::new::(), From fa584200a7b8d9113a814fba522439aac61d625c Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Thu, 12 Dec 2024 13:08:41 -0600 Subject: [PATCH 4/5] tests --- crates/samples/windows/bits/src/main.rs | 8 +- crates/samples/windows/core_app/src/main.rs | 4 +- crates/tests/bindgen/src/delegate_generic.rs | 8 +- crates/tests/bindgen/src/lib.rs | 1 + crates/tests/bindgen/src/ref_params.rs | 1203 +++++++++++++++++ ...erence_async_action_reference_namespace.rs | 4 +- .../bindgen/src/struct_with_cpp_interface.rs | 4 +- crates/tests/bindgen/tests/ref_params.rs | 65 + crates/tests/misc/component/src/bindings.rs | 16 +- crates/tests/misc/component/src/lib.rs | 16 +- .../implement/tests/as_interface_param.rs | 2 +- .../misc/implement/tests/class_factory.rs | 4 +- .../tests/misc/implement/tests/com_chain.rs | 4 +- .../tests/misc/implement/tests/data_object.rs | 2 +- .../tests/misc/implement/tests/drop_target.rs | 13 +- .../misc/implement/tests/from_raw_borrowed.rs | 4 +- .../tests/from_raw_borrowed_winrt.rs | 16 +- crates/tests/misc/implement/tests/map.rs | 4 +- .../tests/misc/implement/tests/properties.rs | 2 +- .../tests/winrt/constructors/src/bindings.rs | 12 +- crates/tests/winrt/constructors/src/lib.rs | 14 +- crates/tests/winrt/events/src/bindings.rs | 4 +- crates/tests/winrt/events/src/lib.rs | 2 +- crates/tests/winrt/noexcept/src/bindings.rs | 16 +- crates/tests/winrt/noexcept/tests/test.rs | 8 +- crates/tests/winrt/ref_params/Cargo.toml | 21 + crates/tests/winrt/ref_params/build.rs | 60 + crates/tests/winrt/ref_params/src/bindings.rs | 151 +++ crates/tests/winrt/ref_params/src/interop.cpp | 78 ++ crates/tests/winrt/ref_params/src/lib.rs | 25 + crates/tests/winrt/ref_params/src/test.idl | 10 + crates/tests/winrt/ref_params/tests/test.rs | 56 + crates/tests/winrt/reference/src/bindings.rs | 4 +- crates/tests/winrt/reference/src/lib.rs | 2 +- crates/tools/bindgen/src/main.rs | 3 + 35 files changed, 1756 insertions(+), 90 deletions(-) create mode 100644 crates/tests/bindgen/src/ref_params.rs create mode 100644 crates/tests/bindgen/tests/ref_params.rs create mode 100644 crates/tests/winrt/ref_params/Cargo.toml create mode 100644 crates/tests/winrt/ref_params/build.rs create mode 100644 crates/tests/winrt/ref_params/src/bindings.rs create mode 100644 crates/tests/winrt/ref_params/src/interop.cpp create mode 100644 crates/tests/winrt/ref_params/src/lib.rs create mode 100644 crates/tests/winrt/ref_params/src/test.idl create mode 100644 crates/tests/winrt/ref_params/tests/test.rs diff --git a/crates/samples/windows/bits/src/main.rs b/crates/samples/windows/bits/src/main.rs index 601f845951..6f11b745d7 100644 --- a/crates/samples/windows/bits/src/main.rs +++ b/crates/samples/windows/bits/src/main.rs @@ -39,7 +39,7 @@ fn main() -> Result<()> { struct Callback; impl IBackgroundCopyCallback_Impl for Callback_Impl { - fn JobTransferred(&self, job: Option<&IBackgroundCopyJob>) -> Result<()> { + fn JobTransferred(&self, job: Ref) -> Result<()> { let job = job.unwrap(); unsafe { job.Complete()? }; println!("done"); @@ -48,8 +48,8 @@ impl IBackgroundCopyCallback_Impl for Callback_Impl { fn JobError( &self, - job: Option<&IBackgroundCopyJob>, - error: Option<&IBackgroundCopyError>, + job: Ref, + error: Ref, ) -> Result<()> { let job = job.unwrap(); let error = error.unwrap(); @@ -60,7 +60,7 @@ impl IBackgroundCopyCallback_Impl for Callback_Impl { std::process::exit(0); } - fn JobModification(&self, _: Option<&IBackgroundCopyJob>, _: u32) -> Result<()> { + fn JobModification(&self, _: Ref, _: u32) -> Result<()> { Ok(()) } } diff --git a/crates/samples/windows/core_app/src/main.rs b/crates/samples/windows/core_app/src/main.rs index d8c6bf58d5..ebab819b24 100644 --- a/crates/samples/windows/core_app/src/main.rs +++ b/crates/samples/windows/core_app/src/main.rs @@ -25,7 +25,7 @@ struct CoreAppView(); #[allow(non_snake_case)] impl IFrameworkView_Impl for CoreAppView_Impl { - fn Initialize(&self, _: Option<&CoreApplicationView>) -> Result<()> { + fn Initialize(&self, _: Ref) -> Result<()> { Ok(()) } @@ -47,7 +47,7 @@ impl IFrameworkView_Impl for CoreAppView_Impl { Ok(()) } - fn SetWindow(&self, _: Option<&CoreWindow>) -> Result<()> { + fn SetWindow(&self, _: Ref) -> Result<()> { Ok(()) } } diff --git a/crates/tests/bindgen/src/delegate_generic.rs b/crates/tests/bindgen/src/delegate_generic.rs index 0b64d43f2f..8b336dadb6 100644 --- a/crates/tests/bindgen/src/delegate_generic.rs +++ b/crates/tests/bindgen/src/delegate_generic.rs @@ -26,7 +26,7 @@ impl windows_core::RuntimeType for Event impl EventHandler { pub fn new< F: FnMut( - Option<&windows_core::IInspectable>, + windows_core::Ref<'_, windows_core::IInspectable>, &>::Default, ) -> windows_core::Result<()> + Send @@ -74,7 +74,7 @@ where struct EventHandlerBox< T, F: FnMut( - Option<&windows_core::IInspectable>, + windows_core::Ref<'_, windows_core::IInspectable>, &>::Default, ) -> windows_core::Result<()> + Send @@ -89,7 +89,7 @@ struct EventHandlerBox< impl< T: windows_core::RuntimeType + 'static, F: FnMut( - Option<&windows_core::IInspectable>, + windows_core::Ref<'_, windows_core::IInspectable>, &>::Default, ) -> windows_core::Result<()> + Send @@ -148,7 +148,7 @@ impl< ) -> windows_core::HRESULT { let this = &mut *(this as *mut *mut core::ffi::c_void as *mut Self); (this.invoke)( - windows_core::from_raw_borrowed(&sender), + core::mem::transmute_copy(&sender), core::mem::transmute(&args), ) .into() diff --git a/crates/tests/bindgen/src/lib.rs b/crates/tests/bindgen/src/lib.rs index f91fef82e1..6850e70cf6 100644 --- a/crates/tests/bindgen/src/lib.rs +++ b/crates/tests/bindgen/src/lib.rs @@ -61,6 +61,7 @@ pub mod interface_sys; pub mod interface_sys_no_core; pub mod multi; pub mod multi_sys; +pub mod ref_params; pub mod reference_async_action; pub mod reference_async_action_reference_namespace; pub mod reference_async_action_reference_type; diff --git a/crates/tests/bindgen/src/ref_params.rs b/crates/tests/bindgen/src/ref_params.rs new file mode 100644 index 0000000000..71015816b2 --- /dev/null +++ b/crates/tests/bindgen/src/ref_params.rs @@ -0,0 +1,1203 @@ +#![allow( + non_snake_case, + non_upper_case_globals, + non_camel_case_types, + dead_code, + clippy::all +)] + +windows_core::imp::define_interface!( + IDynamicConceptProviderConcept, + IDynamicConceptProviderConcept_Vtbl, + 0x95a7f7dd_602e_483f_9d06_a15c0ee13174 +); +windows_core::imp::interface_hierarchy!(IDynamicConceptProviderConcept, windows_core::IUnknown); +impl IDynamicConceptProviderConcept { + pub unsafe fn GetConcept( + &self, + contextobject: P0, + conceptid: *const windows_core::GUID, + conceptinterface: *mut Option, + conceptmetadata: Option<*mut Option>, + hasconcept: *mut bool, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).GetConcept)( + windows_core::Interface::as_raw(self), + contextobject.param().abi(), + conceptid, + core::mem::transmute(conceptinterface), + core::mem::transmute(conceptmetadata.unwrap_or(core::mem::zeroed())), + core::mem::transmute(hasconcept), + ) + .ok() + } + pub unsafe fn SetConcept( + &self, + contextobject: P0, + conceptid: *const windows_core::GUID, + conceptinterface: P2, + conceptmetadata: P3, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + P2: windows_core::Param, + P3: windows_core::Param, + { + (windows_core::Interface::vtable(self).SetConcept)( + windows_core::Interface::as_raw(self), + contextobject.param().abi(), + conceptid, + conceptinterface.param().abi(), + conceptmetadata.param().abi(), + ) + .ok() + } + pub unsafe fn NotifyParent(&self, parentmodel: P0) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).NotifyParent)( + windows_core::Interface::as_raw(self), + parentmodel.param().abi(), + ) + .ok() + } + pub unsafe fn NotifyParentChange(&self, parentmodel: P0) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).NotifyParentChange)( + windows_core::Interface::as_raw(self), + parentmodel.param().abi(), + ) + .ok() + } + pub unsafe fn NotifyDestruct(&self) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).NotifyDestruct)(windows_core::Interface::as_raw( + self, + )) + .ok() + } +} +#[repr(C)] +pub struct IDynamicConceptProviderConcept_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetConcept: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *const windows_core::GUID, + *mut *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + *mut bool, + ) -> windows_core::HRESULT, + pub SetConcept: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *const windows_core::GUID, + *mut core::ffi::c_void, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub NotifyParent: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub NotifyParentChange: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub NotifyDestruct: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, +} +pub trait IDynamicConceptProviderConcept_Impl: windows_core::IUnknownImpl { + fn GetConcept( + &self, + contextobject: windows_core::Ref<'_, IModelObject>, + conceptid: *const windows_core::GUID, + conceptinterface: windows_core::OutRef<'_, windows_core::IUnknown>, + conceptmetadata: windows_core::OutRef<'_, IKeyStore>, + hasconcept: *mut bool, + ) -> windows_core::Result<()>; + fn SetConcept( + &self, + contextobject: windows_core::Ref<'_, IModelObject>, + conceptid: *const windows_core::GUID, + conceptinterface: windows_core::Ref<'_, windows_core::IUnknown>, + conceptmetadata: windows_core::Ref<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn NotifyParent( + &self, + parentmodel: windows_core::Ref<'_, IModelObject>, + ) -> windows_core::Result<()>; + fn NotifyParentChange( + &self, + parentmodel: windows_core::Ref<'_, IModelObject>, + ) -> windows_core::Result<()>; + fn NotifyDestruct(&self) -> windows_core::Result<()>; +} +impl IDynamicConceptProviderConcept_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetConcept< + Identity: IDynamicConceptProviderConcept_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + contextobject: *mut core::ffi::c_void, + conceptid: *const windows_core::GUID, + conceptinterface: *mut *mut core::ffi::c_void, + conceptmetadata: *mut *mut core::ffi::c_void, + hasconcept: *mut bool, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IDynamicConceptProviderConcept_Impl::GetConcept( + this, + core::mem::transmute_copy(&contextobject), + core::mem::transmute_copy(&conceptid), + core::mem::transmute_copy(&conceptinterface), + core::mem::transmute_copy(&conceptmetadata), + core::mem::transmute_copy(&hasconcept), + ) + .into() + } + unsafe extern "system" fn SetConcept< + Identity: IDynamicConceptProviderConcept_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + contextobject: *mut core::ffi::c_void, + conceptid: *const windows_core::GUID, + conceptinterface: *mut core::ffi::c_void, + conceptmetadata: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IDynamicConceptProviderConcept_Impl::SetConcept( + this, + core::mem::transmute_copy(&contextobject), + core::mem::transmute_copy(&conceptid), + core::mem::transmute_copy(&conceptinterface), + core::mem::transmute_copy(&conceptmetadata), + ) + .into() + } + unsafe extern "system" fn NotifyParent< + Identity: IDynamicConceptProviderConcept_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + parentmodel: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IDynamicConceptProviderConcept_Impl::NotifyParent( + this, + core::mem::transmute_copy(&parentmodel), + ) + .into() + } + unsafe extern "system" fn NotifyParentChange< + Identity: IDynamicConceptProviderConcept_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + parentmodel: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IDynamicConceptProviderConcept_Impl::NotifyParentChange( + this, + core::mem::transmute_copy(&parentmodel), + ) + .into() + } + unsafe extern "system" fn NotifyDestruct< + Identity: IDynamicConceptProviderConcept_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IDynamicConceptProviderConcept_Impl::NotifyDestruct(this).into() + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetConcept: GetConcept::, + SetConcept: SetConcept::, + NotifyParent: NotifyParent::, + NotifyParentChange: NotifyParentChange::, + NotifyDestruct: NotifyDestruct::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IDynamicConceptProviderConcept {} +windows_core::imp::define_interface!( + IKeyStore, + IKeyStore_Vtbl, + 0x0fc7557d_401d_4fca_9365_da1e9850697c +); +windows_core::imp::interface_hierarchy!(IKeyStore, windows_core::IUnknown); +impl IKeyStore { + pub unsafe fn GetKey( + &self, + key: P0, + object: Option<*mut Option>, + metadata: Option<*mut Option>, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).GetKey)( + windows_core::Interface::as_raw(self), + key.param().abi(), + core::mem::transmute(object.unwrap_or(core::mem::zeroed())), + core::mem::transmute(metadata.unwrap_or(core::mem::zeroed())), + ) + .ok() + } + pub unsafe fn SetKey( + &self, + key: P0, + object: P1, + metadata: P2, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + P1: windows_core::Param, + P2: windows_core::Param, + { + (windows_core::Interface::vtable(self).SetKey)( + windows_core::Interface::as_raw(self), + key.param().abi(), + object.param().abi(), + metadata.param().abi(), + ) + .ok() + } + pub unsafe fn GetKeyValue( + &self, + key: P0, + object: Option<*mut Option>, + metadata: Option<*mut Option>, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).GetKeyValue)( + windows_core::Interface::as_raw(self), + key.param().abi(), + core::mem::transmute(object.unwrap_or(core::mem::zeroed())), + core::mem::transmute(metadata.unwrap_or(core::mem::zeroed())), + ) + .ok() + } + pub unsafe fn SetKeyValue(&self, key: P0, object: P1) -> windows_core::Result<()> + where + P0: windows_core::Param, + P1: windows_core::Param, + { + (windows_core::Interface::vtable(self).SetKeyValue)( + windows_core::Interface::as_raw(self), + key.param().abi(), + object.param().abi(), + ) + .ok() + } + pub unsafe fn ClearKeys(&self) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ClearKeys)(windows_core::Interface::as_raw(self)) + .ok() + } +} +#[repr(C)] +pub struct IKeyStore_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + pub GetKey: unsafe extern "system" fn( + *mut core::ffi::c_void, + windows_core::PCWSTR, + *mut *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub SetKey: unsafe extern "system" fn( + *mut core::ffi::c_void, + windows_core::PCWSTR, + *mut core::ffi::c_void, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub GetKeyValue: unsafe extern "system" fn( + *mut core::ffi::c_void, + windows_core::PCWSTR, + *mut *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub SetKeyValue: unsafe extern "system" fn( + *mut core::ffi::c_void, + windows_core::PCWSTR, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub ClearKeys: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, +} +pub trait IKeyStore_Impl: windows_core::IUnknownImpl { + fn GetKey( + &self, + key: &windows_core::PCWSTR, + object: windows_core::OutRef<'_, IModelObject>, + metadata: windows_core::OutRef<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn SetKey( + &self, + key: &windows_core::PCWSTR, + object: windows_core::Ref<'_, IModelObject>, + metadata: windows_core::Ref<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn GetKeyValue( + &self, + key: &windows_core::PCWSTR, + object: windows_core::OutRef<'_, IModelObject>, + metadata: windows_core::OutRef<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn SetKeyValue( + &self, + key: &windows_core::PCWSTR, + object: windows_core::Ref<'_, IModelObject>, + ) -> windows_core::Result<()>; + fn ClearKeys(&self) -> windows_core::Result<()>; +} +impl IKeyStore_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetKey( + this: *mut core::ffi::c_void, + key: windows_core::PCWSTR, + object: *mut *mut core::ffi::c_void, + metadata: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKeyStore_Impl::GetKey( + this, + core::mem::transmute(&key), + core::mem::transmute_copy(&object), + core::mem::transmute_copy(&metadata), + ) + .into() + } + unsafe extern "system" fn SetKey( + this: *mut core::ffi::c_void, + key: windows_core::PCWSTR, + object: *mut core::ffi::c_void, + metadata: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKeyStore_Impl::SetKey( + this, + core::mem::transmute(&key), + core::mem::transmute_copy(&object), + core::mem::transmute_copy(&metadata), + ) + .into() + } + unsafe extern "system" fn GetKeyValue( + this: *mut core::ffi::c_void, + key: windows_core::PCWSTR, + object: *mut *mut core::ffi::c_void, + metadata: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKeyStore_Impl::GetKeyValue( + this, + core::mem::transmute(&key), + core::mem::transmute_copy(&object), + core::mem::transmute_copy(&metadata), + ) + .into() + } + unsafe extern "system" fn SetKeyValue( + this: *mut core::ffi::c_void, + key: windows_core::PCWSTR, + object: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKeyStore_Impl::SetKeyValue( + this, + core::mem::transmute(&key), + core::mem::transmute_copy(&object), + ) + .into() + } + unsafe extern "system" fn ClearKeys( + this: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IKeyStore_Impl::ClearKeys(this).into() + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetKey: GetKey::, + SetKey: SetKey::, + GetKeyValue: GetKeyValue::, + SetKeyValue: SetKeyValue::, + ClearKeys: ClearKeys::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IKeyStore {} +windows_core::imp::define_interface!( + IModelObject, + IModelObject_Vtbl, + 0xe28c7893_3f4b_4b96_baca_293cdc55f45d +); +windows_core::imp::interface_hierarchy!(IModelObject, windows_core::IUnknown); +impl IModelObject { + pub unsafe fn GetKeyValue( + &self, + key: P0, + object: Option<*mut Option>, + metadata: Option<*mut Option>, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).GetKeyValue)( + windows_core::Interface::as_raw(self), + key.param().abi(), + core::mem::transmute(object.unwrap_or(core::mem::zeroed())), + core::mem::transmute(metadata.unwrap_or(core::mem::zeroed())), + ) + .ok() + } + pub unsafe fn SetKeyValue(&self, key: P0, object: P1) -> windows_core::Result<()> + where + P0: windows_core::Param, + P1: windows_core::Param, + { + (windows_core::Interface::vtable(self).SetKeyValue)( + windows_core::Interface::as_raw(self), + key.param().abi(), + object.param().abi(), + ) + .ok() + } + pub unsafe fn Dereference(&self) -> windows_core::Result { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).Dereference)( + windows_core::Interface::as_raw(self), + &mut result__, + ) + .and_then(|| windows_core::Type::from_abi(result__)) + } + pub unsafe fn TryCastToRuntimeType(&self) -> windows_core::Result { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).TryCastToRuntimeType)( + windows_core::Interface::as_raw(self), + &mut result__, + ) + .and_then(|| windows_core::Type::from_abi(result__)) + } + pub unsafe fn GetConcept( + &self, + conceptid: *const windows_core::GUID, + conceptinterface: *mut Option, + conceptmetadata: Option<*mut Option>, + ) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetConcept)( + windows_core::Interface::as_raw(self), + conceptid, + core::mem::transmute(conceptinterface), + core::mem::transmute(conceptmetadata.unwrap_or(core::mem::zeroed())), + ) + .ok() + } + pub unsafe fn GetNumberOfParentModels(&self) -> windows_core::Result { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetNumberOfParentModels)( + windows_core::Interface::as_raw(self), + &mut result__, + ) + .map(|| result__) + } + pub unsafe fn GetParentModel( + &self, + i: u64, + model: *mut Option, + contextobject: *mut Option, + ) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).GetParentModel)( + windows_core::Interface::as_raw(self), + i, + core::mem::transmute(model), + core::mem::transmute(contextobject), + ) + .ok() + } + pub unsafe fn AddParentModel( + &self, + model: P0, + contextobject: P1, + r#override: u8, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + P1: windows_core::Param, + { + (windows_core::Interface::vtable(self).AddParentModel)( + windows_core::Interface::as_raw(self), + model.param().abi(), + contextobject.param().abi(), + r#override, + ) + .ok() + } + pub unsafe fn RemoveParentModel(&self, model: P0) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).RemoveParentModel)( + windows_core::Interface::as_raw(self), + model.param().abi(), + ) + .ok() + } + pub unsafe fn GetKey( + &self, + key: P0, + object: Option<*mut Option>, + metadata: Option<*mut Option>, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).GetKey)( + windows_core::Interface::as_raw(self), + key.param().abi(), + core::mem::transmute(object.unwrap_or(core::mem::zeroed())), + core::mem::transmute(metadata.unwrap_or(core::mem::zeroed())), + ) + .ok() + } + pub unsafe fn GetKeyReference( + &self, + key: P0, + objectreference: Option<*mut Option>, + metadata: Option<*mut Option>, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).GetKeyReference)( + windows_core::Interface::as_raw(self), + key.param().abi(), + core::mem::transmute(objectreference.unwrap_or(core::mem::zeroed())), + core::mem::transmute(metadata.unwrap_or(core::mem::zeroed())), + ) + .ok() + } + pub unsafe fn SetKey( + &self, + key: P0, + object: P1, + metadata: P2, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + P1: windows_core::Param, + P2: windows_core::Param, + { + (windows_core::Interface::vtable(self).SetKey)( + windows_core::Interface::as_raw(self), + key.param().abi(), + object.param().abi(), + metadata.param().abi(), + ) + .ok() + } + pub unsafe fn ClearKeys(&self) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ClearKeys)(windows_core::Interface::as_raw(self)) + .ok() + } + pub unsafe fn SetConcept( + &self, + conceptid: *const windows_core::GUID, + conceptinterface: P1, + conceptmetadata: P2, + ) -> windows_core::Result<()> + where + P1: windows_core::Param, + P2: windows_core::Param, + { + (windows_core::Interface::vtable(self).SetConcept)( + windows_core::Interface::as_raw(self), + conceptid, + conceptinterface.param().abi(), + conceptmetadata.param().abi(), + ) + .ok() + } + pub unsafe fn ClearConcepts(&self) -> windows_core::Result<()> { + (windows_core::Interface::vtable(self).ClearConcepts)(windows_core::Interface::as_raw(self)) + .ok() + } + pub unsafe fn SetContextForDataModel( + &self, + datamodelobject: P0, + context: P1, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + P1: windows_core::Param, + { + (windows_core::Interface::vtable(self).SetContextForDataModel)( + windows_core::Interface::as_raw(self), + datamodelobject.param().abi(), + context.param().abi(), + ) + .ok() + } + pub unsafe fn GetContextForDataModel( + &self, + datamodelobject: P0, + ) -> windows_core::Result + where + P0: windows_core::Param, + { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).GetContextForDataModel)( + windows_core::Interface::as_raw(self), + datamodelobject.param().abi(), + &mut result__, + ) + .and_then(|| windows_core::Type::from_abi(result__)) + } + pub unsafe fn Compare( + &self, + other: P0, + ppresult: Option<*mut Option>, + ) -> windows_core::Result<()> + where + P0: windows_core::Param, + { + (windows_core::Interface::vtable(self).Compare)( + windows_core::Interface::as_raw(self), + other.param().abi(), + core::mem::transmute(ppresult.unwrap_or(core::mem::zeroed())), + ) + .ok() + } + pub unsafe fn IsEqualTo(&self, other: P0) -> windows_core::Result + where + P0: windows_core::Param, + { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(self).IsEqualTo)( + windows_core::Interface::as_raw(self), + other.param().abi(), + &mut result__, + ) + .map(|| result__) + } +} +#[repr(C)] +pub struct IModelObject_Vtbl { + pub base__: windows_core::IUnknown_Vtbl, + GetContext: usize, + GetKind: usize, + GetIntrinsicValue: usize, + GetIntrinsicValueAs: usize, + pub GetKeyValue: unsafe extern "system" fn( + *mut core::ffi::c_void, + windows_core::PCWSTR, + *mut *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub SetKeyValue: unsafe extern "system" fn( + *mut core::ffi::c_void, + windows_core::PCWSTR, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + EnumerateKeyValues: usize, + GetRawValue: usize, + EnumerateRawValues: usize, + pub Dereference: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub TryCastToRuntimeType: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub GetConcept: unsafe extern "system" fn( + *mut core::ffi::c_void, + *const windows_core::GUID, + *mut *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + GetLocation: usize, + GetTypeInfo: usize, + GetTargetInfo: usize, + pub GetNumberOfParentModels: + unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT, + pub GetParentModel: unsafe extern "system" fn( + *mut core::ffi::c_void, + u64, + *mut *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub AddParentModel: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *mut core::ffi::c_void, + u8, + ) -> windows_core::HRESULT, + pub RemoveParentModel: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub GetKey: unsafe extern "system" fn( + *mut core::ffi::c_void, + windows_core::PCWSTR, + *mut *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub GetKeyReference: unsafe extern "system" fn( + *mut core::ffi::c_void, + windows_core::PCWSTR, + *mut *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub SetKey: unsafe extern "system" fn( + *mut core::ffi::c_void, + windows_core::PCWSTR, + *mut core::ffi::c_void, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub ClearKeys: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, + EnumerateKeys: usize, + EnumerateKeyReferences: usize, + pub SetConcept: unsafe extern "system" fn( + *mut core::ffi::c_void, + *const windows_core::GUID, + *mut core::ffi::c_void, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub ClearConcepts: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT, + GetRawReference: usize, + EnumerateRawReferences: usize, + pub SetContextForDataModel: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub GetContextForDataModel: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub Compare: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub IsEqualTo: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *mut bool, + ) -> windows_core::HRESULT, +} +pub trait IModelObject_Impl: windows_core::IUnknownImpl { + fn GetKeyValue( + &self, + key: &windows_core::PCWSTR, + object: windows_core::OutRef<'_, IModelObject>, + metadata: windows_core::OutRef<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn SetKeyValue( + &self, + key: &windows_core::PCWSTR, + object: windows_core::Ref<'_, IModelObject>, + ) -> windows_core::Result<()>; + fn Dereference(&self) -> windows_core::Result; + fn TryCastToRuntimeType(&self) -> windows_core::Result; + fn GetConcept( + &self, + conceptid: *const windows_core::GUID, + conceptinterface: windows_core::OutRef<'_, windows_core::IUnknown>, + conceptmetadata: windows_core::OutRef<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn GetNumberOfParentModels(&self) -> windows_core::Result; + fn GetParentModel( + &self, + i: u64, + model: windows_core::OutRef<'_, IModelObject>, + contextobject: windows_core::OutRef<'_, IModelObject>, + ) -> windows_core::Result<()>; + fn AddParentModel( + &self, + model: windows_core::Ref<'_, IModelObject>, + contextobject: windows_core::Ref<'_, IModelObject>, + r#override: u8, + ) -> windows_core::Result<()>; + fn RemoveParentModel( + &self, + model: windows_core::Ref<'_, IModelObject>, + ) -> windows_core::Result<()>; + fn GetKey( + &self, + key: &windows_core::PCWSTR, + object: windows_core::OutRef<'_, IModelObject>, + metadata: windows_core::OutRef<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn GetKeyReference( + &self, + key: &windows_core::PCWSTR, + objectreference: windows_core::OutRef<'_, IModelObject>, + metadata: windows_core::OutRef<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn SetKey( + &self, + key: &windows_core::PCWSTR, + object: windows_core::Ref<'_, IModelObject>, + metadata: windows_core::Ref<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn ClearKeys(&self) -> windows_core::Result<()>; + fn SetConcept( + &self, + conceptid: *const windows_core::GUID, + conceptinterface: windows_core::Ref<'_, windows_core::IUnknown>, + conceptmetadata: windows_core::Ref<'_, IKeyStore>, + ) -> windows_core::Result<()>; + fn ClearConcepts(&self) -> windows_core::Result<()>; + fn SetContextForDataModel( + &self, + datamodelobject: windows_core::Ref<'_, IModelObject>, + context: windows_core::Ref<'_, windows_core::IUnknown>, + ) -> windows_core::Result<()>; + fn GetContextForDataModel( + &self, + datamodelobject: windows_core::Ref<'_, IModelObject>, + ) -> windows_core::Result; + fn Compare( + &self, + other: windows_core::Ref<'_, IModelObject>, + ppresult: windows_core::OutRef<'_, IModelObject>, + ) -> windows_core::Result<()>; + fn IsEqualTo(&self, other: windows_core::Ref<'_, IModelObject>) -> windows_core::Result; +} +impl IModelObject_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn GetKeyValue( + this: *mut core::ffi::c_void, + key: windows_core::PCWSTR, + object: *mut *mut core::ffi::c_void, + metadata: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::GetKeyValue( + this, + core::mem::transmute(&key), + core::mem::transmute_copy(&object), + core::mem::transmute_copy(&metadata), + ) + .into() + } + unsafe extern "system" fn SetKeyValue( + this: *mut core::ffi::c_void, + key: windows_core::PCWSTR, + object: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::SetKeyValue( + this, + core::mem::transmute(&key), + core::mem::transmute_copy(&object), + ) + .into() + } + unsafe extern "system" fn Dereference( + this: *mut core::ffi::c_void, + object: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IModelObject_Impl::Dereference(this) { + Ok(ok__) => { + object.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + unsafe extern "system" fn TryCastToRuntimeType< + Identity: IModelObject_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + runtimetypedobject: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IModelObject_Impl::TryCastToRuntimeType(this) { + Ok(ok__) => { + runtimetypedobject.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + unsafe extern "system" fn GetConcept( + this: *mut core::ffi::c_void, + conceptid: *const windows_core::GUID, + conceptinterface: *mut *mut core::ffi::c_void, + conceptmetadata: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::GetConcept( + this, + core::mem::transmute_copy(&conceptid), + core::mem::transmute_copy(&conceptinterface), + core::mem::transmute_copy(&conceptmetadata), + ) + .into() + } + unsafe extern "system" fn GetNumberOfParentModels< + Identity: IModelObject_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + nummodels: *mut u64, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IModelObject_Impl::GetNumberOfParentModels(this) { + Ok(ok__) => { + nummodels.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + unsafe extern "system" fn GetParentModel< + Identity: IModelObject_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + i: u64, + model: *mut *mut core::ffi::c_void, + contextobject: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::GetParentModel( + this, + core::mem::transmute_copy(&i), + core::mem::transmute_copy(&model), + core::mem::transmute_copy(&contextobject), + ) + .into() + } + unsafe extern "system" fn AddParentModel< + Identity: IModelObject_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + model: *mut core::ffi::c_void, + contextobject: *mut core::ffi::c_void, + r#override: u8, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::AddParentModel( + this, + core::mem::transmute_copy(&model), + core::mem::transmute_copy(&contextobject), + core::mem::transmute_copy(&r#override), + ) + .into() + } + unsafe extern "system" fn RemoveParentModel< + Identity: IModelObject_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + model: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::RemoveParentModel(this, core::mem::transmute_copy(&model)).into() + } + unsafe extern "system" fn GetKey( + this: *mut core::ffi::c_void, + key: windows_core::PCWSTR, + object: *mut *mut core::ffi::c_void, + metadata: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::GetKey( + this, + core::mem::transmute(&key), + core::mem::transmute_copy(&object), + core::mem::transmute_copy(&metadata), + ) + .into() + } + unsafe extern "system" fn GetKeyReference< + Identity: IModelObject_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + key: windows_core::PCWSTR, + objectreference: *mut *mut core::ffi::c_void, + metadata: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::GetKeyReference( + this, + core::mem::transmute(&key), + core::mem::transmute_copy(&objectreference), + core::mem::transmute_copy(&metadata), + ) + .into() + } + unsafe extern "system" fn SetKey( + this: *mut core::ffi::c_void, + key: windows_core::PCWSTR, + object: *mut core::ffi::c_void, + metadata: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::SetKey( + this, + core::mem::transmute(&key), + core::mem::transmute_copy(&object), + core::mem::transmute_copy(&metadata), + ) + .into() + } + unsafe extern "system" fn ClearKeys( + this: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::ClearKeys(this).into() + } + unsafe extern "system" fn SetConcept( + this: *mut core::ffi::c_void, + conceptid: *const windows_core::GUID, + conceptinterface: *mut core::ffi::c_void, + conceptmetadata: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::SetConcept( + this, + core::mem::transmute_copy(&conceptid), + core::mem::transmute_copy(&conceptinterface), + core::mem::transmute_copy(&conceptmetadata), + ) + .into() + } + unsafe extern "system" fn ClearConcepts< + Identity: IModelObject_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::ClearConcepts(this).into() + } + unsafe extern "system" fn SetContextForDataModel< + Identity: IModelObject_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + datamodelobject: *mut core::ffi::c_void, + context: *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::SetContextForDataModel( + this, + core::mem::transmute_copy(&datamodelobject), + core::mem::transmute_copy(&context), + ) + .into() + } + unsafe extern "system" fn GetContextForDataModel< + Identity: IModelObject_Impl, + const OFFSET: isize, + >( + this: *mut core::ffi::c_void, + datamodelobject: *mut core::ffi::c_void, + context: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IModelObject_Impl::GetContextForDataModel( + this, + core::mem::transmute_copy(&datamodelobject), + ) { + Ok(ok__) => { + context.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + unsafe extern "system" fn Compare( + this: *mut core::ffi::c_void, + other: *mut core::ffi::c_void, + ppresult: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + IModelObject_Impl::Compare( + this, + core::mem::transmute_copy(&other), + core::mem::transmute_copy(&ppresult), + ) + .into() + } + unsafe extern "system" fn IsEqualTo( + this: *mut core::ffi::c_void, + other: *mut core::ffi::c_void, + equal: *mut bool, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match IModelObject_Impl::IsEqualTo(this, core::mem::transmute_copy(&other)) { + Ok(ok__) => { + equal.write(core::mem::transmute(ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + Self { + base__: windows_core::IUnknown_Vtbl::new::(), + GetContext: 0, + GetKind: 0, + GetIntrinsicValue: 0, + GetIntrinsicValueAs: 0, + GetKeyValue: GetKeyValue::, + SetKeyValue: SetKeyValue::, + EnumerateKeyValues: 0, + GetRawValue: 0, + EnumerateRawValues: 0, + Dereference: Dereference::, + TryCastToRuntimeType: TryCastToRuntimeType::, + GetConcept: GetConcept::, + GetLocation: 0, + GetTypeInfo: 0, + GetTargetInfo: 0, + GetNumberOfParentModels: GetNumberOfParentModels::, + GetParentModel: GetParentModel::, + AddParentModel: AddParentModel::, + RemoveParentModel: RemoveParentModel::, + GetKey: GetKey::, + GetKeyReference: GetKeyReference::, + SetKey: SetKey::, + ClearKeys: ClearKeys::, + EnumerateKeys: 0, + EnumerateKeyReferences: 0, + SetConcept: SetConcept::, + ClearConcepts: ClearConcepts::, + GetRawReference: 0, + EnumerateRawReferences: 0, + SetContextForDataModel: SetContextForDataModel::, + GetContextForDataModel: GetContextForDataModel::, + Compare: Compare::, + IsEqualTo: IsEqualTo::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +impl windows_core::RuntimeName for IModelObject {} diff --git a/crates/tests/bindgen/src/reference_async_action_reference_namespace.rs b/crates/tests/bindgen/src/reference_async_action_reference_namespace.rs index 7ca8c8eae3..57fcf12956 100644 --- a/crates/tests/bindgen/src/reference_async_action_reference_namespace.rs +++ b/crates/tests/bindgen/src/reference_async_action_reference_namespace.rs @@ -113,7 +113,7 @@ impl windows_core::RuntimeName for IAsyncAction { pub trait IAsyncAction_Impl: windows::Foundation::IAsyncInfo_Impl { fn SetCompleted( &self, - handler: Option<&windows::Foundation::AsyncActionCompletedHandler>, + handler: windows_core::Ref<'_, windows::Foundation::AsyncActionCompletedHandler>, ) -> windows_core::Result<()>; fn Completed(&self) -> windows_core::Result; fn GetResults(&self) -> windows_core::Result<()>; @@ -125,7 +125,7 @@ impl IAsyncAction_Vtbl { handler: *mut core::ffi::c_void, ) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - IAsyncAction_Impl::SetCompleted(this, windows_core::from_raw_borrowed(&handler)).into() + IAsyncAction_Impl::SetCompleted(this, core::mem::transmute_copy(&handler)).into() } unsafe extern "system" fn Completed( this: *mut core::ffi::c_void, diff --git a/crates/tests/bindgen/src/struct_with_cpp_interface.rs b/crates/tests/bindgen/src/struct_with_cpp_interface.rs index abd128100e..c8849d475b 100644 --- a/crates/tests/bindgen/src/struct_with_cpp_interface.rs +++ b/crates/tests/bindgen/src/struct_with_cpp_interface.rs @@ -190,7 +190,7 @@ pub trait ID3D12Object_Impl: windows_core::IUnknownImpl { fn SetPrivateDataInterface( &self, guid: *const windows_core::GUID, - pdata: Option<&windows_core::IUnknown>, + pdata: windows_core::Ref<'_, windows_core::IUnknown>, ) -> windows_core::Result<()>; fn SetName(&self, name: &windows_core::PCWSTR) -> windows_core::Result<()>; } @@ -244,7 +244,7 @@ impl ID3D12Object_Vtbl { ID3D12Object_Impl::SetPrivateDataInterface( this, core::mem::transmute_copy(&guid), - windows_core::from_raw_borrowed(&pdata), + core::mem::transmute_copy(&pdata), ) .into() } diff --git a/crates/tests/bindgen/tests/ref_params.rs b/crates/tests/bindgen/tests/ref_params.rs new file mode 100644 index 0000000000..c77013869f --- /dev/null +++ b/crates/tests/bindgen/tests/ref_params.rs @@ -0,0 +1,65 @@ +use test_bindgen::ref_params::*; +use windows::core::*; + +#[implement(IDynamicConceptProviderConcept)] +#[derive(Default)] +struct Test(std::sync::RwLock>); + +impl IDynamicConceptProviderConcept_Impl for Test_Impl { + fn GetConcept( + &self, + _: Ref, + _: *const GUID, + concept: OutRef, + _: OutRef, + _: *mut bool, + ) -> Result<()> { + let this = self.0.read().unwrap(); + concept.write(this.clone())?; + Ok(()) + } + fn SetConcept( + &self, + _: Ref, + _: *const GUID, + concept: Ref, + _: Ref, + ) -> Result<()> { + let mut this = self.0.write().unwrap(); + *this = concept.cloned(); + Ok(()) + } + fn NotifyParent(&self, _: Ref) -> Result<()> { + todo!() + } + fn NotifyParentChange(&self, _: Ref) -> Result<()> { + todo!() + } + fn NotifyDestruct(&self) -> Result<()> { + todo!() + } +} + +#[test] +fn test() { + unsafe { + let identity: IUnknown = Test::default().into(); + + let test: IDynamicConceptProviderConcept = Test::default().into(); + + test.SetConcept(None, std::ptr::null(), &identity, None) + .unwrap(); + + let mut concept = None; + test.GetConcept( + None, + std::ptr::null(), + &mut concept, + None, + std::ptr::null_mut(), + ) + .unwrap(); + + assert_eq!(identity, concept.unwrap()); + } +} diff --git a/crates/tests/misc/component/src/bindings.rs b/crates/tests/misc/component/src/bindings.rs index bc3b8e3138..e9668035da 100644 --- a/crates/tests/misc/component/src/bindings.rs +++ b/crates/tests/misc/component/src/bindings.rs @@ -315,10 +315,10 @@ pub trait IClass_Impl: windows_core::IUnknownImpl { ) -> windows_core::Result>; fn Input( &self, - a: Option<&windows_core::IInspectable>, - b: Option<&Class>, - c: Option<&windows::Foundation::IStringable>, - d: Option<&Callback>, + a: windows_core::Ref<'_, windows_core::IInspectable>, + b: windows_core::Ref<'_, Class>, + c: windows_core::Ref<'_, windows::Foundation::IStringable>, + d: windows_core::Ref<'_, Callback>, ) -> windows_core::Result<()>; } impl IClass_Vtbl { @@ -434,10 +434,10 @@ impl IClass_Vtbl { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); IClass_Impl::Input( this, - windows_core::from_raw_borrowed(&a), - windows_core::from_raw_borrowed(&b), - windows_core::from_raw_borrowed(&c), - windows_core::from_raw_borrowed(&d), + core::mem::transmute_copy(&a), + core::mem::transmute_copy(&b), + core::mem::transmute_copy(&c), + core::mem::transmute_copy(&d), ) .into() } diff --git a/crates/tests/misc/component/src/lib.rs b/crates/tests/misc/component/src/lib.rs index 84f7dbf676..e59606af91 100644 --- a/crates/tests/misc/component/src/lib.rs +++ b/crates/tests/misc/component/src/lib.rs @@ -39,15 +39,15 @@ impl bindings::IClass_Impl for Class_Impl { } fn Input( &self, - a: Option<&IInspectable>, - b: Option<&bindings::Class>, - c: Option<&IStringable>, - d: Option<&bindings::Callback>, + a: Ref, + b: Ref, + c: Ref, + d: Ref, ) -> Result<()> { - let a = a.ok_or_else(|| Error::from(E_INVALIDARG))?; - let b = b.ok_or_else(|| Error::from(E_INVALIDARG))?; - let c = c.ok_or_else(|| Error::from(E_INVALIDARG))?; - let d = d.ok_or_else(|| Error::from(E_INVALIDARG))?; + let a = a.ok()?; + let b = b.ok()?; + let c = c.ok()?; + let d = d.ok()?; let a: IUnknown = a.cast()?; let b: IUnknown = b.cast()?; diff --git a/crates/tests/misc/implement/tests/as_interface_param.rs b/crates/tests/misc/implement/tests/as_interface_param.rs index a68a7d1bd3..6c5784adda 100644 --- a/crates/tests/misc/implement/tests/as_interface_param.rs +++ b/crates/tests/misc/implement/tests/as_interface_param.rs @@ -4,7 +4,7 @@ use windows::{core::*, Foundation::*}; struct Async; impl IAsyncAction_Impl for Async_Impl { - fn SetCompleted(&self, handler: Option<&AsyncActionCompletedHandler>) -> Result<()> { + fn SetCompleted(&self, handler: Ref) -> Result<()> { // This validates that `as_interface` may be used to call a bindgen-produced method expecting a `Param` argument. handler .unwrap() diff --git a/crates/tests/misc/implement/tests/class_factory.rs b/crates/tests/misc/implement/tests/class_factory.rs index 26839ecbd6..786c4c3fe5 100644 --- a/crates/tests/misc/implement/tests/class_factory.rs +++ b/crates/tests/misc/implement/tests/class_factory.rs @@ -26,11 +26,11 @@ struct Factory(); impl IClassFactory_Impl for Factory_Impl { fn CreateInstance( &self, - outer: Option<&IUnknown>, + outer: Ref, iid: *const GUID, object: *mut *mut core::ffi::c_void, ) -> Result<()> { - assert!(outer.is_none()); + assert!(outer.is_null()); let unknown: IInspectable = Object().into(); unsafe { unknown.query(iid, object).ok() } } diff --git a/crates/tests/misc/implement/tests/com_chain.rs b/crates/tests/misc/implement/tests/com_chain.rs index 035adc7d57..7b9f783b70 100644 --- a/crates/tests/misc/implement/tests/com_chain.rs +++ b/crates/tests/misc/implement/tests/com_chain.rs @@ -18,11 +18,11 @@ impl IPersistStream_Impl for Test_Impl { S_OK } - fn Load(&self, _: Option<&IStream>) -> Result<()> { + fn Load(&self, _: Ref) -> Result<()> { Ok(()) } - fn Save(&self, _: Option<&IStream>, _: BOOL) -> Result<()> { + fn Save(&self, _: Ref, _: BOOL) -> Result<()> { Ok(()) } diff --git a/crates/tests/misc/implement/tests/data_object.rs b/crates/tests/misc/implement/tests/data_object.rs index a53787e290..d19096351e 100644 --- a/crates/tests/misc/implement/tests/data_object.rs +++ b/crates/tests/misc/implement/tests/data_object.rs @@ -62,7 +62,7 @@ impl IDataObject_Impl for Test_Impl { } } - fn DAdvise(&self, _: *const FORMATETC, _: u32, _: Option<&IAdviseSink>) -> Result { + fn DAdvise(&self, _: *const FORMATETC, _: u32, _: Ref) -> Result { unsafe { (*self.0.get()).DAdvise = true; Ok(0) diff --git a/crates/tests/misc/implement/tests/drop_target.rs b/crates/tests/misc/implement/tests/drop_target.rs index 940c3fdf0e..85a9863796 100644 --- a/crates/tests/misc/implement/tests/drop_target.rs +++ b/crates/tests/misc/implement/tests/drop_target.rs @@ -25,15 +25,10 @@ impl IDataObject_Impl for DataObject_Impl { fn EnumFormatEtc(&self, _: u32) -> Result { unimplemented!() } - fn DAdvise( - &self, - format: *const FORMATETC, - value: u32, - sink: Option<&IAdviseSink>, - ) -> Result { + fn DAdvise(&self, format: *const FORMATETC, value: u32, sink: Ref) -> Result { assert!(!format.is_null()); assert_eq!(value, 789); - assert!(sink.is_none()); + assert!(sink.is_null()); Ok(123) } fn DUnadvise(&self, _: u32) -> Result<()> { @@ -50,7 +45,7 @@ struct DropTarget(); impl IDropTarget_Impl for DropTarget_Impl { fn DragEnter( &self, - object: Option<&IDataObject>, + object: Ref, state: MODIFIERKEYS_FLAGS, point: &POINTL, effect: *mut DROPEFFECT, @@ -75,7 +70,7 @@ impl IDropTarget_Impl for DropTarget_Impl { } fn Drop( &self, - _: Option<&IDataObject>, + _: Ref, _: MODIFIERKEYS_FLAGS, _: &POINTL, _: *mut DROPEFFECT, diff --git a/crates/tests/misc/implement/tests/from_raw_borrowed.rs b/crates/tests/misc/implement/tests/from_raw_borrowed.rs index 99adf59846..b619c72c7f 100644 --- a/crates/tests/misc/implement/tests/from_raw_borrowed.rs +++ b/crates/tests/misc/implement/tests/from_raw_borrowed.rs @@ -31,9 +31,9 @@ impl IServiceProvider_Impl for Borrowed_Impl { } impl IProfferService_Impl for Borrowed_Impl { - fn ProfferService(&self, _: *const GUID, provider: Option<&IServiceProvider>) -> Result { + fn ProfferService(&self, _: *const GUID, provider: Ref) -> Result { unsafe { - if let Some(provider) = provider { + if let Ok(provider) = provider.ok() { Ok(provider.cast::()?.Call()) } else { Ok(0) diff --git a/crates/tests/misc/implement/tests/from_raw_borrowed_winrt.rs b/crates/tests/misc/implement/tests/from_raw_borrowed_winrt.rs index 98133c0a2f..1bb3540f6e 100644 --- a/crates/tests/misc/implement/tests/from_raw_borrowed_winrt.rs +++ b/crates/tests/misc/implement/tests/from_raw_borrowed_winrt.rs @@ -18,13 +18,9 @@ impl IBorrowed_Impl for Borrowed_Impl { } impl IBackgroundTask_Impl for Borrowed_Impl { - fn Run(&self, instance: Option<&IBackgroundTaskInstance>) -> Result<()> { - if let Some(instance) = instance { - assert_eq!(instance.SuspendedCount()?, *self.0.read().unwrap()); - Ok(()) - } else { - Err(E_INVALIDARG.into()) - } + fn Run(&self, instance: Ref) -> Result<()> { + assert_eq!(instance.ok()?.SuspendedCount()?, *self.0.read().unwrap()); + Ok(()) } } @@ -44,7 +40,7 @@ impl IBackgroundTaskInstance_Impl for Borrowed_Impl { fn TriggerDetails(&self) -> Result { unimplemented!() } - fn Canceled(&self, _cancelhandler: Option<&BackgroundTaskCanceledEventHandler>) -> Result { + fn Canceled(&self, _cancelhandler: Ref) -> Result { unimplemented!() } fn RemoveCanceled(&self, _cookie: i64) -> Result<()> { @@ -67,11 +63,11 @@ fn test() -> Result<()> { let task = one_two_three.cast::()?; let instance = one_two_three.cast::()?; - assert_eq!(task.Run(None).unwrap_err().code(), E_INVALIDARG); + assert_eq!(task.Run(None).unwrap_err().code(), E_POINTER); task.Run(&instance)?; let handler = BackgroundTaskCanceledEventHandler::new(|instance, reason| { - if let Some(instance) = instance { + if let Some(instance) = &*instance { assert_eq!( instance.SuspendedCount()?, instance.cast::()?.Call() diff --git a/crates/tests/misc/implement/tests/map.rs b/crates/tests/misc/implement/tests/map.rs index c86978495b..dfbac2971a 100644 --- a/crates/tests/misc/implement/tests/map.rs +++ b/crates/tests/misc/implement/tests/map.rs @@ -54,8 +54,8 @@ impl IMapView_Impl for MapView_Impl { } fn Split( &self, - _first: &mut Option>, - _second: &mut Option>, + _first: OutRef>, + _second: OutRef>, ) -> Result<()> { Ok(()) } diff --git a/crates/tests/misc/implement/tests/properties.rs b/crates/tests/misc/implement/tests/properties.rs index 0e50f60f0b..b16a305386 100644 --- a/crates/tests/misc/implement/tests/properties.rs +++ b/crates/tests/misc/implement/tests/properties.rs @@ -13,7 +13,7 @@ use windows::{ struct Object(std::sync::RwLock); impl IInitializeWithStream_Impl for Object_Impl { - fn Initialize(&self, _: Option<&IStream>, _: u32) -> Result<()> { + fn Initialize(&self, _: Ref, _: u32) -> Result<()> { Ok(()) } } diff --git a/crates/tests/winrt/constructors/src/bindings.rs b/crates/tests/winrt/constructors/src/bindings.rs index 9a559df2bb..1d0a15d5a2 100644 --- a/crates/tests/winrt/constructors/src/bindings.rs +++ b/crates/tests/winrt/constructors/src/bindings.rs @@ -297,14 +297,14 @@ impl windows_core::RuntimeName for IComposableFactory { pub trait IComposableFactory_Impl: windows_core::IUnknownImpl { fn CreateInstance( &self, - baseInterface: Option<&windows_core::IInspectable>, - innerInterface: &mut Option, + baseInterface: windows_core::Ref<'_, windows_core::IInspectable>, + innerInterface: windows_core::OutRef<'_, windows_core::IInspectable>, ) -> windows_core::Result; fn WithValue( &self, arg: i32, - baseInterface: Option<&windows_core::IInspectable>, - innerInterface: &mut Option, + baseInterface: windows_core::Ref<'_, windows_core::IInspectable>, + innerInterface: windows_core::OutRef<'_, windows_core::IInspectable>, ) -> windows_core::Result; } impl IComposableFactory_Vtbl { @@ -321,7 +321,7 @@ impl IComposableFactory_Vtbl { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); match IComposableFactory_Impl::CreateInstance( this, - windows_core::from_raw_borrowed(&baseinterface), + core::mem::transmute_copy(&baseinterface), core::mem::transmute_copy(&innerinterface), ) { Ok(ok__) => { @@ -346,7 +346,7 @@ impl IComposableFactory_Vtbl { match IComposableFactory_Impl::WithValue( this, arg, - windows_core::from_raw_borrowed(&baseinterface), + core::mem::transmute_copy(&baseinterface), core::mem::transmute_copy(&innerinterface), ) { Ok(ok__) => { diff --git a/crates/tests/winrt/constructors/src/lib.rs b/crates/tests/winrt/constructors/src/lib.rs index 49daa30a76..f55ae9fc74 100644 --- a/crates/tests/winrt/constructors/src/lib.rs +++ b/crates/tests/winrt/constructors/src/lib.rs @@ -62,11 +62,12 @@ impl IActivationFactory_Impl for ComposableFactory_Impl { impl bindings::IComposableFactory_Impl for ComposableFactory_Impl { fn CreateInstance( &self, - base: Option<&windows_core::IInspectable>, - inner: &mut Option, + base: Ref, + inner: OutRef, ) -> Result { // windows-rs doesn't support binary composition - if base.is_some() || inner.is_some() { + _ = inner.write(None); + if base.is_some() { Err(CLASS_E_NOAGGREGATION.into()) } else { Ok(Composable::new(0).into()) @@ -76,11 +77,12 @@ impl bindings::IComposableFactory_Impl for ComposableFactory_Impl { fn WithValue( &self, arg: i32, - base: Option<&windows_core::IInspectable>, - inner: &mut Option, + base: Ref, + inner: OutRef, ) -> Result { // windows-rs doesn't support binary composition - if base.is_some() || inner.is_some() { + _ = inner.write(None); + if base.is_some() { Err(CLASS_E_NOAGGREGATION.into()) } else { Ok(Composable::new(arg).into()) diff --git a/crates/tests/winrt/events/src/bindings.rs b/crates/tests/winrt/events/src/bindings.rs index e53a67590e..fe1d50de91 100644 --- a/crates/tests/winrt/events/src/bindings.rs +++ b/crates/tests/winrt/events/src/bindings.rs @@ -87,7 +87,7 @@ pub trait IClass_Impl: windows_core::IUnknownImpl { fn Signal(&self, value: i32) -> windows_core::Result; fn Event( &self, - handler: Option<&windows::Foundation::TypedEventHandler>, + handler: windows_core::Ref<'_, windows::Foundation::TypedEventHandler>, ) -> windows_core::Result; fn RemoveEvent(&self, token: i64) -> windows_core::Result<()>; } @@ -113,7 +113,7 @@ impl IClass_Vtbl { result__: *mut i64, ) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IClass_Impl::Event(this, windows_core::from_raw_borrowed(&handler)) { + match IClass_Impl::Event(this, core::mem::transmute_copy(&handler)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); windows_core::HRESULT(0) diff --git a/crates/tests/winrt/events/src/lib.rs b/crates/tests/winrt/events/src/lib.rs index 0addeb2aa1..87b051964c 100644 --- a/crates/tests/winrt/events/src/lib.rs +++ b/crates/tests/winrt/events/src/lib.rs @@ -39,7 +39,7 @@ impl bindings::IClass_Impl for Class_Impl { fn Event( &self, - handler: Option<&windows::Foundation::TypedEventHandler>, + handler: Ref>, ) -> windows_core::Result { self.0.add(handler.unwrap()) } diff --git a/crates/tests/winrt/noexcept/src/bindings.rs b/crates/tests/winrt/noexcept/src/bindings.rs index 3943e94de5..7373e4c9a5 100644 --- a/crates/tests/winrt/noexcept/src/bindings.rs +++ b/crates/tests/winrt/noexcept/src/bindings.rs @@ -223,22 +223,22 @@ impl windows_core::RuntimeName for ITest { pub trait ITest_Impl: windows_core::IUnknownImpl { fn MethodString(&self, test: &windows_core::HSTRING) -> windows_core::Result<()>; fn MethodInt32(&self, test: i32) -> windows_core::Result<()>; - fn MethodTest(&self, test: Option<&ITest>) -> windows_core::Result<()>; + fn MethodTest(&self, test: windows_core::Ref<'_, ITest>) -> windows_core::Result<()>; fn String(&self) -> windows_core::Result; fn SetString(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>; fn Int32(&self) -> windows_core::Result; fn SetInt32(&self, value: i32) -> windows_core::Result<()>; fn Test(&self) -> windows_core::Result; - fn SetTest(&self, value: Option<&ITest>) -> windows_core::Result<()>; + fn SetTest(&self, value: windows_core::Ref<'_, ITest>) -> windows_core::Result<()>; fn MethodStringN(&self, test: &windows_core::HSTRING); fn MethodInt32N(&self, test: i32); - fn MethodTestN(&self, test: Option<&ITest>); + fn MethodTestN(&self, test: windows_core::Ref<'_, ITest>); fn StringN(&self) -> windows_core::HSTRING; fn SetStringN(&self, value: &windows_core::HSTRING); fn Int32N(&self) -> i32; fn SetInt32N(&self, value: i32); fn TestN(&self) -> Option; - fn SetTestN(&self, value: Option<&ITest>); + fn SetTestN(&self, value: windows_core::Ref<'_, ITest>); } impl ITest_Vtbl { pub const fn new() -> Self { @@ -261,7 +261,7 @@ impl ITest_Vtbl { test: *mut core::ffi::c_void, ) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITest_Impl::MethodTest(this, windows_core::from_raw_borrowed(&test)).into() + ITest_Impl::MethodTest(this, core::mem::transmute_copy(&test)).into() } unsafe extern "system" fn String( this: *mut core::ffi::c_void, @@ -323,7 +323,7 @@ impl ITest_Vtbl { value: *mut core::ffi::c_void, ) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITest_Impl::SetTest(this, windows_core::from_raw_borrowed(&value)).into() + ITest_Impl::SetTest(this, core::mem::transmute_copy(&value)).into() } unsafe extern "system" fn MethodStringN( this: *mut core::ffi::c_void, @@ -346,7 +346,7 @@ impl ITest_Vtbl { test: *mut core::ffi::c_void, ) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITest_Impl::MethodTestN(this, windows_core::from_raw_borrowed(&test)); + ITest_Impl::MethodTestN(this, core::mem::transmute_copy(&test)); windows_core::HRESULT(0) } unsafe extern "system" fn StringN( @@ -399,7 +399,7 @@ impl ITest_Vtbl { value: *mut core::ffi::c_void, ) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - ITest_Impl::SetTestN(this, windows_core::from_raw_borrowed(&value)); + ITest_Impl::SetTestN(this, core::mem::transmute_copy(&value)); windows_core::HRESULT(0) } Self { diff --git a/crates/tests/winrt/noexcept/tests/test.rs b/crates/tests/winrt/noexcept/tests/test.rs index 5e6e6f54d5..43219ed06b 100644 --- a/crates/tests/winrt/noexcept/tests/test.rs +++ b/crates/tests/winrt/noexcept/tests/test.rs @@ -17,7 +17,7 @@ impl ITest_Impl for Test_Impl { this.1 = test; Ok(()) } - fn MethodTest(&self, test: Option<&ITest>) -> Result<()> { + fn MethodTest(&self, test: Ref) -> Result<()> { let mut this = self.0.write().unwrap(); this.2 = test.cloned(); Ok(()) @@ -44,7 +44,7 @@ impl ITest_Impl for Test_Impl { let this = self.0.read().unwrap(); this.2.clone().ok_or_else(Error::empty) } - fn SetTest(&self, value: Option<&ITest>) -> Result<()> { + fn SetTest(&self, value: Ref) -> Result<()> { let mut this = self.0.write().unwrap(); this.2 = value.cloned(); Ok(()) @@ -58,7 +58,7 @@ impl ITest_Impl for Test_Impl { let mut this = self.0.write().unwrap(); this.1 = test; } - fn MethodTestN(&self, test: Option<&ITest>) { + fn MethodTestN(&self, test: Ref) { let mut this = self.0.write().unwrap(); this.2 = test.cloned(); } @@ -82,7 +82,7 @@ impl ITest_Impl for Test_Impl { let this = self.0.read().unwrap(); this.2.clone() } - fn SetTestN(&self, value: Option<&ITest>) { + fn SetTestN(&self, value: Ref) { let mut this = self.0.write().unwrap(); this.2 = value.cloned(); } diff --git a/crates/tests/winrt/ref_params/Cargo.toml b/crates/tests/winrt/ref_params/Cargo.toml new file mode 100644 index 0000000000..0f93c2184d --- /dev/null +++ b/crates/tests/winrt/ref_params/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "test_ref_params" +version = "0.0.0" +edition = "2021" +publish = false + +[lib] +doc = false +doctest = false + +[dependencies.windows-core] +workspace = true + +[build-dependencies.windows-bindgen] +workspace = true + +[build-dependencies] +cc = "1.0" + +[build-dependencies.cppwinrt] +workspace = true diff --git a/crates/tests/winrt/ref_params/build.rs b/crates/tests/winrt/ref_params/build.rs new file mode 100644 index 0000000000..0a464c84d6 --- /dev/null +++ b/crates/tests/winrt/ref_params/build.rs @@ -0,0 +1,60 @@ +fn main() { + if !cfg!(target_env = "msvc") { + return; + } + + println!("cargo:rerun-if-changed=src/test.idl"); + let metadata_dir = format!("{}\\System32\\WinMetadata", env!("windir")); + let mut command = std::process::Command::new("midlrt.exe"); + println!("cargo:rerun-if-changed=src/interop.cpp"); + println!("cargo:rustc-link-lib=onecoreuap"); + + command.args([ + "/winrt", + "/nomidl", + "/h", + "nul", + "/metadata_dir", + &metadata_dir, + "/reference", + &format!("{metadata_dir}\\Windows.Foundation.winmd"), + "/winmd", + "test.winmd", + "src/test.idl", + ]); + + if !command.status().unwrap().success() { + panic!("Failed to run midlrt"); + } + + windows_bindgen::bindgen([ + "--in", + "test.winmd", + &metadata_dir, + "--out", + "src/bindings.rs", + "--filter", + "Test", + "--implement", + "--flat", + ]); + + let include = std::env::var("OUT_DIR").unwrap(); + + cppwinrt::cppwinrt([ + "-in", + "test.winmd", + &format!("{}\\System32\\WinMetadata", env!("windir")), + "-out", + &include, + ]) + .unwrap(); + + cc::Build::new() + .cpp(true) + .std("c++20") + .flag("/EHsc") + .file("src/interop.cpp") + .include(include) + .compile("interop"); +} diff --git a/crates/tests/winrt/ref_params/src/bindings.rs b/crates/tests/winrt/ref_params/src/bindings.rs new file mode 100644 index 0000000000..bcc95f60c7 --- /dev/null +++ b/crates/tests/winrt/ref_params/src/bindings.rs @@ -0,0 +1,151 @@ +// Bindings generated by `windows-bindgen` 0.58.0 + +#![allow( + non_snake_case, + non_upper_case_globals, + non_camel_case_types, + dead_code, + clippy::all +)] + +windows_core::imp::define_interface!(ITest, ITest_Vtbl, 0xaa1cc4e9_4780_5808_b172_2ef6449e2ba4); +impl windows_core::RuntimeType for ITest { + const SIGNATURE: windows_core::imp::ConstBuffer = + windows_core::imp::ConstBuffer::for_interface::(); +} +windows_core::imp::interface_hierarchy!(ITest, windows_core::IUnknown, windows_core::IInspectable); +impl ITest { + pub fn Input(&self, input: P0) -> windows_core::Result + where + P0: windows_core::Param, + { + let this = self; + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(this).Input)( + windows_core::Interface::as_raw(this), + input.param().abi(), + &mut result__, + ) + .map(|| result__) + } + } + pub fn Output(&self, value: i32, output: &mut Option) -> windows_core::Result<()> { + let this = self; + unsafe { + (windows_core::Interface::vtable(this).Output)( + windows_core::Interface::as_raw(this), + value, + output as *mut _ as _, + ) + .ok() + } + } + pub fn Current(&self) -> windows_core::Result { + let this = self; + unsafe { + let mut result__ = core::mem::zeroed(); + (windows_core::Interface::vtable(this).Current)( + windows_core::Interface::as_raw(this), + &mut result__, + ) + .map(|| result__) + } + } + pub fn SetCurrent(&self, value: i32) -> windows_core::Result<()> { + let this = self; + unsafe { + (windows_core::Interface::vtable(this).SetCurrent)( + windows_core::Interface::as_raw(this), + value, + ) + .ok() + } + } +} +impl windows_core::RuntimeName for ITest { + const NAME: &'static str = "Test.ITest"; +} +pub trait ITest_Impl: windows_core::IUnknownImpl { + fn Input(&self, input: windows_core::Ref<'_, ITest>) -> windows_core::Result; + fn Output( + &self, + value: i32, + output: windows_core::OutRef<'_, ITest>, + ) -> windows_core::Result<()>; + fn Current(&self) -> windows_core::Result; + fn SetCurrent(&self, value: i32) -> windows_core::Result<()>; +} +impl ITest_Vtbl { + pub const fn new() -> Self { + unsafe extern "system" fn Input( + this: *mut core::ffi::c_void, + input: *mut core::ffi::c_void, + result__: *mut i32, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match ITest_Impl::Input(this, core::mem::transmute_copy(&input)) { + Ok(ok__) => { + result__.write(core::mem::transmute_copy(&ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + unsafe extern "system" fn Output( + this: *mut core::ffi::c_void, + value: i32, + output: *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + ITest_Impl::Output(this, value, core::mem::transmute_copy(&output)).into() + } + unsafe extern "system" fn Current( + this: *mut core::ffi::c_void, + result__: *mut i32, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + match ITest_Impl::Current(this) { + Ok(ok__) => { + result__.write(core::mem::transmute_copy(&ok__)); + windows_core::HRESULT(0) + } + Err(err) => err.into(), + } + } + unsafe extern "system" fn SetCurrent( + this: *mut core::ffi::c_void, + value: i32, + ) -> windows_core::HRESULT { + let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); + ITest_Impl::SetCurrent(this, value).into() + } + Self { + base__: windows_core::IInspectable_Vtbl::new::(), + Input: Input::, + Output: Output::, + Current: Current::, + SetCurrent: SetCurrent::, + } + } + pub fn matches(iid: &windows_core::GUID) -> bool { + iid == &::IID + } +} +#[repr(C)] +pub struct ITest_Vtbl { + pub base__: windows_core::IInspectable_Vtbl, + pub Input: unsafe extern "system" fn( + *mut core::ffi::c_void, + *mut core::ffi::c_void, + *mut i32, + ) -> windows_core::HRESULT, + pub Output: unsafe extern "system" fn( + *mut core::ffi::c_void, + i32, + *mut *mut core::ffi::c_void, + ) -> windows_core::HRESULT, + pub Current: + unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT, + pub SetCurrent: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT, +} diff --git a/crates/tests/winrt/ref_params/src/interop.cpp b/crates/tests/winrt/ref_params/src/interop.cpp new file mode 100644 index 0000000000..c1f9236592 --- /dev/null +++ b/crates/tests/winrt/ref_params/src/interop.cpp @@ -0,0 +1,78 @@ +#include +#include +#include "winrt/Test.h" + +using namespace winrt; +using namespace winrt::Test; + +struct Test : implements +{ + std::atomic_int32_t m_int32; + + Test(int32_t value) : m_int32(value) + { + } + + int32_t Input(ITest const& input) + { + return input.Current(); + } + + void Output(int32_t value, ITest& output) + { + output = make(value); + } + + int32_t Current() + { + return m_int32; + } + + void Current(int32_t value) + { + m_int32 = value; + } +}; + +void test_interface(ITest const& test) +{ + assert(test.Current() == 0); + test.Current(-321); + assert(test.Current() == -321); + + ITest one_two_three = make(123); + ITest four_five_six = make(456); + + assert(test.Input(one_two_three) == 123); + assert(test.Input(four_five_six) == 456); + + ITest seven_eight_nine; + test.Output(789, seven_eight_nine); + assert(seven_eight_nine.Current() == 789); +} + +extern "C" +{ + HRESULT __stdcall consume(void *abi) noexcept + try + { + ITest const &test = *reinterpret_cast(&abi); + test_interface(test); + return S_OK; + } + catch (...) + { + return to_hresult(); + } + + HRESULT __stdcall produce(void **abi) noexcept + try + { + *abi = detach_abi(make(0)); + return S_OK; + } + catch (...) + { + return to_hresult(); + } +} diff --git a/crates/tests/winrt/ref_params/src/lib.rs b/crates/tests/winrt/ref_params/src/lib.rs new file mode 100644 index 0000000000..6bff33433c --- /dev/null +++ b/crates/tests/winrt/ref_params/src/lib.rs @@ -0,0 +1,25 @@ +#![cfg(target_env = "msvc")] + +mod bindings; +pub use bindings::*; +pub use windows_core::*; + +pub fn consume(test: &ITest) -> Result<()> { + extern "system" { + fn consume(test: Ref) -> HRESULT; + } + + unsafe { consume(std::mem::transmute_copy(test)).ok() } +} + +pub fn produce() -> Result { + extern "system" { + fn produce(test: *mut *mut std::ffi::c_void) -> HRESULT; + } + + unsafe { + let mut test = None; + produce(&mut test as *mut _ as *mut _).ok()?; + Type::from_default(&test) + } +} diff --git a/crates/tests/winrt/ref_params/src/test.idl b/crates/tests/winrt/ref_params/src/test.idl new file mode 100644 index 0000000000..9204e6d2e4 --- /dev/null +++ b/crates/tests/winrt/ref_params/src/test.idl @@ -0,0 +1,10 @@ +namespace Test +{ + interface ITest + { + Int32 Input(ITest input); + void Output(Int32 value, out ITest output); + + Int32 Current { get; set; }; + } +} diff --git a/crates/tests/winrt/ref_params/tests/test.rs b/crates/tests/winrt/ref_params/tests/test.rs new file mode 100644 index 0000000000..6cd60f6f6e --- /dev/null +++ b/crates/tests/winrt/ref_params/tests/test.rs @@ -0,0 +1,56 @@ +#![cfg(target_env = "msvc")] + +use std::sync::atomic::*; +use test_ref_params::*; + +#[implement(ITest)] +struct Test(AtomicI32); + +impl ITest_Impl for Test_Impl { + fn Input(&self, input: Ref) -> Result { + input.ok()?.Current() + } + fn Output(&self, value: i32, output: OutRef) -> Result<()> { + output.write(Some(Test(value.into()).into())) + } + fn Current(&self) -> Result { + Ok(self.0.load(Ordering::Relaxed)) + } + fn SetCurrent(&self, value: i32) -> Result<()> { + self.0.store(value, Ordering::Relaxed); + Ok(()) + } +} + +fn test_interface(test: &ITest) -> Result<()> { + assert_eq!(test.Current()?, 0); + test.SetCurrent(-321)?; + assert_eq!(test.Current()?, -321); + + let one_two_three: ITest = Test(123.into()).into(); + let four_five_six: ITest = Test(456.into()).into(); + + assert_eq!(test.Input(&one_two_three)?, 123); + assert_eq!(test.Input(&four_five_six)?, 456); + + let mut seven_eight_nine = None; + test.Output(789, &mut seven_eight_nine)?; + assert_eq!(seven_eight_nine.unwrap().Current()?, 789); + + Ok(()) +} + +#[test] +fn test_rust() -> Result<()> { + let test: ITest = Test(0.into()).into(); + test_interface(&test) +} + +#[test] +fn test_cpp() -> Result<()> { + let test: ITest = Test(0.into()).into(); + consume(&test)?; + + let test: ITest = produce()?; + test_interface(&test) +} diff --git a/crates/tests/winrt/reference/src/bindings.rs b/crates/tests/winrt/reference/src/bindings.rs index 56e2a81bfc..01df725bf2 100644 --- a/crates/tests/winrt/reference/src/bindings.rs +++ b/crates/tests/winrt/reference/src/bindings.rs @@ -21,7 +21,7 @@ impl windows_core::RuntimeName for IReference { pub trait IReference_Impl: windows_core::IUnknownImpl { fn Method( &self, - stringable: Option<&windows::Foundation::IStringable>, + stringable: windows_core::Ref<'_, windows::Foundation::IStringable>, ) -> windows_core::Result; } impl IReference_Vtbl { @@ -32,7 +32,7 @@ impl IReference_Vtbl { result__: *mut *mut core::ffi::c_void, ) -> windows_core::HRESULT { let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity); - match IReference_Impl::Method(this, windows_core::from_raw_borrowed(&stringable)) { + match IReference_Impl::Method(this, core::mem::transmute_copy(&stringable)) { Ok(ok__) => { result__.write(core::mem::transmute_copy(&ok__)); core::mem::forget(ok__); diff --git a/crates/tests/winrt/reference/src/lib.rs b/crates/tests/winrt/reference/src/lib.rs index b02e0b65e6..5aed6f4004 100644 --- a/crates/tests/winrt/reference/src/lib.rs +++ b/crates/tests/winrt/reference/src/lib.rs @@ -34,7 +34,7 @@ impl IStringable_Impl for Reference_Impl { } impl bindings::IReference_Impl for Reference_Impl { - fn Method(&self, stringable: Option<&IStringable>) -> Result { + fn Method(&self, stringable: Ref) -> Result { stringable.unwrap().ToString() } } diff --git a/crates/tools/bindgen/src/main.rs b/crates/tools/bindgen/src/main.rs index 0fc7031f2e..cf878bb4bd 100644 --- a/crates/tools/bindgen/src/main.rs +++ b/crates/tools/bindgen/src/main.rs @@ -140,6 +140,9 @@ fn main() { test("--out bool.rs --filter EnableMouseInPointer --reference windows,skip-root,Windows"); test("--out bool_event.rs --filter CreateEventW SetEvent NtWaitForSingleObject WaitForSingleObjectEx --reference windows,skip-root,Windows"); + // Tests Ref and OutRef for COM interfaces since we can't use MIDLRT for that. + test("--out ref_params.rs --filter IDynamicConceptProviderConcept IModelObject IKeyStore"); + // Tests simulating reference dependency and dependent test_raw( "--no-comment --out reference_dependency_flat.rs --filter IMemoryBufferReference --flat", From 1d8e0894967c60e32ccf7a984c06b06f66deb953 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Thu, 12 Dec 2024 13:19:08 -0600 Subject: [PATCH 5/5] yml --- .github/workflows/clippy.yml | 2 ++ .github/workflows/raw-dylib.yml | 8 ++++++-- .github/workflows/test.yml | 8 ++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 6d3598d385..e500c71bfe 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -231,6 +231,8 @@ jobs: run: cargo clippy -p test_query_signature - name: Clippy test_readme run: cargo clippy -p test_readme + - name: Clippy test_ref_params + run: cargo clippy -p test_ref_params - name: Clippy test_reference run: cargo clippy -p test_reference - name: Clippy test_reference_client diff --git a/.github/workflows/raw-dylib.yml b/.github/workflows/raw-dylib.yml index 354716b5f4..4f0150ab44 100644 --- a/.github/workflows/raw-dylib.yml +++ b/.github/workflows/raw-dylib.yml @@ -260,10 +260,12 @@ jobs: run: cargo test -p test_query_signature --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_readme run: cargo test -p test_readme --target ${{ matrix.target }} ${{ matrix.etc }} - - name: Test test_reference - run: cargo test -p test_reference --target ${{ matrix.target }} ${{ matrix.etc }} + - name: Test test_ref_params + run: cargo test -p test_ref_params --target ${{ matrix.target }} ${{ matrix.etc }} - name: Clean run: cargo clean + - name: Test test_reference + run: cargo test -p test_reference --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_reference_client run: cargo test -p test_reference_client --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_reference_float @@ -362,6 +364,8 @@ jobs: run: cargo test -p windows_x86_64_gnu --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test windows_x86_64_gnullvm run: cargo test -p windows_x86_64_gnullvm --target ${{ matrix.target }} ${{ matrix.etc }} + - name: Clean + run: cargo clean - name: Test windows_x86_64_msvc run: cargo test -p windows_x86_64_msvc --target ${{ matrix.target }} ${{ matrix.etc }} - name: Check diff diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 202194112c..6a39c14fdd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -257,10 +257,12 @@ jobs: run: cargo test -p test_query_signature --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_readme run: cargo test -p test_readme --target ${{ matrix.target }} ${{ matrix.etc }} - - name: Test test_reference - run: cargo test -p test_reference --target ${{ matrix.target }} ${{ matrix.etc }} + - name: Test test_ref_params + run: cargo test -p test_ref_params --target ${{ matrix.target }} ${{ matrix.etc }} - name: Clean run: cargo clean + - name: Test test_reference + run: cargo test -p test_reference --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_reference_client run: cargo test -p test_reference_client --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test test_reference_float @@ -359,6 +361,8 @@ jobs: run: cargo test -p windows_x86_64_gnu --target ${{ matrix.target }} ${{ matrix.etc }} - name: Test windows_x86_64_gnullvm run: cargo test -p windows_x86_64_gnullvm --target ${{ matrix.target }} ${{ matrix.etc }} + - name: Clean + run: cargo clean - name: Test windows_x86_64_msvc run: cargo test -p windows_x86_64_msvc --target ${{ matrix.target }} ${{ matrix.etc }} - name: Check diff